@dooc-dev/dooc 0.0.4 → 0.0.6

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 (231) hide show
  1. package/dist/cli.js +157 -58
  2. package/dist/code-worker.global.js +152 -0
  3. package/dist/code.global.js +101 -101
  4. package/dist/compiler/asset-references.d.ts +4 -0
  5. package/dist/compiler/asset-references.js +117 -0
  6. package/dist/compiler/bundle-urls.d.ts +1 -1
  7. package/dist/compiler/bundle-urls.js +17 -5
  8. package/dist/compiler/check.js +10 -5
  9. package/dist/compiler/code-languages.js +7 -2
  10. package/dist/compiler/compile.d.ts +5 -0
  11. package/dist/compiler/compile.js +117 -12
  12. package/dist/compiler/config.js +2 -1
  13. package/dist/compiler/dxf.d.ts +1 -0
  14. package/dist/compiler/dxf.js +81 -0
  15. package/dist/compiler/export.d.ts +4 -0
  16. package/dist/compiler/export.js +147 -0
  17. package/dist/compiler/figures.js +43 -10
  18. package/dist/compiler/files.js +82 -41
  19. package/dist/compiler/fonts.js +4 -1
  20. package/dist/compiler/icons.d.ts +1 -1
  21. package/dist/compiler/icons.js +11 -2
  22. package/dist/compiler/ignored-files.d.ts +5 -0
  23. package/dist/compiler/ignored-files.js +98 -0
  24. package/dist/compiler/locales.js +13 -8
  25. package/dist/compiler/ops.d.ts +6 -0
  26. package/dist/compiler/ops.js +99 -8
  27. package/dist/compiler/subformat-schema.d.ts +14 -0
  28. package/dist/compiler/subformat-schema.js +92 -0
  29. package/dist/compiler/subformats.d.ts +22 -0
  30. package/dist/compiler/subformats.js +339 -0
  31. package/dist/compiler/textfile.js +3 -0
  32. package/dist/compiler/theme-variants.js +5 -2
  33. package/dist/core/code-file.js +7 -5
  34. package/dist/core/code-grammars.d.ts +5 -0
  35. package/dist/core/code-grammars.js +34 -0
  36. package/dist/core/content-metadata.d.ts +16 -6
  37. package/dist/core/content-metadata.js +283 -17
  38. package/dist/core/content-types.d.ts +4 -2
  39. package/dist/core/escape-html.d.ts +1 -0
  40. package/dist/core/escape-html.js +1 -0
  41. package/dist/core/figure-frame.js +20 -2
  42. package/dist/core/file-embed.js +7 -3
  43. package/dist/core/files.d.ts +2 -1
  44. package/dist/core/files.js +6 -8
  45. package/dist/core/flow-base-css.generated.js +1 -1
  46. package/dist/core/html.d.ts +4 -1
  47. package/dist/core/html.js +11 -10
  48. package/dist/core/icons.d.ts +3 -0
  49. package/dist/core/icons.js +3 -0
  50. package/dist/core/json-tools.d.ts +1 -0
  51. package/dist/core/json-tools.js +12 -0
  52. package/dist/core/language.js +5 -2
  53. package/dist/core/markdown.js +3 -1
  54. package/dist/core/previewers.d.ts +8 -0
  55. package/dist/core/previewers.js +2 -0
  56. package/dist/core/routing.d.ts +5 -2
  57. package/dist/core/routing.js +17 -5
  58. package/dist/core/schema-fields.d.ts +13 -0
  59. package/dist/core/schema-fields.js +175 -0
  60. package/dist/core/schema-graph-mount.js +26 -3
  61. package/dist/core/schema-refs.d.ts +8 -0
  62. package/dist/core/schema-refs.js +82 -0
  63. package/dist/core/subformat-record.d.ts +3 -0
  64. package/dist/core/subformat-record.js +131 -0
  65. package/dist/core/subformats.d.ts +43 -0
  66. package/dist/core/subformats.js +81 -0
  67. package/dist/core/toc-ui.js +26 -24
  68. package/dist/edit.global.js +326 -118
  69. package/dist/flow.global.js +3 -3
  70. package/dist/graph/abnfDiagram-S7VZAUFO-ASBULSKE.js +1 -0
  71. package/dist/graph/architecture-WOLXFQ4H-V57EDXXY.js +1 -0
  72. package/dist/graph/architectureDiagram-YGSQEFNW-GIMP347N.js +36 -0
  73. package/dist/graph/blockDiagram-APKKGZFW-RDL2T4JW.js +140 -0
  74. package/dist/graph/bpmnIcons-APHXDYXF-TWOSQNUQ.js +1 -0
  75. package/dist/graph/c4Diagram-KJ2TOQU5-75LIUC4F.js +38 -0
  76. package/dist/graph/chunk-26TUJSYJ.js +1 -0
  77. package/dist/graph/chunk-3LU66YMI.js +1 -0
  78. package/dist/graph/chunk-3RNHDNP5.js +1 -0
  79. package/dist/graph/chunk-3Y2PDVDE.js +1 -0
  80. package/dist/graph/chunk-3YJHMOOA.js +3 -0
  81. package/dist/graph/chunk-4KILFWYV.js +339 -0
  82. package/dist/graph/chunk-4QDE4SUK.js +1 -0
  83. package/dist/graph/chunk-5OO6DATX.js +1 -0
  84. package/dist/graph/chunk-5UUEAHTN.js +1 -0
  85. package/dist/graph/chunk-6T55RVVR.js +1 -0
  86. package/dist/graph/chunk-ARAJTKOH.js +2 -0
  87. package/dist/graph/chunk-BBD5CEDC.js +72 -0
  88. package/dist/graph/chunk-BVXT562I.js +1 -0
  89. package/dist/graph/chunk-BZAMCJ6B.js +32 -0
  90. package/dist/graph/chunk-C6J4A356.js +15 -0
  91. package/dist/graph/chunk-EG5UVNOC.js +213 -0
  92. package/dist/graph/chunk-GF4TOPUK.js +1 -0
  93. package/dist/graph/chunk-GYT4IYBZ.js +1 -0
  94. package/dist/graph/chunk-HJG2HUYJ.js +88 -0
  95. package/dist/graph/chunk-HOPPTA6H.js +62 -0
  96. package/dist/graph/chunk-I3DMZIHV.js +1 -0
  97. package/dist/graph/chunk-IC23EEF6.js +1 -0
  98. package/dist/graph/chunk-ISO77HML.js +1 -0
  99. package/dist/graph/chunk-JD7ZBJD2.js +1 -0
  100. package/dist/graph/chunk-JRSH5GNS.js +1 -0
  101. package/dist/graph/chunk-JSHWCPFJ.js +1 -0
  102. package/dist/graph/chunk-K2KLZU7M.js +10 -0
  103. package/dist/graph/chunk-K4I76XBX.js +14 -0
  104. package/dist/graph/chunk-KT4VPQD5.js +135 -0
  105. package/dist/graph/chunk-KU6GTEMS.js +1 -0
  106. package/dist/graph/chunk-LT6LXKCR.js +136 -0
  107. package/dist/graph/chunk-MPR575IN.js +1 -0
  108. package/dist/graph/chunk-N3OHKGRZ.js +1 -0
  109. package/dist/graph/chunk-O656ZI37.js +1 -0
  110. package/dist/graph/chunk-OFZLK5G4.js +1 -0
  111. package/dist/graph/chunk-PDH25ALM.js +2 -0
  112. package/dist/graph/chunk-PW2RGZ3O.js +1 -0
  113. package/dist/graph/chunk-QCJUF4YA.js +1 -0
  114. package/dist/graph/chunk-QEEA3KYY.js +2 -0
  115. package/dist/graph/chunk-QYAXYFNI.js +1 -0
  116. package/dist/graph/chunk-QYTM6GY3.js +1 -0
  117. package/dist/graph/chunk-R63JUMUK.js +1 -0
  118. package/dist/graph/chunk-SCEY3ZPT.js +1 -0
  119. package/dist/graph/chunk-VM2H7G2R.js +1 -0
  120. package/dist/graph/chunk-XQS73SBQ.js +1 -0
  121. package/dist/graph/chunk-YCRLJT2S.js +1 -0
  122. package/dist/graph/chunk-Z4FIZ7CR.js +1 -0
  123. package/dist/graph/chunk-ZMCB7VP2.js +1 -0
  124. package/dist/graph/chunk-ZSZXN4BT.js +2 -0
  125. package/dist/graph/classDiagram-v2-L25IHNXF-JL7LVDZH.js +217 -0
  126. package/dist/graph/cose-bilkent-JH36ORCC-PNM3EYPB.js +1 -0
  127. package/dist/graph/cynefin-EF2NZ3EQ-PSXP3DXL.js +1 -0
  128. package/dist/graph/cynefinDiagram-L36ESFBY-QVY54CXO.js +62 -0
  129. package/dist/graph/dagre-SPEB5RXH-HPGQXBZJ.js +4 -0
  130. package/dist/graph/diagram-3B7GL73J-DWH5WS2P.js +200 -0
  131. package/dist/graph/diagram-DNEMPZML-TEGH2U5I.js +24 -0
  132. package/dist/graph/diagram-L3MUGCDN-X4MREUWR.js +41 -0
  133. package/dist/graph/diagram-LA4NIPWU-NXT746HG.js +24 -0
  134. package/dist/graph/diagram-MHCOC4E2-JGHXSAGS.js +3 -0
  135. package/dist/graph/diagram-XPFHEONP-ZHZPBLT4.js +30 -0
  136. package/dist/graph/ebnfDiagram-UZSYDL2S-SMF6KJ43.js +1 -0
  137. package/dist/graph/elk-XV6XMXQE-AZ4HLCWI.js +27 -0
  138. package/dist/graph/erDiagram-EYBAPDEH-B3JNJ357.js +99 -0
  139. package/dist/graph/eventmodeling-K75KTNOO-WG6DDYMC.js +1 -0
  140. package/dist/graph/flowDiagram-MALGAFMO-2R7EYAQI.js +1 -0
  141. package/dist/graph/ganttDiagram-23REXITY-YXBYWFOJ.js +292 -0
  142. package/dist/graph/gitGraph-VSP46ZUC-VBFWJBBT.js +1 -0
  143. package/dist/graph/gitGraphDiagram-STJD7YCW-4FZDCFGV.js +106 -0
  144. package/dist/graph/info-OHQRW6UA-ALVDUVYV.js +1 -0
  145. package/dist/graph/infoDiagram-KBXO4MBG-7EHX2GQG.js +2 -0
  146. package/dist/graph/ishikawaDiagram-M35NCXHK-FRZD2PWQ.js +70 -0
  147. package/dist/graph/journeyDiagram-OPLOXDXO-7Z66JCPR.js +139 -0
  148. package/dist/graph/kanban-definition-BZKZHSQY-NN5AIKTE.js +89 -0
  149. package/dist/graph/katex-DXDNVO6V.js +257 -0
  150. package/dist/graph/mindmap-definition-I2QAS2VK-HDPCABN2.js +98 -0
  151. package/dist/graph/packet-JDAUHWVQ-5MQIBWAH.js +1 -0
  152. package/dist/graph/pegDiagram-FD4XPPHP-H2BFNCKT.js +1 -0
  153. package/dist/graph/pie-XZMESJXO-T5VRKHVT.js +1 -0
  154. package/dist/graph/pieDiagram-J4AKIIQI-O3NJSVD3.js +39 -0
  155. package/dist/graph/quadrantDiagram-XTYBLID2-TMTZJI3P.js +7 -0
  156. package/dist/graph/radar-ABXABTNO-C6FXIBYW.js +1 -0
  157. package/dist/graph/railroad-I3PHUGI6-ZSO5JXB3.js +1 -0
  158. package/dist/graph/railroad-abnf-LNEFI6M7-CI4GQRHB.js +1 -0
  159. package/dist/graph/railroad-ebnf-DWYD2UWJ-MUENNCGK.js +1 -0
  160. package/dist/graph/railroad-peg-JR7BVNR7-N3X5GGIX.js +1 -0
  161. package/dist/graph/railroadDiagram-MRQ6NCDL-JHWS23UO.js +1 -0
  162. package/dist/graph/requirementDiagram-Y7LWUY3S-7DVLPO4B.js +84 -0
  163. package/dist/graph/sankeyDiagram-WGJFYUXA-Z5L4R5TR.js +40 -0
  164. package/dist/graph/schema-graph-global.js +639 -0
  165. package/dist/graph/sequenceDiagram-5NDRBG5M-RCTU25NT.js +169 -0
  166. package/dist/graph/sizeCapture-INFHLROL-RROY32P5.js +1 -0
  167. package/dist/graph/stateDiagram-v2-FJ4FJNEA-BXUSPWDK.js +291 -0
  168. package/dist/graph/swimlanes-UMQ2AFYF-LDD74Q2S.js +1 -0
  169. package/dist/graph/swimlanesDiagram-OMPLPG4O-ZYULLJSU.js +8 -0
  170. package/dist/graph/timeline-definition-SEUHKTQE-ZQSMIVAS.js +120 -0
  171. package/dist/graph/treeView-D4JQ5SDB-42S7U73N.js +1 -0
  172. package/dist/graph/treemap-SAJKECNS-RUBYQ7XF.js +1 -0
  173. package/dist/graph/usecaseDiagram-AFA6YXN4-57RDRYXF.js +370 -0
  174. package/dist/graph/vennDiagram-NNMJR3RB-5C3LVAV6.js +34 -0
  175. package/dist/graph/wardley-7MLQ67FV-NV5HXTTC.js +1 -0
  176. package/dist/graph/wardleyDiagram-S7YFUSEH-6D5BKXHM.js +78 -0
  177. package/dist/graph/xychartDiagram-GGNKY7IX-6ET3ZM67.js +7 -0
  178. package/dist/mcp.js +54 -12
  179. package/dist/plugins/index.d.ts +1 -0
  180. package/dist/plugins/transport.d.ts +22 -0
  181. package/dist/plugins/transport.js +1 -0
  182. package/dist/plugins.global.js +95 -0
  183. package/dist/subformats.global.js +21 -0
  184. package/dist/ui.global.js +80 -60
  185. package/dist/viewer/build-plugins.d.ts +7 -0
  186. package/dist/viewer/build-plugins.js +70 -0
  187. package/dist/viewer/build.d.ts +11 -0
  188. package/dist/viewer/build.js +52 -11
  189. package/dist/viewer/code-file.js +7 -2
  190. package/dist/viewer/editor-tools.d.ts +7 -7
  191. package/dist/viewer/editor-tools.js +36 -5
  192. package/dist/viewer/figure-preview.d.ts +4 -0
  193. package/dist/viewer/figure-preview.js +54 -0
  194. package/dist/viewer/font-picker.js +5 -1
  195. package/dist/viewer/git-diff.d.ts +3 -0
  196. package/dist/viewer/git-diff.js +47 -0
  197. package/dist/viewer/hmr.js +8 -4
  198. package/dist/viewer/i18n.js +7 -5
  199. package/dist/viewer/language-picker.d.ts +2 -2
  200. package/dist/viewer/language-picker.js +26 -9
  201. package/dist/viewer/lazy-preview.d.ts +2 -0
  202. package/dist/viewer/lazy-preview.js +43 -0
  203. package/dist/viewer/locales/eng.json +95 -10
  204. package/dist/viewer/locales/jpn.json +96 -11
  205. package/dist/viewer/locales/zho.json +96 -11
  206. package/dist/viewer/nav-focus.js +8 -1
  207. package/dist/viewer/nav-update.d.ts +2 -0
  208. package/dist/viewer/nav-update.js +117 -0
  209. package/dist/viewer/plugin-blocks.js +1 -1
  210. package/dist/viewer/plugin-style.d.ts +1 -0
  211. package/dist/viewer/plugin-style.js +82 -0
  212. package/dist/viewer/plugins.js +1 -1
  213. package/dist/viewer/resize.d.ts +0 -2
  214. package/dist/viewer/resize.js +2 -98
  215. package/dist/viewer/resource-library.d.ts +11 -9
  216. package/dist/viewer/resource-library.js +181 -31
  217. package/dist/viewer/search.d.ts +4 -2
  218. package/dist/viewer/search.js +252 -53
  219. package/dist/viewer/serve.d.ts +11 -5
  220. package/dist/viewer/serve.js +913 -295
  221. package/dist/viewer/site-icon.js +13 -6
  222. package/dist/viewer/site-title.js +15 -2
  223. package/dist/viewer/textfile.d.ts +5 -0
  224. package/dist/viewer/textfile.js +34 -2
  225. package/dist/viewer/theme-picker.d.ts +2 -0
  226. package/dist/viewer/theme-picker.js +24 -8
  227. package/dist/viewer/workspace.d.ts +2 -0
  228. package/dist/viewer/workspace.js +46 -1
  229. package/package.json +27 -10
  230. package/dist/compiler/bundle.d.ts +0 -2
  231. package/dist/compiler/bundle.js +0 -100
@@ -1,74 +1,74 @@
1
- "use strict";(()=>{var Tl=Object.defineProperty;var di=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var Pr=(t,e)=>{for(var n in e)Tl(t,n,{get:e[n],enumerable:!0})};var _l={};Pr(_l,{default:()=>rh});var rh,vl=di(()=>{rh=Object.freeze(JSON.parse('{"colors":{"activityBar.activeBorder":"#f9826c","activityBar.background":"#fff","activityBar.border":"#e1e4e8","activityBar.foreground":"#2f363d","activityBar.inactiveForeground":"#959da5","activityBarBadge.background":"#2188ff","activityBarBadge.foreground":"#fff","badge.background":"#dbedff","badge.foreground":"#005cc5","breadcrumb.activeSelectionForeground":"#586069","breadcrumb.focusForeground":"#2f363d","breadcrumb.foreground":"#6a737d","breadcrumbPicker.background":"#fafbfc","button.background":"#159739","button.foreground":"#fff","button.hoverBackground":"#138934","button.secondaryBackground":"#e1e4e8","button.secondaryForeground":"#1b1f23","button.secondaryHoverBackground":"#d1d5da","checkbox.background":"#fafbfc","checkbox.border":"#d1d5da","debugToolBar.background":"#fff","descriptionForeground":"#6a737d","diffEditor.insertedTextBackground":"#34d05822","diffEditor.removedTextBackground":"#d73a4922","dropdown.background":"#fafbfc","dropdown.border":"#e1e4e8","dropdown.foreground":"#2f363d","dropdown.listBackground":"#fff","editor.background":"#fff","editor.findMatchBackground":"#ffdf5d","editor.findMatchHighlightBackground":"#ffdf5d66","editor.focusedStackFrameHighlightBackground":"#28a74525","editor.foldBackground":"#d1d5da11","editor.foreground":"#24292e","editor.inactiveSelectionBackground":"#0366d611","editor.lineHighlightBackground":"#f6f8fa","editor.linkedEditingBackground":"#0366d611","editor.selectionBackground":"#0366d625","editor.selectionHighlightBackground":"#34d05840","editor.selectionHighlightBorder":"#34d05800","editor.stackFrameHighlightBackground":"#ffd33d33","editor.wordHighlightBackground":"#34d05800","editor.wordHighlightBorder":"#24943e99","editor.wordHighlightStrongBackground":"#34d05800","editor.wordHighlightStrongBorder":"#24943e50","editorBracketHighlight.foreground1":"#005cc5","editorBracketHighlight.foreground2":"#e36209","editorBracketHighlight.foreground3":"#5a32a3","editorBracketHighlight.foreground4":"#005cc5","editorBracketHighlight.foreground5":"#e36209","editorBracketHighlight.foreground6":"#5a32a3","editorBracketMatch.background":"#34d05840","editorBracketMatch.border":"#34d05800","editorCursor.foreground":"#044289","editorError.foreground":"#cb2431","editorGroup.border":"#e1e4e8","editorGroupHeader.tabsBackground":"#f6f8fa","editorGroupHeader.tabsBorder":"#e1e4e8","editorGutter.addedBackground":"#28a745","editorGutter.deletedBackground":"#d73a49","editorGutter.modifiedBackground":"#2188ff","editorIndentGuide.activeBackground":"#d7dbe0","editorIndentGuide.background":"#eff2f6","editorLineNumber.activeForeground":"#24292e","editorLineNumber.foreground":"#1b1f234d","editorOverviewRuler.border":"#fff","editorWarning.foreground":"#f9c513","editorWhitespace.foreground":"#d1d5da","editorWidget.background":"#f6f8fa","errorForeground":"#cb2431","focusBorder":"#2188ff","foreground":"#444d56","gitDecoration.addedResourceForeground":"#28a745","gitDecoration.conflictingResourceForeground":"#e36209","gitDecoration.deletedResourceForeground":"#d73a49","gitDecoration.ignoredResourceForeground":"#959da5","gitDecoration.modifiedResourceForeground":"#005cc5","gitDecoration.submoduleResourceForeground":"#959da5","gitDecoration.untrackedResourceForeground":"#28a745","input.background":"#fafbfc","input.border":"#e1e4e8","input.foreground":"#2f363d","input.placeholderForeground":"#959da5","list.activeSelectionBackground":"#e2e5e9","list.activeSelectionForeground":"#2f363d","list.focusBackground":"#cce5ff","list.hoverBackground":"#ebf0f4","list.hoverForeground":"#2f363d","list.inactiveFocusBackground":"#dbedff","list.inactiveSelectionBackground":"#e8eaed","list.inactiveSelectionForeground":"#2f363d","notificationCenterHeader.background":"#e1e4e8","notificationCenterHeader.foreground":"#6a737d","notifications.background":"#fafbfc","notifications.border":"#e1e4e8","notifications.foreground":"#2f363d","notificationsErrorIcon.foreground":"#d73a49","notificationsInfoIcon.foreground":"#005cc5","notificationsWarningIcon.foreground":"#e36209","panel.background":"#f6f8fa","panel.border":"#e1e4e8","panelInput.border":"#e1e4e8","panelTitle.activeBorder":"#f9826c","panelTitle.activeForeground":"#2f363d","panelTitle.inactiveForeground":"#6a737d","pickerGroup.border":"#e1e4e8","pickerGroup.foreground":"#2f363d","progressBar.background":"#2188ff","quickInput.background":"#fafbfc","quickInput.foreground":"#2f363d","scrollbar.shadow":"#6a737d33","scrollbarSlider.activeBackground":"#959da588","scrollbarSlider.background":"#959da533","scrollbarSlider.hoverBackground":"#959da544","settings.headerForeground":"#2f363d","settings.modifiedItemIndicator":"#2188ff","sideBar.background":"#f6f8fa","sideBar.border":"#e1e4e8","sideBar.foreground":"#586069","sideBarSectionHeader.background":"#f6f8fa","sideBarSectionHeader.border":"#e1e4e8","sideBarSectionHeader.foreground":"#2f363d","sideBarTitle.foreground":"#2f363d","statusBar.background":"#fff","statusBar.border":"#e1e4e8","statusBar.debuggingBackground":"#f9826c","statusBar.debuggingForeground":"#fff","statusBar.foreground":"#586069","statusBar.noFolderBackground":"#fff","statusBarItem.prominentBackground":"#e8eaed","statusBarItem.remoteBackground":"#fff","statusBarItem.remoteForeground":"#586069","tab.activeBackground":"#fff","tab.activeBorder":"#fff","tab.activeBorderTop":"#f9826c","tab.activeForeground":"#2f363d","tab.border":"#e1e4e8","tab.hoverBackground":"#fff","tab.inactiveBackground":"#f6f8fa","tab.inactiveForeground":"#6a737d","tab.unfocusedActiveBorder":"#fff","tab.unfocusedActiveBorderTop":"#e1e4e8","tab.unfocusedHoverBackground":"#fff","terminal.ansiBlack":"#24292e","terminal.ansiBlue":"#0366d6","terminal.ansiBrightBlack":"#959da5","terminal.ansiBrightBlue":"#005cc5","terminal.ansiBrightCyan":"#3192aa","terminal.ansiBrightGreen":"#22863a","terminal.ansiBrightMagenta":"#5a32a3","terminal.ansiBrightRed":"#cb2431","terminal.ansiBrightWhite":"#d1d5da","terminal.ansiBrightYellow":"#b08800","terminal.ansiCyan":"#1b7c83","terminal.ansiGreen":"#28a745","terminal.ansiMagenta":"#5a32a3","terminal.ansiRed":"#d73a49","terminal.ansiWhite":"#6a737d","terminal.ansiYellow":"#dbab09","terminal.foreground":"#586069","terminal.tab.activeBorder":"#f9826c","terminalCursor.background":"#d1d5da","terminalCursor.foreground":"#005cc5","textBlockQuote.background":"#fafbfc","textBlockQuote.border":"#e1e4e8","textCodeBlock.background":"#f6f8fa","textLink.activeForeground":"#005cc5","textLink.foreground":"#0366d6","textPreformat.foreground":"#586069","textSeparator.foreground":"#d1d5da","titleBar.activeBackground":"#fff","titleBar.activeForeground":"#2f363d","titleBar.border":"#e1e4e8","titleBar.inactiveBackground":"#f6f8fa","titleBar.inactiveForeground":"#6a737d","tree.indentGuidesStroke":"#e1e4e8","welcomePage.buttonBackground":"#f6f8fa","welcomePage.buttonHoverBackground":"#e1e4e8"},"displayName":"GitHub Light","name":"github-light","semanticHighlighting":true,"tokenColors":[{"scope":["comment","punctuation.definition.comment","string.comment"],"settings":{"foreground":"#6a737d"}},{"scope":["constant","entity.name.constant","variable.other.constant","variable.other.enummember","variable.language"],"settings":{"foreground":"#005cc5"}},{"scope":["entity","entity.name"],"settings":{"foreground":"#6f42c1"}},{"scope":"variable.parameter.function","settings":{"foreground":"#24292e"}},{"scope":"entity.name.tag","settings":{"foreground":"#22863a"}},{"scope":"keyword","settings":{"foreground":"#d73a49"}},{"scope":["storage","storage.type"],"settings":{"foreground":"#d73a49"}},{"scope":["storage.modifier.package","storage.modifier.import","storage.type.java"],"settings":{"foreground":"#24292e"}},{"scope":["string","punctuation.definition.string","string punctuation.section.embedded source"],"settings":{"foreground":"#032f62"}},{"scope":"support","settings":{"foreground":"#005cc5"}},{"scope":"meta.property-name","settings":{"foreground":"#005cc5"}},{"scope":"variable","settings":{"foreground":"#e36209"}},{"scope":"variable.other","settings":{"foreground":"#24292e"}},{"scope":"invalid.broken","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"invalid.deprecated","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"invalid.illegal","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"invalid.unimplemented","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"carriage-return","settings":{"background":"#d73a49","content":"^M","fontStyle":"italic underline","foreground":"#fafbfc"}},{"scope":"message.error","settings":{"foreground":"#b31d28"}},{"scope":"string variable","settings":{"foreground":"#005cc5"}},{"scope":["source.regexp","string.regexp"],"settings":{"foreground":"#032f62"}},{"scope":["string.regexp.character-class","string.regexp constant.character.escape","string.regexp source.ruby.embedded","string.regexp string.regexp.arbitrary-repitition"],"settings":{"foreground":"#032f62"}},{"scope":"string.regexp constant.character.escape","settings":{"fontStyle":"bold","foreground":"#22863a"}},{"scope":"support.constant","settings":{"foreground":"#005cc5"}},{"scope":"support.variable","settings":{"foreground":"#005cc5"}},{"scope":"meta.module-reference","settings":{"foreground":"#005cc5"}},{"scope":"punctuation.definition.list.begin.markdown","settings":{"foreground":"#e36209"}},{"scope":["markup.heading","markup.heading entity.name"],"settings":{"fontStyle":"bold","foreground":"#005cc5"}},{"scope":"markup.quote","settings":{"foreground":"#22863a"}},{"scope":"markup.italic","settings":{"fontStyle":"italic","foreground":"#24292e"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#24292e"}},{"scope":["markup.underline"],"settings":{"fontStyle":"underline"}},{"scope":["markup.strikethrough"],"settings":{"fontStyle":"strikethrough"}},{"scope":"markup.inline.raw","settings":{"foreground":"#005cc5"}},{"scope":["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],"settings":{"background":"#ffeef0","foreground":"#b31d28"}},{"scope":["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],"settings":{"background":"#f0fff4","foreground":"#22863a"}},{"scope":["markup.changed","punctuation.definition.changed"],"settings":{"background":"#ffebda","foreground":"#e36209"}},{"scope":["markup.ignored","markup.untracked"],"settings":{"background":"#005cc5","foreground":"#f6f8fa"}},{"scope":"meta.diff.range","settings":{"fontStyle":"bold","foreground":"#6f42c1"}},{"scope":"meta.diff.header","settings":{"foreground":"#005cc5"}},{"scope":"meta.separator","settings":{"fontStyle":"bold","foreground":"#005cc5"}},{"scope":"meta.output","settings":{"foreground":"#005cc5"}},{"scope":["brackethighlighter.tag","brackethighlighter.curly","brackethighlighter.round","brackethighlighter.square","brackethighlighter.angle","brackethighlighter.quote"],"settings":{"foreground":"#586069"}},{"scope":"brackethighlighter.unmatched","settings":{"foreground":"#b31d28"}},{"scope":["constant.other.reference.link","string.other.link"],"settings":{"fontStyle":"underline","foreground":"#032f62"}}],"type":"light"}'))});var El={};Pr(El,{default:()=>sh});var sh,Al=di(()=>{sh=Object.freeze(JSON.parse('{"colors":{"activityBar.activeBorder":"#f9826c","activityBar.background":"#24292e","activityBar.border":"#1b1f23","activityBar.foreground":"#e1e4e8","activityBar.inactiveForeground":"#6a737d","activityBarBadge.background":"#0366d6","activityBarBadge.foreground":"#fff","badge.background":"#044289","badge.foreground":"#c8e1ff","breadcrumb.activeSelectionForeground":"#d1d5da","breadcrumb.focusForeground":"#e1e4e8","breadcrumb.foreground":"#959da5","breadcrumbPicker.background":"#2b3036","button.background":"#176f2c","button.foreground":"#dcffe4","button.hoverBackground":"#22863a","button.secondaryBackground":"#444d56","button.secondaryForeground":"#fff","button.secondaryHoverBackground":"#586069","checkbox.background":"#444d56","checkbox.border":"#1b1f23","debugToolBar.background":"#2b3036","descriptionForeground":"#959da5","diffEditor.insertedTextBackground":"#28a74530","diffEditor.removedTextBackground":"#d73a4930","dropdown.background":"#2f363d","dropdown.border":"#1b1f23","dropdown.foreground":"#e1e4e8","dropdown.listBackground":"#24292e","editor.background":"#24292e","editor.findMatchBackground":"#ffd33d44","editor.findMatchHighlightBackground":"#ffd33d22","editor.focusedStackFrameHighlightBackground":"#2b6a3033","editor.foldBackground":"#58606915","editor.foreground":"#e1e4e8","editor.inactiveSelectionBackground":"#3392FF22","editor.lineHighlightBackground":"#2b3036","editor.linkedEditingBackground":"#3392FF22","editor.selectionBackground":"#3392FF44","editor.selectionHighlightBackground":"#17E5E633","editor.selectionHighlightBorder":"#17E5E600","editor.stackFrameHighlightBackground":"#C6902625","editor.wordHighlightBackground":"#17E5E600","editor.wordHighlightBorder":"#17E5E699","editor.wordHighlightStrongBackground":"#17E5E600","editor.wordHighlightStrongBorder":"#17E5E666","editorBracketHighlight.foreground1":"#79b8ff","editorBracketHighlight.foreground2":"#ffab70","editorBracketHighlight.foreground3":"#b392f0","editorBracketHighlight.foreground4":"#79b8ff","editorBracketHighlight.foreground5":"#ffab70","editorBracketHighlight.foreground6":"#b392f0","editorBracketMatch.background":"#17E5E650","editorBracketMatch.border":"#17E5E600","editorCursor.foreground":"#c8e1ff","editorError.foreground":"#f97583","editorGroup.border":"#1b1f23","editorGroupHeader.tabsBackground":"#1f2428","editorGroupHeader.tabsBorder":"#1b1f23","editorGutter.addedBackground":"#28a745","editorGutter.deletedBackground":"#ea4a5a","editorGutter.modifiedBackground":"#2188ff","editorIndentGuide.activeBackground":"#444d56","editorIndentGuide.background":"#2f363d","editorLineNumber.activeForeground":"#e1e4e8","editorLineNumber.foreground":"#444d56","editorOverviewRuler.border":"#1b1f23","editorWarning.foreground":"#ffea7f","editorWhitespace.foreground":"#444d56","editorWidget.background":"#1f2428","errorForeground":"#f97583","focusBorder":"#005cc5","foreground":"#d1d5da","gitDecoration.addedResourceForeground":"#34d058","gitDecoration.conflictingResourceForeground":"#ffab70","gitDecoration.deletedResourceForeground":"#ea4a5a","gitDecoration.ignoredResourceForeground":"#6a737d","gitDecoration.modifiedResourceForeground":"#79b8ff","gitDecoration.submoduleResourceForeground":"#6a737d","gitDecoration.untrackedResourceForeground":"#34d058","input.background":"#2f363d","input.border":"#1b1f23","input.foreground":"#e1e4e8","input.placeholderForeground":"#959da5","list.activeSelectionBackground":"#39414a","list.activeSelectionForeground":"#e1e4e8","list.focusBackground":"#044289","list.hoverBackground":"#282e34","list.hoverForeground":"#e1e4e8","list.inactiveFocusBackground":"#1d2d3e","list.inactiveSelectionBackground":"#282e34","list.inactiveSelectionForeground":"#e1e4e8","notificationCenterHeader.background":"#24292e","notificationCenterHeader.foreground":"#959da5","notifications.background":"#2f363d","notifications.border":"#1b1f23","notifications.foreground":"#e1e4e8","notificationsErrorIcon.foreground":"#ea4a5a","notificationsInfoIcon.foreground":"#79b8ff","notificationsWarningIcon.foreground":"#ffab70","panel.background":"#1f2428","panel.border":"#1b1f23","panelInput.border":"#2f363d","panelTitle.activeBorder":"#f9826c","panelTitle.activeForeground":"#e1e4e8","panelTitle.inactiveForeground":"#959da5","peekViewEditor.background":"#1f242888","peekViewEditor.matchHighlightBackground":"#ffd33d33","peekViewResult.background":"#1f2428","peekViewResult.matchHighlightBackground":"#ffd33d33","pickerGroup.border":"#444d56","pickerGroup.foreground":"#e1e4e8","progressBar.background":"#0366d6","quickInput.background":"#24292e","quickInput.foreground":"#e1e4e8","scrollbar.shadow":"#0008","scrollbarSlider.activeBackground":"#6a737d88","scrollbarSlider.background":"#6a737d33","scrollbarSlider.hoverBackground":"#6a737d44","settings.headerForeground":"#e1e4e8","settings.modifiedItemIndicator":"#0366d6","sideBar.background":"#1f2428","sideBar.border":"#1b1f23","sideBar.foreground":"#d1d5da","sideBarSectionHeader.background":"#1f2428","sideBarSectionHeader.border":"#1b1f23","sideBarSectionHeader.foreground":"#e1e4e8","sideBarTitle.foreground":"#e1e4e8","statusBar.background":"#24292e","statusBar.border":"#1b1f23","statusBar.debuggingBackground":"#931c06","statusBar.debuggingForeground":"#fff","statusBar.foreground":"#d1d5da","statusBar.noFolderBackground":"#24292e","statusBarItem.prominentBackground":"#282e34","statusBarItem.remoteBackground":"#24292e","statusBarItem.remoteForeground":"#d1d5da","tab.activeBackground":"#24292e","tab.activeBorder":"#24292e","tab.activeBorderTop":"#f9826c","tab.activeForeground":"#e1e4e8","tab.border":"#1b1f23","tab.hoverBackground":"#24292e","tab.inactiveBackground":"#1f2428","tab.inactiveForeground":"#959da5","tab.unfocusedActiveBorder":"#24292e","tab.unfocusedActiveBorderTop":"#1b1f23","tab.unfocusedHoverBackground":"#24292e","terminal.ansiBlack":"#586069","terminal.ansiBlue":"#2188ff","terminal.ansiBrightBlack":"#959da5","terminal.ansiBrightBlue":"#79b8ff","terminal.ansiBrightCyan":"#56d4dd","terminal.ansiBrightGreen":"#85e89d","terminal.ansiBrightMagenta":"#b392f0","terminal.ansiBrightRed":"#f97583","terminal.ansiBrightWhite":"#fafbfc","terminal.ansiBrightYellow":"#ffea7f","terminal.ansiCyan":"#39c5cf","terminal.ansiGreen":"#34d058","terminal.ansiMagenta":"#b392f0","terminal.ansiRed":"#ea4a5a","terminal.ansiWhite":"#d1d5da","terminal.ansiYellow":"#ffea7f","terminal.foreground":"#d1d5da","terminal.tab.activeBorder":"#f9826c","terminalCursor.background":"#586069","terminalCursor.foreground":"#79b8ff","textBlockQuote.background":"#24292e","textBlockQuote.border":"#444d56","textCodeBlock.background":"#2f363d","textLink.activeForeground":"#c8e1ff","textLink.foreground":"#79b8ff","textPreformat.foreground":"#d1d5da","textSeparator.foreground":"#586069","titleBar.activeBackground":"#24292e","titleBar.activeForeground":"#e1e4e8","titleBar.border":"#1b1f23","titleBar.inactiveBackground":"#1f2428","titleBar.inactiveForeground":"#959da5","tree.indentGuidesStroke":"#2f363d","welcomePage.buttonBackground":"#2f363d","welcomePage.buttonHoverBackground":"#444d56"},"displayName":"GitHub Dark","name":"github-dark","semanticHighlighting":true,"tokenColors":[{"scope":["comment","punctuation.definition.comment","string.comment"],"settings":{"foreground":"#6a737d"}},{"scope":["constant","entity.name.constant","variable.other.constant","variable.other.enummember","variable.language"],"settings":{"foreground":"#79b8ff"}},{"scope":["entity","entity.name"],"settings":{"foreground":"#b392f0"}},{"scope":"variable.parameter.function","settings":{"foreground":"#e1e4e8"}},{"scope":"entity.name.tag","settings":{"foreground":"#85e89d"}},{"scope":"keyword","settings":{"foreground":"#f97583"}},{"scope":["storage","storage.type"],"settings":{"foreground":"#f97583"}},{"scope":["storage.modifier.package","storage.modifier.import","storage.type.java"],"settings":{"foreground":"#e1e4e8"}},{"scope":["string","punctuation.definition.string","string punctuation.section.embedded source"],"settings":{"foreground":"#9ecbff"}},{"scope":"support","settings":{"foreground":"#79b8ff"}},{"scope":"meta.property-name","settings":{"foreground":"#79b8ff"}},{"scope":"variable","settings":{"foreground":"#ffab70"}},{"scope":"variable.other","settings":{"foreground":"#e1e4e8"}},{"scope":"invalid.broken","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"invalid.deprecated","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"invalid.illegal","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"invalid.unimplemented","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"carriage-return","settings":{"background":"#f97583","content":"^M","fontStyle":"italic underline","foreground":"#24292e"}},{"scope":"message.error","settings":{"foreground":"#fdaeb7"}},{"scope":"string variable","settings":{"foreground":"#79b8ff"}},{"scope":["source.regexp","string.regexp"],"settings":{"foreground":"#dbedff"}},{"scope":["string.regexp.character-class","string.regexp constant.character.escape","string.regexp source.ruby.embedded","string.regexp string.regexp.arbitrary-repitition"],"settings":{"foreground":"#dbedff"}},{"scope":"string.regexp constant.character.escape","settings":{"fontStyle":"bold","foreground":"#85e89d"}},{"scope":"support.constant","settings":{"foreground":"#79b8ff"}},{"scope":"support.variable","settings":{"foreground":"#79b8ff"}},{"scope":"meta.module-reference","settings":{"foreground":"#79b8ff"}},{"scope":"punctuation.definition.list.begin.markdown","settings":{"foreground":"#ffab70"}},{"scope":["markup.heading","markup.heading entity.name"],"settings":{"fontStyle":"bold","foreground":"#79b8ff"}},{"scope":"markup.quote","settings":{"foreground":"#85e89d"}},{"scope":"markup.italic","settings":{"fontStyle":"italic","foreground":"#e1e4e8"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#e1e4e8"}},{"scope":["markup.underline"],"settings":{"fontStyle":"underline"}},{"scope":["markup.strikethrough"],"settings":{"fontStyle":"strikethrough"}},{"scope":"markup.inline.raw","settings":{"foreground":"#79b8ff"}},{"scope":["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],"settings":{"background":"#86181d","foreground":"#fdaeb7"}},{"scope":["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],"settings":{"background":"#144620","foreground":"#85e89d"}},{"scope":["markup.changed","punctuation.definition.changed"],"settings":{"background":"#c24e00","foreground":"#ffab70"}},{"scope":["markup.ignored","markup.untracked"],"settings":{"background":"#79b8ff","foreground":"#2f363d"}},{"scope":"meta.diff.range","settings":{"fontStyle":"bold","foreground":"#b392f0"}},{"scope":"meta.diff.header","settings":{"foreground":"#79b8ff"}},{"scope":"meta.separator","settings":{"fontStyle":"bold","foreground":"#79b8ff"}},{"scope":"meta.output","settings":{"foreground":"#79b8ff"}},{"scope":["brackethighlighter.tag","brackethighlighter.curly","brackethighlighter.round","brackethighlighter.square","brackethighlighter.angle","brackethighlighter.quote"],"settings":{"foreground":"#d1d5da"}},{"scope":"brackethighlighter.unmatched","settings":{"foreground":"#fdaeb7"}},{"scope":["constant.other.reference.link","string.other.link"],"settings":{"fontStyle":"underline","foreground":"#dbedff"}}],"type":"dark"}'))});var yn=Symbol.for("yaml.alias"),bn=Symbol.for("yaml.document"),ce=Symbol.for("yaml.map"),$r=Symbol.for("yaml.pair"),ee=Symbol.for("yaml.scalar"),Ne=Symbol.for("yaml.seq"),Y=Symbol.for("yaml.node.type"),ue=t=>!!t&&typeof t=="object"&&t[Y]===yn,be=t=>!!t&&typeof t=="object"&&t[Y]===bn,fe=t=>!!t&&typeof t=="object"&&t[Y]===ce,L=t=>!!t&&typeof t=="object"&&t[Y]===$r,I=t=>!!t&&typeof t=="object"&&t[Y]===ee,te=t=>!!t&&typeof t=="object"&&t[Y]===Ne;function B(t){if(t&&typeof t=="object")switch(t[Y]){case ce:case Ne:return!0}return!1}function T(t){if(t&&typeof t=="object")switch(t[Y]){case yn:case ce:case ee:case Ne:return!0}return!1}var wn=t=>(I(t)||B(t))&&!!t.anchor;var Q=Symbol("break visit"),hi=Symbol("skip children"),we=Symbol("remove node");function se(t,e){let n=pi(e);be(t)?ft(null,t.contents,n,Object.freeze([t]))===we&&(t.contents=null):ft(null,t,n,Object.freeze([]))}se.BREAK=Q;se.SKIP=hi;se.REMOVE=we;function ft(t,e,n,r){let s=gi(t,e,n,r);if(T(s)||L(s))return mi(t,r,s),ft(t,s,n,r);if(typeof s!="symbol"){if(B(e)){r=Object.freeze(r.concat(e));for(let i=0;i<e.items.length;++i){let o=ft(i,e.items[i],n,r);if(typeof o=="number")i=o-1;else{if(o===Q)return Q;o===we&&(e.items.splice(i,1),i-=1)}}}else if(L(e)){r=Object.freeze(r.concat(e));let i=ft("key",e.key,n,r);if(i===Q)return Q;i===we&&(e.key=null);let o=ft("value",e.value,n,r);if(o===Q)return Q;o===we&&(e.value=null)}}return s}async function kn(t,e){let n=pi(e);be(t)?await dt(null,t.contents,n,Object.freeze([t]))===we&&(t.contents=null):await dt(null,t,n,Object.freeze([]))}kn.BREAK=Q;kn.SKIP=hi;kn.REMOVE=we;async function dt(t,e,n,r){let s=await gi(t,e,n,r);if(T(s)||L(s))return mi(t,r,s),dt(t,s,n,r);if(typeof s!="symbol"){if(B(e)){r=Object.freeze(r.concat(e));for(let i=0;i<e.items.length;++i){let o=await dt(i,e.items[i],n,r);if(typeof o=="number")i=o-1;else{if(o===Q)return Q;o===we&&(e.items.splice(i,1),i-=1)}}}else if(L(e)){r=Object.freeze(r.concat(e));let i=await dt("key",e.key,n,r);if(i===Q)return Q;i===we&&(e.key=null);let o=await dt("value",e.value,n,r);if(o===Q)return Q;o===we&&(e.value=null)}}return s}function pi(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function gi(t,e,n,r){if(typeof n=="function")return n(t,e,r);if(fe(e))return n.Map?.(t,e,r);if(te(e))return n.Seq?.(t,e,r);if(L(e))return n.Pair?.(t,e,r);if(I(e))return n.Scalar?.(t,e,r);if(ue(e))return n.Alias?.(t,e,r)}function mi(t,e,n){let r=e[e.length-1];if(B(r))r.items[t]=n;else if(L(r))t==="key"?r.key=n:r.value=n;else if(be(r))r.contents=n;else{let s=ue(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}var Ll={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Bl=t=>t.replace(/[!,[\]{}]/g,e=>Ll[e]),ke=class t{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,n)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=!1);let r=e.trim().split(/[ \t]+/),s=r.shift();switch(s){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;let[i,o]=r;return this.tags[i]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;let[i]=r;if(i==="1.1"||i==="1.2")return this.yaml.version=i,!0;{let o=/^\d+\.\d+$/.test(i);return n(6,`Unsupported YAML version ${i}`,o),!1}}default:return n(0,`Unknown directive ${s}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),o)}let[,r,s]=e.match(/^(.*!)([^!]*)$/s);s||n(`The ${e} tag has no suffix`);let i=this.tags[r];if(i)try{return i+decodeURIComponent(s)}catch(o){return n(String(o)),null}return r==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[n,r]of Object.entries(this.tags))if(e.startsWith(r))return n+Bl(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),s;if(e&&r.length>0&&T(e.contents)){let i={};se(e.contents,(o,a)=>{T(a)&&a.tag&&(i[a.tag]=!0)}),s=Object.keys(i)}else s=[];for(let[i,o]of r)i==="!!"&&o==="tag:yaml.org,2002:"||(!e||s.some(a=>a.startsWith(o)))&&n.push(`%TAG ${i} ${o}`);return n.join(`
2
- `)}};ke.defaultYaml={explicit:!1,version:"1.2"};ke.defaultTags={"!!":"tag:yaml.org,2002:"};function Sn(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function Mr(t){let e=new Set;return se(t,{Value(n,r){r.anchor&&e.add(r.anchor)}}),e}function Fr(t,e){for(let n=1;;++n){let r=`${t}${n}`;if(!e.has(r))return r}}function yi(t,e){let n=[],r=new Map,s=null;return{onAnchor:i=>{n.push(i),s??(s=Mr(t));let o=Fr(e,s);return s.add(o),o},setAnchors:()=>{for(let i of n){let o=r.get(i);if(typeof o=="object"&&o.anchor&&(I(o.node)||B(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=i,a}}},sourceObjects:r}}function Ge(t,e,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let s=0,i=r.length;s<i;++s){let o=r[s],a=Ge(t,r,String(s),o);a===void 0?delete r[s]:a!==o&&(r[s]=a)}else if(r instanceof Map)for(let s of Array.from(r.keys())){let i=r.get(s),o=Ge(t,r,s,i);o===void 0?r.delete(s):o!==i&&r.set(s,o)}else if(r instanceof Set)for(let s of Array.from(r)){let i=Ge(t,r,s,s);i===void 0?r.delete(s):i!==s&&(r.delete(s),r.add(i))}else for(let[s,i]of Object.entries(r)){let o=Ge(t,r,s,i);o===void 0?delete r[s]:o!==i&&(r[s]=o)}return t.call(e,n,r)}function q(t,e,n){if(Array.isArray(t))return t.map((r,s)=>q(r,String(s),n));if(t&&typeof t.toJSON=="function"){if(!n||!wn(t))return t.toJSON(e,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(t,r),n.onCreate=i=>{r.res=i,delete n.onCreate};let s=t.toJSON(e,n);return n.onCreate&&n.onCreate(s),s}return typeof t=="bigint"&&!n?.keep?Number(t):t}var je=class{constructor(e){Object.defineProperty(this,Y,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:n,maxAliasCount:r,onAnchor:s,reviver:i}={}){if(!be(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=q(this,"",o);if(typeof s=="function")for(let{count:l,res:c}of o.anchors.values())s(c,l);return typeof i=="function"?Ge(i,{"":a},"",a):a}};var xe=class extends je{constructor(e){super(yn),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,n){if(n?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let r;n?.aliasResolveCache?r=n.aliasResolveCache:(r=[],se(e,{Node:(i,o)=>{(ue(o)||wn(o))&&r.push(o)}}),n&&(n.aliasResolveCache=r));let s;for(let i of r){if(i===this)break;i.anchor===this.source&&(s=i)}if(s&&n){let{anchors:i,doc:o,maxAliasCount:a}=n,l=i.get(s);if(l||(q(s,null,n),l=i.get(s)),l?.res===void 0){let c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(a>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=Cn(o,s,i)),l.count*l.aliasCount>a)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}}return s}toJSON(e,n){if(!n)return{source:this.source};let r=this.resolve(n.doc,n);if(!r){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(s)}return n.anchors.get(r).res}toString(e,n,r){let s=`*${this.source}`;if(e){if(Sn(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(i)}if(e.implicitKey)return`${s} `}return s}};function Cn(t,e,n){if(ue(e)){let r=e.resolve(t),s=n&&r&&n.get(r);return s?s.count*s.aliasCount:0}else if(B(e)){let r=0;for(let s of e.items){let i=Cn(t,s,n);i>r&&(r=i)}return r}else if(L(e)){let r=Cn(t,e.key,n),s=Cn(t,e.value,n);return Math.max(r,s)}return 1}var _n=t=>!t||typeof t!="function"&&typeof t!="object",v=class extends je{constructor(e){super(ee),this.value=e}toJSON(e,n){return n?.keep?this.value:q(this.value,e,n)}toString(){return String(this.value)}};v.BLOCK_FOLDED="BLOCK_FOLDED";v.BLOCK_LITERAL="BLOCK_LITERAL";v.PLAIN="PLAIN";v.QUOTE_DOUBLE="QUOTE_DOUBLE";v.QUOTE_SINGLE="QUOTE_SINGLE";var Ol="tag:yaml.org,2002:";function Rl(t,e,n){if(e){let r=n.filter(i=>i.tag===e),s=r.find(i=>!i.format)??r[0];if(!s)throw new Error(`Tag ${e} not found`);return s}return n.find(r=>r.identify?.(t)&&!r.format)}function Ie(t,e,n){if(be(t)&&(t=t.contents),T(t))return t;if(L(t)){let f=n.schema[ce].createNode?.(n.schema,null,n);return f.items.push(t),f}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:r,onAnchor:s,onTagObj:i,schema:o,sourceObjects:a}=n,l;if(r&&t&&typeof t=="object"){if(l=a.get(t),l)return l.anchor??(l.anchor=s(t)),new xe(l.anchor);l={anchor:null,node:null},a.set(t,l)}e?.startsWith("!!")&&(e=Ol+e.slice(2));let c=Rl(t,e,o.tags);if(!c){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let f=new v(t);return l&&(l.node=f),f}c=t instanceof Map?o[ce]:Symbol.iterator in Object(t)?o[Ne]:o[ce]}i&&(i(c),delete n.onTagObj);let u=c?.createNode?c.createNode(n.schema,t,n):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(n.schema,t,n):new v(t);return e?u.tag=e:c.default||(u.tag=c.tag),l&&(l.node=u),u}function Tt(t,e,n){let r=n;for(let s=e.length-1;s>=0;--s){let i=e[s];if(typeof i=="number"&&Number.isInteger(i)&&i>=0){let o=[];o[i]=r,r=o}else r=new Map([[i,r]])}return Ie(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}var pt=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,ht=class extends je{constructor(e,n){super(e),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(e){let n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(r=>T(r)||L(r)?r.clone(e):r),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(pt(e))this.add(n);else{let[r,...s]=e,i=this.get(r,!0);if(B(i))i.addIn(s,n);else if(i===void 0&&this.schema)this.set(r,Tt(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}deleteIn(e){let[n,...r]=e;if(r.length===0)return this.delete(n);let s=this.get(n,!0);if(B(s))return s.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){let[r,...s]=e,i=this.get(r,!0);return s.length===0?!n&&I(i)?i.value:i:B(i)?i.getIn(s,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!L(n))return!1;let r=n.value;return r==null||e&&I(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){let[n,...r]=e;if(r.length===0)return this.has(n);let s=this.get(n,!0);return B(s)?s.hasIn(r):!1}setIn(e,n){let[r,...s]=e;if(s.length===0)this.set(r,n);else{let i=this.get(r,!0);if(B(i))i.setIn(s,n);else if(i===void 0&&this.schema)this.set(r,Tt(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}};var bi=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function ie(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}var Se=(t,e,n)=>t.endsWith(`
3
- `)?ie(n,e):n.includes(`
1
+ "use strict";(()=>{var Dl=Object.defineProperty;var ko=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var jr=(t,e)=>{for(var n in e)Dl(t,n,{get:e[n],enumerable:!0})};var Ll={};jr(Ll,{default:()=>dh});var dh,Bl=ko(()=>{dh=Object.freeze(JSON.parse('{"colors":{"activityBar.activeBorder":"#f9826c","activityBar.background":"#fff","activityBar.border":"#e1e4e8","activityBar.foreground":"#2f363d","activityBar.inactiveForeground":"#959da5","activityBarBadge.background":"#2188ff","activityBarBadge.foreground":"#fff","badge.background":"#dbedff","badge.foreground":"#005cc5","breadcrumb.activeSelectionForeground":"#586069","breadcrumb.focusForeground":"#2f363d","breadcrumb.foreground":"#6a737d","breadcrumbPicker.background":"#fafbfc","button.background":"#159739","button.foreground":"#fff","button.hoverBackground":"#138934","button.secondaryBackground":"#e1e4e8","button.secondaryForeground":"#1b1f23","button.secondaryHoverBackground":"#d1d5da","checkbox.background":"#fafbfc","checkbox.border":"#d1d5da","debugToolBar.background":"#fff","descriptionForeground":"#6a737d","diffEditor.insertedTextBackground":"#34d05822","diffEditor.removedTextBackground":"#d73a4922","dropdown.background":"#fafbfc","dropdown.border":"#e1e4e8","dropdown.foreground":"#2f363d","dropdown.listBackground":"#fff","editor.background":"#fff","editor.findMatchBackground":"#ffdf5d","editor.findMatchHighlightBackground":"#ffdf5d66","editor.focusedStackFrameHighlightBackground":"#28a74525","editor.foldBackground":"#d1d5da11","editor.foreground":"#24292e","editor.inactiveSelectionBackground":"#0366d611","editor.lineHighlightBackground":"#f6f8fa","editor.linkedEditingBackground":"#0366d611","editor.selectionBackground":"#0366d625","editor.selectionHighlightBackground":"#34d05840","editor.selectionHighlightBorder":"#34d05800","editor.stackFrameHighlightBackground":"#ffd33d33","editor.wordHighlightBackground":"#34d05800","editor.wordHighlightBorder":"#24943e99","editor.wordHighlightStrongBackground":"#34d05800","editor.wordHighlightStrongBorder":"#24943e50","editorBracketHighlight.foreground1":"#005cc5","editorBracketHighlight.foreground2":"#e36209","editorBracketHighlight.foreground3":"#5a32a3","editorBracketHighlight.foreground4":"#005cc5","editorBracketHighlight.foreground5":"#e36209","editorBracketHighlight.foreground6":"#5a32a3","editorBracketMatch.background":"#34d05840","editorBracketMatch.border":"#34d05800","editorCursor.foreground":"#044289","editorError.foreground":"#cb2431","editorGroup.border":"#e1e4e8","editorGroupHeader.tabsBackground":"#f6f8fa","editorGroupHeader.tabsBorder":"#e1e4e8","editorGutter.addedBackground":"#28a745","editorGutter.deletedBackground":"#d73a49","editorGutter.modifiedBackground":"#2188ff","editorIndentGuide.activeBackground":"#d7dbe0","editorIndentGuide.background":"#eff2f6","editorLineNumber.activeForeground":"#24292e","editorLineNumber.foreground":"#1b1f234d","editorOverviewRuler.border":"#fff","editorWarning.foreground":"#f9c513","editorWhitespace.foreground":"#d1d5da","editorWidget.background":"#f6f8fa","errorForeground":"#cb2431","focusBorder":"#2188ff","foreground":"#444d56","gitDecoration.addedResourceForeground":"#28a745","gitDecoration.conflictingResourceForeground":"#e36209","gitDecoration.deletedResourceForeground":"#d73a49","gitDecoration.ignoredResourceForeground":"#959da5","gitDecoration.modifiedResourceForeground":"#005cc5","gitDecoration.submoduleResourceForeground":"#959da5","gitDecoration.untrackedResourceForeground":"#28a745","input.background":"#fafbfc","input.border":"#e1e4e8","input.foreground":"#2f363d","input.placeholderForeground":"#959da5","list.activeSelectionBackground":"#e2e5e9","list.activeSelectionForeground":"#2f363d","list.focusBackground":"#cce5ff","list.hoverBackground":"#ebf0f4","list.hoverForeground":"#2f363d","list.inactiveFocusBackground":"#dbedff","list.inactiveSelectionBackground":"#e8eaed","list.inactiveSelectionForeground":"#2f363d","notificationCenterHeader.background":"#e1e4e8","notificationCenterHeader.foreground":"#6a737d","notifications.background":"#fafbfc","notifications.border":"#e1e4e8","notifications.foreground":"#2f363d","notificationsErrorIcon.foreground":"#d73a49","notificationsInfoIcon.foreground":"#005cc5","notificationsWarningIcon.foreground":"#e36209","panel.background":"#f6f8fa","panel.border":"#e1e4e8","panelInput.border":"#e1e4e8","panelTitle.activeBorder":"#f9826c","panelTitle.activeForeground":"#2f363d","panelTitle.inactiveForeground":"#6a737d","pickerGroup.border":"#e1e4e8","pickerGroup.foreground":"#2f363d","progressBar.background":"#2188ff","quickInput.background":"#fafbfc","quickInput.foreground":"#2f363d","scrollbar.shadow":"#6a737d33","scrollbarSlider.activeBackground":"#959da588","scrollbarSlider.background":"#959da533","scrollbarSlider.hoverBackground":"#959da544","settings.headerForeground":"#2f363d","settings.modifiedItemIndicator":"#2188ff","sideBar.background":"#f6f8fa","sideBar.border":"#e1e4e8","sideBar.foreground":"#586069","sideBarSectionHeader.background":"#f6f8fa","sideBarSectionHeader.border":"#e1e4e8","sideBarSectionHeader.foreground":"#2f363d","sideBarTitle.foreground":"#2f363d","statusBar.background":"#fff","statusBar.border":"#e1e4e8","statusBar.debuggingBackground":"#f9826c","statusBar.debuggingForeground":"#fff","statusBar.foreground":"#586069","statusBar.noFolderBackground":"#fff","statusBarItem.prominentBackground":"#e8eaed","statusBarItem.remoteBackground":"#fff","statusBarItem.remoteForeground":"#586069","tab.activeBackground":"#fff","tab.activeBorder":"#fff","tab.activeBorderTop":"#f9826c","tab.activeForeground":"#2f363d","tab.border":"#e1e4e8","tab.hoverBackground":"#fff","tab.inactiveBackground":"#f6f8fa","tab.inactiveForeground":"#6a737d","tab.unfocusedActiveBorder":"#fff","tab.unfocusedActiveBorderTop":"#e1e4e8","tab.unfocusedHoverBackground":"#fff","terminal.ansiBlack":"#24292e","terminal.ansiBlue":"#0366d6","terminal.ansiBrightBlack":"#959da5","terminal.ansiBrightBlue":"#005cc5","terminal.ansiBrightCyan":"#3192aa","terminal.ansiBrightGreen":"#22863a","terminal.ansiBrightMagenta":"#5a32a3","terminal.ansiBrightRed":"#cb2431","terminal.ansiBrightWhite":"#d1d5da","terminal.ansiBrightYellow":"#b08800","terminal.ansiCyan":"#1b7c83","terminal.ansiGreen":"#28a745","terminal.ansiMagenta":"#5a32a3","terminal.ansiRed":"#d73a49","terminal.ansiWhite":"#6a737d","terminal.ansiYellow":"#dbab09","terminal.foreground":"#586069","terminal.tab.activeBorder":"#f9826c","terminalCursor.background":"#d1d5da","terminalCursor.foreground":"#005cc5","textBlockQuote.background":"#fafbfc","textBlockQuote.border":"#e1e4e8","textCodeBlock.background":"#f6f8fa","textLink.activeForeground":"#005cc5","textLink.foreground":"#0366d6","textPreformat.foreground":"#586069","textSeparator.foreground":"#d1d5da","titleBar.activeBackground":"#fff","titleBar.activeForeground":"#2f363d","titleBar.border":"#e1e4e8","titleBar.inactiveBackground":"#f6f8fa","titleBar.inactiveForeground":"#6a737d","tree.indentGuidesStroke":"#e1e4e8","welcomePage.buttonBackground":"#f6f8fa","welcomePage.buttonHoverBackground":"#e1e4e8"},"displayName":"GitHub Light","name":"github-light","semanticHighlighting":true,"tokenColors":[{"scope":["comment","punctuation.definition.comment","string.comment"],"settings":{"foreground":"#6a737d"}},{"scope":["constant","entity.name.constant","variable.other.constant","variable.other.enummember","variable.language"],"settings":{"foreground":"#005cc5"}},{"scope":["entity","entity.name"],"settings":{"foreground":"#6f42c1"}},{"scope":"variable.parameter.function","settings":{"foreground":"#24292e"}},{"scope":"entity.name.tag","settings":{"foreground":"#22863a"}},{"scope":"keyword","settings":{"foreground":"#d73a49"}},{"scope":["storage","storage.type"],"settings":{"foreground":"#d73a49"}},{"scope":["storage.modifier.package","storage.modifier.import","storage.type.java"],"settings":{"foreground":"#24292e"}},{"scope":["string","punctuation.definition.string","string punctuation.section.embedded source"],"settings":{"foreground":"#032f62"}},{"scope":"support","settings":{"foreground":"#005cc5"}},{"scope":"meta.property-name","settings":{"foreground":"#005cc5"}},{"scope":"variable","settings":{"foreground":"#e36209"}},{"scope":"variable.other","settings":{"foreground":"#24292e"}},{"scope":"invalid.broken","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"invalid.deprecated","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"invalid.illegal","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"invalid.unimplemented","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"carriage-return","settings":{"background":"#d73a49","content":"^M","fontStyle":"italic underline","foreground":"#fafbfc"}},{"scope":"message.error","settings":{"foreground":"#b31d28"}},{"scope":"string variable","settings":{"foreground":"#005cc5"}},{"scope":["source.regexp","string.regexp"],"settings":{"foreground":"#032f62"}},{"scope":["string.regexp.character-class","string.regexp constant.character.escape","string.regexp source.ruby.embedded","string.regexp string.regexp.arbitrary-repitition"],"settings":{"foreground":"#032f62"}},{"scope":"string.regexp constant.character.escape","settings":{"fontStyle":"bold","foreground":"#22863a"}},{"scope":"support.constant","settings":{"foreground":"#005cc5"}},{"scope":"support.variable","settings":{"foreground":"#005cc5"}},{"scope":"meta.module-reference","settings":{"foreground":"#005cc5"}},{"scope":"punctuation.definition.list.begin.markdown","settings":{"foreground":"#e36209"}},{"scope":["markup.heading","markup.heading entity.name"],"settings":{"fontStyle":"bold","foreground":"#005cc5"}},{"scope":"markup.quote","settings":{"foreground":"#22863a"}},{"scope":"markup.italic","settings":{"fontStyle":"italic","foreground":"#24292e"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#24292e"}},{"scope":["markup.underline"],"settings":{"fontStyle":"underline"}},{"scope":["markup.strikethrough"],"settings":{"fontStyle":"strikethrough"}},{"scope":"markup.inline.raw","settings":{"foreground":"#005cc5"}},{"scope":["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],"settings":{"background":"#ffeef0","foreground":"#b31d28"}},{"scope":["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],"settings":{"background":"#f0fff4","foreground":"#22863a"}},{"scope":["markup.changed","punctuation.definition.changed"],"settings":{"background":"#ffebda","foreground":"#e36209"}},{"scope":["markup.ignored","markup.untracked"],"settings":{"background":"#005cc5","foreground":"#f6f8fa"}},{"scope":"meta.diff.range","settings":{"fontStyle":"bold","foreground":"#6f42c1"}},{"scope":"meta.diff.header","settings":{"foreground":"#005cc5"}},{"scope":"meta.separator","settings":{"fontStyle":"bold","foreground":"#005cc5"}},{"scope":"meta.output","settings":{"foreground":"#005cc5"}},{"scope":["brackethighlighter.tag","brackethighlighter.curly","brackethighlighter.round","brackethighlighter.square","brackethighlighter.angle","brackethighlighter.quote"],"settings":{"foreground":"#586069"}},{"scope":"brackethighlighter.unmatched","settings":{"foreground":"#b31d28"}},{"scope":["constant.other.reference.link","string.other.link"],"settings":{"fontStyle":"underline","foreground":"#032f62"}}],"type":"light"}'))});var Rl={};jr(Rl,{default:()=>hh});var hh,Ol=ko(()=>{hh=Object.freeze(JSON.parse('{"colors":{"activityBar.activeBorder":"#f9826c","activityBar.background":"#24292e","activityBar.border":"#1b1f23","activityBar.foreground":"#e1e4e8","activityBar.inactiveForeground":"#6a737d","activityBarBadge.background":"#0366d6","activityBarBadge.foreground":"#fff","badge.background":"#044289","badge.foreground":"#c8e1ff","breadcrumb.activeSelectionForeground":"#d1d5da","breadcrumb.focusForeground":"#e1e4e8","breadcrumb.foreground":"#959da5","breadcrumbPicker.background":"#2b3036","button.background":"#176f2c","button.foreground":"#dcffe4","button.hoverBackground":"#22863a","button.secondaryBackground":"#444d56","button.secondaryForeground":"#fff","button.secondaryHoverBackground":"#586069","checkbox.background":"#444d56","checkbox.border":"#1b1f23","debugToolBar.background":"#2b3036","descriptionForeground":"#959da5","diffEditor.insertedTextBackground":"#28a74530","diffEditor.removedTextBackground":"#d73a4930","dropdown.background":"#2f363d","dropdown.border":"#1b1f23","dropdown.foreground":"#e1e4e8","dropdown.listBackground":"#24292e","editor.background":"#24292e","editor.findMatchBackground":"#ffd33d44","editor.findMatchHighlightBackground":"#ffd33d22","editor.focusedStackFrameHighlightBackground":"#2b6a3033","editor.foldBackground":"#58606915","editor.foreground":"#e1e4e8","editor.inactiveSelectionBackground":"#3392FF22","editor.lineHighlightBackground":"#2b3036","editor.linkedEditingBackground":"#3392FF22","editor.selectionBackground":"#3392FF44","editor.selectionHighlightBackground":"#17E5E633","editor.selectionHighlightBorder":"#17E5E600","editor.stackFrameHighlightBackground":"#C6902625","editor.wordHighlightBackground":"#17E5E600","editor.wordHighlightBorder":"#17E5E699","editor.wordHighlightStrongBackground":"#17E5E600","editor.wordHighlightStrongBorder":"#17E5E666","editorBracketHighlight.foreground1":"#79b8ff","editorBracketHighlight.foreground2":"#ffab70","editorBracketHighlight.foreground3":"#b392f0","editorBracketHighlight.foreground4":"#79b8ff","editorBracketHighlight.foreground5":"#ffab70","editorBracketHighlight.foreground6":"#b392f0","editorBracketMatch.background":"#17E5E650","editorBracketMatch.border":"#17E5E600","editorCursor.foreground":"#c8e1ff","editorError.foreground":"#f97583","editorGroup.border":"#1b1f23","editorGroupHeader.tabsBackground":"#1f2428","editorGroupHeader.tabsBorder":"#1b1f23","editorGutter.addedBackground":"#28a745","editorGutter.deletedBackground":"#ea4a5a","editorGutter.modifiedBackground":"#2188ff","editorIndentGuide.activeBackground":"#444d56","editorIndentGuide.background":"#2f363d","editorLineNumber.activeForeground":"#e1e4e8","editorLineNumber.foreground":"#444d56","editorOverviewRuler.border":"#1b1f23","editorWarning.foreground":"#ffea7f","editorWhitespace.foreground":"#444d56","editorWidget.background":"#1f2428","errorForeground":"#f97583","focusBorder":"#005cc5","foreground":"#d1d5da","gitDecoration.addedResourceForeground":"#34d058","gitDecoration.conflictingResourceForeground":"#ffab70","gitDecoration.deletedResourceForeground":"#ea4a5a","gitDecoration.ignoredResourceForeground":"#6a737d","gitDecoration.modifiedResourceForeground":"#79b8ff","gitDecoration.submoduleResourceForeground":"#6a737d","gitDecoration.untrackedResourceForeground":"#34d058","input.background":"#2f363d","input.border":"#1b1f23","input.foreground":"#e1e4e8","input.placeholderForeground":"#959da5","list.activeSelectionBackground":"#39414a","list.activeSelectionForeground":"#e1e4e8","list.focusBackground":"#044289","list.hoverBackground":"#282e34","list.hoverForeground":"#e1e4e8","list.inactiveFocusBackground":"#1d2d3e","list.inactiveSelectionBackground":"#282e34","list.inactiveSelectionForeground":"#e1e4e8","notificationCenterHeader.background":"#24292e","notificationCenterHeader.foreground":"#959da5","notifications.background":"#2f363d","notifications.border":"#1b1f23","notifications.foreground":"#e1e4e8","notificationsErrorIcon.foreground":"#ea4a5a","notificationsInfoIcon.foreground":"#79b8ff","notificationsWarningIcon.foreground":"#ffab70","panel.background":"#1f2428","panel.border":"#1b1f23","panelInput.border":"#2f363d","panelTitle.activeBorder":"#f9826c","panelTitle.activeForeground":"#e1e4e8","panelTitle.inactiveForeground":"#959da5","peekViewEditor.background":"#1f242888","peekViewEditor.matchHighlightBackground":"#ffd33d33","peekViewResult.background":"#1f2428","peekViewResult.matchHighlightBackground":"#ffd33d33","pickerGroup.border":"#444d56","pickerGroup.foreground":"#e1e4e8","progressBar.background":"#0366d6","quickInput.background":"#24292e","quickInput.foreground":"#e1e4e8","scrollbar.shadow":"#0008","scrollbarSlider.activeBackground":"#6a737d88","scrollbarSlider.background":"#6a737d33","scrollbarSlider.hoverBackground":"#6a737d44","settings.headerForeground":"#e1e4e8","settings.modifiedItemIndicator":"#0366d6","sideBar.background":"#1f2428","sideBar.border":"#1b1f23","sideBar.foreground":"#d1d5da","sideBarSectionHeader.background":"#1f2428","sideBarSectionHeader.border":"#1b1f23","sideBarSectionHeader.foreground":"#e1e4e8","sideBarTitle.foreground":"#e1e4e8","statusBar.background":"#24292e","statusBar.border":"#1b1f23","statusBar.debuggingBackground":"#931c06","statusBar.debuggingForeground":"#fff","statusBar.foreground":"#d1d5da","statusBar.noFolderBackground":"#24292e","statusBarItem.prominentBackground":"#282e34","statusBarItem.remoteBackground":"#24292e","statusBarItem.remoteForeground":"#d1d5da","tab.activeBackground":"#24292e","tab.activeBorder":"#24292e","tab.activeBorderTop":"#f9826c","tab.activeForeground":"#e1e4e8","tab.border":"#1b1f23","tab.hoverBackground":"#24292e","tab.inactiveBackground":"#1f2428","tab.inactiveForeground":"#959da5","tab.unfocusedActiveBorder":"#24292e","tab.unfocusedActiveBorderTop":"#1b1f23","tab.unfocusedHoverBackground":"#24292e","terminal.ansiBlack":"#586069","terminal.ansiBlue":"#2188ff","terminal.ansiBrightBlack":"#959da5","terminal.ansiBrightBlue":"#79b8ff","terminal.ansiBrightCyan":"#56d4dd","terminal.ansiBrightGreen":"#85e89d","terminal.ansiBrightMagenta":"#b392f0","terminal.ansiBrightRed":"#f97583","terminal.ansiBrightWhite":"#fafbfc","terminal.ansiBrightYellow":"#ffea7f","terminal.ansiCyan":"#39c5cf","terminal.ansiGreen":"#34d058","terminal.ansiMagenta":"#b392f0","terminal.ansiRed":"#ea4a5a","terminal.ansiWhite":"#d1d5da","terminal.ansiYellow":"#ffea7f","terminal.foreground":"#d1d5da","terminal.tab.activeBorder":"#f9826c","terminalCursor.background":"#586069","terminalCursor.foreground":"#79b8ff","textBlockQuote.background":"#24292e","textBlockQuote.border":"#444d56","textCodeBlock.background":"#2f363d","textLink.activeForeground":"#c8e1ff","textLink.foreground":"#79b8ff","textPreformat.foreground":"#d1d5da","textSeparator.foreground":"#586069","titleBar.activeBackground":"#24292e","titleBar.activeForeground":"#e1e4e8","titleBar.border":"#1b1f23","titleBar.inactiveBackground":"#1f2428","titleBar.inactiveForeground":"#959da5","tree.indentGuidesStroke":"#2f363d","welcomePage.buttonBackground":"#2f363d","welcomePage.buttonHoverBackground":"#444d56"},"displayName":"GitHub Dark","name":"github-dark","semanticHighlighting":true,"tokenColors":[{"scope":["comment","punctuation.definition.comment","string.comment"],"settings":{"foreground":"#6a737d"}},{"scope":["constant","entity.name.constant","variable.other.constant","variable.other.enummember","variable.language"],"settings":{"foreground":"#79b8ff"}},{"scope":["entity","entity.name"],"settings":{"foreground":"#b392f0"}},{"scope":"variable.parameter.function","settings":{"foreground":"#e1e4e8"}},{"scope":"entity.name.tag","settings":{"foreground":"#85e89d"}},{"scope":"keyword","settings":{"foreground":"#f97583"}},{"scope":["storage","storage.type"],"settings":{"foreground":"#f97583"}},{"scope":["storage.modifier.package","storage.modifier.import","storage.type.java"],"settings":{"foreground":"#e1e4e8"}},{"scope":["string","punctuation.definition.string","string punctuation.section.embedded source"],"settings":{"foreground":"#9ecbff"}},{"scope":"support","settings":{"foreground":"#79b8ff"}},{"scope":"meta.property-name","settings":{"foreground":"#79b8ff"}},{"scope":"variable","settings":{"foreground":"#ffab70"}},{"scope":"variable.other","settings":{"foreground":"#e1e4e8"}},{"scope":"invalid.broken","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"invalid.deprecated","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"invalid.illegal","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"invalid.unimplemented","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"carriage-return","settings":{"background":"#f97583","content":"^M","fontStyle":"italic underline","foreground":"#24292e"}},{"scope":"message.error","settings":{"foreground":"#fdaeb7"}},{"scope":"string variable","settings":{"foreground":"#79b8ff"}},{"scope":["source.regexp","string.regexp"],"settings":{"foreground":"#dbedff"}},{"scope":["string.regexp.character-class","string.regexp constant.character.escape","string.regexp source.ruby.embedded","string.regexp string.regexp.arbitrary-repitition"],"settings":{"foreground":"#dbedff"}},{"scope":"string.regexp constant.character.escape","settings":{"fontStyle":"bold","foreground":"#85e89d"}},{"scope":"support.constant","settings":{"foreground":"#79b8ff"}},{"scope":"support.variable","settings":{"foreground":"#79b8ff"}},{"scope":"meta.module-reference","settings":{"foreground":"#79b8ff"}},{"scope":"punctuation.definition.list.begin.markdown","settings":{"foreground":"#ffab70"}},{"scope":["markup.heading","markup.heading entity.name"],"settings":{"fontStyle":"bold","foreground":"#79b8ff"}},{"scope":"markup.quote","settings":{"foreground":"#85e89d"}},{"scope":"markup.italic","settings":{"fontStyle":"italic","foreground":"#e1e4e8"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#e1e4e8"}},{"scope":["markup.underline"],"settings":{"fontStyle":"underline"}},{"scope":["markup.strikethrough"],"settings":{"fontStyle":"strikethrough"}},{"scope":"markup.inline.raw","settings":{"foreground":"#79b8ff"}},{"scope":["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],"settings":{"background":"#86181d","foreground":"#fdaeb7"}},{"scope":["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],"settings":{"background":"#144620","foreground":"#85e89d"}},{"scope":["markup.changed","punctuation.definition.changed"],"settings":{"background":"#c24e00","foreground":"#ffab70"}},{"scope":["markup.ignored","markup.untracked"],"settings":{"background":"#79b8ff","foreground":"#2f363d"}},{"scope":"meta.diff.range","settings":{"fontStyle":"bold","foreground":"#b392f0"}},{"scope":"meta.diff.header","settings":{"foreground":"#79b8ff"}},{"scope":"meta.separator","settings":{"fontStyle":"bold","foreground":"#79b8ff"}},{"scope":"meta.output","settings":{"foreground":"#79b8ff"}},{"scope":["brackethighlighter.tag","brackethighlighter.curly","brackethighlighter.round","brackethighlighter.square","brackethighlighter.angle","brackethighlighter.quote"],"settings":{"foreground":"#d1d5da"}},{"scope":"brackethighlighter.unmatched","settings":{"foreground":"#fdaeb7"}},{"scope":["constant.other.reference.link","string.other.link"],"settings":{"fontStyle":"underline","foreground":"#dbedff"}}],"type":"dark"}'))});var Sn=Symbol.for("yaml.alias"),Cn=Symbol.for("yaml.document"),ce=Symbol.for("yaml.map"),Ur=Symbol.for("yaml.pair"),ee=Symbol.for("yaml.scalar"),Ne=Symbol.for("yaml.seq"),Y=Symbol.for("yaml.node.type"),ue=t=>!!t&&typeof t=="object"&&t[Y]===Sn,be=t=>!!t&&typeof t=="object"&&t[Y]===Cn,fe=t=>!!t&&typeof t=="object"&&t[Y]===ce,L=t=>!!t&&typeof t=="object"&&t[Y]===Ur,I=t=>!!t&&typeof t=="object"&&t[Y]===ee,te=t=>!!t&&typeof t=="object"&&t[Y]===Ne;function B(t){if(t&&typeof t=="object")switch(t[Y]){case ce:case Ne:return!0}return!1}function T(t){if(t&&typeof t=="object")switch(t[Y]){case Sn:case ce:case ee:case Ne:return!0}return!1}var _n=t=>(I(t)||B(t))&&!!t.anchor;var Q=Symbol("break visit"),So=Symbol("skip children"),we=Symbol("remove node");function se(t,e){let n=Co(e);be(t)?ft(null,t.contents,n,Object.freeze([t]))===we&&(t.contents=null):ft(null,t,n,Object.freeze([]))}se.BREAK=Q;se.SKIP=So;se.REMOVE=we;function ft(t,e,n,r){let s=_o(t,e,n,r);if(T(s)||L(s))return vo(t,r,s),ft(t,s,n,r);if(typeof s!="symbol"){if(B(e)){r=Object.freeze(r.concat(e));for(let o=0;o<e.items.length;++o){let i=ft(o,e.items[o],n,r);if(typeof i=="number")o=i-1;else{if(i===Q)return Q;i===we&&(e.items.splice(o,1),o-=1)}}}else if(L(e)){r=Object.freeze(r.concat(e));let o=ft("key",e.key,n,r);if(o===Q)return Q;o===we&&(e.key=null);let i=ft("value",e.value,n,r);if(i===Q)return Q;i===we&&(e.value=null)}}return s}async function vn(t,e){let n=Co(e);be(t)?await dt(null,t.contents,n,Object.freeze([t]))===we&&(t.contents=null):await dt(null,t,n,Object.freeze([]))}vn.BREAK=Q;vn.SKIP=So;vn.REMOVE=we;async function dt(t,e,n,r){let s=await _o(t,e,n,r);if(T(s)||L(s))return vo(t,r,s),dt(t,s,n,r);if(typeof s!="symbol"){if(B(e)){r=Object.freeze(r.concat(e));for(let o=0;o<e.items.length;++o){let i=await dt(o,e.items[o],n,r);if(typeof i=="number")o=i-1;else{if(i===Q)return Q;i===we&&(e.items.splice(o,1),o-=1)}}}else if(L(e)){r=Object.freeze(r.concat(e));let o=await dt("key",e.key,n,r);if(o===Q)return Q;o===we&&(e.key=null);let i=await dt("value",e.value,n,r);if(i===Q)return Q;i===we&&(e.value=null)}}return s}function Co(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function _o(t,e,n,r){if(typeof n=="function")return n(t,e,r);if(fe(e))return n.Map?.(t,e,r);if(te(e))return n.Seq?.(t,e,r);if(L(e))return n.Pair?.(t,e,r);if(I(e))return n.Scalar?.(t,e,r);if(ue(e))return n.Alias?.(t,e,r)}function vo(t,e,n){let r=e[e.length-1];if(B(r))r.items[t]=n;else if(L(r))t==="key"?r.key=n:r.value=n;else if(be(r))r.contents=n;else{let s=ue(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}var Gl={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},jl=t=>t.replace(/[!,[\]{}]/g,e=>Gl[e]),ke=class t{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,n)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=!1);let r=e.trim().split(/[ \t]+/),s=r.shift();switch(s){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;let[o,i]=r;return this.tags[o]=i,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;let[o]=r;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{let i=/^\d+\.\d+$/.test(o);return n(6,`Unsupported YAML version ${o}`,i),!1}}default:return n(0,`Unknown directive ${s}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let i=e.slice(2,-1);return i==="!"||i==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),i)}let[,r,s]=e.match(/^(.*!)([^!]*)$/s);s||n(`The ${e} tag has no suffix`);let o=this.tags[r];if(o)try{return o+decodeURIComponent(s)}catch(i){return n(String(i)),null}return r==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[n,r]of Object.entries(this.tags))if(e.startsWith(r))return n+jl(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),s;if(e&&r.length>0&&T(e.contents)){let o={};se(e.contents,(i,a)=>{T(a)&&a.tag&&(o[a.tag]=!0)}),s=Object.keys(o)}else s=[];for(let[o,i]of r)o==="!!"&&i==="tag:yaml.org,2002:"||(!e||s.some(a=>a.startsWith(i)))&&n.push(`%TAG ${o} ${i}`);return n.join(`
2
+ `)}};ke.defaultYaml={explicit:!1,version:"1.2"};ke.defaultTags={"!!":"tag:yaml.org,2002:"};function En(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function qr(t){let e=new Set;return se(t,{Value(n,r){r.anchor&&e.add(r.anchor)}}),e}function Hr(t,e){for(let n=1;;++n){let r=`${t}${n}`;if(!e.has(r))return r}}function Eo(t,e){let n=[],r=new Map,s=null;return{onAnchor:o=>{n.push(o),s??(s=qr(t));let i=Hr(e,s);return s.add(i),i},setAnchors:()=>{for(let o of n){let i=r.get(o);if(typeof i=="object"&&i.anchor&&(I(i.node)||B(i.node)))i.node.anchor=i.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=o,a}}},sourceObjects:r}}function Ge(t,e,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let s=0,o=r.length;s<o;++s){let i=r[s],a=Ge(t,r,String(s),i);a===void 0?delete r[s]:a!==i&&(r[s]=a)}else if(r instanceof Map)for(let s of Array.from(r.keys())){let o=r.get(s),i=Ge(t,r,s,o);i===void 0?r.delete(s):i!==o&&r.set(s,i)}else if(r instanceof Set)for(let s of Array.from(r)){let o=Ge(t,r,s,s);o===void 0?r.delete(s):o!==s&&(r.delete(s),r.add(o))}else for(let[s,o]of Object.entries(r)){let i=Ge(t,r,s,o);i===void 0?delete r[s]:i!==o&&(r[s]=i)}return t.call(e,n,r)}function q(t,e,n){if(Array.isArray(t))return t.map((r,s)=>q(r,String(s),n));if(t&&typeof t.toJSON=="function"){if(!n||!_n(t))return t.toJSON(e,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(t,r),n.onCreate=o=>{r.res=o,delete n.onCreate};let s=t.toJSON(e,n);return n.onCreate&&n.onCreate(s),s}return typeof t=="bigint"&&!n?.keep?Number(t):t}var je=class{constructor(e){Object.defineProperty(this,Y,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:n,maxAliasCount:r,onAnchor:s,reviver:o}={}){if(!be(e))throw new TypeError("A document argument is required");let i={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=q(this,"",i);if(typeof s=="function")for(let{count:l,res:c}of i.anchors.values())s(c,l);return typeof o=="function"?Ge(o,{"":a},"",a):a}};var xe=class extends je{constructor(e){super(Sn),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,n){if(n?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let r;n?.aliasResolveCache?r=n.aliasResolveCache:(r=[],se(e,{Node:(o,i)=>{(ue(i)||_n(i))&&r.push(i)}}),n&&(n.aliasResolveCache=r));let s;for(let o of r){if(o===this)break;o.anchor===this.source&&(s=o)}if(s&&n){let{anchors:o,doc:i,maxAliasCount:a}=n,l=o.get(s);if(l||(q(s,null,n),l=o.get(s)),l?.res===void 0){let c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(a>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=An(i,s,o)),l.count*l.aliasCount>a)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}}return s}toJSON(e,n){if(!n)return{source:this.source};let r=this.resolve(n.doc,n);if(!r){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(s)}return n.anchors.get(r).res}toString(e,n,r){let s=`*${this.source}`;if(e){if(En(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(e.implicitKey)return`${s} `}return s}};function An(t,e,n){if(ue(e)){let r=e.resolve(t),s=n&&r&&n.get(r);return s?s.count*s.aliasCount:0}else if(B(e)){let r=0;for(let s of e.items){let o=An(t,s,n);o>r&&(r=o)}return r}else if(L(e)){let r=An(t,e.key,n),s=An(t,e.value,n);return Math.max(r,s)}return 1}var Nn=t=>!t||typeof t!="function"&&typeof t!="object",v=class extends je{constructor(e){super(ee),this.value=e}toJSON(e,n){return n?.keep?this.value:q(this.value,e,n)}toString(){return String(this.value)}};v.BLOCK_FOLDED="BLOCK_FOLDED";v.BLOCK_LITERAL="BLOCK_LITERAL";v.PLAIN="PLAIN";v.QUOTE_DOUBLE="QUOTE_DOUBLE";v.QUOTE_SINGLE="QUOTE_SINGLE";var Ul="tag:yaml.org,2002:";function ql(t,e,n){if(e){let r=n.filter(o=>o.tag===e),s=r.find(o=>!o.format)??r[0];if(!s)throw new Error(`Tag ${e} not found`);return s}return n.find(r=>r.identify?.(t)&&!r.format)}function Ie(t,e,n){if(be(t)&&(t=t.contents),T(t))return t;if(L(t)){let f=n.schema[ce].createNode?.(n.schema,null,n);return f.items.push(t),f}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:r,onAnchor:s,onTagObj:o,schema:i,sourceObjects:a}=n,l;if(r&&t&&typeof t=="object"){if(l=a.get(t),l)return l.anchor??(l.anchor=s(t)),new xe(l.anchor);l={anchor:null,node:null},a.set(t,l)}e?.startsWith("!!")&&(e=Ul+e.slice(2));let c=ql(t,e,i.tags);if(!c){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let f=new v(t);return l&&(l.node=f),f}c=t instanceof Map?i[ce]:Symbol.iterator in Object(t)?i[Ne]:i[ce]}o&&(o(c),delete n.onTagObj);let u=c?.createNode?c.createNode(n.schema,t,n):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(n.schema,t,n):new v(t);return e?u.tag=e:c.default||(u.tag=c.tag),l&&(l.node=u),u}function Rt(t,e,n){let r=n;for(let s=e.length-1;s>=0;--s){let o=e[s];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){let i=[];i[o]=r,r=i}else r=new Map([[o,r]])}return Ie(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}var pt=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,ht=class extends je{constructor(e,n){super(e),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(e){let n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(r=>T(r)||L(r)?r.clone(e):r),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(pt(e))this.add(n);else{let[r,...s]=e,o=this.get(r,!0);if(B(o))o.addIn(s,n);else if(o===void 0&&this.schema)this.set(r,Rt(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}deleteIn(e){let[n,...r]=e;if(r.length===0)return this.delete(n);let s=this.get(n,!0);if(B(s))return s.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){let[r,...s]=e,o=this.get(r,!0);return s.length===0?!n&&I(o)?o.value:o:B(o)?o.getIn(s,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!L(n))return!1;let r=n.value;return r==null||e&&I(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){let[n,...r]=e;if(r.length===0)return this.has(n);let s=this.get(n,!0);return B(s)?s.hasIn(r):!1}setIn(e,n){let[r,...s]=e;if(s.length===0)this.set(r,n);else{let o=this.get(r,!0);if(B(o))o.setIn(s,n);else if(o===void 0&&this.schema)this.set(r,Rt(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}};var Ao=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function oe(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}var Se=(t,e,n)=>t.endsWith(`
3
+ `)?oe(n,e):n.includes(`
4
4
  `)?`
5
- `+ie(n,e):(t.endsWith(" ")?"":" ")+n;var Dr="flow",vn="block",Lt="quoted";function Bt(t,e,n="flow",{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}={}){if(!s||s<0)return t;s<i&&(i=0);let l=Math.max(1+i,1+s-e.length);if(t.length<=l)return t;let c=[],u={},f=s-e.length;typeof r=="number"&&(r>s-Math.max(2,i)?c.push(0):f=s-r);let d,h,p=!1,g=-1,m=-1,y=-1;n===vn&&(g=wi(t,g,e.length),g!==-1&&(f=g+l));for(let w;w=t[g+=1];){if(n===Lt&&w==="\\"){switch(m=g,t[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}y=g}if(w===`
6
- `)n===vn&&(g=wi(t,g,e.length)),f=g+e.length+l,d=void 0;else{if(w===" "&&h&&h!==" "&&h!==`
5
+ `+oe(n,e):(t.endsWith(" ")?"":" ")+n;var Wr="flow",xn="block",Ot="quoted";function Pt(t,e,n="flow",{indentAtStart:r,lineWidth:s=80,minContentWidth:o=20,onFold:i,onOverflow:a}={}){if(!s||s<0)return t;s<o&&(o=0);let l=Math.max(1+o,1+s-e.length);if(t.length<=l)return t;let c=[],u={},f=s-e.length;typeof r=="number"&&(r>s-Math.max(2,o)?c.push(0):f=s-r);let d,h,p=!1,g=-1,m=-1,y=-1;n===xn&&(g=No(t,g,e.length),g!==-1&&(f=g+l));for(let w;w=t[g+=1];){if(n===Ot&&w==="\\"){switch(m=g,t[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}y=g}if(w===`
6
+ `)n===xn&&(g=No(t,g,e.length)),f=g+e.length+l,d=void 0;else{if(w===" "&&h&&h!==" "&&h!==`
7
7
  `&&h!==" "){let S=t[g+1];S&&S!==" "&&S!==`
8
- `&&S!==" "&&(d=g)}if(g>=f)if(d)c.push(d),f=d+l,d=void 0;else if(n===Lt){for(;h===" "||h===" ";)h=w,w=t[g+=1],p=!0;let S=g>y+1?g-2:m-1;if(u[S])return t;c.push(S),u[S]=!0,f=S+l,d=void 0}else p=!0}h=w}if(p&&a&&a(),c.length===0)return t;o&&o();let b=t.slice(0,c[0]);for(let w=0;w<c.length;++w){let S=c[w],C=c[w+1]||t.length;S===0?b=`
9
- ${e}${t.slice(0,C)}`:(n===Lt&&u[S]&&(b+=`${t[S]}\\`),b+=`
10
- ${e}${t.slice(S+1,C)}`)}return b}function wi(t,e,n){let r=e,s=e+1,i=t[s];for(;i===" "||i===" ";)if(e<s+n)i=t[++e];else{do i=t[++e];while(i&&i!==`
11
- `);r=e,s=e+1,i=t[s]}return r}var An=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Nn=t=>/^(%|---|\.\.\.)/m.test(t);function Pl(t,e,n){if(!e||e<0)return!1;let r=e-n,s=t.length;if(s<=r)return!1;for(let i=0,o=0;i<s;++i)if(t[i]===`
12
- `){if(i-o>r)return!0;if(o=i+1,s-o<=r)return!1}return!0}function Ot(t,e){let n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=e,s=e.options.doubleQuotedMinMultiLineLength,i=e.indent||(Nn(t)?" ":""),o="",a=0;for(let l=0,c=n[l];c;c=n[++l])if(c===" "&&n[l+1]==="\\"&&n[l+2]==="n"&&(o+=n.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(n[l+1]){case"u":{o+=n.slice(a,l);let u=n.substr(l+2,4);switch(u){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:u.substr(0,2)==="00"?o+="\\x"+u.substr(2):o+=n.substr(l,6)}l+=5,a=l+1}break;case"n":if(r||n[l+2]==='"'||n.length<s)l+=1;else{for(o+=n.slice(a,l)+`
8
+ `&&S!==" "&&(d=g)}if(g>=f)if(d)c.push(d),f=d+l,d=void 0;else if(n===Ot){for(;h===" "||h===" ";)h=w,w=t[g+=1],p=!0;let S=g>y+1?g-2:m-1;if(u[S])return t;c.push(S),u[S]=!0,f=S+l,d=void 0}else p=!0}h=w}if(p&&a&&a(),c.length===0)return t;i&&i();let b=t.slice(0,c[0]);for(let w=0;w<c.length;++w){let S=c[w],C=c[w+1]||t.length;S===0?b=`
9
+ ${e}${t.slice(0,C)}`:(n===Ot&&u[S]&&(b+=`${t[S]}\\`),b+=`
10
+ ${e}${t.slice(S+1,C)}`)}return b}function No(t,e,n){let r=e,s=e+1,o=t[s];for(;o===" "||o===" ";)if(e<s+n)o=t[++e];else{do o=t[++e];while(o&&o!==`
11
+ `);r=e,s=e+1,o=t[s]}return r}var Tn=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Ln=t=>/^(%|---|\.\.\.)/m.test(t);function Hl(t,e,n){if(!e||e<0)return!1;let r=e-n,s=t.length;if(s<=r)return!1;for(let o=0,i=0;o<s;++o)if(t[o]===`
12
+ `){if(o-i>r)return!0;if(i=o+1,s-i<=r)return!1}return!0}function $t(t,e){let n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=e,s=e.options.doubleQuotedMinMultiLineLength,o=e.indent||(Ln(t)?" ":""),i="",a=0;for(let l=0,c=n[l];c;c=n[++l])if(c===" "&&n[l+1]==="\\"&&n[l+2]==="n"&&(i+=n.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(n[l+1]){case"u":{i+=n.slice(a,l);let u=n.substr(l+2,4);switch(u){case"0000":i+="\\0";break;case"0007":i+="\\a";break;case"000b":i+="\\v";break;case"001b":i+="\\e";break;case"0085":i+="\\N";break;case"00a0":i+="\\_";break;case"2028":i+="\\L";break;case"2029":i+="\\P";break;default:u.substr(0,2)==="00"?i+="\\x"+u.substr(2):i+=n.substr(l,6)}l+=5,a=l+1}break;case"n":if(r||n[l+2]==='"'||n.length<s)l+=1;else{for(i+=n.slice(a,l)+`
13
13
 
14
- `;n[l+2]==="\\"&&n[l+3]==="n"&&n[l+4]!=='"';)o+=`
15
- `,l+=2;o+=i,n[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+n.slice(a):n,r?o:Bt(o,i,Lt,An(e,!1))}function Gr(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
16
- `)||/[ \t]\n|\n[ \t]/.test(t))return Ot(t,e);let n=e.indent||(Nn(t)?" ":""),r="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
17
- ${n}`)+"'";return e.implicitKey?r:Bt(r,n,Dr,An(e,!1))}function gt(t,e){let{singleQuote:n}=e.options,r;if(n===!1)r=Ot;else{let s=t.includes('"'),i=t.includes("'");s&&!i?r=Gr:i&&!s?r=Ot:r=n?Gr:Ot}return r(t,e)}var jr;try{jr=new RegExp(`(^|(?<!
14
+ `;n[l+2]==="\\"&&n[l+3]==="n"&&n[l+4]!=='"';)i+=`
15
+ `,l+=2;i+=o,n[l+2]===" "&&(i+="\\"),l+=1,a=l+1}break;default:l+=1}return i=a?i+n.slice(a):n,r?i:Pt(i,o,Ot,Tn(e,!1))}function Kr(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
16
+ `)||/[ \t]\n|\n[ \t]/.test(t))return $t(t,e);let n=e.indent||(Ln(t)?" ":""),r="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
17
+ ${n}`)+"'";return e.implicitKey?r:Pt(r,n,Wr,Tn(e,!1))}function gt(t,e){let{singleQuote:n}=e.options,r;if(n===!1)r=$t;else{let s=t.includes('"'),o=t.includes("'");s&&!o?r=Kr:o&&!s?r=$t:r=n?Kr:$t}return r(t,e)}var Vr;try{Vr=new RegExp(`(^|(?<!
18
18
  ))
19
19
  +(?!
20
- |$)`,"g")}catch{jr=/\n+(?!\n|$)/g}function En({comment:t,type:e,value:n},r,s,i){let{blockQuote:o,commentString:a,lineWidth:l}=r.options;if(!o||/\n[\t ]+$/.test(n))return gt(n,r);let c=r.indent||(r.forceBlockIndent||Nn(n)?" ":""),u=o==="literal"?!0:o==="folded"||e===v.BLOCK_FOLDED?!1:e===v.BLOCK_LITERAL?!0:!Pl(n,l,c.length);if(!n)return u?`|
20
+ |$)`,"g")}catch{Vr=/\n+(?!\n|$)/g}function In({comment:t,type:e,value:n},r,s,o){let{blockQuote:i,commentString:a,lineWidth:l}=r.options;if(!i||/\n[\t ]+$/.test(n))return gt(n,r);let c=r.indent||(r.forceBlockIndent||Ln(n)?" ":""),u=i==="literal"?!0:i==="folded"||e===v.BLOCK_FOLDED?!1:e===v.BLOCK_LITERAL?!0:!Hl(n,l,c.length);if(!n)return u?`|
21
21
  `:`>
22
22
  `;let f,d;for(d=n.length;d>0;--d){let C=n[d-1];if(C!==`
23
23
  `&&C!==" "&&C!==" ")break}let h=n.substring(d),p=h.indexOf(`
24
- `);p===-1?f="-":n===h||p!==h.length-1?(f="+",i&&i()):f="",h&&(n=n.slice(0,-h.length),h[h.length-1]===`
25
- `&&(h=h.slice(0,-1)),h=h.replace(jr,`$&${c}`));let g=!1,m,y=-1;for(m=0;m<n.length;++m){let C=n[m];if(C===" ")g=!0;else if(C===`
24
+ `);p===-1?f="-":n===h||p!==h.length-1?(f="+",o&&o()):f="",h&&(n=n.slice(0,-h.length),h[h.length-1]===`
25
+ `&&(h=h.slice(0,-1)),h=h.replace(Vr,`$&${c}`));let g=!1,m,y=-1;for(m=0;m<n.length;++m){let C=n[m];if(C===" ")g=!0;else if(C===`
26
26
  `)y=m;else break}let b=n.substring(0,y<m?y+1:m);b&&(n=n.substring(b.length),b=b.replace(/\n+/g,`$&${c}`));let S=(g?c?"2":"1":"")+f;if(t&&(S+=" "+a(t.replace(/ ?[\r\n]+/g," ")),s&&s()),!u){let C=n.replace(/\n+/g,`
27
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),E=!1,x=An(r,!0);o!=="folded"&&e!==v.BLOCK_FOLDED&&(x.onOverflow=()=>{E=!0});let _=Bt(`${b}${C}${h}`,c,vn,x);if(!E)return`>${S}
27
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),E=!1,x=Tn(r,!0);i!=="folded"&&e!==v.BLOCK_FOLDED&&(x.onOverflow=()=>{E=!0});let _=Pt(`${b}${C}${h}`,c,xn,x);if(!E)return`>${S}
28
28
  ${c}${_}`}return n=n.replace(/\n+/g,`$&${c}`),`|${S}
29
- ${c}${b}${n}${h}`}function $l(t,e,n,r){let{type:s,value:i}=t,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:u}=e;if(a&&i.includes(`
30
- `)||u&&/[[\]{},]/.test(i))return gt(i,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return a||u||!i.includes(`
31
- `)?gt(i,e):En(t,e,n,r);if(!a&&!u&&s!==v.PLAIN&&i.includes(`
32
- `))return En(t,e,n,r);if(Nn(i)){if(l==="")return e.forceBlockIndent=!0,En(t,e,n,r);if(a&&l===c)return gt(i,e)}let f=i.replace(/\n+/g,`$&
33
- ${l}`);if(o){let d=g=>g.default&&g.tag!=="tag:yaml.org,2002:str"&&g.test?.test(f),{compat:h,tags:p}=e.doc.schema;if(p.some(d)||h?.some(d))return gt(i,e)}return a?f:Bt(f,l,Dr,An(e,!1))}function Xe(t,e,n,r){let{implicitKey:s,inFlow:i}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:a}=t;a!==v.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=v.QUOTE_DOUBLE);let l=u=>{switch(u){case v.BLOCK_FOLDED:case v.BLOCK_LITERAL:return s||i?gt(o.value,e):En(o,e,n,r);case v.QUOTE_DOUBLE:return Ot(o.value,e);case v.QUOTE_SINGLE:return Gr(o.value,e);case v.PLAIN:return $l(o,e,n,r);default:return null}},c=l(a);if(c===null){let{defaultKeyType:u,defaultStringType:f}=e.options,d=s&&u||f;if(c=l(d),c===null)throw new Error(`Unsupported default string type ${d}`)}return c}function xn(t,e){let n=Object.assign({blockQuote:!0,commentString:bi,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e),r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function Ml(t,e){if(e.tag){let s=t.filter(i=>i.tag===e.tag);if(s.length>0)return s.find(i=>i.format===e.format)??s[0]}let n,r;if(I(e)){r=e.value;let s=t.filter(i=>i.identify?.(r));if(s.length>1){let i=s.filter(o=>o.test);i.length>0&&(s=i)}n=s.find(i=>i.format===e.format)??s.find(i=>!i.format)}else r=e,n=t.find(s=>s.nodeClass&&r instanceof s.nodeClass);if(!n){let s=r?.constructor?.name??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${s} value`)}return n}function Fl(t,e,{anchors:n,doc:r}){if(!r.directives)return"";let s=[],i=(I(t)||B(t))&&t.anchor;i&&Sn(i)&&(n.add(i),s.push(`&${i}`));let o=t.tag??(e.default?null:e.tag);return o&&s.push(r.directives.tagString(o)),s.join(" ")}function Te(t,e,n,r){if(L(t))return t.toString(e,n,r);if(ue(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let s,i=T(t)?t:e.doc.createNode(t,{onTagObj:l=>s=l});s??(s=Ml(e.doc.schema.tags,i));let o=Fl(i,s,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);let a=typeof s.stringify=="function"?s.stringify(i,e,n,r):I(i)?Xe(i,e,n,r):i.toString(e,n,r);return o?I(i)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
34
- ${e.indent}${a}`:a}function ki({key:t,value:e},n,r,s){let{allNullValues:i,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:f}}=n,d=T(t)&&t.comment||null;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(B(t)||!T(t)&&typeof t=="object"){let x="With simple keys, collection cannot be used as a key value";throw new Error(x)}}let h=!f&&(!t||d&&e==null&&!n.inFlow||B(t)||(I(t)?t.type===v.BLOCK_FOLDED||t.type===v.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!h&&(f||!i),indent:a+l});let p=!1,g=!1,m=Te(t,n,()=>p=!0,()=>g=!0);if(!h&&!n.inFlow&&m.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(n.inFlow){if(i||e==null)return p&&r&&r(),m===""?"?":h?`? ${m}`:m}else if(i&&!f||e==null&&h)return m=`? ${m}`,d&&!p?m+=Se(m,n.indent,c(d)):g&&s&&s(),m;p&&(d=null),h?(d&&(m+=Se(m,n.indent,c(d))),m=`? ${m}
35
- ${a}:`):(m=`${m}:`,d&&(m+=Se(m,n.indent,c(d))));let y,b,w;T(e)?(y=!!e.spaceBefore,b=e.commentBefore,w=e.comment):(y=!1,b=null,w=null,e&&typeof e=="object"&&(e=o.createNode(e))),n.implicitKey=!1,!h&&!d&&I(e)&&(n.indentAtStart=m.length+1),g=!1,!u&&l.length>=2&&!n.inFlow&&!h&&te(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let S=!1,C=Te(e,n,()=>S=!0,()=>g=!0),E=" ";if(d||y||b){if(E=y?`
29
+ ${c}${b}${n}${h}`}function Wl(t,e,n,r){let{type:s,value:o}=t,{actualString:i,implicitKey:a,indent:l,indentStep:c,inFlow:u}=e;if(a&&o.includes(`
30
+ `)||u&&/[[\]{},]/.test(o))return gt(o,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return a||u||!o.includes(`
31
+ `)?gt(o,e):In(t,e,n,r);if(!a&&!u&&s!==v.PLAIN&&o.includes(`
32
+ `))return In(t,e,n,r);if(Ln(o)){if(l==="")return e.forceBlockIndent=!0,In(t,e,n,r);if(a&&l===c)return gt(o,e)}let f=o.replace(/\n+/g,`$&
33
+ ${l}`);if(i){let d=g=>g.default&&g.tag!=="tag:yaml.org,2002:str"&&g.test?.test(f),{compat:h,tags:p}=e.doc.schema;if(p.some(d)||h?.some(d))return gt(o,e)}return a?f:Pt(f,l,Wr,Tn(e,!1))}function Xe(t,e,n,r){let{implicitKey:s,inFlow:o}=e,i=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:a}=t;a!==v.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(i.value)&&(a=v.QUOTE_DOUBLE);let l=u=>{switch(u){case v.BLOCK_FOLDED:case v.BLOCK_LITERAL:return s||o?gt(i.value,e):In(i,e,n,r);case v.QUOTE_DOUBLE:return $t(i.value,e);case v.QUOTE_SINGLE:return Kr(i.value,e);case v.PLAIN:return Wl(i,e,n,r);default:return null}},c=l(a);if(c===null){let{defaultKeyType:u,defaultStringType:f}=e.options,d=s&&u||f;if(c=l(d),c===null)throw new Error(`Unsupported default string type ${d}`)}return c}function Bn(t,e){let n=Object.assign({blockQuote:!0,commentString:Ao,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e),r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function Kl(t,e){if(e.tag){let s=t.filter(o=>o.tag===e.tag);if(s.length>0)return s.find(o=>o.format===e.format)??s[0]}let n,r;if(I(e)){r=e.value;let s=t.filter(o=>o.identify?.(r));if(s.length>1){let o=s.filter(i=>i.test);o.length>0&&(s=o)}n=s.find(o=>o.format===e.format)??s.find(o=>!o.format)}else r=e,n=t.find(s=>s.nodeClass&&r instanceof s.nodeClass);if(!n){let s=r?.constructor?.name??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${s} value`)}return n}function Vl(t,e,{anchors:n,doc:r}){if(!r.directives)return"";let s=[],o=(I(t)||B(t))&&t.anchor;o&&En(o)&&(n.add(o),s.push(`&${o}`));let i=t.tag??(e.default?null:e.tag);return i&&s.push(r.directives.tagString(i)),s.join(" ")}function Te(t,e,n,r){if(L(t))return t.toString(e,n,r);if(ue(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let s,o=T(t)?t:e.doc.createNode(t,{onTagObj:l=>s=l});s??(s=Kl(e.doc.schema.tags,o));let i=Vl(o,s,e);i.length>0&&(e.indentAtStart=(e.indentAtStart??0)+i.length+1);let a=typeof s.stringify=="function"?s.stringify(o,e,n,r):I(o)?Xe(o,e,n,r):o.toString(e,n,r);return i?I(o)||a[0]==="{"||a[0]==="["?`${i} ${a}`:`${i}
34
+ ${e.indent}${a}`:a}function xo({key:t,value:e},n,r,s){let{allNullValues:o,doc:i,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:f}}=n,d=T(t)&&t.comment||null;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(B(t)||!T(t)&&typeof t=="object"){let x="With simple keys, collection cannot be used as a key value";throw new Error(x)}}let h=!f&&(!t||d&&e==null&&!n.inFlow||B(t)||(I(t)?t.type===v.BLOCK_FOLDED||t.type===v.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!h&&(f||!o),indent:a+l});let p=!1,g=!1,m=Te(t,n,()=>p=!0,()=>g=!0);if(!h&&!n.inFlow&&m.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(n.inFlow){if(o||e==null)return p&&r&&r(),m===""?"?":h?`? ${m}`:m}else if(o&&!f||e==null&&h)return m=`? ${m}`,d&&!p?m+=Se(m,n.indent,c(d)):g&&s&&s(),m;p&&(d=null),h?(d&&(m+=Se(m,n.indent,c(d))),m=`? ${m}
35
+ ${a}:`):(m=`${m}:`,d&&(m+=Se(m,n.indent,c(d))));let y,b,w;T(e)?(y=!!e.spaceBefore,b=e.commentBefore,w=e.comment):(y=!1,b=null,w=null,e&&typeof e=="object"&&(e=i.createNode(e))),n.implicitKey=!1,!h&&!d&&I(e)&&(n.indentAtStart=m.length+1),g=!1,!u&&l.length>=2&&!n.inFlow&&!h&&te(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let S=!1,C=Te(e,n,()=>S=!0,()=>g=!0),E=" ";if(d||y||b){if(E=y?`
36
36
  `:"",b){let x=c(b);E+=`
37
- ${ie(x,n.indent)}`}C===""&&!n.inFlow?E===`
37
+ ${oe(x,n.indent)}`}C===""&&!n.inFlow?E===`
38
38
  `&&w&&(E=`
39
39
 
40
40
  `):E+=`
41
41
  ${n.indent}`}else if(!h&&B(e)){let x=C[0],_=C.indexOf(`
42
- `),$=_!==-1,re=n.inFlow??e.flow??e.items.length===0;if($||!re){let ye=!1;if($&&(x==="&"||x==="!")){let O=C.indexOf(" ");x==="&"&&O!==-1&&O<_&&C[O+1]==="!"&&(O=C.indexOf(" ",O+1)),(O===-1||_<O)&&(ye=!0)}ye||(E=`
42
+ `),$=_!==-1,re=n.inFlow??e.flow??e.items.length===0;if($||!re){let ye=!1;if($&&(x==="&"||x==="!")){let R=C.indexOf(" ");x==="&"&&R!==-1&&R<_&&C[R+1]==="!"&&(R=C.indexOf(" ",R+1)),(R===-1||_<R)&&(ye=!0)}ye||(E=`
43
43
  ${n.indent}`)}}else(C===""||C[0]===`
44
- `)&&(E="");return m+=E+C,n.inFlow?S&&r&&r():w&&!S?m+=Se(m,n.indent,c(w)):g&&s&&s(),m}function Ur(t,e){(t==="debug"||t==="warn")&&console.warn(e)}var In="<<",de={identify:t=>t===In||typeof t=="symbol"&&t.description===In,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new v(Symbol(In)),{addToJSMap:Hr}),stringify:()=>In},Si=(t,e)=>(de.identify(e)||I(e)&&(!e.type||e.type===v.PLAIN)&&de.identify(e.value))&&t?.doc.schema.tags.some(n=>n.tag===de.tag&&n.default);function Hr(t,e,n){let r=Ci(t,n);if(te(r))for(let s of r.items)qr(t,e,s);else if(Array.isArray(r))for(let s of r)qr(t,e,s);else qr(t,e,r)}function qr(t,e,n){let r=Ci(t,n);if(!fe(r))throw new Error("Merge sources must be maps or map aliases");let s=r.toJSON(null,t,Map);for(let[i,o]of s)e instanceof Map?e.has(i)||e.set(i,o):e instanceof Set?e.add(i):Object.prototype.hasOwnProperty.call(e,i)||Object.defineProperty(e,i,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function Ci(t,e){return t&&ue(e)?e.resolve(t.doc,t):e}function Tn(t,e,{key:n,value:r}){if(T(n)&&n.addToJSMap)n.addToJSMap(t,e,r);else if(Si(t,n))Hr(t,e,r);else{let s=q(n,"",t);if(e instanceof Map)e.set(s,q(r,s,t));else if(e instanceof Set)e.add(s);else{let i=Dl(n,s,t),o=q(r,i,t);i in e?Object.defineProperty(e,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[i]=o}}return e}function Dl(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(T(t)&&n?.doc){let r=xn(n.doc,{});r.anchors=new Set;for(let i of n.anchors.keys())r.anchors.add(i.anchor);r.inFlow=!0,r.inStringifyKey=!0;let s=t.toString(r);if(!n.mapKeyWarned){let i=JSON.stringify(s);i.length>40&&(i=i.substring(0,36)+'..."'),Ur(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return s}return JSON.stringify(e)}function mt(t,e,n){let r=Ie(t,void 0,n),s=Ie(e,void 0,n);return new M(r,s)}var M=class t{constructor(e,n=null){Object.defineProperty(this,Y,{value:$r}),this.key=e,this.value=n}clone(e){let{key:n,value:r}=this;return T(n)&&(n=n.clone(e)),T(r)&&(r=r.clone(e)),new t(n,r)}toJSON(e,n){let r=n?.mapAsMap?new Map:{};return Tn(n,r,this)}toString(e,n,r){return e?.doc?ki(this,e,n,r):JSON.stringify(this)}};function Bn(t,e,n){return(e.inFlow??t.flow?jl:Gl)(t,e,n)}function Gl({comment:t,items:e},n,{blockItemPrefix:r,flowChars:s,itemIndent:i,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=n,u=Object.assign({},n,{indent:i,type:null}),f=!1,d=[];for(let p=0;p<e.length;++p){let g=e[p],m=null;if(T(g))!f&&g.spaceBefore&&d.push(""),Ln(n,d,g.commentBefore,f),g.comment&&(m=g.comment);else if(L(g)){let b=T(g.key)?g.key:null;b&&(!f&&b.spaceBefore&&d.push(""),Ln(n,d,b.commentBefore,f))}f=!1;let y=Te(g,u,()=>m=null,()=>f=!0);m&&(y+=Se(y,i,c(m))),f&&m&&(f=!1),d.push(r+y)}let h;if(d.length===0)h=s.start+s.end;else{h=d[0];for(let p=1;p<d.length;++p){let g=d[p];h+=g?`
44
+ `)&&(E="");return m+=E+C,n.inFlow?S&&r&&r():w&&!S?m+=Se(m,n.indent,c(w)):g&&s&&s(),m}function zr(t,e){(t==="debug"||t==="warn")&&console.warn(e)}var Rn="<<",de={identify:t=>t===Rn||typeof t=="symbol"&&t.description===Rn,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new v(Symbol(Rn)),{addToJSMap:Yr}),stringify:()=>Rn},Io=(t,e)=>(de.identify(e)||I(e)&&(!e.type||e.type===v.PLAIN)&&de.identify(e.value))&&t?.doc.schema.tags.some(n=>n.tag===de.tag&&n.default);function Yr(t,e,n){let r=To(t,n);if(te(r))for(let s of r.items)Jr(t,e,s);else if(Array.isArray(r))for(let s of r)Jr(t,e,s);else Jr(t,e,r)}function Jr(t,e,n){let r=To(t,n);if(!fe(r))throw new Error("Merge sources must be maps or map aliases");let s=r.toJSON(null,t,Map);for(let[o,i]of s)e instanceof Map?e.has(o)||e.set(o,i):e instanceof Set?e.add(o):Object.prototype.hasOwnProperty.call(e,o)||Object.defineProperty(e,o,{value:i,writable:!0,enumerable:!0,configurable:!0});return e}function To(t,e){return t&&ue(e)?e.resolve(t.doc,t):e}function On(t,e,{key:n,value:r}){if(T(n)&&n.addToJSMap)n.addToJSMap(t,e,r);else if(Io(t,n))Yr(t,e,r);else{let s=q(n,"",t);if(e instanceof Map)e.set(s,q(r,s,t));else if(e instanceof Set)e.add(s);else{let o=zl(n,s,t),i=q(r,o,t);o in e?Object.defineProperty(e,o,{value:i,writable:!0,enumerable:!0,configurable:!0}):e[o]=i}}return e}function zl(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(T(t)&&n?.doc){let r=Bn(n.doc,{});r.anchors=new Set;for(let o of n.anchors.keys())r.anchors.add(o.anchor);r.inFlow=!0,r.inStringifyKey=!0;let s=t.toString(r);if(!n.mapKeyWarned){let o=JSON.stringify(s);o.length>40&&(o=o.substring(0,36)+'..."'),zr(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return s}return JSON.stringify(e)}function mt(t,e,n){let r=Ie(t,void 0,n),s=Ie(e,void 0,n);return new M(r,s)}var M=class t{constructor(e,n=null){Object.defineProperty(this,Y,{value:Ur}),this.key=e,this.value=n}clone(e){let{key:n,value:r}=this;return T(n)&&(n=n.clone(e)),T(r)&&(r=r.clone(e)),new t(n,r)}toJSON(e,n){let r=n?.mapAsMap?new Map:{};return On(n,r,this)}toString(e,n,r){return e?.doc?xo(this,e,n,r):JSON.stringify(this)}};function $n(t,e,n){return(e.inFlow??t.flow?Yl:Jl)(t,e,n)}function Jl({comment:t,items:e},n,{blockItemPrefix:r,flowChars:s,itemIndent:o,onChompKeep:i,onComment:a}){let{indent:l,options:{commentString:c}}=n,u=Object.assign({},n,{indent:o,type:null}),f=!1,d=[];for(let p=0;p<e.length;++p){let g=e[p],m=null;if(T(g))!f&&g.spaceBefore&&d.push(""),Pn(n,d,g.commentBefore,f),g.comment&&(m=g.comment);else if(L(g)){let b=T(g.key)?g.key:null;b&&(!f&&b.spaceBefore&&d.push(""),Pn(n,d,b.commentBefore,f))}f=!1;let y=Te(g,u,()=>m=null,()=>f=!0);m&&(y+=Se(y,o,c(m))),f&&m&&(f=!1),d.push(r+y)}let h;if(d.length===0)h=s.start+s.end;else{h=d[0];for(let p=1;p<d.length;++p){let g=d[p];h+=g?`
45
45
  ${l}${g}`:`
46
46
  `}}return t?(h+=`
47
- `+ie(c(t),l),a&&a()):f&&o&&o(),h}function jl({items:t},e,{flowChars:n,itemIndent:r}){let{indent:s,indentStep:i,flowCollectionPadding:o,options:{commentString:a}}=e;r+=i;let l=Object.assign({},e,{indent:r,inFlow:!0,type:null}),c=!1,u=0,f=[];for(let p=0;p<t.length;++p){let g=t[p],m=null;if(T(g))g.spaceBefore&&f.push(""),Ln(e,f,g.commentBefore,!1),g.comment&&(m=g.comment);else if(L(g)){let b=T(g.key)?g.key:null;b&&(b.spaceBefore&&f.push(""),Ln(e,f,b.commentBefore,!1),b.comment&&(c=!0));let w=T(g.value)?g.value:null;w?(w.comment&&(m=w.comment),w.commentBefore&&(c=!0)):g.value==null&&b?.comment&&(m=b.comment)}m&&(c=!0);let y=Te(g,l,()=>m=null);c||(c=f.length>u||y.includes(`
47
+ `+oe(c(t),l),a&&a()):f&&i&&i(),h}function Yl({items:t},e,{flowChars:n,itemIndent:r}){let{indent:s,indentStep:o,flowCollectionPadding:i,options:{commentString:a}}=e;r+=o;let l=Object.assign({},e,{indent:r,inFlow:!0,type:null}),c=!1,u=0,f=[];for(let p=0;p<t.length;++p){let g=t[p],m=null;if(T(g))g.spaceBefore&&f.push(""),Pn(e,f,g.commentBefore,!1),g.comment&&(m=g.comment);else if(L(g)){let b=T(g.key)?g.key:null;b&&(b.spaceBefore&&f.push(""),Pn(e,f,b.commentBefore,!1),b.comment&&(c=!0));let w=T(g.value)?g.value:null;w?(w.comment&&(m=w.comment),w.commentBefore&&(c=!0)):g.value==null&&b?.comment&&(m=b.comment)}m&&(c=!0);let y=Te(g,l,()=>m=null);c||(c=f.length>u||y.includes(`
48
48
  `)),p<t.length-1?y+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(c||(c=f.reduce((b,w)=>b+w.length+2,2)+(y.length+2)>e.options.lineWidth)),c&&(y+=",")),m&&(y+=Se(y,r,a(m))),f.push(y),u=f.length}let{start:d,end:h}=n;if(f.length===0)return d+h;if(!c){let p=f.reduce((g,m)=>g+m.length+2,2);c=e.options.lineWidth>0&&p>e.options.lineWidth}if(c){let p=d;for(let g of f)p+=g?`
49
- ${i}${s}${g}`:`
49
+ ${o}${s}${g}`:`
50
50
  `;return`${p}
51
- ${s}${h}`}else return`${d}${o}${f.join(" ")}${o}${h}`}function Ln({indent:t,options:{commentString:e}},n,r,s){if(r&&s&&(r=r.replace(/^\n+/,"")),r){let i=ie(e(r),t);n.push(i.trimStart())}}function Ue(t,e){let n=I(e)?e.value:e;for(let r of t)if(L(r)&&(r.key===e||r.key===n||I(r.key)&&r.key.value===n))return r}var D=class extends ht{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(ce,e),this.items=[]}static from(e,n,r){let{keepUndefined:s,replacer:i}=r,o=new this(e),a=(l,c)=>{if(typeof i=="function")c=i.call(n,l,c);else if(Array.isArray(i)&&!i.includes(l))return;(c!==void 0||s)&&o.items.push(mt(l,c,r))};if(n instanceof Map)for(let[l,c]of n)a(l,c);else if(n&&typeof n=="object")for(let l of Object.keys(n))a(l,n[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,n){let r;L(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new M(e,e?.value):r=new M(e.key,e.value);let s=Ue(this.items,r.key),i=this.schema?.sortMapEntries;if(s){if(!n)throw new Error(`Key ${r.key} already set`);I(s.value)&&_n(r.value)?s.value.value=r.value:s.value=r.value}else if(i){let o=this.items.findIndex(a=>i(r,a)<0);o===-1?this.items.push(r):this.items.splice(o,0,r)}else this.items.push(r)}delete(e){let n=Ue(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){let s=Ue(this.items,e)?.value;return(!n&&I(s)?s.value:s)??void 0}has(e){return!!Ue(this.items,e)}set(e,n){this.add(new M(e,n),!0)}toJSON(e,n,r){let s=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(s);for(let i of this.items)Tn(n,s,i);return s}toString(e,n,r){if(!e)return JSON.stringify(this);for(let s of this.items)if(!L(s))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Bn(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:n})}};var he={collection:"map",default:!0,nodeClass:D,tag:"tag:yaml.org,2002:map",resolve(t,e){return fe(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>D.from(t,e,n)};var V=class extends ht{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ne,e),this.items=[]}add(e){this.items.push(e)}delete(e){let n=On(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){let r=On(e);if(typeof r!="number")return;let s=this.items[r];return!n&&I(s)?s.value:s}has(e){let n=On(e);return typeof n=="number"&&n<this.items.length}set(e,n){let r=On(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);let s=this.items[r];I(s)&&_n(n)?s.value=n:this.items[r]=n}toJSON(e,n){let r=[];n?.onCreate&&n.onCreate(r);let s=0;for(let i of this.items)r.push(q(i,String(s++),n));return r}toString(e,n,r){return e?Bn(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(e,n,r){let{replacer:s}=r,i=new this(e);if(n&&Symbol.iterator in Object(n)){let o=0;for(let a of n){if(typeof s=="function"){let l=n instanceof Set?a:String(o++);a=s.call(n,l,a)}i.items.push(Ie(a,void 0,r))}}return i}};function On(t){let e=I(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}var pe={collection:"seq",default:!0,nodeClass:V,tag:"tag:yaml.org,2002:seq",resolve(t,e){return te(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>V.from(t,e,n)};var qe={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),Xe(t,e,n,r)}};var Ze={identify:t=>t==null,createNode:()=>new v(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new v(null),stringify:({source:t},e)=>typeof t=="string"&&Ze.test.test(t)?t:e.options.nullStr};var Rt={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new v(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&Rt.test.test(t)){let r=t[0]==="t"||t[0]==="T";if(e===r)return t}return e?n.options.trueStr:n.options.falseStr}};function z({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);let s=typeof r=="number"?r:Number(r);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let i=Object.is(r,-0)?"-0":JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^-?\d/.test(i)&&!i.includes("e")){let o=i.indexOf(".");o<0&&(o=i.length,i+=".");let a=e-(i.length-o-1);for(;a-- >0;)i+="0"}return i}var Rn={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:z},Pn={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():z(t)}},$n={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let e=new v(parseFloat(t)),n=t.indexOf(".");return n!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-n-1),e},stringify:z};var Mn=t=>typeof t=="bigint"||Number.isInteger(t),Wr=(t,e,n,{intAsBigInt:r})=>r?BigInt(t):parseInt(t.substring(e),n);function _i(t,e,n){let{value:r}=t;return Mn(r)&&r>=0?n+r.toString(e):z(t)}var Fn={identify:t=>Mn(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,n)=>Wr(t,2,8,n),stringify:t=>_i(t,8,"0o")},Dn={identify:Mn,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,n)=>Wr(t,0,10,n),stringify:z},Gn={identify:t=>Mn(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,n)=>Wr(t,2,16,n),stringify:t=>_i(t,16,"0x")};var vi=[he,pe,qe,Ze,Rt,Fn,Dn,Gn,Rn,Pn,$n];function Ei(t){return typeof t=="bigint"||Number.isInteger(t)}var jn=({value:t})=>JSON.stringify(t),Ul=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:jn},{identify:t=>t==null,createNode:()=>new v(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:jn},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:jn},{identify:Ei,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>Ei(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:jn}],ql={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},Ai=[he,pe].concat(Ul,ql);var Pt={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof atob=="function"){let n=atob(t.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let s=0;s<n.length;++s)r[s]=n.charCodeAt(s);return r}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:n},r,s,i){if(!n)return"";let o=n,a;if(typeof btoa=="function"){let l="";for(let c=0;c<o.length;++c)l+=String.fromCharCode(o[c]);a=btoa(l)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=v.BLOCK_LITERAL),e!==v.QUOTE_DOUBLE){let l=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),c=Math.ceil(a.length/l),u=new Array(c);for(let f=0,d=0;f<c;++f,d+=l)u[f]=a.substr(d,l);a=u.join(e===v.BLOCK_LITERAL?`
52
- `:" ")}return Xe({comment:t,type:e,value:a},r,s,i)}};function Kr(t,e){if(te(t))for(let n=0;n<t.items.length;++n){let r=t.items[n];if(!L(r)){if(fe(r)){r.items.length>1&&e("Each pair must have its own sequence indicator");let s=r.items[0]||new M(new v(null));if(r.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${r.commentBefore}
53
- ${s.key.commentBefore}`:r.commentBefore),r.comment){let i=s.value??s.key;i.comment=i.comment?`${r.comment}
54
- ${i.comment}`:r.comment}r=s}t.items[n]=L(r)?r:new M(r)}}else e("Expected a sequence for this tag");return t}function Vr(t,e,n){let{replacer:r}=n,s=new V(t);s.tag="tag:yaml.org,2002:pairs";let i=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof r=="function"&&(o=r.call(e,String(i++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;s.items.push(mt(a,l,n))}return s}var $t={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Kr,createNode:Vr};var yt=class t extends V{constructor(){super(),this.add=D.prototype.add.bind(this),this.delete=D.prototype.delete.bind(this),this.get=D.prototype.get.bind(this),this.has=D.prototype.has.bind(this),this.set=D.prototype.set.bind(this),this.tag=t.tag}toJSON(e,n){if(!n)return super.toJSON(e);let r=new Map;n?.onCreate&&n.onCreate(r);for(let s of this.items){let i,o;if(L(s)?(i=q(s.key,"",n),o=q(s.value,i,n)):i=q(s,"",n),r.has(i))throw new Error("Ordered maps must not include duplicate keys");r.set(i,o)}return r}static from(e,n,r){let s=Vr(e,n,r),i=new this;return i.items=s.items,i}};yt.tag="tag:yaml.org,2002:omap";var Mt={collection:"seq",identify:t=>t instanceof Map,nodeClass:yt,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let n=Kr(t,e),r=[];for(let{key:s}of n.items)I(s)&&(r.includes(s.value)?e(`Ordered maps must not include duplicate keys: ${s.value}`):r.push(s.value));return Object.assign(new yt,n)},createNode:(t,e,n)=>yt.from(t,e,n)};function Ni({value:t,source:e},n){return e&&(t?zr:Jr).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}var zr={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new v(!0),stringify:Ni},Jr={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new v(!1),stringify:Ni};var xi={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:z},Ii={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():z(t)}},Ti={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new v(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){let r=t.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:z};var Ft=t=>typeof t=="bigint"||Number.isInteger(t);function Un(t,e,n,{intAsBigInt:r}){let s=t[0];if((s==="-"||s==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),r){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let o=BigInt(t);return s==="-"?BigInt(-1)*o:o}let i=parseInt(t,n);return s==="-"?-1*i:i}function Yr(t,e,n){let{value:r}=t;if(Ft(r)){let s=r.toString(e);return r<0?"-"+n+s.substr(1):n+s}return z(t)}var Li={identify:Ft,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>Un(t,2,2,n),stringify:t=>Yr(t,2,"0b")},Bi={identify:Ft,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>Un(t,1,8,n),stringify:t=>Yr(t,8,"0")},Oi={identify:Ft,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>Un(t,0,10,n),stringify:z},Ri={identify:Ft,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>Un(t,2,16,n),stringify:t=>Yr(t,16,"0x")};var bt=class t extends D{constructor(e){super(e),this.tag=t.tag}add(e){let n;L(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new M(e.key,null):n=new M(e,null),Ue(this.items,n.key)||this.items.push(n)}get(e,n){let r=Ue(this.items,e);return!n&&L(r)?I(r.key)?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let r=Ue(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new M(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(e,n,r){let{replacer:s}=r,i=new this(e);if(n&&Symbol.iterator in Object(n))for(let o of n)typeof s=="function"&&(o=s.call(n,o,o)),i.items.push(mt(o,null,r));return i}};bt.tag="tag:yaml.org,2002:set";var Dt={collection:"map",identify:t=>t instanceof Set,nodeClass:bt,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,n)=>bt.from(t,e,n),resolve(t,e){if(fe(t)){if(t.hasAllNullValues(!0))return Object.assign(new bt,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function Qr(t,e){let n=t[0],r=n==="-"||n==="+"?t.substring(1):t,s=o=>e?BigInt(o):Number(o),i=r.replace(/_/g,"").split(":").reduce((o,a)=>o*s(60)+s(a),s(0));return n==="-"?s(-1)*i:i}function Pi(t){let{value:e}=t,n=o=>o;if(typeof e=="bigint")n=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return z(t);let r="";e<0&&(r="-",e*=n(-1));let s=n(60),i=[e%s];return e<60?i.unshift(0):(e=(e-i[0])/s,i.unshift(e%s),e>=60&&(e=(e-i[0])/s,i.unshift(e))),r+i.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var qn={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:n})=>Qr(t,n),stringify:Pi},Hn={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>Qr(t,!1),stringify:Pi},wt={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){let e=t.match(wt.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,n,r,s,i,o,a]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(n,r-1,s,i||0,o||0,a||0,l),u=e[8];if(u&&u!=="Z"){let f=Qr(u,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};var Xr=[he,pe,qe,Ze,zr,Jr,Li,Bi,Oi,Ri,xi,Ii,Ti,Pt,de,Mt,$t,Dt,qn,Hn,wt];var $i=new Map([["core",vi],["failsafe",[he,pe,qe]],["json",Ai],["yaml11",Xr],["yaml-1.1",Xr]]),Mi={binary:Pt,bool:Rt,float:$n,floatExp:Pn,floatNaN:Rn,floatTime:Hn,int:Dn,intHex:Gn,intOct:Fn,intTime:qn,map:he,merge:de,null:Ze,omap:Mt,pairs:$t,seq:pe,set:Dt,timestamp:wt},Fi={"tag:yaml.org,2002:binary":Pt,"tag:yaml.org,2002:merge":de,"tag:yaml.org,2002:omap":Mt,"tag:yaml.org,2002:pairs":$t,"tag:yaml.org,2002:set":Dt,"tag:yaml.org,2002:timestamp":wt};function Wn(t,e,n){let r=$i.get(e);if(r&&!t)return n&&!r.includes(de)?r.concat(de):r.slice();let s=r;if(!s)if(Array.isArray(t))s=[];else{let i=Array.from($i.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${i} or define customTags array`)}if(Array.isArray(t))for(let i of t)s=s.concat(i);else typeof t=="function"&&(s=t(s.slice()));return n&&(s=s.concat(de)),s.reduce((i,o)=>{let a=typeof o=="string"?Mi[o]:o;if(!a){let l=JSON.stringify(o),c=Object.keys(Mi).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return i.includes(a)||i.push(a),i},[])}var Hl=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0,Gt=class t{constructor({compat:e,customTags:n,merge:r,resolveKnownTags:s,schema:i,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?Wn(e,"compat"):e?Wn(null,e):null,this.name=typeof i=="string"&&i||"core",this.knownTags=s?Fi:{},this.tags=Wn(n,this.name,r),this.toStringOptions=a??null,Object.defineProperty(this,ce,{value:he}),Object.defineProperty(this,ee,{value:qe}),Object.defineProperty(this,Ne,{value:pe}),this.sortMapEntries=typeof o=="function"?o:o===!0?Hl:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};function Di(t,e){let n=[],r=e.directives===!0;if(e.directives!==!1&&t.directives){let l=t.directives.toString(t);l?(n.push(l),r=!0):t.directives.docStart&&(r=!0)}r&&n.push("---");let s=xn(t,e),{commentString:i}=s.options;if(t.commentBefore){n.length!==1&&n.unshift("");let l=i(t.commentBefore);n.unshift(ie(l,""))}let o=!1,a=null;if(t.contents){if(T(t.contents)){if(t.contents.spaceBefore&&r&&n.push(""),t.contents.commentBefore){let u=i(t.contents.commentBefore);n.push(ie(u,""))}s.forceBlockIndent=!!t.comment,a=t.contents.comment}let l=a?void 0:()=>o=!0,c=Te(t.contents,s,()=>a=null,l);a&&(c+=Se(c,"",i(a))),(c[0]==="|"||c[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(Te(t.contents,s));if(t.directives?.docEnd)if(t.comment){let l=i(t.comment);l.includes(`
55
- `)?(n.push("..."),n.push(ie(l,""))):n.push(`... ${l}`)}else n.push("...");else{let l=t.comment;l&&o&&(l=l.replace(/^\n+/,"")),l&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push(ie(i(l),"")))}return n.join(`
51
+ ${s}${h}`}else return`${d}${i}${f.join(" ")}${i}${h}`}function Pn({indent:t,options:{commentString:e}},n,r,s){if(r&&s&&(r=r.replace(/^\n+/,"")),r){let o=oe(e(r),t);n.push(o.trimStart())}}function Ue(t,e){let n=I(e)?e.value:e;for(let r of t)if(L(r)&&(r.key===e||r.key===n||I(r.key)&&r.key.value===n))return r}var D=class extends ht{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(ce,e),this.items=[]}static from(e,n,r){let{keepUndefined:s,replacer:o}=r,i=new this(e),a=(l,c)=>{if(typeof o=="function")c=o.call(n,l,c);else if(Array.isArray(o)&&!o.includes(l))return;(c!==void 0||s)&&i.items.push(mt(l,c,r))};if(n instanceof Map)for(let[l,c]of n)a(l,c);else if(n&&typeof n=="object")for(let l of Object.keys(n))a(l,n[l]);return typeof e.sortMapEntries=="function"&&i.items.sort(e.sortMapEntries),i}add(e,n){let r;L(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new M(e,e?.value):r=new M(e.key,e.value);let s=Ue(this.items,r.key),o=this.schema?.sortMapEntries;if(s){if(!n)throw new Error(`Key ${r.key} already set`);I(s.value)&&Nn(r.value)?s.value.value=r.value:s.value=r.value}else if(o){let i=this.items.findIndex(a=>o(r,a)<0);i===-1?this.items.push(r):this.items.splice(i,0,r)}else this.items.push(r)}delete(e){let n=Ue(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){let s=Ue(this.items,e)?.value;return(!n&&I(s)?s.value:s)??void 0}has(e){return!!Ue(this.items,e)}set(e,n){this.add(new M(e,n),!0)}toJSON(e,n,r){let s=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(s);for(let o of this.items)On(n,s,o);return s}toString(e,n,r){if(!e)return JSON.stringify(this);for(let s of this.items)if(!L(s))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),$n(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:n})}};var he={collection:"map",default:!0,nodeClass:D,tag:"tag:yaml.org,2002:map",resolve(t,e){return fe(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>D.from(t,e,n)};var V=class extends ht{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ne,e),this.items=[]}add(e){this.items.push(e)}delete(e){let n=Mn(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){let r=Mn(e);if(typeof r!="number")return;let s=this.items[r];return!n&&I(s)?s.value:s}has(e){let n=Mn(e);return typeof n=="number"&&n<this.items.length}set(e,n){let r=Mn(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);let s=this.items[r];I(s)&&Nn(n)?s.value=n:this.items[r]=n}toJSON(e,n){let r=[];n?.onCreate&&n.onCreate(r);let s=0;for(let o of this.items)r.push(q(o,String(s++),n));return r}toString(e,n,r){return e?$n(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(e,n,r){let{replacer:s}=r,o=new this(e);if(n&&Symbol.iterator in Object(n)){let i=0;for(let a of n){if(typeof s=="function"){let l=n instanceof Set?a:String(i++);a=s.call(n,l,a)}o.items.push(Ie(a,void 0,r))}}return o}};function Mn(t){let e=I(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}var pe={collection:"seq",default:!0,nodeClass:V,tag:"tag:yaml.org,2002:seq",resolve(t,e){return te(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>V.from(t,e,n)};var qe={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),Xe(t,e,n,r)}};var Ze={identify:t=>t==null,createNode:()=>new v(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new v(null),stringify:({source:t},e)=>typeof t=="string"&&Ze.test.test(t)?t:e.options.nullStr};var Mt={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new v(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&Mt.test.test(t)){let r=t[0]==="t"||t[0]==="T";if(e===r)return t}return e?n.options.trueStr:n.options.falseStr}};function z({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);let s=typeof r=="number"?r:Number(r);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let o=Object.is(r,-0)?"-0":JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^-?\d/.test(o)&&!o.includes("e")){let i=o.indexOf(".");i<0&&(i=o.length,o+=".");let a=e-(o.length-i-1);for(;a-- >0;)o+="0"}return o}var Fn={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:z},Dn={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():z(t)}},Gn={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let e=new v(parseFloat(t)),n=t.indexOf(".");return n!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-n-1),e},stringify:z};var jn=t=>typeof t=="bigint"||Number.isInteger(t),Qr=(t,e,n,{intAsBigInt:r})=>r?BigInt(t):parseInt(t.substring(e),n);function Lo(t,e,n){let{value:r}=t;return jn(r)&&r>=0?n+r.toString(e):z(t)}var Un={identify:t=>jn(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,n)=>Qr(t,2,8,n),stringify:t=>Lo(t,8,"0o")},qn={identify:jn,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,n)=>Qr(t,0,10,n),stringify:z},Hn={identify:t=>jn(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,n)=>Qr(t,2,16,n),stringify:t=>Lo(t,16,"0x")};var Bo=[he,pe,qe,Ze,Mt,Un,qn,Hn,Fn,Dn,Gn];function Ro(t){return typeof t=="bigint"||Number.isInteger(t)}var Wn=({value:t})=>JSON.stringify(t),Ql=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:Wn},{identify:t=>t==null,createNode:()=>new v(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Wn},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:Wn},{identify:Ro,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>Ro(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:Wn}],Xl={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},Oo=[he,pe].concat(Ql,Xl);var Ft={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof atob=="function"){let n=atob(t.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let s=0;s<n.length;++s)r[s]=n.charCodeAt(s);return r}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:n},r,s,o){if(!n)return"";let i=n,a;if(typeof btoa=="function"){let l="";for(let c=0;c<i.length;++c)l+=String.fromCharCode(i[c]);a=btoa(l)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=v.BLOCK_LITERAL),e!==v.QUOTE_DOUBLE){let l=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),c=Math.ceil(a.length/l),u=new Array(c);for(let f=0,d=0;f<c;++f,d+=l)u[f]=a.substr(d,l);a=u.join(e===v.BLOCK_LITERAL?`
52
+ `:" ")}return Xe({comment:t,type:e,value:a},r,s,o)}};function Xr(t,e){if(te(t))for(let n=0;n<t.items.length;++n){let r=t.items[n];if(!L(r)){if(fe(r)){r.items.length>1&&e("Each pair must have its own sequence indicator");let s=r.items[0]||new M(new v(null));if(r.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${r.commentBefore}
53
+ ${s.key.commentBefore}`:r.commentBefore),r.comment){let o=s.value??s.key;o.comment=o.comment?`${r.comment}
54
+ ${o.comment}`:r.comment}r=s}t.items[n]=L(r)?r:new M(r)}}else e("Expected a sequence for this tag");return t}function Zr(t,e,n){let{replacer:r}=n,s=new V(t);s.tag="tag:yaml.org,2002:pairs";let o=0;if(e&&Symbol.iterator in Object(e))for(let i of e){typeof r=="function"&&(i=r.call(e,String(o++),i));let a,l;if(Array.isArray(i))if(i.length===2)a=i[0],l=i[1];else throw new TypeError(`Expected [key, value] tuple: ${i}`);else if(i&&i instanceof Object){let c=Object.keys(i);if(c.length===1)a=c[0],l=i[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=i;s.items.push(mt(a,l,n))}return s}var Dt={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Xr,createNode:Zr};var yt=class t extends V{constructor(){super(),this.add=D.prototype.add.bind(this),this.delete=D.prototype.delete.bind(this),this.get=D.prototype.get.bind(this),this.has=D.prototype.has.bind(this),this.set=D.prototype.set.bind(this),this.tag=t.tag}toJSON(e,n){if(!n)return super.toJSON(e);let r=new Map;n?.onCreate&&n.onCreate(r);for(let s of this.items){let o,i;if(L(s)?(o=q(s.key,"",n),i=q(s.value,o,n)):o=q(s,"",n),r.has(o))throw new Error("Ordered maps must not include duplicate keys");r.set(o,i)}return r}static from(e,n,r){let s=Zr(e,n,r),o=new this;return o.items=s.items,o}};yt.tag="tag:yaml.org,2002:omap";var Gt={collection:"seq",identify:t=>t instanceof Map,nodeClass:yt,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let n=Xr(t,e),r=[];for(let{key:s}of n.items)I(s)&&(r.includes(s.value)?e(`Ordered maps must not include duplicate keys: ${s.value}`):r.push(s.value));return Object.assign(new yt,n)},createNode:(t,e,n)=>yt.from(t,e,n)};function Po({value:t,source:e},n){return e&&(t?es:ts).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}var es={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new v(!0),stringify:Po},ts={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new v(!1),stringify:Po};var $o={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:z},Mo={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():z(t)}},Fo={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new v(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){let r=t.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:z};var jt=t=>typeof t=="bigint"||Number.isInteger(t);function Kn(t,e,n,{intAsBigInt:r}){let s=t[0];if((s==="-"||s==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),r){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let i=BigInt(t);return s==="-"?BigInt(-1)*i:i}let o=parseInt(t,n);return s==="-"?-1*o:o}function ns(t,e,n){let{value:r}=t;if(jt(r)){let s=r.toString(e);return r<0?"-"+n+s.substr(1):n+s}return z(t)}var Do={identify:jt,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>Kn(t,2,2,n),stringify:t=>ns(t,2,"0b")},Go={identify:jt,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>Kn(t,1,8,n),stringify:t=>ns(t,8,"0")},jo={identify:jt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>Kn(t,0,10,n),stringify:z},Uo={identify:jt,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>Kn(t,2,16,n),stringify:t=>ns(t,16,"0x")};var bt=class t extends D{constructor(e){super(e),this.tag=t.tag}add(e){let n;L(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new M(e.key,null):n=new M(e,null),Ue(this.items,n.key)||this.items.push(n)}get(e,n){let r=Ue(this.items,e);return!n&&L(r)?I(r.key)?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let r=Ue(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new M(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(e,n,r){let{replacer:s}=r,o=new this(e);if(n&&Symbol.iterator in Object(n))for(let i of n)typeof s=="function"&&(i=s.call(n,i,i)),o.items.push(mt(i,null,r));return o}};bt.tag="tag:yaml.org,2002:set";var Ut={collection:"map",identify:t=>t instanceof Set,nodeClass:bt,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,n)=>bt.from(t,e,n),resolve(t,e){if(fe(t)){if(t.hasAllNullValues(!0))return Object.assign(new bt,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function rs(t,e){let n=t[0],r=n==="-"||n==="+"?t.substring(1):t,s=i=>e?BigInt(i):Number(i),o=r.replace(/_/g,"").split(":").reduce((i,a)=>i*s(60)+s(a),s(0));return n==="-"?s(-1)*o:o}function qo(t){let{value:e}=t,n=i=>i;if(typeof e=="bigint")n=i=>BigInt(i);else if(isNaN(e)||!isFinite(e))return z(t);let r="";e<0&&(r="-",e*=n(-1));let s=n(60),o=[e%s];return e<60?o.unshift(0):(e=(e-o[0])/s,o.unshift(e%s),e>=60&&(e=(e-o[0])/s,o.unshift(e))),r+o.map(i=>String(i).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Vn={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:n})=>rs(t,n),stringify:qo},zn={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>rs(t,!1),stringify:qo},wt={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){let e=t.match(wt.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,n,r,s,o,i,a]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(n,r-1,s,o||0,i||0,a||0,l),u=e[8];if(u&&u!=="Z"){let f=rs(u,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};var ss=[he,pe,qe,Ze,es,ts,Do,Go,jo,Uo,$o,Mo,Fo,Ft,de,Gt,Dt,Ut,Vn,zn,wt];var Ho=new Map([["core",Bo],["failsafe",[he,pe,qe]],["json",Oo],["yaml11",ss],["yaml-1.1",ss]]),Wo={binary:Ft,bool:Mt,float:Gn,floatExp:Dn,floatNaN:Fn,floatTime:zn,int:qn,intHex:Hn,intOct:Un,intTime:Vn,map:he,merge:de,null:Ze,omap:Gt,pairs:Dt,seq:pe,set:Ut,timestamp:wt},Ko={"tag:yaml.org,2002:binary":Ft,"tag:yaml.org,2002:merge":de,"tag:yaml.org,2002:omap":Gt,"tag:yaml.org,2002:pairs":Dt,"tag:yaml.org,2002:set":Ut,"tag:yaml.org,2002:timestamp":wt};function Jn(t,e,n){let r=Ho.get(e);if(r&&!t)return n&&!r.includes(de)?r.concat(de):r.slice();let s=r;if(!s)if(Array.isArray(t))s=[];else{let o=Array.from(Ho.keys()).filter(i=>i!=="yaml11").map(i=>JSON.stringify(i)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${o} or define customTags array`)}if(Array.isArray(t))for(let o of t)s=s.concat(o);else typeof t=="function"&&(s=t(s.slice()));return n&&(s=s.concat(de)),s.reduce((o,i)=>{let a=typeof i=="string"?Wo[i]:i;if(!a){let l=JSON.stringify(i),c=Object.keys(Wo).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return o.includes(a)||o.push(a),o},[])}var Zl=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0,qt=class t{constructor({compat:e,customTags:n,merge:r,resolveKnownTags:s,schema:o,sortMapEntries:i,toStringDefaults:a}){this.compat=Array.isArray(e)?Jn(e,"compat"):e?Jn(null,e):null,this.name=typeof o=="string"&&o||"core",this.knownTags=s?Ko:{},this.tags=Jn(n,this.name,r),this.toStringOptions=a??null,Object.defineProperty(this,ce,{value:he}),Object.defineProperty(this,ee,{value:qe}),Object.defineProperty(this,Ne,{value:pe}),this.sortMapEntries=typeof i=="function"?i:i===!0?Zl:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};function Vo(t,e){let n=[],r=e.directives===!0;if(e.directives!==!1&&t.directives){let l=t.directives.toString(t);l?(n.push(l),r=!0):t.directives.docStart&&(r=!0)}r&&n.push("---");let s=Bn(t,e),{commentString:o}=s.options;if(t.commentBefore){n.length!==1&&n.unshift("");let l=o(t.commentBefore);n.unshift(oe(l,""))}let i=!1,a=null;if(t.contents){if(T(t.contents)){if(t.contents.spaceBefore&&r&&n.push(""),t.contents.commentBefore){let u=o(t.contents.commentBefore);n.push(oe(u,""))}s.forceBlockIndent=!!t.comment,a=t.contents.comment}let l=a?void 0:()=>i=!0,c=Te(t.contents,s,()=>a=null,l);a&&(c+=Se(c,"",o(a))),(c[0]==="|"||c[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(Te(t.contents,s));if(t.directives?.docEnd)if(t.comment){let l=o(t.comment);l.includes(`
55
+ `)?(n.push("..."),n.push(oe(l,""))):n.push(`... ${l}`)}else n.push("...");else{let l=t.comment;l&&i&&(l=l.replace(/^\n+/,"")),l&&((!i||a)&&n[n.length-1]!==""&&n.push(""),n.push(oe(o(l),"")))}return n.join(`
56
56
  `)+`
57
- `}var He=class t{constructor(e,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Y,{value:bn});let s=null;typeof n=="function"||Array.isArray(n)?s=n:r===void 0&&n&&(r=n,n=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=i;let{version:o}=i;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new ke({version:o}),this.setSchema(o,r),this.contents=e===void 0?null:this.createNode(e,s,r)}clone(){let e=Object.create(t.prototype,{[Y]:{value:bn}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=T(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){kt(this.contents)&&this.contents.add(e)}addIn(e,n){kt(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){let r=Mr(this);e.anchor=!n||r.has(n)?Fr(n||"a",r):n}return new xe(e.anchor)}createNode(e,n,r){let s;if(typeof n=="function")e=n.call({"":e},"",e),s=n;else if(Array.isArray(n)){let m=b=>typeof b=="number"||b instanceof String||b instanceof Number,y=n.filter(m).map(String);y.length>0&&(n=n.concat(y)),s=n}else r===void 0&&n&&(r=n,n=void 0);let{aliasDuplicateObjects:i,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:u}=r??{},{onAnchor:f,setAnchors:d,sourceObjects:h}=yi(this,o||"a"),p={aliasDuplicateObjects:i??!0,keepUndefined:l??!1,onAnchor:f,onTagObj:c,replacer:s,schema:this.schema,sourceObjects:h},g=Ie(e,u,p);return a&&B(g)&&(g.flow=!0),d(),g}createPair(e,n,r={}){let s=this.createNode(e,null,r),i=this.createNode(n,null,r);return new M(s,i)}delete(e){return kt(this.contents)?this.contents.delete(e):!1}deleteIn(e){return pt(e)?this.contents==null?!1:(this.contents=null,!0):kt(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return B(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return pt(e)?!n&&I(this.contents)?this.contents.value:this.contents:B(this.contents)?this.contents.getIn(e,n):void 0}has(e){return B(this.contents)?this.contents.has(e):!1}hasIn(e){return pt(e)?this.contents!==void 0:B(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=Tt(this.schema,[e],n):kt(this.contents)&&this.contents.set(e,n)}setIn(e,n){pt(e)?this.contents=n:this.contents==null?this.contents=Tt(this.schema,Array.from(e),n):kt(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new ke({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new ke({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{let s=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${s}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new Gt(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:r,maxAliasCount:s,onAnchor:i,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},l=q(this.contents,n??"",a);if(typeof i=="function")for(let{count:c,res:u}of a.anchors.values())i(u,c);return typeof o=="function"?Ge(o,{"":l},"",l):l}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return Di(this,e)}};function kt(t){if(B(t))return!0;throw new Error("Expected a YAML collection as document contents")}var jt=class extends Error{constructor(e,n,r,s){super(),this.name=e,this.code=r,this.message=s,this.pos=n}},Ce=class extends jt{constructor(e,n,r){super("YAMLParseError",e,n,r)}},Ut=class extends jt{constructor(e,n,r){super("YAMLWarning",e,n,r)}},Zr=(t,e)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(a=>e.linePos(a));let{line:r,col:s}=n.linePos[0];n.message+=` at line ${r}, column ${s}`;let i=s-1,o=t.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){let a=Math.min(i-39,o.length-79);o="\u2026"+o.substring(a),i-=a-1}if(o.length>80&&(o=o.substring(0,79)+"\u2026"),r>1&&/^ *$/.test(o.substring(0,i))){let a=t.substring(e.lineStarts[r-2],e.lineStarts[r-1]);a.length>80&&(a=a.substring(0,79)+`\u2026
58
- `),o=a+o}if(/[^ ]/.test(o)){let a=1,l=n.linePos[1];l?.line===r&&l.col>s&&(a=Math.max(1,Math.min(l.col-s,80-i)));let c=" ".repeat(i)+"^".repeat(a);n.message+=`:
57
+ `}var He=class t{constructor(e,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Y,{value:Cn});let s=null;typeof n=="function"||Array.isArray(n)?s=n:r===void 0&&n&&(r=n,n=void 0);let o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=o;let{version:i}=o;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(i=this.directives.yaml.version)):this.directives=new ke({version:i}),this.setSchema(i,r),this.contents=e===void 0?null:this.createNode(e,s,r)}clone(){let e=Object.create(t.prototype,{[Y]:{value:Cn}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=T(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){kt(this.contents)&&this.contents.add(e)}addIn(e,n){kt(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){let r=qr(this);e.anchor=!n||r.has(n)?Hr(n||"a",r):n}return new xe(e.anchor)}createNode(e,n,r){let s;if(typeof n=="function")e=n.call({"":e},"",e),s=n;else if(Array.isArray(n)){let m=b=>typeof b=="number"||b instanceof String||b instanceof Number,y=n.filter(m).map(String);y.length>0&&(n=n.concat(y)),s=n}else r===void 0&&n&&(r=n,n=void 0);let{aliasDuplicateObjects:o,anchorPrefix:i,flow:a,keepUndefined:l,onTagObj:c,tag:u}=r??{},{onAnchor:f,setAnchors:d,sourceObjects:h}=Eo(this,i||"a"),p={aliasDuplicateObjects:o??!0,keepUndefined:l??!1,onAnchor:f,onTagObj:c,replacer:s,schema:this.schema,sourceObjects:h},g=Ie(e,u,p);return a&&B(g)&&(g.flow=!0),d(),g}createPair(e,n,r={}){let s=this.createNode(e,null,r),o=this.createNode(n,null,r);return new M(s,o)}delete(e){return kt(this.contents)?this.contents.delete(e):!1}deleteIn(e){return pt(e)?this.contents==null?!1:(this.contents=null,!0):kt(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return B(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return pt(e)?!n&&I(this.contents)?this.contents.value:this.contents:B(this.contents)?this.contents.getIn(e,n):void 0}has(e){return B(this.contents)?this.contents.has(e):!1}hasIn(e){return pt(e)?this.contents!==void 0:B(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=Rt(this.schema,[e],n):kt(this.contents)&&this.contents.set(e,n)}setIn(e,n){pt(e)?this.contents=n:this.contents==null?this.contents=Rt(this.schema,Array.from(e),n):kt(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new ke({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new ke({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{let s=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${s}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new qt(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:r,maxAliasCount:s,onAnchor:o,reviver:i}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},l=q(this.contents,n??"",a);if(typeof o=="function")for(let{count:c,res:u}of a.anchors.values())o(u,c);return typeof i=="function"?Ge(i,{"":l},"",l):l}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return Vo(this,e)}};function kt(t){if(B(t))return!0;throw new Error("Expected a YAML collection as document contents")}var Ht=class extends Error{constructor(e,n,r,s){super(),this.name=e,this.code=r,this.message=s,this.pos=n}},Ce=class extends Ht{constructor(e,n,r){super("YAMLParseError",e,n,r)}},Wt=class extends Ht{constructor(e,n,r){super("YAMLWarning",e,n,r)}},os=(t,e)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(a=>e.linePos(a));let{line:r,col:s}=n.linePos[0];n.message+=` at line ${r}, column ${s}`;let o=s-1,i=t.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(o>=60&&i.length>80){let a=Math.min(o-39,i.length-79);i="\u2026"+i.substring(a),o-=a-1}if(i.length>80&&(i=i.substring(0,79)+"\u2026"),r>1&&/^ *$/.test(i.substring(0,o))){let a=t.substring(e.lineStarts[r-2],e.lineStarts[r-1]);a.length>80&&(a=a.substring(0,79)+`\u2026
58
+ `),i=a+i}if(/[^ ]/.test(i)){let a=1,l=n.linePos[1];l?.line===r&&l.col>s&&(a=Math.max(1,Math.min(l.col-s,80-o)));let c=" ".repeat(o)+"^".repeat(a);n.message+=`:
59
59
 
60
- ${o}
60
+ ${i}
61
61
  ${c}
62
- `}};function _e(t,{flow:e,indicator:n,next:r,offset:s,onError:i,parentIndent:o,startOnNewline:a}){let l=!1,c=a,u=a,f="",d="",h=!1,p=!1,g=null,m=null,y=null,b=null,w=null,S=null,C=null;for(let _ of t)switch(p&&(_.type!=="space"&&_.type!=="newline"&&_.type!=="comma"&&i(_.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),p=!1),g&&(c&&_.type!=="comment"&&_.type!=="newline"&&i(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),g=null),_.type){case"space":!e&&(n!=="doc-start"||r?.type!=="flow-collection")&&_.source.includes(" ")&&(g=_),u=!0;break;case"comment":{u||i(_,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let $=_.source.substring(1)||" ";f?f+=d+$:f=$,d="",c=!1;break}case"newline":c?f?f+=_.source:(!S||n!=="seq-item-ind")&&(l=!0):d+=_.source,c=!0,h=!0,(m||y)&&(b=_),u=!0;break;case"anchor":m&&i(_,"MULTIPLE_ANCHORS","A node can have at most one anchor"),_.source.endsWith(":")&&i(_.offset+_.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),m=_,C??(C=_.offset),c=!1,u=!1,p=!0;break;case"tag":{y&&i(_,"MULTIPLE_TAGS","A node can have at most one tag"),y=_,C??(C=_.offset),c=!1,u=!1,p=!0;break}case n:(m||y)&&i(_,"BAD_PROP_ORDER",`Anchors and tags must be after the ${_.source} indicator`),S&&i(_,"UNEXPECTED_TOKEN",`Unexpected ${_.source} in ${e??"collection"}`),S=_,c=n==="seq-item-ind"||n==="explicit-key-ind",u=!1;break;case"comma":if(e){w&&i(_,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),w=_,c=!1,u=!1;break}default:i(_,"UNEXPECTED_TOKEN",`Unexpected ${_.type} token`),c=!1,u=!1}let E=t[t.length-1],x=E?E.offset+E.source.length:s;return p&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&i(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g&&(c&&g.indent<=o||r?.type==="block-map"||r?.type==="block-seq")&&i(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:w,found:S,spaceBefore:l,comment:f,hasNewline:h,anchor:m,tag:y,newlineAfterProp:b,end:x,start:C??x}}function We(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
63
- `))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let n of e.start)if(n.type==="newline")return!0;if(e.sep){for(let n of e.sep)if(n.type==="newline")return!0}if(We(e.key)||We(e.value))return!0}return!1;default:return!0}}function qt(t,e,n){if(e?.type==="flow-collection"){let r=e.end[0];r.indent===t&&(r.source==="]"||r.source==="}")&&We(e)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Kn(t,e,n){let{uniqueKeys:r}=t.options;if(r===!1)return!1;let s=typeof r=="function"?r:(i,o)=>i===o||I(i)&&I(o)&&i.value===o.value;return e.some(i=>s(i.key,n))}var Gi="All mapping items must start at the same column";function ji({composeNode:t,composeEmptyNode:e},n,r,s,i){let o=i?.nodeClass??D,a=new o(n.schema);n.atRoot&&(n.atRoot=!1);let l=r.offset,c=null;for(let u of r.items){let{start:f,key:d,sep:h,value:p}=u,g=_e(f,{indicator:"explicit-key-ind",next:d??h?.[0],offset:l,onError:s,parentIndent:r.indent,startOnNewline:!0}),m=!g.found;if(m){if(d&&(d.type==="block-seq"?s(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==r.indent&&s(l,"BAD_INDENT",Gi)),!g.anchor&&!g.tag&&!h){c=g.end,g.comment&&(a.comment?a.comment+=`
64
- `+g.comment:a.comment=g.comment);continue}(g.newlineAfterProp||We(d))&&s(d??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else g.found?.indent!==r.indent&&s(l,"BAD_INDENT",Gi);n.atKey=!0;let y=g.end,b=d?t(n,d,g,s):e(n,y,f,null,g,s);n.schema.compat&&qt(r.indent,d,s),n.atKey=!1,Kn(n,a.items,b)&&s(y,"DUPLICATE_KEY","Map keys must be unique");let w=_e(h??[],{indicator:"map-value-ind",next:p,offset:b.range[2],onError:s,parentIndent:r.indent,startOnNewline:!d||d.type==="block-scalar"});if(l=w.end,w.found){m&&(p?.type==="block-map"&&!w.hasNewline&&s(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&g.start<w.found.offset-1024&&s(b.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let S=p?t(n,p,w,s):e(n,l,h,null,w,s);n.schema.compat&&qt(r.indent,p,s),l=S.range[2];let C=new M(b,S);n.options.keepSourceTokens&&(C.srcToken=u),a.items.push(C)}else{m&&s(b.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),w.comment&&(b.comment?b.comment+=`
65
- `+w.comment:b.comment=w.comment);let S=new M(b);n.options.keepSourceTokens&&(S.srcToken=u),a.items.push(S)}}return c&&c<l&&s(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[r.offset,l,c??l],a}function Ui({composeNode:t,composeEmptyNode:e},n,r,s,i){let o=i?.nodeClass??V,a=new o(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let l=r.offset,c=null;for(let{start:u,value:f}of r.items){let d=_e(u,{indicator:"seq-item-ind",next:f,offset:l,onError:s,parentIndent:r.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||f)f?.type==="block-seq"?s(d.end,"BAD_INDENT","All sequence items must start at the same column"):s(l,"MISSING_CHAR","Sequence item without - indicator");else{c=d.end,d.comment&&(a.comment=d.comment);continue}let h=f?t(n,f,d,s):e(n,d.end,u,null,d,s);n.schema.compat&&qt(r.indent,f,s),l=h.range[2],a.items.push(h)}return a.range=[r.offset,l,c??l],a}function ve(t,e,n,r){let s="";if(t){let i=!1,o="";for(let a of t){let{source:l,type:c}=a;switch(c){case"space":i=!0;break;case"comment":{n&&!i&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=l.substring(1)||" ";s?s+=o+u:s=u,o="";break}case"newline":s&&(o+=l),i=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:s,offset:e}}var es="Block collections are not allowed within flow collections",ts=t=>t&&(t.type==="block-map"||t.type==="block-seq");function qi({composeNode:t,composeEmptyNode:e},n,r,s,i){let o=r.start.source==="{",a=o?"flow map":"flow sequence",l=i?.nodeClass??(o?D:V),c=new l(n.schema);c.flow=!0;let u=n.atRoot;u&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let f=r.offset+r.start.source.length;for(let m=0;m<r.items.length;++m){let y=r.items[m],{start:b,key:w,sep:S,value:C}=y,E=_e(b,{flow:a,indicator:"explicit-key-ind",next:w??S?.[0],offset:f,onError:s,parentIndent:r.indent,startOnNewline:!1});if(!E.found){if(!E.anchor&&!E.tag&&!S&&!C){m===0&&E.comma?s(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):m<r.items.length-1&&s(E.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),E.comment&&(c.comment?c.comment+=`
66
- `+E.comment:c.comment=E.comment),f=E.end;continue}!o&&n.options.strict&&We(w)&&s(w,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(m===0)E.comma&&s(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(E.comma||s(E.start,"MISSING_CHAR",`Missing , between ${a} items`),E.comment){let x="";e:for(let _ of b)switch(_.type){case"comma":case"space":break;case"comment":x=_.source.substring(1);break e;default:break e}if(x){let _=c.items[c.items.length-1];L(_)&&(_=_.value??_.key),_.comment?_.comment+=`
67
- `+x:_.comment=x,E.comment=E.comment.substring(x.length+1)}}if(!o&&!S&&!E.found){let x=C?t(n,C,E,s):e(n,E.end,S,null,E,s);c.items.push(x),f=x.range[2],ts(C)&&s(x.range,"BLOCK_IN_FLOW",es)}else{n.atKey=!0;let x=E.end,_=w?t(n,w,E,s):e(n,x,b,null,E,s);ts(w)&&s(_.range,"BLOCK_IN_FLOW",es),n.atKey=!1;let $=_e(S??[],{flow:a,indicator:"map-value-ind",next:C,offset:_.range[2],onError:s,parentIndent:r.indent,startOnNewline:!1});if($.found){if(!o&&!E.found&&n.options.strict){if(S)for(let O of S){if(O===$.found)break;if(O.type==="newline"){s(O,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}E.start<$.found.offset-1024&&s($.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else C&&("source"in C&&C.source?.[0]===":"?s(C,"MISSING_CHAR",`Missing space after : in ${a}`):s($.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let re=C?t(n,C,$,s):$.found?e(n,$.end,S,null,$,s):null;re?ts(C)&&s(re.range,"BLOCK_IN_FLOW",es):$.comment&&(_.comment?_.comment+=`
68
- `+$.comment:_.comment=$.comment);let ye=new M(_,re);if(n.options.keepSourceTokens&&(ye.srcToken=y),o){let O=c;Kn(n,O.items,_)&&s(x,"DUPLICATE_KEY","Map keys must be unique"),O.items.push(ye)}else{let O=new D(n.schema);O.flow=!0,O.items.push(ye);let It=(re??_).range;O.range=[_.range[0],It[1],It[2]],c.items.push(O)}f=re?re.range[2]:$.end}}let d=o?"}":"]",[h,...p]=r.end,g=f;if(h?.source===d)g=h.offset+h.source.length;else{let m=a[0].toUpperCase()+a.substring(1),y=u?`${m} must end with a ${d}`:`${m} in block collection must be sufficiently indented and end with a ${d}`;s(f,u?"MISSING_CHAR":"BAD_INDENT",y),h&&h.source.length!==1&&p.unshift(h)}if(p.length>0){let m=ve(p,g,n.options.strict,s);m.comment&&(c.comment?c.comment+=`
69
- `+m.comment:c.comment=m.comment),c.range=[r.offset,g,m.offset]}else c.range=[r.offset,g,g];return c}function ns(t,e,n,r,s,i){let o=n.type==="block-map"?ji(t,e,n,r,i):n.type==="block-seq"?Ui(t,e,n,r,i):qi(t,e,n,r,i),a=o.constructor;return s==="!"||s===a.tagName?(o.tag=a.tagName,o):(s&&(o.tag=s),o)}function Hi(t,e,n,r,s){let i=r.tag,o=i?e.directives.tagName(i.source,d=>s(i,"TAG_RESOLVE_FAILED",d)):null;if(n.type==="block-seq"){let{anchor:d,newlineAfterProp:h}=r,p=d&&i?d.offset>i.offset?d:i:d??i;p&&(!h||h.offset<p.offset)&&s(p,"MISSING_CHAR","Missing newline after block sequence props")}let a=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!i||!o||o==="!"||o===D.tagName&&a==="map"||o===V.tagName&&a==="seq")return ns(t,e,n,s,o);let l=e.schema.tags.find(d=>d.tag===o&&d.collection===a);if(!l){let d=e.schema.knownTags[o];if(d?.collection===a)e.schema.tags.push(Object.assign({},d,{default:!1})),l=d;else return d?s(i,"BAD_COLLECTION_TYPE",`${d.tag} used for ${a} collection, but expects ${d.collection??"scalar"}`,!0):s(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),ns(t,e,n,s,o)}let c=ns(t,e,n,s,o,l),u=l.resolve?.(c,d=>s(i,"TAG_RESOLVE_FAILED",d),e.options)??c,f=T(u)?u:new v(u);return f.range=c.range,f.tag=o,l?.format&&(f.format=l.format),f}function rs(t,e,n){let r=e.offset,s=Wl(e,t.options.strict,n);if(!s)return{value:"",type:null,comment:"",range:[r,r,r]};let i=s.mode===">"?v.BLOCK_FOLDED:v.BLOCK_LITERAL,o=e.source?Kl(e.source):[],a=o.length;for(let g=o.length-1;g>=0;--g){let m=o[g][1];if(m===""||m==="\r")a=g;else break}if(a===0){let g=s.chomp==="+"&&o.length>0?`
70
- `.repeat(Math.max(1,o.length-1)):"",m=r+s.length;return e.source&&(m+=e.source.length),{value:g,type:i,comment:s.comment,range:[r,m,m]}}let l=e.indent+s.indent,c=e.offset+s.length,u=0;for(let g=0;g<a;++g){let[m,y]=o[g];if(y===""||y==="\r")s.indent===0&&m.length>l&&(l=m.length);else{m.length<l&&n(c+m.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(l=m.length),u=g,l===0&&!t.atRoot&&n(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=m.length+y.length+1}for(let g=o.length-1;g>=a;--g)o[g][0].length>l&&(a=g+1);let f="",d="",h=!1;for(let g=0;g<u;++g)f+=o[g][0].slice(l)+`
71
- `;for(let g=u;g<a;++g){let[m,y]=o[g];c+=m.length+y.length+1;let b=y[y.length-1]==="\r";if(b&&(y=y.slice(0,-1)),y&&m.length<l){let S=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;n(c-y.length-(b?2:1),"BAD_INDENT",S),m=""}i===v.BLOCK_LITERAL?(f+=d+m.slice(l)+y,d=`
62
+ `}};function _e(t,{flow:e,indicator:n,next:r,offset:s,onError:o,parentIndent:i,startOnNewline:a}){let l=!1,c=a,u=a,f="",d="",h=!1,p=!1,g=null,m=null,y=null,b=null,w=null,S=null,C=null;for(let _ of t)switch(p&&(_.type!=="space"&&_.type!=="newline"&&_.type!=="comma"&&o(_.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),p=!1),g&&(c&&_.type!=="comment"&&_.type!=="newline"&&o(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),g=null),_.type){case"space":!e&&(n!=="doc-start"||r?.type!=="flow-collection")&&_.source.includes(" ")&&(g=_),u=!0;break;case"comment":{u||o(_,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let $=_.source.substring(1)||" ";f?f+=d+$:f=$,d="",c=!1;break}case"newline":c?f?f+=_.source:(!S||n!=="seq-item-ind")&&(l=!0):d+=_.source,c=!0,h=!0,(m||y)&&(b=_),u=!0;break;case"anchor":m&&o(_,"MULTIPLE_ANCHORS","A node can have at most one anchor"),_.source.endsWith(":")&&o(_.offset+_.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),m=_,C??(C=_.offset),c=!1,u=!1,p=!0;break;case"tag":{y&&o(_,"MULTIPLE_TAGS","A node can have at most one tag"),y=_,C??(C=_.offset),c=!1,u=!1,p=!0;break}case n:(m||y)&&o(_,"BAD_PROP_ORDER",`Anchors and tags must be after the ${_.source} indicator`),S&&o(_,"UNEXPECTED_TOKEN",`Unexpected ${_.source} in ${e??"collection"}`),S=_,c=n==="seq-item-ind"||n==="explicit-key-ind",u=!1;break;case"comma":if(e){w&&o(_,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),w=_,c=!1,u=!1;break}default:o(_,"UNEXPECTED_TOKEN",`Unexpected ${_.type} token`),c=!1,u=!1}let E=t[t.length-1],x=E?E.offset+E.source.length:s;return p&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&o(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g&&(c&&g.indent<=i||r?.type==="block-map"||r?.type==="block-seq")&&o(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:w,found:S,spaceBefore:l,comment:f,hasNewline:h,anchor:m,tag:y,newlineAfterProp:b,end:x,start:C??x}}function We(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
63
+ `))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let n of e.start)if(n.type==="newline")return!0;if(e.sep){for(let n of e.sep)if(n.type==="newline")return!0}if(We(e.key)||We(e.value))return!0}return!1;default:return!0}}function Kt(t,e,n){if(e?.type==="flow-collection"){let r=e.end[0];r.indent===t&&(r.source==="]"||r.source==="}")&&We(e)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Yn(t,e,n){let{uniqueKeys:r}=t.options;if(r===!1)return!1;let s=typeof r=="function"?r:(o,i)=>o===i||I(o)&&I(i)&&o.value===i.value;return e.some(o=>s(o.key,n))}var zo="All mapping items must start at the same column";function Jo({composeNode:t,composeEmptyNode:e},n,r,s,o){let i=o?.nodeClass??D,a=new i(n.schema);n.atRoot&&(n.atRoot=!1);let l=r.offset,c=null;for(let u of r.items){let{start:f,key:d,sep:h,value:p}=u,g=_e(f,{indicator:"explicit-key-ind",next:d??h?.[0],offset:l,onError:s,parentIndent:r.indent,startOnNewline:!0}),m=!g.found;if(m){if(d&&(d.type==="block-seq"?s(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==r.indent&&s(l,"BAD_INDENT",zo)),!g.anchor&&!g.tag&&!h){c=g.end,g.comment&&(a.comment?a.comment+=`
64
+ `+g.comment:a.comment=g.comment);continue}(g.newlineAfterProp||We(d))&&s(d??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else g.found?.indent!==r.indent&&s(l,"BAD_INDENT",zo);n.atKey=!0;let y=g.end,b=d?t(n,d,g,s):e(n,y,f,null,g,s);n.schema.compat&&Kt(r.indent,d,s),n.atKey=!1,Yn(n,a.items,b)&&s(y,"DUPLICATE_KEY","Map keys must be unique");let w=_e(h??[],{indicator:"map-value-ind",next:p,offset:b.range[2],onError:s,parentIndent:r.indent,startOnNewline:!d||d.type==="block-scalar"});if(l=w.end,w.found){m&&(p?.type==="block-map"&&!w.hasNewline&&s(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&g.start<w.found.offset-1024&&s(b.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let S=p?t(n,p,w,s):e(n,l,h,null,w,s);n.schema.compat&&Kt(r.indent,p,s),l=S.range[2];let C=new M(b,S);n.options.keepSourceTokens&&(C.srcToken=u),a.items.push(C)}else{m&&s(b.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),w.comment&&(b.comment?b.comment+=`
65
+ `+w.comment:b.comment=w.comment);let S=new M(b);n.options.keepSourceTokens&&(S.srcToken=u),a.items.push(S)}}return c&&c<l&&s(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[r.offset,l,c??l],a}function Yo({composeNode:t,composeEmptyNode:e},n,r,s,o){let i=o?.nodeClass??V,a=new i(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let l=r.offset,c=null;for(let{start:u,value:f}of r.items){let d=_e(u,{indicator:"seq-item-ind",next:f,offset:l,onError:s,parentIndent:r.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||f)f?.type==="block-seq"?s(d.end,"BAD_INDENT","All sequence items must start at the same column"):s(l,"MISSING_CHAR","Sequence item without - indicator");else{c=d.end,d.comment&&(a.comment=d.comment);continue}let h=f?t(n,f,d,s):e(n,d.end,u,null,d,s);n.schema.compat&&Kt(r.indent,f,s),l=h.range[2],a.items.push(h)}return a.range=[r.offset,l,c??l],a}function ve(t,e,n,r){let s="";if(t){let o=!1,i="";for(let a of t){let{source:l,type:c}=a;switch(c){case"space":o=!0;break;case"comment":{n&&!o&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=l.substring(1)||" ";s?s+=i+u:s=u,i="";break}case"newline":s&&(i+=l),o=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:s,offset:e}}var is="Block collections are not allowed within flow collections",as=t=>t&&(t.type==="block-map"||t.type==="block-seq");function Qo({composeNode:t,composeEmptyNode:e},n,r,s,o){let i=r.start.source==="{",a=i?"flow map":"flow sequence",l=o?.nodeClass??(i?D:V),c=new l(n.schema);c.flow=!0;let u=n.atRoot;u&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let f=r.offset+r.start.source.length;for(let m=0;m<r.items.length;++m){let y=r.items[m],{start:b,key:w,sep:S,value:C}=y,E=_e(b,{flow:a,indicator:"explicit-key-ind",next:w??S?.[0],offset:f,onError:s,parentIndent:r.indent,startOnNewline:!1});if(!E.found){if(!E.anchor&&!E.tag&&!S&&!C){m===0&&E.comma?s(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):m<r.items.length-1&&s(E.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),E.comment&&(c.comment?c.comment+=`
66
+ `+E.comment:c.comment=E.comment),f=E.end;continue}!i&&n.options.strict&&We(w)&&s(w,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(m===0)E.comma&&s(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(E.comma||s(E.start,"MISSING_CHAR",`Missing , between ${a} items`),E.comment){let x="";e:for(let _ of b)switch(_.type){case"comma":case"space":break;case"comment":x=_.source.substring(1);break e;default:break e}if(x){let _=c.items[c.items.length-1];L(_)&&(_=_.value??_.key),_.comment?_.comment+=`
67
+ `+x:_.comment=x,E.comment=E.comment.substring(x.length+1)}}if(!i&&!S&&!E.found){let x=C?t(n,C,E,s):e(n,E.end,S,null,E,s);c.items.push(x),f=x.range[2],as(C)&&s(x.range,"BLOCK_IN_FLOW",is)}else{n.atKey=!0;let x=E.end,_=w?t(n,w,E,s):e(n,x,b,null,E,s);as(w)&&s(_.range,"BLOCK_IN_FLOW",is),n.atKey=!1;let $=_e(S??[],{flow:a,indicator:"map-value-ind",next:C,offset:_.range[2],onError:s,parentIndent:r.indent,startOnNewline:!1});if($.found){if(!i&&!E.found&&n.options.strict){if(S)for(let R of S){if(R===$.found)break;if(R.type==="newline"){s(R,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}E.start<$.found.offset-1024&&s($.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else C&&("source"in C&&C.source?.[0]===":"?s(C,"MISSING_CHAR",`Missing space after : in ${a}`):s($.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let re=C?t(n,C,$,s):$.found?e(n,$.end,S,null,$,s):null;re?as(C)&&s(re.range,"BLOCK_IN_FLOW",is):$.comment&&(_.comment?_.comment+=`
68
+ `+$.comment:_.comment=$.comment);let ye=new M(_,re);if(n.options.keepSourceTokens&&(ye.srcToken=y),i){let R=c;Yn(n,R.items,_)&&s(x,"DUPLICATE_KEY","Map keys must be unique"),R.items.push(ye)}else{let R=new D(n.schema);R.flow=!0,R.items.push(ye);let Bt=(re??_).range;R.range=[_.range[0],Bt[1],Bt[2]],c.items.push(R)}f=re?re.range[2]:$.end}}let d=i?"}":"]",[h,...p]=r.end,g=f;if(h?.source===d)g=h.offset+h.source.length;else{let m=a[0].toUpperCase()+a.substring(1),y=u?`${m} must end with a ${d}`:`${m} in block collection must be sufficiently indented and end with a ${d}`;s(f,u?"MISSING_CHAR":"BAD_INDENT",y),h&&h.source.length!==1&&p.unshift(h)}if(p.length>0){let m=ve(p,g,n.options.strict,s);m.comment&&(c.comment?c.comment+=`
69
+ `+m.comment:c.comment=m.comment),c.range=[r.offset,g,m.offset]}else c.range=[r.offset,g,g];return c}function ls(t,e,n,r,s,o){let i=n.type==="block-map"?Jo(t,e,n,r,o):n.type==="block-seq"?Yo(t,e,n,r,o):Qo(t,e,n,r,o),a=i.constructor;return s==="!"||s===a.tagName?(i.tag=a.tagName,i):(s&&(i.tag=s),i)}function Xo(t,e,n,r,s){let o=r.tag,i=o?e.directives.tagName(o.source,d=>s(o,"TAG_RESOLVE_FAILED",d)):null;if(n.type==="block-seq"){let{anchor:d,newlineAfterProp:h}=r,p=d&&o?d.offset>o.offset?d:o:d??o;p&&(!h||h.offset<p.offset)&&s(p,"MISSING_CHAR","Missing newline after block sequence props")}let a=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!o||!i||i==="!"||i===D.tagName&&a==="map"||i===V.tagName&&a==="seq")return ls(t,e,n,s,i);let l=e.schema.tags.find(d=>d.tag===i&&d.collection===a);if(!l){let d=e.schema.knownTags[i];if(d?.collection===a)e.schema.tags.push(Object.assign({},d,{default:!1})),l=d;else return d?s(o,"BAD_COLLECTION_TYPE",`${d.tag} used for ${a} collection, but expects ${d.collection??"scalar"}`,!0):s(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,!0),ls(t,e,n,s,i)}let c=ls(t,e,n,s,i,l),u=l.resolve?.(c,d=>s(o,"TAG_RESOLVE_FAILED",d),e.options)??c,f=T(u)?u:new v(u);return f.range=c.range,f.tag=i,l?.format&&(f.format=l.format),f}function cs(t,e,n){let r=e.offset,s=ec(e,t.options.strict,n);if(!s)return{value:"",type:null,comment:"",range:[r,r,r]};let o=s.mode===">"?v.BLOCK_FOLDED:v.BLOCK_LITERAL,i=e.source?tc(e.source):[],a=i.length;for(let g=i.length-1;g>=0;--g){let m=i[g][1];if(m===""||m==="\r")a=g;else break}if(a===0){let g=s.chomp==="+"&&i.length>0?`
70
+ `.repeat(Math.max(1,i.length-1)):"",m=r+s.length;return e.source&&(m+=e.source.length),{value:g,type:o,comment:s.comment,range:[r,m,m]}}let l=e.indent+s.indent,c=e.offset+s.length,u=0;for(let g=0;g<a;++g){let[m,y]=i[g];if(y===""||y==="\r")s.indent===0&&m.length>l&&(l=m.length);else{m.length<l&&n(c+m.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(l=m.length),u=g,l===0&&!t.atRoot&&n(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=m.length+y.length+1}for(let g=i.length-1;g>=a;--g)i[g][0].length>l&&(a=g+1);let f="",d="",h=!1;for(let g=0;g<u;++g)f+=i[g][0].slice(l)+`
71
+ `;for(let g=u;g<a;++g){let[m,y]=i[g];c+=m.length+y.length+1;let b=y[y.length-1]==="\r";if(b&&(y=y.slice(0,-1)),y&&m.length<l){let S=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;n(c-y.length-(b?2:1),"BAD_INDENT",S),m=""}o===v.BLOCK_LITERAL?(f+=d+m.slice(l)+y,d=`
72
72
  `):m.length>l||y[0]===" "?(d===" "?d=`
73
73
  `:!h&&d===`
74
74
  `&&(d=`
@@ -77,62 +77,62 @@ ${c}
77
77
  `,h=!0):y===""?d===`
78
78
  `?f+=`
79
79
  `:d=`
80
- `:(f+=d+y,d=" ",h=!1)}switch(s.chomp){case"-":break;case"+":for(let g=a;g<o.length;++g)f+=`
81
- `+o[g][0].slice(l);f[f.length-1]!==`
80
+ `:(f+=d+y,d=" ",h=!1)}switch(s.chomp){case"-":break;case"+":for(let g=a;g<i.length;++g)f+=`
81
+ `+i[g][0].slice(l);f[f.length-1]!==`
82
82
  `&&(f+=`
83
83
  `);break;default:f+=`
84
- `}let p=r+s.length+e.source.length;return{value:f,type:i,comment:s.comment,range:[r,p,p]}}function Wl({offset:t,props:e},n,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:s}=e[0],i=s[0],o=0,a="",l=-1;for(let d=1;d<s.length;++d){let h=s[d];if(!a&&(h==="-"||h==="+"))a=h;else{let p=Number(h);!o&&p?o=p:l===-1&&(l=t+d)}}l!==-1&&r(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let c=!1,u="",f=s.length;for(let d=1;d<e.length;++d){let h=e[d];switch(h.type){case"space":c=!0;case"newline":f+=h.source.length;break;case"comment":n&&!c&&r(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=h.source.length,u=h.source.substring(1);break;case"error":r(h,"UNEXPECTED_TOKEN",h.message),f+=h.source.length;break;default:{let p=`Unexpected token in block scalar header: ${h.type}`;r(h,"UNEXPECTED_TOKEN",p);let g=h.source;g&&typeof g=="string"&&(f+=g.length)}}}return{mode:i,indent:o,chomp:a,comment:u,length:f}}function Kl(t){let e=t.split(/\n( *)/),n=e[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let o=1;o<e.length;o+=2)i.push([e[o],e[o+1]]);return i}function ss(t,e,n){let{offset:r,type:s,source:i,end:o}=t,a,l,c=(d,h,p)=>n(r+d,h,p);switch(s){case"scalar":a=v.PLAIN,l=Vl(i,c);break;case"single-quoted-scalar":a=v.QUOTE_SINGLE,l=zl(i,c);break;case"double-quoted-scalar":a=v.QUOTE_DOUBLE,l=Jl(i,c);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[r,r+i.length,r+i.length]}}let u=r+i.length,f=ve(o,u,e,n);return{value:l,type:a,comment:f.comment,range:[r,u,f.offset]}}function Vl(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),Wi(t)}function zl(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),Wi(t.slice(1,-1)).replace(/''/g,"'")}function Wi(t){let e=/(.*?)\r?\n/sy,n=e.exec(t);if(!n)return t;let r,s;try{r=new RegExp("(?<![ ])[ ]+$"),s=new RegExp("^[ ]+|(?<![ ])[ ]+$","g")}catch{r=/[ \t]+$/,s=/^[ \t]+|[ \t]+$/g}let i=n[1].replace(r,""),o=" ",a=e.lastIndex;for(;n=e.exec(t);){let c=n[1].replace(s,"");c===""?o===`
85
- `?i+=o:o=`
86
- `:(i+=o+c,o=" "),a=e.lastIndex}let l=/[ \t]*(.*)/sy;return l.lastIndex=a,n=l.exec(t),i+o+(n?.[1]??"")}function Jl(t,e){let n="";for(let r=1;r<t.length-1;++r){let s=t[r];if(!(s==="\r"&&t[r+1]===`
84
+ `}let p=r+s.length+e.source.length;return{value:f,type:o,comment:s.comment,range:[r,p,p]}}function ec({offset:t,props:e},n,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:s}=e[0],o=s[0],i=0,a="",l=-1;for(let d=1;d<s.length;++d){let h=s[d];if(!a&&(h==="-"||h==="+"))a=h;else{let p=Number(h);!i&&p?i=p:l===-1&&(l=t+d)}}l!==-1&&r(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let c=!1,u="",f=s.length;for(let d=1;d<e.length;++d){let h=e[d];switch(h.type){case"space":c=!0;case"newline":f+=h.source.length;break;case"comment":n&&!c&&r(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=h.source.length,u=h.source.substring(1);break;case"error":r(h,"UNEXPECTED_TOKEN",h.message),f+=h.source.length;break;default:{let p=`Unexpected token in block scalar header: ${h.type}`;r(h,"UNEXPECTED_TOKEN",p);let g=h.source;g&&typeof g=="string"&&(f+=g.length)}}}return{mode:o,indent:i,chomp:a,comment:u,length:f}}function tc(t){let e=t.split(/\n( *)/),n=e[0],r=n.match(/^( *)/),o=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let i=1;i<e.length;i+=2)o.push([e[i],e[i+1]]);return o}function us(t,e,n){let{offset:r,type:s,source:o,end:i}=t,a,l,c=(d,h,p)=>n(r+d,h,p);switch(s){case"scalar":a=v.PLAIN,l=nc(o,c);break;case"single-quoted-scalar":a=v.QUOTE_SINGLE,l=rc(o,c);break;case"double-quoted-scalar":a=v.QUOTE_DOUBLE,l=sc(o,c);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[r,r+o.length,r+o.length]}}let u=r+o.length,f=ve(i,u,e,n);return{value:l,type:a,comment:f.comment,range:[r,u,f.offset]}}function nc(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),Zo(t)}function rc(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),Zo(t.slice(1,-1)).replace(/''/g,"'")}function Zo(t){let e=/(.*?)\r?\n/sy,n=e.exec(t);if(!n)return t;let r,s;try{r=new RegExp("(?<![ ])[ ]+$"),s=new RegExp("^[ ]+|(?<![ ])[ ]+$","g")}catch{r=/[ \t]+$/,s=/^[ \t]+|[ \t]+$/g}let o=n[1].replace(r,""),i=" ",a=e.lastIndex;for(;n=e.exec(t);){let c=n[1].replace(s,"");c===""?i===`
85
+ `?o+=i:i=`
86
+ `:(o+=i+c,i=" "),a=e.lastIndex}let l=/[ \t]*(.*)/sy;return l.lastIndex=a,n=l.exec(t),o+i+(n?.[1]??"")}function sc(t,e){let n="";for(let r=1;r<t.length-1;++r){let s=t[r];if(!(s==="\r"&&t[r+1]===`
87
87
  `))if(s===`
88
- `){let{fold:i,offset:o}=Yl(t,r);n+=i,r=o}else if(s==="\\"){let i=t[++r],o=Ql[i];if(o)n+=o;else if(i===`
89
- `)for(i=t[r+1];i===" "||i===" ";)i=t[++r+1];else if(i==="\r"&&t[r+1]===`
90
- `)for(i=t[++r+1];i===" "||i===" ";)i=t[++r+1];else if(i==="x"||i==="u"||i==="U"){let a=i==="x"?2:i==="u"?4:8;n+=Xl(t,r+1,a,e),r+=a}else{let a=t.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),n+=a}}else if(s===" "||s===" "){let i=r,o=t[r+1];for(;o===" "||o===" ";)o=t[++r+1];o!==`
91
- `&&!(o==="\r"&&t[r+2]===`
92
- `)&&(n+=r>i?t.slice(i,r+1):s)}else n+=s}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function Yl(t,e){let n="",r=t[e+1];for(;(r===" "||r===" "||r===`
88
+ `){let{fold:o,offset:i}=oc(t,r);n+=o,r=i}else if(s==="\\"){let o=t[++r],i=ic[o];if(i)n+=i;else if(o===`
89
+ `)for(o=t[r+1];o===" "||o===" ";)o=t[++r+1];else if(o==="\r"&&t[r+1]===`
90
+ `)for(o=t[++r+1];o===" "||o===" ";)o=t[++r+1];else if(o==="x"||o==="u"||o==="U"){let a=o==="x"?2:o==="u"?4:8;n+=ac(t,r+1,a,e),r+=a}else{let a=t.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),n+=a}}else if(s===" "||s===" "){let o=r,i=t[r+1];for(;i===" "||i===" ";)i=t[++r+1];i!==`
91
+ `&&!(i==="\r"&&t[r+2]===`
92
+ `)&&(n+=r>o?t.slice(o,r+1):s)}else n+=s}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function oc(t,e){let n="",r=t[e+1];for(;(r===" "||r===" "||r===`
93
93
  `||r==="\r")&&!(r==="\r"&&t[e+2]!==`
94
94
  `);)r===`
95
95
  `&&(n+=`
96
- `),e+=1,r=t[e+1];return n||(n=" "),{fold:n,offset:e}}var Ql={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
97
- `,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Xl(t,e,n,r){let s=t.substr(e,n),o=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;try{return String.fromCodePoint(o)}catch{let a=t.substr(e-2,n+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}function is(t,e,n,r){let{value:s,type:i,comment:o,range:a}=e.type==="block-scalar"?rs(t,e,r):ss(e,t.options.strict,r),l=n?t.directives.tagName(n.source,f=>r(n,"TAG_RESOLVE_FAILED",f)):null,c;t.options.stringKeys&&t.atKey?c=t.schema[ee]:l?c=Zl(t.schema,s,l,n,r):e.type==="scalar"?c=ec(t,s,e,r):c=t.schema[ee];let u;try{let f=c.resolve(s,d=>r(n??e,"TAG_RESOLVE_FAILED",d),t.options);u=I(f)?f:new v(f)}catch(f){let d=f instanceof Error?f.message:String(f);r(n??e,"TAG_RESOLVE_FAILED",d),u=new v(s)}return u.range=a,u.source=s,i&&(u.type=i),l&&(u.tag=l),c.format&&(u.format=c.format),o&&(u.comment=o),u}function Zl(t,e,n,r,s){if(n==="!")return t[ee];let i=[];for(let a of t.tags)if(!a.collection&&a.tag===n)if(a.default&&a.test)i.push(a);else return a;for(let a of i)if(a.test?.test(e))return a;let o=t.knownTags[n];return o&&!o.collection?(t.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(s(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[ee])}function ec({atKey:t,directives:e,schema:n},r,s,i){let o=n.tags.find(a=>(a.default===!0||t&&a.default==="key")&&a.test?.test(r))||n[ee];if(n.compat){let a=n.compat.find(l=>l.default&&l.test?.test(r))??n[ee];if(o.tag!==a.tag){let l=e.tagString(o.tag),c=e.tagString(a.tag),u=`Value may be parsed as either ${l} or ${c}`;i(s,"TAG_RESOLVE_FAILED",u,!0)}}return o}function Ki(t,e,n){if(e){n??(n=e.length);for(let r=n-1;r>=0;--r){let s=e[r];switch(s.type){case"space":case"comment":case"newline":t-=s.source.length;continue}for(s=e[++r];s?.type==="space";)t+=s.source.length,s=e[++r];break}}return t}var tc={composeNode:os,composeEmptyNode:Vn};function os(t,e,n,r){let s=t.atKey,{spaceBefore:i,comment:o,anchor:a,tag:l}=n,c,u=!0;switch(e.type){case"alias":c=nc(t,e,r),(a||l)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=is(t,e,l,r),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=Hi(tc,t,e,n,r),a&&(c.anchor=a.source.substring(1))}catch(f){let d=f instanceof Error?f.message:String(f);r(e,"RESOURCE_EXHAUSTION",d)}break;default:{let f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",f),u=!1}}return c??(c=Vn(t,e.offset,void 0,null,n,r)),a&&c.anchor===""&&r(a,"BAD_ALIAS","Anchor cannot be an empty string"),s&&t.options.stringKeys&&(!I(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&r(l??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),t.options.keepSourceTokens&&u&&(c.srcToken=e),c}function Vn(t,e,n,r,{spaceBefore:s,comment:i,anchor:o,tag:a,end:l},c){let u={type:"scalar",offset:Ki(e,n,r),indent:-1,source:""},f=is(t,u,a,c);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(f.spaceBefore=!0),i&&(f.comment=i,f.range[2]=l),f}function nc({options:t},{offset:e,source:n,end:r},s){let i=new xe(n.substring(1));i.source===""&&s(e,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&s(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+n.length,a=ve(r,o,t.strict,s);return i.range=[e,o,a.offset],a.comment&&(i.comment=a.comment),i}function Vi(t,e,{offset:n,start:r,value:s,end:i},o){let a=Object.assign({_directives:e},t),l=new He(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=_e(r,{indicator:"doc-start",next:s??i?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});u.found&&(l.directives.docStart=!0,s&&(s.type==="block-map"||s.type==="block-seq")&&!u.hasNewline&&o(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=s?os(c,s,u,o):Vn(c,u.end,r,null,u,o);let f=l.contents.range[2],d=ve(i,f,!1,o);return d.comment&&(l.comment=d.comment),l.range=[n,f,d.offset],l}function Ht(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function zi(t){let e="",n=!1,r=!1;for(let s=0;s<t.length;++s){let i=t[s];switch(i[0]){case"#":e+=(e===""?"":r?`
96
+ `),e+=1,r=t[e+1];return n||(n=" "),{fold:n,offset:e}}var ic={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
97
+ `,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function ac(t,e,n,r){let s=t.substr(e,n),i=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;try{return String.fromCodePoint(i)}catch{let a=t.substr(e-2,n+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}function fs(t,e,n,r){let{value:s,type:o,comment:i,range:a}=e.type==="block-scalar"?cs(t,e,r):us(e,t.options.strict,r),l=n?t.directives.tagName(n.source,f=>r(n,"TAG_RESOLVE_FAILED",f)):null,c;t.options.stringKeys&&t.atKey?c=t.schema[ee]:l?c=lc(t.schema,s,l,n,r):e.type==="scalar"?c=cc(t,s,e,r):c=t.schema[ee];let u;try{let f=c.resolve(s,d=>r(n??e,"TAG_RESOLVE_FAILED",d),t.options);u=I(f)?f:new v(f)}catch(f){let d=f instanceof Error?f.message:String(f);r(n??e,"TAG_RESOLVE_FAILED",d),u=new v(s)}return u.range=a,u.source=s,o&&(u.type=o),l&&(u.tag=l),c.format&&(u.format=c.format),i&&(u.comment=i),u}function lc(t,e,n,r,s){if(n==="!")return t[ee];let o=[];for(let a of t.tags)if(!a.collection&&a.tag===n)if(a.default&&a.test)o.push(a);else return a;for(let a of o)if(a.test?.test(e))return a;let i=t.knownTags[n];return i&&!i.collection?(t.tags.push(Object.assign({},i,{default:!1,test:void 0})),i):(s(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[ee])}function cc({atKey:t,directives:e,schema:n},r,s,o){let i=n.tags.find(a=>(a.default===!0||t&&a.default==="key")&&a.test?.test(r))||n[ee];if(n.compat){let a=n.compat.find(l=>l.default&&l.test?.test(r))??n[ee];if(i.tag!==a.tag){let l=e.tagString(i.tag),c=e.tagString(a.tag),u=`Value may be parsed as either ${l} or ${c}`;o(s,"TAG_RESOLVE_FAILED",u,!0)}}return i}function ei(t,e,n){if(e){n??(n=e.length);for(let r=n-1;r>=0;--r){let s=e[r];switch(s.type){case"space":case"comment":case"newline":t-=s.source.length;continue}for(s=e[++r];s?.type==="space";)t+=s.source.length,s=e[++r];break}}return t}var uc={composeNode:ds,composeEmptyNode:Qn};function ds(t,e,n,r){let s=t.atKey,{spaceBefore:o,comment:i,anchor:a,tag:l}=n,c,u=!0;switch(e.type){case"alias":c=fc(t,e,r),(a||l)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=fs(t,e,l,r),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=Xo(uc,t,e,n,r),a&&(c.anchor=a.source.substring(1))}catch(f){let d=f instanceof Error?f.message:String(f);r(e,"RESOURCE_EXHAUSTION",d)}break;default:{let f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",f),u=!1}}return c??(c=Qn(t,e.offset,void 0,null,n,r)),a&&c.anchor===""&&r(a,"BAD_ALIAS","Anchor cannot be an empty string"),s&&t.options.stringKeys&&(!I(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&r(l??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(c.spaceBefore=!0),i&&(e.type==="scalar"&&e.source===""?c.comment=i:c.commentBefore=i),t.options.keepSourceTokens&&u&&(c.srcToken=e),c}function Qn(t,e,n,r,{spaceBefore:s,comment:o,anchor:i,tag:a,end:l},c){let u={type:"scalar",offset:ei(e,n,r),indent:-1,source:""},f=fs(t,u,a,c);return i&&(f.anchor=i.source.substring(1),f.anchor===""&&c(i,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(f.spaceBefore=!0),o&&(f.comment=o,f.range[2]=l),f}function fc({options:t},{offset:e,source:n,end:r},s){let o=new xe(n.substring(1));o.source===""&&s(e,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&s(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let i=e+n.length,a=ve(r,i,t.strict,s);return o.range=[e,i,a.offset],a.comment&&(o.comment=a.comment),o}function ti(t,e,{offset:n,start:r,value:s,end:o},i){let a=Object.assign({_directives:e},t),l=new He(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=_e(r,{indicator:"doc-start",next:s??o?.[0],offset:n,onError:i,parentIndent:0,startOnNewline:!0});u.found&&(l.directives.docStart=!0,s&&(s.type==="block-map"||s.type==="block-seq")&&!u.hasNewline&&i(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=s?ds(c,s,u,i):Qn(c,u.end,r,null,u,i);let f=l.contents.range[2],d=ve(o,f,!1,i);return d.comment&&(l.comment=d.comment),l.range=[n,f,d.offset],l}function Vt(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function ni(t){let e="",n=!1,r=!1;for(let s=0;s<t.length;++s){let o=t[s];switch(o[0]){case"#":e+=(e===""?"":r?`
98
98
 
99
99
  `:`
100
- `)+(i.substring(1)||" "),n=!0,r=!1;break;case"%":t[s+1]?.[0]!=="#"&&(s+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:e,afterEmptyLine:r}}var Wt=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,s,i)=>{let o=Ht(n);i?this.warnings.push(new Ut(o,r,s)):this.errors.push(new Ce(o,r,s))},this.directives=new ke({version:e.version||"1.2"}),this.options=e}decorate(e,n){let{comment:r,afterEmptyLine:s}=zi(this.prelude);if(r){let i=e.contents;if(n)e.comment=e.comment?`${e.comment}
101
- ${r}`:r;else if(s||e.directives.docStart||!i)e.commentBefore=r;else if(B(i)&&!i.flow&&i.items.length>0){let o=i.items[0];L(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${r}
102
- ${a}`:r}else{let o=i.commentBefore;i.commentBefore=o?`${r}
103
- ${o}`:r}}if(n){for(let i=0;i<this.errors.length;++i)e.errors.push(this.errors[i]);for(let i=0;i<this.warnings.length;++i)e.warnings.push(this.warnings[i])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:zi(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,r=-1){for(let s of e)yield*this.next(s);yield*this.end(n,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(n,r,s)=>{let i=Ht(e);i[0]+=n,this.onError(i,"BAD_DIRECTIVE",r,s)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let n=Vi(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new Ce(Ht(e),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){let r="Unexpected doc-end without preceding document";this.errors.push(new Ce(Ht(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;let n=ve(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){let r=this.doc.comment;this.doc.comment=r?`${r}
104
- ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Ce(Ht(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let r=Object.assign({_directives:this.directives},this.options),s=new He(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),s.range=[0,n,n],this.decorate(s,!1),yield s}}};var as=Symbol("break visit"),rc=Symbol("skip children"),Ji=Symbol("remove item");function et(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),Yi(Object.freeze([]),t,e)}et.BREAK=as;et.SKIP=rc;et.REMOVE=Ji;et.itemAtPath=(t,e)=>{let n=t;for(let[r,s]of e){let i=n?.[r];if(i&&"items"in i)n=i.items[s];else return}return n};et.parentCollection=(t,e)=>{let n=et.itemAtPath(t,e.slice(0,-1)),r=e[e.length-1][0],s=n?.[r];if(s&&"items"in s)return s;throw new Error("Parent collection not found")};function Yi(t,e,n){let r=n(e,t);if(typeof r=="symbol")return r;for(let s of["key","value"]){let i=e[s];if(i&&"items"in i){for(let o=0;o<i.items.length;++o){let a=Yi(Object.freeze(t.concat([[s,o]])),i.items[o],n);if(typeof a=="number")o=a-1;else{if(a===as)return as;a===Ji&&(i.items.splice(o,1),o-=1)}}typeof r=="function"&&s==="key"&&(r=r(e,t))}}return typeof r=="function"?r(e,t):r}var ls="\uFEFF",cs="",us="",zn="";function Qi(t){switch(t){case ls:return"byte-order-mark";case cs:return"doc-mode";case us:return"flow-error-end";case zn:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
100
+ `)+(o.substring(1)||" "),n=!0,r=!1;break;case"%":t[s+1]?.[0]!=="#"&&(s+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:e,afterEmptyLine:r}}var zt=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,s,o)=>{let i=Vt(n);o?this.warnings.push(new Wt(i,r,s)):this.errors.push(new Ce(i,r,s))},this.directives=new ke({version:e.version||"1.2"}),this.options=e}decorate(e,n){let{comment:r,afterEmptyLine:s}=ni(this.prelude);if(r){let o=e.contents;if(n)e.comment=e.comment?`${e.comment}
101
+ ${r}`:r;else if(s||e.directives.docStart||!o)e.commentBefore=r;else if(B(o)&&!o.flow&&o.items.length>0){let i=o.items[0];L(i)&&(i=i.key);let a=i.commentBefore;i.commentBefore=a?`${r}
102
+ ${a}`:r}else{let i=o.commentBefore;o.commentBefore=i?`${r}
103
+ ${i}`:r}}if(n){for(let o=0;o<this.errors.length;++o)e.errors.push(this.errors[o]);for(let o=0;o<this.warnings.length;++o)e.warnings.push(this.warnings[o])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:ni(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,r=-1){for(let s of e)yield*this.next(s);yield*this.end(n,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(n,r,s)=>{let o=Vt(e);o[0]+=n,this.onError(o,"BAD_DIRECTIVE",r,s)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let n=ti(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new Ce(Vt(e),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){let r="Unexpected doc-end without preceding document";this.errors.push(new Ce(Vt(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;let n=ve(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){let r=this.doc.comment;this.doc.comment=r?`${r}
104
+ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Ce(Vt(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let r=Object.assign({_directives:this.directives},this.options),s=new He(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),s.range=[0,n,n],this.decorate(s,!1),yield s}}};var hs=Symbol("break visit"),dc=Symbol("skip children"),ri=Symbol("remove item");function et(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),si(Object.freeze([]),t,e)}et.BREAK=hs;et.SKIP=dc;et.REMOVE=ri;et.itemAtPath=(t,e)=>{let n=t;for(let[r,s]of e){let o=n?.[r];if(o&&"items"in o)n=o.items[s];else return}return n};et.parentCollection=(t,e)=>{let n=et.itemAtPath(t,e.slice(0,-1)),r=e[e.length-1][0],s=n?.[r];if(s&&"items"in s)return s;throw new Error("Parent collection not found")};function si(t,e,n){let r=n(e,t);if(typeof r=="symbol")return r;for(let s of["key","value"]){let o=e[s];if(o&&"items"in o){for(let i=0;i<o.items.length;++i){let a=si(Object.freeze(t.concat([[s,i]])),o.items[i],n);if(typeof a=="number")i=a-1;else{if(a===hs)return hs;a===ri&&(o.items.splice(i,1),i-=1)}}typeof r=="function"&&s==="key"&&(r=r(e,t))}}return typeof r=="function"?r(e,t):r}var ps="\uFEFF",gs="",ms="",Xn="";function oi(t){switch(t){case ps:return"byte-order-mark";case gs:return"doc-mode";case ms:return"flow-error-end";case Xn:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
105
105
  `:case`\r
106
106
  `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function ge(t){switch(t){case void 0:case" ":case`
107
- `:case"\r":case" ":return!0;default:return!1}}var Xi=new Set("0123456789ABCDEFabcdef"),ic=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Jn=new Set(",[]{}"),oc=new Set(` ,[]{}
108
- \r `),fs=t=>!t||oc.has(t),Kt=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,n=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
107
+ `:case"\r":case" ":return!0;default:return!1}}var ii=new Set("0123456789ABCDEFabcdef"),pc=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Zn=new Set(",[]{}"),gc=new Set(` ,[]{}
108
+ \r `),ys=t=>!t||gc.has(t),Jt=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,n=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
109
109
  `?!0:n==="\r"?this.buffer[e+1]===`
110
110
  `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+e];if(n==="\r"){let s=this.buffer[r+e+1];if(s===`
111
111
  `||!s&&!this.atEnd)return e+r+1}return n===`
112
112
  `||r>=this.indentNext||!n&&!this.atEnd?e+r:-1}if(n==="-"||n==="."){let r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&ge(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
113
- `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===ls&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let n=e.length,r=e.indexOf("#");for(;r!==-1;){let i=e[r-1];if(i===" "||i===" "){n=r-1;break}else r=e.indexOf("#",r+1)}for(;;){let i=e[n-1];if(i===" "||i===" ")n-=1;else break}let s=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-s),this.pushNewline(),"stream"}if(this.atLineEnd()){let n=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-n),yield*this.pushNewline(),"stream"}return yield cs,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let n=this.peek(3);if((n==="---"||n==="...")&&ge(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!ge(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&ge(n)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(e[n]){case"#":yield*this.pushCount(e.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(fs),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,n,r=-1;do e=yield*this.pushNewline(),e>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(e+n>0);let s=this.getLine();if(s===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&s[0]!=="#"||r===0&&(s.startsWith("---")||s.startsWith("..."))&&ge(s[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(s[0]==="]"||s[0]==="}")))return this.flowLevel=0,yield us,yield*this.parseLineStart();let i=0;for(;s[i]===",";)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),s[i]){case void 0:return"flow";case"#":return yield*this.pushCount(s.length-i),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(fs),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||ge(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),n=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let i=0;for(;this.buffer[n-1-i]==="\\";)i+=1;if(i%2===0)break;n=this.buffer.indexOf('"',n+1)}let r=this.buffer.substring(0,n),s=r.indexOf(`
114
- `,this.pos);if(s!==-1){for(;s!==-1;){let i=this.continueScalar(s+1);if(i===-1)break;s=r.indexOf(`
115
- `,i)}s!==-1&&(n=s-(r[s-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let n=this.buffer[++e];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>ge(n)||n==="#")}*parseBlockScalar(){let e=this.pos-1,n=0,r;e:for(let i=this.pos;r=this.buffer[i];++i)switch(r){case" ":n+=1;break;case`
116
- `:e=i,n=0;break;case"\r":{let o=this.buffer[i+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
117
- `)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let i=this.continueScalar(e+1);if(i===-1)break;e=this.buffer.indexOf(`
118
- `,i)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let s=e+1;for(r=this.buffer[s];r===" ";)r=this.buffer[++s];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
119
- `;)r=this.buffer[++s];e=s-1}else if(!this.blockScalarKeep)do{let i=e-1,o=this.buffer[i];o==="\r"&&(o=this.buffer[--i]);let a=i;for(;o===" ";)o=this.buffer[--i];if(o===`
120
- `&&i>=this.pos&&i+1+n>a)e=i;else break}while(!0);return yield zn,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,n=this.pos-1,r=this.pos-1,s;for(;s=this.buffer[++r];)if(s===":"){let i=this.buffer[r+1];if(ge(i)||e&&Jn.has(i))break;n=r}else if(ge(s)){let i=this.buffer[r+1];if(s==="\r"&&(i===`
113
+ `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===ps&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let n=e.length,r=e.indexOf("#");for(;r!==-1;){let o=e[r-1];if(o===" "||o===" "){n=r-1;break}else r=e.indexOf("#",r+1)}for(;;){let o=e[n-1];if(o===" "||o===" ")n-=1;else break}let s=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-s),this.pushNewline(),"stream"}if(this.atLineEnd()){let n=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-n),yield*this.pushNewline(),"stream"}return yield gs,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let n=this.peek(3);if((n==="---"||n==="...")&&ge(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!ge(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&ge(n)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(e[n]){case"#":yield*this.pushCount(e.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(ys),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,n,r=-1;do e=yield*this.pushNewline(),e>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(e+n>0);let s=this.getLine();if(s===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&s[0]!=="#"||r===0&&(s.startsWith("---")||s.startsWith("..."))&&ge(s[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(s[0]==="]"||s[0]==="}")))return this.flowLevel=0,yield ms,yield*this.parseLineStart();let o=0;for(;s[o]===",";)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),s[o]){case void 0:return"flow";case"#":return yield*this.pushCount(s.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(ys),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let i=this.charAt(1);if(this.flowKey||ge(i)||i===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),n=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let o=0;for(;this.buffer[n-1-o]==="\\";)o+=1;if(o%2===0)break;n=this.buffer.indexOf('"',n+1)}let r=this.buffer.substring(0,n),s=r.indexOf(`
114
+ `,this.pos);if(s!==-1){for(;s!==-1;){let o=this.continueScalar(s+1);if(o===-1)break;s=r.indexOf(`
115
+ `,o)}s!==-1&&(n=s-(r[s-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let n=this.buffer[++e];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>ge(n)||n==="#")}*parseBlockScalar(){let e=this.pos-1,n=0,r;e:for(let o=this.pos;r=this.buffer[o];++o)switch(r){case" ":n+=1;break;case`
116
+ `:e=o,n=0;break;case"\r":{let i=this.buffer[o+1];if(!i&&!this.atEnd)return this.setNext("block-scalar");if(i===`
117
+ `)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let o=this.continueScalar(e+1);if(o===-1)break;e=this.buffer.indexOf(`
118
+ `,o)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let s=e+1;for(r=this.buffer[s];r===" ";)r=this.buffer[++s];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
119
+ `;)r=this.buffer[++s];e=s-1}else if(!this.blockScalarKeep)do{let o=e-1,i=this.buffer[o];i==="\r"&&(i=this.buffer[--o]);let a=o;for(;i===" ";)i=this.buffer[--o];if(i===`
120
+ `&&o>=this.pos&&o+1+n>a)e=o;else break}while(!0);return yield Xn,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,n=this.pos-1,r=this.pos-1,s;for(;s=this.buffer[++r];)if(s===":"){let o=this.buffer[r+1];if(ge(o)||e&&Zn.has(o))break;n=r}else if(ge(s)){let o=this.buffer[r+1];if(s==="\r"&&(o===`
121
121
  `?(r+=1,s=`
122
- `,i=this.buffer[r+1]):n=r),i==="#"||e&&Jn.has(i))break;if(s===`
123
- `){let o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&Jn.has(s))break;n=r}return!s&&!this.atEnd?this.setNext("plain-scalar"):(yield zn,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){let r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(fs),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let n=this.flowLevel>0,r=this.charAt(1);if(ge(r)||n&&Jn.has(r)){n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,n=this.buffer[e];for(;!ge(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(ic.has(n))n=this.buffer[++e];else if(n==="%"&&Xi.has(this.buffer[e+1])&&Xi.has(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
122
+ `,o=this.buffer[r+1]):n=r),o==="#"||e&&Zn.has(o))break;if(s===`
123
+ `){let i=this.continueScalar(r+1);if(i===-1)break;r=Math.max(r,i-2)}}else{if(e&&Zn.has(s))break;n=r}return!s&&!this.atEnd?this.setNext("plain-scalar"):(yield Xn,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){let r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(ys),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let n=this.flowLevel>0,r=this.charAt(1);if(ge(r)||n&&Zn.has(r)){n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,n=this.buffer[e];for(;!ge(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(pc.has(n))n=this.buffer[++e];else if(n==="%"&&ii.has(this.buffer[e+1])&&ii.has(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
124
124
  `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
125
- `?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||e&&r===" ");let s=n-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=n),s}*pushUntil(e){let n=this.pos,r=this.buffer[n];for(;!e(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}};var Vt=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,r=this.lineStarts.length;for(;n<r;){let i=n+r>>1;this.lineStarts[i]<e?n=i+1:r=i}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0)return{line:0,col:e};let s=this.lineStarts[n-1];return{line:n,col:e-s+1}}}};function Ke(t,e){for(let n=0;n<t.length;++n)if(t[n].type===e)return!0;return!1}function Zi(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function to(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Yn(t){switch(t.type){case"document":return t.start;case"block-map":{let e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function St(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function Qn(t,e){if(e.length<1e5)Array.prototype.push.apply(t,e);else for(let n=0;n<e.length;++n)t.push(e[n])}function eo(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!Ke(e.start,"explicit-key-ind")&&!Ke(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,to(e.value)?e.value.end?Qn(e.value.end,e.sep):e.value.end=e.sep:Qn(e.start,e.sep),delete e.sep)}var zt=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Kt,this.onNewLine=e}*parse(e,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let r of this.lexer.lex(e,n))yield*this.next(r);n||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let n=Qi(e);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let n=e??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{let r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&eo(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{let s=r.items[r.items.length-1];if(s.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(s.sep)s.value=n;else{Object.assign(s,{key:n,sep:[]}),this.onKeyLine=!s.explicitKey;return}break}case"block-seq":{let s=r.items[r.items.length-1];s.value?r.items.push({start:[],value:n}):s.value=n;break}case"flow-collection":{let s=r.items[r.items.length-1];!s||s.value?r.items.push({start:[],key:n,sep:[]}):s.sep?s.value=n:Object.assign(s,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){let s=n.items[n.items.length-1];s&&!s.sep&&!s.value&&s.start.length>0&&Zi(s.start)===-1&&(n.indent===0||s.start.every(i=>i.type!=="comment"||i.indent<n.indent))&&(r.type==="document"?r.end=s.start:r.items.push({start:s.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{Zi(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let n=Yn(this.peek(2)),r=St(n),s;e.end?(s=e.end,s.push(this.sourceToken),delete e.end):s=[this.sourceToken];let i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
125
+ `?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||e&&r===" ");let s=n-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=n),s}*pushUntil(e){let n=this.pos,r=this.buffer[n];for(;!e(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}};var Yt=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,r=this.lineStarts.length;for(;n<r;){let o=n+r>>1;this.lineStarts[o]<e?n=o+1:r=o}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0)return{line:0,col:e};let s=this.lineStarts[n-1];return{line:n,col:e-s+1}}}};function Ke(t,e){for(let n=0;n<t.length;++n)if(t[n].type===e)return!0;return!1}function ai(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function ci(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function er(t){switch(t.type){case"document":return t.start;case"block-map":{let e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function St(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function tr(t,e){if(e.length<1e5)Array.prototype.push.apply(t,e);else for(let n=0;n<e.length;++n)t.push(e[n])}function li(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!Ke(e.start,"explicit-key-ind")&&!Ke(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,ci(e.value)?e.value.end?tr(e.value.end,e.sep):e.value.end=e.sep:tr(e.start,e.sep),delete e.sep)}var Qt=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Jt,this.onNewLine=e}*parse(e,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let r of this.lexer.lex(e,n))yield*this.next(r);n||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let n=oi(e);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let n=e??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{let r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&li(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{let s=r.items[r.items.length-1];if(s.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(s.sep)s.value=n;else{Object.assign(s,{key:n,sep:[]}),this.onKeyLine=!s.explicitKey;return}break}case"block-seq":{let s=r.items[r.items.length-1];s.value?r.items.push({start:[],value:n}):s.value=n;break}case"flow-collection":{let s=r.items[r.items.length-1];!s||s.value?r.items.push({start:[],key:n,sep:[]}):s.sep?s.value=n:Object.assign(s,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){let s=n.items[n.items.length-1];s&&!s.sep&&!s.value&&s.start.length>0&&ai(s.start)===-1&&(n.indent===0||s.start.every(o=>o.type!=="comment"||o.indent<n.indent))&&(r.type==="document"?r.end=s.start:r.items.push({start:s.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{ai(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let n=er(this.peek(2)),r=St(n),s;e.end?(s=e.end,s.push(this.sourceToken),delete e.end):s=[this.sourceToken];let o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
126
126
  `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
127
- `,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){let r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){let s=e.items[e.items.length-2]?.value?.end;if(Array.isArray(s)){Qn(s,n.start),s.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let r=!this.onKeyLine&&this.indent===e.indent,s=r&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind",i=[];if(s&&n.sep&&!n.value){let o=[];for(let a=0;a<n.sep.length;++a){let l=n.sep[a];switch(l.type){case"newline":o.push(a);break;case"space":break;case"comment":l.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(i=n.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":s||n.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):s||n.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Ke(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(to(n.key)&&!Ke(n.sep,"newline")){let o=St(n.start),a=n.key,l=n.sep;l.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:l}]})}else i.length>0?n.sep=n.sep.concat(i,this.sourceToken):n.sep.push(this.sourceToken);else if(Ke(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{let o=St(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||s?e.items.push({start:i,key:null,sep:[this.sourceToken]}):Ke(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);s||n.value?(e.items.push({start:i,key:o,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(o):(Object.assign(n,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!n.explicitKey&&n.sep&&!Ke(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else r&&e.items.push({start:i});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){let r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){let s=e.items[e.items.length-2]?.value?.end;if(Array.isArray(s)){Qn(s,n.start),s.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||Ke(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){let r=this.startBlockValue(e);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let n=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let s=this.flowScalar(this.type);!n||n.value?e.items.push({start:[],key:s,sep:[]}):n.sep?this.stack.push(s):Object.assign(n,{key:s,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{let r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){let s=Yn(r),i=St(s);eo(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let n=this.source.indexOf(`
127
+ `,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){let r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){let s=e.items[e.items.length-2]?.value?.end;if(Array.isArray(s)){tr(s,n.start),s.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let r=!this.onKeyLine&&this.indent===e.indent,s=r&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind",o=[];if(s&&n.sep&&!n.value){let i=[];for(let a=0;a<n.sep.length;++a){let l=n.sep[a];switch(l.type){case"newline":i.push(a);break;case"space":break;case"comment":l.indent>e.indent&&(i.length=0);break;default:i.length=0}}i.length>=2&&(o=n.sep.splice(i[1]))}switch(this.type){case"anchor":case"tag":s||n.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):s||n.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Ke(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(ci(n.key)&&!Ke(n.sep,"newline")){let i=St(n.start),a=n.key,l=n.sep;l.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:a,sep:l}]})}else o.length>0?n.sep=n.sep.concat(o,this.sourceToken):n.sep.push(this.sourceToken);else if(Ke(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{let i=St(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||s?e.items.push({start:o,key:null,sep:[this.sourceToken]}):Ke(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);s||n.value?(e.items.push({start:o,key:i,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(i):(Object.assign(n,{key:i,sep:[]}),this.onKeyLine=!0);return}default:{let i=this.startBlockValue(e);if(i){if(i.type==="block-seq"){if(!n.explicitKey&&n.sep&&!Ke(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else r&&e.items.push({start:o});this.stack.push(i);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){let r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){let s=e.items[e.items.length-2]?.value?.end;if(Array.isArray(s)){tr(s,n.start),s.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||Ke(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){let r=this.startBlockValue(e);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let n=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let s=this.flowScalar(this.type);!n||n.value?e.items.push({start:[],key:s,sep:[]}):n.sep?this.stack.push(s):Object.assign(n,{key:s,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{let r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){let s=er(r),o=St(s);li(e);let i=e.end.splice(1,e.end.length);i.push(this.sourceToken);let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:o,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let n=this.source.indexOf(`
128
128
  `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
129
- `,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let n=Yn(e),r=St(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let n=Yn(e),r=St(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function ac(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new Vt||null,prettyErrors:e}}function ds(t,e={}){let{lineCounter:n,prettyErrors:r}=ac(e),s=new zt(n?.addNewLine),i=new Wt(e),o=Array.from(i.compose(s.parse(t)));if(r&&n)for(let a of o)a.errors.forEach(Zr(t,n)),a.warnings.forEach(Zr(t,n));return o.length>0?o:Object.assign([],{empty:!0},i.streamInfo())}var cc=(t,e)=>{let n=new Map;if(t.length>1e5)return n;let r=t.split(`
130
- `),s=(i,o)=>{for(;o>i&&!r[o]?.trim();)o--;o>i&&n.set(i,Math.max(o,n.get(i)??0))};if(e==="json"||e==="yaml"||e==="yml"){let i=[0];for(let l=0;l<t.length;l++)t[l]===`
131
- `&&i.push(l+1);let o=l=>{let c=0,u=i.length;for(;c+1<u;){let f=c+u>>>1;(i[f]??0)<=l?c=f:u=f}return c},a=(l,c)=>{let u=o(c-1),f=r[u]?.slice(c-(i[u]??0))??"";s(o(l),/^[\s,}\]]*(?:#.*)?$/.test(f)?u:u-1)};for(let l of ds(t))l.errors.length||se(l,(c,u)=>{if(L(u)&&T(u.key)&&T(u.value)?u.key.range&&u.value.range&&a(u.key.range[0],u.value.range[1]):B(u)&&u.flow&&u.range&&a(u.range[0],u.range[1]),te(u)&&!u.flow)for(let f of u.items)T(f)&&f.range&&a(f.range[0],f.range[1])})}else if(e==="toml"){let i=[],o=[],a="",l=0;r.forEach((c,u)=>{let f=!!a,d="";for(let h=0;h<c.length;h++){let p=c[h]??"";if(a)a[0]==='"'&&p==="\\"?h++:c.slice(h,h+a.length)===a&&(a.length===3&&s(l,u),h+=a.length-1,a="");else{if(p==="#")break;p==='"'||p==="'"?(a=c.slice(h,h+3)===p.repeat(3)?p.repeat(3):p,l=u,h+=a.length-1,d+="x"):d+=p}}if(!f&&!o.length&&/^\s*\[\[?.+\]\]?\s*$/.test(d)){i.push(u);return}for(let h of d)if(h==="["||h==="{")o.push({char:h,line:u});else if(h==="]"||h==="}"){let p=o.pop();p&&(p.char==="["?h==="]":h==="}")&&s(p.line,u)}}),i.forEach((c,u)=>{s(c,(i[u+1]??r.length)-1)})}return n},no=new WeakMap,ro=(t,e,n,r)=>{let s=cc(e,n);if(!r.length&&!s.size)return;let i=no.get(t);(!i||i.source!==e||i.language!==n)&&(i={source:e,language:n,folded:new Set},no.set(t,i));let o=i.folded,a=e.split(`
132
- `),l=[],c=[],u=()=>{let f=-1;c.forEach((d,h)=>{d.hidden=h<=f,d.classList.toggle("code-line-folded",o.has(h));let p=d.querySelector("button");if(p){let g=o.has(h)?"Expand section":"Collapse section",m=window.__docsTranslate;p.setAttribute("aria-expanded",String(!o.has(h))),p.setAttribute("aria-label",m?.(g)??g),p.title=p.getAttribute("aria-label")??g,p.dataset.i18nTitle=g,p.dataset.i18nAriaLabel=g}o.has(h)&&(f=Math.max(f,s.get(h)??h))})};a.forEach((f,d)=>{let h=document.createElement("span");h.className="code-line";let p=document.createElement("span");p.className="code-line-text";let g=r[d];for(let m of g?.map(y=>y.content).join("")===f?g:[{content:f}]){let y=document.createElement("span");m.color&&(y.style.color=m.color),y.textContent=m.content,p.append(y)}if(s.has(d)){let m=document.createElement("button");m.type="button",m.className="code-section-fold",m.innerHTML='<svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m4 6 4 4 4-4"/></svg>',m.addEventListener("click",()=>{o.delete(d)||o.add(d),u()}),h.append(m)}h.append(p),d<a.length-1&&h.append(document.createTextNode(`
133
- `)),c.push(h),l.push(h)}),t.classList.toggle("code-foldable",s.size>0),t.replaceChildren(...l),u()};var P=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function uc(t){return Cs(t)}function Cs(t){return Array.isArray(t)?fc(t):t instanceof RegExp?t:typeof t=="object"?dc(t):t}function fc(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=Cs(t[n]);return e}function dc(t){let e={};for(let n in t)e[n]=Cs(t[n]);return e}function ho(t,...e){return e.forEach(n=>{for(let r in n)t[r]=n[r]}),t}function po(t){let e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?po(t.substring(0,t.length-1)):t.substr(~e+1)}var hs=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Xn=class{static hasCaptures(t){return t===null?!1:(hs.lastIndex=0,hs.test(t))}static replaceCaptures(t,e,n){return t.replace(hs,(r,s,i,o)=>{let a=n[parseInt(s||i,10)];if(a){let l=e.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(o){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function go(t,e){return t<e?-1:t>e?1:0}function mo(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let s=0;s<n;s++){let i=go(t[s],e[s]);if(i!==0)return i}return 0}return n-r}function so(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function yo(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var bo=class{constructor(t){this.fn=t}fn;cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);let e=this.fn(t);return this.cache.set(t,e),e}},Qt=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}_colorMap;_defaults;_root;static createFromRawTheme(t,e){return this.createFromParsedTheme(gc(t),e)}static createFromParsedTheme(t,e){return yc(t,e)}_cachedMatchRoot=new bo(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;let e=t.scopeName,r=this._cachedMatchRoot.get(e).find(s=>hc(t.parent,s.parentScopes));return r?new wo(r.fontStyle,r.foreground,r.background):null}},ps=class Zn{constructor(e,n){this.parent=e,this.scopeName=n}parent;scopeName;static push(e,n){for(let r of n)e=new Zn(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new Zn(n,e[r]);return n}push(e){return new Zn(this,e)}getSegments(){let e=this,n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){let n=[],r=this;for(;r&&r!==e;)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function hc(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],s=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],s=!0}for(;t&&!pc(t.scopeName,r);){if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function pc(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var wo=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}fontStyle;foregroundId;backgroundId};function gc(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let s=0,i=e.length;s<i;s++){let o=e[s];if(!o.settings)continue;let a;if(typeof o.scope=="string"){let f=o.scope;f=f.replace(/^[,]+/,""),f=f.replace(/[,]+$/,""),a=f.split(",")}else Array.isArray(o.scope)?a=o.scope:a=[""];let l=-1;if(typeof o.settings.fontStyle=="string"){l=0;let f=o.settings.fontStyle.split(" ");for(let d=0,h=f.length;d<h;d++)switch(f[d]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let c=null;typeof o.settings.foreground=="string"&&so(o.settings.foreground)&&(c=o.settings.foreground);let u=null;typeof o.settings.background=="string"&&so(o.settings.background)&&(u=o.settings.background);for(let f=0,d=a.length;f<d;f++){let p=a[f].trim().split(" "),g=p[p.length-1],m=null;p.length>1&&(m=p.slice(0,p.length-1),m.reverse()),n[r++]=new mc(g,m,s,l,c,u)}}return n}var mc=class{constructor(t,e,n,r,s,i){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=s,this.background=i}scope;parentScopes;index;fontStyle;foreground;background},K=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(K||{});function yc(t,e){t.sort((l,c)=>{let u=go(l.scope,c.scope);return u!==0||(u=mo(l.parentScopes,c.parentScopes),u!==0)?u:l.index-c.index});let n=0,r="#000000",s="#ffffff";for(;t.length>=1&&t[0].scope==="";){let l=t.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(s=l.background)}let i=new bc(e),o=new wo(n,i.getId(r),i.getId(s)),a=new kc(new ms(0,null,-1,0,0),[]);for(let l=0,c=t.length;l<c;l++){let u=t[l];a.insert(0,u.scope,u.parentScopes,u.fontStyle,i.getId(u.foreground),i.getId(u.background))}return new Qt(i,o,a)}var bc=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},wc=Object.freeze([]),ms=class ko{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,s,i){this.scopeDepth=e,this.parentScopes=n||wc,this.fontStyle=r,this.foreground=s,this.background=i}clone(){return new ko(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,s=e.length;r<s;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),s!==0&&(this.background=s)}},kc=class ys{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_mainRule;_children;_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,s=0;for(;e.parentScopes[r]===">"&&r++,n.parentScopes[s]===">"&&s++,!(r>=e.parentScopes.length||s>=n.parentScopes.length);){let i=n.parentScopes[s].length-e.parentScopes[r].length;if(i!==0)return i;r++,s++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),s,i;if(r===-1?(s=e,i=""):(s=e.substring(0,r),i=e.substring(r+1)),this._children.hasOwnProperty(s))return this._children[s].match(i)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(ys._cmpBySpecificity),n}insert(e,n,r,s,i,o){if(n===""){this._doInsertHere(e,r,s,i,o);return}let a=n.indexOf("."),l,c;a===-1?(l=n,c=""):(l=n.substring(0,a),c=n.substring(a+1));let u;this._children.hasOwnProperty(l)?u=this._children[l]:(u=new ys(this._mainRule.clone(),ms.cloneArr(this._rulesWithParentScopes)),this._children[l]=u),u.insert(e+1,c,r,s,i,o)}_doInsertHere(e,n,r,s,i){if(n===null){this._mainRule.acceptOverwrite(e,r,s,i);return}for(let o=0,a=this._rulesWithParentScopes.length;o<a;o++){let l=this._rulesWithParentScopes[o];if(mo(l.parentScopes,n)===0){l.acceptOverwrite(e,r,s,i);return}}r===-1&&(r=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new ms(e,n,r,s,i))}},Ve=class oe{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){let n=oe.getLanguageId(e),r=oe.getTokenType(e),s=oe.getFontStyle(e),i=oe.getForeground(e),o=oe.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:s,foreground:i,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,s,i,o,a){let l=oe.getLanguageId(e),c=oe.getTokenType(e),u=oe.containsBalancedBrackets(e)?1:0,f=oe.getFontStyle(e),d=oe.getForeground(e),h=oe.getBackground(e);return n!==0&&(l=n),r!==8&&(c=r),s!==null&&(u=s?1:0),i!==-1&&(f=i),o!==0&&(d=o),a!==0&&(h=a),(l<<0|c<<8|u<<10|f<<11|d<<15|h<<24)>>>0}};function tr(t,e){let n=[],r=Sc(t),s=r.next();for(;s!==null;){let l=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let c=o();if(n.push({matcher:c,priority:l}),s!==",")break;s=r.next()}return n;function i(){if(s==="-"){s=r.next();let l=i();return c=>!!l&&!l(c)}if(s==="("){s=r.next();let l=a();return s===")"&&(s=r.next()),l}if(io(s)){let l=[];do l.push(s),s=r.next();while(io(s));return c=>e(l,c)}return null}function o(){let l=[],c=i();for(;c;)l.push(c),c=i();return u=>l.every(f=>f(u))}function a(){let l=[],c=o();for(;c&&(l.push(c),s==="|"||s===",");){do s=r.next();while(s==="|"||s===",");c=o()}return u=>l.some(f=>f(u))}}function io(t){return!!t&&!!t.match(/[\w\.:]+/)}function Sc(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;let r=n[0];return n=e.exec(t),r}}}function So(t){typeof t.dispose=="function"&&t.dispose()}var Xt=class{constructor(t){this.scopeName=t}scopeName;toKey(){return this.scopeName}},Cc=class{constructor(t,e){this.scopeName=t,this.ruleName=e}scopeName;ruleName;toKey(){return`${this.scopeName}#${this.ruleName}`}},_c=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){let e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},vc=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Xt(this.initialScopeName)]}repo;initialScopeName;seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let t=this.Q;this.Q=[];let e=new _c;for(let n of t)Ec(n,this.initialScopeName,this.repo,e);for(let n of e.references)if(n instanceof Xt){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 Ec(t,e,n,r){let s=n.lookup(t.scopeName);if(!s){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}let i=n.lookup(e);t instanceof Xt?er({baseGrammar:i,selfGrammar:s},r):bs(t.ruleName,{baseGrammar:i,selfGrammar:s,repository:s.repository},r);let o=n.injections(t.scopeName);if(o)for(let a of o)r.add(new Xt(a))}function bs(t,e,n){if(e.repository&&e.repository[t]){let r=e.repository[t];nr([r],e,n)}}function er(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&nr(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&nr(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function nr(t,e,n){for(let r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let s=r.repository?ho({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&nr(r.patterns,{...e,repository:s},n);let i=r.include;if(!i)continue;let o=Co(i);switch(o.kind){case 0:er({...e,selfGrammar:e.baseGrammar},n);break;case 1:er(e,n);break;case 2:bs(o.ruleName,{...e,repository:s},n);break;case 3:case 4:let a=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){let l={baseGrammar:e.baseGrammar,selfGrammar:a,repository:s};o.kind===4?bs(o.ruleName,l,n):er(l,n)}else o.kind===4?n.add(new Cc(o.scopeName,o.ruleName)):n.add(new Xt(o.scopeName));break}}}var Ac=class{kind=0},Nc=class{kind=1},xc=class{constructor(t){this.ruleName=t}ruleName;kind=2},Ic=class{constructor(t){this.scopeName=t}scopeName;kind=3},Tc=class{constructor(t,e){this.scopeName=t,this.ruleName=e}scopeName;ruleName;kind=4};function Co(t){if(t==="$base")return new Ac;if(t==="$self")return new Nc;let e=t.indexOf("#");if(e===-1)return new Ic(t);if(e===0)return new xc(t.substring(1));{let n=t.substring(0,e),r=t.substring(e+1);return new Tc(n,r)}}var Lc=/\\(\d+)/,oo=/\\(\d+)/g,Bc=-1,_o=-2;var tn=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=Xn.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Xn.hasCaptures(this._contentName)}get debugName(){let t=this.$location?`${po(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:Xn.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Xn.replaceCaptures(this._contentName,t,e)}},Oc=class extends tn{retokenizeCapturedWithRuleId;constructor(t,e,n,r,s){super(t,e,n,r),this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,r){throw new Error("Not supported!")}},Rc=class extends tn{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,null),this._match=new Zt(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new en,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ao=class extends tn{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,r),this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(let n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new en,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ws=class extends tn{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s,i,o,a,l,c){super(t,e,n,r),this._begin=new Zt(s,this.id),this.beginCaptures=i,this._end=new Zt(o||"\uFFFF",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,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,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new en;for(let n of this.patterns)t.getRule(n).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,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},rr=class extends tn{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,s,i,o,a,l){super(t,e,n,r),this._begin=new Zt(s,this.id),this.beginCaptures=i,this.whileCaptures=a,this._while=new Zt(o,_o),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,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new en;for(let e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new en,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||"\uFFFF"),this._cachedCompiledWhilePatterns}},vo=class J{static createCaptureRule(e,n,r,s,i){return e.registerRule(o=>new Oc(n,o,r,s,i))}static getCompiledRuleId(e,n,r){return e.id||n.registerRule(s=>{if(e.id=s,e.match)return new Rc(e.$vscodeTextmateLocation,e.id,e.name,e.match,J._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){e.repository&&(r=ho({},r,e.repository));let i=e.patterns;return typeof i>"u"&&e.include&&(i=[{include:e.include}]),new ao(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,J._compilePatterns(i,n,r))}return e.while?new rr(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,J._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,J._compileCaptures(e.whileCaptures||e.captures,n,r),J._compilePatterns(e.patterns,n,r)):new ws(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,J._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,J._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,J._compilePatterns(e.patterns,n,r))}),e.id}static _compileCaptures(e,n,r){let s=[];if(e){let i=0;for(let o in e){if(o==="$vscodeTextmateLocation")continue;let a=parseInt(o,10);a>i&&(i=a)}for(let o=0;o<=i;o++)s[o]=null;for(let o in e){if(o==="$vscodeTextmateLocation")continue;let a=parseInt(o,10),l=0;e[o].patterns&&(l=J.getCompiledRuleId(e[o],n,r)),s[a]=J.createCaptureRule(n,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,l)}}return s}static _compilePatterns(e,n,r){let s=[];if(e)for(let i=0,o=e.length;i<o;i++){let a=e[i],l=-1;if(a.include){let c=Co(a.include);switch(c.kind){case 0:case 1:l=J.getCompiledRuleId(r[a.include],n,r);break;case 2:let u=r[c.ruleName];u&&(l=J.getCompiledRuleId(u,n,r));break;case 3:case 4:let f=c.scopeName,d=c.kind===4?c.ruleName:null,h=n.getExternalGrammar(f,r);if(h)if(d){let p=h.repository[d];p&&(l=J.getCompiledRuleId(p,n,h.repository))}else l=J.getCompiledRuleId(h.repository.$self,n,h.repository);break}}else l=J.getCompiledRuleId(a,n,r);if(l!==-1){let c=n.getRule(l),u=!1;if((c instanceof ao||c instanceof ws||c instanceof rr)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;s.push(l)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},Zt=class Eo{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){let r=e.length,s=0,i=[],o=!1;for(let a=0;a<r;a++)if(e.charAt(a)==="\\"&&a+1<r){let c=e.charAt(a+1);c==="z"?(i.push(e.substring(s,a)),i.push("$(?!\\n)(?<!\\n)"),s=a+2):(c==="A"||c==="G")&&(o=!0),a++}this.hasAnchor=o,s===0?this.source=e:(i.push(e.substring(s,r)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Lc.test(this.source):this.hasBackReferences=!1}clone(){return new Eo(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,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(s=>e.substring(s.start,s.end));return oo.lastIndex=0,this.source.replace(oo,(s,i)=>yo(r[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],r=[],s=[],i,o,a,l;for(i=0,o=this.source.length;i<o;i++)a=this.source.charAt(i),e[i]=a,n[i]=a,r[i]=a,s[i]=a,a==="\\"&&i+1<o&&(l=this.source.charAt(i+1),l==="A"?(e[i+1]="\uFFFF",n[i+1]="\uFFFF",r[i+1]="A",s[i+1]="A"):l==="G"?(e[i+1]="\uFFFF",n[i+1]="G",r[i+1]="\uFFFF",s[i+1]="G"):(e[i+1]=l,n[i+1]=l,r[i+1]=l,s[i+1]=l),i++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},en=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){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(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new lo(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let r=this._items.map(s=>s.resolveAnchors(e,n));return new lo(t,r,this._items.map(s=>s.ruleId))}},lo=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}regExps;rules;scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){let t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
134
- `)}findNextMatchSync(t,e,n){let r=this.scanner.findNextMatchSync(t,e,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},gs=class{constructor(t,e){this.languageId=t,this.tokenType=e}languageId;tokenType},Pc=class ks{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,n){this._defaultAttributes=new gs(e,8),this._embeddedLanguagesMatcher=new $c(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?ks._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new gs(0,0);_getBasicScopeAttributes=new bo(e=>{let n=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new gs(n,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){let n=e.match(ks.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!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},$c=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);let e=t.map(([n,r])=>yo(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;let e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},Vb={InDebugMode:typeof process<"u"&&!!process.env.VSCODE_TEXTMATE_DEBUG},Ao=!1,co=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}stack;stoppedEarly};function No(t,e,n,r,s,i,o,a){let l=e.content.length,c=!1,u=-1;if(o){let h=Mc(t,e,n,r,s,i);s=h.stack,r=h.linePos,n=h.isFirstLine,u=h.anchorPosition}let f=Date.now();for(;!c;){if(a!==0&&Date.now()-f>a)return new co(s,!0);d()}return new co(s,!1);function d(){let h=Fc(t,e,n,r,s,u);if(!h){i.produce(s,l),c=!0;return}let p=h.captureIndices,g=h.matchedRuleId,m=p&&p.length>0?p[0].end>r:!1;if(g===Bc){let y=s.getRule(t);i.produce(s,p[0].start),s=s.withContentNameScopesList(s.nameScopesList),Jt(t,e,n,s,i,y.endCaptures,p),i.produce(s,p[0].end);let b=s;if(s=s.parent,u=b.getAnchorPos(),!m&&b.getEnterPos()===r){s=b,i.produce(s,l),c=!0;return}}else{let y=t.getRule(g);i.produce(s,p[0].start);let b=s,w=y.getName(e.content,p),S=s.contentNameScopesList.pushAttributed(w,t);if(s=s.push(g,r,u,p[0].end===l,null,S,S),y instanceof ws){let C=y;Jt(t,e,n,s,i,C.beginCaptures,p),i.produce(s,p[0].end),u=p[0].end;let E=C.getContentName(e.content,p),x=S.pushAttributed(E,t);if(s=s.withContentNameScopesList(x),C.endHasBackReferences&&(s=s.withEndRule(C.getEndWithResolvedBackReferences(e.content,p))),!m&&b.hasSameRuleAs(s)){s=s.pop(),i.produce(s,l),c=!0;return}}else if(y instanceof rr){let C=y;Jt(t,e,n,s,i,C.beginCaptures,p),i.produce(s,p[0].end),u=p[0].end;let E=C.getContentName(e.content,p),x=S.pushAttributed(E,t);if(s=s.withContentNameScopesList(x),C.whileHasBackReferences&&(s=s.withEndRule(C.getWhileWithResolvedBackReferences(e.content,p))),!m&&b.hasSameRuleAs(s)){s=s.pop(),i.produce(s,l),c=!0;return}}else if(Jt(t,e,n,s,i,y.captures,p),i.produce(s,p[0].end),s=s.pop(),!m){s=s.safePop(),i.produce(s,l),c=!0;return}}p[0].end>r&&(r=p[0].end,n=!1)}}function Mc(t,e,n,r,s,i){let o=s.beginRuleCapturedEOL?0:-1,a=[];for(let l=s;l;l=l.pop()){let c=l.getRule(t);c instanceof rr&&a.push({rule:c,stack:l})}for(let l=a.pop();l;l=a.pop()){let{ruleScanner:c,findOptions:u}=jc(l.rule,t,l.stack.endRule,n,r===o),f=c.findNextMatchSync(e,r,u);if(f){if(f.ruleId!==_o){s=l.stack.pop();break}f.captureIndices&&f.captureIndices.length&&(i.produce(l.stack,f.captureIndices[0].start),Jt(t,e,n,l.stack,i,l.rule.whileCaptures,f.captureIndices),i.produce(l.stack,f.captureIndices[0].end),o=f.captureIndices[0].end,f.captureIndices[0].end>r&&(r=f.captureIndices[0].end,n=!1))}else{s=l.stack.pop();break}}return{stack:s,linePos:r,anchorPosition:o,isFirstLine:n}}function Fc(t,e,n,r,s,i){let o=Dc(t,e,n,r,s,i),a=t.getInjections();if(a.length===0)return o;let l=Gc(a,t,e,n,r,s,i);if(!l)return o;if(!o)return l;let c=o.captureIndices[0].start,u=l.captureIndices[0].start;return u<c||l.priorityMatch&&u===c?l:o}function Dc(t,e,n,r,s,i){let o=s.getRule(t),{ruleScanner:a,findOptions:l}=xo(o,t,s.endRule,n,r===i),c=a.findNextMatchSync(e,r,l);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Gc(t,e,n,r,s,i,o){let a=Number.MAX_VALUE,l=null,c,u=0,f=i.contentNameScopesList.getScopeNames();for(let d=0,h=t.length;d<h;d++){let p=t[d];if(!p.matcher(f))continue;let g=e.getRule(p.ruleId),{ruleScanner:m,findOptions:y}=xo(g,e,null,r,s===o),b=m.findNextMatchSync(n,s,y);if(!b)continue;let w=b.captureIndices[0].start;if(!(w>=a)&&(a=w,l=b.captureIndices,c=b.ruleId,u=p.priority,a===s))break}return l?{priorityMatch:u===-1,captureIndices:l,matchedRuleId:c}:null}function xo(t,e,n,r,s){if(Ao){let o=t.compile(e,n),a=Io(r,s);return{ruleScanner:o,findOptions:a}}return{ruleScanner:t.compileAG(e,n,r,s),findOptions:0}}function jc(t,e,n,r,s){if(Ao){let o=t.compileWhile(e,n),a=Io(r,s);return{ruleScanner:o,findOptions:a}}return{ruleScanner:t.compileWhileAG(e,n,r,s),findOptions:0}}function Io(t,e){let n=0;return t||(n|=1),e||(n|=4),n}function Jt(t,e,n,r,s,i,o){if(i.length===0)return;let a=e.content,l=Math.min(i.length,o.length),c=[],u=o[0].end;for(let f=0;f<l;f++){let d=i[f];if(d===null)continue;let h=o[f];if(h.length===0)continue;if(h.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=h.start;)s.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?s.produceFromScopes(c[c.length-1].scopes,h.start):s.produce(r,h.start),d.retokenizeCapturedWithRuleId){let g=d.getName(a,o),m=r.contentNameScopesList.pushAttributed(g,t),y=d.getContentName(a,o),b=m.pushAttributed(y,t),w=r.push(d.retokenizeCapturedWithRuleId,h.start,-1,!1,null,m,b),S=t.createOnigString(a.substring(0,h.end));No(t,S,n&&h.start===0,h.start,w,s,!1,0),So(S);continue}let p=d.getName(a,o);if(p!==null){let m=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(p,t);c.push(new Uc(m,h.end))}}for(;c.length>0;)s.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var Uc=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function qc(t,e,n,r,s,i,o,a){return new Wc(t,e,n,r,s,i,o,a)}function uo(t,e,n,r,s){let i=tr(e,sr),o=vo.getCompiledRuleId(n,r,s.repository);for(let a of i)t.push({debugSelector:e,matcher:a.matcher,ruleId:o,grammar:s,priority:a.priority})}function sr(t,e){if(e.length<t.length)return!1;let n=0;return t.every(r=>{for(let s=n;s<e.length;s++)if(Hc(e[s],r))return n=s+1,!0;return!1})}function Hc(t,e){if(!t)return!1;if(t===e)return!0;let n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var Wc=class{constructor(t,e,n,r,s,i,o,a){if(this._rootScopeName=t,this.balancedBracketSelectors=i,this._onigLib=a,this._basicScopeAttributesProvider=new Pc(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=fo(e,null),this._injections=null,this._tokenTypeMatchers=[],s)for(let l of Object.keys(s)){let c=tr(l,sr);for(let u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:s[l]})}}_rootScopeName;balancedBracketSelectors;_onigLib;_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){let t={lookup:s=>s===this._rootScopeName?this._grammar:this.getExternalGrammar(s),injections:s=>this._grammarRepository.injections(s)},e=[],n=this._rootScopeName,r=t.lookup(n);if(r){let s=r.injections;if(s)for(let o in s)uo(e,o,s[o],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(o=>{let a=this.getExternalGrammar(o);if(a){let l=a.injectionSelector;l&&uo(e,l,a,this,a)}})}return e.sort((s,i)=>s.priority-i.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){let e=++this._lastRuleId,n=t(e);return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){let n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=fo(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){let r=this._tokenize(t,e,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(t,e,n=0){let r=this._tokenize(t,e,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(t,e,n,r){this._rootId===-1&&(this._rootId=vo.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let s;if(!e||e===Ss.NULL){s=!0;let c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),f=Ve.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),d=this.getRule(this._rootId).getName(null,null),h;d?h=Yt.createRootAndLookUpScopeName(d,f,this):h=Yt.createRoot("unknown",f),e=new Ss(null,this._rootId,-1,-1,!1,null,h,h)}else s=!1,e.reset();t=t+`
135
- `;let i=this.createOnigString(t),o=i.content.length,a=new Vc(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),l=No(this,i,s,0,e,a,!0,r);return So(i),{lineLength:o,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function fo(t,e){return t=uc(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var Yt=class Ee{constructor(e,n,r){this.parent=e,this.scopePath=n,this.tokenAttributes=r}parent;scopePath;tokenAttributes;static fromExtension(e,n){let r=e,s=e?.scopePath??null;for(let i of n)s=ps.push(s,i.scopeNames),r=new Ee(r,s,i.encodedTokenAttributes);return r}static createRoot(e,n){return new Ee(null,new ps(null,e),n)}static createRootAndLookUpScopeName(e,n,r){let s=r.getMetadataForScope(e),i=new ps(null,e),o=r.themeProvider.themeMatch(i),a=Ee.mergeAttributes(n,s,o);return new Ee(null,i,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return Ee.equals(this,e)}static equals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,r){let s=-1,i=0,o=0;return r!==null&&(s=r.fontStyle,i=r.foregroundId,o=r.backgroundId),Ve.set(e,n.languageId,n.tokenType,null,s,i,o)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return Ee._pushAttributed(this,e,n);let r=e.split(/ /g),s=this;for(let i of r)s=Ee._pushAttributed(s,i,n);return s}static _pushAttributed(e,n,r){let s=r.getMetadataForScope(n),i=e.scopePath.push(n),o=r.themeProvider.themeMatch(i),a=Ee.mergeAttributes(e.tokenAttributes,s,o);return new Ee(e,i,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let n=[],r=this;for(;r&&r!==e;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?n.reverse():void 0}},Ss=class tt{constructor(e,n,r,s,i,o,a,l){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=i,this.endRule=o,this.nameScopesList=a,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=s}parent;ruleId;beginRuleCapturedEOL;endRule;nameScopesList;contentNameScopesList;_stackElementBrand=void 0;static NULL=new tt(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return e===null?!1:tt._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?Yt.equals(e.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){tt._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,r,s,i,o,a){return new tt(this,e,n,r,s,i,o,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new tt(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,n){let r=Yt.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new tt(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Yt.fromExtension(r,n.contentNameScopesList))}},Kc=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):tr(n,sr).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>tr(n,sr).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(let e of this.unbalancedBracketScopes)if(e(t))return!1;for(let e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},Vc=class{constructor(t,e,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}balancedBracketSelectors;_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let r=t?.tokenAttributes??0,s=!1;if(this.balancedBracketSelectors?.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let i=t?.getScopeNames()??[];for(let o of this._tokenTypeOverrides)o.matcher(i)&&(r=Ve.set(r,0,o.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(i))}if(s&&(r=Ve.set(r,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=e;return}let n=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let r=0,s=this._binaryTokens.length;r<s;r++)n[r]=this._binaryTokens[r];return n}},zc=class{constructor(t,e){this._onigLib=e,this._theme=t}_onigLib;_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,r,s){if(!this._grammars.has(t)){let i=this._rawGrammars.get(t);if(!i)return null;this._grammars.set(t,qc(t,i,e,n,r,s,this,this._onigLib))}return this._grammars.get(t)}},To=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new zc(Qt.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,e){this._syncRegistry.setTheme(Qt.createFromRawTheme(t,e))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,e,n){return this.loadGrammarWithConfiguration(t,e,{embeddedLanguages:n})}loadGrammarWithConfiguration(t,e,n){return this._loadGrammar(t,e,n.embeddedLanguages,n.tokenTypes,new Kc(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,e,n,r,s){let i=new vc(this._syncRegistry,t);for(;i.Q.length>0;)i.Q.map(o=>this._loadSingleGrammar(o.scopeName)),i.processQueue();return this._grammarForScopeName(t,e,n,r,s)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){let e=this._options.loadGrammar(t);if(e){let n=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(e,n)}}addGrammar(t,e=[],n=0,r=null){return this._syncRegistry.addGrammar(t,e),this._grammarForScopeName(t.scopeName,n,r)}_grammarForScopeName(t,e=0,n=null,r=null,s=null){return this._syncRegistry.grammarForScopeName(t,e,n,r,s)}},ir=Ss.NULL;function rn(t,e){let n=typeof t=="string"?{}:{...t.colorReplacements},r=typeof t=="string"?t:t.name;for(let[s,i]of Object.entries(e?.colorReplacements||{}))typeof i=="string"?n[s]=i:s===r&&Object.assign(n,i);return n}function Le(t,e){return t&&(e?.[t?.toLowerCase()]||t)}function Po(t){return Array.isArray(t)?t:[t]}async function _s(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function sn(t){return!t||["plaintext","txt","text","plain"].includes(t)}function $o(t){return t==="ansi"||sn(t)}function on(t){return t==="none"}function Mo(t){return on(t)}var Jc=/(\r?\n)/g;function Ct(t,e=!1){if(t.length===0)return[["",0]];let n=t.split(Jc),r=0,s=[];for(let i=0;i<n.length;i+=2){let o=e?n[i]+(n[i+1]||""):n[i];s.push([o,r]),r+=n[i].length,r+=n[i+1]?.length||0}return s}var Lo={light:"#333333",dark:"#bbbbbb"},Bo={light:"#fffffe",dark:"#1e1e1e"},Oo="__shiki_resolved";function or(t){if(t?.[Oo])return t;let e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:r}=e;if(!n||!r){let a=e.settings?e.settings.find(l=>!l.name&&!l.scope):void 0;a?.settings?.foreground&&(r=a.settings.foreground),a?.settings?.background&&(n=a.settings.background),!r&&e?.colors?.["editor.foreground"]&&(r=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),r||(r=e.type==="light"?Lo.light:Lo.dark),n||(n=e.type==="light"?Bo.light:Bo.dark),e.fg=r,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let s=0,i=new Map;function o(a){if(i.has(a))return i.get(a);s+=1;let l=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${l}`]?o(a):(i.set(a,l),l)}e.settings=e.settings.map(a=>{let l=a.settings?.foreground&&!a.settings.foreground.startsWith("#"),c=a.settings?.background&&!a.settings.background.startsWith("#");if(!l&&!c)return a;let u={...a,settings:{...a.settings}};if(l){let f=o(a.settings.foreground);e.colorReplacements[f]=a.settings.foreground,u.settings.foreground=f}if(c){let f=o(a.settings.background);e.colorReplacements[f]=a.settings.background,u.settings.background=f}return u});for(let a of Object.keys(e.colors||{}))if((a==="editor.foreground"||a==="editor.background"||a.startsWith("terminal.ansi"))&&!e.colors[a]?.startsWith("#")){let l=o(e.colors[a]);e.colorReplacements[l]=e.colors[a],e.colors[a]=l}return Object.defineProperty(e,Oo,{enumerable:!1,writable:!1,value:!0}),e}async function Fo(t){return[...new Set((await Promise.all(t.filter(e=>!$o(e)).map(async e=>await _s(e).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function Do(t){return(await Promise.all(t.map(async e=>Mo(e)?null:or(await _s(e))))).filter(e=>!!e)}function Go(t,e){if(!e)return t;if(e[t]){let n=new Set([t]);for(;e[t];){if(t=e[t],n.has(t))throw new P(`Circular alias \`${[...n].join(" -> ")} -> ${t}\``);n.add(t)}}return t}var Yc=class extends To{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,e,n,r={}){super(t),this._resolver=t,this._themes=e,this._langs=n,this._alias=r,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){let e=or(t);return e.name&&(this._resolvedThemes.set(e.name,e),this._loadedThemesCache=null),e}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let e=this._textmateThemeCache.get(t);e||(e=Qt.createFromRawTheme(t),this._textmateThemeCache.set(t,e)),this._syncRegistry.setTheme(e)}getGrammar(t){return t=Go(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;let e=new Set([...this._langMap.values()].filter(s=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);let n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);let r=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(r.name=t.name,this._resolvedGrammars.set(t.name,r),t.aliases&&t.aliases.forEach(s=>{this._alias[s]=t.name}),this._loadedLanguagesCache=null,e.size)for(let s of e)this._syncRegistry?._grammars?.get(s.scopeName)?.dispose(),this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(let r of t)this.resolveEmbeddedLanguages(r);let e=[...this._langGraph.entries()],n=e.filter(([r,s])=>!s);if(n.length){let r=e.filter(([s,i])=>i?(i.embeddedLanguages||i.embeddedLangs)?.some(o=>n.map(([a])=>a).includes(o)):!1).filter(s=>!n.includes(s));throw new P(`Missing languages ${n.map(([s])=>`\`${s}\``).join(", ")}, required by ${r.map(([s])=>`\`${s}\``).join(", ")}`)}for(let[r,s]of e)this._resolver.addLanguage(s);for(let[r,s]of e)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);let e=t.embeddedLanguages??t.embeddedLangs;if(e)for(let n of e)this._langGraph.set(n,this._langMap.get(n))}},Qc=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,e){this._onigLib={createOnigScanner:n=>t.createScanner(n),createOnigString:n=>t.createString(n)},e.forEach(n=>this.addLanguage(n))}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(e=>{this._langs.set(e,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(e=>{this._injections.get(e)||this._injections.set(e,[]),this._injections.get(e).includes(t.scopeName)||this._injections.get(e).push(t.scopeName)})}getInjections(t){let e=t.split("."),n=[];for(let r=1;r<=e.length;r++){let s=e.slice(0,r).join(".");n=[...n,...this._injections.get(s)||[]]}return n}},nn=0;function vs(t){nn+=1,t.warnings!==!1&&nn>=10&&nn%10===0&&console.warn(`[Shiki] ${nn} 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 e=!1;if(!t.engine)throw new P("`engine` option is required for synchronous mode");let n=(t.langs||[]).flat(1),r=(t.themes||[]).flat(1).map(or),s=new Yc(new Qc(t.engine,n),r,n,t.langAlias),i;function o(b){return Go(b,t.langAlias)}function a(b){m();let w=s.getGrammar(typeof b=="string"?b:b.name);if(!w)throw new P(`Language \`${b}\` not found, you may need to load it first`);return w}function l(b){if(b==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};m();let w=s.getTheme(b);if(!w)throw new P(`Theme \`${b}\` not found, you may need to load it first`);return w}function c(b){m();let w=l(b);return i!==b&&(s.setTheme(w),i=b),{theme:w,colorMap:s.getColorMap()}}function u(){return m(),s.getLoadedThemes()}function f(){return m(),s.getLoadedLanguages()}function d(...b){m(),s.loadLanguages(b.flat(1))}async function h(...b){return d(await Fo(b))}function p(...b){m();for(let w of b.flat(1))s.loadTheme(w)}async function g(...b){return m(),p(await Do(b))}function m(){if(e)throw new P("Shiki instance has been disposed")}function y(){e||(e=!0,s.dispose(),nn-=1)}return{setTheme:c,getTheme:l,getLanguage:a,getLoadedThemes:u,getLoadedLanguages:f,resolveLangAlias:o,loadLanguage:h,loadLanguageSync:d,loadTheme:g,loadThemeSync:p,dispose:y,[Symbol.dispose]:y}}async function Es(t){t.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[e,n,r]=await Promise.all([Do(t.themes||[]),Fo(t.langs||[]),t.engine]);return vs({...t,themes:e,langs:n,engine:r})}var jo=new WeakMap;function an(t,e){jo.set(t,e)}function _t(t){return jo.get(t)}var ar=class Uo{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new Uo(Object.fromEntries(Po(n).map(r=>[r,ir])),e)}constructor(...e){if(e.length===2){let[n,r]=e;this.lang=r,this._stacks=n}else{let[n,r,s]=e;this.lang=r,this._stacks={[s]:n}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Xc(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Xc(t){let e=[],n=new Set;function r(s){if(n.has(s))return;n.add(s);let i=s?.nameScopesList?.scopeName;i&&e.push(i),s.parent&&r(s.parent)}return r(t),e}function Zc(t,e){if(!(t instanceof ar))throw new P("Invalid grammar state");return t.getInternalStack(e)}var eu=/,/,tu=/ /;function As(t,e,n={}){let{theme:r=t.getLoadedThemes()[0]}=n;if(sn(t.resolveLangAlias(n.lang||"text"))||on(r))return Ct(e).map(a=>[{content:a[0],offset:a[1]}]);let{theme:s,colorMap:i}=t.setTheme(r),o=t.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==o.name)throw new P(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(s.name))throw new P(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return Ho(e,o,s,i,n)}function qo(...t){if(t.length===2)return _t(t[1]);let[e,n,r={}]=t,{lang:s="text",theme:i=e.getLoadedThemes()[0]}=r;if(sn(s)||on(i))throw new P("Plain language does not have grammar state");if(s==="ansi")throw new P("ANSI language does not have grammar state");let{theme:o,colorMap:a}=e.setTheme(i),l=e.getLanguage(s);return new ar(Ns(n,l,o,a,r).stateStack,l.name,o.name)}function Ho(t,e,n,r,s){let i=Ns(t,e,n,r,s),o=new ar(i.stateStack,e.name,n.name);return an(i.tokens,o),i.tokens}function Ns(t,e,n,r,s){let i=rn(n,s),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:a=500,includeExplanation:l=!1}=s,c=Ct(t),u=s.grammarState?Zc(s.grammarState,n.name)??ir:s.grammarContextCode!=null?Ns(s.grammarContextCode,e,n,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:ir,f=[],d=[];for(let h=0,p=c.length;h<p;h++){let[g,m]=c[h];if(g===""){f=[],d.push([]);continue}if(o>0&&g.length>=o){f=[],d.push([{content:g,offset:m,color:"",fontStyle:0}]);continue}let y,b,w;l&&l!=="tokenType"&&(y=e.tokenizeLine(g,u,a),b=y.tokens,w=0);let S=e.tokenizeLine2(g,u,a),C=S.tokens.length/2;for(let E=0;E<C;E++){let x=S.tokens[2*E],_=E+1<C?S.tokens[2*E+2]:g.length;if(x===_)continue;let $=S.tokens[2*E+1],re=Le(r[Ve.getForeground($)],i),ye=Ve.getFontStyle($),O={content:g.substring(x,_),offset:m+x,color:re,fontStyle:ye};if(l==="tokenType")O.type=Ve.getTokenType($);else if(l){let It=[];if(l!=="scopeName")for(let Ae of n.settings){let ut;switch(typeof Ae.scope){case"string":ut=Ae.scope.split(eu).map(Rr=>Rr.trim());break;case"object":ut=Ae.scope;break;default:continue}It.push({settings:Ae,selectors:ut.map(Rr=>Rr.split(tu))})}O.explanation=[];let fi=0;for(;x+fi<_;){let Ae=b[w],ut=g.substring(Ae.startIndex,Ae.endIndex);fi+=ut.length,O.explanation.push({content:ut,scopes:l==="scopeName"?nu(Ae.scopes):ru(It,Ae.scopes)}),w+=1}}f.push(O)}d.push(f),f=[],u=S.ruleStack}return{tokens:d,stateStack:u}}function nu(t){return t.map(e=>({scopeName:e}))}function ru(t,e){let n=[];for(let r=0,s=e.length;r<s;r++){let i=e[r];n[r]={scopeName:i,themeMatches:iu(t,i,e.slice(0,r))}}return n}function Ro(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function su(t,e,n){if(!Ro(t.at(-1),e))return!1;let r=t.length-2,s=n.length-1;for(;r>=0&&s>=0;)Ro(t[r],n[s])&&(r-=1),s-=1;return r===-1}function iu(t,e,n){let r=[];for(let{selectors:s,settings:i}of t)for(let o of s)if(su(o,e,n)){r.push(i);break}return r}function lr(t,e,n,r=As){let s=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),i=s.map(c=>{let u=r(t,e,{...n,theme:c.theme});return{tokens:u,state:_t(u),theme:typeof c.theme=="string"?c.theme:c.theme.name}}),o=ou(...i.map(c=>c.tokens)),a=o[0].map((c,u)=>c.map((f,d)=>{let h={content:f.content,variants:{},offset:f.offset};return"includeExplanation"in n&&n.includeExplanation&&(h.explanation=f.explanation),o.forEach((p,g)=>{let{content:m,explanation:y,offset:b,...w}=p[u][d];h.variants[s[g].color]=w}),h})),l=i[0].state?new ar(Object.fromEntries(i.map(c=>[c.theme,c.state?.getInternalStack(c.theme)])),i[0].state.lang):void 0;return l&&an(a,l),a}function ou(...t){let e=t.map(()=>[]),n=t.length;for(let r=0;r<t[0].length;r++){let s=t.map(l=>l[r]),i=e.map(()=>[]);e.forEach((l,c)=>l.push(i[c]));let o=s.map(()=>0),a=s.map(l=>l[0]);for(;a.every(l=>l);){let l=Math.min(...a.map(c=>c.content.length));for(let c=0;c<n;c++){let u=a[c];u.content.length===l?(i[c].push(u),o[c]+=1,a[c]=s[c][o[c]]):(i[c].push({...u,content:u.content.slice(0,l)}),a[c]={...u,content:u.content.slice(l),offset:u.offset+l})}}}return e}var Wo=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var Be=class{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}};Be.prototype.normal={};Be.prototype.property={};Be.prototype.space=void 0;function xs(t,e){let n={},r={};for(let s of t)Object.assign(n,s.property),Object.assign(r,s.normal);return new Be(n,r,e)}function ln(t){return t.toLowerCase()}var W=class{constructor(e,n){this.attribute=n,this.property=e}};W.prototype.attribute="";W.prototype.booleanish=!1;W.prototype.boolean=!1;W.prototype.commaOrSpaceSeparated=!1;W.prototype.commaSeparated=!1;W.prototype.defined=!1;W.prototype.mustUseProperty=!1;W.prototype.number=!1;W.prototype.overloadedBoolean=!1;W.prototype.property="";W.prototype.spaceSeparated=!1;W.prototype.space=void 0;var cn={};Pr(cn,{boolean:()=>A,booleanish:()=>F,commaOrSpaceSeparated:()=>X,commaSeparated:()=>Oe,number:()=>k,overloadedBoolean:()=>cr,spaceSeparated:()=>R});var au=0,A=nt(),F=nt(),cr=nt(),k=nt(),R=nt(),Oe=nt(),X=nt();function nt(){return 2**++au}var Is=Object.keys(cn),rt=class extends W{constructor(e,n,r,s){let i=-1;if(super(e,n),Ko(this,"space",s),typeof r=="number")for(;++i<Is.length;){let o=Is[i];Ko(this,Is[i],(r&cn[o])===cn[o])}}};rt.prototype.defined=!0;function Ko(t,e,n){n&&(t[e]=n)}function ae(t){let e={},n={};for(let[r,s]of Object.entries(t.properties)){let i=new rt(r,t.transform(t.attributes||{},r),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),e[r]=i,n[ln(r)]=r,n[ln(i.attribute)]=r}return new Be(e,n,t.space)}var Ts=ae({properties:{ariaActiveDescendant:null,ariaAtomic:F,ariaAutoComplete:null,ariaBusy:F,ariaChecked:F,ariaColCount:k,ariaColIndex:k,ariaColSpan:k,ariaControls:R,ariaCurrent:null,ariaDescribedBy:R,ariaDetails:null,ariaDisabled:F,ariaDropEffect:R,ariaErrorMessage:null,ariaExpanded:F,ariaFlowTo:R,ariaGrabbed:F,ariaHasPopup:null,ariaHidden:F,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:R,ariaLevel:k,ariaLive:null,ariaModal:F,ariaMultiLine:F,ariaMultiSelectable:F,ariaOrientation:null,ariaOwns:R,ariaPlaceholder:null,ariaPosInSet:k,ariaPressed:F,ariaReadOnly:F,ariaRelevant:null,ariaRequired:F,ariaRoleDescription:R,ariaRowCount:k,ariaRowIndex:k,ariaRowSpan:k,ariaSelected:F,ariaSetSize:k,ariaSort:null,ariaValueMax:k,ariaValueMin:k,ariaValueNow:k,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function ur(t,e){return e in t?t[e]:e}function fr(t,e){return ur(t,e.toLowerCase())}var Vo=ae({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Oe,acceptCharset:R,accessKey:R,action:null,allow:null,allowFullScreen:A,allowPaymentRequest:A,allowUserMedia:A,alpha:A,alt:null,as:null,async:A,autoCapitalize:null,autoComplete:R,autoFocus:A,autoPlay:A,blocking:R,capture:null,charSet:null,checked:A,cite:null,className:R,closedBy:null,colorSpace:null,cols:k,colSpan:k,command:null,commandFor:null,content:null,contentEditable:F,controls:A,controlsList:R,coords:k|Oe,crossOrigin:null,data:null,dateTime:null,decoding:null,default:A,defer:A,dir:null,dirName:null,disabled:A,download:cr,draggable:F,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:A,formTarget:null,headers:R,height:k,hidden:cr,high:k,href:null,hrefLang:null,htmlFor:R,httpEquiv:R,id:null,imageSizes:null,imageSrcSet:null,inert:A,inputMode:null,integrity:null,is:null,isMap:A,itemId:null,itemProp:R,itemRef:R,itemScope:A,itemType:R,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:A,low:k,manifest:null,max:null,maxLength:k,media:null,method:null,min:null,minLength:k,multiple:A,muted:A,name:null,nonce:null,noModule:A,noValidate:A,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:A,optimum:k,pattern:null,ping:R,placeholder:null,playsInline:A,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:A,referrerPolicy:null,rel:R,required:A,reversed:A,rows:k,rowSpan:k,sandbox:R,scope:null,scoped:A,seamless:A,selected:A,shadowRootClonable:A,shadowRootCustomElementRegistry:A,shadowRootDelegatesFocus:A,shadowRootMode:null,shadowRootSerializable:A,shape:null,size:k,sizes:null,slot:null,span:k,spellCheck:F,src:null,srcDoc:null,srcLang:null,srcSet:null,start:k,step:null,style:null,tabIndex:k,target:null,title:null,translate:null,type:null,typeMustMatch:A,useMap:null,value:F,width:k,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:R,axis:null,background:null,bgColor:null,border:k,borderColor:null,bottomMargin:k,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:A,declare:A,event:null,face:null,frame:null,frameBorder:null,hSpace:k,leftMargin:k,link:null,longDesc:null,lowSrc:null,marginHeight:k,marginWidth:k,noResize:A,noHref:A,noShade:A,noWrap:A,object:null,profile:null,prompt:null,rev:null,rightMargin:k,rules:null,scheme:null,scrolling:F,standby:null,summary:null,text:null,topMargin:k,valueType:null,version:null,vAlign:null,vLink:null,vSpace:k,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:A,disablePictureInPicture:A,disableRemotePlayback:A,exportParts:Oe,part:R,prefix:null,property:null,results:k,security:null,unselectable:null},space:"html",transform:fr});var zo=ae({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:X,accentHeight:k,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:k,amplitude:k,arabicForm:null,ascent:k,attributeName:null,attributeType:null,azimuth:k,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:k,by:null,calcMode:null,capHeight:k,className:R,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:k,diffuseConstant:k,direction:null,display:null,dur:null,divisor:k,dominantBaseline:null,download:A,dx:null,dy:null,edgeMode:null,editable:null,elevation:k,enableBackground:null,end:null,event:null,exponent:k,externalResourcesRequired:null,fill:null,fillOpacity:k,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:Oe,g2:Oe,glyphName:Oe,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:k,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:k,horizOriginX:k,horizOriginY:k,id:null,ideographic:k,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:k,k,k1:k,k2:k,k3:k,k4:k,kernelMatrix:X,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:k,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:k,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:k,overlineThickness:k,paintOrder:null,panose1:null,path:null,pathLength:k,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:R,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:k,pointsAtY:k,pointsAtZ:k,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:X,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:X,rev:X,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:X,requiredFeatures:X,requiredFonts:X,requiredFormats:X,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:k,specularExponent:k,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:k,strikethroughThickness:k,string:null,stroke:null,strokeDashArray:X,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:k,strokeOpacity:k,strokeWidth:null,style:null,surfaceScale:k,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:X,tabIndex:k,tableValues:null,target:null,targetX:k,targetY:k,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:X,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:k,underlineThickness:k,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:k,values:null,vAlphabetic:k,vMathematical:k,vectorEffect:null,vHanging:k,vIdeographic:k,version:null,vertAdvY:k,vertOriginX:k,vertOriginY:k,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:k,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ur});var Ls=ae({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}});var Bs=ae({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:fr});var Os=ae({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}});var lu=/[A-Z]/g,Jo=/-[a-z]/g,cu=/^data[-\w.:]+$/i;function Rs(t,e){let n=ln(e),r=e,s=W;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&cu.test(e)){if(e.charAt(4)==="-"){let i=e.slice(5).replace(Jo,fu);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{let i=e.slice(4);if(!Jo.test(i)){let o=i.replace(lu,uu);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}s=rt}return new s(r,e)}function uu(t){return"-"+t.toLowerCase()}function fu(t){return t.charAt(1).toUpperCase()}var dr=xs([Ts,Vo,Ls,Bs,Os],"html"),hr=xs([Ts,zo,Ls,Bs,Os],"svg");var Yo={}.hasOwnProperty;function Qo(t,e){let n=e||{};function r(s,...i){let o=r.invalid,a=r.handlers;if(s&&Yo.call(s,t)){let l=String(s[t]);o=Yo.call(a,l)?a[l]:r.unknown}if(o)return o.call(this,s,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var du=/["&'<>`]/g,hu=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,pu=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,gu=/[|\\{}()[\]^$+*?.]/g,Xo=new WeakMap;function Zo(t,e){if(t=t.replace(e.subset?mu(e.subset):du,r),e.subset||e.escapeOnly)return t;return t.replace(hu,n).replace(pu,r);function n(s,i,o){return e.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,o.charCodeAt(i+2),e)}function r(s,i,o){return e.format(s.charCodeAt(0),o.charCodeAt(i+1),e)}}function mu(t){let e=Xo.get(t);return e||(e=yu(t),Xo.set(t,e)),e}function yu(t){let e=[],n=-1;for(;++n<t.length;)e.push(t[n].replace(gu,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}var bu=/[\dA-Fa-f]/;function ea(t,e,n){let r="&#x"+t.toString(16).toUpperCase();return n&&e&&!bu.test(String.fromCharCode(e))?r:r+";"}var wu=/\d/;function ta(t,e,n){let r="&#"+String(t);return n&&e&&!wu.test(String.fromCharCode(e))?r:r+";"}var na=["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"];var pr={nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",fnof:"\u0192",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",bull:"\u2022",hellip:"\u2026",prime:"\u2032",Prime:"\u2033",oline:"\u203E",frasl:"\u2044",weierp:"\u2118",image:"\u2111",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",quot:'"',amp:"&",lt:"<",gt:">",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"};var ra=["cent","copy","divide","gt","lt","not","para","times"];var sa={}.hasOwnProperty,Ps={},gr;for(gr in pr)sa.call(pr,gr)&&(Ps[pr[gr]]=gr);var ku=/[^\dA-Za-z]/;function ia(t,e,n,r){let s=String.fromCharCode(t);if(sa.call(Ps,s)){let i=Ps[s],o="&"+i;return n&&na.includes(i)&&!ra.includes(i)&&(!r||e&&e!==61&&ku.test(String.fromCharCode(e)))?o:o+";"}return""}function oa(t,e,n){let r=ea(t,e,n.omitOptionalSemicolons),s;if((n.useNamedReferences||n.useShortestReferences)&&(s=ia(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!s)&&n.useShortestReferences){let i=ta(t,e,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return s&&(!n.useShortestReferences||s.length<r.length)?s:r}function Re(t,e){return Zo(t,Object.assign({format:oa},e))}var Su=/^>|^->|<!--|-->|--!>|<!-$/g,Cu=[">"],_u=["<",">"];function aa(t,e,n,r){return r.settings.bogusComments?"<?"+Re(t.value,Object.assign({},r.settings.characterReferences,{subset:Cu}))+">":"<!--"+t.value.replace(Su,s)+"-->";function s(i){return Re(i,Object.assign({},r.settings.characterReferences,{subset:_u}))}}function la(t,e,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function $s(t,e){let n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(e);for(;s!==-1;)r++,s=n.indexOf(e,s+e.length);return r}function ca(t,e){let n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function ua(t){return t.join(" ").trim()}var vu=/[ \t\n\f\r]/g;function st(t){return typeof t=="object"?t.type==="text"?fa(t.value):!1:fa(t)}function fa(t){return t.replace(vu,"")===""}var G=da(1),Ms=da(-1),Eu=[];function da(t){return e;function e(n,r,s){let i=n?n.children:Eu,o=(r||0)+t,a=i[o];if(!s)for(;a&&st(a);)o+=t,a=i[o];return a}}var Au={}.hasOwnProperty;function mr(t){return e;function e(n,r,s){return Au.call(t,n.tagName)&&t[n.tagName](n,r,s)}}var un=mr({body:xu,caption:Fs,colgroup:Fs,dd:Bu,dt:Lu,head:Fs,html:Nu,li:Tu,optgroup:Ou,option:Ru,p:Iu,rp:ha,rt:ha,tbody:$u,td:pa,tfoot:Mu,th:pa,thead:Pu,tr:Fu});function Fs(t,e,n){let r=G(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&st(r.value.charAt(0)))}function Nu(t,e,n){let r=G(n,e);return!r||r.type!=="comment"}function xu(t,e,n){let r=G(n,e);return!r||r.type!=="comment"}function Iu(t,e,n){let r=G(n,e);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"||n.tagName.includes("-")))}function Tu(t,e,n){let r=G(n,e);return!r||r.type==="element"&&r.tagName==="li"}function Lu(t,e,n){let r=G(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Bu(t,e,n){let r=G(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function ha(t,e,n){let r=G(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function Ou(t,e,n){let r=G(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function Ru(t,e,n){let r=G(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Pu(t,e,n){let r=G(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function $u(t,e,n){let r=G(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function Mu(t,e,n){return!G(n,e)}function Fu(t,e,n){let r=G(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function pa(t,e,n){let r=G(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}var ga=mr({body:ju,colgroup:Uu,head:Gu,html:Du,tbody:qu});function Du(t){let e=G(t,-1);return!e||e.type!=="comment"}function Gu(t){let e=new Set;for(let r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}let n=t.children[0];return!n||n.type==="element"}function ju(t){let e=G(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&st(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Uu(t,e,n){let r=Ms(n,e);if(n&&r&&r.type==="element"&&r.tagName==="colgroup"&&un(r,n.children.indexOf(r),n))return!1;let s=G(t,-1,!0);return!!(s&&s.type==="element"&&s.tagName==="col")}function qu(t,e,n){let r=Ms(n,e);if(n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&un(r,n.children.indexOf(r),n))return!1;let s=G(t,-1);return!!(s&&s.type==="element"&&s.tagName==="tr")}var yr={name:[[`
129
+ `,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let n=er(e),r=St(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let n=er(e),r=St(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function mc(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new Yt||null,prettyErrors:e}}function bs(t,e={}){let{lineCounter:n,prettyErrors:r}=mc(e),s=new Qt(n?.addNewLine),o=new zt(e),i=Array.from(o.compose(s.parse(t)));if(r&&n)for(let a of i)a.errors.forEach(os(t,n)),a.warnings.forEach(os(t,n));return i.length>0?i:Object.assign([],{empty:!0},o.streamInfo())}var bc=(t,e)=>{let n=new Map;if(t.length>1e5)return n;let r=t.split(`
130
+ `),s=(o,i)=>{for(;i>o&&!r[i]?.trim();)i--;i>o&&n.set(o,Math.max(i,n.get(o)??0))};if(e==="json"||e==="yaml"||e==="yml"){let o=[0];for(let l=0;l<t.length;l++)t[l]===`
131
+ `&&o.push(l+1);let i=l=>{let c=0,u=o.length;for(;c+1<u;){let f=c+u>>>1;(o[f]??0)<=l?c=f:u=f}return c},a=(l,c)=>{let u=i(c-1),f=r[u]?.slice(c-(o[u]??0))??"";s(i(l),/^[\s,}\]]*(?:#.*)?$/.test(f)?u:u-1)};for(let l of bs(t))l.errors.length||se(l,(c,u)=>{if(L(u)&&T(u.key)&&T(u.value)?u.key.range&&u.value.range&&a(u.key.range[0],u.value.range[1]):B(u)&&u.flow&&u.range&&a(u.range[0],u.range[1]),te(u)&&!u.flow)for(let f of u.items)T(f)&&f.range&&a(f.range[0],f.range[1])})}else if(e==="toml"){let o=[],i=[],a="",l=0;r.forEach((c,u)=>{let f=!!a,d="";for(let h=0;h<c.length;h++){let p=c[h]??"";if(a)a[0]==='"'&&p==="\\"?h++:c.slice(h,h+a.length)===a&&(a.length===3&&s(l,u),h+=a.length-1,a="");else{if(p==="#")break;p==='"'||p==="'"?(a=c.slice(h,h+3)===p.repeat(3)?p.repeat(3):p,l=u,h+=a.length-1,d+="x"):d+=p}}if(!f&&!i.length&&/^\s*\[\[?.+\]\]?\s*$/.test(d)){o.push(u);return}for(let h of d)if(h==="["||h==="{")i.push({char:h,line:u});else if(h==="]"||h==="}"){let p=i.pop();p&&(p.char==="["?h==="]":h==="}")&&s(p.line,u)}}),o.forEach((c,u)=>{s(c,(o[u+1]??r.length)-1)})}return n},ui=new WeakMap,fi=(t,e,n,r)=>{let s=bc(e,n);if(!r.length&&!s.size)return;let o=ui.get(t);(!o||o.source!==e||o.language!==n)&&(o={source:e,language:n,folded:new Set},ui.set(t,o));let i=o.folded,a=e.split(`
132
+ `),l=[],c=[],u=()=>{let f=-1;c.forEach((d,h)=>{d.hidden=h<=f,d.classList.toggle("code-line-folded",i.has(h));let p=d.querySelector("button");if(p){let g=i.has(h)?"Expand section":"Collapse section",m=window.__docsTranslate;p.setAttribute("aria-expanded",String(!i.has(h))),p.setAttribute("aria-label",m?.(g)??g),p.title=p.getAttribute("aria-label")??g,p.dataset.i18nTitle=g,p.dataset.i18nAriaLabel=g}i.has(h)&&(f=Math.max(f,s.get(h)??h))})};a.forEach((f,d)=>{let h=document.createElement("span");h.className="code-line";let p=document.createElement("span");p.className="code-line-text";let g=r[d];for(let m of g?.map(y=>y.content).join("")===f?g:[{content:f}]){let y=document.createElement("span");m.color&&(y.style.color=m.color),y.textContent=m.content,p.append(y)}if(s.has(d)){let m=document.createElement("button");m.type="button",m.className="code-section-fold",m.innerHTML='<svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m4 6 4 4 4-4"/></svg>',m.addEventListener("click",()=>{i.delete(d)||i.add(d),u()}),h.append(m)}h.append(p),d<a.length-1&&h.append(document.createTextNode(`
133
+ `)),c.push(h),l.push(h)}),t.classList.toggle("code-foldable",s.size>0),t.replaceChildren(...l),u()};var P=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function wc(t){return xs(t)}function xs(t){return Array.isArray(t)?kc(t):t instanceof RegExp?t:typeof t=="object"?Sc(t):t}function kc(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=xs(t[n]);return e}function Sc(t){let e={};for(let n in t)e[n]=xs(t[n]);return e}function ki(t,...e){return e.forEach(n=>{for(let r in n)t[r]=n[r]}),t}function Si(t){let e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?Si(t.substring(0,t.length-1)):t.substr(~e+1)}var ws=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,nr=class{static hasCaptures(t){return t===null?!1:(ws.lastIndex=0,ws.test(t))}static replaceCaptures(t,e,n){return t.replace(ws,(r,s,o,i)=>{let a=n[parseInt(s||o,10)];if(a){let l=e.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(i){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function Ci(t,e){return t<e?-1:t>e?1:0}function _i(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let s=0;s<n;s++){let o=Ci(t[s],e[s]);if(o!==0)return o}return 0}return n-r}function di(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function vi(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Ei=class{constructor(t){this.fn=t}fn;cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);let e=this.fn(t);return this.cache.set(t,e),e}},en=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}_colorMap;_defaults;_root;static createFromRawTheme(t,e){return this.createFromParsedTheme(vc(t),e)}static createFromParsedTheme(t,e){return Ac(t,e)}_cachedMatchRoot=new Ei(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;let e=t.scopeName,r=this._cachedMatchRoot.get(e).find(s=>Cc(t.parent,s.parentScopes));return r?new Ai(r.fontStyle,r.foreground,r.background):null}},ks=class rr{constructor(e,n){this.parent=e,this.scopeName=n}parent;scopeName;static push(e,n){for(let r of n)e=new rr(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new rr(n,e[r]);return n}push(e){return new rr(this,e)}getSegments(){let e=this,n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){let n=[],r=this;for(;r&&r!==e;)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function Cc(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],s=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],s=!0}for(;t&&!_c(t.scopeName,r);){if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function _c(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var Ai=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}fontStyle;foregroundId;backgroundId};function vc(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let s=0,o=e.length;s<o;s++){let i=e[s];if(!i.settings)continue;let a;if(typeof i.scope=="string"){let f=i.scope;f=f.replace(/^[,]+/,""),f=f.replace(/[,]+$/,""),a=f.split(",")}else Array.isArray(i.scope)?a=i.scope:a=[""];let l=-1;if(typeof i.settings.fontStyle=="string"){l=0;let f=i.settings.fontStyle.split(" ");for(let d=0,h=f.length;d<h;d++)switch(f[d]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let c=null;typeof i.settings.foreground=="string"&&di(i.settings.foreground)&&(c=i.settings.foreground);let u=null;typeof i.settings.background=="string"&&di(i.settings.background)&&(u=i.settings.background);for(let f=0,d=a.length;f<d;f++){let p=a[f].trim().split(" "),g=p[p.length-1],m=null;p.length>1&&(m=p.slice(0,p.length-1),m.reverse()),n[r++]=new Ec(g,m,s,l,c,u)}}return n}var Ec=class{constructor(t,e,n,r,s,o){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=s,this.background=o}scope;parentScopes;index;fontStyle;foreground;background},K=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(K||{});function Ac(t,e){t.sort((l,c)=>{let u=Ci(l.scope,c.scope);return u!==0||(u=_i(l.parentScopes,c.parentScopes),u!==0)?u:l.index-c.index});let n=0,r="#000000",s="#ffffff";for(;t.length>=1&&t[0].scope==="";){let l=t.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(s=l.background)}let o=new Nc(e),i=new Ai(n,o.getId(r),o.getId(s)),a=new Ic(new Cs(0,null,-1,0,0),[]);for(let l=0,c=t.length;l<c;l++){let u=t[l];a.insert(0,u.scope,u.parentScopes,u.fontStyle,o.getId(u.foreground),o.getId(u.background))}return new en(o,i,a)}var Nc=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},xc=Object.freeze([]),Cs=class Ni{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,s,o){this.scopeDepth=e,this.parentScopes=n||xc,this.fontStyle=r,this.foreground=s,this.background=o}clone(){return new Ni(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,s=e.length;r<s;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),s!==0&&(this.background=s)}},Ic=class _s{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_mainRule;_children;_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,s=0;for(;e.parentScopes[r]===">"&&r++,n.parentScopes[s]===">"&&s++,!(r>=e.parentScopes.length||s>=n.parentScopes.length);){let o=n.parentScopes[s].length-e.parentScopes[r].length;if(o!==0)return o;r++,s++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),s,o;if(r===-1?(s=e,o=""):(s=e.substring(0,r),o=e.substring(r+1)),this._children.hasOwnProperty(s))return this._children[s].match(o)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(_s._cmpBySpecificity),n}insert(e,n,r,s,o,i){if(n===""){this._doInsertHere(e,r,s,o,i);return}let a=n.indexOf("."),l,c;a===-1?(l=n,c=""):(l=n.substring(0,a),c=n.substring(a+1));let u;this._children.hasOwnProperty(l)?u=this._children[l]:(u=new _s(this._mainRule.clone(),Cs.cloneArr(this._rulesWithParentScopes)),this._children[l]=u),u.insert(e+1,c,r,s,o,i)}_doInsertHere(e,n,r,s,o){if(n===null){this._mainRule.acceptOverwrite(e,r,s,o);return}for(let i=0,a=this._rulesWithParentScopes.length;i<a;i++){let l=this._rulesWithParentScopes[i];if(_i(l.parentScopes,n)===0){l.acceptOverwrite(e,r,s,o);return}}r===-1&&(r=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Cs(e,n,r,s,o))}},Ve=class ie{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){let n=ie.getLanguageId(e),r=ie.getTokenType(e),s=ie.getFontStyle(e),o=ie.getForeground(e),i=ie.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:s,foreground:o,background:i})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,s,o,i,a){let l=ie.getLanguageId(e),c=ie.getTokenType(e),u=ie.containsBalancedBrackets(e)?1:0,f=ie.getFontStyle(e),d=ie.getForeground(e),h=ie.getBackground(e);return n!==0&&(l=n),r!==8&&(c=r),s!==null&&(u=s?1:0),o!==-1&&(f=o),i!==0&&(d=i),a!==0&&(h=a),(l<<0|c<<8|u<<10|f<<11|d<<15|h<<24)>>>0}};function or(t,e){let n=[],r=Tc(t),s=r.next();for(;s!==null;){let l=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let c=i();if(n.push({matcher:c,priority:l}),s!==",")break;s=r.next()}return n;function o(){if(s==="-"){s=r.next();let l=o();return c=>!!l&&!l(c)}if(s==="("){s=r.next();let l=a();return s===")"&&(s=r.next()),l}if(hi(s)){let l=[];do l.push(s),s=r.next();while(hi(s));return c=>e(l,c)}return null}function i(){let l=[],c=o();for(;c;)l.push(c),c=o();return u=>l.every(f=>f(u))}function a(){let l=[],c=i();for(;c&&(l.push(c),s==="|"||s===",");){do s=r.next();while(s==="|"||s===",");c=i()}return u=>l.some(f=>f(u))}}function hi(t){return!!t&&!!t.match(/[\w\.:]+/)}function Tc(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;let r=n[0];return n=e.exec(t),r}}}function xi(t){typeof t.dispose=="function"&&t.dispose()}var tn=class{constructor(t){this.scopeName=t}scopeName;toKey(){return this.scopeName}},Lc=class{constructor(t,e){this.scopeName=t,this.ruleName=e}scopeName;ruleName;toKey(){return`${this.scopeName}#${this.ruleName}`}},Bc=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){let e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},Rc=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new tn(this.initialScopeName)]}repo;initialScopeName;seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let t=this.Q;this.Q=[];let e=new Bc;for(let n of t)Oc(n,this.initialScopeName,this.repo,e);for(let n of e.references)if(n instanceof tn){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 Oc(t,e,n,r){let s=n.lookup(t.scopeName);if(!s){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}let o=n.lookup(e);t instanceof tn?sr({baseGrammar:o,selfGrammar:s},r):vs(t.ruleName,{baseGrammar:o,selfGrammar:s,repository:s.repository},r);let i=n.injections(t.scopeName);if(i)for(let a of i)r.add(new tn(a))}function vs(t,e,n){if(e.repository&&e.repository[t]){let r=e.repository[t];ir([r],e,n)}}function sr(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&ir(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&ir(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function ir(t,e,n){for(let r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let s=r.repository?ki({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&ir(r.patterns,{...e,repository:s},n);let o=r.include;if(!o)continue;let i=Ii(o);switch(i.kind){case 0:sr({...e,selfGrammar:e.baseGrammar},n);break;case 1:sr(e,n);break;case 2:vs(i.ruleName,{...e,repository:s},n);break;case 3:case 4:let a=i.scopeName===e.selfGrammar.scopeName?e.selfGrammar:i.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){let l={baseGrammar:e.baseGrammar,selfGrammar:a,repository:s};i.kind===4?vs(i.ruleName,l,n):sr(l,n)}else i.kind===4?n.add(new Lc(i.scopeName,i.ruleName)):n.add(new tn(i.scopeName));break}}}var Pc=class{kind=0},$c=class{kind=1},Mc=class{constructor(t){this.ruleName=t}ruleName;kind=2},Fc=class{constructor(t){this.scopeName=t}scopeName;kind=3},Dc=class{constructor(t,e){this.scopeName=t,this.ruleName=e}scopeName;ruleName;kind=4};function Ii(t){if(t==="$base")return new Pc;if(t==="$self")return new $c;let e=t.indexOf("#");if(e===-1)return new Fc(t);if(e===0)return new Mc(t.substring(1));{let n=t.substring(0,e),r=t.substring(e+1);return new Dc(n,r)}}var Gc=/\\(\d+)/,pi=/\\(\d+)/g,jc=-1,Ti=-2;var sn=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=nr.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=nr.hasCaptures(this._contentName)}get debugName(){let t=this.$location?`${Si(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:nr.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:nr.replaceCaptures(this._contentName,t,e)}},Uc=class extends sn{retokenizeCapturedWithRuleId;constructor(t,e,n,r,s){super(t,e,n,r),this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,r){throw new Error("Not supported!")}},qc=class extends sn{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,null),this._match=new nn(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new rn,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},gi=class extends sn{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,r),this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(let n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new rn,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Es=class extends sn{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s,o,i,a,l,c){super(t,e,n,r),this._begin=new nn(s,this.id),this.beginCaptures=o,this._end=new nn(i||"\uFFFF",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,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,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new rn;for(let n of this.patterns)t.getRule(n).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,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},ar=class extends sn{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,s,o,i,a,l){super(t,e,n,r),this._begin=new nn(s,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new nn(i,Ti),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,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new rn;for(let e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new rn,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||"\uFFFF"),this._cachedCompiledWhilePatterns}},Li=class J{static createCaptureRule(e,n,r,s,o){return e.registerRule(i=>new Uc(n,i,r,s,o))}static getCompiledRuleId(e,n,r){return e.id||n.registerRule(s=>{if(e.id=s,e.match)return new qc(e.$vscodeTextmateLocation,e.id,e.name,e.match,J._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){e.repository&&(r=ki({},r,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new gi(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,J._compilePatterns(o,n,r))}return e.while?new ar(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,J._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,J._compileCaptures(e.whileCaptures||e.captures,n,r),J._compilePatterns(e.patterns,n,r)):new Es(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,J._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,J._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,J._compilePatterns(e.patterns,n,r))}),e.id}static _compileCaptures(e,n,r){let s=[];if(e){let o=0;for(let i in e){if(i==="$vscodeTextmateLocation")continue;let a=parseInt(i,10);a>o&&(o=a)}for(let i=0;i<=o;i++)s[i]=null;for(let i in e){if(i==="$vscodeTextmateLocation")continue;let a=parseInt(i,10),l=0;e[i].patterns&&(l=J.getCompiledRuleId(e[i],n,r)),s[a]=J.createCaptureRule(n,e[i].$vscodeTextmateLocation,e[i].name,e[i].contentName,l)}}return s}static _compilePatterns(e,n,r){let s=[];if(e)for(let o=0,i=e.length;o<i;o++){let a=e[o],l=-1;if(a.include){let c=Ii(a.include);switch(c.kind){case 0:case 1:l=J.getCompiledRuleId(r[a.include],n,r);break;case 2:let u=r[c.ruleName];u&&(l=J.getCompiledRuleId(u,n,r));break;case 3:case 4:let f=c.scopeName,d=c.kind===4?c.ruleName:null,h=n.getExternalGrammar(f,r);if(h)if(d){let p=h.repository[d];p&&(l=J.getCompiledRuleId(p,n,h.repository))}else l=J.getCompiledRuleId(h.repository.$self,n,h.repository);break}}else l=J.getCompiledRuleId(a,n,r);if(l!==-1){let c=n.getRule(l),u=!1;if((c instanceof gi||c instanceof Es||c instanceof ar)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;s.push(l)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},nn=class Bi{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){let r=e.length,s=0,o=[],i=!1;for(let a=0;a<r;a++)if(e.charAt(a)==="\\"&&a+1<r){let c=e.charAt(a+1);c==="z"?(o.push(e.substring(s,a)),o.push("$(?!\\n)(?<!\\n)"),s=a+2):(c==="A"||c==="G")&&(i=!0),a++}this.hasAnchor=i,s===0?this.source=e:(o.push(e.substring(s,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Gc.test(this.source):this.hasBackReferences=!1}clone(){return new Bi(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,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(s=>e.substring(s.start,s.end));return pi.lastIndex=0,this.source.replace(pi,(s,o)=>vi(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],r=[],s=[],o,i,a,l;for(o=0,i=this.source.length;o<i;o++)a=this.source.charAt(o),e[o]=a,n[o]=a,r[o]=a,s[o]=a,a==="\\"&&o+1<i&&(l=this.source.charAt(o+1),l==="A"?(e[o+1]="\uFFFF",n[o+1]="\uFFFF",r[o+1]="A",s[o+1]="A"):l==="G"?(e[o+1]="\uFFFF",n[o+1]="G",r[o+1]="\uFFFF",s[o+1]="G"):(e[o+1]=l,n[o+1]=l,r[o+1]=l,s[o+1]=l),o++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},rn=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){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(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new mi(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let r=this._items.map(s=>s.resolveAnchors(e,n));return new mi(t,r,this._items.map(s=>s.ruleId))}},mi=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}regExps;rules;scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){let t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
134
+ `)}findNextMatchSync(t,e,n){let r=this.scanner.findNextMatchSync(t,e,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Ss=class{constructor(t,e){this.languageId=t,this.tokenType=e}languageId;tokenType},Hc=class As{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,n){this._defaultAttributes=new Ss(e,8),this._embeddedLanguagesMatcher=new Wc(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?As._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new Ss(0,0);_getBasicScopeAttributes=new Ei(e=>{let n=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new Ss(n,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){let n=e.match(As.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!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Wc=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);let e=t.map(([n,r])=>vi(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;let e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},ow={InDebugMode:typeof process<"u"&&!!process.env.VSCODE_TEXTMATE_DEBUG},Ri=!1,yi=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}stack;stoppedEarly};function Oi(t,e,n,r,s,o,i,a){let l=e.content.length,c=!1,u=-1;if(i){let h=Kc(t,e,n,r,s,o);s=h.stack,r=h.linePos,n=h.isFirstLine,u=h.anchorPosition}let f=Date.now();for(;!c;){if(a!==0&&Date.now()-f>a)return new yi(s,!0);d()}return new yi(s,!1);function d(){let h=Vc(t,e,n,r,s,u);if(!h){o.produce(s,l),c=!0;return}let p=h.captureIndices,g=h.matchedRuleId,m=p&&p.length>0?p[0].end>r:!1;if(g===jc){let y=s.getRule(t);o.produce(s,p[0].start),s=s.withContentNameScopesList(s.nameScopesList),Xt(t,e,n,s,o,y.endCaptures,p),o.produce(s,p[0].end);let b=s;if(s=s.parent,u=b.getAnchorPos(),!m&&b.getEnterPos()===r){s=b,o.produce(s,l),c=!0;return}}else{let y=t.getRule(g);o.produce(s,p[0].start);let b=s,w=y.getName(e.content,p),S=s.contentNameScopesList.pushAttributed(w,t);if(s=s.push(g,r,u,p[0].end===l,null,S,S),y instanceof Es){let C=y;Xt(t,e,n,s,o,C.beginCaptures,p),o.produce(s,p[0].end),u=p[0].end;let E=C.getContentName(e.content,p),x=S.pushAttributed(E,t);if(s=s.withContentNameScopesList(x),C.endHasBackReferences&&(s=s.withEndRule(C.getEndWithResolvedBackReferences(e.content,p))),!m&&b.hasSameRuleAs(s)){s=s.pop(),o.produce(s,l),c=!0;return}}else if(y instanceof ar){let C=y;Xt(t,e,n,s,o,C.beginCaptures,p),o.produce(s,p[0].end),u=p[0].end;let E=C.getContentName(e.content,p),x=S.pushAttributed(E,t);if(s=s.withContentNameScopesList(x),C.whileHasBackReferences&&(s=s.withEndRule(C.getWhileWithResolvedBackReferences(e.content,p))),!m&&b.hasSameRuleAs(s)){s=s.pop(),o.produce(s,l),c=!0;return}}else if(Xt(t,e,n,s,o,y.captures,p),o.produce(s,p[0].end),s=s.pop(),!m){s=s.safePop(),o.produce(s,l),c=!0;return}}p[0].end>r&&(r=p[0].end,n=!1)}}function Kc(t,e,n,r,s,o){let i=s.beginRuleCapturedEOL?0:-1,a=[];for(let l=s;l;l=l.pop()){let c=l.getRule(t);c instanceof ar&&a.push({rule:c,stack:l})}for(let l=a.pop();l;l=a.pop()){let{ruleScanner:c,findOptions:u}=Yc(l.rule,t,l.stack.endRule,n,r===i),f=c.findNextMatchSync(e,r,u);if(f){if(f.ruleId!==Ti){s=l.stack.pop();break}f.captureIndices&&f.captureIndices.length&&(o.produce(l.stack,f.captureIndices[0].start),Xt(t,e,n,l.stack,o,l.rule.whileCaptures,f.captureIndices),o.produce(l.stack,f.captureIndices[0].end),i=f.captureIndices[0].end,f.captureIndices[0].end>r&&(r=f.captureIndices[0].end,n=!1))}else{s=l.stack.pop();break}}return{stack:s,linePos:r,anchorPosition:i,isFirstLine:n}}function Vc(t,e,n,r,s,o){let i=zc(t,e,n,r,s,o),a=t.getInjections();if(a.length===0)return i;let l=Jc(a,t,e,n,r,s,o);if(!l)return i;if(!i)return l;let c=i.captureIndices[0].start,u=l.captureIndices[0].start;return u<c||l.priorityMatch&&u===c?l:i}function zc(t,e,n,r,s,o){let i=s.getRule(t),{ruleScanner:a,findOptions:l}=Pi(i,t,s.endRule,n,r===o),c=a.findNextMatchSync(e,r,l);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Jc(t,e,n,r,s,o,i){let a=Number.MAX_VALUE,l=null,c,u=0,f=o.contentNameScopesList.getScopeNames();for(let d=0,h=t.length;d<h;d++){let p=t[d];if(!p.matcher(f))continue;let g=e.getRule(p.ruleId),{ruleScanner:m,findOptions:y}=Pi(g,e,null,r,s===i),b=m.findNextMatchSync(n,s,y);if(!b)continue;let w=b.captureIndices[0].start;if(!(w>=a)&&(a=w,l=b.captureIndices,c=b.ruleId,u=p.priority,a===s))break}return l?{priorityMatch:u===-1,captureIndices:l,matchedRuleId:c}:null}function Pi(t,e,n,r,s){if(Ri){let i=t.compile(e,n),a=$i(r,s);return{ruleScanner:i,findOptions:a}}return{ruleScanner:t.compileAG(e,n,r,s),findOptions:0}}function Yc(t,e,n,r,s){if(Ri){let i=t.compileWhile(e,n),a=$i(r,s);return{ruleScanner:i,findOptions:a}}return{ruleScanner:t.compileWhileAG(e,n,r,s),findOptions:0}}function $i(t,e){let n=0;return t||(n|=1),e||(n|=4),n}function Xt(t,e,n,r,s,o,i){if(o.length===0)return;let a=e.content,l=Math.min(o.length,i.length),c=[],u=i[0].end;for(let f=0;f<l;f++){let d=o[f];if(d===null)continue;let h=i[f];if(h.length===0)continue;if(h.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=h.start;)s.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?s.produceFromScopes(c[c.length-1].scopes,h.start):s.produce(r,h.start),d.retokenizeCapturedWithRuleId){let g=d.getName(a,i),m=r.contentNameScopesList.pushAttributed(g,t),y=d.getContentName(a,i),b=m.pushAttributed(y,t),w=r.push(d.retokenizeCapturedWithRuleId,h.start,-1,!1,null,m,b),S=t.createOnigString(a.substring(0,h.end));Oi(t,S,n&&h.start===0,h.start,w,s,!1,0),xi(S);continue}let p=d.getName(a,i);if(p!==null){let m=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(p,t);c.push(new Qc(m,h.end))}}for(;c.length>0;)s.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var Qc=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function Xc(t,e,n,r,s,o,i,a){return new eu(t,e,n,r,s,o,i,a)}function bi(t,e,n,r,s){let o=or(e,lr),i=Li.getCompiledRuleId(n,r,s.repository);for(let a of o)t.push({debugSelector:e,matcher:a.matcher,ruleId:i,grammar:s,priority:a.priority})}function lr(t,e){if(e.length<t.length)return!1;let n=0;return t.every(r=>{for(let s=n;s<e.length;s++)if(Zc(e[s],r))return n=s+1,!0;return!1})}function Zc(t,e){if(!t)return!1;if(t===e)return!0;let n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var eu=class{constructor(t,e,n,r,s,o,i,a){if(this._rootScopeName=t,this.balancedBracketSelectors=o,this._onigLib=a,this._basicScopeAttributesProvider=new Hc(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=wi(e,null),this._injections=null,this._tokenTypeMatchers=[],s)for(let l of Object.keys(s)){let c=or(l,lr);for(let u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:s[l]})}}_rootScopeName;balancedBracketSelectors;_onigLib;_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){let t={lookup:s=>s===this._rootScopeName?this._grammar:this.getExternalGrammar(s),injections:s=>this._grammarRepository.injections(s)},e=[],n=this._rootScopeName,r=t.lookup(n);if(r){let s=r.injections;if(s)for(let i in s)bi(e,i,s[i],this,r);let o=this._grammarRepository.injections(n);o&&o.forEach(i=>{let a=this.getExternalGrammar(i);if(a){let l=a.injectionSelector;l&&bi(e,l,a,this,a)}})}return e.sort((s,o)=>s.priority-o.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){let e=++this._lastRuleId,n=t(e);return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){let n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=wi(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){let r=this._tokenize(t,e,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(t,e,n=0){let r=this._tokenize(t,e,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(t,e,n,r){this._rootId===-1&&(this._rootId=Li.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let s;if(!e||e===Ns.NULL){s=!0;let c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),f=Ve.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),d=this.getRule(this._rootId).getName(null,null),h;d?h=Zt.createRootAndLookUpScopeName(d,f,this):h=Zt.createRoot("unknown",f),e=new Ns(null,this._rootId,-1,-1,!1,null,h,h)}else s=!1,e.reset();t=t+`
135
+ `;let o=this.createOnigString(t),i=o.content.length,a=new nu(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),l=Oi(this,o,s,0,e,a,!0,r);return xi(o),{lineLength:i,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function wi(t,e){return t=wc(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var Zt=class Ee{constructor(e,n,r){this.parent=e,this.scopePath=n,this.tokenAttributes=r}parent;scopePath;tokenAttributes;static fromExtension(e,n){let r=e,s=e?.scopePath??null;for(let o of n)s=ks.push(s,o.scopeNames),r=new Ee(r,s,o.encodedTokenAttributes);return r}static createRoot(e,n){return new Ee(null,new ks(null,e),n)}static createRootAndLookUpScopeName(e,n,r){let s=r.getMetadataForScope(e),o=new ks(null,e),i=r.themeProvider.themeMatch(o),a=Ee.mergeAttributes(n,s,i);return new Ee(null,o,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return Ee.equals(this,e)}static equals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,r){let s=-1,o=0,i=0;return r!==null&&(s=r.fontStyle,o=r.foregroundId,i=r.backgroundId),Ve.set(e,n.languageId,n.tokenType,null,s,o,i)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return Ee._pushAttributed(this,e,n);let r=e.split(/ /g),s=this;for(let o of r)s=Ee._pushAttributed(s,o,n);return s}static _pushAttributed(e,n,r){let s=r.getMetadataForScope(n),o=e.scopePath.push(n),i=r.themeProvider.themeMatch(o),a=Ee.mergeAttributes(e.tokenAttributes,s,i);return new Ee(e,o,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let n=[],r=this;for(;r&&r!==e;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?n.reverse():void 0}},Ns=class tt{constructor(e,n,r,s,o,i,a,l){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=i,this.nameScopesList=a,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=s}parent;ruleId;beginRuleCapturedEOL;endRule;nameScopesList;contentNameScopesList;_stackElementBrand=void 0;static NULL=new tt(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return e===null?!1:tt._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?Zt.equals(e.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){tt._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,r,s,o,i,a){return new tt(this,e,n,r,s,o,i,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new tt(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,n){let r=Zt.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new tt(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Zt.fromExtension(r,n.contentNameScopesList))}},tu=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):or(n,lr).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>or(n,lr).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(let e of this.unbalancedBracketScopes)if(e(t))return!1;for(let e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},nu=class{constructor(t,e,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}balancedBracketSelectors;_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let r=t?.tokenAttributes??0,s=!1;if(this.balancedBracketSelectors?.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let o=t?.getScopeNames()??[];for(let i of this._tokenTypeOverrides)i.matcher(o)&&(r=Ve.set(r,0,i.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(o))}if(s&&(r=Ve.set(r,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=e;return}let n=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let r=0,s=this._binaryTokens.length;r<s;r++)n[r]=this._binaryTokens[r];return n}},ru=class{constructor(t,e){this._onigLib=e,this._theme=t}_onigLib;_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,r,s){if(!this._grammars.has(t)){let o=this._rawGrammars.get(t);if(!o)return null;this._grammars.set(t,Xc(t,o,e,n,r,s,this,this._onigLib))}return this._grammars.get(t)}},Mi=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new ru(en.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,e){this._syncRegistry.setTheme(en.createFromRawTheme(t,e))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,e,n){return this.loadGrammarWithConfiguration(t,e,{embeddedLanguages:n})}loadGrammarWithConfiguration(t,e,n){return this._loadGrammar(t,e,n.embeddedLanguages,n.tokenTypes,new tu(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,e,n,r,s){let o=new Rc(this._syncRegistry,t);for(;o.Q.length>0;)o.Q.map(i=>this._loadSingleGrammar(i.scopeName)),o.processQueue();return this._grammarForScopeName(t,e,n,r,s)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){let e=this._options.loadGrammar(t);if(e){let n=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(e,n)}}addGrammar(t,e=[],n=0,r=null){return this._syncRegistry.addGrammar(t,e),this._grammarForScopeName(t.scopeName,n,r)}_grammarForScopeName(t,e=0,n=null,r=null,s=null){return this._syncRegistry.grammarForScopeName(t,e,n,r,s)}},cr=Ns.NULL;function an(t,e){let n=typeof t=="string"?{}:{...t.colorReplacements},r=typeof t=="string"?t:t.name;for(let[s,o]of Object.entries(e?.colorReplacements||{}))typeof o=="string"?n[s]=o:s===r&&Object.assign(n,o);return n}function Le(t,e){return t&&(e?.[t?.toLowerCase()]||t)}function Ui(t){return Array.isArray(t)?t:[t]}async function Is(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function ln(t){return!t||["plaintext","txt","text","plain"].includes(t)}function qi(t){return t==="ansi"||ln(t)}function cn(t){return t==="none"}function Hi(t){return cn(t)}var su=/(\r?\n)/g;function Ct(t,e=!1){if(t.length===0)return[["",0]];let n=t.split(su),r=0,s=[];for(let o=0;o<n.length;o+=2){let i=e?n[o]+(n[o+1]||""):n[o];s.push([i,r]),r+=n[o].length,r+=n[o+1]?.length||0}return s}var Fi={light:"#333333",dark:"#bbbbbb"},Di={light:"#fffffe",dark:"#1e1e1e"},Gi="__shiki_resolved";function ur(t){if(t?.[Gi])return t;let e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:r}=e;if(!n||!r){let a=e.settings?e.settings.find(l=>!l.name&&!l.scope):void 0;a?.settings?.foreground&&(r=a.settings.foreground),a?.settings?.background&&(n=a.settings.background),!r&&e?.colors?.["editor.foreground"]&&(r=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),r||(r=e.type==="light"?Fi.light:Fi.dark),n||(n=e.type==="light"?Di.light:Di.dark),e.fg=r,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let s=0,o=new Map;function i(a){if(o.has(a))return o.get(a);s+=1;let l=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${l}`]?i(a):(o.set(a,l),l)}e.settings=e.settings.map(a=>{let l=a.settings?.foreground&&!a.settings.foreground.startsWith("#"),c=a.settings?.background&&!a.settings.background.startsWith("#");if(!l&&!c)return a;let u={...a,settings:{...a.settings}};if(l){let f=i(a.settings.foreground);e.colorReplacements[f]=a.settings.foreground,u.settings.foreground=f}if(c){let f=i(a.settings.background);e.colorReplacements[f]=a.settings.background,u.settings.background=f}return u});for(let a of Object.keys(e.colors||{}))if((a==="editor.foreground"||a==="editor.background"||a.startsWith("terminal.ansi"))&&!e.colors[a]?.startsWith("#")){let l=i(e.colors[a]);e.colorReplacements[l]=e.colors[a],e.colors[a]=l}return Object.defineProperty(e,Gi,{enumerable:!1,writable:!1,value:!0}),e}async function Wi(t){return[...new Set((await Promise.all(t.filter(e=>!qi(e)).map(async e=>await Is(e).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function Ki(t){return(await Promise.all(t.map(async e=>Hi(e)?null:ur(await Is(e))))).filter(e=>!!e)}function Vi(t,e){if(!e)return t;if(e[t]){let n=new Set([t]);for(;e[t];){if(t=e[t],n.has(t))throw new P(`Circular alias \`${[...n].join(" -> ")} -> ${t}\``);n.add(t)}}return t}var ou=class extends Mi{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,e,n,r={}){super(t),this._resolver=t,this._themes=e,this._langs=n,this._alias=r,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){let e=ur(t);return e.name&&(this._resolvedThemes.set(e.name,e),this._loadedThemesCache=null),e}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let e=this._textmateThemeCache.get(t);e||(e=en.createFromRawTheme(t),this._textmateThemeCache.set(t,e)),this._syncRegistry.setTheme(e)}getGrammar(t){return t=Vi(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;let e=new Set([...this._langMap.values()].filter(s=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);let n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);let r=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(r.name=t.name,this._resolvedGrammars.set(t.name,r),t.aliases&&t.aliases.forEach(s=>{this._alias[s]=t.name}),this._loadedLanguagesCache=null,e.size)for(let s of e)this._syncRegistry?._grammars?.get(s.scopeName)?.dispose(),this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(let r of t)this.resolveEmbeddedLanguages(r);let e=[...this._langGraph.entries()],n=e.filter(([r,s])=>!s);if(n.length){let r=e.filter(([s,o])=>o?(o.embeddedLanguages||o.embeddedLangs)?.some(i=>n.map(([a])=>a).includes(i)):!1).filter(s=>!n.includes(s));throw new P(`Missing languages ${n.map(([s])=>`\`${s}\``).join(", ")}, required by ${r.map(([s])=>`\`${s}\``).join(", ")}`)}for(let[r,s]of e)this._resolver.addLanguage(s);for(let[r,s]of e)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);let e=t.embeddedLanguages??t.embeddedLangs;if(e)for(let n of e)this._langGraph.set(n,this._langMap.get(n))}},iu=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,e){this._onigLib={createOnigScanner:n=>t.createScanner(n),createOnigString:n=>t.createString(n)},e.forEach(n=>this.addLanguage(n))}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(e=>{this._langs.set(e,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(e=>{this._injections.get(e)||this._injections.set(e,[]),this._injections.get(e).includes(t.scopeName)||this._injections.get(e).push(t.scopeName)})}getInjections(t){let e=t.split("."),n=[];for(let r=1;r<=e.length;r++){let s=e.slice(0,r).join(".");n=[...n,...this._injections.get(s)||[]]}return n}},on=0;function Ts(t){on+=1,t.warnings!==!1&&on>=10&&on%10===0&&console.warn(`[Shiki] ${on} 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 e=!1;if(!t.engine)throw new P("`engine` option is required for synchronous mode");let n=(t.langs||[]).flat(1),r=(t.themes||[]).flat(1).map(ur),s=new ou(new iu(t.engine,n),r,n,t.langAlias),o;function i(b){return Vi(b,t.langAlias)}function a(b){m();let w=s.getGrammar(typeof b=="string"?b:b.name);if(!w)throw new P(`Language \`${b}\` not found, you may need to load it first`);return w}function l(b){if(b==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};m();let w=s.getTheme(b);if(!w)throw new P(`Theme \`${b}\` not found, you may need to load it first`);return w}function c(b){m();let w=l(b);return o!==b&&(s.setTheme(w),o=b),{theme:w,colorMap:s.getColorMap()}}function u(){return m(),s.getLoadedThemes()}function f(){return m(),s.getLoadedLanguages()}function d(...b){m(),s.loadLanguages(b.flat(1))}async function h(...b){return d(await Wi(b))}function p(...b){m();for(let w of b.flat(1))s.loadTheme(w)}async function g(...b){return m(),p(await Ki(b))}function m(){if(e)throw new P("Shiki instance has been disposed")}function y(){e||(e=!0,s.dispose(),on-=1)}return{setTheme:c,getTheme:l,getLanguage:a,getLoadedThemes:u,getLoadedLanguages:f,resolveLangAlias:i,loadLanguage:h,loadLanguageSync:d,loadTheme:g,loadThemeSync:p,dispose:y,[Symbol.dispose]:y}}async function Ls(t){t.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[e,n,r]=await Promise.all([Ki(t.themes||[]),Wi(t.langs||[]),t.engine]);return Ts({...t,themes:e,langs:n,engine:r})}var zi=new WeakMap;function un(t,e){zi.set(t,e)}function _t(t){return zi.get(t)}var fr=class Ji{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new Ji(Object.fromEntries(Ui(n).map(r=>[r,cr])),e)}constructor(...e){if(e.length===2){let[n,r]=e;this.lang=r,this._stacks=n}else{let[n,r,s]=e;this.lang=r,this._stacks={[s]:n}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return au(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function au(t){let e=[],n=new Set;function r(s){if(n.has(s))return;n.add(s);let o=s?.nameScopesList?.scopeName;o&&e.push(o),s.parent&&r(s.parent)}return r(t),e}function lu(t,e){if(!(t instanceof fr))throw new P("Invalid grammar state");return t.getInternalStack(e)}var cu=/,/,uu=/ /;function Bs(t,e,n={}){let{theme:r=t.getLoadedThemes()[0]}=n;if(ln(t.resolveLangAlias(n.lang||"text"))||cn(r))return Ct(e).map(a=>[{content:a[0],offset:a[1]}]);let{theme:s,colorMap:o}=t.setTheme(r),i=t.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==i.name)throw new P(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${i.name}"`);if(!n.grammarState.themes.includes(s.name))throw new P(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return Qi(e,i,s,o,n)}function Yi(...t){if(t.length===2)return _t(t[1]);let[e,n,r={}]=t,{lang:s="text",theme:o=e.getLoadedThemes()[0]}=r;if(ln(s)||cn(o))throw new P("Plain language does not have grammar state");if(s==="ansi")throw new P("ANSI language does not have grammar state");let{theme:i,colorMap:a}=e.setTheme(o),l=e.getLanguage(s);return new fr(Rs(n,l,i,a,r).stateStack,l.name,i.name)}function Qi(t,e,n,r,s){let o=Rs(t,e,n,r,s),i=new fr(o.stateStack,e.name,n.name);return un(o.tokens,i),o.tokens}function Rs(t,e,n,r,s){let o=an(n,s),{tokenizeMaxLineLength:i=0,tokenizeTimeLimit:a=500,includeExplanation:l=!1}=s,c=Ct(t),u=s.grammarState?lu(s.grammarState,n.name)??cr:s.grammarContextCode!=null?Rs(s.grammarContextCode,e,n,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:cr,f=[],d=[];for(let h=0,p=c.length;h<p;h++){let[g,m]=c[h];if(g===""){f=[],d.push([]);continue}if(i>0&&g.length>=i){f=[],d.push([{content:g,offset:m,color:"",fontStyle:0}]);continue}let y,b,w;l&&l!=="tokenType"&&(y=e.tokenizeLine(g,u,a),b=y.tokens,w=0);let S=e.tokenizeLine2(g,u,a),C=S.tokens.length/2;for(let E=0;E<C;E++){let x=S.tokens[2*E],_=E+1<C?S.tokens[2*E+2]:g.length;if(x===_)continue;let $=S.tokens[2*E+1],re=Le(r[Ve.getForeground($)],o),ye=Ve.getFontStyle($),R={content:g.substring(x,_),offset:m+x,color:re,fontStyle:ye};if(l==="tokenType")R.type=Ve.getTokenType($);else if(l){let Bt=[];if(l!=="scopeName")for(let Ae of n.settings){let ut;switch(typeof Ae.scope){case"string":ut=Ae.scope.split(cu).map(Gr=>Gr.trim());break;case"object":ut=Ae.scope;break;default:continue}Bt.push({settings:Ae,selectors:ut.map(Gr=>Gr.split(uu))})}R.explanation=[];let wo=0;for(;x+wo<_;){let Ae=b[w],ut=g.substring(Ae.startIndex,Ae.endIndex);wo+=ut.length,R.explanation.push({content:ut,scopes:l==="scopeName"?fu(Ae.scopes):du(Bt,Ae.scopes)}),w+=1}}f.push(R)}d.push(f),f=[],u=S.ruleStack}return{tokens:d,stateStack:u}}function fu(t){return t.map(e=>({scopeName:e}))}function du(t,e){let n=[];for(let r=0,s=e.length;r<s;r++){let o=e[r];n[r]={scopeName:o,themeMatches:pu(t,o,e.slice(0,r))}}return n}function ji(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function hu(t,e,n){if(!ji(t.at(-1),e))return!1;let r=t.length-2,s=n.length-1;for(;r>=0&&s>=0;)ji(t[r],n[s])&&(r-=1),s-=1;return r===-1}function pu(t,e,n){let r=[];for(let{selectors:s,settings:o}of t)for(let i of s)if(hu(i,e,n)){r.push(o);break}return r}function dr(t,e,n,r=Bs){let s=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),o=s.map(c=>{let u=r(t,e,{...n,theme:c.theme});return{tokens:u,state:_t(u),theme:typeof c.theme=="string"?c.theme:c.theme.name}}),i=gu(...o.map(c=>c.tokens)),a=i[0].map((c,u)=>c.map((f,d)=>{let h={content:f.content,variants:{},offset:f.offset};return"includeExplanation"in n&&n.includeExplanation&&(h.explanation=f.explanation),i.forEach((p,g)=>{let{content:m,explanation:y,offset:b,...w}=p[u][d];h.variants[s[g].color]=w}),h})),l=o[0].state?new fr(Object.fromEntries(o.map(c=>[c.theme,c.state?.getInternalStack(c.theme)])),o[0].state.lang):void 0;return l&&un(a,l),a}function gu(...t){let e=t.map(()=>[]),n=t.length;for(let r=0;r<t[0].length;r++){let s=t.map(l=>l[r]),o=e.map(()=>[]);e.forEach((l,c)=>l.push(o[c]));let i=s.map(()=>0),a=s.map(l=>l[0]);for(;a.every(l=>l);){let l=Math.min(...a.map(c=>c.content.length));for(let c=0;c<n;c++){let u=a[c];u.content.length===l?(o[c].push(u),i[c]+=1,a[c]=s[c][i[c]]):(o[c].push({...u,content:u.content.slice(0,l)}),a[c]={...u,content:u.content.slice(l),offset:u.offset+l})}}}return e}var Xi=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var Be=class{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}};Be.prototype.normal={};Be.prototype.property={};Be.prototype.space=void 0;function Os(t,e){let n={},r={};for(let s of t)Object.assign(n,s.property),Object.assign(r,s.normal);return new Be(n,r,e)}function fn(t){return t.toLowerCase()}var W=class{constructor(e,n){this.attribute=n,this.property=e}};W.prototype.attribute="";W.prototype.booleanish=!1;W.prototype.boolean=!1;W.prototype.commaOrSpaceSeparated=!1;W.prototype.commaSeparated=!1;W.prototype.defined=!1;W.prototype.mustUseProperty=!1;W.prototype.number=!1;W.prototype.overloadedBoolean=!1;W.prototype.property="";W.prototype.spaceSeparated=!1;W.prototype.space=void 0;var dn={};jr(dn,{boolean:()=>A,booleanish:()=>F,commaOrSpaceSeparated:()=>X,commaSeparated:()=>Re,number:()=>k,overloadedBoolean:()=>hr,spaceSeparated:()=>O});var mu=0,A=nt(),F=nt(),hr=nt(),k=nt(),O=nt(),Re=nt(),X=nt();function nt(){return 2**++mu}var Ps=Object.keys(dn),rt=class extends W{constructor(e,n,r,s){let o=-1;if(super(e,n),Zi(this,"space",s),typeof r=="number")for(;++o<Ps.length;){let i=Ps[o];Zi(this,Ps[o],(r&dn[i])===dn[i])}}};rt.prototype.defined=!0;function Zi(t,e,n){n&&(t[e]=n)}function ae(t){let e={},n={};for(let[r,s]of Object.entries(t.properties)){let o=new rt(r,t.transform(t.attributes||{},r),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),e[r]=o,n[fn(r)]=r,n[fn(o.attribute)]=r}return new Be(e,n,t.space)}var $s=ae({properties:{ariaActiveDescendant:null,ariaAtomic:F,ariaAutoComplete:null,ariaBusy:F,ariaChecked:F,ariaColCount:k,ariaColIndex:k,ariaColSpan:k,ariaControls:O,ariaCurrent:null,ariaDescribedBy:O,ariaDetails:null,ariaDisabled:F,ariaDropEffect:O,ariaErrorMessage:null,ariaExpanded:F,ariaFlowTo:O,ariaGrabbed:F,ariaHasPopup:null,ariaHidden:F,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:O,ariaLevel:k,ariaLive:null,ariaModal:F,ariaMultiLine:F,ariaMultiSelectable:F,ariaOrientation:null,ariaOwns:O,ariaPlaceholder:null,ariaPosInSet:k,ariaPressed:F,ariaReadOnly:F,ariaRelevant:null,ariaRequired:F,ariaRoleDescription:O,ariaRowCount:k,ariaRowIndex:k,ariaRowSpan:k,ariaSelected:F,ariaSetSize:k,ariaSort:null,ariaValueMax:k,ariaValueMin:k,ariaValueNow:k,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function pr(t,e){return e in t?t[e]:e}function gr(t,e){return pr(t,e.toLowerCase())}var ea=ae({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Re,acceptCharset:O,accessKey:O,action:null,allow:null,allowFullScreen:A,allowPaymentRequest:A,allowUserMedia:A,alpha:A,alt:null,as:null,async:A,autoCapitalize:null,autoComplete:O,autoFocus:A,autoPlay:A,blocking:O,capture:null,charSet:null,checked:A,cite:null,className:O,closedBy:null,colorSpace:null,cols:k,colSpan:k,command:null,commandFor:null,content:null,contentEditable:F,controls:A,controlsList:O,coords:k|Re,crossOrigin:null,data:null,dateTime:null,decoding:null,default:A,defer:A,dir:null,dirName:null,disabled:A,download:hr,draggable:F,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:A,formTarget:null,headers:O,height:k,hidden:hr,high:k,href:null,hrefLang:null,htmlFor:O,httpEquiv:O,id:null,imageSizes:null,imageSrcSet:null,inert:A,inputMode:null,integrity:null,is:null,isMap:A,itemId:null,itemProp:O,itemRef:O,itemScope:A,itemType:O,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:A,low:k,manifest:null,max:null,maxLength:k,media:null,method:null,min:null,minLength:k,multiple:A,muted:A,name:null,nonce:null,noModule:A,noValidate:A,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:A,optimum:k,pattern:null,ping:O,placeholder:null,playsInline:A,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:A,referrerPolicy:null,rel:O,required:A,reversed:A,rows:k,rowSpan:k,sandbox:O,scope:null,scoped:A,seamless:A,selected:A,shadowRootClonable:A,shadowRootCustomElementRegistry:A,shadowRootDelegatesFocus:A,shadowRootMode:null,shadowRootSerializable:A,shape:null,size:k,sizes:null,slot:null,span:k,spellCheck:F,src:null,srcDoc:null,srcLang:null,srcSet:null,start:k,step:null,style:null,tabIndex:k,target:null,title:null,translate:null,type:null,typeMustMatch:A,useMap:null,value:F,width:k,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:O,axis:null,background:null,bgColor:null,border:k,borderColor:null,bottomMargin:k,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:A,declare:A,event:null,face:null,frame:null,frameBorder:null,hSpace:k,leftMargin:k,link:null,longDesc:null,lowSrc:null,marginHeight:k,marginWidth:k,noResize:A,noHref:A,noShade:A,noWrap:A,object:null,profile:null,prompt:null,rev:null,rightMargin:k,rules:null,scheme:null,scrolling:F,standby:null,summary:null,text:null,topMargin:k,valueType:null,version:null,vAlign:null,vLink:null,vSpace:k,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:A,disablePictureInPicture:A,disableRemotePlayback:A,exportParts:Re,part:O,prefix:null,property:null,results:k,security:null,unselectable:null},space:"html",transform:gr});var ta=ae({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:X,accentHeight:k,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:k,amplitude:k,arabicForm:null,ascent:k,attributeName:null,attributeType:null,azimuth:k,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:k,by:null,calcMode:null,capHeight:k,className:O,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:k,diffuseConstant:k,direction:null,display:null,dur:null,divisor:k,dominantBaseline:null,download:A,dx:null,dy:null,edgeMode:null,editable:null,elevation:k,enableBackground:null,end:null,event:null,exponent:k,externalResourcesRequired:null,fill:null,fillOpacity:k,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:Re,g2:Re,glyphName:Re,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:k,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:k,horizOriginX:k,horizOriginY:k,id:null,ideographic:k,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:k,k,k1:k,k2:k,k3:k,k4:k,kernelMatrix:X,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:k,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:k,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:k,overlineThickness:k,paintOrder:null,panose1:null,path:null,pathLength:k,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:O,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:k,pointsAtY:k,pointsAtZ:k,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:X,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:X,rev:X,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:X,requiredFeatures:X,requiredFonts:X,requiredFormats:X,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:k,specularExponent:k,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:k,strikethroughThickness:k,string:null,stroke:null,strokeDashArray:X,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:k,strokeOpacity:k,strokeWidth:null,style:null,surfaceScale:k,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:X,tabIndex:k,tableValues:null,target:null,targetX:k,targetY:k,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:X,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:k,underlineThickness:k,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:k,values:null,vAlphabetic:k,vMathematical:k,vectorEffect:null,vHanging:k,vIdeographic:k,version:null,vertAdvY:k,vertOriginX:k,vertOriginY:k,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:k,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:pr});var Ms=ae({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}});var Fs=ae({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:gr});var Ds=ae({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}});var yu=/[A-Z]/g,na=/-[a-z]/g,bu=/^data[-\w.:]+$/i;function Gs(t,e){let n=fn(e),r=e,s=W;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&bu.test(e)){if(e.charAt(4)==="-"){let o=e.slice(5).replace(na,ku);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{let o=e.slice(4);if(!na.test(o)){let i=o.replace(yu,wu);i.charAt(0)!=="-"&&(i="-"+i),e="data"+i}}s=rt}return new s(r,e)}function wu(t){return"-"+t.toLowerCase()}function ku(t){return t.charAt(1).toUpperCase()}var mr=Os([$s,ea,Ms,Fs,Ds],"html"),yr=Os([$s,ta,Ms,Fs,Ds],"svg");var ra={}.hasOwnProperty;function sa(t,e){let n=e||{};function r(s,...o){let i=r.invalid,a=r.handlers;if(s&&ra.call(s,t)){let l=String(s[t]);i=ra.call(a,l)?a[l]:r.unknown}if(i)return i.call(this,s,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Su=/["&'<>`]/g,Cu=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,_u=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,vu=/[|\\{}()[\]^$+*?.]/g,oa=new WeakMap;function ia(t,e){if(t=t.replace(e.subset?Eu(e.subset):Su,r),e.subset||e.escapeOnly)return t;return t.replace(Cu,n).replace(_u,r);function n(s,o,i){return e.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,i.charCodeAt(o+2),e)}function r(s,o,i){return e.format(s.charCodeAt(0),i.charCodeAt(o+1),e)}}function Eu(t){let e=oa.get(t);return e||(e=Au(t),oa.set(t,e)),e}function Au(t){let e=[],n=-1;for(;++n<t.length;)e.push(t[n].replace(vu,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}var Nu=/[\dA-Fa-f]/;function aa(t,e,n){let r="&#x"+t.toString(16).toUpperCase();return n&&e&&!Nu.test(String.fromCharCode(e))?r:r+";"}var xu=/\d/;function la(t,e,n){let r="&#"+String(t);return n&&e&&!xu.test(String.fromCharCode(e))?r:r+";"}var ca=["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"];var br={nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",fnof:"\u0192",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",bull:"\u2022",hellip:"\u2026",prime:"\u2032",Prime:"\u2033",oline:"\u203E",frasl:"\u2044",weierp:"\u2118",image:"\u2111",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",quot:'"',amp:"&",lt:"<",gt:">",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"};var ua=["cent","copy","divide","gt","lt","not","para","times"];var fa={}.hasOwnProperty,js={},wr;for(wr in br)fa.call(br,wr)&&(js[br[wr]]=wr);var Iu=/[^\dA-Za-z]/;function da(t,e,n,r){let s=String.fromCharCode(t);if(fa.call(js,s)){let o=js[s],i="&"+o;return n&&ca.includes(o)&&!ua.includes(o)&&(!r||e&&e!==61&&Iu.test(String.fromCharCode(e)))?i:i+";"}return""}function ha(t,e,n){let r=aa(t,e,n.omitOptionalSemicolons),s;if((n.useNamedReferences||n.useShortestReferences)&&(s=da(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!s)&&n.useShortestReferences){let o=la(t,e,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return s&&(!n.useShortestReferences||s.length<r.length)?s:r}function Oe(t,e){return ia(t,Object.assign({format:ha},e))}var Tu=/^>|^->|<!--|-->|--!>|<!-$/g,Lu=[">"],Bu=["<",">"];function pa(t,e,n,r){return r.settings.bogusComments?"<?"+Oe(t.value,Object.assign({},r.settings.characterReferences,{subset:Lu}))+">":"<!--"+t.value.replace(Tu,s)+"-->";function s(o){return Oe(o,Object.assign({},r.settings.characterReferences,{subset:Bu}))}}function ga(t,e,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Us(t,e){let n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(e);for(;s!==-1;)r++,s=n.indexOf(e,s+e.length);return r}function ma(t,e){let n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function ya(t){return t.join(" ").trim()}var Ru=/[ \t\n\f\r]/g;function st(t){return typeof t=="object"?t.type==="text"?ba(t.value):!1:ba(t)}function ba(t){return t.replace(Ru,"")===""}var G=wa(1),qs=wa(-1),Ou=[];function wa(t){return e;function e(n,r,s){let o=n?n.children:Ou,i=(r||0)+t,a=o[i];if(!s)for(;a&&st(a);)i+=t,a=o[i];return a}}var Pu={}.hasOwnProperty;function kr(t){return e;function e(n,r,s){return Pu.call(t,n.tagName)&&t[n.tagName](n,r,s)}}var hn=kr({body:Mu,caption:Hs,colgroup:Hs,dd:ju,dt:Gu,head:Hs,html:$u,li:Du,optgroup:Uu,option:qu,p:Fu,rp:ka,rt:ka,tbody:Wu,td:Sa,tfoot:Ku,th:Sa,thead:Hu,tr:Vu});function Hs(t,e,n){let r=G(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&st(r.value.charAt(0)))}function $u(t,e,n){let r=G(n,e);return!r||r.type!=="comment"}function Mu(t,e,n){let r=G(n,e);return!r||r.type!=="comment"}function Fu(t,e,n){let r=G(n,e);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"||n.tagName.includes("-")))}function Du(t,e,n){let r=G(n,e);return!r||r.type==="element"&&r.tagName==="li"}function Gu(t,e,n){let r=G(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function ju(t,e,n){let r=G(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function ka(t,e,n){let r=G(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function Uu(t,e,n){let r=G(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function qu(t,e,n){let r=G(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Hu(t,e,n){let r=G(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Wu(t,e,n){let r=G(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function Ku(t,e,n){return!G(n,e)}function Vu(t,e,n){let r=G(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function Sa(t,e,n){let r=G(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}var Ca=kr({body:Yu,colgroup:Qu,head:Ju,html:zu,tbody:Xu});function zu(t){let e=G(t,-1);return!e||e.type!=="comment"}function Ju(t){let e=new Set;for(let r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}let n=t.children[0];return!n||n.type==="element"}function Yu(t){let e=G(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&st(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Qu(t,e,n){let r=qs(n,e);if(n&&r&&r.type==="element"&&r.tagName==="colgroup"&&hn(r,n.children.indexOf(r),n))return!1;let s=G(t,-1,!0);return!!(s&&s.type==="element"&&s.tagName==="col")}function Xu(t,e,n){let r=qs(n,e);if(n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&hn(r,n.children.indexOf(r),n))return!1;let s=G(t,-1);return!!(s&&s.type==="element"&&s.tagName==="tr")}var Sr={name:[[`
136
136
  \f\r &/=>`.split(""),`
137
137
  \f\r "&'/=>\``.split("")],[`\0
138
138
  \f\r "&'/<=>`.split(""),`\0
@@ -140,10 +140,10 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
140
140
  \f\r &>`.split(""),`\0
141
141
  \f\r "&'<=>\``.split("")],[`\0
142
142
  \f\r "&'<=>\``.split(""),`\0
143
- \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]},Hu=new Set(["desc","foreignObject","title"]);function ma(t,e,n,r){let{schema:s}=r,i=s.space==="svg"?!1:r.settings.omitOptionalTags,o=s.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(t.tagName.toLowerCase()),a=[];s.space==="html"&&t.tagName==="svg"&&(r.schema=hr);let l=Wu(r,t.properties);r.schema.space==="svg"&&Hu.has(t.tagName)&&(r.schema=dr);let c=r.all(s.space==="html"&&t.tagName==="template"?t.content:t);if(r.schema=s,c&&(o=!1),l||!i||!ga(t,e,n)){if(a.push("<",t.tagName,l?" "+l:""),o&&(s.space==="svg"||r.settings.closeSelfClosing)){let u=l.charAt(l.length-1);(!r.settings.tightSelfClosing||u==="/"||u&&u!=='"'&&u!=="'")&&a.push(" "),a.push("/")}a.push(">")}return a.push(c),!o&&(!i||!un(t,e,n))&&a.push("</"+t.tagName+">"),a.join("")}function Wu(t,e){let n=[],r=-1,s;if(e){for(s in e)if(e[s]!==null&&e[s]!==void 0){let i=Ku(t,s,e[s]);i&&n.push(i)}}for(;++r<n.length;){let i=t.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&i!=='"'&&i!=="'"&&(n[r]+=" ")}return n.join("")}function Ku(t,e,n){let r=Rs(t.schema,e),s=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,i=t.settings.allowDangerousCharacters?0:1;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"";let o=Re(r.attribute,Object.assign({},t.settings.characterReferences,{subset:yr.name[s][i]}));if(n===!0||(n=Array.isArray(n)?(r.commaSeparated?ca:ua)(n,{padLeft:!t.settings.tightCommaSeparatedLists}):String(n),t.settings.collapseEmptyAttributes&&!n))return o;let a;if(t.settings.preferUnquoted&&(a=Re(n,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:yr.unquoted[s][i]}))),a!==n){let{quote:l}=t;t.settings.quoteSmart&&$s(n,l)>$s(n,t.alternative)&&(l=t.alternative),a=l+Re(n,Object.assign({},t.settings.characterReferences,{subset:(l==="'"?yr.single:yr.double)[s][i],attribute:!0}))+l}return o+(a&&"="+a)}var Vu=["<","&"];function br(t,e,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:Re(t.value,Object.assign({},r.settings.characterReferences,{subset:Vu}))}function ya(t,e,n,r){return r.settings.allowDangerousHtml?t.value:br(t,e,n,r)}function ba(t,e,n,r){return r.all(t)}var wa=Qo("type",{invalid:zu,unknown:Ju,handlers:{comment:aa,doctype:la,element:ma,raw:ya,root:ba,text:br}});function zu(t){throw new Error("Expected node, not `"+t+"`")}function Ju(t){let e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}var Yu={},Qu={},Xu=[];function Ds(t,e){let n=e||Yu,r=n.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");let s=r==='"'?"'":'"';return{one:Zu,all:ef,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||Wo,characterReferences:n.characterReferences||Qu,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?hr:dr,quote:r,alternative:s}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function Zu(t,e,n){return wa(t,e,n,this)}function ef(t){let e=[],n=t&&t.children||Xu,r=-1;for(;++r<n.length;)e[r]=this.one(n[r],r,t);return e.join("")}var ka=/\s+/g;function _a(t,e){if(!e)return t;t.properties||={},t.properties.class||=[],typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(ka)),Array.isArray(t.properties.class)||(t.properties.class=[]);let n=Array.isArray(e)?e:e.split(ka);for(let r of n)r&&!t.properties.class.includes(r)&&t.properties.class.push(r);return t}function tf(t){let e=Ct(t,!0).map(([s])=>s);function n(s){if(s===t.length)return{line:e.length-1,character:e.at(-1).length};let i=s,o=0;for(let a of e){if(i<a.length)break;i-=a.length,o++}return{line:o,character:i}}function r(s,i){let o=0;for(let a=0;a<s;a++)o+=e[a].length;return o+=i,o}return{lines:e,indexToPos:n,posToIndex:r}}var nf=["color","background-color"];function rf(t,e){let n=0,r=[];for(let s of e)s>n&&r.push({...t,content:t.content.slice(n,s),offset:t.offset+n}),n=s;return n<t.content.length&&r.push({...t,content:t.content.slice(n),offset:t.offset+n}),r}function sf(t,e){let n=0,r=t.length;for(;n<r;){let s=n+(r-n>>1);t[s]<=e?n=s+1:r=s}return n}function of(t,e){let n=[...e instanceof Set?e:new Set(e)].sort((r,s)=>r-s);return n.length?t.map(r=>r.flatMap(s=>{let i=s.offset+s.content.length,o=sf(n,s.offset),a=o;for(;a<n.length&&n[a]<i;)a++;if(o===a)return s;let l=n.slice(o,a);for(let c=0;c<l.length;c++)l[c]-=s.offset;return rf(s,l)})):t}function af(t,e,n,r,s="css-vars"){let i={content:t.content,explanation:t.explanation,offset:t.offset},o=e.map(u=>wr(t.variants[u])),a=new Set(o.flatMap(u=>Object.keys(u))),l={},c=(u,f)=>{let d=f==="color"?"":f==="background-color"?"-bg":`-${f}`;return n+e[u]+(f==="color"?"":d)};return o.forEach((u,f)=>{for(let d of a){let h=u[d]||"inherit";if(f===0&&r&&nf.includes(d))if(r==="light-dark()"&&o.length>1){let p=e.findIndex(b=>b==="light"),g=e.findIndex(b=>b==="dark");if(p===-1||g===-1)throw new P('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let m=o[p][d]||"inherit",y=o[g][d]||"inherit";l[d]=`light-dark(${m}, ${y})`,s==="css-vars"&&(l[c(f,d)]=h)}else l[d]=h;else s==="css-vars"&&(l[c(f,d)]=h)}}),i.htmlStyle=l,i}function wr(t){let e={};if(t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&K.Italic&&(e["font-style"]="italic"),t.fontStyle&K.Bold&&(e["font-weight"]="bold");let n=[];t.fontStyle&K.Underline&&n.push("underline"),t.fontStyle&K.Strikethrough&&n.push("line-through"),n.length&&(e["text-decoration"]=n.join(" "))}return e}function js(t){return typeof t=="string"?t:Object.entries(t).map(([e,n])=>`${e}:${n}`).join(";")}function lf(){let t=new WeakMap;function e(n){if(!t.has(n.meta)){let s=function(o){if(typeof o=="number"){if(o<0||o>n.source.length)throw new P(`Invalid decoration offset: ${o}. Code length: ${n.source.length}`);return{...r.indexToPos(o),offset:o}}else{let a=r.lines[o.line];if(a===void 0)throw new P(`Invalid decoration position ${JSON.stringify(o)}. Lines length: ${r.lines.length}`);let l=o.character;if(l<0&&(l=a.length+l),l<0||l>a.length)throw new P(`Invalid decoration position ${JSON.stringify(o)}. Line ${o.line} length: ${a.length}`);return{...o,character:l,offset:r.posToIndex(o.line,l)}}},r=tf(n.source),i=(n.options.decorations||[]).map(o=>({...o,start:s(o.start),end:s(o.end)}));cf(i),t.set(n.meta,{decorations:i,converter:r,source:n.source})}return t.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(this.options.decorations?.length)return of(n,e(this).decorations.flatMap(r=>[r.start.offset,r.end.offset]))},code(n){if(!this.options.decorations?.length)return;let r=e(this),s=[...n.children].filter(u=>u.type==="element"&&u.tagName==="span");if(s.length!==r.converter.lines.length)throw new P(`Number of lines in code element (${s.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function i(u,f,d,h){let p=s[u],g="",m=-1,y=-1;if(f===0&&(m=0),d===0&&(y=0),d===Number.POSITIVE_INFINITY&&(y=p.children.length),m===-1||y===-1)for(let w=0;w<p.children.length;w++)g+=va(p.children[w]),m===-1&&g.length===f&&(m=w+1),y===-1&&g.length===d&&(y=w+1);if(m===-1)throw new P(`Failed to find start index for decoration ${JSON.stringify(h.start)}`);if(y===-1)throw new P(`Failed to find end index for decoration ${JSON.stringify(h.end)}`);let b=p.children.slice(m,y);if(!h.alwaysWrap&&b.length===p.children.length)a(p,h,"line");else if(!h.alwaysWrap&&b.length===1&&b[0].type==="element")a(b[0],h,"token");else{let w={type:"element",tagName:"span",properties:{},children:b};a(w,h,"wrapper"),p.children.splice(m,b.length,w)}}function o(u,f){s[u]=a(s[u],f,"line")}function a(u,f,d){let h=f.properties||{},p=f.transform||(g=>g);return u.tagName=f.tagName||"span",u.properties={...u.properties,...h,class:u.properties.class},f.properties?.class&&_a(u,f.properties.class),u=p(u,d)||u,u}let l=[],c=r.decorations.sort((u,f)=>f.start.offset-u.start.offset||u.end.offset-f.end.offset);for(let u of c){let{start:f,end:d}=u;if(f.line===d.line)i(f.line,f.character,d.character,u);else if(f.line<d.line){i(f.line,f.character,Number.POSITIVE_INFINITY,u);for(let h=f.line+1;h<d.line;h++)l.unshift(()=>o(h,u));i(d.line,0,d.character,u)}}l.forEach(u=>u())}}}function cf(t){for(let e=0;e<t.length;e++){let n=t[e];if(n.start.offset>n.end.offset)throw new P(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=e+1;r<t.length;r++){let s=t[r],i=n.start.offset<=s.start.offset&&s.start.offset<n.end.offset,o=n.start.offset<s.end.offset&&s.end.offset<=n.end.offset,a=s.start.offset<=n.start.offset&&n.start.offset<s.end.offset,l=s.start.offset<n.end.offset&&n.end.offset<=s.end.offset;if(i||o||a||l){if(i&&o||a&&l||a&&n.start.offset===n.end.offset||o&&s.start.offset===s.end.offset)continue;throw new P(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(s.start)} intersect.`)}}}}function va(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(va).join(""):""}var uf=[lf()];function kr(t){let e=ff(t.transformers||[]);return[...e.pre,...e.normal,...e.post,...uf]}function ff(t){let e=[],n=[],r=[];for(let s of t)switch(s.enforce){case"pre":e.push(s);break;case"post":n.push(s);break;default:r.push(s)}return{pre:e,post:n,normal:r}}var it=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Gs={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function df(t,e){let n=t.indexOf("\x1B",e);if(n!==-1&&t[n+1]==="["){let r=t.indexOf("m",n);if(r!==-1)return{sequence:t.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:t.length}}function Sa(t){let e=t.shift();if(e==="2"){let n=t.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(e==="5"){let n=t.shift();if(n)return{type:"table",index:Number(n)}}}function hf(t){let e=[];for(;t.length>0;){let n=t.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)e.push({type:"resetAll"});else if(r<=9)Gs[r]&&e.push({type:"setDecoration",value:Gs[r]});else if(r<=29){let s=Gs[r-20];s&&(e.push({type:"resetDecoration",value:s}),s==="dim"&&e.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)e.push({type:"setForegroundColor",value:{type:"named",name:it[r-30]}});else if(r===38){let s=Sa(t);s&&e.push({type:"setForegroundColor",value:s})}else if(r===39)e.push({type:"resetForegroundColor"});else if(r<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:it[r-40]}});else if(r===48){let s=Sa(t);s&&e.push({type:"setBackgroundColor",value:s})}else r===49?e.push({type:"resetBackgroundColor"}):r===53?e.push({type:"setDecoration",value:"overline"}):r===55?e.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?e.push({type:"setForegroundColor",value:{type:"named",name:it[r-90+8]}}):r>=100&&r<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:it[r-100+8]}})}return e}function pf(){let t=null,e=null,n=new Set;return{parse(r){let s=[],i=0;do{let o=df(r,i),a=o.sequence?r.substring(i,o.startPosition):r.substring(i);if(a.length>0&&s.push({value:a,foreground:t,background:e,decorations:new Set(n)}),o.sequence){let l=hf(o.sequence);for(let c of l)c.type==="resetAll"?(t=null,e=null,n.clear()):c.type==="resetForegroundColor"?t=null:c.type==="resetBackgroundColor"?e=null:c.type==="resetDecoration"&&n.delete(c.value);for(let c of l)c.type==="setForegroundColor"?t=c.value:c.type==="setBackgroundColor"?e=c.value:c.type==="setDecoration"&&n.add(c.value)}i=o.position}while(i<r.length);return s}}}var gf={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 mf(t=gf){function e(a){return t[a]}function n(a){return`#${a.map(l=>Math.max(0,Math.min(l,255)).toString(16).padStart(2,"0")).join("")}`}let r;function s(){if(r)return r;r=[];for(let c=0;c<it.length;c++)r.push(e(it[c]));let a=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let u=0;u<6;u++)for(let f=0;f<6;f++)r.push(n([a[c],a[u],a[f]]));let l=8;for(let c=0;c<24;c++,l+=10)r.push(n([l,l,l]));return r}function i(a){return s()[a]}function o(a){switch(a.type){case"named":return e(a.name);case"rgb":return n(a.rgb);case"table":return i(a.index)}}return{value:o}}var yf=/#([0-9a-f]{3,8})/i,bf=/var\((--[\w-]+-ansi-[\w-]+)\)/,wf={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 kf(t,e,n){let r=rn(t,n),s=Ct(e),i=mf(Object.fromEntries(it.map(a=>{let l=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`;return[a,t.colors?.[l]||wf[a]]}))),o=pf();return s.map(a=>o.parse(a[0]).map(l=>{let c,u;l.decorations.has("reverse")?(c=l.background?i.value(l.background):t.bg,u=l.foreground?i.value(l.foreground):t.fg):(c=l.foreground?i.value(l.foreground):t.fg,u=l.background?i.value(l.background):void 0),c=Le(c,r),u=Le(u,r),l.decorations.has("dim")&&(c=Sf(c));let f=K.None;return l.decorations.has("bold")&&(f|=K.Bold),l.decorations.has("italic")&&(f|=K.Italic),l.decorations.has("underline")&&(f|=K.Underline),l.decorations.has("strikethrough")&&(f|=K.Strikethrough),{content:l.value,offset:a[1],color:c,bgColor:u,fontStyle:f}}))}function Sf(t){let e=t.match(yf);if(e){let r=e[1];if(r.length===8){let s=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${s}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){let s=r[0],i=r[1],o=r[2],a=r[3];return`#${s}${s}${i}${i}${o}${o}${Math.round(Number.parseInt(`${a}${a}`,16)/2).toString(16).padStart(2,"0")}`}else if(r.length===3){let s=r[0],i=r[1],o=r[2];return`#${s}${s}${i}${i}${o}${o}80`}}}let n=t.match(bf);return n?`var(${n[1]}-dim)`:t}function Us(t,e,n={}){let r=t.resolveLangAlias(n.lang||"text"),{theme:s=t.getLoadedThemes()[0]}=n;if(!sn(r)&&!on(s)&&r==="ansi"){let{theme:i}=t.setTheme(s);return kf(i,e,n)}return As(t,e,n)}function Sr(t,e,n){let r,s,i,o,a,l;if("themes"in n){let{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:f="css-vars"}=n,d=Object.entries(n.themes).filter(y=>y[1]).map(y=>({color:y[0],theme:y[1]})).sort((y,b)=>y.color===c?-1:b.color===c?1:0);if(d.length===0)throw new P("`themes` option must not be empty");let h=lr(t,e,n,Us);if(l=_t(h),c&&c!=="light-dark()"&&!d.some(y=>y.color===c))throw new P(`\`themes\` option must contain the defaultColor key \`${c}\``);let p=d.map(y=>t.getTheme(y.theme)),g=d.map(y=>y.color);i=h.map(y=>y.map(b=>af(b,g,u,c,f))),l&&an(i,l);let m=d.map(y=>rn(y.theme,n));s=Ca(d,p,m,u,c,"fg",f),r=Ca(d,p,m,u,c,"bg",f),o=`shiki-themes ${p.map(y=>y.name).join(" ")}`,a=c?void 0:[s,r].join(";")}else if("theme"in n){let c=rn(n.theme,n);i=Us(t,e,n);let u=t.getTheme(n.theme);r=Le(u.bg,c),s=Le(u.fg,c),o=u.name,l=_t(i)}else throw new P("Invalid options, either `theme` or `themes` must be provided");return{tokens:i,fg:s,bg:r,themeName:o,rootStyle:a,grammarState:l}}function Ca(t,e,n,r,s,i,o){return t.map((a,l)=>{let c=Le(e[l][i],n[l])||"inherit",u=`${r+a.color}${i==="bg"?"-bg":""}:${c}`;if(l===0&&s){if(s==="light-dark()"&&t.length>1){let f=t.findIndex(h=>h.color==="light"),d=t.findIndex(h=>h.color==="dark");if(f===-1||d===-1)throw new P('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Le(e[f][i],n[f])||"inherit"}, ${Le(e[d][i],n[d])||"inherit"});${u}`}return c}return o==="css-vars"?u:null}).filter(a=>!!a).join(";")}var Ea=/^\s+$/,Cf=/^(\s*)(.*?)(\s*)$/;function Cr(t,e,n,r={meta:{},options:n,codeToHast:(s,i)=>Cr(t,s,i),codeToTokens:(s,i)=>Sr(t,s,i)}){let s=e;for(let p of kr(n))s=p.preprocess?.call(r,s,n)||s;let{tokens:i,fg:o,bg:a,themeName:l,rootStyle:c,grammarState:u}=Sr(t,s,n),{mergeWhitespaces:f=!0,mergeSameStyleTokens:d=!1}=n;f===!0?i=vf(i):f==="never"&&(i=Ef(i)),d&&(i=Af(i));let h={...r,get source(){return s}};for(let p of kr(n))i=p.tokens?.call(h,i)||i;return _f(i,{...n,fg:o,bg:a,themeName:l,rootStyle:n.rootStyle===!1?!1:n.rootStyle??c},h,u)}function _f(t,e,n,r=_t(t)){let s=kr(e),i=[],o={type:"root",children:[]},{structure:a="classic",tabindex:l="0"}=e,c={class:`shiki ${e.themeName||""}`};e.rootStyle!==!1&&(e.rootStyle!=null?c.style=e.rootStyle:c.style=`background-color:${e.bg};color:${e.fg}`),l!==!1&&l!=null&&(c.tabindex=l.toString());for(let[g,m]of Object.entries(e.meta||{}))g.startsWith("_")||(c[g]=m);let u={type:"element",tagName:"pre",properties:c,children:[],data:e.data},f={type:"element",tagName:"code",properties:{},children:i},d=[],h={...n,structure:a,addClassToHast:_a,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return o},get pre(){return u},get code(){return f},get lines(){return d}};if(t.forEach((g,m)=>{m&&(a==="inline"?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):a==="classic"&&i.push({type:"text",value:`
144
- `}));let y={type:"element",tagName:"span",properties:{class:"line"},children:[]},b=0;for(let w of g){let S={type:"element",tagName:"span",properties:{...w.htmlAttrs},children:[{type:"text",value:w.content}]},C=js(w.htmlStyle||wr(w));C&&(S.properties.style=C);for(let E of s)S=E?.span?.call(h,S,m+1,b,y,w)||S;a==="inline"?o.children.push(S):a==="classic"&&y.children.push(S),b+=w.content.length}if(a==="classic"){for(let w of s)y=w?.line?.call(h,y,m+1)||y;d.push(y),i.push(y)}else a==="inline"&&d.push(y)}),a==="classic"){for(let g of s)f=g?.code?.call(h,f)||f;u.children.push(f);for(let g of s)u=g?.pre?.call(h,u)||u;o.children.push(u)}else if(a==="inline"){let g=[],m={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(let b of o.children)b.type==="element"&&b.tagName==="br"?(g.push(m),m={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(b.type==="element"||b.type==="text")&&m.children.push(b);g.push(m);let y={type:"element",tagName:"code",properties:{},children:g};for(let b of s)y=b?.code?.call(h,y)||y;o.children=[];for(let b=0;b<y.children.length;b++){b>0&&o.children.push({type:"element",tagName:"br",properties:{},children:[]});let w=y.children[b];w.type==="element"&&o.children.push(...w.children)}}let p=o;for(let g of s)p=g?.root?.call(h,p)||p;return r&&an(p,r),p}function vf(t){return t.map(e=>{let n=[],r="",s;return e.forEach((i,o)=>{let a=!(i.fontStyle&&(i.fontStyle&K.Underline||i.fontStyle&K.Strikethrough));a&&Ea.test(i.content)&&e[o+1]?(s===void 0&&(s=i.offset),r+=i.content):r?(a?n.push({...i,offset:s,content:r+i.content}):n.push({content:r,offset:s},i),s=void 0,r=""):n.push(i)}),n})}function Ef(t){return t.map(e=>e.flatMap(n=>{if(Ea.test(n.content))return n;let r=n.content.match(Cf);if(!r)return n;let[,s,i,o]=r;if(!s&&!o)return n;let a=[{...n,offset:n.offset+s.length,content:i}];return s&&a.unshift({content:s,offset:n.offset}),o&&a.push({content:o,offset:n.offset+s.length+i.length}),a}))}function Af(t){return t.map(e=>{let n=[];for(let r of e){if(n.length===0){n.push({...r});continue}let s=n.at(-1),i=js(s.htmlStyle||wr(s)),o=js(r.htmlStyle||wr(r)),a=s.fontStyle&&(s.fontStyle&K.Underline||s.fontStyle&K.Strikethrough),l=r.fontStyle&&(r.fontStyle&K.Underline||r.fontStyle&K.Strikethrough);!a&&!l&&i===o?s.content+=r.content:n.push({...r})}return n})}var Nf=Ds;function xf(t,e,n){let r={meta:{},options:n,codeToHast:(i,o)=>Cr(t,i,o),codeToTokens:(i,o)=>Sr(t,i,o)},s=Nf(Cr(t,e,n,r));for(let i of kr(n))s=i.postprocess?.call(r,s,n)||s;return s}async function Aa(t){let e=await Es(t);return{getLastGrammarState:(...n)=>qo(e,...n),codeToTokensBase:(n,r)=>Us(e,n,r),codeToTokensWithThemes:(n,r)=>lr(e,n,r),codeToTokens:(n,r)=>Sr(e,n,r),codeToHast:(n,r)=>Cr(e,n,r),codeToHtml:(n,r)=>xf(e,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function If(t){return!t.sticky&&!t.rawOptions?.strategy}function Na(t,e){return{index:t,captureIndices:e.map(n=>n==null?{start:4294967295,end:4294967295,length:0}:{start:n[0],end:n[1],length:n[1]-n[0]})}}var xa=class{patterns;options;regexps;lastSearches;constructor(t,e={}){this.patterns=t,this.options=e;let{forgiving:n=!1,cache:r,regexConstructor:s}=e;if(!s)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(i=>{if(typeof i!="string")return i;let o=r?.get(i);if(o){if(o instanceof RegExp)return o;if(n)return null;throw o}try{let a=s(i);return r?.set(i,a),a}catch(a){if(r?.set(i,a),n)return null;throw a}}),this.lastSearches=this.regexps.map(i=>i&&If(i)?{strId:0,searchedFrom:0,matchIndex:-1,indices:null}:null)}findNextMatchSync(t,e,n){let r=typeof t=="string"?t:t.content,s=typeof t=="string"?0:t.id||0,i=-1,o=0,a=null;for(let l=0;l<this.regexps.length;l++){let c=this.regexps[l];if(c)try{let u=s?this.lastSearches[l]:null,f,d;if(u&&u.strId===s&&u.searchedFrom<=e&&(u.matchIndex===-1||u.matchIndex>=e))f=u.matchIndex,d=u.indices;else{c.lastIndex=e;let h=c.exec(r);f=h?h.index:-1,d=h?h.indices:null,u&&(u.strId=s,u.searchedFrom=e,u.matchIndex=f,u.indices=d)}if(f===-1)continue;if(f===e)return Na(l,d);(i===-1||f<o)&&(i=l,o=f,a=d)}catch(u){if(this.options.forgiving)continue;throw u}}return i===-1?null:Na(i,a)}},Tf=0;function Ia(t){return{content:t,id:++Tf}}function ze(t){if([...t].length!==1)throw new Error(`Expected "${t}" to be a single code point`);return t.codePointAt(0)}function Ta(t,e,n){return t.has(e)||t.set(e,n),t.get(e)}var fn=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),U=String.raw;function Pe(t,e){if(t==null)throw new Error(e??"Value expected");return t}var $a=U`\[\^?`,Ma=`c.? | C(?:-.?)?|${U`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${U`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${U`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${U`o\{[^\}]*\}?`}|${U`\d{1,3}`}`,Hs=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,_r=new RegExp(U`
143
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]},Zu=new Set(["desc","foreignObject","title"]);function _a(t,e,n,r){let{schema:s}=r,o=s.space==="svg"?!1:r.settings.omitOptionalTags,i=s.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(t.tagName.toLowerCase()),a=[];s.space==="html"&&t.tagName==="svg"&&(r.schema=yr);let l=ef(r,t.properties);r.schema.space==="svg"&&Zu.has(t.tagName)&&(r.schema=mr);let c=r.all(s.space==="html"&&t.tagName==="template"?t.content:t);if(r.schema=s,c&&(i=!1),l||!o||!Ca(t,e,n)){if(a.push("<",t.tagName,l?" "+l:""),i&&(s.space==="svg"||r.settings.closeSelfClosing)){let u=l.charAt(l.length-1);(!r.settings.tightSelfClosing||u==="/"||u&&u!=='"'&&u!=="'")&&a.push(" "),a.push("/")}a.push(">")}return a.push(c),!i&&(!o||!hn(t,e,n))&&a.push("</"+t.tagName+">"),a.join("")}function ef(t,e){let n=[],r=-1,s;if(e){for(s in e)if(e[s]!==null&&e[s]!==void 0){let o=tf(t,s,e[s]);o&&n.push(o)}}for(;++r<n.length;){let o=t.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&o!=='"'&&o!=="'"&&(n[r]+=" ")}return n.join("")}function tf(t,e,n){let r=Gs(t.schema,e),s=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,o=t.settings.allowDangerousCharacters?0:1;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"";let i=Oe(r.attribute,Object.assign({},t.settings.characterReferences,{subset:Sr.name[s][o]}));if(n===!0||(n=Array.isArray(n)?(r.commaSeparated?ma:ya)(n,{padLeft:!t.settings.tightCommaSeparatedLists}):String(n),t.settings.collapseEmptyAttributes&&!n))return i;let a;if(t.settings.preferUnquoted&&(a=Oe(n,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:Sr.unquoted[s][o]}))),a!==n){let{quote:l}=t;t.settings.quoteSmart&&Us(n,l)>Us(n,t.alternative)&&(l=t.alternative),a=l+Oe(n,Object.assign({},t.settings.characterReferences,{subset:(l==="'"?Sr.single:Sr.double)[s][o],attribute:!0}))+l}return i+(a&&"="+a)}var nf=["<","&"];function Cr(t,e,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:Oe(t.value,Object.assign({},r.settings.characterReferences,{subset:nf}))}function va(t,e,n,r){return r.settings.allowDangerousHtml?t.value:Cr(t,e,n,r)}function Ea(t,e,n,r){return r.all(t)}var Aa=sa("type",{invalid:rf,unknown:sf,handlers:{comment:pa,doctype:ga,element:_a,raw:va,root:Ea,text:Cr}});function rf(t){throw new Error("Expected node, not `"+t+"`")}function sf(t){let e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}var of={},af={},lf=[];function Ws(t,e){let n=e||of,r=n.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");let s=r==='"'?"'":'"';return{one:cf,all:uf,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||Xi,characterReferences:n.characterReferences||af,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?yr:mr,quote:r,alternative:s}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function cf(t,e,n){return Aa(t,e,n,this)}function uf(t){let e=[],n=t&&t.children||lf,r=-1;for(;++r<n.length;)e[r]=this.one(n[r],r,t);return e.join("")}var Na=/\s+/g;function Ta(t,e){if(!e)return t;t.properties||={},t.properties.class||=[],typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(Na)),Array.isArray(t.properties.class)||(t.properties.class=[]);let n=Array.isArray(e)?e:e.split(Na);for(let r of n)r&&!t.properties.class.includes(r)&&t.properties.class.push(r);return t}function ff(t){let e=Ct(t,!0).map(([s])=>s);function n(s){if(s===t.length)return{line:e.length-1,character:e.at(-1).length};let o=s,i=0;for(let a of e){if(o<a.length)break;o-=a.length,i++}return{line:i,character:o}}function r(s,o){let i=0;for(let a=0;a<s;a++)i+=e[a].length;return i+=o,i}return{lines:e,indexToPos:n,posToIndex:r}}var df=["color","background-color"];function hf(t,e){let n=0,r=[];for(let s of e)s>n&&r.push({...t,content:t.content.slice(n,s),offset:t.offset+n}),n=s;return n<t.content.length&&r.push({...t,content:t.content.slice(n),offset:t.offset+n}),r}function pf(t,e){let n=0,r=t.length;for(;n<r;){let s=n+(r-n>>1);t[s]<=e?n=s+1:r=s}return n}function gf(t,e){let n=[...e instanceof Set?e:new Set(e)].sort((r,s)=>r-s);return n.length?t.map(r=>r.flatMap(s=>{let o=s.offset+s.content.length,i=pf(n,s.offset),a=i;for(;a<n.length&&n[a]<o;)a++;if(i===a)return s;let l=n.slice(i,a);for(let c=0;c<l.length;c++)l[c]-=s.offset;return hf(s,l)})):t}function mf(t,e,n,r,s="css-vars"){let o={content:t.content,explanation:t.explanation,offset:t.offset},i=e.map(u=>_r(t.variants[u])),a=new Set(i.flatMap(u=>Object.keys(u))),l={},c=(u,f)=>{let d=f==="color"?"":f==="background-color"?"-bg":`-${f}`;return n+e[u]+(f==="color"?"":d)};return i.forEach((u,f)=>{for(let d of a){let h=u[d]||"inherit";if(f===0&&r&&df.includes(d))if(r==="light-dark()"&&i.length>1){let p=e.findIndex(b=>b==="light"),g=e.findIndex(b=>b==="dark");if(p===-1||g===-1)throw new P('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let m=i[p][d]||"inherit",y=i[g][d]||"inherit";l[d]=`light-dark(${m}, ${y})`,s==="css-vars"&&(l[c(f,d)]=h)}else l[d]=h;else s==="css-vars"&&(l[c(f,d)]=h)}}),o.htmlStyle=l,o}function _r(t){let e={};if(t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&K.Italic&&(e["font-style"]="italic"),t.fontStyle&K.Bold&&(e["font-weight"]="bold");let n=[];t.fontStyle&K.Underline&&n.push("underline"),t.fontStyle&K.Strikethrough&&n.push("line-through"),n.length&&(e["text-decoration"]=n.join(" "))}return e}function Vs(t){return typeof t=="string"?t:Object.entries(t).map(([e,n])=>`${e}:${n}`).join(";")}function yf(){let t=new WeakMap;function e(n){if(!t.has(n.meta)){let s=function(i){if(typeof i=="number"){if(i<0||i>n.source.length)throw new P(`Invalid decoration offset: ${i}. Code length: ${n.source.length}`);return{...r.indexToPos(i),offset:i}}else{let a=r.lines[i.line];if(a===void 0)throw new P(`Invalid decoration position ${JSON.stringify(i)}. Lines length: ${r.lines.length}`);let l=i.character;if(l<0&&(l=a.length+l),l<0||l>a.length)throw new P(`Invalid decoration position ${JSON.stringify(i)}. Line ${i.line} length: ${a.length}`);return{...i,character:l,offset:r.posToIndex(i.line,l)}}},r=ff(n.source),o=(n.options.decorations||[]).map(i=>({...i,start:s(i.start),end:s(i.end)}));bf(o),t.set(n.meta,{decorations:o,converter:r,source:n.source})}return t.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(this.options.decorations?.length)return gf(n,e(this).decorations.flatMap(r=>[r.start.offset,r.end.offset]))},code(n){if(!this.options.decorations?.length)return;let r=e(this),s=[...n.children].filter(u=>u.type==="element"&&u.tagName==="span");if(s.length!==r.converter.lines.length)throw new P(`Number of lines in code element (${s.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function o(u,f,d,h){let p=s[u],g="",m=-1,y=-1;if(f===0&&(m=0),d===0&&(y=0),d===Number.POSITIVE_INFINITY&&(y=p.children.length),m===-1||y===-1)for(let w=0;w<p.children.length;w++)g+=La(p.children[w]),m===-1&&g.length===f&&(m=w+1),y===-1&&g.length===d&&(y=w+1);if(m===-1)throw new P(`Failed to find start index for decoration ${JSON.stringify(h.start)}`);if(y===-1)throw new P(`Failed to find end index for decoration ${JSON.stringify(h.end)}`);let b=p.children.slice(m,y);if(!h.alwaysWrap&&b.length===p.children.length)a(p,h,"line");else if(!h.alwaysWrap&&b.length===1&&b[0].type==="element")a(b[0],h,"token");else{let w={type:"element",tagName:"span",properties:{},children:b};a(w,h,"wrapper"),p.children.splice(m,b.length,w)}}function i(u,f){s[u]=a(s[u],f,"line")}function a(u,f,d){let h=f.properties||{},p=f.transform||(g=>g);return u.tagName=f.tagName||"span",u.properties={...u.properties,...h,class:u.properties.class},f.properties?.class&&Ta(u,f.properties.class),u=p(u,d)||u,u}let l=[],c=r.decorations.sort((u,f)=>f.start.offset-u.start.offset||u.end.offset-f.end.offset);for(let u of c){let{start:f,end:d}=u;if(f.line===d.line)o(f.line,f.character,d.character,u);else if(f.line<d.line){o(f.line,f.character,Number.POSITIVE_INFINITY,u);for(let h=f.line+1;h<d.line;h++)l.unshift(()=>i(h,u));o(d.line,0,d.character,u)}}l.forEach(u=>u())}}}function bf(t){for(let e=0;e<t.length;e++){let n=t[e];if(n.start.offset>n.end.offset)throw new P(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=e+1;r<t.length;r++){let s=t[r],o=n.start.offset<=s.start.offset&&s.start.offset<n.end.offset,i=n.start.offset<s.end.offset&&s.end.offset<=n.end.offset,a=s.start.offset<=n.start.offset&&n.start.offset<s.end.offset,l=s.start.offset<n.end.offset&&n.end.offset<=s.end.offset;if(o||i||a||l){if(o&&i||a&&l||a&&n.start.offset===n.end.offset||i&&s.start.offset===s.end.offset)continue;throw new P(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(s.start)} intersect.`)}}}}function La(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(La).join(""):""}var wf=[yf()];function vr(t){let e=kf(t.transformers||[]);return[...e.pre,...e.normal,...e.post,...wf]}function kf(t){let e=[],n=[],r=[];for(let s of t)switch(s.enforce){case"pre":e.push(s);break;case"post":n.push(s);break;default:r.push(s)}return{pre:e,post:n,normal:r}}var ot=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Ks={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Sf(t,e){let n=t.indexOf("\x1B",e);if(n!==-1&&t[n+1]==="["){let r=t.indexOf("m",n);if(r!==-1)return{sequence:t.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:t.length}}function xa(t){let e=t.shift();if(e==="2"){let n=t.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(e==="5"){let n=t.shift();if(n)return{type:"table",index:Number(n)}}}function Cf(t){let e=[];for(;t.length>0;){let n=t.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)e.push({type:"resetAll"});else if(r<=9)Ks[r]&&e.push({type:"setDecoration",value:Ks[r]});else if(r<=29){let s=Ks[r-20];s&&(e.push({type:"resetDecoration",value:s}),s==="dim"&&e.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)e.push({type:"setForegroundColor",value:{type:"named",name:ot[r-30]}});else if(r===38){let s=xa(t);s&&e.push({type:"setForegroundColor",value:s})}else if(r===39)e.push({type:"resetForegroundColor"});else if(r<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:ot[r-40]}});else if(r===48){let s=xa(t);s&&e.push({type:"setBackgroundColor",value:s})}else r===49?e.push({type:"resetBackgroundColor"}):r===53?e.push({type:"setDecoration",value:"overline"}):r===55?e.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?e.push({type:"setForegroundColor",value:{type:"named",name:ot[r-90+8]}}):r>=100&&r<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:ot[r-100+8]}})}return e}function _f(){let t=null,e=null,n=new Set;return{parse(r){let s=[],o=0;do{let i=Sf(r,o),a=i.sequence?r.substring(o,i.startPosition):r.substring(o);if(a.length>0&&s.push({value:a,foreground:t,background:e,decorations:new Set(n)}),i.sequence){let l=Cf(i.sequence);for(let c of l)c.type==="resetAll"?(t=null,e=null,n.clear()):c.type==="resetForegroundColor"?t=null:c.type==="resetBackgroundColor"?e=null:c.type==="resetDecoration"&&n.delete(c.value);for(let c of l)c.type==="setForegroundColor"?t=c.value:c.type==="setBackgroundColor"?e=c.value:c.type==="setDecoration"&&n.add(c.value)}o=i.position}while(o<r.length);return s}}}var vf={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 Ef(t=vf){function e(a){return t[a]}function n(a){return`#${a.map(l=>Math.max(0,Math.min(l,255)).toString(16).padStart(2,"0")).join("")}`}let r;function s(){if(r)return r;r=[];for(let c=0;c<ot.length;c++)r.push(e(ot[c]));let a=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let u=0;u<6;u++)for(let f=0;f<6;f++)r.push(n([a[c],a[u],a[f]]));let l=8;for(let c=0;c<24;c++,l+=10)r.push(n([l,l,l]));return r}function o(a){return s()[a]}function i(a){switch(a.type){case"named":return e(a.name);case"rgb":return n(a.rgb);case"table":return o(a.index)}}return{value:i}}var Af=/#([0-9a-f]{3,8})/i,Nf=/var\((--[\w-]+-ansi-[\w-]+)\)/,xf={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 If(t,e,n){let r=an(t,n),s=Ct(e),o=Ef(Object.fromEntries(ot.map(a=>{let l=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`;return[a,t.colors?.[l]||xf[a]]}))),i=_f();return s.map(a=>i.parse(a[0]).map(l=>{let c,u;l.decorations.has("reverse")?(c=l.background?o.value(l.background):t.bg,u=l.foreground?o.value(l.foreground):t.fg):(c=l.foreground?o.value(l.foreground):t.fg,u=l.background?o.value(l.background):void 0),c=Le(c,r),u=Le(u,r),l.decorations.has("dim")&&(c=Tf(c));let f=K.None;return l.decorations.has("bold")&&(f|=K.Bold),l.decorations.has("italic")&&(f|=K.Italic),l.decorations.has("underline")&&(f|=K.Underline),l.decorations.has("strikethrough")&&(f|=K.Strikethrough),{content:l.value,offset:a[1],color:c,bgColor:u,fontStyle:f}}))}function Tf(t){let e=t.match(Af);if(e){let r=e[1];if(r.length===8){let s=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${s}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){let s=r[0],o=r[1],i=r[2],a=r[3];return`#${s}${s}${o}${o}${i}${i}${Math.round(Number.parseInt(`${a}${a}`,16)/2).toString(16).padStart(2,"0")}`}else if(r.length===3){let s=r[0],o=r[1],i=r[2];return`#${s}${s}${o}${o}${i}${i}80`}}}let n=t.match(Nf);return n?`var(${n[1]}-dim)`:t}function zs(t,e,n={}){let r=t.resolveLangAlias(n.lang||"text"),{theme:s=t.getLoadedThemes()[0]}=n;if(!ln(r)&&!cn(s)&&r==="ansi"){let{theme:o}=t.setTheme(s);return If(o,e,n)}return Bs(t,e,n)}function Er(t,e,n){let r,s,o,i,a,l;if("themes"in n){let{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:f="css-vars"}=n,d=Object.entries(n.themes).filter(y=>y[1]).map(y=>({color:y[0],theme:y[1]})).sort((y,b)=>y.color===c?-1:b.color===c?1:0);if(d.length===0)throw new P("`themes` option must not be empty");let h=dr(t,e,n,zs);if(l=_t(h),c&&c!=="light-dark()"&&!d.some(y=>y.color===c))throw new P(`\`themes\` option must contain the defaultColor key \`${c}\``);let p=d.map(y=>t.getTheme(y.theme)),g=d.map(y=>y.color);o=h.map(y=>y.map(b=>mf(b,g,u,c,f))),l&&un(o,l);let m=d.map(y=>an(y.theme,n));s=Ia(d,p,m,u,c,"fg",f),r=Ia(d,p,m,u,c,"bg",f),i=`shiki-themes ${p.map(y=>y.name).join(" ")}`,a=c?void 0:[s,r].join(";")}else if("theme"in n){let c=an(n.theme,n);o=zs(t,e,n);let u=t.getTheme(n.theme);r=Le(u.bg,c),s=Le(u.fg,c),i=u.name,l=_t(o)}else throw new P("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:s,bg:r,themeName:i,rootStyle:a,grammarState:l}}function Ia(t,e,n,r,s,o,i){return t.map((a,l)=>{let c=Le(e[l][o],n[l])||"inherit",u=`${r+a.color}${o==="bg"?"-bg":""}:${c}`;if(l===0&&s){if(s==="light-dark()"&&t.length>1){let f=t.findIndex(h=>h.color==="light"),d=t.findIndex(h=>h.color==="dark");if(f===-1||d===-1)throw new P('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Le(e[f][o],n[f])||"inherit"}, ${Le(e[d][o],n[d])||"inherit"});${u}`}return c}return i==="css-vars"?u:null}).filter(a=>!!a).join(";")}var Ba=/^\s+$/,Lf=/^(\s*)(.*?)(\s*)$/;function Ar(t,e,n,r={meta:{},options:n,codeToHast:(s,o)=>Ar(t,s,o),codeToTokens:(s,o)=>Er(t,s,o)}){let s=e;for(let p of vr(n))s=p.preprocess?.call(r,s,n)||s;let{tokens:o,fg:i,bg:a,themeName:l,rootStyle:c,grammarState:u}=Er(t,s,n),{mergeWhitespaces:f=!0,mergeSameStyleTokens:d=!1}=n;f===!0?o=Rf(o):f==="never"&&(o=Of(o)),d&&(o=Pf(o));let h={...r,get source(){return s}};for(let p of vr(n))o=p.tokens?.call(h,o)||o;return Bf(o,{...n,fg:i,bg:a,themeName:l,rootStyle:n.rootStyle===!1?!1:n.rootStyle??c},h,u)}function Bf(t,e,n,r=_t(t)){let s=vr(e),o=[],i={type:"root",children:[]},{structure:a="classic",tabindex:l="0"}=e,c={class:`shiki ${e.themeName||""}`};e.rootStyle!==!1&&(e.rootStyle!=null?c.style=e.rootStyle:c.style=`background-color:${e.bg};color:${e.fg}`),l!==!1&&l!=null&&(c.tabindex=l.toString());for(let[g,m]of Object.entries(e.meta||{}))g.startsWith("_")||(c[g]=m);let u={type:"element",tagName:"pre",properties:c,children:[],data:e.data},f={type:"element",tagName:"code",properties:{},children:o},d=[],h={...n,structure:a,addClassToHast:Ta,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return i},get pre(){return u},get code(){return f},get lines(){return d}};if(t.forEach((g,m)=>{m&&(a==="inline"?i.children.push({type:"element",tagName:"br",properties:{},children:[]}):a==="classic"&&o.push({type:"text",value:`
144
+ `}));let y={type:"element",tagName:"span",properties:{class:"line"},children:[]},b=0;for(let w of g){let S={type:"element",tagName:"span",properties:{...w.htmlAttrs},children:[{type:"text",value:w.content}]},C=Vs(w.htmlStyle||_r(w));C&&(S.properties.style=C);for(let E of s)S=E?.span?.call(h,S,m+1,b,y,w)||S;a==="inline"?i.children.push(S):a==="classic"&&y.children.push(S),b+=w.content.length}if(a==="classic"){for(let w of s)y=w?.line?.call(h,y,m+1)||y;d.push(y),o.push(y)}else a==="inline"&&d.push(y)}),a==="classic"){for(let g of s)f=g?.code?.call(h,f)||f;u.children.push(f);for(let g of s)u=g?.pre?.call(h,u)||u;i.children.push(u)}else if(a==="inline"){let g=[],m={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(let b of i.children)b.type==="element"&&b.tagName==="br"?(g.push(m),m={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(b.type==="element"||b.type==="text")&&m.children.push(b);g.push(m);let y={type:"element",tagName:"code",properties:{},children:g};for(let b of s)y=b?.code?.call(h,y)||y;i.children=[];for(let b=0;b<y.children.length;b++){b>0&&i.children.push({type:"element",tagName:"br",properties:{},children:[]});let w=y.children[b];w.type==="element"&&i.children.push(...w.children)}}let p=i;for(let g of s)p=g?.root?.call(h,p)||p;return r&&un(p,r),p}function Rf(t){return t.map(e=>{let n=[],r="",s;return e.forEach((o,i)=>{let a=!(o.fontStyle&&(o.fontStyle&K.Underline||o.fontStyle&K.Strikethrough));a&&Ba.test(o.content)&&e[i+1]?(s===void 0&&(s=o.offset),r+=o.content):r?(a?n.push({...o,offset:s,content:r+o.content}):n.push({content:r,offset:s},o),s=void 0,r=""):n.push(o)}),n})}function Of(t){return t.map(e=>e.flatMap(n=>{if(Ba.test(n.content))return n;let r=n.content.match(Lf);if(!r)return n;let[,s,o,i]=r;if(!s&&!i)return n;let a=[{...n,offset:n.offset+s.length,content:o}];return s&&a.unshift({content:s,offset:n.offset}),i&&a.push({content:i,offset:n.offset+s.length+o.length}),a}))}function Pf(t){return t.map(e=>{let n=[];for(let r of e){if(n.length===0){n.push({...r});continue}let s=n.at(-1),o=Vs(s.htmlStyle||_r(s)),i=Vs(r.htmlStyle||_r(r)),a=s.fontStyle&&(s.fontStyle&K.Underline||s.fontStyle&K.Strikethrough),l=r.fontStyle&&(r.fontStyle&K.Underline||r.fontStyle&K.Strikethrough);!a&&!l&&o===i?s.content+=r.content:n.push({...r})}return n})}var $f=Ws;function Mf(t,e,n){let r={meta:{},options:n,codeToHast:(o,i)=>Ar(t,o,i),codeToTokens:(o,i)=>Er(t,o,i)},s=$f(Ar(t,e,n,r));for(let o of vr(n))s=o.postprocess?.call(r,s,n)||s;return s}async function Ra(t){let e=await Ls(t);return{getLastGrammarState:(...n)=>Yi(e,...n),codeToTokensBase:(n,r)=>zs(e,n,r),codeToTokensWithThemes:(n,r)=>dr(e,n,r),codeToTokens:(n,r)=>Er(e,n,r),codeToHast:(n,r)=>Ar(e,n,r),codeToHtml:(n,r)=>Mf(e,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function Ff(t){return!t.sticky&&!t.rawOptions?.strategy}function Oa(t,e){return{index:t,captureIndices:e.map(n=>n==null?{start:4294967295,end:4294967295,length:0}:{start:n[0],end:n[1],length:n[1]-n[0]})}}var Pa=class{patterns;options;regexps;lastSearches;constructor(t,e={}){this.patterns=t,this.options=e;let{forgiving:n=!1,cache:r,regexConstructor:s}=e;if(!s)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(o=>{if(typeof o!="string")return o;let i=r?.get(o);if(i){if(i instanceof RegExp)return i;if(n)return null;throw i}try{let a=s(o);return r?.set(o,a),a}catch(a){if(r?.set(o,a),n)return null;throw a}}),this.lastSearches=this.regexps.map(o=>o&&Ff(o)?{strId:0,searchedFrom:0,matchIndex:-1,indices:null}:null)}findNextMatchSync(t,e,n){let r=typeof t=="string"?t:t.content,s=typeof t=="string"?0:t.id||0,o=-1,i=0,a=null;for(let l=0;l<this.regexps.length;l++){let c=this.regexps[l];if(c)try{let u=s?this.lastSearches[l]:null,f,d;if(u&&u.strId===s&&u.searchedFrom<=e&&(u.matchIndex===-1||u.matchIndex>=e))f=u.matchIndex,d=u.indices;else{c.lastIndex=e;let h=c.exec(r);f=h?h.index:-1,d=h?h.indices:null,u&&(u.strId=s,u.searchedFrom=e,u.matchIndex=f,u.indices=d)}if(f===-1)continue;if(f===e)return Oa(l,d);(o===-1||f<i)&&(o=l,i=f,a=d)}catch(u){if(this.options.forgiving)continue;throw u}}return o===-1?null:Oa(o,a)}},Df=0;function $a(t){return{content:t,id:++Df}}function ze(t){if([...t].length!==1)throw new Error(`Expected "${t}" to be a single code point`);return t.codePointAt(0)}function Ma(t,e,n){return t.has(e)||t.set(e,n),t.get(e)}var pn=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),U=String.raw;function Pe(t,e){if(t==null)throw new Error(e??"Value expected");return t}var qa=U`\[\^?`,Ha=`c.? | C(?:-.?)?|${U`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${U`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${U`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${U`o\{[^\}]*\}?`}|${U`\d{1,3}`}`,Ys=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Nr=new RegExp(U`
145
145
  \\ (?:
146
- ${Ma}
146
+ ${Ha}
147
147
  | [gk]<[^>]*>?
148
148
  | [gk]'[^']*'?
149
149
  | .
@@ -160,20 +160,20 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
160
160
  )?
161
161
  | \*[^\)]*\)?
162
162
  )?
163
- | (?:${Hs.source})+
164
- | ${$a}
163
+ | (?:${Ys.source})+
164
+ | ${qa}
165
165
  | .
166
- `.replace(/\s+/g,""),"gsu"),qs=new RegExp(U`
166
+ `.replace(/\s+/g,""),"gsu"),Js=new RegExp(U`
167
167
  \\ (?:
168
- ${Ma}
168
+ ${Ha}
169
169
  | .
170
170
  )
171
171
  | \[:(?:\^?\p{Alpha}+|\^):\]
172
- | ${$a}
172
+ | ${qa}
173
173
  | &&
174
174
  | .
175
- `.replace(/\s+/g,""),"gsu");function Fa(t,e={}){let n={flags:"",...e,rules:{captureGroup:!1,singleline:!1,...e.rules}};if(typeof t!="string")throw new Error("String expected as pattern");let r=Jf(n.flags),s=[r.extended],i={captureGroup:n.rules.captureGroup,getCurrentModX(){return s.at(-1)},numOpenGroups:0,popModX(){s.pop()},pushModX(f){s.push(f)},replaceCurrentModX(f){s[s.length-1]=f},singleline:n.rules.singleline},o=[],a;for(_r.lastIndex=0;a=_r.exec(t);){let f=Lf(i,t,a[0],_r.lastIndex);f.tokens?o.push(...f.tokens):f.token&&o.push(f.token),f.lastIndex!==void 0&&(_r.lastIndex=f.lastIndex)}let l=[],c=0;o.filter(f=>f.type==="GroupOpen").forEach(f=>{f.kind==="capturing"?f.number=++c:f.raw==="("&&l.push(f)}),c||l.forEach((f,d)=>{f.kind="capturing",f.number=d+1});let u=c||l.length;return{tokens:o.map(f=>f.type==="EscapedNumber"?Qf(f,u):f).flat(),flags:r}}function Lf(t,e,n,r){let[s,i]=n;if(n==="["||n==="[^"){let o=Bf(e,n,r);return{tokens:o.tokens,lastIndex:o.lastIndex}}if(s==="\\"){if("AbBGyYzZ".includes(i))return{token:La(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:Uf(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:Ga(n)}}if(i==="K")return{token:ja("keep",n)};if(i==="N"||i==="R")return{token:ot("newline",n,{negate:i==="N"})};if(i==="O")return{token:ot("any",n)};if(i==="X")return{token:ot("text_segment",n)};let o=Da(n,{inCharClass:!1});return Array.isArray(o)?{tokens:o}:{token:o}}if(s==="("){if(i==="*")return{token:Kf(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(e[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:Wf(n,t)};if(t.pushModX(t.getCurrentModX()),t.numOpenGroups++,n==="("&&!t.captureGroup||n==="(?:")return{token:vt("group",n)};if(n==="(?>")return{token:vt("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:vt(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&t.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:vt("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:vt("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(t.popModX(),t.numOpenGroups--,t.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:Df(n)}}if(t.getCurrentModX()){if(n==="#"){let o=e.indexOf(`
176
- `,r);return{lastIndex:o===-1?e.length:o}}if(/^\s$/.test(n)){let o=/\s+/y;return o.lastIndex=r,{lastIndex:o.exec(e)?o.lastIndex:r}}}if(n===".")return{token:ot("dot",n)};if(n==="^"||n==="$"){let o=t.singleline?{"^":U`\A`,$:U`\Z`}[n]:n;return{token:La(o,n)}}return n==="|"?{token:Rf(n)}:Hs.test(n)?{tokens:Xf(n)}:{token:$e(ze(n),n)}}function Bf(t,e,n){let r=[Ba(e[1]==="^",e)],s=1,i;for(qs.lastIndex=n;i=qs.exec(t);){let o=i[0];if(o[0]==="["&&o[1]!==":")s++,r.push(Ba(o[1]==="^",o));else if(o==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push($e(93,o));else if(s--,r.push(Pf(o)),!s)break}else{let a=Of(o);Array.isArray(a)?r.push(...a):r.push(a)}}return{tokens:r,lastIndex:qs.lastIndex||t.length}}function Of(t){if(t[0]==="\\")return Da(t,{inCharClass:!0});if(t[0]==="["){let e=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(t);if(!e||!fn.has(e.groups.name))throw new Error(`Invalid POSIX class "${t}"`);return ot("posix",t,{value:e.groups.name,negate:!!e.groups.negate})}return t==="-"?$f(t):t==="&&"?Mf(t):$e(ze(t),t)}function Da(t,{inCharClass:e}){let n=t[1];if(n==="c"||n==="C")return Hf(t);if("dDhHsSwW".includes(n))return Vf(t);if(t.startsWith(U`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${t}"`);if(/^\\[pP]\{/.test(t)){if(t.length===3)throw new Error(`Incomplete or invalid Unicode property "${t}"`);return zf(t)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(t))try{let r=t.split(/\\x/).slice(1).map(o=>parseInt(o,16)),s=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),i=new TextEncoder;return[...s].map(o=>{let a=[...i.encode(o)].map(l=>`\\x${l.toString(16)}`).join("");return $e(ze(o),a)})}catch{throw new Error(`Multibyte code "${t}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return $e(Yf(t),t);if(Oa.has(n))return $e(Oa.get(n),t);if(/\d/.test(n))return Ff(e,t);if(t==="\\")throw new Error(U`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${t}"`);if([...t].length===2)return $e(t.codePointAt(1),t);throw new Error(`Unexpected escape "${t}"`)}function Rf(t){return{type:"Alternator",raw:t}}function La(t,e){return{type:"Assertion",kind:t,raw:e}}function Ga(t){return{type:"Backreference",raw:t}}function $e(t,e){return{type:"Character",value:t,raw:e}}function Pf(t){return{type:"CharacterClassClose",raw:t}}function $f(t){return{type:"CharacterClassHyphen",raw:t}}function Mf(t){return{type:"CharacterClassIntersector",raw:t}}function Ba(t,e){return{type:"CharacterClassOpen",negate:t,raw:e}}function ot(t,e,n={}){return{type:"CharacterSet",kind:t,...n,raw:e}}function ja(t,e,n={}){return t==="keep"?{type:"Directive",kind:t,raw:e}:{type:"Directive",kind:t,flags:Pe(n.flags),raw:e}}function Ff(t,e){return{type:"EscapedNumber",inCharClass:t,raw:e}}function Df(t){return{type:"GroupClose",raw:t}}function vt(t,e,n={}){return{type:"GroupOpen",kind:t,...n,raw:e}}function Gf(t,e,n,r){return{type:"NamedCallout",kind:t,tag:e,arguments:n,raw:r}}function jf(t,e,n,r){return{type:"Quantifier",kind:t,min:e,max:n,raw:r}}function Uf(t){return{type:"Subroutine",raw:t}}var qf=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),Oa=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function Hf(t){let e=t[1]==="c"?t[2]:t[3];if(!e||!/[A-Za-z]/.test(e))throw new Error(`Unsupported control character "${t}"`);return $e(ze(e.toUpperCase())-64,t)}function Wf(t,e){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(t).groups;r??="";let s=(e.getCurrentModX()||n.includes("x"))&&!r.includes("x"),i=Pa(n),o=Pa(r),a={};if(i&&(a.enable=i),o&&(a.disable=o),t.endsWith(")"))return e.replaceCurrentModX(s),ja("flags",t,{flags:a});if(t.endsWith(":"))return e.pushModX(s),e.numOpenGroups++,vt("group",t,{...(i||o)&&{flags:a}});throw new Error(`Unexpected flag modifier "${t}"`)}function Kf(t){let e=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(t);if(!e)throw new Error(`Incomplete or invalid named callout "${t}"`);let{name:n,tag:r,args:s}=e.groups;if(!n)throw new Error(`Invalid named callout "${t}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${t}"`);let i=s?s.split(",").filter(u=>u!=="").map(u=>/^[+-]?\d+$/.test(u)?+u:u):[],[o,a,l]=i,c=qf.has(n)?n.toLowerCase():"custom";switch(c){case"fail":case"mismatch":case"skip":if(i.length>0)throw new Error(`Named callout arguments not allowed "${i}"`);break;case"error":if(i.length>1)throw new Error(`Named callout allows only one argument "${i}"`);if(typeof o=="string")throw new Error(`Named callout argument must be a number "${o}"`);break;case"max":if(!i.length||i.length>2)throw new Error(`Named callout must have one or two arguments "${i}"`);if(typeof o=="string"&&!/^[A-Za-z_]\w*$/.test(o))throw new Error(`Named callout argument one must be a tag or number "${o}"`);if(i.length===2&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${a}"`);break;case"count":case"total_count":if(i.length>1)throw new Error(`Named callout allows only one argument "${i}"`);if(i.length===1&&(typeof o=="number"||!/^[<>X]$/.test(o)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case"cmp":if(i.length!==3)throw new Error(`Named callout must have three arguments "${i}"`);if(typeof o=="string"&&!/^[A-Za-z_]\w*$/.test(o))throw new Error(`Named callout argument one must be a tag or number "${o}"`);if(typeof a=="number"||!/^(?:[<>!=]=|[<>])$/.test(a))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${a}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument three must be a tag or number "${l}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${c}"`)}return Gf(c,r??null,s?.split(",")??null,t)}function Ra(t){let e=null,n,r;if(t[0]==="{"){let{minStr:s,maxStr:i}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(t).groups,o=1e5;if(+s>o||i&&+i>o)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+s,r=i===void 0?+s:i===""?1/0:+i,n>r&&(e="possessive",[n,r]=[r,n]),t.endsWith("?")){if(e==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');e="lazy"}else e||(e="greedy")}else n=t[0]==="+"?1:0,r=t[0]==="?"?1:1/0,e=t[1]==="+"?"possessive":t[1]==="?"?"lazy":"greedy";return jf(e,n,r,t)}function Vf(t){let e=t[1].toLowerCase();return ot({d:"digit",h:"hex",s:"space",w:"word"}[e],t,{negate:t[1]!==e})}function zf(t){let{p:e,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(t).groups;return ot("property",t,{value:r,negate:e==="P"&&!n||e==="p"&&!!n})}function Pa(t){let e={};return t.includes("i")&&(e.ignoreCase=!0),t.includes("m")&&(e.dotAll=!0),t.includes("x")&&(e.extended=!0),Object.keys(e).length?e:null}function Jf(t){let e={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<t.length;n++){let r=t[n];if(!"imxDPSWy".includes(r))throw new Error(`Invalid flag "${r}"`);if(r==="y"){if(!/^y{[gw]}/.test(t.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');e.textSegmentMode=t[n+2]==="g"?"grapheme":"word",n+=3;continue}e[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[r]]=!0}return e}function Yf(t){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(t))throw new Error(`Incomplete or invalid escape "${t}"`);let e=t[2]==="{"?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(t).groups.hex:t.slice(2);return parseInt(e,16)}function Qf(t,e){let{raw:n,inCharClass:r}=t,s=n.slice(1);if(!r&&(s!=="0"&&s.length===1||s[0]!=="0"&&+s<=e))return[Ga(n)];let i=[],o=s.match(/^[0-7]+|\d/g);for(let a=0;a<o.length;a++){let l=o[a],c;if(a===0&&l!=="8"&&l!=="9"){if(c=parseInt(l,8),c>127)throw new Error(U`Octal encoded byte above 177 unsupported "${n}"`)}else c=ze(l);i.push($e(c,(a===0?"\\":"")+l))}return i}function Xf(t){let e=[],n=new RegExp(Hs,"gy"),r;for(;r=n.exec(t);){let s=r[0];if(s[0]==="{"){let i=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(s);if(i){let{min:o,max:a}=i.groups;if(+o>+a&&s.endsWith("?")){n.lastIndex--,e.push(Ra(s.slice(0,-1)));continue}}}e.push(Ra(s))}return e}function vr(t,e){if(!Array.isArray(t.body))throw new Error("Expected node with body array");if(t.body.length!==1)return!1;let n=t.body[0];return!e||Object.keys(e).every(r=>e[r]===n[r])}function Ua(t){return Zf.has(t.type)}var Zf=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function Ar(t,e={}){let n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...e,rules:{captureGroup:!1,singleline:!1,...e.rules}},r=Fa(t,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),s=(d,h)=>{let p=r.tokens[i.nextIndex];switch(i.parent=d,i.nextIndex++,p.type){case"Alternator":return Me();case"Assertion":return ed(p);case"Backreference":return td(p,i);case"Character":return Et(p.value,{useLastValid:!!h.isCheckingRangeEnd});case"CharacterClassHyphen":return nd(p,i,h);case"CharacterClassOpen":return rd(p,i,h);case"CharacterSet":return sd(p,i);case"Directive":return ud(p.kind,{flags:p.flags});case"GroupOpen":return id(p,i,h);case"NamedCallout":return dd(p.kind,p.tag,p.arguments);case"Quantifier":return od(p,i);case"Subroutine":return ad(p,i);default:throw new Error(`Unexpected token type "${p.type}"`)}},i={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:s},o=pd(fd(r.flags)),a=o.body[0];for(;i.nextIndex<r.tokens.length;){let d=s(a,{});d.type==="Alternative"?(o.body.push(d),a=d):a.body.push(d)}let{capturingGroups:l,hasNumberedRef:c,namedGroupsByName:u,subroutines:f}=i;if(c&&u.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(let{ref:d}of f)if(typeof d=="number"){if(d>l.length)throw new Error("Subroutine uses a group number that's not defined");d&&(l[d-1].isSubroutined=!0)}else if(u.has(d)){if(u.get(d).length>1)throw new Error(U`Subroutine uses a duplicate group name "\g<${d}>"`);u.get(d)[0].isSubroutined=!0}else throw new Error(U`Subroutine uses a group name that's not defined "\g<${d}>"`);return o}function ed({kind:t}){return Nr(Pe({"^":"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"}[t],`Unexpected assertion kind "${t}"`),{negate:t===U`\B`||t===U`\Y`})}function td({raw:t},e){let n=/^\\k[<']/.test(t),r=n?t.slice(3,-1):t.slice(1),s=(i,o=!1)=>{let a=e.capturingGroups.length,l=!1;if(i>a)if(e.skipBackrefValidation)l=!0;else throw new Error(`Not enough capturing groups defined to the left "${t}"`);return e.hasNumberedRef=!0,Er(o?a+1-i:i,{orphan:l})};if(n){let i=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(i)return s(+i.groups.num,!!i.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${t}"`);if(!e.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${t}"`);return Er(r)}return s(+r)}function nd(t,e,n){let{tokens:r,walk:s}=e,i=e.parent,o=i.body.at(-1),a=r[e.nextIndex];if(!n.isCheckingRangeEnd&&o&&o.type!=="CharacterClass"&&o.type!=="CharacterClassRange"&&a&&a.type!=="CharacterClassOpen"&&a.type!=="CharacterClassClose"&&a.type!=="CharacterClassIntersector"){let l=s(i,{...n,isCheckingRangeEnd:!0});if(o.type==="Character"&&l.type==="Character")return i.body.pop(),cd(o,l);throw new Error("Invalid character class range")}return Et(ze("-"))}function rd({negate:t},e,n){let{tokens:r,walk:s}=e,i=[dn()],o=r[e.nextIndex],a=Wa(o);for(;a.type!=="CharacterClassClose";){if(a.type==="CharacterClassIntersector")i.push(dn()),e.nextIndex++;else{let c=i.at(-1);c.body.push(s(c,n))}a=Wa(r[e.nextIndex],o)}let l=dn({negate:t});return i.length===1?l.body=i[0].body:(l.kind="intersection",l.body=i.map(c=>c.body.length===1?c.body[0]:c)),e.nextIndex++,l}function sd({kind:t,negate:e,value:n},r){let{normalizeUnknownPropertyNames:s,skipPropertyNameValidation:i,unicodePropertyMap:o}=r;if(t==="property"){let a=At(n);if(fn.has(a)&&!o?.has(a))t="posix",n=a;else return at(n,{negate:e,normalizeUnknownPropertyNames:s,skipPropertyNameValidation:i,unicodePropertyMap:o})}return t==="posix"?hd(n,{negate:e}):xr(t,{negate:e})}function id(t,e,n){let{tokens:r,capturingGroups:s,namedGroupsByName:i,skipLookbehindValidation:o,walk:a}=e,l=gd(t),c=l.type==="AbsenceFunction",u=Ha(l),f=u&&l.negate;if(l.type==="CapturingGroup"&&(s.push(l),l.name&&Ta(i,l.name,[]).push(l)),c&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let d=Ka(r[e.nextIndex]);for(;d.type!=="GroupClose";){if(d.type==="Alternator")l.body.push(Me()),e.nextIndex++;else{let h=l.body.at(-1),p=a(h,{...n,isInAbsenceFunction:n.isInAbsenceFunction||c,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||f});if(h.body.push(p),(u||n.isInLookbehind)&&!o){let g="Lookbehind includes a pattern not allowed by Oniguruma";if(f||n.isInNegLookbehind){if(qa(p)||p.type==="CapturingGroup")throw new Error(g)}else if(qa(p)||Ha(p)&&p.negate)throw new Error(g)}}d=Ka(r[e.nextIndex])}return e.nextIndex++,l}function od({kind:t,min:e,max:n},r){let s=r.parent,i=s.body.at(-1);if(!i||!Ua(i))throw new Error("Quantifier requires a repeatable token");let o=Ks(t,e,n,i);return s.body.pop(),o}function ad({raw:t},e){let{capturingGroups:n,subroutines:r}=e,s=t.slice(3,-1),i=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(s);if(i){let a=+i.groups.num,l=n.length;if(e.hasNumberedRef=!0,s={"":a,"+":l+a,"-":l+1-a}[i.groups.sign],s<1)throw new Error("Invalid subroutine number")}else s==="0"&&(s=0);let o=Vs(s);return r.push(o),o}function ld(t,e){if(t!=="repeater")throw new Error(`Unexpected absence function kind "${t}"`);return{type:"AbsenceFunction",kind:t,body:hn(e?.body)}}function Me(t){return{type:"Alternative",body:Va(t?.body)}}function Nr(t,e){let n={type:"Assertion",kind:t};return(t==="word_boundary"||t==="text_segment_boundary")&&(n.negate=!!e?.negate),n}function Er(t,e){let n=!!e?.orphan;return{type:"Backreference",ref:t,...n&&{orphan:n}}}function Ws(t,e){let n={name:void 0,isSubroutined:!1,...e};if(n.name!==void 0&&!md(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:t,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:hn(e?.body)}}function Et(t,e){let n={useLastValid:!1,...e};if(t>1114111){let r=t.toString(16);if(n.useLastValid)t=1114111;else throw t>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:t}}function dn(t){let e={kind:"union",negate:!1,...t};return{type:"CharacterClass",kind:e.kind,negate:e.negate,body:Va(t?.body)}}function cd(t,e){if(e.value<t.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:t,max:e}}function xr(t,e){let n=!!e?.negate,r={type:"CharacterSet",kind:t};return(t==="digit"||t==="hex"||t==="newline"||t==="space"||t==="word")&&(r.negate=n),(t==="text_segment"||t==="newline"&&!n)&&(r.variableLength=!0),r}function ud(t,e={}){if(t==="keep")return{type:"Directive",kind:t};if(t==="flags")return{type:"Directive",kind:t,flags:Pe(e.flags)};throw new Error(`Unexpected directive kind "${t}"`)}function fd(t){return{type:"Flags",...t}}function ne(t){let e=t?.atomic,n=t?.flags;if(e&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...e&&{atomic:e},...n&&{flags:n},body:hn(t?.body)}}function Je(t){let e={behind:!1,negate:!1,...t};return{type:"LookaroundAssertion",kind:e.behind?"lookbehind":"lookahead",negate:e.negate,body:hn(t?.body)}}function dd(t,e,n){return{type:"NamedCallout",kind:t,tag:e,arguments:n}}function hd(t,e){let n=!!e?.negate;if(!fn.has(t))throw new Error(`Invalid POSIX class "${t}"`);return{type:"CharacterSet",kind:"posix",value:t,negate:n}}function Ks(t,e,n,r){if(e>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:t,min:e,max:n,body:r}}function pd(t,e){return{type:"Regex",body:hn(e?.body),flags:t}}function Vs(t){return{type:"Subroutine",ref:t}}function at(t,e){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...e},r=n.unicodePropertyMap?.get(At(t));if(!r){if(n.normalizeUnknownPropertyNames)r=yd(t);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(U`Invalid Unicode property "\p{${t}}"`)}return{type:"CharacterSet",kind:"property",value:r??t,negate:n.negate}}function gd({flags:t,kind:e,name:n,negate:r,number:s}){switch(e){case"absence_repeater":return ld("repeater");case"atomic":return ne({atomic:!0});case"capturing":return Ws(s,{name:n});case"group":return ne({flags:t});case"lookahead":case"lookbehind":return Je({behind:e==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${e}"`)}}function hn(t){if(t===void 0)t=[Me()];else if(!Array.isArray(t)||!t.length||!t.every(e=>e.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return t}function Va(t){if(t===void 0)t=[];else if(!Array.isArray(t)||!t.every(e=>!!e.type))throw new Error("Invalid body; expected array of nodes");return t}function qa(t){return t.type==="LookaroundAssertion"&&t.kind==="lookahead"}function Ha(t){return t.type==="LookaroundAssertion"&&t.kind==="lookbehind"}function md(t){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(t)}function yd(t){return t.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase())}function At(t){return t.replace(/[- _]+/g,"").toLowerCase()}function Wa(t,e){let n=e;return Pe(t,`Unclosed character class${n?.type==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function Ka(t){return Pe(t,"Unclosed group")}function lt(t,e,n=null){function r(i,o){for(let a=0;a<i.length;a++){let l=s(i[a],o,a,i);a=Math.max(-1,a+l)}}function s(i,o=null,a=null,l=null){let c=0,u=!1,f={node:i,parent:o,key:a,container:l,root:t,remove(){Ir(l).splice(Math.max(0,Nt(a)+c),1),c--,u=!0},removeAllNextSiblings(){return Ir(l).splice(Nt(a)+1)},removeAllPrevSiblings(){let y=Nt(a)+c;return c-=y,Ir(l).splice(0,Math.max(0,y))},replaceWith(y,b={}){let w=!!b.traverse;l?l[Math.max(0,Nt(a)+c)]=y:Pe(o,"Can't replace root node")[a]=y,w&&s(y,o,a,l),u=!0},replaceWithMultiple(y,b={}){let w=!!b.traverse;if(Ir(l).splice(Math.max(0,Nt(a)+c),1,...y),c+=y.length-1,w){let S=0;for(let C=0;C<y.length;C++)S+=s(y[C],o,Nt(a)+C+S,l)}u=!0},skip(){u=!0}},{type:d}=i,h=e["*"],p=e[d],g=typeof h=="function"?h:h?.enter,m=typeof p=="function"?p:p?.enter;if(g?.(f,n),m?.(f,n),!u)switch(d){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":r(i.body,i);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":s(i.min,i,"min"),s(i.max,i,"max");break;case"Quantifier":s(i.body,i,"body");break;case"Regex":r(i.body,i),s(i.flags,i,"flags");break;default:throw new Error(`Unexpected node type "${d}"`)}return p?.exit?.(f,n),h?.exit?.(f,n),c}return s(t),t}function Ir(t){if(!Array.isArray(t))throw new Error("Container expected");return t}function Nt(t){if(typeof t!="number")throw new Error("Numeric key expected");return t}var za=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function Ja(t,e){for(let n=0;n<t.length;n++)t[n]>=e&&t[n]++}function Ya(t,e,n,r){return t.slice(0,e)+r+t.slice(e+n.length)}var Z=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function pn(t,e,n,r){let s=new RegExp(String.raw`${e}|(?<$skip>\[\^?|\\?.)`,"gsu"),i=[!1],o=0,a="";for(let l of t.matchAll(s)){let{0:c,groups:{$skip:u}}=l;if(!u&&(!r||r===Z.DEFAULT==!o)){n instanceof Function?a+=n(l,{context:o?Z.CHAR_CLASS:Z.DEFAULT,negated:i[i.length-1]}):a+=n;continue}c[0]==="["?(o++,i.push(c[1]==="^")):c==="]"&&o&&(o--,i.pop()),a+=c}return a}function zs(t,e,n,r){pn(t,e,n,r)}function bd(t,e,n=0,r){if(!new RegExp(e,"su").test(t))return null;let s=new RegExp(`${e}|(?<$skip>\\\\?.)`,"gsu");s.lastIndex=n;let i=0,o;for(;o=s.exec(t);){let{0:a,groups:{$skip:l}}=o;if(!l&&(!r||r===Z.DEFAULT==!i))return o;a==="["?i++:a==="]"&&i&&i--,s.lastIndex==o.index&&s.lastIndex++}return null}function gn(t,e,n){return!!bd(t,e,0,n)}function Qa(t,e){let n=/\\?./gsu;n.lastIndex=e;let r=t.length,s=0,i=1,o;for(;o=n.exec(t);){let[a]=o;if(a==="[")s++;else if(s)a==="]"&&s--;else if(a==="(")i++;else if(a===")"&&(i--,!i)){r=o.index;break}}return t.slice(e,r)}var Xa=new RegExp(String.raw`(?<noncapturingStart>${za})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function Ys(t,e){let n=e?.hiddenCaptures??[],r=e?.captureTransfers??new Map;if(!/\(\?>/.test(t))return{pattern:t,captureTransfers:r,hiddenCaptures:n};let s="(?>",i="(?:(?=(",o=[0],a=[],l=0,c=0,u=NaN,f;do{f=!1;let d=0,h=0,p=!1,g;for(Xa.lastIndex=Number.isNaN(u)?0:u+i.length;g=Xa.exec(t);){let{0:m,index:y,groups:{capturingStart:b,noncapturingStart:w}}=g;if(m==="[")d++;else if(d)m==="]"&&d--;else if(m===s&&!p)u=y,p=!0;else if(p&&w)h++;else if(b)p?h++:(l++,o.push(l+c));else if(m===")"&&p){if(!h){c++;let S=l+c;if(t=`${t.slice(0,u)}${i}${t.slice(u+s.length,y)}))<$$${S}>)${t.slice(y+1)}`,f=!0,a.push(S),Ja(n,S),r.size){let C=new Map;r.forEach((E,x)=>{C.set(x>=S?x+1:x,E.map(_=>_>=S?_+1:_))}),r=C}break}h--}}}while(f);return n.push(...a),t=pn(t,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:d,groups:{backrefNum:h,wrappedBackrefNum:p}})=>{if(h){let g=+h;if(g>o.length-1)throw new Error(`Backref "${d}" greater than number of captures`);return`\\${o[g]}`}return`\\${p}`},Z.DEFAULT),{pattern:t,captureTransfers:r,hiddenCaptures:n}}var Za=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Js=new RegExp(String.raw`
175
+ `.replace(/\s+/g,""),"gsu");function Wa(t,e={}){let n={flags:"",...e,rules:{captureGroup:!1,singleline:!1,...e.rules}};if(typeof t!="string")throw new Error("String expected as pattern");let r=sd(n.flags),s=[r.extended],o={captureGroup:n.rules.captureGroup,getCurrentModX(){return s.at(-1)},numOpenGroups:0,popModX(){s.pop()},pushModX(f){s.push(f)},replaceCurrentModX(f){s[s.length-1]=f},singleline:n.rules.singleline},i=[],a;for(Nr.lastIndex=0;a=Nr.exec(t);){let f=Gf(o,t,a[0],Nr.lastIndex);f.tokens?i.push(...f.tokens):f.token&&i.push(f.token),f.lastIndex!==void 0&&(Nr.lastIndex=f.lastIndex)}let l=[],c=0;i.filter(f=>f.type==="GroupOpen").forEach(f=>{f.kind==="capturing"?f.number=++c:f.raw==="("&&l.push(f)}),c||l.forEach((f,d)=>{f.kind="capturing",f.number=d+1});let u=c||l.length;return{tokens:i.map(f=>f.type==="EscapedNumber"?id(f,u):f).flat(),flags:r}}function Gf(t,e,n,r){let[s,o]=n;if(n==="["||n==="[^"){let i=jf(e,n,r);return{tokens:i.tokens,lastIndex:i.lastIndex}}if(s==="\\"){if("AbBGyYzZ".includes(o))return{token:Fa(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:Qf(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:Va(n)}}if(o==="K")return{token:za("keep",n)};if(o==="N"||o==="R")return{token:it("newline",n,{negate:o==="N"})};if(o==="O")return{token:it("any",n)};if(o==="X")return{token:it("text_segment",n)};let i=Ka(n,{inCharClass:!1});return Array.isArray(i)?{tokens:i}:{token:i}}if(s==="("){if(o==="*")return{token:td(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(e[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:ed(n,t)};if(t.pushModX(t.getCurrentModX()),t.numOpenGroups++,n==="("&&!t.captureGroup||n==="(?:")return{token:vt("group",n)};if(n==="(?>")return{token:vt("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:vt(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&t.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:vt("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:vt("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(t.popModX(),t.numOpenGroups--,t.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:zf(n)}}if(t.getCurrentModX()){if(n==="#"){let i=e.indexOf(`
176
+ `,r);return{lastIndex:i===-1?e.length:i}}if(/^\s$/.test(n)){let i=/\s+/y;return i.lastIndex=r,{lastIndex:i.exec(e)?i.lastIndex:r}}}if(n===".")return{token:it("dot",n)};if(n==="^"||n==="$"){let i=t.singleline?{"^":U`\A`,$:U`\Z`}[n]:n;return{token:Fa(i,n)}}return n==="|"?{token:qf(n)}:Ys.test(n)?{tokens:ad(n)}:{token:$e(ze(n),n)}}function jf(t,e,n){let r=[Da(e[1]==="^",e)],s=1,o;for(Js.lastIndex=n;o=Js.exec(t);){let i=o[0];if(i[0]==="["&&i[1]!==":")s++,r.push(Da(i[1]==="^",i));else if(i==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push($e(93,i));else if(s--,r.push(Hf(i)),!s)break}else{let a=Uf(i);Array.isArray(a)?r.push(...a):r.push(a)}}return{tokens:r,lastIndex:Js.lastIndex||t.length}}function Uf(t){if(t[0]==="\\")return Ka(t,{inCharClass:!0});if(t[0]==="["){let e=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(t);if(!e||!pn.has(e.groups.name))throw new Error(`Invalid POSIX class "${t}"`);return it("posix",t,{value:e.groups.name,negate:!!e.groups.negate})}return t==="-"?Wf(t):t==="&&"?Kf(t):$e(ze(t),t)}function Ka(t,{inCharClass:e}){let n=t[1];if(n==="c"||n==="C")return Zf(t);if("dDhHsSwW".includes(n))return nd(t);if(t.startsWith(U`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${t}"`);if(/^\\[pP]\{/.test(t)){if(t.length===3)throw new Error(`Incomplete or invalid Unicode property "${t}"`);return rd(t)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(t))try{let r=t.split(/\\x/).slice(1).map(i=>parseInt(i,16)),s=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),o=new TextEncoder;return[...s].map(i=>{let a=[...o.encode(i)].map(l=>`\\x${l.toString(16)}`).join("");return $e(ze(i),a)})}catch{throw new Error(`Multibyte code "${t}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return $e(od(t),t);if(Ga.has(n))return $e(Ga.get(n),t);if(/\d/.test(n))return Vf(e,t);if(t==="\\")throw new Error(U`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${t}"`);if([...t].length===2)return $e(t.codePointAt(1),t);throw new Error(`Unexpected escape "${t}"`)}function qf(t){return{type:"Alternator",raw:t}}function Fa(t,e){return{type:"Assertion",kind:t,raw:e}}function Va(t){return{type:"Backreference",raw:t}}function $e(t,e){return{type:"Character",value:t,raw:e}}function Hf(t){return{type:"CharacterClassClose",raw:t}}function Wf(t){return{type:"CharacterClassHyphen",raw:t}}function Kf(t){return{type:"CharacterClassIntersector",raw:t}}function Da(t,e){return{type:"CharacterClassOpen",negate:t,raw:e}}function it(t,e,n={}){return{type:"CharacterSet",kind:t,...n,raw:e}}function za(t,e,n={}){return t==="keep"?{type:"Directive",kind:t,raw:e}:{type:"Directive",kind:t,flags:Pe(n.flags),raw:e}}function Vf(t,e){return{type:"EscapedNumber",inCharClass:t,raw:e}}function zf(t){return{type:"GroupClose",raw:t}}function vt(t,e,n={}){return{type:"GroupOpen",kind:t,...n,raw:e}}function Jf(t,e,n,r){return{type:"NamedCallout",kind:t,tag:e,arguments:n,raw:r}}function Yf(t,e,n,r){return{type:"Quantifier",kind:t,min:e,max:n,raw:r}}function Qf(t){return{type:"Subroutine",raw:t}}var Xf=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),Ga=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function Zf(t){let e=t[1]==="c"?t[2]:t[3];if(!e||!/[A-Za-z]/.test(e))throw new Error(`Unsupported control character "${t}"`);return $e(ze(e.toUpperCase())-64,t)}function ed(t,e){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(t).groups;r??="";let s=(e.getCurrentModX()||n.includes("x"))&&!r.includes("x"),o=Ua(n),i=Ua(r),a={};if(o&&(a.enable=o),i&&(a.disable=i),t.endsWith(")"))return e.replaceCurrentModX(s),za("flags",t,{flags:a});if(t.endsWith(":"))return e.pushModX(s),e.numOpenGroups++,vt("group",t,{...(o||i)&&{flags:a}});throw new Error(`Unexpected flag modifier "${t}"`)}function td(t){let e=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(t);if(!e)throw new Error(`Incomplete or invalid named callout "${t}"`);let{name:n,tag:r,args:s}=e.groups;if(!n)throw new Error(`Invalid named callout "${t}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${t}"`);let o=s?s.split(",").filter(u=>u!=="").map(u=>/^[+-]?\d+$/.test(u)?+u:u):[],[i,a,l]=o,c=Xf.has(n)?n.toLowerCase():"custom";switch(c){case"fail":case"mismatch":case"skip":if(o.length>0)throw new Error(`Named callout arguments not allowed "${o}"`);break;case"error":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(typeof i=="string")throw new Error(`Named callout argument must be a number "${i}"`);break;case"max":if(!o.length||o.length>2)throw new Error(`Named callout must have one or two arguments "${o}"`);if(typeof i=="string"&&!/^[A-Za-z_]\w*$/.test(i))throw new Error(`Named callout argument one must be a tag or number "${i}"`);if(o.length===2&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${a}"`);break;case"count":case"total_count":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(o.length===1&&(typeof i=="number"||!/^[<>X]$/.test(i)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${i}"`);break;case"cmp":if(o.length!==3)throw new Error(`Named callout must have three arguments "${o}"`);if(typeof i=="string"&&!/^[A-Za-z_]\w*$/.test(i))throw new Error(`Named callout argument one must be a tag or number "${i}"`);if(typeof a=="number"||!/^(?:[<>!=]=|[<>])$/.test(a))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${a}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument three must be a tag or number "${l}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${c}"`)}return Jf(c,r??null,s?.split(",")??null,t)}function ja(t){let e=null,n,r;if(t[0]==="{"){let{minStr:s,maxStr:o}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(t).groups,i=1e5;if(+s>i||o&&+o>i)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+s,r=o===void 0?+s:o===""?1/0:+o,n>r&&(e="possessive",[n,r]=[r,n]),t.endsWith("?")){if(e==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');e="lazy"}else e||(e="greedy")}else n=t[0]==="+"?1:0,r=t[0]==="?"?1:1/0,e=t[1]==="+"?"possessive":t[1]==="?"?"lazy":"greedy";return Yf(e,n,r,t)}function nd(t){let e=t[1].toLowerCase();return it({d:"digit",h:"hex",s:"space",w:"word"}[e],t,{negate:t[1]!==e})}function rd(t){let{p:e,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(t).groups;return it("property",t,{value:r,negate:e==="P"&&!n||e==="p"&&!!n})}function Ua(t){let e={};return t.includes("i")&&(e.ignoreCase=!0),t.includes("m")&&(e.dotAll=!0),t.includes("x")&&(e.extended=!0),Object.keys(e).length?e:null}function sd(t){let e={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<t.length;n++){let r=t[n];if(!"imxDPSWy".includes(r))throw new Error(`Invalid flag "${r}"`);if(r==="y"){if(!/^y{[gw]}/.test(t.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');e.textSegmentMode=t[n+2]==="g"?"grapheme":"word",n+=3;continue}e[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[r]]=!0}return e}function od(t){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(t))throw new Error(`Incomplete or invalid escape "${t}"`);let e=t[2]==="{"?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(t).groups.hex:t.slice(2);return parseInt(e,16)}function id(t,e){let{raw:n,inCharClass:r}=t,s=n.slice(1);if(!r&&(s!=="0"&&s.length===1||s[0]!=="0"&&+s<=e))return[Va(n)];let o=[],i=s.match(/^[0-7]+|\d/g);for(let a=0;a<i.length;a++){let l=i[a],c;if(a===0&&l!=="8"&&l!=="9"){if(c=parseInt(l,8),c>127)throw new Error(U`Octal encoded byte above 177 unsupported "${n}"`)}else c=ze(l);o.push($e(c,(a===0?"\\":"")+l))}return o}function ad(t){let e=[],n=new RegExp(Ys,"gy"),r;for(;r=n.exec(t);){let s=r[0];if(s[0]==="{"){let o=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(s);if(o){let{min:i,max:a}=o.groups;if(+i>+a&&s.endsWith("?")){n.lastIndex--,e.push(ja(s.slice(0,-1)));continue}}}e.push(ja(s))}return e}function xr(t,e){if(!Array.isArray(t.body))throw new Error("Expected node with body array");if(t.body.length!==1)return!1;let n=t.body[0];return!e||Object.keys(e).every(r=>e[r]===n[r])}function Ja(t){return ld.has(t.type)}var ld=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function Tr(t,e={}){let n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...e,rules:{captureGroup:!1,singleline:!1,...e.rules}},r=Wa(t,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),s=(d,h)=>{let p=r.tokens[o.nextIndex];switch(o.parent=d,o.nextIndex++,p.type){case"Alternator":return Me();case"Assertion":return cd(p);case"Backreference":return ud(p,o);case"Character":return Et(p.value,{useLastValid:!!h.isCheckingRangeEnd});case"CharacterClassHyphen":return fd(p,o,h);case"CharacterClassOpen":return dd(p,o,h);case"CharacterSet":return hd(p,o);case"Directive":return wd(p.kind,{flags:p.flags});case"GroupOpen":return pd(p,o,h);case"NamedCallout":return Sd(p.kind,p.tag,p.arguments);case"Quantifier":return gd(p,o);case"Subroutine":return md(p,o);default:throw new Error(`Unexpected token type "${p.type}"`)}},o={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:s},i=_d(kd(r.flags)),a=i.body[0];for(;o.nextIndex<r.tokens.length;){let d=s(a,{});d.type==="Alternative"?(i.body.push(d),a=d):a.body.push(d)}let{capturingGroups:l,hasNumberedRef:c,namedGroupsByName:u,subroutines:f}=o;if(c&&u.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(let{ref:d}of f)if(typeof d=="number"){if(d>l.length)throw new Error("Subroutine uses a group number that's not defined");d&&(l[d-1].isSubroutined=!0)}else if(u.has(d)){if(u.get(d).length>1)throw new Error(U`Subroutine uses a duplicate group name "\g<${d}>"`);u.get(d)[0].isSubroutined=!0}else throw new Error(U`Subroutine uses a group name that's not defined "\g<${d}>"`);return i}function cd({kind:t}){return Lr(Pe({"^":"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"}[t],`Unexpected assertion kind "${t}"`),{negate:t===U`\B`||t===U`\Y`})}function ud({raw:t},e){let n=/^\\k[<']/.test(t),r=n?t.slice(3,-1):t.slice(1),s=(o,i=!1)=>{let a=e.capturingGroups.length,l=!1;if(o>a)if(e.skipBackrefValidation)l=!0;else throw new Error(`Not enough capturing groups defined to the left "${t}"`);return e.hasNumberedRef=!0,Ir(i?a+1-o:o,{orphan:l})};if(n){let o=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(o)return s(+o.groups.num,!!o.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${t}"`);if(!e.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${t}"`);return Ir(r)}return s(+r)}function fd(t,e,n){let{tokens:r,walk:s}=e,o=e.parent,i=o.body.at(-1),a=r[e.nextIndex];if(!n.isCheckingRangeEnd&&i&&i.type!=="CharacterClass"&&i.type!=="CharacterClassRange"&&a&&a.type!=="CharacterClassOpen"&&a.type!=="CharacterClassClose"&&a.type!=="CharacterClassIntersector"){let l=s(o,{...n,isCheckingRangeEnd:!0});if(i.type==="Character"&&l.type==="Character")return o.body.pop(),bd(i,l);throw new Error("Invalid character class range")}return Et(ze("-"))}function dd({negate:t},e,n){let{tokens:r,walk:s}=e,o=[gn()],i=r[e.nextIndex],a=Xa(i);for(;a.type!=="CharacterClassClose";){if(a.type==="CharacterClassIntersector")o.push(gn()),e.nextIndex++;else{let c=o.at(-1);c.body.push(s(c,n))}a=Xa(r[e.nextIndex],i)}let l=gn({negate:t});return o.length===1?l.body=o[0].body:(l.kind="intersection",l.body=o.map(c=>c.body.length===1?c.body[0]:c)),e.nextIndex++,l}function hd({kind:t,negate:e,value:n},r){let{normalizeUnknownPropertyNames:s,skipPropertyNameValidation:o,unicodePropertyMap:i}=r;if(t==="property"){let a=At(n);if(pn.has(a)&&!i?.has(a))t="posix",n=a;else return at(n,{negate:e,normalizeUnknownPropertyNames:s,skipPropertyNameValidation:o,unicodePropertyMap:i})}return t==="posix"?Cd(n,{negate:e}):Br(t,{negate:e})}function pd(t,e,n){let{tokens:r,capturingGroups:s,namedGroupsByName:o,skipLookbehindValidation:i,walk:a}=e,l=vd(t),c=l.type==="AbsenceFunction",u=Qa(l),f=u&&l.negate;if(l.type==="CapturingGroup"&&(s.push(l),l.name&&Ma(o,l.name,[]).push(l)),c&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let d=Za(r[e.nextIndex]);for(;d.type!=="GroupClose";){if(d.type==="Alternator")l.body.push(Me()),e.nextIndex++;else{let h=l.body.at(-1),p=a(h,{...n,isInAbsenceFunction:n.isInAbsenceFunction||c,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||f});if(h.body.push(p),(u||n.isInLookbehind)&&!i){let g="Lookbehind includes a pattern not allowed by Oniguruma";if(f||n.isInNegLookbehind){if(Ya(p)||p.type==="CapturingGroup")throw new Error(g)}else if(Ya(p)||Qa(p)&&p.negate)throw new Error(g)}}d=Za(r[e.nextIndex])}return e.nextIndex++,l}function gd({kind:t,min:e,max:n},r){let s=r.parent,o=s.body.at(-1);if(!o||!Ja(o))throw new Error("Quantifier requires a repeatable token");let i=Xs(t,e,n,o);return s.body.pop(),i}function md({raw:t},e){let{capturingGroups:n,subroutines:r}=e,s=t.slice(3,-1),o=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(s);if(o){let a=+o.groups.num,l=n.length;if(e.hasNumberedRef=!0,s={"":a,"+":l+a,"-":l+1-a}[o.groups.sign],s<1)throw new Error("Invalid subroutine number")}else s==="0"&&(s=0);let i=Zs(s);return r.push(i),i}function yd(t,e){if(t!=="repeater")throw new Error(`Unexpected absence function kind "${t}"`);return{type:"AbsenceFunction",kind:t,body:mn(e?.body)}}function Me(t){return{type:"Alternative",body:el(t?.body)}}function Lr(t,e){let n={type:"Assertion",kind:t};return(t==="word_boundary"||t==="text_segment_boundary")&&(n.negate=!!e?.negate),n}function Ir(t,e){let n=!!e?.orphan;return{type:"Backreference",ref:t,...n&&{orphan:n}}}function Qs(t,e){let n={name:void 0,isSubroutined:!1,...e};if(n.name!==void 0&&!Ed(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:t,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:mn(e?.body)}}function Et(t,e){let n={useLastValid:!1,...e};if(t>1114111){let r=t.toString(16);if(n.useLastValid)t=1114111;else throw t>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:t}}function gn(t){let e={kind:"union",negate:!1,...t};return{type:"CharacterClass",kind:e.kind,negate:e.negate,body:el(t?.body)}}function bd(t,e){if(e.value<t.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:t,max:e}}function Br(t,e){let n=!!e?.negate,r={type:"CharacterSet",kind:t};return(t==="digit"||t==="hex"||t==="newline"||t==="space"||t==="word")&&(r.negate=n),(t==="text_segment"||t==="newline"&&!n)&&(r.variableLength=!0),r}function wd(t,e={}){if(t==="keep")return{type:"Directive",kind:t};if(t==="flags")return{type:"Directive",kind:t,flags:Pe(e.flags)};throw new Error(`Unexpected directive kind "${t}"`)}function kd(t){return{type:"Flags",...t}}function ne(t){let e=t?.atomic,n=t?.flags;if(e&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...e&&{atomic:e},...n&&{flags:n},body:mn(t?.body)}}function Je(t){let e={behind:!1,negate:!1,...t};return{type:"LookaroundAssertion",kind:e.behind?"lookbehind":"lookahead",negate:e.negate,body:mn(t?.body)}}function Sd(t,e,n){return{type:"NamedCallout",kind:t,tag:e,arguments:n}}function Cd(t,e){let n=!!e?.negate;if(!pn.has(t))throw new Error(`Invalid POSIX class "${t}"`);return{type:"CharacterSet",kind:"posix",value:t,negate:n}}function Xs(t,e,n,r){if(e>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:t,min:e,max:n,body:r}}function _d(t,e){return{type:"Regex",body:mn(e?.body),flags:t}}function Zs(t){return{type:"Subroutine",ref:t}}function at(t,e){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...e},r=n.unicodePropertyMap?.get(At(t));if(!r){if(n.normalizeUnknownPropertyNames)r=Ad(t);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(U`Invalid Unicode property "\p{${t}}"`)}return{type:"CharacterSet",kind:"property",value:r??t,negate:n.negate}}function vd({flags:t,kind:e,name:n,negate:r,number:s}){switch(e){case"absence_repeater":return yd("repeater");case"atomic":return ne({atomic:!0});case"capturing":return Qs(s,{name:n});case"group":return ne({flags:t});case"lookahead":case"lookbehind":return Je({behind:e==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${e}"`)}}function mn(t){if(t===void 0)t=[Me()];else if(!Array.isArray(t)||!t.length||!t.every(e=>e.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return t}function el(t){if(t===void 0)t=[];else if(!Array.isArray(t)||!t.every(e=>!!e.type))throw new Error("Invalid body; expected array of nodes");return t}function Ya(t){return t.type==="LookaroundAssertion"&&t.kind==="lookahead"}function Qa(t){return t.type==="LookaroundAssertion"&&t.kind==="lookbehind"}function Ed(t){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(t)}function Ad(t){return t.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase())}function At(t){return t.replace(/[- _]+/g,"").toLowerCase()}function Xa(t,e){let n=e;return Pe(t,`Unclosed character class${n?.type==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function Za(t){return Pe(t,"Unclosed group")}function lt(t,e,n=null){function r(o,i){for(let a=0;a<o.length;a++){let l=s(o[a],i,a,o);a=Math.max(-1,a+l)}}function s(o,i=null,a=null,l=null){let c=0,u=!1,f={node:o,parent:i,key:a,container:l,root:t,remove(){Rr(l).splice(Math.max(0,Nt(a)+c),1),c--,u=!0},removeAllNextSiblings(){return Rr(l).splice(Nt(a)+1)},removeAllPrevSiblings(){let y=Nt(a)+c;return c-=y,Rr(l).splice(0,Math.max(0,y))},replaceWith(y,b={}){let w=!!b.traverse;l?l[Math.max(0,Nt(a)+c)]=y:Pe(i,"Can't replace root node")[a]=y,w&&s(y,i,a,l),u=!0},replaceWithMultiple(y,b={}){let w=!!b.traverse;if(Rr(l).splice(Math.max(0,Nt(a)+c),1,...y),c+=y.length-1,w){let S=0;for(let C=0;C<y.length;C++)S+=s(y[C],i,Nt(a)+C+S,l)}u=!0},skip(){u=!0}},{type:d}=o,h=e["*"],p=e[d],g=typeof h=="function"?h:h?.enter,m=typeof p=="function"?p:p?.enter;if(g?.(f,n),m?.(f,n),!u)switch(d){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":r(o.body,o);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":s(o.min,o,"min"),s(o.max,o,"max");break;case"Quantifier":s(o.body,o,"body");break;case"Regex":r(o.body,o),s(o.flags,o,"flags");break;default:throw new Error(`Unexpected node type "${d}"`)}return p?.exit?.(f,n),h?.exit?.(f,n),c}return s(t),t}function Rr(t){if(!Array.isArray(t))throw new Error("Container expected");return t}function Nt(t){if(typeof t!="number")throw new Error("Numeric key expected");return t}var tl=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function nl(t,e){for(let n=0;n<t.length;n++)t[n]>=e&&t[n]++}function rl(t,e,n,r){return t.slice(0,e)+r+t.slice(e+n.length)}var Z=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function yn(t,e,n,r){let s=new RegExp(String.raw`${e}|(?<$skip>\[\^?|\\?.)`,"gsu"),o=[!1],i=0,a="";for(let l of t.matchAll(s)){let{0:c,groups:{$skip:u}}=l;if(!u&&(!r||r===Z.DEFAULT==!i)){n instanceof Function?a+=n(l,{context:i?Z.CHAR_CLASS:Z.DEFAULT,negated:o[o.length-1]}):a+=n;continue}c[0]==="["?(i++,o.push(c[1]==="^")):c==="]"&&i&&(i--,o.pop()),a+=c}return a}function eo(t,e,n,r){yn(t,e,n,r)}function Nd(t,e,n=0,r){if(!new RegExp(e,"su").test(t))return null;let s=new RegExp(`${e}|(?<$skip>\\\\?.)`,"gsu");s.lastIndex=n;let o=0,i;for(;i=s.exec(t);){let{0:a,groups:{$skip:l}}=i;if(!l&&(!r||r===Z.DEFAULT==!o))return i;a==="["?o++:a==="]"&&o&&o--,s.lastIndex==i.index&&s.lastIndex++}return null}function bn(t,e,n){return!!Nd(t,e,0,n)}function sl(t,e){let n=/\\?./gsu;n.lastIndex=e;let r=t.length,s=0,o=1,i;for(;i=n.exec(t);){let[a]=i;if(a==="[")s++;else if(s)a==="]"&&s--;else if(a==="(")o++;else if(a===")"&&(o--,!o)){r=i.index;break}}return t.slice(e,r)}var ol=new RegExp(String.raw`(?<noncapturingStart>${tl})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function no(t,e){let n=e?.hiddenCaptures??[],r=e?.captureTransfers??new Map;if(!/\(\?>/.test(t))return{pattern:t,captureTransfers:r,hiddenCaptures:n};let s="(?>",o="(?:(?=(",i=[0],a=[],l=0,c=0,u=NaN,f;do{f=!1;let d=0,h=0,p=!1,g;for(ol.lastIndex=Number.isNaN(u)?0:u+o.length;g=ol.exec(t);){let{0:m,index:y,groups:{capturingStart:b,noncapturingStart:w}}=g;if(m==="[")d++;else if(d)m==="]"&&d--;else if(m===s&&!p)u=y,p=!0;else if(p&&w)h++;else if(b)p?h++:(l++,i.push(l+c));else if(m===")"&&p){if(!h){c++;let S=l+c;if(t=`${t.slice(0,u)}${o}${t.slice(u+s.length,y)}))<$$${S}>)${t.slice(y+1)}`,f=!0,a.push(S),nl(n,S),r.size){let C=new Map;r.forEach((E,x)=>{C.set(x>=S?x+1:x,E.map(_=>_>=S?_+1:_))}),r=C}break}h--}}}while(f);return n.push(...a),t=yn(t,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:d,groups:{backrefNum:h,wrappedBackrefNum:p}})=>{if(h){let g=+h;if(g>i.length-1)throw new Error(`Backref "${d}" greater than number of captures`);return`\\${i[g]}`}return`\\${p}`},Z.DEFAULT),{pattern:t,captureTransfers:r,hiddenCaptures:n}}var il=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,to=new RegExp(String.raw`
177
177
  \\(?: \d+
178
178
  | c[A-Za-z]
179
179
  | [gk]<[^>]+>
@@ -186,9 +186,9 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
186
186
  | [A-Za-z\-]+:
187
187
  | \(DEFINE\)
188
188
  ))?
189
- | (?<qBase>${Za})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
189
+ | (?<qBase>${il})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
190
190
  | \\?.
191
- `.replace(/\s+/g,""),"gsu");function Qs(t){if(!new RegExp(`${Za}\\+`).test(t))return{pattern:t};let e=[],n=null,r=null,s="",i=0,o;for(Js.lastIndex=0;o=Js.exec(t);){let{0:a,index:l,groups:{qBase:c,qMod:u,invalidQ:f}}=o;if(a==="[")i||(r=l),i++;else if(a==="]")i?i--:r=null;else if(!i)if(u==="+"&&s&&!s.startsWith("(")){if(f)throw new Error(`Invalid quantifier "${a}"`);let d=-1;if(/^\{\d+\}$/.test(c))t=Ya(t,l+c.length,u,"");else{if(s===")"||s==="]"){let h=s===")"?n:r;if(h===null)throw new Error(`Invalid unmatched "${s}"`);t=`${t.slice(0,h)}(?>${t.slice(h,l)}${c})${t.slice(l+a.length)}`}else t=`${t.slice(0,l-s.length)}(?>${s}${c})${t.slice(l+a.length)}`;d+=4}Js.lastIndex+=d}else a[0]==="("?e.push(l):a===")"&&(n=e.length?e.pop():null);s=a}return{pattern:t}}var le=String.raw,wd=le`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Zs=le`\(\?R=(?<rDepth>[^\)]+)\)|${wd}`,Tr=le`\(\?<(?![=!])(?<captureName>[^>]+)>`,sl=le`${Tr}|(?<unnamed>\()(?!\?)`,ct=new RegExp(le`${Tr}|${Zs}|\(\?|\\?.`,"gsu"),Xs="Cannot use multiple overlapping recursions";function il(t,e){let{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...e},s=e?.captureTransfers??new Map;if(!new RegExp(Zs,"su").test(t))return{pattern:t,captureTransfers:s,hiddenCaptures:n};if(r==="plugin"&&gn(t,le`\(\?\(DEFINE\)`,Z.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");let i=[],o=gn(t,le`\\[1-9]`,Z.DEFAULT),a=new Map,l=[],c=!1,u=0,f=0,d;for(ct.lastIndex=0;d=ct.exec(t);){let{0:h,groups:{captureName:p,rDepth:g,gRNameOrNum:m,gRDepth:y}}=d;if(h==="[")u++;else if(u)h==="]"&&u--;else if(g){if(el(g),c)throw new Error(Xs);if(o)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);let b=t.slice(0,d.index),w=t.slice(ct.lastIndex);if(gn(w,Zs,Z.DEFAULT))throw new Error(Xs);let S=+g-1;t=tl(b,w,S,!1,n,i,f),s=rl(s,b,S,i.length,0,f);break}else if(m){el(y);let b=!1;for(let O of l)if(O.name===m||O.num===+m){if(b=!0,O.hasRecursedWithin)throw new Error(Xs);break}if(!b)throw new Error(le`Recursive \g cannot be used outside the referenced group "${r==="external"?m:le`\g<${m}&R=${y}>`}"`);let w=a.get(m),S=Qa(t,w);if(o&&gn(S,le`${Tr}|\((?!\?)`,Z.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);let C=t.slice(w,d.index),E=S.slice(C.length+h.length),x=i.length,_=+y-1,$=tl(C,E,_,!0,n,i,f);s=rl(s,C,_,i.length-x,x,f);let re=t.slice(0,w),ye=t.slice(w+S.length);t=`${re}${$}${ye}`,ct.lastIndex+=$.length-h.length-C.length-E.length,l.forEach(O=>O.hasRecursedWithin=!0),c=!0}else if(p)f++,a.set(String(f),ct.lastIndex),a.set(p,ct.lastIndex),l.push({num:f,name:p});else if(h[0]==="("){let b=h==="(";b&&(f++,a.set(String(f),ct.lastIndex)),l.push(b?{num:f}:{})}else h===")"&&l.pop()}return n.push(...i),{pattern:t,captureTransfers:s,hiddenCaptures:n}}function el(t){let e=`Max depth must be integer between 2 and 100; used ${t}`;if(!/^[1-9]\d*$/.test(t))throw new Error(e);if(t=+t,t<2||t>100)throw new Error(e)}function tl(t,e,n,r,s,i,o){let a=new Set;r&&zs(t+e,Tr,({groups:{captureName:c}})=>{a.add(c)},Z.DEFAULT);let l=[n,r?a:null,s,i,o];return`${t}${nl(`(?:${t}`,"forward",...l)}(?:)${nl(`${e})`,"backward",...l)}${e}`}function nl(t,e,n,r,s,i,o){let l=u=>e==="forward"?u+2:n-u+2-1,c="";for(let u=0;u<n;u++){let f=l(u);c+=pn(t,le`${sl}|\\k<(?<backref>[^>]+)>`,({0:d,groups:{captureName:h,unnamed:p,backref:g}})=>{if(g&&r&&!r.has(g))return d;let m=`_$${f}`;if(p||h){let y=o+i.length+1;return i.push(y),kd(s,y),p?d:`(?<${h}${m}>`}return le`\k<${g}${m}>`},Z.DEFAULT)}return c}function kd(t,e){for(let n=0;n<t.length;n++)t[n]>=e&&t[n]++}function rl(t,e,n,r,s,i){if(t.size&&r){let o=0;zs(e,sl,()=>o++,Z.DEFAULT);let a=i-o+s,l=new Map;return t.forEach((c,u)=>{let f=(r-o*n)/n,d=o*n,h=u>a+o?u+r:u,p=[];for(let g of c)if(g<=a)p.push(g);else if(g>a+o+f)p.push(g+r);else if(g<=a+o)for(let m=0;m<=n;m++)p.push(g+o*m);else for(let m=0;m<=n;m++)p.push(g+d+f*m);l.set(h,p)}),l}return t}var H=String.fromCodePoint,N=String.raw,me={},Br=globalThis.RegExp;me.flagGroups=(()=>{try{new Br("(?i:)")}catch{return!1}return!0})();me.unicodeSets=(()=>{try{new Br("[[]]","v")}catch{return!1}return!0})();me.bugFlagVLiteralHyphenIsRange=me.unicodeSets?(()=>{try{new Br(N`[\d\-a]`,"v")}catch{return!0}return!1})():!1;me.bugNestedClassIgnoresNegation=me.unicodeSets&&new Br("[[^a]]","v").test("a");function Lr(t,{enable:e,disable:n}){return{dotAll:!n?.dotAll&&!!(e?.dotAll||t.dotAll),ignoreCase:!n?.ignoreCase&&!!(e?.ignoreCase||t.ignoreCase)}}function mn(t,e,n){return t.has(e)||t.set(e,n),t.get(e)}function si(t,e){return ol[t]>=ol[e]}function Sd(t,e){if(t==null)throw new Error(e??"Value expected");return t}var ol={ES2025:2025,ES2024:2024,ES2018:2018},Cd={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function fl(t={}){if({}.toString.call(t)!=="[object Object]")throw new Error("Unexpected options");if(t.target!==void 0&&!Cd[t.target])throw new Error(`Unexpected target "${t.target}"`);let e={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...t,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...t.rules}};return e.target==="auto"&&(e.target=me.flagGroups?"ES2025":me.unicodeSets?"ES2024":"ES2018"),e}var _d="[ -\r ]",vd=new Set([H(304),H(305)]),Fe=N`[\p{L}\p{M}\p{N}\p{Pc}]`;function dl(t){if(vd.has(t))return[t];let e=new Set,n=t.toLowerCase(),r=n.toUpperCase(),s=Nd.get(n),i=Ed.get(n),o=Ad.get(n);return[...r].length===1&&e.add(r),o&&e.add(o),s&&e.add(s),e.add(n),i&&e.add(i),[...e]}var oi=new Map(`C Other
191
+ `.replace(/\s+/g,""),"gsu");function ro(t){if(!new RegExp(`${il}\\+`).test(t))return{pattern:t};let e=[],n=null,r=null,s="",o=0,i;for(to.lastIndex=0;i=to.exec(t);){let{0:a,index:l,groups:{qBase:c,qMod:u,invalidQ:f}}=i;if(a==="[")o||(r=l),o++;else if(a==="]")o?o--:r=null;else if(!o)if(u==="+"&&s&&!s.startsWith("(")){if(f)throw new Error(`Invalid quantifier "${a}"`);let d=-1;if(/^\{\d+\}$/.test(c))t=rl(t,l+c.length,u,"");else{if(s===")"||s==="]"){let h=s===")"?n:r;if(h===null)throw new Error(`Invalid unmatched "${s}"`);t=`${t.slice(0,h)}(?>${t.slice(h,l)}${c})${t.slice(l+a.length)}`}else t=`${t.slice(0,l-s.length)}(?>${s}${c})${t.slice(l+a.length)}`;d+=4}to.lastIndex+=d}else a[0]==="("?e.push(l):a===")"&&(n=e.length?e.pop():null);s=a}return{pattern:t}}var le=String.raw,xd=le`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,oo=le`\(\?R=(?<rDepth>[^\)]+)\)|${xd}`,Or=le`\(\?<(?![=!])(?<captureName>[^>]+)>`,fl=le`${Or}|(?<unnamed>\()(?!\?)`,ct=new RegExp(le`${Or}|${oo}|\(\?|\\?.`,"gsu"),so="Cannot use multiple overlapping recursions";function dl(t,e){let{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...e},s=e?.captureTransfers??new Map;if(!new RegExp(oo,"su").test(t))return{pattern:t,captureTransfers:s,hiddenCaptures:n};if(r==="plugin"&&bn(t,le`\(\?\(DEFINE\)`,Z.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");let o=[],i=bn(t,le`\\[1-9]`,Z.DEFAULT),a=new Map,l=[],c=!1,u=0,f=0,d;for(ct.lastIndex=0;d=ct.exec(t);){let{0:h,groups:{captureName:p,rDepth:g,gRNameOrNum:m,gRDepth:y}}=d;if(h==="[")u++;else if(u)h==="]"&&u--;else if(g){if(al(g),c)throw new Error(so);if(i)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);let b=t.slice(0,d.index),w=t.slice(ct.lastIndex);if(bn(w,oo,Z.DEFAULT))throw new Error(so);let S=+g-1;t=ll(b,w,S,!1,n,o,f),s=ul(s,b,S,o.length,0,f);break}else if(m){al(y);let b=!1;for(let R of l)if(R.name===m||R.num===+m){if(b=!0,R.hasRecursedWithin)throw new Error(so);break}if(!b)throw new Error(le`Recursive \g cannot be used outside the referenced group "${r==="external"?m:le`\g<${m}&R=${y}>`}"`);let w=a.get(m),S=sl(t,w);if(i&&bn(S,le`${Or}|\((?!\?)`,Z.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);let C=t.slice(w,d.index),E=S.slice(C.length+h.length),x=o.length,_=+y-1,$=ll(C,E,_,!0,n,o,f);s=ul(s,C,_,o.length-x,x,f);let re=t.slice(0,w),ye=t.slice(w+S.length);t=`${re}${$}${ye}`,ct.lastIndex+=$.length-h.length-C.length-E.length,l.forEach(R=>R.hasRecursedWithin=!0),c=!0}else if(p)f++,a.set(String(f),ct.lastIndex),a.set(p,ct.lastIndex),l.push({num:f,name:p});else if(h[0]==="("){let b=h==="(";b&&(f++,a.set(String(f),ct.lastIndex)),l.push(b?{num:f}:{})}else h===")"&&l.pop()}return n.push(...o),{pattern:t,captureTransfers:s,hiddenCaptures:n}}function al(t){let e=`Max depth must be integer between 2 and 100; used ${t}`;if(!/^[1-9]\d*$/.test(t))throw new Error(e);if(t=+t,t<2||t>100)throw new Error(e)}function ll(t,e,n,r,s,o,i){let a=new Set;r&&eo(t+e,Or,({groups:{captureName:c}})=>{a.add(c)},Z.DEFAULT);let l=[n,r?a:null,s,o,i];return`${t}${cl(`(?:${t}`,"forward",...l)}(?:)${cl(`${e})`,"backward",...l)}${e}`}function cl(t,e,n,r,s,o,i){let l=u=>e==="forward"?u+2:n-u+2-1,c="";for(let u=0;u<n;u++){let f=l(u);c+=yn(t,le`${fl}|\\k<(?<backref>[^>]+)>`,({0:d,groups:{captureName:h,unnamed:p,backref:g}})=>{if(g&&r&&!r.has(g))return d;let m=`_$${f}`;if(p||h){let y=i+o.length+1;return o.push(y),Id(s,y),p?d:`(?<${h}${m}>`}return le`\k<${g}${m}>`},Z.DEFAULT)}return c}function Id(t,e){for(let n=0;n<t.length;n++)t[n]>=e&&t[n]++}function ul(t,e,n,r,s,o){if(t.size&&r){let i=0;eo(e,fl,()=>i++,Z.DEFAULT);let a=o-i+s,l=new Map;return t.forEach((c,u)=>{let f=(r-i*n)/n,d=i*n,h=u>a+i?u+r:u,p=[];for(let g of c)if(g<=a)p.push(g);else if(g>a+i+f)p.push(g+r);else if(g<=a+i)for(let m=0;m<=n;m++)p.push(g+i*m);else for(let m=0;m<=n;m++)p.push(g+d+f*m);l.set(h,p)}),l}return t}var H=String.fromCodePoint,N=String.raw,me={},$r=globalThis.RegExp;me.flagGroups=(()=>{try{new $r("(?i:)")}catch{return!1}return!0})();me.unicodeSets=(()=>{try{new $r("[[]]","v")}catch{return!1}return!0})();me.bugFlagVLiteralHyphenIsRange=me.unicodeSets?(()=>{try{new $r(N`[\d\-a]`,"v")}catch{return!0}return!1})():!1;me.bugNestedClassIgnoresNegation=me.unicodeSets&&new $r("[[^a]]","v").test("a");function Pr(t,{enable:e,disable:n}){return{dotAll:!n?.dotAll&&!!(e?.dotAll||t.dotAll),ignoreCase:!n?.ignoreCase&&!!(e?.ignoreCase||t.ignoreCase)}}function wn(t,e,n){return t.has(e)||t.set(e,n),t.get(e)}function uo(t,e){return hl[t]>=hl[e]}function Td(t,e){if(t==null)throw new Error(e??"Value expected");return t}var hl={ES2025:2025,ES2024:2024,ES2018:2018},Ld={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function bl(t={}){if({}.toString.call(t)!=="[object Object]")throw new Error("Unexpected options");if(t.target!==void 0&&!Ld[t.target])throw new Error(`Unexpected target "${t.target}"`);let e={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...t,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...t.rules}};return e.target==="auto"&&(e.target=me.flagGroups?"ES2025":me.unicodeSets?"ES2024":"ES2018"),e}var Bd="[ -\r ]",Rd=new Set([H(304),H(305)]),Fe=N`[\p{L}\p{M}\p{N}\p{Pc}]`;function wl(t){if(Rd.has(t))return[t];let e=new Set,n=t.toLowerCase(),r=n.toUpperCase(),s=$d.get(n),o=Od.get(n),i=Pd.get(n);return[...r].length===1&&e.add(r),i&&e.add(i),s&&e.add(s),e.add(n),o&&e.add(o),[...e]}var ho=new Map(`C Other
192
192
  Cc Control cntrl
193
193
  Cf Format
194
194
  Cn Unassigned
@@ -278,8 +278,8 @@ Uppercase Upper
278
278
  Variation_Selector VS
279
279
  White_Space space
280
280
  XID_Continue XIDC
281
- XID_Start XIDS`.split(/\s/).map(t=>[At(t),t])),Ed=new Map([["s",H(383)],[H(383),"s"]]),Ad=new Map([[H(223),H(7838)],[H(107),H(8490)],[H(229),H(8491)],[H(969),H(8486)]]),Nd=new Map([Ye(453),Ye(456),Ye(459),Ye(498),...ei(8072,8079),...ei(8088,8095),...ei(8104,8111),Ye(8124),Ye(8140),Ye(8188)]),xd=new Map([["alnum",N`[\p{Alpha}\p{Nd}]`],["alpha",N`\p{Alpha}`],["ascii",N`\p{ASCII}`],["blank",N`[\p{Zs}\t]`],["cntrl",N`\p{Cc}`],["digit",N`\p{Nd}`],["graph",N`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",N`\p{Lower}`],["print",N`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",N`[\p{P}\p{S}]`],["space",N`\p{space}`],["upper",N`\p{Upper}`],["word",N`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",N`\p{AHex}`]]);function Id(t,e){let n=[];for(let r=t;r<=e;r++)n.push(r);return n}function Ye(t){let e=H(t);return[e.toLowerCase(),e]}function ei(t,e){return Id(t,e).map(n=>Ye(n))}var hl=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function Td(t,e){let n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...e};pl(t);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:si(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:t.flags.digitIsAscii,spaceIsAscii:t.flags.spaceIsAscii,wordIsAscii:t.flags.wordIsAscii};lt(t,Ld,r);let s={dotAll:t.flags.dotAll,ignoreCase:t.flags.ignoreCase},i={currentFlags:s,prevFlags:null,globalFlags:s,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};lt(t,Bd,i);let o={groupsByName:i.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:i.reffedNodesByReferencer};return lt(t,Od,o),t._originMap=i.groupOriginByCopy,t._strategy=r.strategy,t}var Ld={AbsenceFunction({node:t,parent:e,replaceWith:n}){let{body:r,kind:s}=t;if(s==="repeater"){let i=ne();i.body[0].body.push(Je({negate:!0,body:r}),at("Any"));let o=ne();o.body[0].body.push(Ks("greedy",0,1/0,i)),n(j(o,e),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:t,parent:e,key:n},{flagDirectivesByAlt:r}){let s=t.body.filter(i=>i.kind==="flags");for(let i=n+1;i<e.body.length;i++){let o=e.body[i];mn(r,o,[]).push(...s)}},exit({node:t},{flagDirectivesByAlt:e}){if(e.get(t)?.length){let n=ml(e.get(t));if(n){let r=ne({flags:n});r.body[0].body=t.body,t.body=[j(r,t)]}}}},Assertion({node:t,parent:e,key:n,container:r,root:s,remove:i,replaceWith:o},a){let{kind:l,negate:c}=t,{asciiWordBoundaries:u,avoidSubclass:f,supportedGNodes:d,wordIsAscii:h}=a;if(l==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${c?"Y":"y"}"`);if(l==="line_end")o(j(Je({body:[Me({body:[Nr("string_end")]}),Me({body:[Et(10)]})]}),e));else if(l==="line_start")o(j(De(N`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),e));else if(l==="search_start")if(d.has(t))s.flags.sticky=!0,i();else{let p=r[n-1];if(p&&Dd(p))o(j(Je({negate:!0}),e));else{if(f)throw new Error(N`Uses "\G" in a way that requires a subclass`);o(Qe(Nr("string_start"),e)),a.strategy="clip_search"}}else if(!(l==="string_end"||l==="string_start"))if(l==="string_end_newline")o(j(De(N`(?=\n?\z)`),e));else if(l==="word_boundary"){if(!h&&!u){let p=`(?:(?<=${Fe})(?!${Fe})|(?<!${Fe})(?=${Fe}))`,g=`(?:(?<=${Fe})(?=${Fe})|(?<!${Fe})(?!${Fe}))`;o(j(De(c?g:p),e))}}else throw new Error(`Unexpected assertion kind "${l}"`)},Backreference({node:t},{jsGroupNameMap:e}){let{ref:n}=t;typeof n=="string"&&!ni(n)&&(n=ti(n,e),t.ref=n)},CapturingGroup({node:t},{jsGroupNameMap:e,subroutineRefMap:n}){let{name:r}=t;r&&!ni(r)&&(r=ti(r,e),t.name=r),n.set(t.number,t),r&&n.set(r,t)},CharacterClassRange({node:t,parent:e,replaceWith:n}){if(e.kind==="intersection"){let r=dn({body:[t]});n(j(r,e),{traverse:!0})}},CharacterSet({node:t,parent:e,replaceWith:n},{accuracy:r,minTargetEs2024:s,digitIsAscii:i,spaceIsAscii:o,wordIsAscii:a}){let{kind:l,negate:c,value:u}=t;if(i&&(l==="digit"||u==="digit")){n(Qe(xr("digit",{negate:c}),e));return}if(o&&(l==="space"||u==="space")){n(j(ri(De(_d),c),e));return}if(a&&(l==="word"||u==="word")){n(Qe(xr("word",{negate:c}),e));return}if(l==="any")n(Qe(at("Any"),e));else if(l==="digit")n(Qe(at("Nd",{negate:c}),e));else if(l!=="dot")if(l==="text_segment"){if(r==="strict")throw new Error(N`Use of "\X" requires non-strict accuracy`);let f="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",d=N`\p{RI}{2}|${f}(?:\u200D${f})*`;n(j(De(N`(?>\r\n|${s?N`\p{RGI_Emoji}`:d}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),e))}else if(l==="hex")n(Qe(at("AHex",{negate:c}),e));else if(l==="newline")n(j(De(c?`[^
281
+ XID_Start XIDS`.split(/\s/).map(t=>[At(t),t])),Od=new Map([["s",H(383)],[H(383),"s"]]),Pd=new Map([[H(223),H(7838)],[H(107),H(8490)],[H(229),H(8491)],[H(969),H(8486)]]),$d=new Map([Ye(453),Ye(456),Ye(459),Ye(498),...io(8072,8079),...io(8088,8095),...io(8104,8111),Ye(8124),Ye(8140),Ye(8188)]),Md=new Map([["alnum",N`[\p{Alpha}\p{Nd}]`],["alpha",N`\p{Alpha}`],["ascii",N`\p{ASCII}`],["blank",N`[\p{Zs}\t]`],["cntrl",N`\p{Cc}`],["digit",N`\p{Nd}`],["graph",N`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",N`\p{Lower}`],["print",N`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",N`[\p{P}\p{S}]`],["space",N`\p{space}`],["upper",N`\p{Upper}`],["word",N`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",N`\p{AHex}`]]);function Fd(t,e){let n=[];for(let r=t;r<=e;r++)n.push(r);return n}function Ye(t){let e=H(t);return[e.toLowerCase(),e]}function io(t,e){return Fd(t,e).map(n=>Ye(n))}var kl=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function Dd(t,e){let n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...e};Sl(t);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:uo(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:t.flags.digitIsAscii,spaceIsAscii:t.flags.spaceIsAscii,wordIsAscii:t.flags.wordIsAscii};lt(t,Gd,r);let s={dotAll:t.flags.dotAll,ignoreCase:t.flags.ignoreCase},o={currentFlags:s,prevFlags:null,globalFlags:s,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};lt(t,jd,o);let i={groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer};return lt(t,Ud,i),t._originMap=o.groupOriginByCopy,t._strategy=r.strategy,t}var Gd={AbsenceFunction({node:t,parent:e,replaceWith:n}){let{body:r,kind:s}=t;if(s==="repeater"){let o=ne();o.body[0].body.push(Je({negate:!0,body:r}),at("Any"));let i=ne();i.body[0].body.push(Xs("greedy",0,1/0,o)),n(j(i,e),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:t,parent:e,key:n},{flagDirectivesByAlt:r}){let s=t.body.filter(o=>o.kind==="flags");for(let o=n+1;o<e.body.length;o++){let i=e.body[o];wn(r,i,[]).push(...s)}},exit({node:t},{flagDirectivesByAlt:e}){if(e.get(t)?.length){let n=_l(e.get(t));if(n){let r=ne({flags:n});r.body[0].body=t.body,t.body=[j(r,t)]}}}},Assertion({node:t,parent:e,key:n,container:r,root:s,remove:o,replaceWith:i},a){let{kind:l,negate:c}=t,{asciiWordBoundaries:u,avoidSubclass:f,supportedGNodes:d,wordIsAscii:h}=a;if(l==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${c?"Y":"y"}"`);if(l==="line_end")i(j(Je({body:[Me({body:[Lr("string_end")]}),Me({body:[Et(10)]})]}),e));else if(l==="line_start")i(j(De(N`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),e));else if(l==="search_start")if(d.has(t))s.flags.sticky=!0,o();else{let p=r[n-1];if(p&&zd(p))i(j(Je({negate:!0}),e));else{if(f)throw new Error(N`Uses "\G" in a way that requires a subclass`);i(Qe(Lr("string_start"),e)),a.strategy="clip_search"}}else if(!(l==="string_end"||l==="string_start"))if(l==="string_end_newline")i(j(De(N`(?=\n?\z)`),e));else if(l==="word_boundary"){if(!h&&!u){let p=`(?:(?<=${Fe})(?!${Fe})|(?<!${Fe})(?=${Fe}))`,g=`(?:(?<=${Fe})(?=${Fe})|(?<!${Fe})(?!${Fe}))`;i(j(De(c?g:p),e))}}else throw new Error(`Unexpected assertion kind "${l}"`)},Backreference({node:t},{jsGroupNameMap:e}){let{ref:n}=t;typeof n=="string"&&!lo(n)&&(n=ao(n,e),t.ref=n)},CapturingGroup({node:t},{jsGroupNameMap:e,subroutineRefMap:n}){let{name:r}=t;r&&!lo(r)&&(r=ao(r,e),t.name=r),n.set(t.number,t),r&&n.set(r,t)},CharacterClassRange({node:t,parent:e,replaceWith:n}){if(e.kind==="intersection"){let r=gn({body:[t]});n(j(r,e),{traverse:!0})}},CharacterSet({node:t,parent:e,replaceWith:n},{accuracy:r,minTargetEs2024:s,digitIsAscii:o,spaceIsAscii:i,wordIsAscii:a}){let{kind:l,negate:c,value:u}=t;if(o&&(l==="digit"||u==="digit")){n(Qe(Br("digit",{negate:c}),e));return}if(i&&(l==="space"||u==="space")){n(j(co(De(Bd),c),e));return}if(a&&(l==="word"||u==="word")){n(Qe(Br("word",{negate:c}),e));return}if(l==="any")n(Qe(at("Any"),e));else if(l==="digit")n(Qe(at("Nd",{negate:c}),e));else if(l!=="dot")if(l==="text_segment"){if(r==="strict")throw new Error(N`Use of "\X" requires non-strict accuracy`);let f="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",d=N`\p{RI}{2}|${f}(?:\u200D${f})*`;n(j(De(N`(?>\r\n|${s?N`\p{RGI_Emoji}`:d}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),e))}else if(l==="hex")n(Qe(at("AHex",{negate:c}),e));else if(l==="newline")n(j(De(c?`[^
282
282
  ]`:`(?>\r
283
283
  ?|[
284
- \v\f\x85\u2028\u2029])`),e));else if(l==="posix")if(!s&&(u==="graph"||u==="print")){if(r==="strict")throw new Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let f={graph:"!-~",print:" -~"}[u];c&&(f=`\0-${H(f.codePointAt(0)-1)}${H(f.codePointAt(2)+1)}-\u{10FFFF}`),n(j(De(`[${f}]`),e))}else n(j(ri(De(xd.get(u)),c),e));else if(l==="property")oi.has(At(u))||(t.key="sc");else if(l==="space")n(Qe(at("space",{negate:c}),e));else if(l==="word")n(j(ri(De(Fe),c),e));else throw new Error(`Unexpected character set kind "${l}"`)},Directive({node:t,parent:e,root:n,remove:r,replaceWith:s,removeAllPrevSiblings:i,removeAllNextSiblings:o}){let{kind:a,flags:l}=t;if(a==="flags")if(!l.enable&&!l.disable)r();else{let c=ne({flags:l});c.body[0].body=o(),s(j(c,e),{traverse:!0})}else if(a==="keep"){let c=n.body[0],f=n.body.length===1&&vr(c,{type:"Group"})&&c.body[0].body.length===1?c.body[0]:n;if(e.parent!==f||f.body.length>1)throw new Error(N`Uses "\K" in a way that's unsupported`);let d=Je({behind:!0});d.body[0].body=i(),s(j(d,e))}else throw new Error(`Unexpected directive kind "${a}"`)},Flags({node:t,parent:e}){if(t.posixIsAscii)throw new Error('Unsupported flag "P"');if(t.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete t[n]),Object.assign(t,{global:!1,hasIndices:!1,multiline:!1,sticky:t.sticky??!1}),e.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:t}){if(!t.flags)return;let{enable:e,disable:n}=t.flags;e?.extended&&delete e.extended,n?.extended&&delete n.extended,e?.dotAll&&n?.dotAll&&delete e.dotAll,e?.ignoreCase&&n?.ignoreCase&&delete e.ignoreCase,e&&!Object.keys(e).length&&delete t.flags.enable,n&&!Object.keys(n).length&&delete t.flags.disable,!t.flags.enable&&!t.flags.disable&&delete t.flags},LookaroundAssertion({node:t},e){let{kind:n}=t;n==="lookbehind"&&(e.passedLookbehind=!0)},NamedCallout({node:t,parent:e,replaceWith:n}){let{kind:r}=t;if(r==="fail")n(j(Je({negate:!0}),e));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:t}){if(t.body.type==="Quantifier"){let e=ne();e.body[0].body.push(t.body),t.body=j(e,t)}},Regex:{enter({node:t},{supportedGNodes:e}){let n=[],r=!1,s=!1;for(let i of t.body)if(i.body.length===1&&i.body[0].kind==="search_start")i.body.pop();else{let o=bl(i.body);o?(r=!0,Array.isArray(o)?n.push(...o):n.push(o)):s=!0}r&&!s&&n.forEach(i=>e.add(i))},exit(t,{accuracy:e,passedLookbehind:n,strategy:r}){if(e==="strict"&&n&&r)throw new Error(N`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:t},{jsGroupNameMap:e}){let{ref:n}=t;typeof n=="string"&&!ni(n)&&(n=ti(n,e),t.ref=n)}},Bd={Backreference({node:t},{multiplexCapturesToLeftByRef:e,reffedNodesByReferencer:n}){let{orphan:r,ref:s}=t;r||n.set(t,[...e.get(s).map(({node:i})=>i)])},CapturingGroup:{enter({node:t,parent:e,replaceWith:n,skip:r},{groupOriginByCopy:s,groupsByName:i,multiplexCapturesToLeftByRef:o,openRefs:a,reffedNodesByReferencer:l}){let c=s.get(t);if(c&&a.has(t.number)){let f=Qe(al(t.number),e);l.set(f,a.get(t.number)),n(f);return}a.set(t.number,t),o.set(t.number,[]),t.name&&mn(o,t.name,[]);let u=o.get(t.name??t.number);for(let f=0;f<u.length;f++){let d=u[f];if(c===d.node||c&&c===d.origin||t===d.origin){u.splice(f,1);break}}if(o.get(t.number).push({node:t,origin:c}),t.name&&o.get(t.name).push({node:t,origin:c}),t.name){let f=mn(i,t.name,new Map),d=!1;if(c)d=!0;else for(let h of f.values())if(!h.hasDuplicateNameToRemove){d=!0;break}i.get(t.name).set(t,{node:t,hasDuplicateNameToRemove:d})}},exit({node:t},{openRefs:e}){e.get(t.number)===t&&e.delete(t.number)}},Group:{enter({node:t},e){e.prevFlags=e.currentFlags,t.flags&&(e.currentFlags=Lr(e.currentFlags,t.flags))},exit(t,e){e.currentFlags=e.prevFlags}},Subroutine({node:t,parent:e,replaceWith:n},r){let{isRecursive:s,ref:i}=t;if(s){let u=e;for(;(u=u.parent)&&!(u.type==="CapturingGroup"&&(u.name===i||u.number===i)););r.reffedNodesByReferencer.set(t,u);return}let o=r.subroutineRefMap.get(i),a=i===0,l=a?al(0):gl(o,r.groupOriginByCopy,null),c=l;if(!a){let u=ml($d(o,d=>d.type==="Group"&&!!d.flags)),f=u?Lr(r.globalFlags,u):r.globalFlags;Rd(f,r.currentFlags)||(c=ne({flags:Md(f)}),c.body[0].body.push(l))}n(j(c,e),{traverse:!a})}},Od={Backreference({node:t,parent:e,replaceWith:n},r){if(t.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,t.ref);return}let i=r.reffedNodesByReferencer.get(t).filter(o=>Pd(o,t));if(!i.length)n(j(Je({negate:!0}),e));else if(i.length>1){let o=ne({atomic:!0,body:i.reverse().map(a=>Me({body:[Er(a.number)]}))});n(j(o,e))}else t.ref=i[0].number},CapturingGroup({node:t},e){t.number=++e.numCapturesToLeft,t.name&&e.groupsByName.get(t.name).get(t).hasDuplicateNameToRemove&&delete t.name},Regex:{exit({node:t},e){let n=Math.max(e.highestOrphanBackref-e.numCapturesToLeft,0);for(let r=0;r<n;r++){let s=Ws();t.body.at(-1).body.push(s)}}},Subroutine({node:t},e){!t.isRecursive||t.ref===0||(t.ref=e.reffedNodesByReferencer.get(t).number)}};function pl(t){lt(t,{"*"({node:e,parent:n}){e.parent=n}})}function Rd(t,e){return t.dotAll===e.dotAll&&t.ignoreCase===e.ignoreCase}function Pd(t,e){let n=e;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===t)return!1;let r=yl(n.parent);for(let s of r){if(s===n)break;if(s===t||wl(s,t))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function gl(t,e,n,r){let s=Array.isArray(t)?[]:{};for(let[i,o]of Object.entries(t))i==="parent"?s.parent=Array.isArray(n)?r:n:o&&typeof o=="object"?s[i]=gl(o,e,s,n):(i==="type"&&o==="CapturingGroup"&&e.set(s,e.get(t)??t),s[i]=o);return s}function al(t){let e=Vs(t);return e.isRecursive=!0,e}function $d(t,e){let n=[];for(;t=t.parent;)(!e||e(t))&&n.push(t);return n}function ti(t,e){if(e.has(t))return e.get(t);let n=`$${e.size}_${t.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return e.set(t,n),n}function ml(t){let e=["dotAll","ignoreCase"],n={enable:{},disable:{}};return t.forEach(({flags:r})=>{e.forEach(s=>{r.enable?.[s]&&(delete n.disable[s],n.enable[s]=!0),r.disable?.[s]&&(n.disable[s]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function Md({dotAll:t,ignoreCase:e}){let n={};return(t||e)&&(n.enable={},t&&(n.enable.dotAll=!0),e&&(n.enable.ignoreCase=!0)),(!t||!e)&&(n.disable={},!t&&(n.disable.dotAll=!0),!e&&(n.disable.ignoreCase=!0)),n}function yl(t){if(!t)throw new Error("Node expected");let{body:e}=t;return Array.isArray(e)?e:e?[e]:null}function bl(t){let e=t.find(n=>n.kind==="search_start"||Gd(n,{negate:!1})||!Fd(n));if(!e)return null;if(e.kind==="search_start")return e;if(e.type==="LookaroundAssertion")return e.body[0].body[0];if(e.type==="CapturingGroup"||e.type==="Group"){let n=[];for(let r of e.body){let s=bl(r.body);if(!s)return null;Array.isArray(s)?n.push(...s):n.push(s)}return n}return null}function wl(t,e){let n=yl(t)??[];for(let r of n)if(r===e||wl(r,e))return!0;return!1}function Fd({type:t}){return t==="Assertion"||t==="Directive"||t==="LookaroundAssertion"}function Dd(t){let e=["Character","CharacterClass","CharacterSet"];return e.includes(t.type)||t.type==="Quantifier"&&t.min&&e.includes(t.body.type)}function Gd(t,e){let n={negate:null,...e};return t.type==="LookaroundAssertion"&&(n.negate===null||t.negate===n.negate)&&t.body.length===1&&vr(t.body[0],{type:"Assertion",kind:"search_start"})}function ni(t){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(t)}function De(t,e){let r=Ar(t,{...e,unicodePropertyMap:oi}).body;return r.length>1||r[0].body.length>1?ne({body:r}):r[0].body[0]}function ri(t,e){return t.negate=e,t}function Qe(t,e){return t.parent=e,t}function j(t,e){return pl(t),t.parent=e,t}function jd(t,e){let n=fl(e),r=si(n.target,"ES2024"),s=si(n.target,"ES2025"),i=n.rules.recursionLimit;if(!Number.isInteger(i)||i<2||i>20)throw new Error("Invalid recursionLimit; use 2-20");let o=null,a=null;if(!s){let h=[t.flags.ignoreCase];lt(t,Ud,{getCurrentModI:()=>h.at(-1),popModI(){h.pop()},pushModI(p){h.push(p)},setHasCasedChar(){h.at(-1)?o=!0:a=!0}})}let l={dotAll:t.flags.dotAll,ignoreCase:!!((t.flags.ignoreCase||o)&&!a)},c=t,u={accuracy:n.accuracy,appliedGlobalFlags:l,captureMap:new Map,currentFlags:{dotAll:t.flags.dotAll,ignoreCase:t.flags.ignoreCase},inCharClass:!1,lastNode:c,originMap:t._originMap,recursionLimit:i,useAppliedIgnoreCase:!!(!s&&o&&a),useFlagMods:s,useFlagV:r,verbose:n.verbose};function f(h){return u.lastNode=c,c=h,Sd(qd[h.type],`Unexpected node type "${h.type}"`)(h,u,f)}let d={pattern:t.body.map(f).join("|"),flags:f(t.flags),options:{...t.options}};return r||(delete d.options.force.v,d.options.disable.v=!0,d.options.unicodeSetsPlugin=null),d._captureTransfers=new Map,d._hiddenCaptures=[],u.captureMap.forEach((h,p)=>{h.hidden&&d._hiddenCaptures.push(p),h.transferTo&&mn(d._captureTransfers,h.transferTo,[]).push(p)}),d}var Ud={"*":{enter({node:t},e){if(cl(t)){let n=e.getCurrentModI();e.pushModI(t.flags?Lr({ignoreCase:n},t.flags).ignoreCase:n)}},exit({node:t},e){cl(t)&&e.popModI()}},Backreference(t,e){e.setHasCasedChar()},Character({node:t},e){ai(H(t.value))&&e.setHasCasedChar()},CharacterClassRange({node:t,skip:e},n){e(),kl(t,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:t},e){t.kind==="property"&&hl.has(t.value)&&e.setHasCasedChar()}},qd={Alternative({body:t},e,n){return t.map(n).join("")},Assertion({kind:t,negate:e}){if(t==="string_end")return"$";if(t==="string_start")return"^";if(t==="word_boundary")return e?N`\B`:N`\b`;throw new Error(`Unexpected assertion kind "${t}"`)},Backreference({ref:t},e){if(typeof t!="number")throw new Error("Unexpected named backref in transformed AST");if(!e.useFlagMods&&e.accuracy==="strict"&&e.currentFlags.ignoreCase&&!e.captureMap.get(t).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+t},CapturingGroup(t,e,n){let{body:r,name:s,number:i}=t,o={ignoreCase:e.currentFlags.ignoreCase},a=e.originMap.get(t);return a&&(o.hidden=!0,i>a.number&&(o.transferTo=a.number)),e.captureMap.set(i,o),`(${s?`?<${s}>`:""}${r.map(n).join("|")})`},Character({value:t},e){let n=H(t),r=xt(t,{escDigit:e.lastNode.type==="Backreference",inCharClass:e.inCharClass,useFlagV:e.useFlagV});if(r!==n)return r;if(e.useAppliedIgnoreCase&&e.currentFlags.ignoreCase&&ai(n)){let s=dl(n);return e.inCharClass?s.join(""):s.length>1?`[${s.join("")}]`:s[0]}return n},CharacterClass(t,e,n){let{kind:r,negate:s,parent:i}=t,{body:o}=t;if(r==="intersection"&&!e.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");me.bugFlagVLiteralHyphenIsRange&&e.useFlagV&&o.some(ul)&&(o=[Et(45),...o.filter(c=>!ul(c))]);let a=()=>`[${s?"^":""}${o.map(n).join(r==="intersection"?"&&":"")}]`;if(!e.inCharClass){if((!e.useFlagV||me.bugNestedClassIgnoresNegation)&&!s){let u=o.filter(f=>f.type==="CharacterClass"&&f.kind==="union"&&f.negate);if(u.length){let f=ne(),d=f.body[0];return f.parent=i,d.parent=f,o=o.filter(h=>!u.includes(h)),t.body=o,o.length?(t.parent=d,d.body.push(t)):f.body.pop(),u.forEach(h=>{let p=Me({body:[h]});h.parent=p,p.parent=f,f.body.push(p)}),n(f)}}e.inCharClass=!0;let c=a();return e.inCharClass=!1,c}let l=o[0];if(r==="union"&&!s&&l&&((!e.useFlagV||!e.verbose)&&i.kind==="union"&&!(me.bugFlagVLiteralHyphenIsRange&&e.useFlagV)||!e.verbose&&i.kind==="intersection"&&o.length===1&&l.type!=="CharacterClassRange"))return o.map(n).join("");if(!e.useFlagV&&i.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return a()},CharacterClassRange(t,e){let n=t.min.value,r=t.max.value,s={escDigit:!1,inCharClass:!0,useFlagV:e.useFlagV},i=xt(n,s),o=xt(r,s),a=new Set;if(e.useAppliedIgnoreCase&&e.currentFlags.ignoreCase){let l=kl(t);zd(l).forEach(u=>{a.add(Array.isArray(u)?`${xt(u[0],s)}-${xt(u[1],s)}`:xt(u,s))})}return`${i}-${o}${[...a].join("")}`},CharacterSet({kind:t,negate:e,value:n,key:r},s){if(t==="dot")return s.currentFlags.dotAll?s.appliedGlobalFlags.dotAll||s.useFlagMods?".":"[^]":N`[^\n]`;if(t==="digit")return e?N`\D`:N`\d`;if(t==="property"){if(s.useAppliedIgnoreCase&&s.currentFlags.ignoreCase&&hl.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${e?N`\P`:N`\p`}{${r?`${r}=`:""}${n}}`}if(t==="word")return e?N`\W`:N`\w`;throw new Error(`Unexpected character set kind "${t}"`)},Flags(t,e){return(e.appliedGlobalFlags.ignoreCase?"i":"")+(t.dotAll?"s":"")+(t.sticky?"y":"")},Group({atomic:t,body:e,flags:n,parent:r},s,i){let o=s.currentFlags;n&&(s.currentFlags=Lr(o,n));let a=e.map(i).join("|"),l=!s.verbose&&e.length===1&&r.type!=="Quantifier"&&!t&&(!s.useFlagMods||!n)?a:`(?${Jd(t,n,s.useFlagMods)}${a})`;return s.currentFlags=o,l},LookaroundAssertion({body:t,kind:e,negate:n},r,s){return`(?${`${e==="lookahead"?"":"<"}${n?"!":"="}`}${t.map(s).join("|")})`},Quantifier(t,e,n){return n(t.body)+Yd(t)},Subroutine({isRecursive:t,ref:e},n){if(!t)throw new Error("Unexpected non-recursive subroutine in transformed AST");let r=n.recursionLimit;return e===0?`(?R=${r})`:N`\g<${e}&R=${r}>`}},Hd=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),Wd=new Set(["-","\\","]","^","["]),Kd=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),ll=new Map([[9,N`\t`],[10,N`\n`],[11,N`\v`],[12,N`\f`],[13,N`\r`],[8232,N`\u2028`],[8233,N`\u2029`],[65279,N`\uFEFF`]]),Vd=/^\p{Cased}$/u;function ai(t){return Vd.test(t)}function kl(t,e){let n=!!e?.firstOnly,r=t.min.value,s=t.max.value,i=[];if(r<65&&(s===65535||s>=131071)||r===65536&&s>=131071)return i;for(let o=r;o<=s;o++){let a=H(o);if(!ai(a))continue;let l=dl(a).filter(c=>{let u=c.codePointAt(0);return u<r||u>s});if(l.length&&(i.push(...l),n))break}return i}function xt(t,{escDigit:e,inCharClass:n,useFlagV:r}){if(ll.has(t))return ll.get(t);if(t<32||t>126&&t<160||t>262143||e&&Qd(t))return t>255?`\\u{${t.toString(16).toUpperCase()}}`:`\\x${t.toString(16).toUpperCase().padStart(2,"0")}`;let s=n?r?Kd:Wd:Hd,i=H(t);return(s.has(i)?"\\":"")+i}function zd(t){let e=t.map(s=>s.codePointAt(0)).sort((s,i)=>s-i),n=[],r=null;for(let s=0;s<e.length;s++)e[s+1]===e[s]+1?r??=e[s]:r===null?n.push(e[s]):(n.push([r,e[s]]),r=null);return n}function Jd(t,e,n){if(t)return">";let r="";if(e&&n){let{enable:s,disable:i}=e;r=(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")+(i?"-":"")+(i?.ignoreCase?"i":"")+(i?.dotAll?"s":"")}return`${r}:`}function Yd({kind:t,max:e,min:n}){let r;return!n&&e===1?r="?":!n&&e===1/0?r="*":n===1&&e===1/0?r="+":n===e?r=`{${n}}`:r=`{${n},${e===1/0?"":e}}`,r+{greedy:"",lazy:"?",possessive:"+"}[t]}function cl({type:t}){return t==="CapturingGroup"||t==="Group"||t==="LookaroundAssertion"}function Qd(t){return t>47&&t<58}function ul({type:t,value:e}){return t==="Character"&&e===45}var Xd=class ii extends RegExp{#t=new Map;#e=null;#r;#n=null;#s=null;rawOptions={};get source(){return this.#r||"(?:)"}constructor(e,n,r){let s=!!r?.lazyCompile;if(e instanceof RegExp){if(r)throw new Error("Cannot provide options when copying a regexp");let i=e;super(i,n),this.#r=i.source,i instanceof ii&&(this.#t=i.#t,this.#n=i.#n,this.#s=i.#s,this.rawOptions=i.rawOptions)}else{let i={hiddenCaptures:[],strategy:null,transfers:[],...r};super(s?"":e,n),this.#r=e,this.#t=eh(i.hiddenCaptures,i.transfers),this.#s=i.strategy,this.rawOptions=r??{}}s||(this.#e=this)}exec(e){if(!this.#e){let{lazyCompile:s,...i}=this.rawOptions;this.#e=new ii(this.#r,this.flags,i)}let n=this.global||this.sticky,r=this.lastIndex;if(this.#s==="clip_search"&&n&&r){this.lastIndex=0;let s=this.#i(e.slice(r));return s&&(Zd(s,r,e,this.hasIndices),this.lastIndex+=r),s}return this.#i(e)}#i(e){this.#e.lastIndex=this.lastIndex;let n=super.exec.call(this.#e,e);if(this.lastIndex=this.#e.lastIndex,!n||!this.#t.size)return n;let r=[...n];n.length=1;let s;this.hasIndices&&(s=[...n.indices],n.indices.length=1);let i=[0];for(let o=1;o<r.length;o++){let{hidden:a,transferTo:l}=this.#t.get(o)??{};if(a?i.push(null):(i.push(n.length),n.push(r[o]),this.hasIndices&&n.indices.push(s[o])),l&&r[o]!==void 0){let c=i[l];if(!c)throw new Error(`Invalid capture transfer to "${c}"`);if(n[c]=r[o],this.hasIndices&&(n.indices[c]=s[o]),n.groups){this.#n||(this.#n=th(this.source));let u=this.#n.get(l);u&&(n.groups[u]=r[o],this.hasIndices&&(n.indices.groups[u]=s[o]))}}}return n}};function Zd(t,e,n,r){if(t.index+=e,t.input=n,r){let s=t.indices;for(let o=0;o<s.length;o++){let a=s[o];a&&(s[o]=[a[0]+e,a[1]+e])}let i=s.groups;i&&Object.keys(i).forEach(o=>{let a=i[o];a&&(i[o]=[a[0]+e,a[1]+e])})}}function eh(t,e){let n=new Map;for(let r of t)n.set(r,{hidden:!0});for(let[r,s]of e)for(let i of s)mn(n,i,{}).transferTo=r;return n}function th(t){let e=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,r=0,s=0,i;for(;i=e.exec(t);){let{0:o,groups:{capture:a,name:l}}=i;o==="["?r++:r?o==="]"&&r--:a&&(s++,l&&n.set(s,l))}return n}function Sl(t,e){let n=nh(t,e);return n.options?new Xd(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function nh(t,e){let n=fl(e),r=Ar(t,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:oi}),s=Td(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=jd(s,n),o=il(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:"external"}),a=Qs(o.pattern),l=Ys(a.pattern,{captureTransfers:o.captureTransfers,hiddenCaptures:o.hiddenCaptures}),c={pattern:l.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${i.flags}${i.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{let u=l.hiddenCaptures.sort((p,g)=>p-g),f=Array.from(l.captureTransfers),d=s._strategy,h=c.pattern.length>=n.lazyCompileLength;(u.length||f.length||d||h)&&(c.options={...u.length&&{hiddenCaptures:u},...f.length&&{transfers:f},...d&&{strategy:d},...h&&{lazyCompile:h}})}return c}function Cl(t,e){return Sl(t,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...e})}function li(t={}){let e={target:"auto",cache:new Map,...t};return e.regexConstructor||=n=>Cl(n,{target:e.target}),{createScanner(n){return new xa(n,e)},createString:Ia}}var ih,Nl,xl=()=>ih??=JSON.parse(document.getElementById("code-grammars")?.textContent??"[]"),ci=t=>{let e=t?.closest("#panel")?document.documentElement.dataset.editorTheme:t?.closest("[data-theme]")?.dataset.theme??document.documentElement.dataset.theme;return e==="dark"||(!e||e==="auto")&&matchMedia("(prefers-color-scheme: dark)").matches?"github-dark":"github-light"},Il=async(t,e,n)=>{if(t.length>1e5||t.split(`
285
- `).some(s=>s.length>1e4))return[];let r=xl().find(s=>s.name===e||s.aliases?.includes(e));return r?(Nl??=Aa({langs:xl(),themes:[Promise.resolve().then(()=>(vl(),_l)),Promise.resolve().then(()=>(Al(),El))],engine:li()}),(await Nl).codeToTokens(t,{lang:r.name,theme:n??ci()}).tokens):[]};var ui=new WeakMap,Or=()=>{for(let t of document.querySelectorAll(".codeblk")){let e=ci(t),n=t.querySelector("pre code"),r=t.getAttribute("data-lang")??t.querySelector(".codeblk-lang")?.textContent??"";if(!n)continue;let s=n.textContent??"",i=`${e}\0${r}\0${s}`;ui.get(n)!==i&&(ui.set(n,i),Il(s,r,e).then(o=>{!n.isConnected||ui.get(n)!==i||ro(n,s,r,o)}).catch(()=>{}))}};new MutationObserver(Or).observe(document.body,{childList:!0,subtree:!0});new MutationObserver(Or).observe(document.documentElement,{attributeFilter:["data-theme"],subtree:!0});matchMedia("(prefers-color-scheme: dark)").addEventListener("change",Or);Or();})();
284
+ \v\f\x85\u2028\u2029])`),e));else if(l==="posix")if(!s&&(u==="graph"||u==="print")){if(r==="strict")throw new Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let f={graph:"!-~",print:" -~"}[u];c&&(f=`\0-${H(f.codePointAt(0)-1)}${H(f.codePointAt(2)+1)}-\u{10FFFF}`),n(j(De(`[${f}]`),e))}else n(j(co(De(Md.get(u)),c),e));else if(l==="property")ho.has(At(u))||(t.key="sc");else if(l==="space")n(Qe(at("space",{negate:c}),e));else if(l==="word")n(j(co(De(Fe),c),e));else throw new Error(`Unexpected character set kind "${l}"`)},Directive({node:t,parent:e,root:n,remove:r,replaceWith:s,removeAllPrevSiblings:o,removeAllNextSiblings:i}){let{kind:a,flags:l}=t;if(a==="flags")if(!l.enable&&!l.disable)r();else{let c=ne({flags:l});c.body[0].body=i(),s(j(c,e),{traverse:!0})}else if(a==="keep"){let c=n.body[0],f=n.body.length===1&&xr(c,{type:"Group"})&&c.body[0].body.length===1?c.body[0]:n;if(e.parent!==f||f.body.length>1)throw new Error(N`Uses "\K" in a way that's unsupported`);let d=Je({behind:!0});d.body[0].body=o(),s(j(d,e))}else throw new Error(`Unexpected directive kind "${a}"`)},Flags({node:t,parent:e}){if(t.posixIsAscii)throw new Error('Unsupported flag "P"');if(t.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete t[n]),Object.assign(t,{global:!1,hasIndices:!1,multiline:!1,sticky:t.sticky??!1}),e.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:t}){if(!t.flags)return;let{enable:e,disable:n}=t.flags;e?.extended&&delete e.extended,n?.extended&&delete n.extended,e?.dotAll&&n?.dotAll&&delete e.dotAll,e?.ignoreCase&&n?.ignoreCase&&delete e.ignoreCase,e&&!Object.keys(e).length&&delete t.flags.enable,n&&!Object.keys(n).length&&delete t.flags.disable,!t.flags.enable&&!t.flags.disable&&delete t.flags},LookaroundAssertion({node:t},e){let{kind:n}=t;n==="lookbehind"&&(e.passedLookbehind=!0)},NamedCallout({node:t,parent:e,replaceWith:n}){let{kind:r}=t;if(r==="fail")n(j(Je({negate:!0}),e));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:t}){if(t.body.type==="Quantifier"){let e=ne();e.body[0].body.push(t.body),t.body=j(e,t)}},Regex:{enter({node:t},{supportedGNodes:e}){let n=[],r=!1,s=!1;for(let o of t.body)if(o.body.length===1&&o.body[0].kind==="search_start")o.body.pop();else{let i=El(o.body);i?(r=!0,Array.isArray(i)?n.push(...i):n.push(i)):s=!0}r&&!s&&n.forEach(o=>e.add(o))},exit(t,{accuracy:e,passedLookbehind:n,strategy:r}){if(e==="strict"&&n&&r)throw new Error(N`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:t},{jsGroupNameMap:e}){let{ref:n}=t;typeof n=="string"&&!lo(n)&&(n=ao(n,e),t.ref=n)}},jd={Backreference({node:t},{multiplexCapturesToLeftByRef:e,reffedNodesByReferencer:n}){let{orphan:r,ref:s}=t;r||n.set(t,[...e.get(s).map(({node:o})=>o)])},CapturingGroup:{enter({node:t,parent:e,replaceWith:n,skip:r},{groupOriginByCopy:s,groupsByName:o,multiplexCapturesToLeftByRef:i,openRefs:a,reffedNodesByReferencer:l}){let c=s.get(t);if(c&&a.has(t.number)){let f=Qe(pl(t.number),e);l.set(f,a.get(t.number)),n(f);return}a.set(t.number,t),i.set(t.number,[]),t.name&&wn(i,t.name,[]);let u=i.get(t.name??t.number);for(let f=0;f<u.length;f++){let d=u[f];if(c===d.node||c&&c===d.origin||t===d.origin){u.splice(f,1);break}}if(i.get(t.number).push({node:t,origin:c}),t.name&&i.get(t.name).push({node:t,origin:c}),t.name){let f=wn(o,t.name,new Map),d=!1;if(c)d=!0;else for(let h of f.values())if(!h.hasDuplicateNameToRemove){d=!0;break}o.get(t.name).set(t,{node:t,hasDuplicateNameToRemove:d})}},exit({node:t},{openRefs:e}){e.get(t.number)===t&&e.delete(t.number)}},Group:{enter({node:t},e){e.prevFlags=e.currentFlags,t.flags&&(e.currentFlags=Pr(e.currentFlags,t.flags))},exit(t,e){e.currentFlags=e.prevFlags}},Subroutine({node:t,parent:e,replaceWith:n},r){let{isRecursive:s,ref:o}=t;if(s){let u=e;for(;(u=u.parent)&&!(u.type==="CapturingGroup"&&(u.name===o||u.number===o)););r.reffedNodesByReferencer.set(t,u);return}let i=r.subroutineRefMap.get(o),a=o===0,l=a?pl(0):Cl(i,r.groupOriginByCopy,null),c=l;if(!a){let u=_l(Wd(i,d=>d.type==="Group"&&!!d.flags)),f=u?Pr(r.globalFlags,u):r.globalFlags;qd(f,r.currentFlags)||(c=ne({flags:Kd(f)}),c.body[0].body.push(l))}n(j(c,e),{traverse:!a})}},Ud={Backreference({node:t,parent:e,replaceWith:n},r){if(t.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,t.ref);return}let o=r.reffedNodesByReferencer.get(t).filter(i=>Hd(i,t));if(!o.length)n(j(Je({negate:!0}),e));else if(o.length>1){let i=ne({atomic:!0,body:o.reverse().map(a=>Me({body:[Ir(a.number)]}))});n(j(i,e))}else t.ref=o[0].number},CapturingGroup({node:t},e){t.number=++e.numCapturesToLeft,t.name&&e.groupsByName.get(t.name).get(t).hasDuplicateNameToRemove&&delete t.name},Regex:{exit({node:t},e){let n=Math.max(e.highestOrphanBackref-e.numCapturesToLeft,0);for(let r=0;r<n;r++){let s=Qs();t.body.at(-1).body.push(s)}}},Subroutine({node:t},e){!t.isRecursive||t.ref===0||(t.ref=e.reffedNodesByReferencer.get(t).number)}};function Sl(t){lt(t,{"*"({node:e,parent:n}){e.parent=n}})}function qd(t,e){return t.dotAll===e.dotAll&&t.ignoreCase===e.ignoreCase}function Hd(t,e){let n=e;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===t)return!1;let r=vl(n.parent);for(let s of r){if(s===n)break;if(s===t||Al(s,t))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function Cl(t,e,n,r){let s=Array.isArray(t)?[]:{};for(let[o,i]of Object.entries(t))o==="parent"?s.parent=Array.isArray(n)?r:n:i&&typeof i=="object"?s[o]=Cl(i,e,s,n):(o==="type"&&i==="CapturingGroup"&&e.set(s,e.get(t)??t),s[o]=i);return s}function pl(t){let e=Zs(t);return e.isRecursive=!0,e}function Wd(t,e){let n=[];for(;t=t.parent;)(!e||e(t))&&n.push(t);return n}function ao(t,e){if(e.has(t))return e.get(t);let n=`$${e.size}_${t.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return e.set(t,n),n}function _l(t){let e=["dotAll","ignoreCase"],n={enable:{},disable:{}};return t.forEach(({flags:r})=>{e.forEach(s=>{r.enable?.[s]&&(delete n.disable[s],n.enable[s]=!0),r.disable?.[s]&&(n.disable[s]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function Kd({dotAll:t,ignoreCase:e}){let n={};return(t||e)&&(n.enable={},t&&(n.enable.dotAll=!0),e&&(n.enable.ignoreCase=!0)),(!t||!e)&&(n.disable={},!t&&(n.disable.dotAll=!0),!e&&(n.disable.ignoreCase=!0)),n}function vl(t){if(!t)throw new Error("Node expected");let{body:e}=t;return Array.isArray(e)?e:e?[e]:null}function El(t){let e=t.find(n=>n.kind==="search_start"||Jd(n,{negate:!1})||!Vd(n));if(!e)return null;if(e.kind==="search_start")return e;if(e.type==="LookaroundAssertion")return e.body[0].body[0];if(e.type==="CapturingGroup"||e.type==="Group"){let n=[];for(let r of e.body){let s=El(r.body);if(!s)return null;Array.isArray(s)?n.push(...s):n.push(s)}return n}return null}function Al(t,e){let n=vl(t)??[];for(let r of n)if(r===e||Al(r,e))return!0;return!1}function Vd({type:t}){return t==="Assertion"||t==="Directive"||t==="LookaroundAssertion"}function zd(t){let e=["Character","CharacterClass","CharacterSet"];return e.includes(t.type)||t.type==="Quantifier"&&t.min&&e.includes(t.body.type)}function Jd(t,e){let n={negate:null,...e};return t.type==="LookaroundAssertion"&&(n.negate===null||t.negate===n.negate)&&t.body.length===1&&xr(t.body[0],{type:"Assertion",kind:"search_start"})}function lo(t){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(t)}function De(t,e){let r=Tr(t,{...e,unicodePropertyMap:ho}).body;return r.length>1||r[0].body.length>1?ne({body:r}):r[0].body[0]}function co(t,e){return t.negate=e,t}function Qe(t,e){return t.parent=e,t}function j(t,e){return Sl(t),t.parent=e,t}function Yd(t,e){let n=bl(e),r=uo(n.target,"ES2024"),s=uo(n.target,"ES2025"),o=n.rules.recursionLimit;if(!Number.isInteger(o)||o<2||o>20)throw new Error("Invalid recursionLimit; use 2-20");let i=null,a=null;if(!s){let h=[t.flags.ignoreCase];lt(t,Qd,{getCurrentModI:()=>h.at(-1),popModI(){h.pop()},pushModI(p){h.push(p)},setHasCasedChar(){h.at(-1)?i=!0:a=!0}})}let l={dotAll:t.flags.dotAll,ignoreCase:!!((t.flags.ignoreCase||i)&&!a)},c=t,u={accuracy:n.accuracy,appliedGlobalFlags:l,captureMap:new Map,currentFlags:{dotAll:t.flags.dotAll,ignoreCase:t.flags.ignoreCase},inCharClass:!1,lastNode:c,originMap:t._originMap,recursionLimit:o,useAppliedIgnoreCase:!!(!s&&i&&a),useFlagMods:s,useFlagV:r,verbose:n.verbose};function f(h){return u.lastNode=c,c=h,Td(Xd[h.type],`Unexpected node type "${h.type}"`)(h,u,f)}let d={pattern:t.body.map(f).join("|"),flags:f(t.flags),options:{...t.options}};return r||(delete d.options.force.v,d.options.disable.v=!0,d.options.unicodeSetsPlugin=null),d._captureTransfers=new Map,d._hiddenCaptures=[],u.captureMap.forEach((h,p)=>{h.hidden&&d._hiddenCaptures.push(p),h.transferTo&&wn(d._captureTransfers,h.transferTo,[]).push(p)}),d}var Qd={"*":{enter({node:t},e){if(ml(t)){let n=e.getCurrentModI();e.pushModI(t.flags?Pr({ignoreCase:n},t.flags).ignoreCase:n)}},exit({node:t},e){ml(t)&&e.popModI()}},Backreference(t,e){e.setHasCasedChar()},Character({node:t},e){po(H(t.value))&&e.setHasCasedChar()},CharacterClassRange({node:t,skip:e},n){e(),Nl(t,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:t},e){t.kind==="property"&&kl.has(t.value)&&e.setHasCasedChar()}},Xd={Alternative({body:t},e,n){return t.map(n).join("")},Assertion({kind:t,negate:e}){if(t==="string_end")return"$";if(t==="string_start")return"^";if(t==="word_boundary")return e?N`\B`:N`\b`;throw new Error(`Unexpected assertion kind "${t}"`)},Backreference({ref:t},e){if(typeof t!="number")throw new Error("Unexpected named backref in transformed AST");if(!e.useFlagMods&&e.accuracy==="strict"&&e.currentFlags.ignoreCase&&!e.captureMap.get(t).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+t},CapturingGroup(t,e,n){let{body:r,name:s,number:o}=t,i={ignoreCase:e.currentFlags.ignoreCase},a=e.originMap.get(t);return a&&(i.hidden=!0,o>a.number&&(i.transferTo=a.number)),e.captureMap.set(o,i),`(${s?`?<${s}>`:""}${r.map(n).join("|")})`},Character({value:t},e){let n=H(t),r=xt(t,{escDigit:e.lastNode.type==="Backreference",inCharClass:e.inCharClass,useFlagV:e.useFlagV});if(r!==n)return r;if(e.useAppliedIgnoreCase&&e.currentFlags.ignoreCase&&po(n)){let s=wl(n);return e.inCharClass?s.join(""):s.length>1?`[${s.join("")}]`:s[0]}return n},CharacterClass(t,e,n){let{kind:r,negate:s,parent:o}=t,{body:i}=t;if(r==="intersection"&&!e.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");me.bugFlagVLiteralHyphenIsRange&&e.useFlagV&&i.some(yl)&&(i=[Et(45),...i.filter(c=>!yl(c))]);let a=()=>`[${s?"^":""}${i.map(n).join(r==="intersection"?"&&":"")}]`;if(!e.inCharClass){if((!e.useFlagV||me.bugNestedClassIgnoresNegation)&&!s){let u=i.filter(f=>f.type==="CharacterClass"&&f.kind==="union"&&f.negate);if(u.length){let f=ne(),d=f.body[0];return f.parent=o,d.parent=f,i=i.filter(h=>!u.includes(h)),t.body=i,i.length?(t.parent=d,d.body.push(t)):f.body.pop(),u.forEach(h=>{let p=Me({body:[h]});h.parent=p,p.parent=f,f.body.push(p)}),n(f)}}e.inCharClass=!0;let c=a();return e.inCharClass=!1,c}let l=i[0];if(r==="union"&&!s&&l&&((!e.useFlagV||!e.verbose)&&o.kind==="union"&&!(me.bugFlagVLiteralHyphenIsRange&&e.useFlagV)||!e.verbose&&o.kind==="intersection"&&i.length===1&&l.type!=="CharacterClassRange"))return i.map(n).join("");if(!e.useFlagV&&o.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return a()},CharacterClassRange(t,e){let n=t.min.value,r=t.max.value,s={escDigit:!1,inCharClass:!0,useFlagV:e.useFlagV},o=xt(n,s),i=xt(r,s),a=new Set;if(e.useAppliedIgnoreCase&&e.currentFlags.ignoreCase){let l=Nl(t);rh(l).forEach(u=>{a.add(Array.isArray(u)?`${xt(u[0],s)}-${xt(u[1],s)}`:xt(u,s))})}return`${o}-${i}${[...a].join("")}`},CharacterSet({kind:t,negate:e,value:n,key:r},s){if(t==="dot")return s.currentFlags.dotAll?s.appliedGlobalFlags.dotAll||s.useFlagMods?".":"[^]":N`[^\n]`;if(t==="digit")return e?N`\D`:N`\d`;if(t==="property"){if(s.useAppliedIgnoreCase&&s.currentFlags.ignoreCase&&kl.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${e?N`\P`:N`\p`}{${r?`${r}=`:""}${n}}`}if(t==="word")return e?N`\W`:N`\w`;throw new Error(`Unexpected character set kind "${t}"`)},Flags(t,e){return(e.appliedGlobalFlags.ignoreCase?"i":"")+(t.dotAll?"s":"")+(t.sticky?"y":"")},Group({atomic:t,body:e,flags:n,parent:r},s,o){let i=s.currentFlags;n&&(s.currentFlags=Pr(i,n));let a=e.map(o).join("|"),l=!s.verbose&&e.length===1&&r.type!=="Quantifier"&&!t&&(!s.useFlagMods||!n)?a:`(?${sh(t,n,s.useFlagMods)}${a})`;return s.currentFlags=i,l},LookaroundAssertion({body:t,kind:e,negate:n},r,s){return`(?${`${e==="lookahead"?"":"<"}${n?"!":"="}`}${t.map(s).join("|")})`},Quantifier(t,e,n){return n(t.body)+oh(t)},Subroutine({isRecursive:t,ref:e},n){if(!t)throw new Error("Unexpected non-recursive subroutine in transformed AST");let r=n.recursionLimit;return e===0?`(?R=${r})`:N`\g<${e}&R=${r}>`}},Zd=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),eh=new Set(["-","\\","]","^","["]),th=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),gl=new Map([[9,N`\t`],[10,N`\n`],[11,N`\v`],[12,N`\f`],[13,N`\r`],[8232,N`\u2028`],[8233,N`\u2029`],[65279,N`\uFEFF`]]),nh=/^\p{Cased}$/u;function po(t){return nh.test(t)}function Nl(t,e){let n=!!e?.firstOnly,r=t.min.value,s=t.max.value,o=[];if(r<65&&(s===65535||s>=131071)||r===65536&&s>=131071)return o;for(let i=r;i<=s;i++){let a=H(i);if(!po(a))continue;let l=wl(a).filter(c=>{let u=c.codePointAt(0);return u<r||u>s});if(l.length&&(o.push(...l),n))break}return o}function xt(t,{escDigit:e,inCharClass:n,useFlagV:r}){if(gl.has(t))return gl.get(t);if(t<32||t>126&&t<160||t>262143||e&&ih(t))return t>255?`\\u{${t.toString(16).toUpperCase()}}`:`\\x${t.toString(16).toUpperCase().padStart(2,"0")}`;let s=n?r?th:eh:Zd,o=H(t);return(s.has(o)?"\\":"")+o}function rh(t){let e=t.map(s=>s.codePointAt(0)).sort((s,o)=>s-o),n=[],r=null;for(let s=0;s<e.length;s++)e[s+1]===e[s]+1?r??=e[s]:r===null?n.push(e[s]):(n.push([r,e[s]]),r=null);return n}function sh(t,e,n){if(t)return">";let r="";if(e&&n){let{enable:s,disable:o}=e;r=(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")+(o?"-":"")+(o?.ignoreCase?"i":"")+(o?.dotAll?"s":"")}return`${r}:`}function oh({kind:t,max:e,min:n}){let r;return!n&&e===1?r="?":!n&&e===1/0?r="*":n===1&&e===1/0?r="+":n===e?r=`{${n}}`:r=`{${n},${e===1/0?"":e}}`,r+{greedy:"",lazy:"?",possessive:"+"}[t]}function ml({type:t}){return t==="CapturingGroup"||t==="Group"||t==="LookaroundAssertion"}function ih(t){return t>47&&t<58}function yl({type:t,value:e}){return t==="Character"&&e===45}var ah=class fo extends RegExp{#t=new Map;#e=null;#r;#n=null;#s=null;rawOptions={};get source(){return this.#r||"(?:)"}constructor(e,n,r){let s=!!r?.lazyCompile;if(e instanceof RegExp){if(r)throw new Error("Cannot provide options when copying a regexp");let o=e;super(o,n),this.#r=o.source,o instanceof fo&&(this.#t=o.#t,this.#n=o.#n,this.#s=o.#s,this.rawOptions=o.rawOptions)}else{let o={hiddenCaptures:[],strategy:null,transfers:[],...r};super(s?"":e,n),this.#r=e,this.#t=ch(o.hiddenCaptures,o.transfers),this.#s=o.strategy,this.rawOptions=r??{}}s||(this.#e=this)}exec(e){if(!this.#e){let{lazyCompile:s,...o}=this.rawOptions;this.#e=new fo(this.#r,this.flags,o)}let n=this.global||this.sticky,r=this.lastIndex;if(this.#s==="clip_search"&&n&&r){this.lastIndex=0;let s=this.#o(e.slice(r));return s&&(lh(s,r,e,this.hasIndices),this.lastIndex+=r),s}return this.#o(e)}#o(e){this.#e.lastIndex=this.lastIndex;let n=super.exec.call(this.#e,e);if(this.lastIndex=this.#e.lastIndex,!n||!this.#t.size)return n;let r=[...n];n.length=1;let s;this.hasIndices&&(s=[...n.indices],n.indices.length=1);let o=[0];for(let i=1;i<r.length;i++){let{hidden:a,transferTo:l}=this.#t.get(i)??{};if(a?o.push(null):(o.push(n.length),n.push(r[i]),this.hasIndices&&n.indices.push(s[i])),l&&r[i]!==void 0){let c=o[l];if(!c)throw new Error(`Invalid capture transfer to "${c}"`);if(n[c]=r[i],this.hasIndices&&(n.indices[c]=s[i]),n.groups){this.#n||(this.#n=uh(this.source));let u=this.#n.get(l);u&&(n.groups[u]=r[i],this.hasIndices&&(n.indices.groups[u]=s[i]))}}}return n}};function lh(t,e,n,r){if(t.index+=e,t.input=n,r){let s=t.indices;for(let i=0;i<s.length;i++){let a=s[i];a&&(s[i]=[a[0]+e,a[1]+e])}let o=s.groups;o&&Object.keys(o).forEach(i=>{let a=o[i];a&&(o[i]=[a[0]+e,a[1]+e])})}}function ch(t,e){let n=new Map;for(let r of t)n.set(r,{hidden:!0});for(let[r,s]of e)for(let o of s)wn(n,o,{}).transferTo=r;return n}function uh(t){let e=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,r=0,s=0,o;for(;o=e.exec(t);){let{0:i,groups:{capture:a,name:l}}=o;i==="["?r++:r?i==="]"&&r--:a&&(s++,l&&n.set(s,l))}return n}function xl(t,e){let n=fh(t,e);return n.options?new ah(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function fh(t,e){let n=bl(e),r=Tr(t,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:ho}),s=Dd(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),o=Yd(s,n),i=dl(o.pattern,{captureTransfers:o._captureTransfers,hiddenCaptures:o._hiddenCaptures,mode:"external"}),a=ro(i.pattern),l=no(a.pattern,{captureTransfers:i.captureTransfers,hiddenCaptures:i.hiddenCaptures}),c={pattern:l.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${o.flags}${o.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{let u=l.hiddenCaptures.sort((p,g)=>p-g),f=Array.from(l.captureTransfers),d=s._strategy,h=c.pattern.length>=n.lazyCompileLength;(u.length||f.length||d||h)&&(c.options={...u.length&&{hiddenCaptures:u},...f.length&&{transfers:f},...d&&{strategy:d},...h&&{lazyCompile:h}})}return c}function Il(t,e){return xl(t,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...e})}function go(t={}){let e={target:"auto",cache:new Map,...t};return e.regexConstructor||=n=>Il(n,{target:e.target}),{createScanner(n){return new Pa(n,e)},createString:$a}}var Tl=(t,e)=>{let n=new Set,r=s=>{if(n.has(s))return;n.add(s);let o=new Set(s.embeddedLangs??[]);for(let i of JSON.stringify(s).matchAll(/"include":"([^"#$][^"]*)"/g))o.add((i[1]??"").split("#")[0]??"");for(let i of t)(o.has(i.name)||o.has(i.scopeName))&&r(i)};for(let s of e){let o=t.find(i=>i.name===s||i.aliases?.includes(s));o&&r(o)}return[...n]};var $l,Mr=new Map,Pl,It,Fr,ph=0,Tt=new Map,gh=t=>{if(Fr)return Promise.reject(Fr);It||(It=new Worker("/assets/code-worker.js"),It.onmessage=({data:n})=>{let r=Tt.get(n.id);Tt.delete(n.id),n.error?r?.reject(new Error(n.error)):r?.resolve(n.tokens??[])},It.onerror=()=>{Fr=new Error("Could not highlight code");for(let n of Tt.values())n.reject(Fr);Tt.clear(),It?.terminate()});let e=++ph;return new Promise((n,r)=>{Tt.set(e,{resolve:n,reject:r});try{It?.postMessage({...t,id:e})}catch(s){Tt.delete(e),r(s)}})},mo=()=>$l??=JSON.parse(document.getElementById("code-grammars")?.textContent??"[]"),Dr=t=>mo().find(e=>e.name===t||e.aliases?.includes(t)),mh=async t=>{let e=document.getElementById("code-grammars")?.dataset.src;if(!(!e||Dr(t))){if(!Mr.has(t)){let n=new URL(e,location.href);n.searchParams.set("language",t),Mr.set(t,fetch(n).then(async r=>{if(!r.ok)throw new Error("Could not load code languages");let s=await r.json();$l=[...new Map([...mo(),...s].map(o=>[o.name,o])).values()]}).catch(r=>{throw Mr.delete(t),r}))}await Mr.get(t)}},yo=t=>{let e=t?.closest("#panel")?document.documentElement.dataset.editorTheme:t?.closest("[data-theme]")?.dataset.theme??document.documentElement.dataset.theme;return e==="dark"||(!e||e==="auto")&&matchMedia("(prefers-color-scheme: dark)").matches?"github-dark":"github-light"},Ml=async(t,e,n)=>{if(t.length>1e5||t.split(`
285
+ `).some(o=>o.length>1e4))return[];await mh(e);let r=Dr(e);if(!r)return[];let s={source:t,language:r.name,theme:n??yo(),grammars:Tl(mo(),[r.name])};return typeof Worker<"u"&&document.getElementById("code-grammars")?.dataset.src?gh(s):yh(s)},yh=async t=>{Pl??=Ra({langs:[],themes:[Promise.resolve().then(()=>(Bl(),Ll)),Promise.resolve().then(()=>(Ol(),Rl))],engine:go()});let e=await Pl;return e.getLoadedLanguages().includes(t.language)||await e.loadLanguage(...t.grammars),e.codeToTokens(t.source,{lang:t.language,theme:t.theme}).tokens};var bo=new WeakMap,Lt=new Map,Fl=new IntersectionObserver(t=>{for(let e of t)Lt.set(e.target,e.isIntersecting);kn()},{rootMargin:"200px"}),kn=()=>{for(let t of Lt.keys())t.isConnected||(Fl.unobserve(t),Lt.delete(t));for(let t of document.querySelectorAll(".codeblk")){if(Lt.has(t)||(Lt.set(t,!1),Fl.observe(t)),!Lt.get(t))continue;let e=yo(t),n=t.querySelector("pre code"),r=t.getAttribute("data-lang")??t.querySelector(".codeblk-lang")?.textContent??"";if(!n)continue;let s=n.textContent??"",o=`${e}\0${r}\0${s}`;bo.get(n)!==o&&(bo.set(n,o),Ml(s,r,e).then(i=>{!n.isConnected||bo.get(n)!==o||fi(n,s,Dr(r)?.name??r,i)}).catch(()=>{}))}};new MutationObserver(kn).observe(document.body,{childList:!0,subtree:!0});new MutationObserver(kn).observe(document.documentElement,{attributeFilter:["data-theme"],subtree:!0});matchMedia("(prefers-color-scheme: dark)").addEventListener("change",kn);kn();})();