ryco-cli 0.1.13 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/dist/{AcpNativeLogging-Be1KGJfF.cjs → AcpNativeLogging-OhEq3XNp.cjs} +1 -1
  2. package/dist/{AcpNativeLogging-Ba9Nn9Re.mjs → AcpNativeLogging-qZgtIa5K.mjs} +2 -2
  3. package/dist/{AzureDevOpsSourceControlProvider-CGlK6M0b.mjs → AzureDevOpsSourceControlProvider-B0YsaJyI.mjs} +3 -3
  4. package/dist/{AzureDevOpsSourceControlProvider-CVj-F-pW.cjs → AzureDevOpsSourceControlProvider-Dyu8KQ_S.cjs} +2 -2
  5. package/dist/{BitbucketSourceControlProvider-CEZEd4PX.cjs → BitbucketSourceControlProvider-3VHGKSl1.cjs} +2 -2
  6. package/dist/{BitbucketSourceControlProvider-BV6iRDi7.mjs → BitbucketSourceControlProvider-B8IPx2Ad.mjs} +3 -3
  7. package/dist/{ClaudeDriver-lBU7EyUX.cjs → ClaudeDriver-CBCy0_WX.cjs} +176 -11
  8. package/dist/{ClaudeDriver-rooMNrJz.mjs → ClaudeDriver-DsW8yDj9.mjs} +177 -12
  9. package/dist/{CodexDriver-CZCIJSLV.cjs → CodexDriver-3TZPgrGk.cjs} +3 -3
  10. package/dist/{CodexDriver-DBz2rPXb.mjs → CodexDriver-DLwPz5sk.mjs} +4 -4
  11. package/dist/{CodexTextGeneration-BeG7ymPC.mjs → CodexTextGeneration-D1vV8grr.mjs} +2 -2
  12. package/dist/{CodexTextGeneration-BvIcyD1P.cjs → CodexTextGeneration-DLHSW4Mz.cjs} +1 -1
  13. package/dist/{CopilotDriver-CX5zhEdZ.cjs → CopilotDriver-C7a8IhyK.cjs} +20 -16
  14. package/dist/{CopilotDriver-D36vbGbn.mjs → CopilotDriver-DXvGBv-s.mjs} +21 -17
  15. package/dist/{CursorDriver-DWuuOSkJ.mjs → CursorDriver-CeB_vMKJ.mjs} +4 -4
  16. package/dist/{CursorDriver-CPBVeesr.cjs → CursorDriver-uNsDetA3.cjs} +3 -3
  17. package/dist/{ForgejoSourceControlProvider-CzmmcAZO.cjs → ForgejoSourceControlProvider-CJLksvL_.cjs} +2 -2
  18. package/dist/{ForgejoSourceControlProvider-CeN7Snfr.mjs → ForgejoSourceControlProvider-Ds0rU_PN.mjs} +3 -3
  19. package/dist/{GitHubSourceControlProvider-Dmz1LJct.mjs → GitHubSourceControlProvider-C7CJAslU.mjs} +3 -3
  20. package/dist/{GitHubSourceControlProvider-DfFR9O2o.cjs → GitHubSourceControlProvider-CrYNFu8S.cjs} +2 -2
  21. package/dist/{GitLabSourceControlProvider-DGoelNmL.cjs → GitLabSourceControlProvider-jbX5M34A.cjs} +2 -2
  22. package/dist/{GitLabSourceControlProvider-C21lwphV.mjs → GitLabSourceControlProvider-u-Y-e8PV.mjs} +3 -3
  23. package/dist/{GrokDriver-CIXj_4ry.cjs → GrokDriver-BJ00ZiYg.cjs} +3 -3
  24. package/dist/{GrokDriver-qKX1a63G.mjs → GrokDriver-CFgjwnvE.mjs} +4 -4
  25. package/dist/{OpenCodeDriver-DDEuwtXl.cjs → OpenCodeDriver-BTxd2Q3Q.cjs} +487 -207
  26. package/dist/{OpenCodeDriver-CbdswhqU.mjs → OpenCodeDriver-DNApoGdu.mjs} +487 -207
  27. package/dist/{SourceControlProviderDiscoveryCatalog-DJWDCoup.cjs → SourceControlProviderDiscoveryCatalog-CPO3a9_U.cjs} +1 -1
  28. package/dist/{SourceControlProviderDiscoveryCatalog-4_4yahsa.mjs → SourceControlProviderDiscoveryCatalog-hXWNwRMn.mjs} +1 -1
  29. package/dist/bin.cjs +1324 -340
  30. package/dist/bin.mjs +1324 -343
  31. package/dist/client/assets/{AccountSettings-Be5_48k0.js → AccountSettings-Cey-16wq.js} +1 -1
  32. package/dist/client/assets/{AiFocusSettings-DIpQXLW2.js → AiFocusSettings-CaHQXDaQ.js} +1 -1
  33. package/dist/client/assets/{AnimatedHeight-BIsV_Z3J.js → AnimatedHeight-BC-qaTJY.js} +1 -1
  34. package/dist/client/assets/AppearanceSettings-B6UaU-_a.js +1 -0
  35. package/dist/client/assets/{BranchToolbar.logic-D7slG_zJ.js → BranchToolbar.logic-DILAA3Cz.js} +1 -1
  36. package/dist/client/assets/ChatRightPanel-D-AL07IU.js +27 -0
  37. package/dist/client/assets/{ChatThreadRouteView-CocRstME.js → ChatThreadRouteView-tEo-zoCf.js} +1 -1
  38. package/dist/client/assets/CommandPaletteDialog-s7yf5Y2S.js +1 -0
  39. package/dist/client/assets/{CompositeItem-F3NGn6aG.js → CompositeItem-97y1QiiT.js} +1 -1
  40. package/dist/client/assets/{CompositeRoot-CmJGfRtc.js → CompositeRoot-C7Mz4Y_2.js} +1 -1
  41. package/dist/client/assets/{ConnectionsSettings-CXabxSaH.js → ConnectionsSettings-B0-Hkwof.js} +2 -2
  42. package/dist/client/assets/{DiagnosticsSettings-CZ3vY43G.js → DiagnosticsSettings-DX5LH9Bt.js} +1 -1
  43. package/dist/client/assets/{DialogHandle-C4uSr9wX.js → DialogHandle-Cl9dQBJp.js} +1 -1
  44. package/dist/client/assets/{DialogPopup-Dck8r8Hn.js → DialogPopup-a1M74u16.js} +1 -1
  45. package/dist/client/assets/DialogRoot-C_DO1gtO.js +1 -0
  46. package/dist/client/assets/{DialogTitle-CCedPAjV.js → DialogTitle-Bk-w3xLJ.js} +1 -1
  47. package/dist/client/assets/{DialogTrigger-CYJ7_YcV.js → DialogTrigger-D9nkMFu2.js} +1 -1
  48. package/dist/client/assets/{DialogViewport-D-CrTM-P.js → DialogViewport-tgJz2Lwn.js} +1 -1
  49. package/dist/client/assets/{DraftChatThreadRouteView-D8Bt3Qnq.js → DraftChatThreadRouteView-BU2IGTR6.js} +1 -1
  50. package/dist/client/assets/{ExternalIdentityWeb.logic-D64j70NH.js → ExternalIdentityWeb.logic-Bn1HigS9.js} +1 -1
  51. package/dist/client/assets/GlassSurface-CDok2tTN.js +1 -0
  52. package/dist/client/assets/{HostedConnectionControls-DxAXv0Hd.js → HostedConnectionControls-Cux_sRCM.js} +1 -1
  53. package/dist/client/assets/HostedHubRoot-CyySCdJV.js +1 -0
  54. package/dist/client/assets/{HostedNativeAuthorizationRoute-CTQe7Vjt.js → HostedNativeAuthorizationRoute-490iDXmk.js} +1 -1
  55. package/dist/client/assets/{HostedRelayTrustNotice-BldMySVi.js → HostedRelayTrustNotice-CcDOAwgS.js} +1 -1
  56. package/dist/client/assets/{Icons-CT3nd2MA.js → Icons-BEtED8P8.js} +1 -1
  57. package/dist/client/assets/{IntegrationsSettingsPanel-D6f3KoqM.js → IntegrationsSettingsPanel-BFTAvxtn.js} +1 -1
  58. package/dist/client/assets/KeybindingsSettings-VYgbhiZF.js +7 -0
  59. package/dist/client/assets/{McpServersSettings-B7YqVvV4.js → McpServersSettings-DSDCjoTn.js} +1 -1
  60. package/dist/client/assets/{MobileSheet-CkeG6_SP.js → MobileSheet-BDvnUC5W.js} +1 -1
  61. package/dist/client/assets/{NewWorktreeDialog-CKr2ioue.js → NewWorktreeDialog-C65Aifeb.js} +1 -1
  62. package/dist/client/assets/{NoActiveThreadState-BD-eNmfn.js → NoActiveThreadState-DehHNgAp.js} +1 -1
  63. package/dist/client/assets/{NodeSecuritySettings-FWM_SeDi.js → NodeSecuritySettings-DW9GJ-kU.js} +1 -1
  64. package/dist/client/assets/{OpinionatedPluginsSettings-BtZQF4Ze.js → OpinionatedPluginsSettings-DbxPOokL.js} +1 -1
  65. package/dist/client/assets/{PhoneGetAppInterstitial-CooQgpSw.js → PhoneGetAppInterstitial-CbyVrtDn.js} +1 -1
  66. package/dist/client/assets/{PhoneGetAppInterstitialBackdrop-B8vfJdZd.js → PhoneGetAppInterstitialBackdrop-BA4R225F.js} +1 -1
  67. package/dist/client/assets/PhoneHome-c0j_TBEC.js +1 -0
  68. package/dist/client/assets/PhoneSettingsSurface-5LFRIx_5.js +1 -0
  69. package/dist/client/assets/{ProjectFavicon-qZGdjYCM.js → ProjectFavicon-CeVJCQCy.js} +1 -1
  70. package/dist/client/assets/{ProviderModelPicker-D0w23uWo.js → ProviderModelPicker-MFRYAv_3.js} +1 -1
  71. package/dist/client/assets/{ProviderUpdateLaunchNotification.logic-BkoRegCn.js → ProviderUpdateLaunchNotification.logic-CywRitn3.js} +1 -1
  72. package/dist/client/assets/ProvidersSettingsPanel-FYBEqSr_.js +1 -0
  73. package/dist/client/assets/{RedactedSensitiveText-CxtaUiKH.js → RedactedSensitiveText-BuWSWty8.js} +1 -1
  74. package/dist/client/assets/RootAppShell-5HrP6N8H.js +6 -0
  75. package/dist/client/assets/{RycoLetterMark-Bk0kvGJ_.js → RycoLetterMark-CZYntY8t.js} +1 -1
  76. package/dist/client/assets/SettingsDialog-CpwoqGS8.js +1 -0
  77. package/dist/client/assets/{SettingsPanels-Dr4f2y9l.js → SettingsPanels-COWRB29-.js} +3 -3
  78. package/dist/client/assets/{SettingsPanels.editor-B2x4U4rW.js → SettingsPanels.editor-lbLEbllb.js} +1 -1
  79. package/dist/client/assets/SourceControlSettings-DvBNelcO.js +1 -0
  80. package/dist/client/assets/{StatisticsPage-Bjouapmf.js → StatisticsPage-DxAKqvVX.js} +1 -1
  81. package/dist/client/assets/{StatisticsPanel-D_khPph6.js → StatisticsPanel-C0xGLlMA.js} +1 -1
  82. package/dist/client/assets/{StatisticsSettingsLink-Cx43bOeo.js → StatisticsSettingsLink-B7SZerf3.js} +1 -1
  83. package/dist/client/assets/ThreadStatusIndicators-CIOM98q2.js +0 -0
  84. package/dist/client/assets/{ThreadTerminalDrawer-DDHEuRGB.js → ThreadTerminalDrawer-DRelLlEP.js} +1 -1
  85. package/dist/client/assets/{ThreadWorkspacePanel-QF3KwbGm.js → ThreadWorkspacePanel-CktVSliZ.js} +3 -3
  86. package/dist/client/assets/{ToolbarRootContext-BgqqXVly.js → ToolbarRootContext-B1g8IP6k.js} +1 -1
  87. package/dist/client/assets/{WorkItemsTab-AOVwVvb7.js → WorkItemsTab-CahU_t_S.js} +12 -12
  88. package/dist/client/assets/{alert-LqMhbdE9.js → alert-DomE7dAt.js} +1 -1
  89. package/dist/client/assets/{alert-dialog-DxoA6ky8.js → alert-dialog-9Jyh0e8u.js} +1 -1
  90. package/dist/client/assets/appearancePreferences-BhNRCg6W.js +1 -0
  91. package/dist/client/assets/authorization-D8lJzXTE.js +1 -0
  92. package/dist/client/assets/{badge-CXw6fWrB.js → badge-w43sx8eF.js} +1 -1
  93. package/dist/client/assets/{branding-BDfN6Spd.js → branding-B7DcCXjn.js} +1 -1
  94. package/dist/client/assets/{button-BAbJxRzt.js → button-DG8WqjNn.js} +1 -1
  95. package/dist/client/assets/{capabilities-3zgirmmI.js → capabilities-B1FHGoov.js} +1 -1
  96. package/dist/client/assets/{chatThreadActions-DQ8aOQ1g.js → chatThreadActions-BZvyhfKr.js} +1 -1
  97. package/dist/client/assets/{collapsible-dxy6kc2k.js → collapsible-EhAEe5S9.js} +1 -1
  98. package/dist/client/assets/{command-CGNKG_Oe.js → command-Cyn6yIEa.js} +1 -1
  99. package/dist/client/assets/composerDraftStore-TYv9j3vY.js +11 -0
  100. package/dist/client/assets/{data-list-CYKBxN62.js → data-list-DTdqWMGN.js} +1 -1
  101. package/dist/client/assets/{desktopUpdateAtoms-CyfPW2jg.js → desktopUpdateAtoms-CPlZiFRm.js} +1 -1
  102. package/dist/client/assets/{desktopWorkspace-DHUZEpfy.js → desktopWorkspace-DEZ30LlY.js} +1 -1
  103. package/dist/client/assets/device-CHdXzvhB.js +168 -0
  104. package/dist/client/assets/{dialog-DQsYchqu.js → dialog-BNmFD6Nh.js} +1 -1
  105. package/dist/client/assets/{draft-input-CkzOk8BY.js → draft-input-dP7F8odz.js} +1 -1
  106. package/dist/client/assets/editorPreferences-B4GvqMiF.js +1 -0
  107. package/dist/client/assets/{empty-DwzqNgCP.js → empty-Ccxhyvdf.js} +1 -1
  108. package/dist/client/assets/{env-B4arEvJg.js → env-Bcq9YR3B.js} +1 -1
  109. package/dist/client/assets/{getPseudoElementBounds-X62ElHN8.js → getPseudoElementBounds-CO5HJT7x.js} +1 -1
  110. package/dist/client/assets/{group-D9ER9giz.js → group-CzdKmc45.js} +1 -1
  111. package/dist/client/assets/{index-CQmEMMQH.js → index-Gre6bNC8.js} +2 -2
  112. package/dist/client/assets/{input-CHEwW3oH.js → input-BZz4eLRl.js} +1 -1
  113. package/dist/client/assets/{kbd-DCGQZk18.js → kbd-DbvN3zTb.js} +1 -1
  114. package/dist/client/assets/{keybindings-CWJ7E9ZI.js → keybindings-BPE3eEAM.js} +1 -1
  115. package/dist/client/assets/{label-CVFHsLFO.js → label-DZf4lbNF.js} +1 -1
  116. package/dist/client/assets/{lib-qiiNMGgU.js → lib-DgOYoged.js} +1 -1
  117. package/dist/client/assets/{liquidGlass-CPsvmaF0.js → liquidGlass-yFkZrRk5.js} +1 -1
  118. package/dist/client/assets/{logging-M8H3z7rQ.js → logging-81iP6Hps.js} +1 -1
  119. package/dist/client/assets/main-DlGNPwsH.css +2 -0
  120. package/dist/client/assets/main-Dz0zookE.js +9 -0
  121. package/dist/client/assets/{menu-Dvxh8sD5.js → menu-B6UEFcn0.js} +1 -1
  122. package/dist/client/assets/{popover-CuH9Yrj3.js → popover-BuYzXGwl.js} +1 -1
  123. package/dist/client/assets/primary-CiDY2oUi.js +2 -0
  124. package/dist/client/assets/projectPaths-D6fHIU1b.js +1 -0
  125. package/dist/client/assets/{providerDriverMeta-I0TSo-QI.js → providerDriverMeta-sBwZhQoN.js} +1 -1
  126. package/dist/client/assets/{providerIconUtils-X0Z3EK-Q.js → providerIconUtils-DiDJeNtT.js} +1 -1
  127. package/dist/client/assets/providerInstances-vd2eZtHx.js +1 -0
  128. package/dist/client/assets/providerModels-vd2eZtHx.js +1 -0
  129. package/dist/client/assets/{qr-code-Bddq6K7S.js → qr-code-Ie92aZvE.js} +1 -1
  130. package/dist/client/assets/{radio-group-CBZFr4C8.js → radio-group-BuuTEtdC.js} +1 -1
  131. package/dist/client/assets/{resolveAriaLabelledBy-CD_ugzhJ.js → resolveAriaLabelledBy-0FA0k4xp.js} +1 -1
  132. package/dist/client/assets/{rightPanelRouteSearch-DB5gQGHK.js → rightPanelRouteSearch-BS8CkNS6.js} +1 -1
  133. package/dist/client/assets/runtime-CPM0EUhb.js +1 -0
  134. package/dist/client/assets/{scroll-area-Drsa8bNB.js → scroll-area-C0yF015F.js} +1 -1
  135. package/dist/client/assets/{scrollEdges-B-cqxY4l.js → scrollEdges-DI5Y3mtR.js} +1 -1
  136. package/dist/client/assets/{select-BYbVr-yg.js → select-CZukJlTn.js} +1 -1
  137. package/dist/client/assets/{separator-CdS5bi4Z.js → separator-D4ckGtPe.js} +1 -1
  138. package/dist/client/assets/session-logic-BalPN1Sc.js +4 -0
  139. package/dist/client/assets/{settingsDialogStore-ygYoScKe.js → settingsDialogStore-LxRFC5hh.js} +1 -1
  140. package/dist/client/assets/{settingsLayout-D8glO7f1.js → settingsLayout-CHJT5wtl.js} +1 -1
  141. package/dist/client/assets/{sheet-BO78gIKZ.js → sheet-BNfImQ-7.js} +1 -1
  142. package/dist/client/assets/{sidebar-Dm6l2GA6.js → sidebar-CFGg5Tkr.js} +1 -1
  143. package/dist/client/assets/sidebarProjectFolders-bhNsO9Z_.js +4 -0
  144. package/dist/client/assets/{sidebarStatusText-D0HT0fek.js → sidebarStatusText-C8QBhZhZ.js} +1 -1
  145. package/dist/client/assets/{skeleton-CvQSeJbw.js → skeleton-DOgQaVXv.js} +1 -1
  146. package/dist/client/assets/{spinner-ClF0jOcX.js → spinner-ClQu8SdC.js} +1 -1
  147. package/dist/client/assets/{src-Vf4LVnMX.js → src-DmPIm3ie.js} +1 -1
  148. package/dist/client/assets/storeSelectors-Cf2WDMfx.js +1 -0
  149. package/dist/client/assets/{switch-BTGo9Yip.js → switch-BZjA7VT9.js} +1 -1
  150. package/dist/client/assets/{terminal-links-CZ3c9AbA.js → terminal-links-CzJomeox.js} +1 -1
  151. package/dist/client/assets/{textarea-RFPODxWW.js → textarea-DHdmRD1r.js} +1 -1
  152. package/dist/client/assets/threadPinning-BLqwZebi.js +1 -0
  153. package/dist/client/assets/{threadPriorityRefreshRuntime-Ct5pnIbX.js → threadPriorityRefreshRuntime-BoNAlBXK.js} +1 -1
  154. package/dist/client/assets/{toast-CcSCAm4B.js → toast-C-0Ft2jD.js} +1 -1
  155. package/dist/client/assets/{toggle-I6h33Cu5.js → toggle-DsnOFDbJ.js} +1 -1
  156. package/dist/client/assets/{toggle-group-mLIkiJtU.js → toggle-group-Chxh9G6t.js} +1 -1
  157. package/dist/client/assets/{tooltip-C8sAONBj.js → tooltip-C_-9XEfA.js} +1 -1
  158. package/dist/client/assets/types-Cf2WDMfx.js +1 -0
  159. package/dist/client/assets/{uiStateStore-B6pjzSjj.js → uiStateStore-DzUrk2GS.js} +1 -1
  160. package/dist/client/assets/useAtlassian-CoHKzu-e.js +0 -0
  161. package/dist/client/assets/{useButton-D__1LqCF.js → useButton-BmvYhoMC.js} +1 -1
  162. package/dist/client/assets/{useCompositeListItem-Cmr_nuuG.js → useCompositeListItem-D0PvH4nv.js} +1 -1
  163. package/dist/client/assets/{useDebouncedValue-DHjoudTq.js → useDebouncedValue-s0BC8Yyp.js} +1 -1
  164. package/dist/client/assets/{useFloatingRootContext-D5EZmrCa.js → useFloatingRootContext-CLCaQEJk.js} +1 -1
  165. package/dist/client/assets/{useHandleNewThread-DX2FtXcP.js → useHandleNewThread-Bw460iXT.js} +1 -1
  166. package/dist/client/assets/{useLabelableId-DnQJ7amm.js → useLabelableId-CB_9OReR.js} +1 -1
  167. package/dist/client/assets/{useLocation-CDeYzWW6.js → useLocation-DGJMt6gP.js} +1 -1
  168. package/dist/client/assets/{useOpenInteractionType-CjtpACKR.js → useOpenInteractionType-BSSI2GzS.js} +1 -1
  169. package/dist/client/assets/{usePhoneThreadActions-BEa3VzGG.js → usePhoneThreadActions-BIDUSWSI.js} +1 -1
  170. package/dist/client/assets/{usePopupViewport-BuhsNdVy.js → usePopupViewport-8F-J1h5f.js} +1 -1
  171. package/dist/client/assets/{useScrollLock-D3tMGsRk.js → useScrollLock-CBz-5_MX.js} +1 -1
  172. package/dist/client/assets/{useStatistics-CtunoTE-.js → useStatistics-B91973jb.js} +2 -2
  173. package/dist/client/assets/{useSwipeDismiss-CbgDJvw1.js → useSwipeDismiss-D22_vuiH.js} +1 -1
  174. package/dist/client/assets/{useTheme-DiC-5xCb.js → useTheme-By1kfyiU.js} +1 -1
  175. package/dist/client/assets/{useThreadActions-fN-Al13y.js → useThreadActions-BCH01d6u.js} +1 -1
  176. package/dist/client/assets/{useTriggerFocusGuards-CrugmkhX.js → useTriggerFocusGuards-f7afwACm.js} +1 -1
  177. package/dist/client/assets/{useValueChanged-MQtIzPIU.js → useValueChanged-EkWF0C3k.js} +1 -1
  178. package/dist/client/assets/{utils-BofFIn5Y.js → utils-CV2fJJxC.js} +1 -1
  179. package/dist/client/index.html +1 -1
  180. package/dist/{collectUint8StreamText-Bb52hlpd.cjs → collectUint8StreamText-Dsbmrw73.cjs} +48 -10
  181. package/dist/{collectUint8StreamText-EDg4F0TU.mjs → collectUint8StreamText-oFvWyN3_.mjs} +37 -11
  182. package/dist/{makeManagedServerProvider-itynW7xv.cjs → makeManagedServerProvider-CANTNAsz.cjs} +9 -2
  183. package/dist/{makeManagedServerProvider-Cf8bNWwc.mjs → makeManagedServerProvider-PLtJj7EV.mjs} +10 -3
  184. package/package.json +1 -1
  185. package/dist/client/assets/AppearanceSettings-CYbSApl4.js +0 -1
  186. package/dist/client/assets/ChatRightPanel-BIS1DPGa.js +0 -27
  187. package/dist/client/assets/CommandPaletteDialog-C5xAo65V.js +0 -1
  188. package/dist/client/assets/DialogRoot-BpIvUdm7.js +0 -1
  189. package/dist/client/assets/GlassSurface-C3IIWMu9.js +0 -1
  190. package/dist/client/assets/HostedHubRoot-Cc8GYcK6.js +0 -1
  191. package/dist/client/assets/KeybindingsSettings-D2bNQPI-.js +0 -7
  192. package/dist/client/assets/PhoneHome-BtPE7bQn.js +0 -1
  193. package/dist/client/assets/PhoneSettingsSurface-tcFCccEL.js +0 -1
  194. package/dist/client/assets/ProvidersSettingsPanel-B3aBKY--.js +0 -1
  195. package/dist/client/assets/RootAppShell-C-0ChFVJ.js +0 -6
  196. package/dist/client/assets/SettingsDialog-Bbuoh793.js +0 -1
  197. package/dist/client/assets/SourceControlSettings-CkiYR4lR.js +0 -1
  198. package/dist/client/assets/ThreadStatusIndicators-ZImeLExQ.js +0 -0
  199. package/dist/client/assets/appearancePreferences-COvj0WMT.js +0 -1
  200. package/dist/client/assets/authorization-mIJKV2yp.js +0 -1
  201. package/dist/client/assets/composerDraftStore-CdJJZe42.js +0 -11
  202. package/dist/client/assets/device-B_qvyvtW.js +0 -168
  203. package/dist/client/assets/editorPreferences-DHIJntKF.js +0 -1
  204. package/dist/client/assets/main-BKS5Nf2_.js +0 -9
  205. package/dist/client/assets/main-DaYHZt-J.css +0 -2
  206. package/dist/client/assets/panel-right-BodNpkM9.js +0 -1
  207. package/dist/client/assets/primary-BzLEg2w1.js +0 -2
  208. package/dist/client/assets/projectPaths-BAd6NFcE.js +0 -1
  209. package/dist/client/assets/providerInstances-BJcfB_9E.js +0 -1
  210. package/dist/client/assets/providerModels-BJcfB_9E.js +0 -1
  211. package/dist/client/assets/runtime-CXut_g4p.js +0 -1
  212. package/dist/client/assets/session-logic-GZix7S2I.js +0 -4
  213. package/dist/client/assets/sidebarProjectFolders-cnmz3B_-.js +0 -4
  214. package/dist/client/assets/storeSelectors-DYekgeHu.js +0 -1
  215. package/dist/client/assets/types-DYekgeHu.js +0 -1
  216. package/dist/client/assets/useAppearancePreference-BlLlxQl7.js +0 -1
  217. package/dist/client/assets/useAtlassian-9-hy2f8z.js +0 -0
@@ -1,168 +0,0 @@
1
- import{i as e,n as t,r as n,t as r}from"./react-SIfiwpqq.js";import{t as i}from"./index-CQmEMMQH.js";import{t as a}from"./compiler-runtime-qmuS0Svy.js";import{t as o}from"./env-B4arEvJg.js";import{Sn as s}from"./runtime-CXut_g4p.js";import"./primary-BzLEg2w1.js";import{It as c,at as l}from"./composerDraftStore-CdJJZe42.js";import{f as u}from"./useRenderElement-DchFnsR8.js";import{n as d}from"./loader-circle-CrtHFAvM.js";import{o as f,s as p}from"./tabSwitchInstrumentation-CLDM7g1_.js";import{i as m}from"./toast-CcSCAm4B.js";import{t as h}from"./copy-UQjKGt7t.js";import{S as g,a as _,b as v,g as y,h as b,i as x,m as S,n as C,o as ee,p as te,r as ne,t as re,v as ie}from"./lib-qiiNMGgU.js";import{t as ae}from"./folder-DtsQoI9_.js";import{i as oe,o as se}from"./terminal-links-CZ3c9AbA.js";import{t as w}from"./utils-BofFIn5Y.js";import{f as ce}from"./session-logic-GZix7S2I.js";import{i as le,n as ue,t as de}from"./tooltip-C8sAONBj.js";import{t as T}from"./toastHelpers-CSQRKo4F.js";import{t as E}from"./skeleton-CvQSeJbw.js";import{t as fe}from"./usePresentationTier-B_SCFvN7.js";import{n as pe}from"./editorPreferences-DHIJntKF.js";import{t as me}from"./useLongPress-OGlhYKlH.js";import{t as D}from"./useTheme-DiC-5xCb.js";var he=u(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),ge=u(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]);function _e(e){return e.worktreePath??e.project.cwd}function ve(e){let t={RYCO_PROJECT_ROOT:e.project.cwd};return e.worktreePath&&(t.RYCO_WORKTREE_PATH=e.worktreePath),e.extraEnv?{...t,...e.extraEnv}:t}var O=a(),k=c(),ye=[`#f97316`,`#a855f7`,`#6366f1`,`#3b82f6`,`#0ea5e9`,`#06b6d4`,`#14b8a6`,`#22c55e`,`#84cc16`,`#eab308`,`#ef4444`,`#ec4899`,`#f43f5e`,`#8b5cf6`],be=5,xe=4,Se=20,Ce=.4,we=xe-Ce*2;function Te(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function Ee(e){return ye[Te(e)%ye.length]}function De(e){let t=Ee(e),n=Te(`avatar:${e}`),r=[];for(let e=0;e<be;e+=1)for(let t=0;t<be;t+=1){let i=t<3?t:4-t,a=e*3+i;r.push((n>>>a&1)==1)}if(!r.some(Boolean))for(let e=0;e<be;e+=1)r[e*be+2]=!0;return{color:t,cells:r}}function Oe(e){let t=(0,O.c)(12),{name:n,className:r}=e,i;t[0]===n?i=t[1]:(i=De(n),t[0]=n,t[1]=i);let{color:a,cells:o}=i,s;t[2]===r?s=t[3]:(s=w(`size-5 shrink-0`,r),t[2]=r,t[3]=s);let c;if(t[4]!==o||t[5]!==a){let e;t[7]===a?e=t[8]:(e=(e,t)=>{if(!e)return null;let n=Math.floor(t/be),r=t%be;return(0,k.jsx)(`rect`,{x:r*xe+Ce,y:n*xe+Ce,width:we,height:we,rx:.6,fill:a},`${n}-${r}`)},t[7]=a,t[8]=e),c=o.map(e),t[4]=o,t[5]=a,t[6]=c}else c=t[6];let l;return t[9]!==s||t[10]!==c?(l=(0,k.jsx)(`svg`,{viewBox:`0 0 ${Se} ${Se}`,className:s,role:`img`,"aria-hidden":`true`,focusable:`false`,children:c}),t[9]=s,t[10]=c,t[11]=l):l=t[11],l}function ke(e){return`${e} ${e===1?`agent`:`agents`} working`}function Ae(e){let t=(0,O.c)(6),{count:n,className:r}=e;if(n<=0)return null;let i;t[0]===r?i=t[1]:(i=w(`absolute flex items-center justify-center rounded-full bg-info font-semibold tabular-nums text-white shadow-[0_0_0_2px_var(--color-background)]`,r),t[0]=r,t[1]=i);let a=n>99?`99+`:n,o;return t[2]!==n||t[3]!==i||t[4]!==a?(o=(0,k.jsx)(`span`,{"aria-hidden":!0,"data-live-agent-count":n,className:i,children:a}),t[2]=n,t[3]=i,t[4]=a,t[5]=o):o=t[5],o}var A=e(r(),1),je=`diffs-container`,Me=/(?=^From [a-f0-9]+ .+$)/m,Ne=/(?=^diff --git)/gm,Pe=/(?<=\n)/,Fe=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Ie=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Le=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Re=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,ze=`header-prefix`,Be=`header-filename-suffix`,Ve=`header-metadata`,He=`header-custom`,Ue={dark:`pierre-dark`,light:`pierre-light`},We=`data-theme-css`,Ge=`data-unsafe-css`,Ke=`data-diffs-scrollbar-measure`,qe=`--diffs-scrollbar-gutter-measured`,Je=1e5,Ye={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8};({...Ye});var Xe=Object.freeze({fromStart:0,fromEnd:0}),Ze={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},Qe={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function $e(e,t){return e==null||t==null||typeof e==`string`||typeof t==`string`?e===t:e.dark===t.dark&&e.light===t.light}function et(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}function tt(e,t){return e-(t===0?0:1)}function nt(e,t){return tt(e,t)+t}var rt=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},it=new class extends rt{};function at(e,t,n){return it.diff(e,t,n)}function ot(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function st(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function ct(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function lt(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function ut(e,t){return ct(e,t,``)}function dt(e,t){return lt(e,t,``)}function ft(e,t){return t.slice(0,pt(e,t))}function pt(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function mt(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function ht(e,t){if(t)return _t(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function gt(e,t){if(t)return _t(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function _t(e,t){if(!t)return[gt(e),ht(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=mt(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var vt=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,yt=RegExp(`[${vt}]+|\\s+|[^${vt}]`,`ug`);new class extends rt{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=mt(e,r)}else n=e.match(yt)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&bt(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&bt(n,i,r,null,t.intlSegmenter),e}};function bt(e,t,n,r,i){if(t&&n){let[a,o]=_t(t.value,i),[s,c]=_t(n.value,i);if(e){let r=ot(a,s);e.value=lt(e.value,s,r),t.value=ut(t.value,r),n.value=ut(n.value,r)}if(r){let e=st(o,c);r.value=ct(r.value,c,e),t.value=dt(t.value,e),n.value=dt(n.value,e)}}else if(n){if(e){let e=gt(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=gt(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=gt(r.value,i),[a,o]=_t(t.value,i),s=ot(n,a);t.value=ut(t.value,s);let c=st(ut(n,s),o);t.value=dt(t.value,c),r.value=ct(r.value,n,c),e.value=lt(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=gt(r.value,i),n=ft(ht(t.value,i),e);t.value=dt(t.value,n)}else if(e){let n=ft(ht(e.value,i),gt(t.value,i));t.value=ut(t.value,n)}}var xt=new class extends rt{tokenize(e){let t=RegExp(`(\\r?\\n)|[${vt}]+|[^\\S\\n\\r]+|[^${vt}]`,`ug`);return e.match(t)||[]}};function St(e,t,n){return xt.diff(e,t,n)}var Ct=new class extends rt{constructor(){super(...arguments),this.tokenize=Tt}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
2
- `))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
3
- `))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
4
- `)&&(e=e.slice(0,-1)),t.endsWith(`
5
- `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function wt(e,t,n){return Ct.diff(e,t,n)}function Tt(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
6
- `));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function Et(e){return e==`.`||e==`!`||e==`?`}new class extends rt{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(Et(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends rt{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends rt{constructor(){super(...arguments),this.tokenize=Tt}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(Dt(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function Dt(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=Dt(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=Dt(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends rt{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function Ot(e){for(let t=0;t<e.length;t++)if(e[t]<` `||e[t]>`~`||e[t]===`"`||e[t]===`\\`)return!0;return!1}function kt(e){if(!Ot(e))return e;let t=`"`,n=new TextEncoder().encode(e),r=0;for(;r<n.length;){let e=n[r];t+=e===7?`\\a`:e===8?`\\b`:e===9?`\\t`:e===10?`\\n`:e===11?`\\v`:e===12?`\\f`:e===13?`\\r`:e===34?`\\"`:e===92?`\\\\`:e>=32&&e<=126?String.fromCharCode(e):`\\`+e.toString(8).padStart(3,`0`),r++}return t+=`"`,t}var At={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function jt(e,t,n,r,i,a,o){let s;s=o?typeof o==`function`?{callback:o}:o:{},s.context===void 0&&(s.context=4);let c=s.context;if(s.newlineIsToken)throw Error(`newlineIsToken may not be used with patch-generation functions, only with diffing functions`);if(s.callback){let{callback:e}=s;wt(n,r,Object.assign(Object.assign({},s),{callback:t=>{let n=l(t);e(n)}}))}else return l(wt(n,r,s));function l(n){if(!n)return;n.push({value:``,lines:[]});function r(e){return e.map(function(e){return` `+e})}let o=[],s=0,l=0,u=[],d=1,f=1;for(let e=0;e<n.length;e++){let t=n[e],i=t.lines||Pt(t.value);if(t.lines=i,t.added||t.removed){if(!s){let t=n[e-1];s=d,l=f,t&&(u=c>0?r(t.lines.slice(-c)):[],s-=u.length,l-=u.length)}for(let e of i)u.push((t.added?`+`:`-`)+e);t.added?f+=i.length:d+=i.length}else{if(s){if(i.length<=c*2&&e<n.length-2)for(let e of r(i))u.push(e);else{let e=Math.min(i.length,c);for(let t of r(i.slice(0,e)))u.push(t);let t={oldStart:s,oldLines:d-s+e,newStart:l,newLines:f-l+e,lines:u};o.push(t),s=0,l=0,u=[]}}d+=i.length,f+=i.length}}for(let e of o)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith(`
7
- `)?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,`\`),t++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:o}}}function Mt(e,t){if(t||=At,Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders&&!e.every(e=>e.isGit))throw Error(`Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)`);return e.map(e=>Mt(e,t)).join(`
8
- `)}let n=[];if(e.isGit){if(t=At,!e.oldFileName)throw Error(`oldFileName must be specified for Git patches`);if(!e.newFileName)throw Error(`newFileName must be specified for Git patches`);let r=e.oldFileName,i=e.newFileName;e.isCreate&&r===`/dev/null`?r=i.replace(/^b\//,`a/`):e.isDelete&&i===`/dev/null`&&(i=r.replace(/^a\//,`b/`)),n.push(`diff --git `+kt(r)+` `+kt(i)),e.isDelete&&n.push(`deleted file mode `+(e.oldMode??`100644`)),e.isCreate&&n.push(`new file mode `+(e.newMode??`100644`)),e.oldMode&&e.newMode&&!e.isDelete&&!e.isCreate&&(n.push(`old mode `+e.oldMode),n.push(`new mode `+e.newMode)),e.isRename&&(n.push(`rename from `+kt((e.oldFileName??``).replace(/^a\//,``))),n.push(`rename to `+kt((e.newFileName??``).replace(/^b\//,``)))),e.isCopy&&(n.push(`copy from `+kt((e.oldFileName??``).replace(/^a\//,``))),n.push(`copy to `+kt((e.newFileName??``).replace(/^b\//,``))))}else t.includeIndex&&e.oldFileName==e.newFileName&&e.oldFileName!==void 0&&n.push(`Index: `+e.oldFileName),t.includeUnderline&&n.push(`===================================================================`);let r=e.hunks.length>0;t.includeFileHeaders&&e.oldFileName!==void 0&&e.newFileName!==void 0&&(!e.isGit||r)&&(n.push(`--- `+kt(e.oldFileName)+(e.oldHeader?` `+e.oldHeader:``)),n.push(`+++ `+kt(e.newFileName)+(e.newHeader?` `+e.newHeader:``)));for(let t=0;t<e.hunks.length;t++){let r=e.hunks[t],i=r.oldLines===0?r.oldStart-1:r.oldStart,a=r.newLines===0?r.newStart-1:r.newStart;n.push(`@@ -`+i+`,`+r.oldLines+` +`+a+`,`+r.newLines+` @@`);for(let e of r.lines)n.push(e)}return n.join(`
9
- `)+`
10
- `}function Nt(e,t,n,r,i,a,o){if(typeof o==`function`&&(o={callback:o}),o?.callback){let{callback:s}=o;jt(e,t,n,r,i,a,Object.assign(Object.assign({},o),{callback:e=>{s(e?Mt(e,o.headerOptions):void 0)}}))}else{let s=jt(e,t,n,r,i,a,o);return s?Mt(s,o?.headerOptions):void 0}}function Pt(e){let t=e.endsWith(`
11
- `),n=e.split(`
12
- `).map(e=>e+`
13
- `);return t?n.pop():n.push(n.pop().slice(0,-1)),n}function Ft(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function It(e){return{type:`text`,value:e}}function Lt({tagName:e,children:t=[],properties:n={}}){return{type:`element`,tagName:e,properties:n,children:t}}function Rt({name:e,width:t=16,height:n=16,properties:r}){return Lt({tagName:`svg`,properties:{width:t,height:n,viewBox:`0 0 16 16`,...r},children:[Lt({tagName:`use`,properties:{href:`#${e.replace(/^#/,``)}`}})]})}function zt(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t;t=`children`in t?t.children[0]:null}}function Bt(e){return Lt({tagName:`div`,properties:{"data-gutter":``},children:e})}function Vt(e,t,n,r={}){return Lt({tagName:`div`,properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...r},children:t==null?void 0:[Lt({tagName:`span`,properties:{"data-line-number-content":``},children:[It(`${t}`)]})]})}function Ht(e,t,n){return Lt({tagName:`div`,properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t===`annotation`?void 0:e,style:t===`annotation`?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}var Ut=/["&'<>`]/g,Wt=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Gt=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Kt=/[|\\{}()[\]^$+*?.]/g,qt=new WeakMap;function Jt(e,t){if(e=e.replace(t.subset?Yt(t.subset):Ut,r),t.subset||t.escapeOnly)return e;return e.replace(Wt,n).replace(Gt,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function Yt(e){let t=qt.get(e);return t||(t=Xt(e),qt.set(e,t)),t}function Xt(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(Kt,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var Zt=/[\dA-Fa-f]/;function Qt(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!Zt.test(String.fromCharCode(t))?r:r+`;`}var $t=/\d/;function en(e,t,n){let r=`&#`+String(e);return n&&t&&!$t.test(String.fromCharCode(t))?r:r+`;`}var tn=`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`.split(`.`),nn={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:`­`,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},rn=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],an={}.hasOwnProperty,on={},sn;for(sn in nn)an.call(nn,sn)&&(on[nn[sn]]=sn);var cn=/[^\dA-Za-z]/;function ln(e,t,n,r){let i=String.fromCharCode(e);if(an.call(on,i)){let e=on[i],a=`&`+e;return n&&tn.includes(e)&&!rn.includes(e)&&(!r||t&&t!==61&&cn.test(String.fromCharCode(t)))?a:a+`;`}return``}function un(e,t,n){let r=Qt(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=ln(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=en(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function dn(e,t){return Jt(e,Object.assign({format:un},t))}var fn=/^>|^->|<!--|-->|--!>|<!-$/g,pn=[`>`],mn=[`<`,`>`];function hn(e,t,n,r){return r.settings.bogusComments?`<?`+dn(e.value,Object.assign({},r.settings.characterReferences,{subset:pn}))+`>`:`<!--`+e.value.replace(fn,i)+`-->`;function i(e){return dn(e,Object.assign({},r.settings.characterReferences,{subset:mn}))}}function gn(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}var j=yn(1),_n=yn(-1),vn=[];function yn(e){return t;function t(t,n,r){let i=t?t.children:vn,a=(n||0)+e,o=i[a];if(!r)for(;o&&ie(o);)a+=e,o=i[a];return o}}var bn={}.hasOwnProperty;function xn(e){return t;function t(t,n,r){return bn.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var Sn=xn({body:Tn,caption:Cn,colgroup:Cn,dd:kn,dt:On,head:Cn,html:wn,li:Dn,optgroup:jn,option:Mn,p:En,rp:An,rt:An,tbody:Pn,td:Ln,tfoot:Fn,th:Ln,thead:Nn,tr:In});function Cn(e,t,n){let r=j(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&ie(r.value.charAt(0)))}function wn(e,t,n){let r=j(n,t);return!r||r.type!==`comment`}function Tn(e,t,n){let r=j(n,t);return!r||r.type!==`comment`}function En(e,t,n){let r=j(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||n.type!==`element`||n.tagName!==`a`&&n.tagName!==`audio`&&n.tagName!==`del`&&n.tagName!==`ins`&&n.tagName!==`map`&&n.tagName!==`noscript`&&n.tagName!==`video`}function Dn(e,t,n){let r=j(n,t);return!r||r.type===`element`&&r.tagName===`li`}function On(e,t,n){let r=j(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function kn(e,t,n){let r=j(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function An(e,t,n){let r=j(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function jn(e,t,n){let r=j(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function Mn(e,t,n){let r=j(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function Nn(e,t,n){let r=j(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function Pn(e,t,n){let r=j(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function Fn(e,t,n){return!j(n,t)}function In(e,t,n){let r=j(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function Ln(e,t,n){let r=j(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var Rn=xn({body:Vn,colgroup:Hn,head:Bn,html:zn,tbody:Un});function zn(e){let t=j(e,-1);return!t||t.type!==`comment`}function Bn(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function Vn(e){let t=j(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&ie(t.value.charAt(0)))&&(t.type!==`element`||t.tagName!==`meta`&&t.tagName!==`link`&&t.tagName!==`script`&&t.tagName!==`style`&&t.tagName!==`template`)}function Hn(e,t,n){let r=_n(n,t),i=j(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&Sn(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function Un(e,t,n){let r=_n(n,t),i=j(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&Sn(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var Wn={name:[[`
14
- \f\r &/=>`.split(``),`
15
- \f\r "&'/=>\``.split(``)],[`\0
16
- \f\r "&'/<=>`.split(``),`\0
17
- \f\r "&'/<=>\``.split(``)]],unquoted:[[`
18
- \f\r &>`.split(``),`\0
19
- \f\r "&'<=>\``.split(``)],[`\0
20
- \f\r "&'<=>\``.split(``),`\0
21
- \f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function Gn(e,t,n,r){let i=r.schema,a=i.space!==`svg`&&r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=b);let l=Kn(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!Rn(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!Sn(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function Kn(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=qn(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function qn(e,t,n){let r=y(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;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 c=dn(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Wn.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?v:te)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=dn(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Wn.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&C(n,o)>C(n,e.alternative)&&(o=e.alternative),s=o+dn(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?Wn.single:Wn.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var Jn=[`<`,`&`];function Yn(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:dn(e.value,Object.assign({},r.settings.characterReferences,{subset:Jn}))}function Xn(e,t,n,r){return r.settings.allowDangerousHtml?e.value:Yn(e,t,n,r)}function Zn(e,t,n,r){return r.all(e)}var Qn=x(`type`,{invalid:$n,unknown:er,handlers:{comment:hn,doctype:gn,element:Gn,raw:Xn,root:Zn,text:Yn}});function $n(e){throw Error("Expected node, not `"+e+"`")}function er(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var tr={},nr={},rr=[];function ir(e,t){let n=t||tr,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:ar,all:or,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||ne,characterReferences:n.characterReferences||nr,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?b:S,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function ar(e,t,n){return Qn(e,t,n,this)}function or(e){let t=[],n=e&&e.children||rr,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var sr=new Map,cr=new Map,lr=new Map,ur=new Set;function dr(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(ur.has(n.name))continue;let e=sr.get(n.name);e??(e=n,sr.set(n.name,e)),ur.add(e.name),t.loadLanguageSync(e.data)}}function fr(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var pr=Object.defineProperty,mr=Object.getOwnPropertyDescriptor,hr=Object.getOwnPropertyNames,gr=Object.prototype.hasOwnProperty,_r=(e,t)=>{let n={};for(var r in e)pr(n,r,{get:e[r],enumerable:!0});return t||pr(n,Symbol.toStringTag,{value:`Module`}),n},vr=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=hr(t),a=0,o=i.length,s;a<o;a++)s=i[a],!gr.call(e,s)&&s!==n&&pr(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=mr(t,s))||r.enumerable});return e},yr=(e,t,n)=>(vr(e,t,`default`),n&&vr(n,t,`default`)),br=[{id:`abap`,name:`ABAP`,import:(()=>i(()=>import(`./abap-CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>i(()=>import(`./actionscript-3--17pq3dv.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>i(()=>import(`./ada-C5qYipkI.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>i(()=>import(`./angular-html-Dht9YPGR.js`).then(e=>e.n),[]))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>i(()=>import(`./angular-ts-BQK9km6-.js`),[]))},{id:`apache`,name:`Apache Conf`,import:(()=>i(()=>import(`./apache-U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>i(()=>import(`./apex-VAyPSnFM.js`),[]))},{id:`apl`,name:`APL`,import:(()=>i(()=>import(`./apl-C92MddLO.js`),[]))},{id:`applescript`,name:`AppleScript`,import:(()=>i(()=>import(`./applescript-CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>i(()=>import(`./ara-4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>i(()=>import(`./asciidoc-DE70LPWp.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>i(()=>import(`./asm-Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>i(()=>import(`./astro-CV97iv9o.js`),[]))},{id:`awk`,name:`AWK`,import:(()=>i(()=>import(`./awk-BWXHIvNe.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>i(()=>import(`./ballerina-B7ZEbQpA.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>i(()=>import(`./bat-Bo4NYOV-.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>i(()=>import(`./beancount-D-usSTwE.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>i(()=>import(`./berry-DKpUyyne.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>i(()=>import(`./bibtex-Ci_nEsc7.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>i(()=>import(`./bicep-CUHmPFLl.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>i(()=>import(`./bird2-C6vDhewU.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>i(()=>import(`./blade-yJCl9jZA.js`),[]))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>i(()=>import(`./bsl-BkkzgIyY.js`),[]))},{id:`c`,name:`C`,import:(()=>i(()=>import(`./c-Baw6W2ff.js`).then(e=>e.n),[]))},{id:`c3`,name:`C3`,import:(()=>i(()=>import(`./c3-BFHwR3_K.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>i(()=>import(`./cadence-CQ2zXKGN.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>i(()=>import(`./cairo-DLTphjLi.js`),[]))},{id:`clarity`,name:`Clarity`,import:(()=>i(()=>import(`./clarity-SemFz856.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>i(()=>import(`./clojure-DqKBuwfJ.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>i(()=>import(`./cmake-Bj61d0ZC.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>i(()=>import(`./cobol-NqUMvFU8.js`),[]))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>i(()=>import(`./codeowners-C8r90Shi.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>i(()=>import(`./codeql-oeQT6MSM.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>i(()=>import(`./coffee-DVKhASwQ.js`),[]))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>i(()=>import(`./common-lisp-Cv5bFMCO.js`),[]))},{id:`coq`,name:`Coq`,import:(()=>i(()=>import(`./coq-BrsZFFmf.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>i(()=>import(`./cpp-nUc1dxUX.js`).then(e=>e.n),[]))},{id:`crystal`,name:`Crystal`,import:(()=>i(()=>import(`./crystal-DTR4CTFy.js`),[]))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>i(()=>import(`./csharp-oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>i(()=>import(`./css-tyblAV2Z.js`).then(e=>e.n),[]))},{id:`csv`,name:`CSV`,import:(()=>i(()=>import(`./csv-Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>i(()=>import(`./cue-CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>i(()=>import(`./cypher-ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>i(()=>import(`./d-qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>i(()=>import(`./dart-CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>i(()=>import(`./dax-BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>i(()=>import(`./desktop-Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>i(()=>import(`./diff-woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>i(()=>import(`./docker-IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>i(()=>import(`./dotenv-_5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>i(()=>import(`./dream-maker-DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>i(()=>import(`./edge-CpqhDICu.js`),[]))},{id:`elixir`,name:`Elixir`,import:(()=>i(()=>import(`./elixir--isJgL2B.js`),[]))},{id:`elm`,name:`Elm`,import:(()=>i(()=>import(`./elm-DgHzNgm_.js`),[]))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>i(()=>import(`./emacs-lisp-B4R74twV.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>i(()=>import(`./erb-UQla4w8B.js`),[]))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>i(()=>import(`./erlang-Cphh6RMH.js`),[]))},{id:`fennel`,name:`Fennel`,import:(()=>i(()=>import(`./fennel-DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>i(()=>import(`./fish-BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>i(()=>import(`./fluent-C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>i(()=>import(`./fortran-fixed-form-DEKoE2YW.js`),[]))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>i(()=>import(`./fortran-free-form-CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>i(()=>import(`./fsharp-D13ZGOAj.js`),[]))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>i(()=>import(`./gdresource-C0sCabJj.js`),[]))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>i(()=>import(`./gdscript-Cp2uCuqX.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>i(()=>import(`./gdshader-CBce3t8t.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>i(()=>import(`./genie-CV2tkWYe.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>i(()=>import(`./gherkin-DExj1W_8.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>i(()=>import(`./git-commit-BSykSTBG.js`),[]))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>i(()=>import(`./git-rebase-BqNqx552.js`),[]))},{id:`gleam`,name:`Gleam`,import:(()=>i(()=>import(`./gleam-CSRkHgEL.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>i(()=>import(`./glimmer-js-yZWXr7D1.js`),[]))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>i(()=>import(`./glimmer-ts-BgilwNe9.js`),[]))},{id:`glsl`,name:`GLSL`,import:(()=>i(()=>import(`./glsl-CiPx7o44.js`).then(e=>e.n),[]))},{id:`gn`,name:`GN`,import:(()=>i(()=>import(`./gn-ilITqXS6.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>i(()=>import(`./gnuplot-7GGW24-e.js`),[]))},{id:`go`,name:`Go`,import:(()=>i(()=>import(`./go-rLFTqkRN.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>i(()=>import(`./graphql-dVCFBcPU.js`).then(e=>e.n),[]))},{id:`groovy`,name:`Groovy`,import:(()=>i(()=>import(`./groovy-CacY0gHj.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>i(()=>import(`./hack-Vy6VBrBk.js`),[]))},{id:`haml`,name:`Ruby Haml`,import:(()=>i(()=>import(`./haml-Bvq_b7GQ.js`).then(e=>e.n),[]))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>i(()=>import(`./handlebars-D71nAVX4.js`),[]))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>i(()=>import(`./haskell-D8IpX4py.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>i(()=>import(`./haxe-OTjmBuCE.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>i(()=>import(`./hcl-Dh228itO.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>i(()=>import(`./hjson-CxZEssPk.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>i(()=>import(`./hlsl-Cvrh5tZx.js`),[]))},{id:`html`,name:`HTML`,import:(()=>i(()=>import(`./html-CQCljoLJ.js`).then(e=>e.n),[]))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>i(()=>import(`./html-derivative-BwDrYmK9.js`),[]))},{id:`http`,name:`HTTP`,import:(()=>i(()=>import(`./http-BSiVGmrj.js`),[]))},{id:`hurl`,name:`Hurl`,import:(()=>i(()=>import(`./hurl-BUTu-xdf.js`),[]))},{id:`hxml`,name:`HXML`,import:(()=>i(()=>import(`./hxml-B0Qn7Nwc.js`),[]))},{id:`hy`,name:`Hy`,import:(()=>i(()=>import(`./hy-CZbG8q4J.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>i(()=>import(`./imba-DsUTQ-LC.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>i(()=>import(`./ini-B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>i(()=>import(`./java-DKLhoot1.js`).then(e=>e.n),[]))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>i(()=>import(`./javascript-BoDf_Xaa.js`).then(e=>e.n),[]))},{id:`jinja`,name:`Jinja`,import:(()=>i(()=>import(`./jinja-BA7hgfzz.js`),[]))},{id:`jison`,name:`Jison`,import:(()=>i(()=>import(`./jison-CUMnSUVk.js`),[]))},{id:`json`,name:`JSON`,import:(()=>i(()=>import(`./json-D-CzDEr3.js`).then(e=>e.n),[]))},{id:`json5`,name:`JSON5`,import:(()=>i(()=>import(`./json5-BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>i(()=>import(`./jsonc-CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>i(()=>import(`./jsonl-CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>i(()=>import(`./jsonnet-CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>i(()=>import(`./jssm-DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>i(()=>import(`./jsx-RPKfHBaT.js`).then(e=>e.n),[]))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>i(()=>import(`./julia-DTmLe4fA.js`),[]))},{id:`just`,name:`Just`,import:(()=>i(()=>import(`./just-CPUGe9J1.js`),[]))},{id:`kdl`,name:`KDL`,import:(()=>i(()=>import(`./kdl-CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>i(()=>import(`./kotlin-DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>i(()=>import(`./kusto-C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>i(()=>import(`./latex-UxGGx4RW.js`),[]))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>i(()=>import(`./lean-CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>i(()=>import(`./less-DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>i(()=>import(`./liquid-Cr73H0-U.js`),[]))},{id:`llvm`,name:`LLVM IR`,import:(()=>i(()=>import(`./llvm-Cm23YOpf.js`),[]))},{id:`log`,name:`Log file`,import:(()=>i(()=>import(`./log-BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>i(()=>import(`./logo-Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>i(()=>import(`./lua-BNklVDJF.js`).then(e=>e.n),[]))},{id:`luau`,name:`Luau`,import:(()=>i(()=>import(`./luau-FMPmPwt6.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>i(()=>import(`./make-Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>i(()=>import(`./markdown-BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>i(()=>import(`./marko-8BhW8jZt.js`),[]))},{id:`matlab`,name:`MATLAB`,import:(()=>i(()=>import(`./matlab-D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>i(()=>import(`./mdc-OfbQwt23.js`),[]))},{id:`mdx`,name:`MDX`,import:(()=>i(()=>import(`./mdx-DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>i(()=>import(`./mermaid-Bk4SNUv9.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>i(()=>import(`./mipsasm-BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>i(()=>import(`./mojo-BgCJLMeH.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>i(()=>import(`./moonbit-CaWjb8XO.js`),[]))},{id:`move`,name:`Move`,import:(()=>i(()=>import(`./move-B1IS1UjX.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>i(()=>import(`./narrat-_X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>i(()=>import(`./nextflow-BJtWHP5T.js`),[]))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>i(()=>import(`./nextflow-groovy-DJMQeKeT.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>i(()=>import(`./nginx-BbzDIRDu.js`),[]))},{id:`nim`,name:`Nim`,import:(()=>i(()=>import(`./nim-C27DPxCt.js`),[]))},{id:`nix`,name:`Nix`,import:(()=>i(()=>import(`./nix-IvuFDN5E.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>i(()=>import(`./nushell-DcLAeLz5.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>i(()=>import(`./objective-c-D1A_Heim.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>i(()=>import(`./objective-cpp-BsSzOQcm.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>i(()=>import(`./ocaml-O90oeIOV.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>i(()=>import(`./odin-B1RWQWA5.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>i(()=>import(`./openscad-BUDT5pXO.js`),[]))},{id:`pascal`,name:`Pascal`,import:(()=>i(()=>import(`./pascal-4ZHwLPI5.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>i(()=>import(`./perl-Dj7_nwz_.js`),[]))},{id:`php`,name:`PHP`,import:(()=>i(()=>import(`./php-Xqfm-TjX.js`),[]))},{id:`pkl`,name:`Pkl`,import:(()=>i(()=>import(`./pkl-ot-7Btpt.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>i(()=>import(`./plsql-DGHpHOYJ.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>i(()=>import(`./po-BiJDBrnU.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>i(()=>import(`./polar-C7UOKdEL.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>i(()=>import(`./postcss-BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>i(()=>import(`./powerquery-DNMTfnFr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>i(()=>import(`./powershell-DshXNtvi.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>i(()=>import(`./prisma-BsRQq5mF.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>i(()=>import(`./prolog-iXnhIJG7.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>i(()=>import(`./proto-DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>i(()=>import(`./pug-CKEc9v9y.js`),[]))},{id:`puppet`,name:`Puppet`,import:(()=>i(()=>import(`./puppet-CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>i(()=>import(`./purescript-9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>i(()=>import(`./python-gzcpVVnB.js`),[]))},{id:`qml`,name:`QML`,import:(()=>i(()=>import(`./qml-C3bhdnuC.js`),[]))},{id:`qmldir`,name:`QML Directory`,import:(()=>i(()=>import(`./qmldir-DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>i(()=>import(`./qss-Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>i(()=>import(`./r-DbaFp5Gj.js`).then(e=>e.n),[]))},{id:`racket`,name:`Racket`,import:(()=>i(()=>import(`./racket-DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>i(()=>import(`./raku-B3gFvitq.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>i(()=>import(`./razor-CCBiKnb_.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>i(()=>import(`./reg-CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>i(()=>import(`./regexp-BG8FlKR9.js`).then(e=>e.n),[]))},{id:`rel`,name:`Rel`,import:(()=>i(()=>import(`./rel-BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>i(()=>import(`./riscv-Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>i(()=>import(`./ron-VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>i(()=>import(`./rosmsg-CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>i(()=>import(`./rst-C90_EUa_.js`),[]))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>i(()=>import(`./ruby-BlGyFGAQ.js`),[]))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>i(()=>import(`./rust-Cfkwpbl8.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>i(()=>import(`./sas-Dq8EnVfj.js`),[]))},{id:`sass`,name:`Sass`,import:(()=>i(()=>import(`./sass-DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>i(()=>import(`./scala-DKOlJaKm.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>i(()=>import(`./scheme-DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>i(()=>import(`./scss-CMpBj9xp.js`).then(e=>e.n),[]))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>i(()=>import(`./sdbl-bTVj8UrX.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>i(()=>import(`./shaderlab-TOUzSsQk.js`),[]))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>i(()=>import(`./shellscript-C5MCrJaB.js`).then(e=>e.n),[]))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>i(()=>import(`./shellsession-26dOf2m0.js`),[]))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>i(()=>import(`./smalltalk-B16xEiuN.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>i(()=>import(`./solidity-CKzVLygQ.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>i(()=>import(`./soy-Bf3k5CrX.js`),[]))},{id:`sparql`,name:`SPARQL`,import:(()=>i(()=>import(`./sparql-D_iOobhT.js`),[]))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>i(()=>import(`./splunk-BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>i(()=>import(`./sql-DcFiju6z.js`).then(e=>e.n),[]))},{id:`ssh-config`,name:`SSH Config`,import:(()=>i(()=>import(`./ssh-config-BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>i(()=>import(`./stata-DYvaCWJV.js`),[]))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>i(()=>import(`./stylus-B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>i(()=>import(`./surrealql-CaZedS14.js`),[]))},{id:`svelte`,name:`Svelte`,import:(()=>i(()=>import(`./svelte-k_k4XYnr.js`),[]))},{id:`swift`,name:`Swift`,import:(()=>i(()=>import(`./swift-DonLKvLd.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>i(()=>import(`./system-verilog-DJ5XKQeo.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>i(()=>import(`./systemd-BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>i(()=>import(`./talonscript-CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>i(()=>import(`./tasl-DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>i(()=>import(`./tcl-CZd0xW_V.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>i(()=>import(`./templ-CxD_nC0J.js`),[]))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>i(()=>import(`./terraform-DswuEJGm.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>i(()=>import(`./tex-CLeF3jRN.js`),[]))},{id:`toml`,name:`TOML`,import:(()=>i(()=>import(`./toml-CcmNWLt0.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>i(()=>import(`./ts-tags-BriKwQve.js`),[]))},{id:`tsv`,name:`TSV`,import:(()=>i(()=>import(`./tsv-sltzmVWM.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>i(()=>import(`./tsx-CltjRl2u.js`).then(e=>e.n),[]))},{id:`turtle`,name:`Turtle`,import:(()=>i(()=>import(`./turtle-ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>i(()=>import(`./twig-BmgBVapk.js`),[]))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>i(()=>import(`./typescript-BwOcYJx4.js`).then(e=>e.n),[]))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>i(()=>import(`./typespec-BRdr0IET.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>i(()=>import(`./typst-DI99ib-x.js`),[]))},{id:`v`,name:`V`,import:(()=>i(()=>import(`./v-DETTlOr0.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>i(()=>import(`./vala-zf12oZj6.js`),[]))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>i(()=>import(`./vb-Djn5o6TS.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>i(()=>import(`./verilog-CiiDBU1e.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>i(()=>import(`./vhdl-BroJfC0k.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>i(()=>import(`./viml-DvXPmvsu.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>i(()=>import(`./vue-DStD_OmO.js`),[]))},{id:`vue-html`,name:`Vue HTML`,import:(()=>i(()=>import(`./vue-html-BrRsRUlP.js`),[]))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>i(()=>import(`./vue-vine-CxnolnwP.js`),[]))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>i(()=>import(`./vyper-CgoNMtux.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>i(()=>import(`./wasm-ByWQv1Qj.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>i(()=>import(`./wenyan-C8pVoKbM.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>i(()=>import(`./wgsl-BsKzXJz4.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>i(()=>import(`./wikitext-ClFFjSW2.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>i(()=>import(`./wit-DdvCle-K.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>i(()=>import(`./wolfram-DLL8P-h_.js`),[]))},{id:`xml`,name:`XML`,import:(()=>i(()=>import(`./xml-DUCOjSp4.js`).then(e=>e.n),[]))},{id:`xsl`,name:`XSL`,import:(()=>i(()=>import(`./xsl-BY-Cn9M_.js`),[]))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>i(()=>import(`./yaml-BONObsYN.js`).then(e=>e.n),[]))},{id:`zenscript`,name:`ZenScript`,import:(()=>i(()=>import(`./zenscript-BnlCZFoB.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>i(()=>import(`./zig-CMLA9XwU.js`),[]))}],xr=Object.fromEntries(br.map(e=>[e.id,e.import])),Sr=Object.fromEntries(br.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Cr={...xr,...Sr},wr=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>i(()=>import(`./andromeeda-WkhI09AS.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>i(()=>import(`./aurora-x-C7CFqhAd.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>i(()=>import(`./ayu-dark-CRu61w6_.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>i(()=>import(`./ayu-light-Dn6O_aYR.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>i(()=>import(`./ayu-mirage-CTjYAbs-.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>i(()=>import(`./catppuccin-frappe-3VR1Za6u.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>i(()=>import(`./catppuccin-latte-DwIHMF0Q.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>i(()=>import(`./catppuccin-macchiato-DYnBP6_5.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>i(()=>import(`./catppuccin-mocha-DYhrFGRu.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>i(()=>import(`./dark-plus-GAt2ZgX8.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>i(()=>import(`./dracula-C2uKkzgK.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>i(()=>import(`./dracula-soft-D1bVjxWZ.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>i(()=>import(`./everforest-dark-D-DlICQR.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>i(()=>import(`./everforest-light-CeVdGHYG.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>i(()=>import(`./github-dark-DwbbXv51.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>i(()=>import(`./github-dark-default-CxjRwzl6.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>i(()=>import(`./github-dark-dimmed-Cr1oaoul.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>i(()=>import(`./github-dark-high-contrast-B4qJZLZa.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>i(()=>import(`./github-light-CsVXhIlR.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>i(()=>import(`./github-light-default-DB_IwZa6.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>i(()=>import(`./github-light-high-contrast-DLgVeSB-.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>i(()=>import(`./gruvbox-dark-hard-DXm60lX3.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>i(()=>import(`./gruvbox-dark-medium-GE2thSmD.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>i(()=>import(`./gruvbox-dark-soft-04Cj-4VZ.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>i(()=>import(`./gruvbox-light-hard-K6wSn29D.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>i(()=>import(`./gruvbox-light-medium-CVy3aSlc.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>i(()=>import(`./gruvbox-light-soft-DNgJjaY0.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>i(()=>import(`./horizon-0-RkHfro.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>i(()=>import(`./horizon-bright-BgL2X9oq.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>i(()=>import(`./houston-KyjWKfuY.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>i(()=>import(`./kanagawa-dragon-CXtmUGW6.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>i(()=>import(`./kanagawa-lotus-BN08jTvb.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>i(()=>import(`./kanagawa-wave-CTweb8Dz.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>i(()=>import(`./laserwave-CQkdhozh.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>i(()=>import(`./light-plus-CNQ8_7Y0.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>i(()=>import(`./material-theme-CAtLaHa3.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>i(()=>import(`./material-theme-darker-k-s5Bc6K.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>i(()=>import(`./material-theme-lighter-CD6a-c4d.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>i(()=>import(`./material-theme-ocean-B3mraInd.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>i(()=>import(`./material-theme-palenight-DEhAARHw.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>i(()=>import(`./min-dark-BFqTAwCr.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>i(()=>import(`./min-light-O7UdaaxX.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>i(()=>import(`./monokai-CdkpiU2Y.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>i(()=>import(`./night-owl-BsnCLAKc.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>i(()=>import(`./night-owl-light-BODRhcTU.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>i(()=>import(`./nord-Cd-F4txO.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>i(()=>import(`./one-dark-pro-DUS_IGRK.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>i(()=>import(`./one-light-CVUd7yD5.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>i(()=>import(`./plastic-CF8VZTnn.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>i(()=>import(`./poimandres-BX2TyY6j.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>i(()=>import(`./red-CJ3rzSJv.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>i(()=>import(`./rose-pine-BthvhNj6.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>i(()=>import(`./rose-pine-dawn-Dg85fqjY.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>i(()=>import(`./rose-pine-moon-hon4tzzS.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>i(()=>import(`./slack-dark-DYvUXyrP.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>i(()=>import(`./slack-ochin-bqtMVDfH.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>i(()=>import(`./snazzy-light-D8dzFmq5.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>i(()=>import(`./solarized-dark-DV17i1UV.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>i(()=>import(`./solarized-light-DSh2HLQt.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>i(()=>import(`./synthwave-84-CIknw8y7.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>i(()=>import(`./tokyo-night-iIspnLcq.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>i(()=>import(`./vesper-BIFK_oDq.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>i(()=>import(`./vitesse-black-D082JcaE.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>i(()=>import(`./vitesse-dark-z-nr_5O8.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>i(()=>import(`./vitesse-light-ojz42ZLy.js`),[]))}].map(e=>[e.id,e.import])),Tr=n({createOnigurumaEngine:()=>Zr,getDefaultWasmLoader:()=>Xr,loadWasm:()=>Wr,setDefaultWasmLoader:()=>Yr}),Er=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Dr(){return 2147483648}function Or(){return typeof performance<`u`?performance.now():Date.now()}var kr=(e,t)=>e+(t-e%t)%t;async function Ar(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=Dr();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,kr(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:Or,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var jr=Object.defineProperty,Mr=(e,t,n)=>t in e?jr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,M=(e,t,n)=>Mr(e,typeof t==`symbol`?t:t+``,n),N=null;function Nr(e){throw new Er(e.UTF8ToString(e.getLastOnigError()))}var Pr=class e{constructor(t){M(this,`utf16Length`),M(this,`utf8Length`),M(this,`utf16Value`),M(this,`utf8Value`),M(this,`utf16OffsetToUtf8`),M(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},Fr=class e{constructor(t){if(M(this,`id`,++e.LAST_ID),M(this,`_onigBinding`),M(this,`content`),M(this,`utf16Length`),M(this,`utf8Length`),M(this,`utf16OffsetToUtf8`),M(this,`utf8OffsetToUtf16`),M(this,`ptr`),!N)throw new Er(`Must invoke loadWasm first.`);this._onigBinding=N,this.content=t;let n=new Pr(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=N.omalloc(1e4),e._sharedPtrInUse=!0,N.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(N)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};M(Fr,`LAST_ID`,0),M(Fr,`_sharedPtr`,0),M(Fr,`_sharedPtrInUse`,!1);var Ir=Fr,Lr=class{constructor(e){if(M(this,`_onigBinding`),M(this,`_ptr`),!N)throw new Er(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Pr(e[r]);t[r]=i.createString(N),n[r]=i.utf8Length}let r=N.omalloc(4*e.length);N.HEAPU32.set(t,r/4);let i=N.omalloc(4*e.length);N.HEAPU32.set(n,i/4);let a=N.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)N.ofree(t[n]);N.ofree(i),N.ofree(r),a===0&&Nr(N),this._onigBinding=N,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new Ir(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function Rr(e){return typeof e.instantiator==`function`}function zr(e){return typeof e.default==`function`}function Br(e){return e.data!==void 0}function Vr(e){return typeof Response<`u`&&e instanceof Response}function Hr(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var Ur;function Wr(e){if(Ur)return Ur;async function t(){N=await Ar(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Rr(n)?n=await n.instantiator(t):zr(n)?n=await n.default(t):(Br(n)&&(n=n.data),Vr(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await Kr(n)(t):await qr(n)(t):Hr(n)||n instanceof WebAssembly.Module?n=await Gr(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await Gr(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Ur=t(),Ur}function Gr(e){return t=>WebAssembly.instantiate(e,t)}function Kr(e){return t=>WebAssembly.instantiateStreaming(e,t)}function qr(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var Jr;function Yr(e){Jr=e}function Xr(){return Jr}async function Zr(e){return e&&await Wr(e),{createScanner(e){return new Lr(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Ir(e)}}}var Qr=_r({});yr(Qr,Tr);var P=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function $r(e){return ei(e)}function ei(e){return Array.isArray(e)?ti(e):e instanceof RegExp?e:typeof e==`object`?ni(e):e}function ti(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=ei(e[n]);return t}function ni(e){let t={};for(let n in e)t[n]=ei(e[n]);return t}function ri(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function ii(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?ii(e.substring(0,e.length-1)):e.substr(~t+1)}var ai=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,oi=class{static hasCaptures(e){return e!==null&&(ai.lastIndex=0,ai.test(e))}static replaceCaptures(e,t,n){return e.replace(ai,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function si(e,t){return e<t?-1:+(e>t)}function ci(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=si(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function li(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function ui(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var di=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},fi=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(_i(e),t)}static createFromParsedTheme(e,t){return yi(e,t)}_cachedMatchRoot=new di(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>mi(e.parent,t.parentScopes));return n?new gi(n.fontStyle,n.foreground,n.background):null}},pi=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function mi(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!hi(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function hi(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var gi=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function _i(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&li(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&li(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new vi(l,u,e,o,s,c)}}return n}var vi=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},F=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(F||{});function yi(e,t){e.sort((e,t)=>{let n=si(e.scope,t.scope);return n!==0||(n=ci(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new bi(t),o=new gi(n,a.getId(r),a.getId(i)),s=new Ci(new Si(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new fi(a,o,s)}var bi=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},xi=Object.freeze([]),Si=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||xi,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},Ci=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),Si.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(ci(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Si(e,t,n,r,i))}},wi=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=Ei(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function Ti(e){return e}function Ei(e){return e}function Di(e,t){let n=[],r=ki(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(Oi(i)){let e=[];do e.push(i),i=r.next();while(Oi(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function Oi(e){return!!e&&!!e.match(/[\w\.:]+/)}function ki(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function Ai(e){typeof e.dispose==`function`&&e.dispose()}var ji=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Mi=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Ni=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Pi=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new ji(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Ni;for(let n of e)Fi(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof ji){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function Fi(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof ji?Li({baseGrammar:a,selfGrammar:i},r):Ii(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new ji(e))}function Ii(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];Ri([r],t,n)}}function Li(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Ri(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Ri(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Ri(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?ri({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Ri(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=Wi(i);switch(a.kind){case 0:Li({...t,selfGrammar:t.baseGrammar},n);break;case 1:Li(t,n);break;case 2:Ii(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?Ii(a.ruleName,i,n):Li(i,n)}else a.kind===4?n.add(new Mi(a.scopeName,a.ruleName)):n.add(new ji(a.scopeName))}}}var zi=class{kind=0},Bi=class{kind=1},Vi=class{constructor(e){this.ruleName=e}kind=2},Hi=class{constructor(e){this.scopeName=e}kind=3},Ui=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Wi(e){if(e===`$base`)return new zi;if(e===`$self`)return new Bi;let t=e.indexOf(`#`);return t===-1?new Hi(e):t===0?new Vi(e.substring(1)):new Ui(e.substring(0,t),e.substring(t+1))}var Gi=/\\(\d+)/,Ki=/\\(\d+)/g,qi=-1,Ji=-2;function Yi(e){return e}function Xi(e){return e}var Zi=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=oi.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=oi.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${ii(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:oi.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:oi.replaceCaptures(this._contentName,e,t)}},Qi=class extends Zi{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},$i=class extends Zi{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new ia(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new aa,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ea=class extends Zi{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new aa,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ta=class extends Zi{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new ia(i,this.id),this.beginCaptures=a,this._end=new ia(o||`￿`,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new aa;for(let t of this.patterns)e.getRule(t).collectPatterns(e,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,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},na=class extends Zi{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new ia(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new ia(o,Ji),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new aa;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new aa,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},ra=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new Qi(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new $i(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=ri({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new ea(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new na(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new ta(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=Wi(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof ea||e instanceof ta||e instanceof na)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},ia=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&Gi.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return Ki.lastIndex=0,this.source.replace(Ki,(e,t)=>ui(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=`￿`,t[i+1]=`￿`,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=`￿`,t[i+1]=`G`,n[i+1]=`￿`,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},aa=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(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new oa(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new oa(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},oa=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
22
- `)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},sa=class{constructor(e,t){this.languageId=e,this.tokenType=t}},ca=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new sa(e,8),this._embeddedLanguagesMatcher=new la(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new sa(0,0);_getBasicScopeAttributes=new di(e=>new sa(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.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 Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},la=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>ui(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var ua=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function da(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=fa(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new ua(i,!0);f()}return new ua(i,!1);function f(){let o=pa(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===qi){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),va(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof ta){let r=o;va(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof na){let r=o;va(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(va(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function fa(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof na&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=_a(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==Ji){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),va(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function pa(e,t,n,r,i,a){let o=ma(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=ha(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function ma(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=ga(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function ha(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=ga(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function ga(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function _a(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function va(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));da(e,p,n&&d.start===0,d.start,f,i,!1,0),Ai(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new ya(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var ya=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function ba(e,t,n,r,i,a,o,s){return new wa(e,t,n,r,i,a,o,s)}function xa(e,t,n,r,i){let a=Di(t,Sa),o=ra.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function Sa(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(Ca(t[r],e))return n=r+1,!0;return!1})}function Ca(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var wa=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new ca(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Ta(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=Di(e,Sa);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)xa(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&xa(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(Yi(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[Xi(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Ta(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=ra.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Da.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=wi.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?Ea.createRootAndLookUpScopeName(a,r,this):Ea.createRoot(`unknown`,r),t=new Da(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
23
- `;let a=this.createOnigString(e),o=a.content.length,s=new ka(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=da(this,a,i,0,t,s,!0,r);return Ai(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Ta(e,t){return e=$r(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Ea=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=pi.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new pi(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new pi(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),wi.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},Da=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t!==null&&e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?Ea.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}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,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:Xi(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=Ea.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,Yi(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Ea.fromExtension(r,n.contentNameScopesList))}},Oa=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):Di(e,Sa).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>Di(e,Sa).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},ka=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=wi.set(n,0,Ti(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=wi.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},Aa=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,ba(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},ja=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new Aa(fi.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(fi.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new Oa(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new Pi(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},Ma=Da.NULL;function Na(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function I(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Pa(e){return Array.isArray(e)?e:[e]}async function Fa(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function Ia(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function La(e){return e===`ansi`||Ia(e)}function Ra(e){return e===`none`}function za(e){return Ra(e)}var Ba=/(\r?\n)/g;function Va(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(Ba),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var Ha={light:`#333333`,dark:`#bbbbbb`},Ua={light:`#fffffe`,dark:`#1e1e1e`},Wa=`__shiki_resolved`;function Ga(e){if(e?.[Wa])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?Ha.light:Ha.dark,n||=t.type===`light`?Ua.light:Ua.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,Wa,{enumerable:!1,writable:!1,value:!0}),t}async function Ka(e){return[...new Set((await Promise.all(e.filter(e=>!La(e)).map(async e=>await Fa(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function qa(e){return(await Promise.all(e.map(async e=>za(e)?null:Ga(await Fa(e))))).filter(e=>!!e)}function Ja(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new P(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var Ya=class extends ja{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=Ga(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=fi.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Ja(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new P(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},Xa=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},Za=0;function Qa(e){Za+=1,e.warnings!==!1&&Za>=10&&Za%10==0&&console.warn(`[Shiki] ${Za} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new P("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Ga),i=new Ya(new Xa(e.engine,n),r,n,e.langAlias),a;function o(t){return Ja(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new P(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new P(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await Ka(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await qa(e))}function g(){if(t)throw new P(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--Za)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function $a(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([qa(e.themes||[]),Ka(e.langs||[]),e.engine]);return Qa({...e,themes:t,langs:n,engine:r})}var eo=new WeakMap;function to(e,t){eo.set(e,t)}function no(e){return eo.get(e)}var ro=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(Pa(n).map(e=>[e,Ma])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return io(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function io(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function ao(e,t){if(!(e instanceof ro))throw new P(`Invalid grammar state`);return e.getInternalStack(t)}var oo=/,/,so=/ /;function co(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(Ia(e.resolveLangAlias(n.lang||`text`))||Ra(r))return Va(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.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(i.name))throw new P(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return uo(t,o,i,a,n)}function lo(...e){if(e.length===2)return no(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(Ia(i)||Ra(a))throw new P(`Plain language does not have grammar state`);if(i===`ansi`)throw new P(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new ro(fo(n,c,o,s,r).stateStack,c.name,o.name)}function uo(e,t,n,r,i){let a=fo(e,t,n,r,i),o=new ro(a.stateStack,t.name,n.name);return to(a.tokens,o),a.tokens}function fo(e,t,n,r,i){let a=Na(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=Va(e),l=i.grammarState?ao(i.grammarState,n.name)??Ma:i.grammarContextCode==null?Ma:fo(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=I(r[wi.getForeground(s)],a),l=wi.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(oo).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(so))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?po(t.scopes):mo(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function po(e){return e.map(e=>({scopeName:e}))}function mo(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:_o(e,i,t.slice(0,r))}}return n}function ho(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function go(e,t,n){if(!ho(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)ho(e[r],n[i])&&--r,--i;return r===-1}function _o(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(go(e,t,n)){r.push(a);break}return r}function vo(e,t,n,r=co){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:no(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=yo(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new ro(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&to(s,c),s}function yo(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var bo=/\s+/g;function xo(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(bo)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(bo);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}var So=/:?lang=["']([^"']+)["']/g,Co=/(?:```|~~~)([\w-]+)/g,wo=/\\begin\{([\w-]+)\}/g,To=/<script\s+(?:type|lang)=["']([^"']+)["']/gi;function Eo(e){let t=Va(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t.at(-1).length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function Do(e,t,n){let r=new Set;for(let t of e.matchAll(So)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(Co)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(wo)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(To)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(!n)return[...r];let i=n.getBundledLanguages();return[...r].filter(e=>e&&i[e])}var Oo=[`color`,`background-color`];function ko(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function Ao(e,t){let n=[...t instanceof Set?t:new Set(t)].sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?ko(e,t):e})):e}function jo(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>Mo(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&Oo.includes(a)){if(r===`light-dark()`&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new P('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[a]=`light-dark(${o[e][a]||`inherit`}, ${o[r][a]||`inherit`})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s}else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function Mo(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&F.Italic&&(t[`font-style`]=`italic`),e.fontStyle&F.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&F.Underline&&n.push(`underline`),e.fontStyle&F.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function No(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function Po(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=Eo(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new P(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...n.indexToPos(e),offset:e}}{let t=n.lines[e.line];if(t===void 0)throw new P(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${n.lines.length}`);let r=e.character;if(r<0&&(r=t.length+r),r<0||r>t.length)throw new P(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:r,offset:n.posToIndex(e.line,r)}}}let i=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));Fo(i),e.set(t.meta,{decorations:i,converter:n,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return Ao(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=[...e.children].filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new P(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=Io(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new P(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new P(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&xo(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function Fo(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new P(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new P(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function Io(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(Io).join(``):``}var Lo=[Po()];function Ro(e){let t=zo(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...Lo]}function zo(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var Bo=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],Vo={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function Ho(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function Uo(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function Wo(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r)){if(r===0)t.push({type:`resetAll`});else if(r<=9)Vo[r]&&t.push({type:`setDecoration`,value:Vo[r]});else if(r<=29){let e=Vo[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:Bo[r-30]}});else if(r===38){let n=Uo(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:Bo[r-40]}});else if(r===48){let n=Uo(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:Bo[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:Bo[r-100+8]}})}}return t}function Go(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=Ho(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=Wo(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var Ko={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 qo(e=Ko){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<Bo.length;e++)r.push(t(Bo[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var Jo=/#([0-9a-f]{3,8})/i,Yo=/var\((--[\w-]+-ansi-[\w-]+)\)/,Xo={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 Zo(e,t,n){let r=Na(e,n),i=Va(t),a=qo(Object.fromEntries(Bo.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||Xo[t]]}))),o=Go();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=I(i,r),o=I(o,r),n.decorations.has(`dim`)&&(i=Qo(i));let s=F.None;return n.decorations.has(`bold`)&&(s|=F.Bold),n.decorations.has(`italic`)&&(s|=F.Italic),n.decorations.has(`underline`)&&(s|=F.Underline),n.decorations.has(`strikethrough`)&&(s|=F.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function Qo(e){let t=e.match(Jo);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}if(e.length===6)return`#${e}80`;if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(Yo);return n?`var(${n[1]}-dim)`:e}function $o(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!Ia(r)&&!Ra(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return Zo(r,t,n)}return co(e,t,n)}function es(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new P("`themes` option must not be empty");let p=vo(e,t,n,$o);if(c=no(p),l&&l!==`light-dark()`&&!f.some(e=>e.color===l))throw new P(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>jo(e,h,u,l,d))),c&&to(a,c);let g=f.map(e=>Na(e.theme,n));i=ts(f,m,g,u,l,`fg`,d),r=ts(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=Na(n.theme,n);a=$o(e,t,n);let l=e.getTheme(n.theme);r=I(l.bg,s),i=I(l.fg,s),o=l.name,c=no(a)}else throw new P("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function ts(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=I(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===`light-dark()`&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new P('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${I(t[r][a],n[r])||`inherit`}, ${I(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}var ns=/^\s+$/,rs=/^(\s*)(.*?)(\s*)$/;function is(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>is(e,t,n),codeToTokens:(t,n)=>es(e,t,n)}){let i=t;for(let e of Ro(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=es(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=os(a):d===`never`&&(a=ss(a)),f&&(a=cs(a));let p={...r,get source(){return i}};for(let e of Ro(n))a=e.tokens?.call(p,a)||a;return as(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function as(e,t,n,r=no(e)){let i=Ro(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(l.style=t.rootStyle==null?`background-color:${t.bg};color:${t.fg}`:t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:xo,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
24
- `}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=No(a.htmlStyle||Mo(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&to(m,r),m}function os(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&F.Underline||i.fontStyle&F.Strikethrough));o&&ns.test(i.content)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function ss(e){return e.map(e=>e.flatMap(e=>{if(ns.test(e.content))return e;let t=e.content.match(rs);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function cs(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t.at(-1),r=No(e.htmlStyle||Mo(e)),i=No(n.htmlStyle||Mo(n)),a=e.fontStyle&&(e.fontStyle&F.Underline||e.fontStyle&F.Strikethrough),o=n.fontStyle&&(n.fontStyle&F.Underline||n.fontStyle&F.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var ls=ir;function us(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>is(e,t,n),codeToTokens:(t,n)=>es(e,t,n)},i=ls(is(e,t,n,r));for(let e of Ro(n))i=e.postprocess?.call(r,i,n)||i;return i}async function ds(e){let t=await $a(e);return{getLastGrammarState:(...e)=>lo(t,...e),codeToTokensBase:(e,n)=>$o(t,e,n),codeToTokensWithThemes:(e,n)=>vo(t,e,n),codeToTokens:(e,n)=>es(t,e,n),codeToHast:(e,n)=>is(t,e,n),codeToHtml:(e,n)=>us(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function fs(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,La(n))return[];let r=t[n];if(!r)throw new P(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(za(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new P(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await ds({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function ps(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function ms(e,t){let n=ps(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var hs=fs({langs:Cr,themes:wr,engine:()=>(0,Qr.createOnigurumaEngine)(i(()=>import(`./wasm-BnjxR4X6.js`),[]))}),{codeToHtml:gs,codeToHast:_s,codeToTokens:vs,codeToTokensBase:ys,codeToTokensWithThemes:bs,getSingletonHighlighter:xs,getLastGrammarState:Ss}=ms(hs,{guessEmbeddedLanguages:Do}),Cs=4294967295,ws=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if(typeof e!=`string`)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}findNextMatchSync(e,t,n){let r=typeof e==`string`?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>e==null?{start:Cs,end:Cs,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(r);if(!o)continue;if(o.index===t)return a(e,o,0);i.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}};function Ts(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function Es(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var Ds=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),L=String.raw;function Os(e,t){if(e==null)throw Error(t??`Value expected`);return e}var ks=L`\[\^?`,As=`c.? | C(?:-.?)?|${L`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${L`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${L`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${L`o\{[^\}]*\}?`}|${L`\d{1,3}`}`,js=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Ms=new RegExp(L`
25
- \\ (?:
26
- ${As}
27
- | [gk]<[^>]*>?
28
- | [gk]'[^']*'?
29
- | .
30
- )
31
- | \( (?:
32
- \? (?:
33
- [:=!>({]
34
- | <[=!]
35
- | <[^>]*>
36
- | '[^']*'
37
- | ~\|?
38
- | #(?:[^)\\]|\\.?)*
39
- | [^:)]*[:)]
40
- )?
41
- | \*[^\)]*\)?
42
- )?
43
- | (?:${js.source})+
44
- | ${ks}
45
- | .
46
- `.replace(/\s+/g,``),`gsu`),Ns=new RegExp(L`
47
- \\ (?:
48
- ${As}
49
- | .
50
- )
51
- | \[:(?:\^?\p{Alpha}+|\^):\]
52
- | ${ks}
53
- | &&
54
- | .
55
- `.replace(/\s+/g,``),`gsu`);function Ps(e,t={}){let n={flags:``,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!=`string`)throw Error(`String expected as pattern`);let r=lc(n.flags),i=[r.extended],a={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(e){i.push(e)},replaceCurrentModX(e){i[i.length-1]=e},singleline:n.rules.singleline},o=[],s;for(Ms.lastIndex=0;s=Ms.exec(e);){let t=Fs(a,e,s[0],Ms.lastIndex);t.tokens?o.push(...t.tokens):t.token&&o.push(t.token),t.lastIndex!==void 0&&(Ms.lastIndex=t.lastIndex)}let c=[],l=0;o.filter(e=>e.type===`GroupOpen`).forEach(e=>{e.kind===`capturing`?e.number=++l:e.raw===`(`&&c.push(e)}),l||c.forEach((e,t)=>{e.kind=`capturing`,e.number=t+1});let u=l||c.length;return{tokens:o.map(e=>e.type===`EscapedNumber`?dc(e,u):e).flat(),flags:r}}function Fs(e,t,n,r){let[i,a]=n;if(n===`[`||n===`[^`){let e=Is(t,n,r);return{tokens:e.tokens,lastIndex:e.lastIndex}}if(i===`\\`){if(`AbBGyYzZ`.includes(a))return{token:Bs(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:$s(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:Vs(n)}}if(a===`K`)return{token:qs(`keep`,n)};if(a===`N`||a===`R`)return{token:Ks(`newline`,n,{negate:a===`N`})};if(a===`O`)return{token:Ks(`any`,n)};if(a===`X`)return{token:Ks(`text_segment`,n)};let e=Rs(n,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if(i===`(`){if(a===`*`)return{token:ic(n)};if(n===`(?{`)throw Error(`Unsupported callout "${n}"`);if(n.startsWith(`(?#`)){if(t[r]!==`)`)throw Error(`Unclosed comment group "(?#"`);return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:rc(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n===`(`&&!e.captureGroup||n===`(?:`)return{token:Xs(`group`,n)};if(n===`(?>`)return{token:Xs(`atomic`,n)};if(n===`(?=`||n===`(?!`||n===`(?<=`||n===`(?<!`)return{token:Xs(n[2]===`<`?`lookbehind`:`lookahead`,n,{negate:n.endsWith(`!`)})};if(n===`(`&&e.captureGroup||n.startsWith(`(?<`)&&n.endsWith(`>`)||n.startsWith(`(?'`)&&n.endsWith(`'`))return{token:Xs(`capturing`,n,{...n!==`(`&&{name:n.slice(3,-1)}})};if(n.startsWith(`(?~`)){if(n===`(?~|`)throw Error(`Unsupported absence function kind "${n}"`);return{token:Xs(`absence_repeater`,n)}}throw Error(n===`(?(`?`Unsupported conditional "${n}"`:`Invalid or unsupported group option "${n}"`)}if(n===`)`){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error(`Unmatched ")"`);return{token:Ys(n)}}if(e.getCurrentModX()){if(n===`#`){let e=t.indexOf(`
56
- `,r);return{lastIndex:e===-1?t.length:e}}if(/^\s$/.test(n)){let e=/\s+/y;return e.lastIndex=r,{lastIndex:e.exec(t)?e.lastIndex:r}}}return n===`.`?{token:Ks(`dot`,n)}:n===`^`||n===`$`?{token:Bs(e.singleline?{"^":L`\A`,$:L`\Z`}[n]:n,n)}:n===`|`?{token:zs(n)}:js.test(n)?{tokens:fc(n)}:{token:R(Ts(n),n)}}function Is(e,t,n){let r=[Gs(t[1]===`^`,t)],i=1,a;for(Ns.lastIndex=n;a=Ns.exec(e);){let e=a[0];if(e[0]===`[`&&e[1]!==`:`)i++,r.push(Gs(e[1]===`^`,e));else if(e===`]`){if(r.at(-1).type===`CharacterClassOpen`)r.push(R(93,e));else if(i--,r.push(Hs(e)),!i)break}else{let t=Ls(e);Array.isArray(t)?r.push(...t):r.push(t)}}return{tokens:r,lastIndex:Ns.lastIndex||e.length}}function Ls(e){if(e[0]===`\\`)return Rs(e,{inCharClass:!0});if(e[0]===`[`){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!Ds.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return Ks(`posix`,e,{value:t.groups.name,negate:!!t.groups.negate})}return e===`-`?Us(e):e===`&&`?Ws(e):R(Ts(e),e)}function Rs(e,{inCharClass:t}){let n=e[1];if(n===`c`||n===`C`)return nc(e);if(`dDhHsSwW`.includes(n))return oc(e);if(e.startsWith(L`\o{`))throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw Error(`Incomplete or invalid Unicode property "${e}"`);return sc(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let t=e.split(/\\x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),r=new TextEncoder;return[...n].map(e=>{let t=[...r.encode(e)].map(e=>`\\x${e.toString(16)}`).join(``);return R(Ts(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n===`u`||n===`x`)return R(uc(e),e);if(tc.has(n))return R(tc.get(n),e);if(/\d/.test(n))return Js(t,e);if(e===`\\`)throw Error(L`Incomplete escape "\"`);if(n===`M`)throw Error(`Unsupported meta "${e}"`);if([...e].length===2)return R(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function zs(e){return{type:`Alternator`,raw:e}}function Bs(e,t){return{type:`Assertion`,kind:e,raw:t}}function Vs(e){return{type:`Backreference`,raw:e}}function R(e,t){return{type:`Character`,value:e,raw:t}}function Hs(e){return{type:`CharacterClassClose`,raw:e}}function Us(e){return{type:`CharacterClassHyphen`,raw:e}}function Ws(e){return{type:`CharacterClassIntersector`,raw:e}}function Gs(e,t){return{type:`CharacterClassOpen`,negate:e,raw:t}}function Ks(e,t,n={}){return{type:`CharacterSet`,kind:e,...n,raw:t}}function qs(e,t,n={}){return e===`keep`?{type:`Directive`,kind:e,raw:t}:{type:`Directive`,kind:e,flags:Os(n.flags),raw:t}}function Js(e,t){return{type:`EscapedNumber`,inCharClass:e,raw:t}}function Ys(e){return{type:`GroupClose`,raw:e}}function Xs(e,t,n={}){return{type:`GroupOpen`,kind:e,...n,raw:t}}function Zs(e,t,n,r){return{type:`NamedCallout`,kind:e,tag:t,arguments:n,raw:r}}function Qs(e,t,n,r){return{type:`Quantifier`,kind:e,min:t,max:n,raw:r}}function $s(e){return{type:`Subroutine`,raw:e}}var ec=new Set([`COUNT`,`CMP`,`ERROR`,`FAIL`,`MAX`,`MISMATCH`,`SKIP`,`TOTAL_COUNT`]),tc=new Map([[`a`,7],[`b`,8],[`e`,27],[`f`,12],[`n`,10],[`r`,13],[`t`,9],[`v`,11]]);function nc(e){let t=e[1]===`c`?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${e}"`);return R(Ts(t.toUpperCase())-64,e)}function rc(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??=``;let i=(t.getCurrentModX()||n.includes(`x`))&&!r.includes(`x`),a=cc(n),o=cc(r),s={};if(a&&(s.enable=a),o&&(s.disable=o),e.endsWith(`)`))return t.replaceCurrentModX(i),qs(`flags`,e,{flags:s});if(e.endsWith(`:`))return t.pushModX(i),t.numOpenGroups++,Xs(`group`,e,{...(a||o)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}function ic(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout "${e}"`);let{name:n,tag:r,args:i}=t.groups;if(!n)throw Error(`Invalid named callout "${e}"`);if(r===``)throw Error(`Named callout tag with empty value not allowed "${e}"`);let a=i?i.split(`,`).filter(e=>e!==``).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[o,s,c]=a,l=ec.has(n)?n.toLowerCase():`custom`;switch(l){case`fail`:case`mismatch`:case`skip`:if(a.length>0)throw Error(`Named callout arguments not allowed "${a}"`);break;case`error`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(typeof o==`string`)throw Error(`Named callout argument must be a number "${o}"`);break;case`max`:if(!a.length||a.length>2)throw Error(`Named callout must have one or two arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(a.length===2&&(typeof s==`number`||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${s}"`);break;case`count`:case`total_count`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(a.length===1&&(typeof o==`number`||!/^[<>X]$/.test(o)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case`cmp`:if(a.length!==3)throw Error(`Named callout must have three arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(typeof s==`number`||!/^(?:[<>!=]=|[<>])$/.test(s))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${s}"`);if(typeof c==`string`&&!/^[A-Za-z_]\w*$/.test(c))throw Error(`Named callout argument three must be a tag or number "${c}"`);break;case`custom`:throw Error(`Undefined callout name "${n}"`);default:throw Error(`Unexpected named callout kind "${l}"`)}return Zs(l,r??null,i?.split(`,`)??null,e)}function ac(e){let t=null,n,r;if(e[0]===`{`){let{minStr:i,maxStr:a}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,o=1e5;if(+i>o||a&&+a>o)throw Error(`Quantifier value unsupported in Oniguruma`);if(n=+i,r=a===void 0?+i:a===``?1/0:+a,n>r&&(t=`possessive`,[n,r]=[r,n]),e.endsWith(`?`)){if(t===`possessive`)throw Error(`Unsupported possessive interval quantifier chain with "?"`);t=`lazy`}else t||=`greedy`}else n=+(e[0]===`+`),r=e[0]===`?`?1:1/0,t=e[1]===`+`?`possessive`:e[1]===`?`?`lazy`:`greedy`;return Qs(t,n,r,e)}function oc(e){let t=e[1].toLowerCase();return Ks({d:`digit`,h:`hex`,s:`space`,w:`word`}[t],e,{negate:e[1]!==t})}function sc(e){let{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return Ks(`property`,e,{value:r,negate:t===`P`&&!n||t===`p`&&!!n})}function cc(e){let t={};return e.includes(`i`)&&(t.ignoreCase=!0),e.includes(`m`)&&(t.dotAll=!0),e.includes(`x`)&&(t.extended=!0),Object.keys(t).length?t:null}function lc(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){let r=e[n];if(!`imxDPSWy`.includes(r))throw Error(`Invalid flag "${r}"`);if(r===`y`){if(!/^y{[gw]}/.test(e.slice(n)))throw Error(`Invalid or unspecified flag "y" mode`);t.textSegmentMode=e[n+2]===`g`?`grapheme`:`word`,n+=3;continue}t[{i:`ignoreCase`,m:`dotAll`,x:`extended`,D:`digitIsAscii`,P:`posixIsAscii`,S:`spaceIsAscii`,W:`wordIsAscii`}[r]]=!0}return t}function uc(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw Error(`Incomplete or invalid escape "${e}"`);let t=e[2]===`{`?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function dc(e,t){let{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!==`0`&&i.length===1||i[0]!==`0`&&+i<=t))return[Vs(n)];let a=[],o=i.match(/^[0-7]+|\d/g);for(let e=0;e<o.length;e++){let t=o[e],r;if(e===0&&t!==`8`&&t!==`9`){if(r=parseInt(t,8),r>127)throw Error(L`Octal encoded byte above 177 unsupported "${n}"`)}else r=Ts(t);a.push(R(r,(e===0?`\\`:``)+t))}return a}function fc(e){let t=[],n=new RegExp(js,`gy`),r;for(;r=n.exec(e);){let e=r[0];if(e[0]===`{`){let r=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(r){let{min:i,max:a}=r.groups;if(+i>+a&&e.endsWith(`?`)){n.lastIndex--,t.push(ac(e.slice(0,-1)));continue}}}t.push(ac(e))}return t}function pc(e,t){if(!Array.isArray(e.body))throw Error(`Expected node with body array`);if(e.body.length!==1)return!1;let n=e.body[0];return!t||Object.keys(t).every(e=>t[e]===n[e])}function mc(e){return hc.has(e.type)}var hc=new Set([`AbsenceFunction`,`Backreference`,`CapturingGroup`,`Character`,`CharacterClass`,`CharacterSet`,`Group`,`Quantifier`,`Subroutine`]);function gc(e,t={}){let n={flags:``,normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=Ps(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(e,t)=>{let n=r.tokens[a.nextIndex];switch(a.parent=e,a.nextIndex++,n.type){case`Alternator`:return Ec();case`Assertion`:return _c(n);case`Backreference`:return vc(n,a);case`Character`:return Ac(n.value,{useLastValid:!!t.isCheckingRangeEnd});case`CharacterClassHyphen`:return yc(n,a,t);case`CharacterClassOpen`:return bc(n,a,t);case`CharacterSet`:return xc(n,a);case`Directive`:return Pc(n.kind,{flags:n.flags});case`GroupOpen`:return Sc(n,a,t);case`NamedCallout`:return Lc(n.kind,n.tag,n.arguments);case`Quantifier`:return Cc(n,a);case`Subroutine`:return wc(n,a);default:throw Error(`Unexpected token type "${n.type}"`)}},a={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},o=Bc(Fc(r.flags)),s=o.body[0];for(;a.nextIndex<r.tokens.length;){let e=i(s,{});e.type===`Alternative`?(o.body.push(e),s=e):s.body.push(e)}let{capturingGroups:c,hasNumberedRef:l,namedGroupsByName:u,subroutines:d}=a;if(l&&u.size&&!n.rules.captureGroup)throw Error(`Numbered backref/subroutine not allowed when using named capture`);for(let{ref:e}of d)if(typeof e==`number`){if(e>c.length)throw Error(`Subroutine uses a group number that's not defined`);e&&(c[e-1].isSubroutined=!0)}else if(u.has(e)){if(u.get(e).length>1)throw Error(L`Subroutine uses a duplicate group name "\g<${e}>"`);u.get(e)[0].isSubroutined=!0}else throw Error(L`Subroutine uses a group name that's not defined "\g<${e}>"`);return o}function _c({kind:e}){return Dc(Os({"^":`line_start`,$:`line_end`,"\\A":`string_start`,"\\b":`word_boundary`,"\\B":`word_boundary`,"\\G":`search_start`,"\\y":`text_segment_boundary`,"\\Y":`text_segment_boundary`,"\\z":`string_end`,"\\Z":`string_end_newline`}[e],`Unexpected assertion kind "${e}"`),{negate:e===L`\B`||e===L`\Y`})}function vc({raw:e},t){let n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(n,r=!1)=>{let i=t.capturingGroups.length,a=!1;if(n>i){if(t.skipBackrefValidation)a=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`)}return t.hasNumberedRef=!0,Oc(r?i+1-n:n,{orphan:a})};if(n){let n=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(n)return i(+n.groups.num,!!n.groups.sign);if(/[-+]/.test(r))throw Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw Error(`Group name not defined to the left "${e}"`);return Oc(r)}return i(+r)}function yc(e,t,n){let{tokens:r,walk:i}=t,a=t.parent,o=a.body.at(-1),s=r[t.nextIndex];if(!n.isCheckingRangeEnd&&o&&o.type!==`CharacterClass`&&o.type!==`CharacterClassRange`&&s&&s.type!==`CharacterClassOpen`&&s.type!==`CharacterClassClose`&&s.type!==`CharacterClassIntersector`){let e=i(a,{...n,isCheckingRangeEnd:!0});if(o.type===`Character`&&e.type===`Character`)return a.body.pop(),Mc(o,e);throw Error(`Invalid character class range`)}return Ac(Ts(`-`))}function bc({negate:e},t,n){let{tokens:r,walk:i}=t,a=[jc()],o=r[t.nextIndex],s=Zc(o);for(;s.type!==`CharacterClassClose`;){if(s.type===`CharacterClassIntersector`)a.push(jc()),t.nextIndex++;else{let e=a.at(-1);e.body.push(i(e,n))}s=Zc(r[t.nextIndex],o)}let c=jc({negate:e});return a.length===1?c.body=a[0].body:(c.kind=`intersection`,c.body=a.map(e=>e.body.length===1?e.body[0]:e)),t.nextIndex++,c}function xc({kind:e,negate:t,value:n},r){let{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o}=r;if(e===`property`){let r=Xc(n);if(Ds.has(r)&&!o?.has(r))e=`posix`,n=r;else return Hc(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o})}return e===`posix`?Rc(n,{negate:t}):Nc(e,{negate:t})}function Sc(e,t,n){let{tokens:r,capturingGroups:i,namedGroupsByName:a,skipLookbehindValidation:o,walk:s}=t,c=Uc(e),l=c.type===`AbsenceFunction`,u=qc(c),d=u&&c.negate;if(c.type===`CapturingGroup`&&(i.push(c),c.name&&Es(a,c.name,[]).push(c)),l&&n.isInAbsenceFunction)throw Error(`Nested absence function not supported by Oniguruma`);let f=Qc(r[t.nextIndex]);for(;f.type!==`GroupClose`;){if(f.type===`Alternator`)c.body.push(Ec()),t.nextIndex++;else{let e=c.body.at(-1),t=s(e,{...n,isInAbsenceFunction:n.isInAbsenceFunction||l,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||d});if(e.body.push(t),(u||n.isInLookbehind)&&!o){let e=`Lookbehind includes a pattern not allowed by Oniguruma`;if(d||n.isInNegLookbehind){if(Kc(t)||t.type===`CapturingGroup`)throw Error(e)}else if(Kc(t)||qc(t)&&t.negate)throw Error(e)}}f=Qc(r[t.nextIndex])}return t.nextIndex++,c}function Cc({kind:e,min:t,max:n},r){let i=r.parent,a=i.body.at(-1);if(!a||!mc(a))throw Error(`Quantifier requires a repeatable token`);let o=zc(e,t,n,a);return i.body.pop(),o}function wc({raw:e},t){let{capturingGroups:n,subroutines:r}=t,i=e.slice(3,-1),a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(a){let e=+a.groups.num,r=n.length;if(t.hasNumberedRef=!0,i={"":e,"+":r+e,"-":r+1-e}[a.groups.sign],i<1)throw Error(`Invalid subroutine number`)}else i===`0`&&(i=0);let o=Vc(i);return r.push(o),o}function Tc(e,t){if(e!==`repeater`)throw Error(`Unexpected absence function kind "${e}"`);return{type:`AbsenceFunction`,kind:e,body:Wc(t?.body)}}function Ec(e){return{type:`Alternative`,body:Gc(e?.body)}}function Dc(e,t){let n={type:`Assertion`,kind:e};return(e===`word_boundary`||e===`text_segment_boundary`)&&(n.negate=!!t?.negate),n}function Oc(e,t){let n=!!t?.orphan;return{type:`Backreference`,ref:e,...n&&{orphan:n}}}function kc(e,t){let n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!Jc(n.name))throw Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:`CapturingGroup`,number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:Wc(t?.body)}}function Ac(e,t){let n={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(n.useLastValid)e=1114111;else throw Error(e>1310719?`Invalid code point out of range "\\x{${t}}"`:`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:`Character`,value:e}}function jc(e){let t={kind:`union`,negate:!1,...e};return{type:`CharacterClass`,kind:t.kind,negate:t.negate,body:Gc(e?.body)}}function Mc(e,t){if(t.value<e.value)throw Error(`Character class range out of order`);return{type:`CharacterClassRange`,min:e,max:t}}function Nc(e,t){let n=!!t?.negate,r={type:`CharacterSet`,kind:e};return(e===`digit`||e===`hex`||e===`newline`||e===`space`||e===`word`)&&(r.negate=n),(e===`text_segment`||e===`newline`&&!n)&&(r.variableLength=!0),r}function Pc(e,t={}){if(e===`keep`)return{type:`Directive`,kind:e};if(e===`flags`)return{type:`Directive`,kind:e,flags:Os(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}function Fc(e){return{type:`Flags`,...e}}function z(e){let t=e?.atomic,n=e?.flags;if(t&&n)throw Error(`Atomic group cannot have flags`);return{type:`Group`,...t&&{atomic:t},...n&&{flags:n},body:Wc(e?.body)}}function Ic(e){let t={behind:!1,negate:!1,...e};return{type:`LookaroundAssertion`,kind:t.behind?`lookbehind`:`lookahead`,negate:t.negate,body:Wc(e?.body)}}function Lc(e,t,n){return{type:`NamedCallout`,kind:e,tag:t,arguments:n}}function Rc(e,t){let n=!!t?.negate;if(!Ds.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:`CharacterSet`,kind:`posix`,value:e,negate:n}}function zc(e,t,n,r){if(t>n)throw Error(`Invalid reversed quantifier range`);return{type:`Quantifier`,kind:e,min:t,max:n,body:r}}function Bc(e,t){return{type:`Regex`,body:Wc(t?.body),flags:e}}function Vc(e){return{type:`Subroutine`,ref:e}}function Hc(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},r=n.unicodePropertyMap?.get(Xc(e));if(!r){if(n.normalizeUnknownPropertyNames)r=Yc(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(L`Invalid Unicode property "\p{${e}}"`)}return{type:`CharacterSet`,kind:`property`,value:r??e,negate:n.negate}}function Uc({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case`absence_repeater`:return Tc(`repeater`);case`atomic`:return z({atomic:!0});case`capturing`:return kc(i,{name:n});case`group`:return z({flags:e});case`lookahead`:case`lookbehind`:return Ic({behind:t===`lookbehind`,negate:r});default:throw Error(`Unexpected group kind "${t}"`)}}function Wc(e){if(e===void 0)e=[Ec()];else if(!Array.isArray(e)||!e.length||!e.every(e=>e.type===`Alternative`))throw Error(`Invalid body; expected array of one or more Alternative nodes`);return e}function Gc(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error(`Invalid body; expected array of nodes`);return e}function Kc(e){return e.type===`LookaroundAssertion`&&e.kind===`lookahead`}function qc(e){return e.type===`LookaroundAssertion`&&e.kind===`lookbehind`}function Jc(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function Yc(e){return e.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 Xc(e){return e.replace(/[- _]+/g,``).toLowerCase()}function Zc(e,t){let n=t;return Os(e,`Unclosed character class${n?.type===`Character`&&n.value===93&&n.raw===`]`?` (started with "]")`:``}`)}function Qc(e){return Os(e,`Unclosed group`)}function $c(e,t,n=null){function r(e,t){for(let n=0;n<e.length;n++){let r=i(e[n],t,n,e);n=Math.max(-1,n+r)}}function i(a,o=null,s=null,c=null){let l=0,u=!1,d={node:a,parent:o,key:s,container:c,root:e,remove(){el(c).splice(Math.max(0,tl(s)+l),1),l--,u=!0},removeAllNextSiblings(){return el(c).splice(tl(s)+1)},removeAllPrevSiblings(){let e=tl(s)+l;return l-=e,el(c).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;c?c[Math.max(0,tl(s)+l)]=e:Os(o,`Can't replace root node`)[s]=e,n&&i(e,o,s,c),u=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(el(c).splice(Math.max(0,tl(s)+l),1,...e),l+=e.length-1,n){let t=0;for(let n=0;n<e.length;n++)t+=i(e[n],o,tl(s)+n+t,c)}u=!0},skip(){u=!0}},{type:f}=a,p=t[`*`],m=t[f],h=typeof p==`function`?p:p?.enter,g=typeof m==`function`?m:m?.enter;if(h?.(d,n),g?.(d,n),!u)switch(f){case`AbsenceFunction`:case`Alternative`:case`CapturingGroup`:case`CharacterClass`:case`Group`:case`LookaroundAssertion`:r(a.body,a);break;case`Assertion`:case`Backreference`:case`Character`:case`CharacterSet`:case`Directive`:case`Flags`:case`NamedCallout`:case`Subroutine`:break;case`CharacterClassRange`:i(a.min,a,`min`),i(a.max,a,`max`);break;case`Quantifier`:i(a.body,a,`body`);break;case`Regex`:r(a.body,a),i(a.flags,a,`flags`);break;default:throw Error(`Unexpected node type "${f}"`)}return m?.exit?.(d,n),p?.exit?.(d,n),l}return i(e),e}function el(e){if(!Array.isArray(e))throw Error(`Container expected`);return e}function tl(e){if(typeof e!=`number`)throw Error(`Numeric key expected`);return e}var nl=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function rl(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function il(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}var B=Object.freeze({DEFAULT:`DEFAULT`,CHAR_CLASS:`CHAR_CLASS`});function al(e,t,n,r){let i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,`gsu`),a=[!1],o=0,s=``;for(let t of e.matchAll(i)){let{0:e,groups:{$skip:i}}=t;if(!i&&(!r||r===B.DEFAULT==!o)){n instanceof Function?s+=n(t,{context:o?B.CHAR_CLASS:B.DEFAULT,negated:a[a.length-1]}):s+=n;continue}e[0]===`[`?(o++,a.push(e[1]===`^`)):e===`]`&&o&&(o--,a.pop()),s+=e}return s}function ol(e,t,n,r){al(e,t,n,r)}function sl(e,t,n=0,r){if(!new RegExp(t,`su`).test(e))return null;let i=RegExp(`${t}|(?<$skip>\\\\?.)`,`gsu`);i.lastIndex=n;let a=0,o;for(;o=i.exec(e);){let{0:e,groups:{$skip:t}}=o;if(!t&&(!r||r===B.DEFAULT==!a))return o;e===`[`?a++:e===`]`&&a&&a--,i.lastIndex==o.index&&i.lastIndex++}return null}function cl(e,t,n){return!!sl(e,t,0,n)}function ll(e,t){let n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,a=1,o;for(;o=n.exec(e);){let[e]=o;if(e===`[`)i++;else if(i)e===`]`&&i--;else if(e===`(`)a++;else if(e===`)`&&(a--,!a)){r=o.index;break}}return e.slice(t,r)}var ul=new RegExp(String.raw`(?<noncapturingStart>${nl})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,`gsu`);function dl(e,t){let n=t?.hiddenCaptures??[],r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};let i=[0],a=[],o=0,s=0,c=NaN,l;do{l=!1;let t=0,u=0,d=!1,f;for(ul.lastIndex=Number.isNaN(c)?0:c+7;f=ul.exec(e);){let{0:p,index:m,groups:{capturingStart:h,noncapturingStart:g}}=f;if(p===`[`)t++;else if(t)p===`]`&&t--;else if(p===`(?>`&&!d)c=m,d=!0;else if(d&&g)u++;else if(h)d?u++:(o++,i.push(o+s));else if(p===`)`&&d){if(!u){s++;let t=o+s;if(e=`${e.slice(0,c)}(?:(?=(${e.slice(c+3,m)}))<$$${t}>)${e.slice(m+1)}`,l=!0,a.push(t),rl(n,t),r.size){let e=new Map;r.forEach((n,r)=>{e.set(r>=t?r+1:r,n.map(e=>e>=t?e+1:e))}),r=e}break}u--}}}while(l);return n.push(...a),e=al(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:n}})=>{if(t){let n=+t;if(n>i.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${i[n]}`}return`\\${n}`},B.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}var fl=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,pl=new RegExp(String.raw`
57
- \\(?: \d+
58
- | c[A-Za-z]
59
- | [gk]<[^>]+>
60
- | [pPu]\{[^\}]+\}
61
- | u[A-Fa-f\d]{4}
62
- | x[A-Fa-f\d]{2}
63
- )
64
- | \((?: \? (?: [:=!>]
65
- | <(?:[=!]|[^>]+>)
66
- | [A-Za-z\-]+:
67
- | \(DEFINE\)
68
- ))?
69
- | (?<qBase>${fl})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
70
- | \\?.
71
- `.replace(/\s+/g,``),`gsu`);function ml(e){if(!RegExp(`${fl}\\+`).test(e))return{pattern:e};let t=[],n=null,r=null,i=``,a=0,o;for(pl.lastIndex=0;o=pl.exec(e);){let{0:s,index:c,groups:{qBase:l,qMod:u,invalidQ:d}}=o;if(s===`[`)a||(r=c),a++;else if(s===`]`)a?a--:r=null;else if(!a){if(u===`+`&&i&&!i.startsWith(`(`)){if(d)throw Error(`Invalid quantifier "${s}"`);let t=-1;if(/^\{\d+\}$/.test(l))e=il(e,c+l.length,u,``);else{if(i===`)`||i===`]`){let t=i===`)`?n:r;if(t===null)throw Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,t)}(?>${e.slice(t,c)}${l})${e.slice(c+s.length)}`}else e=`${e.slice(0,c-i.length)}(?>${i}${l})${e.slice(c+s.length)}`;t+=4}pl.lastIndex+=t}else s[0]===`(`?t.push(c):s===`)`&&(n=t.length?t.pop():null)}i=s}return{pattern:e}}var V=String.raw,hl=V`\(\?R=(?<rDepth>[^\)]+)\)|${V`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`}`,gl=V`\(\?<(?![=!])(?<captureName>[^>]+)>`,_l=V`${gl}|(?<unnamed>\()(?!\?)`,vl=new RegExp(V`${gl}|${hl}|\(\?|\\?.`,`gsu`),yl=`Cannot use multiple overlapping recursions`;function bl(e,t){let{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:`plugin`,...t},i=t?.captureTransfers??new Map;if(!new RegExp(hl,`su`).test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r===`plugin`&&cl(e,V`\(\?\(DEFINE\)`,B.DEFAULT))throw Error(`DEFINE groups cannot be used with recursion`);let a=[],o=cl(e,V`\\[1-9]`,B.DEFAULT),s=new Map,c=[],l=!1,u=0,d=0,f;for(vl.lastIndex=0;f=vl.exec(e);){let{0:t,groups:{captureName:p,rDepth:m,gRNameOrNum:h,gRDepth:g}}=f;if(t===`[`)u++;else if(u)t===`]`&&u--;else{if(m){if(xl(m),l)throw Error(yl);if(o)throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with global recursion`);let t=e.slice(0,f.index),s=e.slice(vl.lastIndex);if(cl(s,hl,B.DEFAULT))throw Error(yl);let c=m-1;e=Sl(t,s,c,!1,n,a,d),i=Tl(i,t,c,a.length,0,d);break}if(h){xl(g);let u=!1;for(let e of c)if(e.name===h||e.num===+h){if(u=!0,e.hasRecursedWithin)throw Error(yl);break}if(!u)throw Error(V`Recursive \g cannot be used outside the referenced group "${r===`external`?h:V`\g<${h}&R=${g}>`}"`);let p=s.get(h),m=ll(e,p);if(o&&cl(m,V`${gl}|\((?!\?)`,B.DEFAULT))throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with recursion of capturing groups`);let _=e.slice(p,f.index),v=m.slice(_.length+t.length),y=a.length,b=g-1,x=Sl(_,v,b,!0,n,a,d);i=Tl(i,_,b,a.length-y,y,d),e=`${e.slice(0,p)}${x}${e.slice(p+m.length)}`,vl.lastIndex+=x.length-t.length-_.length-v.length,c.forEach(e=>e.hasRecursedWithin=!0),l=!0}else if(p)d++,s.set(String(d),vl.lastIndex),s.set(p,vl.lastIndex),c.push({num:d,name:p});else if(t[0]===`(`){let e=t===`(`;e&&(d++,s.set(String(d),vl.lastIndex)),c.push(e?{num:d}:{})}else t===`)`&&c.pop()}}return n.push(...a),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function xl(e){let t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e)||(e=+e,e<2||e>100))throw Error(t)}function Sl(e,t,n,r,i,a,o){let s=new Set;r&&ol(e+t,gl,({groups:{captureName:e}})=>{s.add(e)},B.DEFAULT);let c=[n,r?s:null,i,a,o];return`${e}${Cl(`(?:${e}`,`forward`,...c)}(?:)${Cl(`${t})`,`backward`,...c)}${t}`}function Cl(e,t,n,r,i,a,o){let s=e=>t===`forward`?e+2:n-e+2-1,c=``;for(let t=0;t<n;t++){let n=s(t);c+=al(e,V`${_l}|\\k<(?<backref>[^>]+)>`,({0:e,groups:{captureName:t,unnamed:s,backref:c}})=>{if(c&&r&&!r.has(c))return e;let l=`_$${n}`;if(s||t){let n=o+a.length+1;return a.push(n),wl(i,n),s?e:`(?<${t}${l}>`}return V`\k<${c}${l}>`},B.DEFAULT)}return c}function wl(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Tl(e,t,n,r,i,a){if(e.size&&r){let o=0;ol(t,_l,()=>o++,B.DEFAULT);let s=a-o+i,c=new Map;return e.forEach((e,t)=>{let i=(r-o*n)/n,a=o*n,l=t>s+o?t+r:t,u=[];for(let t of e)if(t<=s)u.push(t);else if(t>s+o+i)u.push(t+r);else if(t<=s+o)for(let e=0;e<=n;e++)u.push(t+o*e);else for(let e=0;e<=n;e++)u.push(t+a+i*e);c.set(l,u)}),c}return e}var H=String.fromCodePoint,U=String.raw,W={},El=globalThis.RegExp;W.flagGroups=(()=>{try{new El(`(?i:)`)}catch{return!1}return!0})(),W.unicodeSets=(()=>{try{new El(`[[]]`,`v`)}catch{return!1}return!0})(),W.bugFlagVLiteralHyphenIsRange=W.unicodeSets?(()=>{try{new El(U`[\d\-a]`,`v`)}catch{return!0}return!1})():!1,W.bugNestedClassIgnoresNegation=W.unicodeSets&&new El(`[[^a]]`,`v`).test(`a`);function Dl(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function Ol(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function kl(e,t){return jl[e]>=jl[t]}function Al(e,t){if(e==null)throw Error(t??`Value expected`);return e}var jl={ES2025:2025,ES2024:2024,ES2018:2018},Ml={auto:`auto`,ES2025:`ES2025`,ES2024:`ES2024`,ES2018:`ES2018`};function Nl(e={}){if({}.toString.call(e)!==`[object Object]`)throw Error(`Unexpected options`);if(e.target!==void 0&&!Ml[e.target])throw Error(`Unexpected target "${e.target}"`);let t={accuracy:`default`,avoidSubclass:!1,flags:``,global:!1,hasIndices:!1,lazyCompileLength:1/0,target:`auto`,verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target===`auto`&&(t.target=W.flagGroups?`ES2025`:W.unicodeSets?`ES2024`:`ES2018`),t}var Pl=`[ -\r ]`,Fl=new Set([H(304),H(305)]),G=U`[\p{L}\p{M}\p{N}\p{Pc}]`;function Il(e){if(Fl.has(e))return[e];let t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=Bl.get(n),a=Rl.get(n),o=zl.get(n);return[...r].length===1&&t.add(r),o&&t.add(o),i&&t.add(i),t.add(n),a&&t.add(a),[...t]}var Ll=new Map(`C Other
72
- Cc Control cntrl
73
- Cf Format
74
- Cn Unassigned
75
- Co Private_Use
76
- Cs Surrogate
77
- L Letter
78
- LC Cased_Letter
79
- Ll Lowercase_Letter
80
- Lm Modifier_Letter
81
- Lo Other_Letter
82
- Lt Titlecase_Letter
83
- Lu Uppercase_Letter
84
- M Mark Combining_Mark
85
- Mc Spacing_Mark
86
- Me Enclosing_Mark
87
- Mn Nonspacing_Mark
88
- N Number
89
- Nd Decimal_Number digit
90
- Nl Letter_Number
91
- No Other_Number
92
- P Punctuation punct
93
- Pc Connector_Punctuation
94
- Pd Dash_Punctuation
95
- Pe Close_Punctuation
96
- Pf Final_Punctuation
97
- Pi Initial_Punctuation
98
- Po Other_Punctuation
99
- Ps Open_Punctuation
100
- S Symbol
101
- Sc Currency_Symbol
102
- Sk Modifier_Symbol
103
- Sm Math_Symbol
104
- So Other_Symbol
105
- Z Separator
106
- Zl Line_Separator
107
- Zp Paragraph_Separator
108
- Zs Space_Separator
109
- ASCII
110
- ASCII_Hex_Digit AHex
111
- Alphabetic Alpha
112
- Any
113
- Assigned
114
- Bidi_Control Bidi_C
115
- Bidi_Mirrored Bidi_M
116
- Case_Ignorable CI
117
- Cased
118
- Changes_When_Casefolded CWCF
119
- Changes_When_Casemapped CWCM
120
- Changes_When_Lowercased CWL
121
- Changes_When_NFKC_Casefolded CWKCF
122
- Changes_When_Titlecased CWT
123
- Changes_When_Uppercased CWU
124
- Dash
125
- Default_Ignorable_Code_Point DI
126
- Deprecated Dep
127
- Diacritic Dia
128
- Emoji
129
- Emoji_Component EComp
130
- Emoji_Modifier EMod
131
- Emoji_Modifier_Base EBase
132
- Emoji_Presentation EPres
133
- Extended_Pictographic ExtPict
134
- Extender Ext
135
- Grapheme_Base Gr_Base
136
- Grapheme_Extend Gr_Ext
137
- Hex_Digit Hex
138
- IDS_Binary_Operator IDSB
139
- IDS_Trinary_Operator IDST
140
- ID_Continue IDC
141
- ID_Start IDS
142
- Ideographic Ideo
143
- Join_Control Join_C
144
- Logical_Order_Exception LOE
145
- Lowercase Lower
146
- Math
147
- Noncharacter_Code_Point NChar
148
- Pattern_Syntax Pat_Syn
149
- Pattern_White_Space Pat_WS
150
- Quotation_Mark QMark
151
- Radical
152
- Regional_Indicator RI
153
- Sentence_Terminal STerm
154
- Soft_Dotted SD
155
- Terminal_Punctuation Term
156
- Unified_Ideograph UIdeo
157
- Uppercase Upper
158
- Variation_Selector VS
159
- White_Space space
160
- XID_Continue XIDC
161
- XID_Start XIDS`.split(/\s/).map(e=>[Xc(e),e])),Rl=new Map([[`s`,H(383)],[H(383),`s`]]),zl=new Map([[H(223),H(7838)],[H(107),H(8490)],[H(229),H(8491)],[H(969),H(8486)]]),Bl=new Map([Ul(453),Ul(456),Ul(459),Ul(498),...Wl(8072,8079),...Wl(8088,8095),...Wl(8104,8111),Ul(8124),Ul(8140),Ul(8188)]),Vl=new Map([[`alnum`,U`[\p{Alpha}\p{Nd}]`],[`alpha`,U`\p{Alpha}`],[`ascii`,U`\p{ASCII}`],[`blank`,U`[\p{Zs}\t]`],[`cntrl`,U`\p{Cc}`],[`digit`,U`\p{Nd}`],[`graph`,U`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],[`lower`,U`\p{Lower}`],[`print`,U`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],[`punct`,U`[\p{P}\p{S}]`],[`space`,U`\p{space}`],[`upper`,U`\p{Upper}`],[`word`,U`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],[`xdigit`,U`\p{AHex}`]]);function Hl(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n}function Ul(e){let t=H(e);return[t.toLowerCase(),t]}function Wl(e,t){return Hl(e,t).map(e=>Ul(e))}var Gl=new Set([`Lower`,`Lowercase`,`Upper`,`Uppercase`,`Ll`,`Lowercase_Letter`,`Lt`,`Titlecase_Letter`,`Lu`,`Uppercase_Letter`]);function Kl(e,t){let n={accuracy:`default`,asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:`ES2025`,...t};Xl(e);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:kl(n.bestEffortTarget,`ES2024`),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};$c(e,ql,r);let i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},a={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};return $c(e,Jl,a),$c(e,Yl,{groupsByName:a.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:a.reffedNodesByReferencer}),e._originMap=a.groupOriginByCopy,e._strategy=r.strategy,e}var ql={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:i}=e;if(i===`repeater`){let e=z();e.body[0].body.push(Ic({negate:!0,body:r}),Hc(`Any`));let i=z();i.body[0].body.push(zc(`greedy`,0,1/0,e)),n(q(i,t),{traverse:!0})}else throw Error(`Unsupported absence function "(?~|"`)},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){let i=e.body.filter(e=>e.kind===`flags`);for(let e=n+1;e<t.body.length;e++){let n=t.body[e];Ol(r,n,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=ru(t.get(e));if(n){let t=z({flags:n});t.body[0].body=e.body,e.body=[q(t,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:a,replaceWith:o},s){let{kind:c,negate:l}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:f,wordIsAscii:p}=s;if(c===`text_segment_boundary`)throw Error(`Unsupported text segment boundary "\\${l?`Y`:`y`}"`);if(c===`line_end`)o(q(Ic({body:[Ec({body:[Dc(`string_end`)]}),Ec({body:[Ac(10)]})]}),t));else if(c===`line_start`)o(q(K(U`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c===`search_start`){if(f.has(e))i.flags.sticky=!0,a();else{let e=r[n-1];if(e&&lu(e))o(q(Ic({negate:!0}),t));else if(d)throw Error(U`Uses "\G" in a way that requires a subclass`);else o(pu(Dc(`string_start`),t)),s.strategy=`clip_search`}}else if(c!==`string_end`&&c!==`string_start`){if(c===`string_end_newline`)o(q(K(U`(?=\n?\z)`),t));else if(c===`word_boundary`){if(!p&&!u){let e=`(?:(?<=${G})(?!${G})|(?<!${G})(?=${G}))`,n=`(?:(?<=${G})(?=${G})|(?<!${G})(?!${G}))`;o(q(K(l?n:e),t))}}else throw Error(`Unexpected assertion kind "${c}"`)}},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!du(n)&&(n=nu(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!du(r)&&(r=nu(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){t.kind===`intersection`&&n(q(jc({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:a,spaceIsAscii:o,wordIsAscii:s}){let{kind:c,negate:l,value:u}=e;if(a&&(c===`digit`||u===`digit`)){n(pu(Nc(`digit`,{negate:l}),t));return}if(o&&(c===`space`||u===`space`)){n(q(fu(K(Pl),l),t));return}if(s&&(c===`word`||u===`word`)){n(pu(Nc(`word`,{negate:l}),t));return}if(c===`any`)n(pu(Hc(`Any`),t));else if(c===`digit`)n(pu(Hc(`Nd`,{negate:l}),t));else if(c!==`dot`){if(c===`text_segment`){if(r===`strict`)throw Error(U`Use of "\X" requires non-strict accuracy`);let e=`\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?`,a=U`\p{RI}{2}|${e}(?:\u200D${e})*`;n(q(K(U`(?>\r\n|${i?U`\p{RGI_Emoji}`:a}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c===`hex`)n(pu(Hc(`AHex`,{negate:l}),t));else if(c===`newline`)n(q(K(l?`[^
162
- ]`:`(?>\r
163
- ?|[
164
- \v\f…\u2028\u2029])`),t));else if(c===`posix`){if(!i&&(u===`graph`||u===`print`)){if(r===`strict`)throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:`!-~`,print:` -~`}[u];l&&(e=`\0-${H(e.codePointAt(0)-1)}${H(e.codePointAt(2)+1)}-\u{10FFFF}`),n(q(K(`[${e}]`),t))}else n(q(fu(K(Vl.get(u)),l),t))}else if(c===`property`)Ll.has(Xc(u))||(e.key=`sc`);else if(c===`space`)n(pu(Hc(`space`,{negate:l}),t));else if(c===`word`)n(q(fu(K(G),l),t));else throw Error(`Unexpected character set kind "${c}"`)}},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:o}){let{kind:s,flags:c}=e;if(s===`flags`){if(!c.enable&&!c.disable)r();else{let e=z({flags:c});e.body[0].body=o(),i(q(e,t),{traverse:!0})}}else if(s===`keep`){let e=n.body[0],r=n.body.length===1&&pc(e,{type:`Group`})&&e.body[0].body.length===1?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error(U`Uses "\K" in a way that's unsupported`);let o=Ic({behind:!0});o.body[0].body=a(),i(q(o,t))}else throw Error(`Unexpected directive kind "${s}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error(`Unsupported flag "P"`);if(e.textSegmentMode===`word`)throw Error(`Unsupported flag "y{w}"`);[`digitIsAscii`,`extended`,`posixIsAscii`,`spaceIsAscii`,`wordIsAscii`,`textSegmentMode`].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;n===`lookbehind`&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:r}=e;if(r===`fail`)n(q(Ic({negate:!0}),t));else throw Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type===`Quantifier`){let t=z();t.body[0].body.push(e.body),e.body=q(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],r=!1,i=!1;for(let t of e.body)if(t.body.length===1&&t.body[0].kind===`search_start`)t.body.pop();else{let e=ou(t.body);e?(r=!0,Array.isArray(e)?n.push(...e):n.push(e)):i=!0}r&&!i&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t===`strict`&&n&&r)throw Error(U`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!du(n)&&(n=nu(n,t),e.ref=n)}},Jl={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:o,openRefs:s,reffedNodesByReferencer:c}){let l=i.get(e);if(l&&s.has(e.number)){let r=pu(eu(e.number),t);c.set(r,s.get(e.number)),n(r);return}s.set(e.number,e),o.set(e.number,[]),e.name&&Ol(o,e.name,[]);let u=o.get(e.name??e.number);for(let t=0;t<u.length;t++){let n=u[t];if(l===n.node||l&&l===n.origin||e===n.origin){u.splice(t,1);break}}if(o.get(e.number).push({node:e,origin:l}),e.name&&o.get(e.name).push({node:e,origin:l}),e.name){let t=Ol(a,e.name,new Map),n=!1;if(l)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=Dl(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){let{isRecursive:i,ref:a}=e;if(i){let n=t;for(;(n=n.parent)&&(n.type!==`CapturingGroup`||n.name!==a&&n.number!==a););r.reffedNodesByReferencer.set(e,n);return}let o=r.subroutineRefMap.get(a),s=a===0,c=s?eu(0):$l(o,r.groupOriginByCopy,null),l=c;if(!s){let e=ru(tu(o,e=>e.type===`Group`&&!!e.flags)),t=e?Dl(r.globalFlags,e):r.globalFlags;Zl(t,r.currentFlags)||(l=z({flags:iu(t)}),l.body[0].body.push(c))}n(q(l,t),{traverse:!s})}},Yl={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}let i=r.reffedNodesByReferencer.get(e).filter(t=>Ql(t,e));i.length?i.length>1?n(q(z({atomic:!0,body:i.reverse().map(e=>Ec({body:[Oc(e.number)]}))}),t)):e.ref=i[0].number:n(q(Ic({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=kc();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function Xl(e){$c(e,{"*"({node:e,parent:t}){e.parent=t}})}function Zl(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function Ql(e,t){let n=t;do{if(n.type===`Regex`)return!1;if(n.type===`Alternative`)continue;if(n===e)return!1;let t=au(n.parent);for(let r of t){if(r===n)break;if(r===e||su(r,e))return!0}}while(n=n.parent);throw Error(`Unexpected path`)}function $l(e,t,n,r){let i=Array.isArray(e)?[]:{};for(let[a,o]of Object.entries(e))a===`parent`?i.parent=Array.isArray(n)?r:n:o&&typeof o==`object`?i[a]=$l(o,t,i,n):(a===`type`&&o===`CapturingGroup`&&t.set(i,t.get(e)??e),i[a]=o);return i}function eu(e){let t=Vc(e);return t.isRecursive=!0,t}function tu(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function nu(e,t){if(t.has(e))return t.get(e);let n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/gu,`_`)}`;return t.set(e,n),n}function ru(e){let t=[`dotAll`,`ignoreCase`],n={enable:{},disable:{}};return e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete n.disable[t],n.enable[t]=!0),e.disable?.[t]&&(n.disable[t]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function iu({dotAll:e,ignoreCase:t}){let n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function au(e){if(!e)throw Error(`Node expected`);let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function ou(e){let t=e.find(e=>e.kind===`search_start`||uu(e,{negate:!1})||!cu(e));if(!t)return null;if(t.kind===`search_start`)return t;if(t.type===`LookaroundAssertion`)return t.body[0].body[0];if(t.type===`CapturingGroup`||t.type===`Group`){let e=[];for(let n of t.body){let t=ou(n.body);if(!t)return null;Array.isArray(t)?e.push(...t):e.push(t)}return e}return null}function su(e,t){let n=au(e)??[];for(let e of n)if(e===t||su(e,t))return!0;return!1}function cu({type:e}){return e===`Assertion`||e===`Directive`||e===`LookaroundAssertion`}function lu(e){let t=[`Character`,`CharacterClass`,`CharacterSet`];return t.includes(e.type)||e.type===`Quantifier`&&e.min&&t.includes(e.body.type)}function uu(e,t){let n={negate:null,...t};return e.type===`LookaroundAssertion`&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&pc(e.body[0],{type:`Assertion`,kind:`search_start`})}function du(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function K(e,t){let n=gc(e,{...t,unicodePropertyMap:Ll}).body;return n.length>1||n[0].body.length>1?z({body:n}):n[0].body[0]}function fu(e,t){return e.negate=t,e}function pu(e,t){return e.parent=t,e}function q(e,t){return Xl(e),e.parent=t,e}function mu(e,t){let n=Nl(t),r=kl(n.target,`ES2024`),i=kl(n.target,`ES2025`),a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw Error(`Invalid recursionLimit; use 2-20`);let o=null,s=null;if(!i){let t=[e.flags.ignoreCase];$c(e,hu,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?o=!0:s=!0}})}let c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!s)},l=e,u={accuracy:n.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:e._originMap,recursionLimit:a,useAppliedIgnoreCase:!!(!i&&o&&s),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(e){return u.lastNode=l,l=e,Al(gu[e.type],`Unexpected node type "${e.type}"`)(e,u,d)}let f={pattern:e.body.map(d).join(`|`),flags:d(e.flags),options:{...e.options}};return r||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],u.captureMap.forEach((e,t)=>{e.hidden&&f._hiddenCaptures.push(t),e.transferTo&&Ol(f._captureTransfers,e.transferTo,[]).push(t)}),f}var hu={"*":{enter({node:e},t){if(Ou(e)){let n=t.getCurrentModI();t.pushModI(e.flags?Dl({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){Ou(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){Su(H(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),Cu(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind===`property`&&Gl.has(e.value)&&t.setHasCasedChar()}},gu={Alternative({body:e},t,n){return e.map(n).join(``)},Assertion({kind:e,negate:t}){if(e===`string_end`)return`$`;if(e===`string_start`)return`^`;if(e===`word_boundary`)return t?U`\B`:U`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!=`number`)throw Error(`Unexpected named backref in transformed AST`);if(!t.useFlagMods&&t.accuracy===`strict`&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error(`Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy`);return`\\`+e},CapturingGroup(e,t,n){let{body:r,name:i,number:a}=e,o={ignoreCase:t.currentFlags.ignoreCase},s=t.originMap.get(e);return s&&(o.hidden=!0,a>s.number&&(o.transferTo=s.number)),t.captureMap.set(a,o),`(${i?`?<${i}>`:``}${r.map(n).join(`|`)})`},Character({value:e},t){let n=H(e),r=wu(e,{escDigit:t.lastNode.type===`Backreference`,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Su(n)){let e=Il(n);return t.inCharClass?e.join(``):e.length>1?`[${e.join(``)}]`:e[0]}return n},CharacterClass(e,t,n){let{kind:r,negate:i,parent:a}=e,{body:o}=e;if(r===`intersection`&&!t.useFlagV)throw Error(`Use of character class intersection requires min target ES2024`);W.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(Au)&&(o=[Ac(45),...o.filter(e=>!Au(e))]);let s=()=>`[${i?`^`:``}${o.map(n).join(r===`intersection`?`&&`:``)}]`;if(!t.inCharClass){if((!t.useFlagV||W.bugNestedClassIgnoresNegation)&&!i){let t=o.filter(e=>e.type===`CharacterClass`&&e.kind===`union`&&e.negate);if(t.length){let r=z(),i=r.body[0];return r.parent=a,i.parent=r,o=o.filter(e=>!t.includes(e)),e.body=o,o.length?(e.parent=i,i.body.push(e)):r.body.pop(),t.forEach(e=>{let t=Ec({body:[e]});e.parent=t,t.parent=r,r.body.push(t)}),n(r)}}t.inCharClass=!0;let r=s();return t.inCharClass=!1,r}let c=o[0];if(r===`union`&&!i&&c&&((!t.useFlagV||!t.verbose)&&a.kind===`union`&&!(W.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&a.kind===`intersection`&&o.length===1&&c.type!==`CharacterClassRange`))return o.map(n).join(``);if(!t.useFlagV&&a.type===`CharacterClass`)throw Error(`Uses nested character class in a way that requires min target ES2024`);return s()},CharacterClassRange(e,t){let n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},a=wu(n,i),o=wu(r,i),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Tu(Cu(e)).forEach(e=>{s.add(Array.isArray(e)?`${wu(e[0],i)}-${wu(e[1],i)}`:wu(e,i))}),`${a}-${o}${[...s].join(``)}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e===`dot`)return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?`.`:`[^]`:U`[^\n]`;if(e===`digit`)return t?U`\D`:U`\d`;if(e===`property`){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&Gl.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?U`\P`:U`\p`}{${r?`${r}=`:``}${n}}`}if(e===`word`)return t?U`\W`:U`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?`i`:``)+(e.dotAll?`s`:``)+(e.sticky?`y`:``)},Group({atomic:e,body:t,flags:n,parent:r},i,a){let o=i.currentFlags;n&&(i.currentFlags=Dl(o,n));let s=t.map(a).join(`|`),c=!i.verbose&&t.length===1&&r.type!==`Quantifier`&&!e&&(!i.useFlagMods||!n)?s:`(?${Eu(e,n,i.useFlagMods)}${s})`;return i.currentFlags=o,c},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t===`lookahead`?``:`<`}${n?`!`:`=`}`}${e.map(i).join(`|`)})`},Quantifier(e,t,n){return n(e.body)+Du(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw Error(`Unexpected non-recursive subroutine in transformed AST`);let r=n.recursionLimit;return t===0?`(?R=${r})`:U`\g<${t}&R=${r}>`}},_u=new Set([`$`,`(`,`)`,`*`,`+`,`.`,`?`,`[`,`\\`,`]`,`^`,`{`,`|`,`}`]),vu=new Set([`-`,`\\`,`]`,`^`,`[`]),yu=new Set("()-/[\\]^{|}!#$%&*+,.:;<=>?@`~".split(``)),bu=new Map([[9,U`\t`],[10,U`\n`],[11,U`\v`],[12,U`\f`],[13,U`\r`],[8232,U`\u2028`],[8233,U`\u2029`],[65279,U`\uFEFF`]]),xu=/^\p{Cased}$/u;function Su(e){return xu.test(e)}function Cu(e,t){let n=!!t?.firstOnly,r=e.min.value,i=e.max.value,a=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return a;for(let e=r;e<=i;e++){let t=H(e);if(!Su(t))continue;let o=Il(t).filter(e=>{let t=e.codePointAt(0);return t<r||t>i});if(o.length&&(a.push(...o),n))break}return a}function wu(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(bu.has(e))return bu.get(e);if(e<32||e>126&&e<160||e>262143||t&&ku(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,`0`)}`;let i=n?r?yu:vu:_u,a=H(e);return(i.has(a)?`\\`:``)+a}function Tu(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),n=[],r=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?r??=t[e]:r===null?n.push(t[e]):(n.push([r,t[e]]),r=null);return n}function Eu(e,t,n){if(e)return`>`;let r=``;if(t&&n){let{enable:e,disable:n}=t;r=(e?.ignoreCase?`i`:``)+(e?.dotAll?`s`:``)+(n?`-`:``)+(n?.ignoreCase?`i`:``)+(n?.dotAll?`s`:``)}return`${r}:`}function Du({kind:e,max:t,min:n}){let r;return r=!n&&t===1?`?`:!n&&t===1/0?`*`:n===1&&t===1/0?`+`:n===t?`{${n}}`:`{${n},${t===1/0?``:t}}`,r+{greedy:``,lazy:`?`,possessive:`+`}[e]}function Ou({type:e}){return e===`CapturingGroup`||e===`Group`||e===`LookaroundAssertion`}function ku(e){return e>47&&e<58}function Au({type:e,value:t}){return e===`Character`&&t===45}var ju=class e extends RegExp{#e=new Map;#t=null;#n;#r=null;#i=null;rawOptions={};get source(){return this.#n||`(?:)`}constructor(t,n,r){let i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw Error(`Cannot provide options when copying a regexp`);let i=t;super(i,n),this.#n=i.source,i instanceof e&&(this.#e=i.#e,this.#r=i.#r,this.#i=i.#i,this.rawOptions=i.rawOptions)}else{let e={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?``:t,n),this.#n=t,this.#e=Nu(e.hiddenCaptures,e.transfers),this.#i=e.strategy,this.rawOptions=r??{}}i||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...n}=this.rawOptions;this.#t=new e(this.#n,this.flags,n)}let n=this.global||this.sticky,r=this.lastIndex;if(this.#i===`clip_search`&&n&&r){this.lastIndex=0;let e=this.#a(t.slice(r));return e&&(Mu(e,r,t,this.hasIndices),this.lastIndex+=r),e}return this.#a(t)}#a(e){this.#t.lastIndex=this.lastIndex;let t=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!t||!this.#e.size)return t;let n=[...t];t.length=1;let r;this.hasIndices&&(r=[...t.indices],t.indices.length=1);let i=[0];for(let e=1;e<n.length;e++){let{hidden:a,transferTo:o}=this.#e.get(e)??{};if(a?i.push(null):(i.push(t.length),t.push(n[e]),this.hasIndices&&t.indices.push(r[e])),o&&n[e]!==void 0){let a=i[o];if(!a)throw Error(`Invalid capture transfer to "${a}"`);if(t[a]=n[e],this.hasIndices&&(t.indices[a]=r[e]),t.groups){this.#r||=Pu(this.source);let i=this.#r.get(o);i&&(t.groups[i]=n[e],this.hasIndices&&(t.indices.groups[i]=r[e]))}}}return t}};function Mu(e,t,n,r){if(e.index+=t,e.input=n,r){let n=e.indices;for(let e=0;e<n.length;e++){let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])}let r=n.groups;r&&Object.keys(r).forEach(e=>{let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])})}}function Nu(e,t){let n=new Map;for(let t of e)n.set(t,{hidden:!0});for(let[e,r]of t)for(let t of r)Ol(n,t,{}).transferTo=e;return n}function Pu(e){let t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,r=0,i=0,a;for(;a=t.exec(e);){let{0:e,groups:{capture:t,name:o}}=a;e===`[`?r++:r?e===`]`&&r--:t&&(i++,o&&n.set(i,o))}return n}function Fu(e,t){let n=Iu(e,t);return n.options?new ju(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function Iu(e,t){let n=Nl(t),r=Kl(gc(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:Ll}),{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=mu(r,n),a=bl(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:`external`}),o=dl(ml(a.pattern).pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),s={pattern:o.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 Error(`Lazy compilation requires subclass`)}else{let e=o.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(o.captureTransfers),i=r._strategy,a=s.pattern.length>=n.lazyCompileLength;(e.length||t.length||i||a)&&(s.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...i&&{strategy:i},...a&&{lazyCompile:a}})}return s}function Lu(e,t){return Fu(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function Ru(e={}){let t={target:`auto`,cache:new Map,...e};return t.regexConstructor||=e=>Lu(e,{target:t.target}),{createScanner(e){return new ws(e,t)},createString(e){return{content:e}}}}async function zu(e){if(fr())throw Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);let t=cr.get(e);if(t!=null)return t;try{let t=lr.get(e);if(t==null&&Object.prototype.hasOwnProperty.call(Cr,e)&&(t=Cr[e]),t==null)throw Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);let n=t().then(({default:t})=>{let n={name:e,data:t};return sr.has(e)||sr.set(e,n),n});return cr.set(e,n),await n}finally{cr.delete(e)}}function Bu(e){return sr.get(e)??zu(e)}var Vu=new Set;function Hu(e){let t=[],n=new Set;for(let r of Uu(e.themes)){let e=Ku(r)?r.getThemes():[r];for(let r of e){if(n.has(r.name))throw Error(`Theme collection already contains theme "${r.name}"`);n.add(r.name),t.push(r)}}let r=Object.freeze([...t]),i=Object.freeze(r.filter(e=>e.colorScheme===`light`)),a=Object.freeze(r.filter(e=>e.colorScheme===`dark`)),o=new Map(r.map(e=>[e.name,e])),s=Object.freeze(r.map(e=>e.name)),c=Object.freeze(i.map(e=>e.name)),l=Object.freeze(a.map(e=>e.name));function u(e){if(e==null)return r;let{colorScheme:t,collection:n}=e;return n==null?t===`light`?i:t===`dark`?a:r:r.filter(e=>e.collection===n?t==null||e.colorScheme===t:!1)}return{getTheme(e){return o.get(e)},getThemes(e){return u(e)},getThemeNames(e){return e?.collection==null?e?.colorScheme===`light`?c:e?.colorScheme===`dark`?l:s:u(e).map(e=>e.name)},hasTheme(e){return o.has(e)},orderBy(e){return Hu({themes:r.map((e,t)=>({descriptor:e,index:t})).sort((t,n)=>{let r=e(t.descriptor,n.descriptor);return r===0?t.index-n.index:r}).map(e=>e.descriptor)})},pick(e){let t=[],n=new Set;for(let r of e){if(n.has(r))throw Error(`Theme collection pick already includes theme "${r}"`);n.add(r);let e=o.get(r);if(e==null)throw Error(`Theme collection does not contain theme "${r}"`);t.push(e)}return Hu({themes:t})},registerInto(e){for(let t of r)e.registerThemeIfAbsent(t.name,t.load)}}}function Uu(e){return Wu(e)?[e]:e}function Wu(e){return Ku(e)||Gu(e)}function Gu(e){return typeof e.name==`string`&&typeof e.load==`function`}function Ku(e){return typeof e.getThemes==`function`}function qu(e){return typeof e==`object`&&e&&`default`in e?e.default:e}var Ju=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name=`DuplicateThemeError`}},Yu=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name=`UnregisteredThemeError`}},Xu=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name=`UnresolvedThemeError`}};function Zu(){let e=new Map,t=new Map,n=new Map,r=0;function i(t,n){if(e.has(t))throw new Ju(t);e.set(t,n)}function a(t,n){return!e.has(t)&&(e.set(t,n),!0)}function o(t){return e.has(t)}function s(i){let a=t.get(i);if(a!==void 0)return Promise.resolve(a);let o=n.get(i);if(o!==void 0)return o;let s=e.get(i);if(s===void 0)return Promise.reject(new Yu(i));let c=r,l=s().then(e=>{let a=qu(e);return c===r&&t.set(i,a),n.get(i)===l&&n.delete(i),a}).catch(e=>{throw n.get(i)===l&&n.delete(i),e});return n.set(i,l),l}function c(e){return Promise.all(e.map(e=>s(e)))}function l(e,n){t.set(e,n)}function u(e){for(let[t,n]of e)l(t,n)}function d(e){return t.get(e)}function f(e){let n=[];for(let r of e){let e=t.get(r);if(e===void 0)throw new Xu(r);n.push(e)}return n}function p(e){return t.has(e)}function m(e){for(let n of e)if(!t.has(n))return!1;return!0}function h(e){let n=t.get(e);return n===void 0?s(e):n}function g(){r++,t.clear(),n.clear()}return{clearResolvedThemes:g,getResolvedOrResolveTheme:h,getResolvedTheme:d,getResolvedThemes:f,hasRegisteredTheme:o,hasResolvedTheme:p,hasResolvedThemes:m,registerTheme:i,registerThemeIfAbsent:a,resolveTheme:s,resolveThemes:c,seedResolvedTheme:l,seedResolvedThemes:u}}var J=Zu();function Qu(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let e;if(typeof n==`string`){if(e=J.getResolvedTheme(n),e==null)throw Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else e=n,n=n.name,J.getResolvedTheme(n)??J.seedResolvedTheme(n,e);Vu.has(n)||(Vu.add(n),t.loadThemeSync(e))}}function $u({name:e,load:t,colorScheme:n,collection:r,displayName:i}){return{name:e,colorScheme:n,collection:r,displayName:i,load:ed(t)}}function ed(e){return async()=>Ga(qu(await e()))}var td=`pierre`,nd=[`pierre-dark`,`pierre-dark-soft`,`pierre-dark-vibrant`,`pierre-dark-protanopia-deuteranopia`,`pierre-dark-tritanopia`],rd=[`pierre-light`,`pierre-light-soft`,`pierre-light-vibrant`,`pierre-light-protanopia-deuteranopia`,`pierre-light-tritanopia`],id=[...rd,...nd],ad=new Set(rd);function od(e){return ad.has(e)?`light`:`dark`}var sd={"pierre-dark":`Pierre Dark`,"pierre-dark-soft":`Pierre Dark Soft`,"pierre-dark-vibrant":`Pierre Dark Vibrant`,"pierre-dark-protanopia-deuteranopia":`Pierre Dark Protanopia & Deuteranopia`,"pierre-dark-tritanopia":`Pierre Dark Tritanopia`,"pierre-light":`Pierre Light`,"pierre-light-soft":`Pierre Light Soft`,"pierre-light-vibrant":`Pierre Light Vibrant`,"pierre-light-protanopia-deuteranopia":`Pierre Light Protanopia & Deuteranopia`,"pierre-light-tritanopia":`Pierre Light Tritanopia`},cd={"pierre-dark":()=>i(()=>import(`./pierre-dark-CpLgRqie.js`),[]),"pierre-dark-soft":()=>i(()=>import(`./pierre-dark-soft-kZQmAZld.js`),[]),"pierre-dark-vibrant":()=>i(()=>import(`./pierre-dark-vibrant-CpQYzh95.js`),[]),"pierre-dark-protanopia-deuteranopia":()=>i(()=>import(`./pierre-dark-protanopia-deuteranopia-B35FxJx-.js`),[]),"pierre-dark-tritanopia":()=>i(()=>import(`./pierre-dark-tritanopia-CpjhbsIL.js`),[]),"pierre-light":()=>i(()=>import(`./pierre-light-CoaEpmwp.js`),[]),"pierre-light-soft":()=>i(()=>import(`./pierre-light-soft-lWLdNTOI.js`),[]),"pierre-light-vibrant":()=>i(()=>import(`./pierre-light-vibrant-D80Fkn33.js`),[]),"pierre-light-protanopia-deuteranopia":()=>i(()=>import(`./pierre-light-protanopia-deuteranopia-0fSaH845.js`),[]),"pierre-light-tritanopia":()=>i(()=>import(`./pierre-light-tritanopia-CEbqgOJL.js`),[])};function ld(e){return $u({name:e,collection:td,colorScheme:od(e),displayName:sd[e],load:cd[e]})}var ud=Hu({themes:id.map(e=>ld(e))}),dd=`shiki`,fd=[`ayu-light`,`catppuccin-latte`,`everforest-light`,`github-light`,`github-light-default`,`github-light-high-contrast`,`gruvbox-light-hard`,`gruvbox-light-medium`,`gruvbox-light-soft`,`horizon-bright`,`kanagawa-lotus`,`light-plus`,`material-theme-lighter`,`min-light`,`night-owl-light`,`one-light`,`rose-pine-dawn`,`slack-ochin`,`snazzy-light`,`solarized-light`,`vitesse-light`],pd=`andromeeda.aurora-x.ayu-dark.ayu-mirage.catppuccin-frappe.catppuccin-macchiato.catppuccin-mocha.dark-plus.dracula.dracula-soft.everforest-dark.github-dark.github-dark-default.github-dark-dimmed.github-dark-high-contrast.gruvbox-dark-hard.gruvbox-dark-medium.gruvbox-dark-soft.horizon.houston.kanagawa-dragon.kanagawa-wave.laserwave.material-theme.material-theme-darker.material-theme-ocean.material-theme-palenight.min-dark.monokai.night-owl.nord.one-dark-pro.plastic.poimandres.red.rose-pine.rose-pine-moon.slack-dark.solarized-dark.synthwave-84.tokyo-night.vesper.vitesse-black.vitesse-dark`.split(`.`),md=new Set(fd);function hd(e){return md.has(e)?`light`:`dark`}var gd={andromeeda:()=>i(()=>import(`./andromeeda-vGVdxbeo.js`),[]),"aurora-x":()=>i(()=>import(`./aurora-x-CDeNXAV0.js`),[]),"ayu-dark":()=>i(()=>import(`./ayu-dark-DluEY0Gj.js`),[]),"ayu-light":()=>i(()=>import(`./ayu-light-C3h-C4tm.js`),[]),"ayu-mirage":()=>i(()=>import(`./ayu-mirage-Bqwy1Gya.js`),[]),"catppuccin-frappe":()=>i(()=>import(`./catppuccin-frappe-C9Q5zVZY.js`),[]),"catppuccin-latte":()=>i(()=>import(`./catppuccin-latte-CtsyrtPq.js`),[]),"catppuccin-macchiato":()=>i(()=>import(`./catppuccin-macchiato-R8nAf1vR.js`),[]),"catppuccin-mocha":()=>i(()=>import(`./catppuccin-mocha-DjuaAJKi.js`),[]),"dark-plus":()=>i(()=>import(`./dark-plus-Cs2F2srj.js`),[]),dracula:()=>i(()=>import(`./dracula-BHWKrbxM.js`),[]),"dracula-soft":()=>i(()=>import(`./dracula-soft-5eyTD99u.js`),[]),"everforest-dark":()=>i(()=>import(`./everforest-dark-sB-x3p7T.js`),[]),"everforest-light":()=>i(()=>import(`./everforest-light-Df2xbC6M.js`),[]),"github-dark":()=>i(()=>import(`./github-dark-C-LZuMrd.js`),[]),"github-dark-default":()=>i(()=>import(`./github-dark-default-DXG-b-1a.js`),[]),"github-dark-dimmed":()=>i(()=>import(`./github-dark-dimmed-Bx1FflLF.js`),[]),"github-dark-high-contrast":()=>i(()=>import(`./github-dark-high-contrast-B_tTalzw.js`),[]),"github-light":()=>i(()=>import(`./github-light-EUqPIrTm.js`),[]),"github-light-default":()=>i(()=>import(`./github-light-default-BXViO-2h.js`),[]),"github-light-high-contrast":()=>i(()=>import(`./github-light-high-contrast-B68TUdTA.js`),[]),"gruvbox-dark-hard":()=>i(()=>import(`./gruvbox-dark-hard-C820rvS2.js`),[]),"gruvbox-dark-medium":()=>i(()=>import(`./gruvbox-dark-medium-BPjhmG05.js`),[]),"gruvbox-dark-soft":()=>i(()=>import(`./gruvbox-dark-soft-MrdJrrXF.js`),[]),"gruvbox-light-hard":()=>i(()=>import(`./gruvbox-light-hard-BC_s9l72.js`),[]),"gruvbox-light-medium":()=>i(()=>import(`./gruvbox-light-medium-BAWPOn9u.js`),[]),"gruvbox-light-soft":()=>i(()=>import(`./gruvbox-light-soft-BSMLrYjP.js`),[]),horizon:()=>i(()=>import(`./horizon-CE9ld1lL.js`),[]),"horizon-bright":()=>i(()=>import(`./horizon-bright-DSNQnXHK.js`),[]),houston:()=>i(()=>import(`./houston-CsvMBhTu.js`),[]),"kanagawa-dragon":()=>i(()=>import(`./kanagawa-dragon-Bozd7klA.js`),[]),"kanagawa-lotus":()=>i(()=>import(`./kanagawa-lotus-BmuOG9ZW.js`),[]),"kanagawa-wave":()=>i(()=>import(`./kanagawa-wave-BML5mF2J.js`),[]),laserwave:()=>i(()=>import(`./laserwave-C_8bwKvT.js`),[]),"light-plus":()=>i(()=>import(`./light-plus-DVQuIRkW.js`),[]),"material-theme":()=>i(()=>import(`./material-theme-Bm3Qr25_.js`),[]),"material-theme-darker":()=>i(()=>import(`./material-theme-darker-2IIEA8gg.js`),[]),"material-theme-lighter":()=>i(()=>import(`./material-theme-lighter-uhdI0v04.js`),[]),"material-theme-ocean":()=>i(()=>import(`./material-theme-ocean-CHQ94UKr.js`),[]),"material-theme-palenight":()=>i(()=>import(`./material-theme-palenight-B5W6OYN7.js`),[]),"min-dark":()=>i(()=>import(`./min-dark-BSWPekZh.js`),[]),"min-light":()=>i(()=>import(`./min-light-DDpmG2fV.js`),[]),monokai:()=>i(()=>import(`./monokai-B_bV9PQ9.js`),[]),"night-owl":()=>i(()=>import(`./night-owl-DhmEMT88.js`),[]),"night-owl-light":()=>i(()=>import(`./night-owl-light-eJ-hLW7d.js`),[]),nord:()=>i(()=>import(`./nord-Cb4Vim4T.js`),[]),"one-dark-pro":()=>i(()=>import(`./one-dark-pro-CLwyXe_n.js`),[]),"one-light":()=>i(()=>import(`./one-light-D7Lr4KcI.js`),[]),plastic:()=>i(()=>import(`./plastic-DQwYfKfQ.js`),[]),poimandres:()=>i(()=>import(`./poimandres-DRFjx7u4.js`),[]),red:()=>i(()=>import(`./red-DX1BQOs8.js`),[]),"rose-pine":()=>i(()=>import(`./rose-pine-aMsaMD1D.js`),[]),"rose-pine-dawn":()=>i(()=>import(`./rose-pine-dawn-8PwUyIlP.js`),[]),"rose-pine-moon":()=>i(()=>import(`./rose-pine-moon-DO-qXg-I.js`),[]),"slack-dark":()=>i(()=>import(`./slack-dark-DnToyrRv.js`),[]),"slack-ochin":()=>i(()=>import(`./slack-ochin-B2OO5cIa.js`),[]),"snazzy-light":()=>i(()=>import(`./snazzy-light-4G7pJPwS.js`),[]),"solarized-dark":()=>i(()=>import(`./solarized-dark-UdsmMDCL.js`),[]),"solarized-light":()=>i(()=>import(`./solarized-light-C1IUL_tW.js`),[]),"synthwave-84":()=>i(()=>import(`./synthwave-84-nFMaYfgc.js`),[]),"tokyo-night":()=>i(()=>import(`./tokyo-night-oM2G3aXe.js`),[]),vesper:()=>i(()=>import(`./vesper-DdrHHSXu.js`),[]),"vitesse-black":()=>i(()=>import(`./vitesse-black-fwtXNY1n.js`),[]),"vitesse-dark":()=>i(()=>import(`./vitesse-dark-BZCL-v6S.js`),[]),"vitesse-light":()=>i(()=>import(`./vitesse-light-VbXTXTou.js`),[])};function _d(e){return $u({name:e,collection:dd,colorScheme:hd(e),load:gd[e]})}var vd=Hu({themes:Object.freeze([...fd.map(e=>_d(e)),...pd.map(e=>_d(e))])});function yd(e){if(fr())throw Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(J.hasRegisteredTheme(e))return;let t=vd.getTheme(e);if(t!=null){J.registerThemeIfAbsent(t.name,t.load);return}throw Error(`No valid theme loader registered for "${e}"`)}function bd(e,t){if(t.name!==e)throw Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function xd(e){yd(e);let t=await J.resolveTheme(e);return bd(e,t),t}function Sd(e){return J.getResolvedTheme(e)??xd(e)}var Y;async function Cd({themes:e,langs:t,preferredHighlighter:n=`shiki-js`}){Y??=hs({themes:[],langs:[`text`],engine:n===`shiki-wasm`?Zr(i(()=>import(`./wasm-BnjxR4X6.js`),[])):Ru()});let r=Td(Y)?await Y:Y;Y=r;let a=[];for(let e of t){if(e===`text`||e===`ansi`)continue;let t=Bu(e);`then`in t?a.push(t):dr(t,r)}let o=[];for(let t of e){let e=Sd(t);`then`in e?o.push(e):Qu(e,Y)}return(a.length>0||o.length>0)&&await Promise.all([Promise.all(a).then(e=>{dr(e,r)}),Promise.all(o).then(e=>{Qu(e,r)})]),r}function wd(){if(Y!=null&&!(`then`in Y))return Y}function Td(e=Y){return e!=null&&`then`in e}for(let e of ud.getThemes())J.registerThemeIfAbsent(e.name,e.load);function Ed(e=Ue){let t=[];return typeof e==`string`?t.push(e):(t.push(e.dark),t.push(e.light)),t}function Dd(e){return J.hasResolvedThemes(e)}function Od(e,t){return $e(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}var kd=new Map,Ad=0,jd={"1c":`1c`,abap:`abap`,as:`actionscript-3`,ada:`ada`,adb:`ada`,ads:`ada`,adoc:`asciidoc`,asciidoc:`asciidoc`,"component.html":`angular-html`,"component.ts":`angular-ts`,conf:`nginx`,htaccess:`apache`,cls:`tex`,trigger:`apex`,apl:`apl`,applescript:`applescript`,scpt:`applescript`,ara:`ara`,asm:`asm`,s:`riscv`,astro:`astro`,awk:`awk`,bal:`ballerina`,sh:`zsh`,bash:`zsh`,bat:`cmd`,cmd:`cmd`,be:`berry`,beancount:`beancount`,bib:`bibtex`,bicep:`bicep`,"blade.php":`blade`,bsl:`bsl`,c:`c`,h:`objective-cpp`,cs:`csharp`,cpp:`cpp`,hpp:`cpp`,cc:`cpp`,cxx:`cpp`,hh:`cpp`,cdc:`cdc`,cairo:`cairo`,clar:`clarity`,clj:`clojure`,cljs:`clojure`,cljc:`clojure`,soy:`soy`,cmake:`cmake`,"CMakeLists.txt":`cmake`,cob:`cobol`,cbl:`cobol`,cobol:`cobol`,CODEOWNERS:`codeowners`,ql:`ql`,coffee:`coffeescript`,lisp:`lisp`,cl:`lisp`,lsp:`lisp`,log:`log`,v:`verilog`,cql:`cql`,cr:`crystal`,css:`css`,csv:`csv`,cue:`cue`,cypher:`cypher`,cyp:`cypher`,d:`d`,dart:`dart`,dax:`dax`,desktop:`desktop`,diff:`diff`,patch:`diff`,Dockerfile:`dockerfile`,dockerfile:`dockerfile`,env:`dotenv`,dm:`dream-maker`,edge:`edge`,el:`emacs-lisp`,ex:`elixir`,exs:`elixir`,elm:`elm`,erb:`erb`,erl:`erlang`,hrl:`erlang`,f:`fortran-fixed-form`,for:`fortran-fixed-form`,fs:`fsharp`,fsi:`fsharp`,fsx:`fsharp`,f03:`f03`,f08:`f08`,f18:`f18`,f77:`f77`,f90:`fortran-free-form`,f95:`fortran-free-form`,fnl:`fennel`,fish:`fish`,ftl:`ftl`,tres:`gdresource`,res:`gdresource`,gd:`gdscript`,gdshader:`gdshader`,gs:`genie`,feature:`gherkin`,COMMIT_EDITMSG:`git-commit`,"git-rebase-todo":`git-rebase`,gjs:`glimmer-js`,gleam:`gleam`,gts:`glimmer-ts`,glsl:`glsl`,vert:`glsl`,frag:`glsl`,shader:`shaderlab`,gp:`gnuplot`,plt:`gnuplot`,gnuplot:`gnuplot`,go:`go`,graphql:`graphql`,gql:`graphql`,groovy:`groovy`,gvy:`groovy`,hack:`hack`,haml:`haml`,hbs:`handlebars`,handlebars:`handlebars`,hs:`haskell`,lhs:`haskell`,hx:`haxe`,hcl:`hcl`,hjson:`hjson`,hlsl:`hlsl`,fx:`hlsl`,html:`html`,htm:`html`,http:`http`,rest:`http`,hxml:`hxml`,hy:`hy`,imba:`imba`,ini:`ini`,cfg:`ini`,jade:`pug`,pug:`pug`,java:`java`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,jinja:`jinja`,jinja2:`jinja`,j2:`jinja`,jison:`jison`,jl:`julia`,json:`json`,json5:`json5`,jsonc:`jsonc`,jsonl:`jsonl`,jsonnet:`jsonnet`,libsonnet:`jsonnet`,jssm:`jssm`,jsx:`jsx`,kt:`kotlin`,kts:`kts`,kql:`kusto`,tex:`tex`,ltx:`tex`,lean:`lean4`,less:`less`,liquid:`liquid`,lit:`lit`,ll:`llvm`,logo:`logo`,lua:`lua`,luau:`luau`,Makefile:`makefile`,mk:`makefile`,makefile:`makefile`,md:`markdown`,markdown:`markdown`,marko:`marko`,m:`wolfram`,mat:`matlab`,mdc:`mdc`,mdx:`mdx`,wiki:`wikitext`,mediawiki:`wikitext`,mmd:`mermaid`,mermaid:`mermaid`,mips:`mipsasm`,mojo:`mojo`,"🔥":`mojo`,move:`move`,nar:`narrat`,nf:`nextflow`,nim:`nim`,nims:`nim`,nimble:`nim`,nix:`nix`,nu:`nushell`,mm:`objective-cpp`,ml:`ocaml`,mli:`ocaml`,mll:`ocaml`,mly:`ocaml`,pas:`pascal`,p:`pascal`,pl:`prolog`,pm:`perl`,t:`perl`,raku:`raku`,p6:`raku`,pl6:`raku`,php:`php`,phtml:`php`,pls:`plsql`,sql:`sql`,po:`po`,polar:`polar`,pcss:`postcss`,pot:`pot`,potx:`potx`,pq:`powerquery`,pqm:`powerquery`,ps1:`powershell`,psm1:`powershell`,psd1:`powershell`,prisma:`prisma`,pro:`prolog`,P:`prolog`,properties:`properties`,proto:`protobuf`,pp:`puppet`,purs:`purescript`,py:`python`,pyw:`python`,pyi:`python`,qml:`qml`,qmldir:`qmldir`,qss:`qss`,r:`r`,R:`r`,rkt:`racket`,rktl:`racket`,razor:`razor`,cshtml:`razor`,rb:`ruby`,rbw:`ruby`,reg:`reg`,regex:`regexp`,rel:`rel`,rs:`rust`,rst:`rst`,rake:`ruby`,gemspec:`ruby`,jbuilder:`ruby`,builder:`ruby`,rabl:`ruby`,arb:`ruby`,ru:`ruby`,podspec:`ruby`,Gemfile:`ruby`,Rakefile:`ruby`,Guardfile:`ruby`,Capfile:`ruby`,Berksfile:`ruby`,Brewfile:`ruby`,Vagrantfile:`ruby`,Thorfile:`ruby`,Appraisals:`ruby`,Dangerfile:`ruby`,sas:`sas`,sass:`sass`,scala:`scala`,sc:`scala`,scm:`scheme`,ss:`scheme`,sld:`scheme`,scss:`scss`,sdbl:`sdbl`,shadergraph:`shader`,st:`smalltalk`,sol:`solidity`,sparql:`sparql`,rq:`sparql`,spl:`splunk`,config:`ssh-config`,do:`stata`,ado:`stata`,dta:`stata`,styl:`stylus`,stylus:`stylus`,svelte:`svelte`,swift:`swift`,sv:`system-verilog`,svh:`system-verilog`,service:`systemd`,socket:`systemd`,device:`systemd`,timer:`systemd`,talon:`talonscript`,tasl:`tasl`,tcl:`tcl`,templ:`templ`,tf:`tf`,tfvars:`tfvars`,toml:`toml`,ts:`typescript`,mts:`typescript`,cts:`typescript`,tsp:`typespec`,tsv:`tsv`,tsx:`tsx`,ttl:`turtle`,twig:`twig`,typ:`typst`,vv:`v`,vala:`vala`,vapi:`vala`,vb:`vb`,vbs:`vb`,bas:`vb`,vh:`verilog`,vhd:`vhdl`,vhdl:`vhdl`,vim:`vimscript`,vue:`vue`,"vine.ts":`vue-vine`,vy:`vyper`,wasm:`wasm`,wat:`wasm`,wy:`文言`,wgsl:`wgsl`,wit:`wit`,wl:`wolfram`,nb:`wolfram`,xml:`xml`,xsl:`xsl`,xslt:`xsl`,yaml:`yaml`,yml:`yml`,zs:`zenscript`,zig:`zig`,zsh:`zsh`,sty:`tex`};function X(e){if(kd.has(e))return kd.get(e)??`text`;if(jd[e]!=null)return jd[e];let t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(kd.has(t[1]))return kd.get(t[1])??`text`;if(jd[t[1]]!=null)return jd[t[1]]??`text`}let n=e.match(/\.([^.]+)$/)?.[1]??``;return kd.has(n)?kd.get(n)??`text`:jd[n]??`text`}function Md(){return Ad}function Nd(){return Object.fromEntries(kd)}function Pd(e,t,n){let r=typeof n.lineInfo==`function`?n.lineInfo(t):n.lineInfo[t-1];if(r==null){let r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:n}),Error(r)}return e.tagName=`div`,e.properties[`data-line`]=r.lineNumber,e.properties[`data-alt-line`]=r.altLineNumber,e.properties[`data-line-type`]=r.type,e.properties[`data-line-index`]=r.lineIndex,e.children.length===0&&e.children.push(It(`
165
- `)),e}var Fd=Symbol(`no-token`),Id=Symbol(`multiple-tokens`);function Ld(e){let t=Rd(e);if(t!=null)return t;let n=Fd,r=[],i=[],a,o=()=>{if(i.length===0||a==null){i=[],a=void 0;return}if(i.length===1){let e=i[0];if(e?.type===`element`){Bd(e,a);for(let t of e.children)zd(t)}else zd(e);r.push(e),i=[],a=void 0;return}for(let e of i)zd(e);r.push(Lt({tagName:`span`,properties:{"data-char":a},children:i})),i=[],a=void 0},s=e=>{if(e!==Fd){if(e===Id){n=Id;return}if(n===Fd){n=e;return}n!==e&&(n=Id)}};for(let t of e.children){let e=t.type===`element`?Ld(t):Fd;if(s(e),typeof e!=`number`){o(),r.push(t);continue}a!=null&&a!==e&&o(),a??=e,i.push(t)}return o(),e.children=r,n}function Rd(e){let t=e.properties[`data-char`];if(typeof t==`number`)return t}function zd(e){if(e.type===`element`){e.properties[`data-char`]=void 0;for(let t of e.children)zd(t)}}function Bd(e,t){e.properties[`data-char`]=t}function Vd(e={}){let{classPrefix:t=`__shiki_`,classSuffix:n=``,classReplacer:r=e=>e}=e,i=new Map;function a(e){return Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function o(e){let o=typeof e==`string`?e:a(e),s=t+Hd(o)+n;return s=r(s),i.has(s)||i.set(s,typeof e==`string`?e:{...e}),s}return{name:`@shikijs/transformers:style-to-class`,pre(e){if(!e.properties.style)return;let t=o(e.properties.style);delete e.properties.style,this.addClassToHast(e,t)},tokens(e){for(let t of e)for(let e of t){if(!e.htmlStyle)continue;let t=o(e.htmlStyle);e.htmlStyle={},e.htmlAttrs||={},e.htmlAttrs.class?e.htmlAttrs.class+=` ${t}`:e.htmlAttrs.class=t}},getClassRegistry(){return i},getCSS(){let e=``;for(let[t,n]of i.entries())e+=`.${t}{${typeof n==`string`?n:a(n)}}`;return e},clearRegistry(){i.clear()}}}function Hd(e,t=0){let n=3735928559^t,r=1103547991^t;for(let t=0,i;t<e.length;t++)i=e.charCodeAt(t),n=Math.imul(n^i,2654435761),r=Math.imul(r^i,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&r)+(n>>>0)).toString(36).slice(0,6)}function Ud(e=!1,t=!1){let n={lineInfo:[]},r=[{line(e){return delete e.properties.class,e},pre(t){let r=zt(t),i=[];if(r!=null){let t=1;for(let a of r.children)a.type===`element`&&(e&&Ld(a),i.push(Pd(a,t,n)),t++);r.children=i}return t},...e?{tokens(e){for(let t of e){let e=0;for(let n of t){let t=n;t.__lineChar??=e,e+=n.content.length}}},preprocess(e,t){t.mergeWhitespaces=`never`},span(e,t,n,r,i){if(i?.offset!=null&&i.content!=null){let t=i.__lineChar;return t!=null&&(e.properties[`data-char`]=t),e}return e}}:null}];return t&&r.push(Gd,Wd),e&&r.push({line:e=>(e.type===`element`&&e.children.length===0&&e.children.push({type:`element`,tagName:`br`,properties:{},children:[]}),e)}),{state:n,transformers:r,toClass:Wd}}var Wd=Vd({classPrefix:`hl-`}),Gd={name:`token-style-normalizer`,tokens(e){for(let t of e)for(let e of t){if(e.htmlStyle!=null)continue;let t={};e.color!=null&&(t.color=e.color),e.bgColor!=null&&(t[`background-color`]=e.bgColor),e.fontStyle!=null&&e.fontStyle!==0&&(e.fontStyle&1&&(t[`font-style`]=`italic`),e.fontStyle&2&&(t[`font-weight`]=`bold`),e.fontStyle&4&&(t[`text-decoration`]=`underline`)),Object.keys(t).length>0&&(e.htmlStyle=t)}}};function Z(e){return`--${e===`token`?`diffs-token`:`diffs`}-`}var Kd=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,qd=/^0(?:\.0+)?%?$/;function Jd(e){let t=e.indexOf(`(`);if(t<=0||!e.endsWith(`)`))return;let n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;let r=e.slice(t+1,-1).trim();if(r.length===0)return;let i=r.lastIndexOf(`/`);if(i!==-1)return r.slice(i+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){let e=r.split(`,`);if(e.length===4)return e[3]?.trim()}}function Yd(e){let t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(t==null)return null;let n=t[1],r,i=1;return n.length===3?r=n.split(``).map(e=>e+e).join(``):n.length===6?r=n:(r=n.slice(0,6),i=parseInt(n.slice(6,8),16)/255),[parseInt(r.slice(0,2),16),parseInt(r.slice(2,4),16),parseInt(r.slice(4,6),16),i]}function Q(e){if(e==null)return null;let t=Yd(e);if(t==null)return null;let n=t[0]/255,r=t[1]/255,i=t[2]/255,a=e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4;return .2126*a(n)+.7152*a(r)+.0722*a(i)}function Xd(e,t){let[n,r]=e>t?[e,t]:[t,e];return(n+.05)/(r+.05)}function Zd(e,t){if(t==null)return;let n=Yd(e),r=Yd(t);if(n==null||r==null)return;let[i,a,o,s]=n,[c,l,u]=r;return`#`+[Math.round(i*s+c*(1-s)),Math.round(a*s+l*(1-s)),Math.round(o*s+u*(1-s))].map(e=>e.toString(16).padStart(2,`0`)).join(``)}function Qd(e){if(e==null)return!1;let t=e.trim().toLowerCase();if(t===`transparent`||Kd.test(t))return!0;let n=Jd(t);return n!=null&&qd.test(n)}function $d(e,t){let n=Q(e);if(n!=null)return n<.4;let r=Q(t);return r!=null&&r>.6}function ef(e,t){if(e==null||t==null)return!1;if(e.trim().toLowerCase()===t.trim().toLowerCase())return!0;let n=Q(e),r=Q(t);return n==null||r==null?!1:Math.abs(n-r)<.06}function tf(e,t,n){if(t==null||n==null)return!1;let r=Q(e),i=Q(t),a=Q(n);return r==null||i==null||a==null?!1:Math.abs(r-a)<Math.abs(r-i)}function nf(e,t){let n=Q(e),r=t.find(e=>e!=null&&e!==``);if(n==null)return r;let i,a=-1;for(let e of t){if(e==null||e===``)continue;let t=Q(e);if(t==null)continue;let r=Xd(n,t);if(r>=3)return e;r>a&&(i=e,a=r)}return i??r}function rf(e,t){if(t==null)return e;let n=Yd(e),r=Yd(t),i=Q(t);if(n==null||r==null||i==null)return`color-mix(in srgb, ${e} 70%, ${t})`;let[a,o,s]=n,[c,l,u]=r;for(let e of[.6,.7,.8,.9]){let t=`#`+[Math.round(a*e+c*(1-e)),Math.round(o*e+l*(1-e)),Math.round(s*e+u*(1-e))].map(e=>e.toString(16).padStart(2,`0`)).join(``),n=Q(t);if(n!=null&&Xd(i,n)>=4.5)return t}return e}var af=new WeakMap;function of(e){let t=af.get(e);if(t!=null)return t;let n=e.colors??{},r={...n},i=n[`editor.background`]??e.bg,a=n[`editor.foreground`]??e.fg,o=n[`sideBar.background`]??i,s=n[`sideBar.foreground`]??a;$(r,`editor.background`,i),$(r,`editor.foreground`,a),$(r,`sideBar.background`,o),$(r,`sideBar.foreground`,s),$(r,`input.background`,n[`input.background`]??o),$(r,`sideBarSectionHeader.foreground`,n[`sideBarSectionHeader.foreground`]??s),$(r,`list.activeSelectionForeground`,n[`list.activeSelectionForeground`]??s),$(r,`gitDecoration.addedResourceForeground`,sf(n[`gitDecoration.addedResourceForeground`],n[`terminal.ansiGreen`],n[`editorGutter.addedBackground`])),$(r,`gitDecoration.modifiedResourceForeground`,sf(n[`gitDecoration.modifiedResourceForeground`],n[`terminal.ansiBlue`],n[`editorGutter.modifiedBackground`])),$(r,`gitDecoration.deletedResourceForeground`,sf(n[`gitDecoration.deletedResourceForeground`],n[`terminal.ansiRed`],n[`editorGutter.deletedBackground`]));let c=(Qd(n[`list.focusOutline`])?void 0:n[`list.focusOutline`])??(Qd(n.focusBorder)?void 0:n.focusBorder);c==null?delete r[`list.focusOutline`]:r[`list.focusOutline`]=c;let l=n[`list.hoverBackground`];l!=null&&(cf(l,o)||tf(l,o,s))&&delete r[`list.hoverBackground`];let u=Object.freeze({...e,colors:Object.freeze(r)});return af.set(e,u),u}function $(e,t,n){n!=null&&n!==``&&(e[t]=n)}function sf(...e){for(let t of e)if(t!=null&&t!==``)return t}function cf(e,t){return t!=null&&e.toLowerCase()===t.toLowerCase()}function lf({theme:e=Ue,highlighter:t,prefix:n}){let r=``;if(typeof e==`string`){let i=t.getTheme(e),a=of(i);r+=`color:${a.fg};`,r+=`background-color:${a.bg};`,r+=`${Z(`global`)}fg:${a.fg};`,r+=`${Z(`global`)}bg:${a.bg};`,r+=uf(i,n)}else{let n=t.getTheme(e.dark),i=of(n);r+=`${Z(`global`)}dark:${i.fg};`,r+=`${Z(`global`)}dark-bg:${i.bg};`,r+=uf(n,`dark`),n=t.getTheme(e.light),i=of(n),r+=`${Z(`global`)}light:${i.fg};`,r+=`${Z(`global`)}light-bg:${i.bg};`,r+=uf(n,`light`)}return r}function uf(e,t){t=t==null?``:`${t}-`;let n=``,r=e.colors?.[`gitDecoration.addedResourceForeground`]??e.colors?.[`terminal.ansiGreen`];r!=null&&(n+=`${Z(`global`)}${t}addition-color:${r};`);let i=e.colors?.[`gitDecoration.deletedResourceForeground`]??e.colors?.[`terminal.ansiRed`];i!=null&&(n+=`${Z(`global`)}${t}deletion-color:${i};`);let a=e.colors?.[`gitDecoration.modifiedResourceForeground`]??e.colors?.[`terminal.ansiBlue`];return a!=null&&(n+=`${Z(`global`)}${t}modified-color:${a};`),n}function df(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t.children;t=`children`in t?t.children[0]:null}throw console.error(e),Error(`getLineNodes: Unable to find children`)}var ff=10,pf=13,mf=4,hf=40;function gf(e){let t=[0],n=e.indexOf(`\r`),r=e.indexOf(`
166
- `),i=0,a=0;for(;n!==-1||r!==-1;){let o;if(n!==-1&&(r===-1||n<r)?r===n+1?(o=r+1,n=e.indexOf(`\r`,o),r=e.indexOf(`
167
- `,o)):(o=n+1,n=e.indexOf(`\r`,o)):(o=r+1,r=e.indexOf(`
168
- `,o)),t.push(o),++a===mf){if(o-i<=hf){for(let n=o;n<e.length;n++){let r=e.charCodeAt(n);(r===ff||r===pf)&&(r===pf&&n+1<e.length&&e.charCodeAt(n+1)===ff&&n++,t.push(n+1))}return t}i=o,a=0}}return t}function _f(e){let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);(r===ff||r===pf)&&(r===pf&&n+1<e.length&&e.charCodeAt(n+1)===ff&&n++,t++)}return t}function vf(e){let t=gf(e);return Array.from({length:t.length},(n,r)=>{let i=t[r],a=t[r+1]??e.length;return e.slice(i,a)})}var yf={forcePlainText:!1};function bf(e,t,{theme:n=Ue,tokenizeMaxLineLength:r,useTokenTransformer:i},{forcePlainText:a,startingLine:o,totalLines:s,lines:c}=yf){a?(o??=0,s??=1/0):(o=0,s=1/0);let l=o>0||s<1/0,{state:u,transformers:d}=Ud(i),f=a?`text`:e.lang??X(e.name),p=typeof n==`string`?t.getTheme(n).type:void 0,m=lf({theme:n,highlighter:t});u.lineInfo=e=>({type:`context`,lineIndex:e-1+o,lineNumber:e+o});let h=typeof n==`string`?{lang:f,theme:n,transformers:d,defaultColor:!1,cssVariablePrefix:Z(`token`),tokenizeMaxLineLength:r,tokenizeTimeLimit:0}:{lang:f,themes:n,transformers:d,defaultColor:!1,cssVariablePrefix:Z(`token`),tokenizeMaxLineLength:r,tokenizeTimeLimit:0},g=df(t.codeToHast(l?xf(c??vf(e.contents),o,s):e.contents,h)),_=l?Array(o):g;return l&&_.push(...g),{code:_,themeStyles:m,baseThemeType:p}}function xf(e,t,n){if(e.length===0)return``;let r=Math.min(t+n,e.length);return e.slice(t,r).join(``)}function Sf(e){return(e.lang??X(e.name))===`text`}function Cf(e){return{...Ye,...e}}function wf(e,t){let n=Tf(e,t);return t?n:e.diffHeaderHeight+n}function Tf(e,t){return e.paddingTop??(t?e.spacing:0)}function Ef(e){return e.paddingBottom??e.spacing}function Df(e){switch(e){case`simple`:return 4;case`metadata`:case`line-info`:case`line-info-basic`:case`custom`:return 32}}function Of(e,t){return e===t||e?.cacheKey!=null&&e.cacheKey===t?.cacheKey}function kf(e,t){return $e(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function Af({line:e,spanStart:t,spanLength:n}){return{start:{line:e,character:t},end:{line:e,character:t+n},properties:{"data-diff-span":``},alwaysWrap:!0}}function jf({item:e,arr:t,enableJoin:n,isNeutral:r=!1,isLastItem:i=!1}){let a=t[t.length-1];if(a==null||i||!n){t.push([+!r,e.value]);return}let o=a[0]===0;if(r===o||r&&e.value.length===1&&!o){a[1]+=e.value;return}t.push([+!r,e.value])}function Mf(e){return[tt(e.additionStart,e.additionCount)+1,nt(e.additionStart,e.additionCount)+1]}function Nf({isPartial:e,rangeSize:t,expandedHunks:n,hunkIndex:r,collapsedContextThreshold:i}){let a=Math.max(t,0);if(a===0||e)return{fromStart:0,fromEnd:0,rangeSize:a,collapsedLines:a,renderAll:!1};if(n===!0||a<=i)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};let o=n?.get(r),s=Math.min(Math.max(o?.fromStart??0,0),a),c=Math.min(Math.max(o?.fromEnd??0,0),a),l=s+c,u=l>=a;return{fromStart:u?a:s,fromEnd:u?0:c,rangeSize:a,collapsedLines:Math.max(a-l,0),renderAll:u}}function Pf(e){let t=e.hunks[e.hunks.length-1];if(t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return!1;let n=e.additionLines.length-nt(t.additionStart,t.additionCount),r=e.deletionLines.length-nt(t.deletionStart,t.deletionCount);return n<=0&&r<=0?!1:n!==r}function Ff({fileDiff:e,errorPrefix:t}){let n=e.hunks[e.hunks.length-1];if(n==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;let r=e.additionLines.length-nt(n.additionStart,n.additionCount),i=e.deletionLines.length-nt(n.deletionStart,n.deletionCount);if(r<=0&&i<=0)return 0;if(r!==i)throw Error(`${t}: trailing context mismatch (additions=${r}, deletions=${i}) for ${e.name}`);return Math.min(r,i)}function If({fileDiff:e,hunkIndex:t,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:i}){if(t!==e.hunks.length-1)return;let a=Ff({fileDiff:e,errorPrefix:i});if(a<=0)return;if(n===!0||a<=r)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};let o=n?.get(e.hunks.length),s=Math.min(Math.max(o?.fromStart??0,0),a);return{fromStart:s,fromEnd:0,rangeSize:a,collapsedLines:a-s,renderAll:s>=a}}function Lf({fileDiff:e,lineNumber:t,expandedHunks:n,collapsedContextThreshold:r}){if(n===!0||e.isPartial)return!0;for(let[i,a]of e.hunks.entries()){let[o,s]=Mf(a);if(t<o){let s=Nf({isPartial:e.isPartial,rangeSize:a.collapsedBefore,expandedHunks:n,hunkIndex:i,collapsedContextThreshold:r}),c=o-s.rangeSize;return s.renderAll||t<c+s.fromStart||t>=o-s.fromEnd}if(t<s)return!0}let i=If({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:`isAdditionLineRenderable`});if(i==null||i.renderAll)return!0;let a=e.hunks[e.hunks.length-1],[,o]=Mf(a);return t<o+i.fromStart||t>=o+i.rangeSize}function Rf({fileDiff:e,lineNumber:t,direction:n,expandedHunks:r,collapsedContextThreshold:i}){if(r===!0||e.isPartial)return t;let a=[],o=1;for(let[t,n]of e.hunks.entries()){let[s,c]=Mf(n),l=Nf({isPartial:e.isPartial,rangeSize:n.collapsedBefore,expandedHunks:r,hunkIndex:t,collapsedContextThreshold:i}),u=s-l.rangeSize;l.renderAll?a.push([u,s]):(l.fromStart>0&&a.push([u,u+l.fromStart]),l.fromEnd>0&&a.push([s-l.fromEnd,s])),a.push([s,c]),o=c}let s=If({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:r,collapsedContextThreshold:i,errorPrefix:`getNearestRenderableAdditionLine`});if(s!=null){let e=o;o=e+s.rangeSize,s.renderAll?a.push([e,o]):s.fromStart>0&&a.push([e,e+s.fromStart])}if(t>=o)return t;if(n===`down`){for(let[e,n]of a)if(n>t)return Math.max(e,t);return}for(let e=a.length-1;e>=0;e--){let[n,r]=a[e];if(n<=t)return Math.min(r-1,t)}}function zf({type:e,metrics:t}){return t.hunkSeparatorHeight??Df(e)}function Bf({type:e,metrics:t}){return e===`simple`||e===`metadata`||e===`line-info-basic`?0:t.spacing}function Vf({type:e,hunkIndex:t,hunkSpecs:n}){switch(e){case`simple`:return t>0;case`metadata`:return n!=null;case`line-info`:case`line-info-basic`:case`custom`:return!0}}function Hf(e){return e!==`simple`&&e!==`metadata`}function Uf({type:e,metrics:t,hunkIndex:n,hunkSpecs:r}){if(!Vf({type:e,hunkIndex:n,hunkSpecs:r}))return;let i=zf({type:e,metrics:t}),a=Bf({type:e,metrics:t}),o=n>0?a:0,s=a;return{height:i,gapBefore:o,gapAfter:s,totalHeight:o+i+s}}function Wf({type:e,metrics:t}){if(!Hf(e))return;let n=zf({type:e,metrics:t}),r=Bf({type:e,metrics:t});return{height:n,gapBefore:r,gapAfter:0,totalHeight:r+n}}function Gf({diff:e,diffStyle:t,startingLine:n=0,totalLines:r=1/0,expandedHunks:i,collapsedContextThreshold:a=1,callback:o}){let s=Kf({diff:e,diffStyle:t,startingLine:n,expandedHunks:i,collapsedContextThreshold:a}),c={viewportStart:n,viewportEnd:n+r,isWindowedHighlight:n>0||r<1/0,splitCount:s.splitCount,unifiedCount:s.unifiedCount,finalHunkIndex:e.hunks.length-1,shouldBreak(){if(!c.isWindowedHighlight)return!1;let e=c.unifiedCount>=n+r,i=c.splitCount>=n+r;return t===`unified`?e:(t===`split`||e)&&i},shouldSkip(e,r){if(!c.isWindowedHighlight)return!1;let i=e>0&&c.unifiedCount+e<=n,a=r>0&&c.splitCount+r<=n;return t===`unified`?i:(t===`split`||i)&&a},incrementCounts(e,n){(t===`unified`||t===`both`)&&(c.unifiedCount+=e),(t===`split`||t===`both`)&&(c.splitCount+=n)},isInWindow(e,n){if(!c.isWindowedHighlight)return!0;let r=c.isInUnifiedWindow(e),i=c.isInSplitWindow(n);return t===`unified`?r:t===`split`?i:r||i},isInUnifiedWindow(e){return!c.isWindowedHighlight||c.unifiedCount>=n-e&&c.unifiedCount<n+r},isInSplitWindow(e){return!c.isWindowedHighlight||c.splitCount>=n-e&&c.splitCount<n+r},emit(e,n=!1){return n||(t===`unified`?c.incrementCounts(1,0):t===`split`?c.incrementCounts(0,1):c.incrementCounts(1,1)),o(e)??!1}};hunkIterator:for(let n=s.hunkIndex;n<e.hunks.length;n++){let r=e.hunks[n];if(r==null)throw Error(`iterateOverDiff: invalid hunk index`);if(c.shouldBreak())break;let o=tt(r.deletionStart,r.deletionCount),s=tt(r.additionStart,r.additionCount),l=!e.isPartial&&r.deletionCount===0?o:r.deletionLineIndex,u=!e.isPartial&&r.additionCount===0?s:r.additionLineIndex,d=Nf({isPartial:e.isPartial,rangeSize:r.collapsedBefore,expandedHunks:i,hunkIndex:n,collapsedContextThreshold:a}),f=n===c.finalHunkIndex?If({fileDiff:e,hunkIndex:n,expandedHunks:i,collapsedContextThreshold:a,errorPrefix:`iterateOverDiff`}):void 0,p=d.fromStart+d.fromEnd;function m(e,n){return f==null||f.collapsedLines<=0||f.fromStart+f.fromEnd>0?0:t===`unified`?e===r.unifiedLineStart+r.unifiedLineCount-1?f.collapsedLines:0:n===r.splitLineStart+r.splitLineCount-1?f.collapsedLines:0}let h=d.collapsedLines===0;function g(){return h?0:(h=!0,d.collapsedLines)}if(c.shouldSkip(p,p))c.incrementCounts(p,p),g();else{let e=r.unifiedLineStart-d.rangeSize,i=r.splitLineStart-d.rangeSize,a=l-d.rangeSize,f=u-d.rangeSize,p=o+1-d.rangeSize,m=s+1-d.rangeSize;if(Yf(c,d.fromStart,t,t=>c.emit({hunkIndex:n,hunk:r,collapsedBefore:0,collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:p+t,lineIndex:a+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:i+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:i+t,lineIndex:f+t,lineNumber:m+t,noEOFCR:!1}}))||(e=r.unifiedLineStart-d.fromEnd,i=r.splitLineStart-d.fromEnd,a=l-d.fromEnd,f=u-d.fromEnd,p=o+1-d.fromEnd,m=s+1-d.fromEnd,Yf(c,d.fromEnd,t,t=>c.emit({hunkIndex:n,hunk:r,collapsedBefore:g(),collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:p+t,lineIndex:a+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:i+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:i+t,lineIndex:f+t,lineNumber:m+t,noEOFCR:!1}}),()=>{g()})))break hunkIterator}let _=r.unifiedLineStart,v=r.splitLineStart,y=l,b=u,x=o+1,S=s+1,C=r.hunkContent.at(-1);for(let e of r.hunkContent){if(c.shouldBreak())break hunkIterator;let i=e===C;if(e.type===`context`){if(c.shouldSkip(e.lines,e.lines))c.incrementCounts(e.lines,e.lines),g();else if(Yf(c,e.lines,t,t=>{let a=i&&t===e.lines-1,o=_+t,s=v+t;return c.emit({hunkIndex:n,hunk:r,collapsedBefore:g(),collapsedAfter:m(o,s),type:`context`,deletionLine:{lineNumber:x+t,lineIndex:y+t,noEOFCR:a&&r.noEOFCRDeletions,unifiedLineIndex:o,splitLineIndex:s},additionLine:{unifiedLineIndex:o,splitLineIndex:s,lineIndex:b+t,lineNumber:S+t,noEOFCR:a&&r.noEOFCRAdditions}})},()=>{g()}))break hunkIterator;_+=e.lines,v+=e.lines,y+=e.lines,b+=e.lines,x+=e.lines,S+=e.lines}else{let a=Math.max(e.deletions,e.additions),o=e.deletions+e.additions;if(!c.shouldSkip(o,a)){let s=Xf(c,e,t);(s[0]?.[0]??0)>0&&g();for(let[l,u]of s)for(let s=l;s<u;s++){let l=m(_+s,t===`unified`?v+(s<e.deletions?s:s-e.deletions):v+s);if(c.emit(Zf({hunkIndex:n,hunk:r,collapsedBefore:g(),collapsedAfter:l,diffStyle:t,index:s,unifiedLineIndex:_,splitLineIndex:v,additionLineIndex:b,deletionLineIndex:y,additionLineNumber:S,deletionLineNumber:x,content:e,isLastContent:i,unifiedCount:o,splitCount:a}),!0))break hunkIterator}}g(),c.incrementCounts(o,a),_+=o,v+=a,y+=e.deletions,b+=e.additions,x+=e.deletions,S+=e.additions}}if(f!=null){let{collapsedLines:n,fromStart:r,fromEnd:i}=f,a=r+i;if(Yf(c,a,t,t=>{let r=t===a-1;return c.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:r?n:0,type:`context-expanded`,deletionLine:{lineNumber:x+t,lineIndex:y+t,noEOFCR:!1,unifiedLineIndex:_+t,splitLineIndex:v+t},additionLine:{unifiedLineIndex:_+t,splitLineIndex:v+t,lineIndex:b+t,lineNumber:S+t,noEOFCR:!1}})},void 0,()=>c.shouldBreak()))break hunkIterator}}}function Kf({diff:e,diffStyle:t,startingLine:n,expandedHunks:r,collapsedContextThreshold:i}){if(n<=0||t===`both`)return{hunkIndex:0,splitCount:0,unifiedCount:0};let a=qf({diff:e,expandedHunks:r,collapsedContextThreshold:i}),o=0,s=e.hunks.length-1,c=e.hunks.length;for(;o<=s;){let e=o+s>>1,r=a[e+1];if(r==null)throw Error(`iterateOverDiff: invalid hunk prefix index`);(t===`unified`?r.unifiedCount:r.splitCount)>n?(c=e,s=e-1):o=e+1}if(c>=e.hunks.length){let t=a[e.hunks.length];if(t==null)throw Error(`iterateOverDiff: invalid terminal hunk prefix index`);return{hunkIndex:e.hunks.length,splitCount:t.splitCount,unifiedCount:t.unifiedCount}}let l=a[c];if(l==null)throw Error(`iterateOverDiff: invalid selected hunk prefix index`);return{hunkIndex:c,splitCount:l.splitCount,unifiedCount:l.unifiedCount}}function qf({diff:e,expandedHunks:t,collapsedContextThreshold:n}){let r=0,i=0,a=e.hunks.length-1,o=[{splitCount:0,unifiedCount:0}];for(let s=0;s<e.hunks.length;s++){let c=e.hunks[s];if(c==null)throw Error(`iterateOverDiff: invalid hunk summary index`);let l=Nf({isPartial:e.isPartial,rangeSize:c.collapsedBefore,expandedHunks:t,hunkIndex:s,collapsedContextThreshold:n}),u=l.fromStart+l.fromEnd;r+=u+c.splitLineCount,i+=u+c.unifiedLineCount;let d=s===a?If({fileDiff:e,hunkIndex:s,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:`iterateOverDiff`}):void 0;if(d!=null){let e=d.fromStart+d.fromEnd;r+=e,i+=e}o.push({splitCount:r,unifiedCount:i})}return o}function Jf(e,t,n){if(!e.isWindowedHighlight||t<=0)return[0,t];let r=[];function i(n){let i=Math.max(0,e.viewportStart-n),a=Math.min(t,e.viewportEnd-n);a>i&&r.push([i,a])}if(n!==`split`&&i(e.unifiedCount),n!==`unified`&&i(e.splitCount),r.length===0)return[0,0];let a=r[0][0],o=r[0][1];for(let e=1;e<r.length;e++){let t=r[e];a=Math.min(a,t[0]),o=Math.max(o,t[1])}return[a,o]}function Yf(e,t,n,r,i,a){let[o,s]=Jf(e,t,n);o>0&&(e.incrementCounts(o,o),i?.());let c=o;for(;c<t;){if(a?.()===!0)return!0;if(c>=s){e.incrementCounts(t-c,t-c);break}if(e.isInWindow(0,0)){if(r(c)===!0)return!0}else e.incrementCounts(1,1);c++}return!1}function Xf(e,t,n){if(!e.isWindowedHighlight)return[[0,n===`unified`?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];let r=n!==`split`,i=n!==`unified`,a=n===`unified`?`unified`:`split`,o=[];function s(t,n){if(t+n<=e.viewportStart||t>=e.viewportEnd)return;let r=Math.max(0,e.viewportStart-t),i=Math.min(n,e.viewportEnd-t);return i>r?[r,i]:void 0}function c(e,n){return a===`split`?e:n===`additions`?[e[0]+t.deletions,e[1]+t.deletions]:e}function l(e,t){if(e==null)return;let[n,r]=c(e,t);r>n&&o.push([n,r])}if(r&&(l(s(e.unifiedCount,t.deletions),`deletions`),l(s(e.unifiedCount+t.deletions,t.additions),`additions`)),i&&(l(s(e.splitCount,t.deletions),`deletions`),l(s(e.splitCount,t.additions),`additions`)),o.length===0)return o;o.sort((e,t)=>e[0]-t[0]);let u=[o[0]];for(let[e,t]of o.slice(1)){let n=u[u.length-1];e<=n[1]?n[1]=Math.max(n[1],t):u.push([e,t])}return u}function Zf({hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,diffStyle:i,index:a,unifiedLineIndex:o,splitLineIndex:s,additionLineIndex:c,deletionLineIndex:l,additionLineNumber:u,deletionLineNumber:d,content:f,isLastContent:p,unifiedCount:m,splitCount:h}){let g=a<f.deletions?o+a:void 0,_=i===`unified`?a>=f.deletions?o+a:void 0:a<f.additions?o+f.deletions+a:void 0,v=i===`unified`?s+(a<f.deletions?a:a-f.deletions):s+a,y=a<f.deletions?l+a:void 0,b=a<f.deletions?d+a:void 0,x=i===`unified`?a>=f.deletions?c+(a-f.deletions):void 0:a<f.additions?c+a:void 0,S=i===`unified`?a>=f.deletions?u+(a-f.deletions):void 0:a<f.additions?u+a:void 0,C=i===`unified`?p&&a===f.deletions-1&&t.noEOFCRDeletions:p&&a===h-1&&t.noEOFCRDeletions,ee=i===`unified`?p&&a===m-1&&t.noEOFCRAdditions:p&&a===h-1&&t.noEOFCRAdditions,te=y!=null&&b!=null&&g!=null?{lineNumber:b,lineIndex:y,noEOFCR:C,unifiedLineIndex:g,splitLineIndex:v}:void 0,ne=x!=null&&S!=null&&_!=null?{unifiedLineIndex:_,splitLineIndex:v,lineIndex:x,lineNumber:S,noEOFCR:ee}:void 0;if(te==null&&ne!=null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:void 0,additionLine:ne};if(te!=null&&ne==null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:te,additionLine:void 0};if(te==null||ne==null)throw Error(`iterateOverDiff: missing change line data`);return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:te,additionLine:ne}}var Qf={forcePlainText:!1};function $f(e,t,n,{forcePlainText:r,startingLine:i,totalLines:a,expandedHunks:o,collapsedContextThreshold:s=1}=Qf){r?(i??=0,a??=1/0):(i=0,a=1/0);let c=i>0||a<1/0,l=typeof n.theme==`string`?t.getTheme(n.theme).type:void 0,u=lf({theme:n.theme,highlighter:t}),d=r&&!c&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?`none`:n.lineDiffType,f={deletionLines:[],additionLines:[]},{maxLineDiffLength:p}=n,m=!r&&!e.isPartial,h=r?o:void 0,g=new Map;function _(e){let t=m?0:e,n=g.get(t)??tp();return g.set(t,n),n}function v(e,t,n,r){if(c){let e=n.at(-1);(e==null||e.targetIndex+e.count!==t)&&(e={targetIndex:t,originalOffset:r.length,count:0},n.push(e)),e.count++}r.push(e)}Gf({diff:e,diffStyle:`both`,startingLine:i,totalLines:a,expandedHunks:!c||h,collapsedContextThreshold:s,callback:({hunkIndex:t,additionLine:n,deletionLine:r,type:i})=>{let a=_(t),o=n==null?r.splitLineIndex:n.splitLineIndex;i===`change`&&n!=null&&r!=null&&ep({additionLine:e.additionLines[n.lineIndex],deletionLine:e.deletionLines[r.lineIndex],deletionLineIndex:a.deletionContent.length,additionLineIndex:a.additionContent.length,deletionDecorations:a.deletionDecorations,additionDecorations:a.additionDecorations,lineDiffType:d,maxLineDiffLength:p}),r!=null&&(v(e.deletionLines[r.lineIndex],r.lineIndex,a.deletionSegments,a.deletionContent),a.deletionInfo.push({type:i===`change`?`change-deletion`:i,lineNumber:r.lineNumber,altLineNumber:i===`change`?void 0:n.lineNumber??void 0,lineIndex:`${r.unifiedLineIndex},${o}`})),n!=null&&(v(e.additionLines[n.lineIndex],n.lineIndex,a.additionSegments,a.additionContent),a.additionInfo.push({type:i===`change`?`change-addition`:i,lineNumber:n.lineNumber,altLineNumber:i===`change`?void 0:r.lineNumber??void 0,lineIndex:`${n.unifiedLineIndex},${o}`}))}});for(let i of g.values()){if(i.deletionContent.length===0&&i.additionContent.length===0)continue;let a={name:e.prevName??e.name,contents:i.deletionContent.value},o={name:e.name,contents:i.additionContent.value},{deletionLines:s,additionLines:c}=np({deletionFile:a,deletionInfo:i.deletionInfo,deletionDecorations:i.deletionDecorations,additionFile:o,additionInfo:i.additionInfo,additionDecorations:i.additionDecorations,highlighter:t,options:n,languageOverride:r?`text`:e.lang});if(m){f.deletionLines=s,f.additionLines=c;continue}if(i.deletionSegments.length>0)for(let e of i.deletionSegments)for(let t=0;t<e.count;t++)f.deletionLines[e.targetIndex+t]=s[e.originalOffset+t];else f.deletionLines.push(...s);if(i.additionSegments.length>0)for(let e of i.additionSegments)for(let t=0;t<e.count;t++)f.additionLines[e.targetIndex+t]=c[e.originalOffset+t];else f.additionLines.push(...c)}return{code:f,themeStyles:u,baseThemeType:l}}function ep({deletionLine:e,additionLine:t,deletionLineIndex:n,additionLineIndex:r,deletionDecorations:i,additionDecorations:a,lineDiffType:o,maxLineDiffLength:s}){if(e==null||t==null||o===`none`||(e=et(e),t=et(t),e.length>s||t.length>s))return;let c=o===`char`?at(e,t):St(e,t),l=[],u=[],d=o===`word-alt`,f=c.at(-1);for(let e of c){let t=e===f;!e.added&&!e.removed?(jf({item:e,arr:l,enableJoin:d,isNeutral:!0,isLastItem:t}),jf({item:e,arr:u,enableJoin:d,isNeutral:!0,isLastItem:t})):e.removed?jf({item:e,arr:l,enableJoin:d,isLastItem:t}):jf({item:e,arr:u,enableJoin:d,isLastItem:t})}let p=0;for(let e of l)e[0]===1&&i.push(Af({line:n,spanStart:p,spanLength:e[1].length})),p+=e[1].length;p=0;for(let e of u)e[0]===1&&a.push(Af({line:r,spanStart:p,spanLength:e[1].length})),p+=e[1].length}function tp(){return{deletionContent:{push(e){this.value+=e,this.length++},value:``,length:0},additionContent:{push(e){this.value+=e,this.length++},value:``,length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function np({deletionFile:e,additionFile:t,deletionInfo:n,additionInfo:r,highlighter:i,deletionDecorations:a,additionDecorations:o,languageOverride:s,options:{theme:c=Ue,...l}}){let u=s??X(e.name),d=s??X(t.name),{state:f,transformers:p}=Ud(l.useTokenTransformer),m=typeof c==`string`?{...l,lang:`text`,theme:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:Z(`token`),tokenizeTimeLimit:0}:{...l,lang:`text`,themes:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:Z(`token`),tokenizeTimeLimit:0};return{deletionLines:e.contents===``?[]:(m.lang=u,f.lineInfo=n,m.decorations=a,df(i.codeToHast(et(e.contents),m))),additionLines:t.contents===``?[]:(m.lang=d,m.decorations=o,f.lineInfo=r,df(i.codeToHast(et(t.contents),m)))}}function rp(e){let t=e.lang??X(e.name),n=e.lang??(e.prevName==null?`text`:X(e.prevName));return t===`text`&&n===`text`}function ip(e){let t=[];for(let n of e){let e=sr.get(n);if(e==null)throw Error(`getResolvedLanguages: ${n} is not resolved. Please resolve languages before calling getResolvedLanguages`);t.push(e)}return t}function ap(e){for(let t of Array.isArray(e)?e:[e])if(!sr.has(t))return!1;return!0}async function op(e){let t=[],n=[];for(let r of e){if(r===`text`||r===`ansi`)continue;let e=Bu(r)??zu(r);`then`in e?n.push(e):t.push(e)}return n.length>0&&await Promise.all(n).then(e=>{for(let n of e){if(n==null)throw Error(`resolvedLanguages: unable to resolve language`);t.push(n)}}),t}function sp(e){return J.getResolvedThemes(e)}async function cp(e){for(let t of e)yd(t);let t=await J.resolveThemes(e);for(let n=0;n<e.length;n++)bd(e[n],t[n]);return t}var lp=null,up=null;function dp(){return lp?Promise.resolve(lp):(up??=i(()=>import(`./vscode-icons-D3XEYHTI.js`).then(e=>(lp=e.getVscodeIconUrlForEntry,lp)),[]).catch(e=>{throw up=null,e}),up)}function fp(e,t,n){let r=(0,O.c)(9),i;r[0]!==t||r[1]!==e||r[2]!==n?(i=()=>lp?lp(e,t,n):null,r[0]=t,r[1]=e,r[2]=n,r[3]=i):i=r[3];let[a,o]=(0,A.useState)(i),s,c;return r[4]!==t||r[5]!==e||r[6]!==n?(s=()=>{if(lp){o(lp(e,t,n));return}let r=!1;return o(null),dp().then(i=>{r||o(i(e,t,n))}).catch(()=>{r||o(null)}),()=>{r=!0}},c=[t,e,n],r[4]=t,r[5]=e,r[6]=n,r[7]=s,r[8]=c):(s=r[7],c=r[8]),(0,A.useEffect)(s,c),a}var pp=(0,A.memo)(function(e){let t=(0,O.c)(11),[n,r]=(0,A.useState)(null),i=fp(e.pathValue,e.kind,e.theme);if(!i||i!==null&&n===i){let n;return t[0]!==e.className||t[1]!==e.kind?(n=e.kind===`directory`?(0,k.jsx)(ae,{className:w(`size-4 text-muted-foreground/80`,e.className)}):(0,k.jsx)(g,{className:w(`size-4 text-muted-foreground/80`,e.className)}),t[0]=e.className,t[1]=e.kind,t[2]=n):n=t[2],n}let a;t[3]===e.className?a=t[4]:(a=w(`size-4 shrink-0`,e.className),t[3]=e.className,t[4]=a);let o;t[5]===i?o=t[6]:(o=()=>r(i),t[5]=i,t[6]=o);let s;return t[7]!==i||t[8]!==a||t[9]!==o?(s=(0,k.jsx)(`img`,{src:i,alt:``,"aria-hidden":`true`,className:a,loading:`lazy`,onError:o}),t[7]=i,t[8]=a,t[9]=o,t[10]=s):s=t[10],s});function mp(e){return e.split(/[\s:_-]+/).filter(e=>e.length>0).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function hp(e){return e.replaceAll(`\\`,`/`)}function gp(e){return e.displayName?.trim()||mp(e.name)}function _p(e){let t=hp(e.path);if(t.includes(`/.codex/plugins/`)||t.includes(`/.agents/plugins/`))return`App`;let n=e.scope?.trim().toLowerCase();return n===`system`?`System`:n===`project`||n===`workspace`||n===`local`?`Project`:n===`user`||n===`personal`?`Personal`:n?mp(n):null}var vp=`inline-flex max-w-full select-none items-center gap-1 rounded-md border border-border/70 bg-accent/40 px-1.5 py-px font-medium text-[12px] leading-[1.1] text-foreground align-middle`,yp=`size-3.5 shrink-0 opacity-85`,bp=`truncate select-none leading-tight`,xp=`inline-flex max-w-full select-none items-center gap-1 rounded-md border border-fuchsia-500/25 bg-fuchsia-500/12 px-1.5 py-px font-medium text-[12px] leading-[1.1] text-fuchsia-700 align-middle dark:text-fuchsia-300`,Sp=`<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.85" stroke-linecap="round" stroke-linejoin="round"><path d="M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z"/><path d="m3.3 7 8.7 5 8.7-5"/><path d="M12 22V12"/></svg>`,Cp=`ml-0.5 inline-flex size-3.5 shrink-0 cursor-pointer items-center justify-center rounded-sm text-muted-foreground/72 transition-colors hover:bg-foreground/6 hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`;function wp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Tp(e){let t=e.trim();if(t.length===0)return null;let n=t.split(/(\s+)/).map(e=>/\s+/.test(e)?`\\s+`:wp(e)).join(``);return new RegExp(n,`gi`)}function Ep(e){return e.message.role===`user`?l(e.message.text).visibleText:e.message.text}function Dp(e){let t=Tp(e.query);if(!t)return[];let n=[];for(let r of e.timelineEntries){if(r.kind!==`message`||r.message.role!==`user`&&r.message.role!==`assistant`)continue;let e=Ep(r),i=0;t.lastIndex=0;for(let a of e.matchAll(t)){let e=a.index??0,t=a[0]??``;if(t.length===0)continue;let o=e+t.length,s=`${r.message.id}:${e}:${o}:${i}`;n.push({id:s,messageId:r.message.id,occurrenceIndex:n.length,messageOccurrenceIndex:i,start:e,end:o,text:t}),i+=1}}return n}function Op(e,t){return t<=0?0:Math.min(Math.max(0,e),t-1)}function kp(e){return e.matchCount<=0?0:e.direction===`previous`?(e.currentIndex-1+e.matchCount)%e.matchCount:(e.currentIndex+1)%e.matchCount}function Ap(e){let t=Tp(e.query);if(!t)return e.text;let n=[],r=0;t.lastIndex=0;for(let i of e.text.matchAll(t)){let t=i.index??0,a=i[0]??``;if(a.length===0)continue;let o=t+a.length;t>r&&n.push(e.text.slice(r,t));let s=e.cursor.occurrenceIndex;e.cursor.occurrenceIndex+=1,n.push((0,k.jsx)(`mark`,{className:w(`thread-message-search-highlight`,e.activeOccurrenceIndex===s&&`thread-message-search-highlight-active`),"data-thread-message-search-hit":`true`,"data-thread-message-search-active":e.activeOccurrenceIndex===s?`true`:void 0,children:a},`${e.keyPrefix}:thread-search:${t}:${o}:${s}`)),r=o}return n.length===0?e.text:(r<e.text.length&&n.push(e.text.slice(r)),(0,k.jsx)(k.Fragment,{children:n}))}var jp=/(^|\s)\$([a-zA-Z][a-zA-Z0-9:_-]*)(?=\s|$)/g;function Mp(e){return e.highlight?Ap({text:e.text,query:e.highlight.query,activeOccurrenceIndex:e.highlight.activeOccurrenceIndex,cursor:e.highlight.cursor,keyPrefix:`${e.highlight.keyPrefix}:${e.start}`}):e.text}function Np(e){let t=(0,O.c)(14),n,r;if(t[0]!==e.searchHighlight||t[1]!==e.skills||t[2]!==e.text){r=Symbol.for(`react.early_return_sentinel`);bb0:{let i=[],a=0;for(let t of e.text.matchAll(jp)){let n=t[1]??``,r=t[2]??``,o=(t.index??0)+n.length,s=`$${r}`,c=e.skills.find(e=>e.name===r);c&&(o>a&&i.push(Mp({text:e.text.slice(a,o),start:a,highlight:e.searchHighlight})),i.push((0,k.jsx)(Fp,{skill:c,rawText:s},`${o}:${r}`)),a=o+s.length)}if(a===0){let n;t[5]!==e.searchHighlight||t[6]!==e.text?(n=Mp({text:e.text,start:0,highlight:e.searchHighlight}),t[5]=e.searchHighlight,t[6]=e.text,t[7]=n):n=t[7];let i;t[8]===n?i=t[9]:(i=(0,k.jsx)(k.Fragment,{children:n}),t[8]=n,t[9]=i),r=i;break bb0}if(a<e.text.length){let n;t[10]!==a||t[11]!==e.searchHighlight||t[12]!==e.text?(n=Mp({text:e.text.slice(a),start:a,highlight:e.searchHighlight}),t[10]=a,t[11]=e.searchHighlight,t[12]=e.text,t[13]=n):n=t[13],i.push(n)}n=(0,k.jsx)(k.Fragment,{children:i})}t[0]=e.searchHighlight,t[1]=e.skills,t[2]=e.text,t[3]=n,t[4]=r}else n=t[3],r=t[4];return r===Symbol.for(`react.early_return_sentinel`)?n:r}function Pp(e,t,n){return A.Children.map(e,e=>typeof e==`string`?(0,k.jsx)(Np,{text:e,skills:t,searchHighlight:n}):!(0,A.isValidElement)(e)||e.type===`code`||e.type===`a`||!(`children`in e.props)?e:(0,A.cloneElement)(e,void 0,Pp(e.props.children,t,n)))}function Fp(e){let t=(0,O.c)(10),n;t[0]===e.rawText?n=t[1]:(n=(0,k.jsx)(`span`,{className:`sr-only`,children:e.rawText}),t[0]=e.rawText,t[1]=n);let r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,k.jsx)(`span`,{"aria-hidden":`true`,className:yp,dangerouslySetInnerHTML:{__html:Sp}}),t[2]=r):r=t[2];let i;t[3]===e.skill?i=t[4]:(i=gp(e.skill),t[3]=e.skill,t[4]=i);let a;t[5]===i?a=t[6]:(a=(0,k.jsxs)(`span`,{"aria-hidden":`true`,className:xp,children:[r,(0,k.jsx)(`span`,{className:bp,children:i})]}),t[5]=i,t[6]=a);let o;return t[7]!==n||t[8]!==a?(o=(0,k.jsxs)(`span`,{className:`inline-flex align-middle leading-none`,children:[n,a]}),t[7]=n,t[8]=a,t[9]=o):o=t[9],o}var Ip={light:`pierre-light`,dark:`pierre-dark`};function Lp(e){return e===`dark`?Ip.dark:Ip.light}var Rp=2166136261,zp=16777619,Bp=2654435769,Vp=2246822507;function Hp(e,t=Rp,n=zp){let r=t>>>0;for(let t=0;t<e.length;t+=1)r^=e.charCodeAt(t),r=Math.imul(r,n)>>>0;return r>>>0}function Up(e,t=`diff-panel`){let n=e.trim(),r=Hp(n,Rp,zp).toString(36),i=Hp(n,Bp,Vp).toString(36);return`${t}:${n.length}:${r}:${i}`}var Wp=class{maxEntries;maxMemoryBytes;cache=new Map;totalSize=0;constructor(e,t){this.maxEntries=e,this.maxMemoryBytes=t}get(e){let t=this.cache.get(e);return t?(this.promote(e,t),t.value):null}set(e,t,n){let r=this.cache.get(e);r&&(this.totalSize-=r.approximateSize,this.cache.delete(e)),this.evictIfNeeded(n),this.cache.set(e,{value:t,approximateSize:n}),this.totalSize+=n}clear(){this.cache.clear(),this.totalSize=0}promote(e,t){this.cache.delete(e),this.cache.set(e,t)}evictIfNeeded(e){for(;(this.cache.size>=this.maxEntries||this.totalSize+e>this.maxMemoryBytes)&&this.cache.size>0;){let e=this.cache.keys().next().value;if(e===void 0)break;let t=this.cache.get(e);t&&(this.totalSize-=t.approximateSize),this.cache.delete(e)}}},Gp=.16,Kp=2e3,qp=.15,Jp=.05;function Yp(e,t){if(t<=0||t>=e.length)return t;let n=e.charCodeAt(t-1);return n>=55296&&n<=56319?t-1:t}function Xp(e,t){let n=(0,O.c)(10),r=p(`(prefers-reduced-motion: reduce)`),i=t&&!r,[a,o]=(0,A.useState)(e),s=(0,A.useRef)(e),c=(0,A.useRef)(e.length),l=(0,A.useRef)(e.length),u=(0,A.useRef)(0),d=(0,A.useRef)(null),f=(0,A.useRef)(Zp),m=(0,A.useRef)(0),h;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>{d.current!==null&&(cancelAnimationFrame(d.current),d.current=null)},n[0]=h):h=n[0];let g=h,_;n[1]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>{d.current===null&&(d.current=requestAnimationFrame(e=>{d.current=null,f.current(e)}))},n[1]=_):_=n[1];let v=_,y,b;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(y=()=>{f.current=e=>{let t=m.current,n=t?Math.min((e-t)/1e3,Jp):0;m.current=e;let r=s.current,i=r.length;c.current>i&&(c.current=i);let a=i-c.current;if(a<=0){u.current=0,m.current=0;return}let d=Math.min(Kp,a/Gp);u.current+=(d-u.current)*qp,c.current=Math.min(i,c.current+u.current*n);let f=Yp(r,Math.floor(c.current));f!==l.current&&(l.current=f,o(f>=i?r:r.slice(0,f))),i-c.current>0?v():(u.current=0,m.current=0)}},b=[v],n[2]=y,n[3]=b):(y=n[2],b=n[3]),(0,A.useEffect)(y,b);let x,S;n[4]!==i||n[5]!==e?(x=()=>{let t=s.current,n=e.length>=t.length&&e.startsWith(t);if(s.current=e,!i||!n){g(),c.current=e.length,l.current=e.length,u.current=0,m.current=0,o(e);return}e.length>c.current&&v()},S=[i,g,v,e],n[4]=i,n[5]=e,n[6]=x,n[7]=S):(x=n[6],S=n[7]),(0,A.useEffect)(x,S);let C,ee;return n[8]===Symbol.for(`react.memo_cache_sentinel`)?(C=()=>g,ee=[g],n[8]=C,n[9]=ee):(C=n[8],ee=n[9]),(0,A.useEffect)(C,ee),i?a:e}function Zp(){}function Qp(e){return e.replaceAll(`\\`,`/`)}function $p(e){return/^\/[A-Za-z]:\//.test(e)?e.slice(1):e}function em(e){return e.replace(/[\\/]+$/,``)}function tm(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return t>=0?e.slice(t+1):e}function nm(e){return e.replace(/^\.\/+/,``).replace(/^\/+/,``)}function rm(e,t){let{path:n,line:r,column:i}=se(e),a=$p(Qp(n)),o=a;if(t){let e=$p(Qp(em(t))),n=tm(e),r=a.toLowerCase(),i=e.toLowerCase(),s=`${i}/`,c=`${n.toLowerCase()}/`;if(r===i)o=n;else if(r.startsWith(s))o=`${n}/${a.slice(e.length+1)}`;else if(!a.startsWith(`/`)){let e=nm(a);o=r.startsWith(c)?a:`${n}/${e}`}}return r?`${o}:${r}${i?`:${i}`:``}`:o}var im=/^[A-Za-z]:[\\/]/,am=/^\\\\/,om=/^([A-Za-z][A-Za-z0-9+.-]*):(.*)$/,sm=/^(~\/|\.{1,2}\/)/,cm=/^[A-Za-z0-9._-]+(?:\/[A-Za-z0-9._-]+)+(?::\d+){0,2}$/,lm=/^[A-Za-z0-9._-]+\.[A-Za-z0-9_-]+(?::\d+){0,2}$/,um=/:\d+(?::\d+)?$/,dm=/^\d+(?::\d+)?$/,fm=[`/Users/`,`/home/`,`/tmp/`,`/var/`,`/etc/`,`/opt/`,`/mnt/`,`/Volumes/`,`/private/`,`/root/`];function pm(e){try{return decodeURIComponent(e)}catch{return e}}function mm(e){let t=e.indexOf(`#`),n=t>=0?e.slice(0,t):e,r=t>=0?e.slice(t):``,i=n.indexOf(`?`);return{path:i>=0?n.slice(0,i):n,hash:r}}function hm(e,t){try{let n=new URL(e);if(n.protocol.toLowerCase()!==`file:`)return null;let r=n.pathname;if(r.length===0)return null;let i=/^\/[A-Za-z]:[\\/]/.test(r)?r.slice(1):r;return{path:t?.decodePath===!1?i:pm(i),hash:n.hash}}catch{return null}}function gm(e){if(!e)return null;let t=hm(e.trim(),{decodePath:!1});return t?`${t.path}${t.hash}`:null}function _m(e){if(!e.startsWith(`/`))return!1;if(fm.some(t=>e.startsWith(t))||um.test(e))return!0;let t=e.slice(e.lastIndexOf(`/`)+1);return/\.[A-Za-z0-9_-]+$/.test(t)}function vm(e,t){if(!t||um.test(e))return e;let n=t.match(/^#L(\d+)(?:C(\d+))?$/i);if(!n?.[1])return e;let r=n[1],i=n[2];return`${e}:${r}${i?`:${i}`:``}`}function ym(e){return im.test(e)||am.test(e)||sm.test(e)?!0:e.startsWith(`/`)?_m(e):cm.test(e)||lm.test(e)}function bm(e){return sm.test(e)||!e.startsWith(`/`)&&!im.test(e)&&!am.test(e)}function xm(e){let t=e.match(om);if(!t)return!1;let n=t[2]??``;return n.startsWith(`//`)?!0:!dm.test(n)}function Sm(e,t){if(!e)return null;let n=e.trim();if(n.length===0||n.startsWith(`#`))return null;let r=n.toLowerCase().startsWith(`file:`)?hm(n):null,i=r??mm(n),a=r?i.path.trim():pm(i.path.trim()),o=pm(i.hash.trim());if(a.length===0||!im.test(a)&&!am.test(a)&&xm(a)||!ym(a))return null;let s=vm(a,o);return bm(s)?t?oe(s,t):null:s}function Cm(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return t>=0?e.slice(t+1):e}function wm(e,t){let n=Sm(e,t);if(!n)return null;let{path:r,line:i,column:a}=se(n),o=i?Number.parseInt(i,10):NaN,s=a?Number.parseInt(a,10):NaN,c=Number.isFinite(o)?o:void 0,l=Number.isFinite(s)?s:void 0;return{filePath:r,targetPath:n,displayPath:rm(n,t),basename:Cm(r),...c===void 0?{}:{line:c},...l===void 0?{}:{column:l}}}var Tm=class extends A.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?this.props.fallback:this.props.children}},Em=[],Dm=/(?:^|\s)language-([^\s]+)/,Om=new Wp(500,52428800),km=new Map;function Am(e){let t=e?.match(Dm)?.[1]??`text`;return t===`gitignore`?`ini`:t}function jm(e){return typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(e=>jm(e)).join(``):(0,A.isValidElement)(e)?jm(e.props.children):``}function Mm(e){let t=A.Children.toArray(e);if(t.length!==1)return null;let n=t[0];return!(0,A.isValidElement)(n)||n.type!==`code`?null:{className:n.props.className,code:jm(n.props.children)}}function Nm(e,t,n){return`${Hp(e).toString(36)}:${e.length}:${t}:${n}`}function Pm(e,t){return Math.max(e.length*2,t.length*3)}function Fm(e){let t=km.get(e);if(t)return t;let n=Cd({themes:[Lp(`dark`),Lp(`light`)],langs:[e],preferredHighlighter:`shiki-js`}).catch(t=>{if(km.delete(e),e===`text`)throw t;return Fm(`text`)});return km.set(e,n),n}function Im(e){let t=(0,O.c)(14),{code:n,children:r}=e,[i,a]=(0,A.useState)(!1),o=(0,A.useRef)(null),s;t[0]===n?s=t[1]:(s=()=>{typeof navigator>`u`||navigator.clipboard==null||navigator.clipboard.writeText(n).then(()=>{o.current!=null&&clearTimeout(o.current),a(!0),o.current=setTimeout(()=>{a(!1),o.current=null},1200)}).catch(Lm)},t[0]=n,t[1]=s);let c=s,l,u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>()=>{o.current!=null&&(clearTimeout(o.current),o.current=null)},u=[],t[2]=l,t[3]=u):(l=t[2],u=t[3]),(0,A.useEffect)(l,u);let f=i?`Copied`:`Copy code`,p=i?`Copied`:`Copy code`,m;t[4]===i?m=t[5]:(m=i?(0,k.jsx)(d,{className:`size-3`}):(0,k.jsx)(h,{className:`size-3`}),t[4]=i,t[5]=m);let g;t[6]!==c||t[7]!==f||t[8]!==p||t[9]!==m?(g=(0,k.jsx)(`button`,{type:`button`,className:`chat-markdown-copy-button`,onClick:c,title:f,"aria-label":p,children:m}),t[6]=c,t[7]=f,t[8]=p,t[9]=m,t[10]=g):g=t[10];let _;return t[11]!==r||t[12]!==g?(_=(0,k.jsxs)(`div`,{className:`chat-markdown-codeblock leading-snug`,children:[g,r]}),t[11]=r,t[12]=g,t[13]=_):_=t[13],_}function Lm(){}function Rm(e){let t=(0,O.c)(13),{className:n,code:r,themeName:i}=e,a,o,s;t[0]!==n||t[1]!==r||t[2]!==i?(o=Am(n),a=Nm(r,o,i),s=Om.get(a),t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=o,t[5]=s):(a=t[3],o=t[4],s=t[5]);let c=s;if(c!=null){let e;return t[6]===c?e=t[7]:(e=(0,k.jsx)(`div`,{className:`chat-markdown-shiki`,dangerouslySetInnerHTML:{__html:c}}),t[6]=c,t[7]=e),e}let l;return t[8]!==a||t[9]!==r||t[10]!==o||t[11]!==i?(l=(0,k.jsx)(zm,{code:r,language:o,themeName:i,cacheKey:a}),t[8]=a,t[9]=r,t[10]=o,t[11]=i,t[12]=l):l=t[12],l}function zm(e){let t=(0,O.c)(18),{code:n,language:r,themeName:i,cacheKey:a}=e,o;t[0]===r?o=t[1]:(o=Fm(r),t[0]=r,t[1]=o);let s=(0,A.use)(o),c;try{let e;t[2]!==n||t[3]!==s||t[4]!==r||t[5]!==i?(e=s.codeToHtml(n,{lang:r,theme:i}),t[2]=n,t[3]=s,t[4]=r,t[5]=i,t[6]=e):e=t[6],c=e}catch(e){let a=e;console.warn(`Code highlighting failed for language "${r}", falling back to plain text.`,a instanceof Error?a.message:a);let o;t[7]!==n||t[8]!==s||t[9]!==i?(o=s.codeToHtml(n,{lang:`text`,theme:i}),t[7]=n,t[8]=s,t[9]=i,t[10]=o):o=t[10],c=o}let l=c,u,d;t[11]!==a||t[12]!==n||t[13]!==l?(u=()=>{Om.set(a,l,Pm(l,n))},d=[a,n,l],t[11]=a,t[12]=n,t[13]=l,t[14]=u,t[15]=d):(u=t[14],d=t[15]),(0,A.useEffect)(u,d);let f;return t[16]===l?f=t[17]:(f=(0,k.jsx)(`div`,{className:`chat-markdown-shiki`,dangerouslySetInnerHTML:{__html:l}}),t[16]=l,t[17]=f),f}function Bm(e){let t=(0,O.c)(6),{className:n,code:r,preProps:i}=e,a;t[0]!==n||t[1]!==r?(a=(0,k.jsx)(`code`,{className:n,children:r}),t[0]=n,t[1]=r,t[2]=a):a=t[2];let o;return t[3]!==i||t[4]!==a?(o=(0,k.jsx)(`pre`,{...i,children:a}),t[3]=i,t[4]=a,t[5]=o):o=t[5],o}var Vm=/\[[^\]]*]\(([^)\s]+)(?:\s+["'][^"']*["'])?\)/g,Hm=`chat-markdown-file-link`,Um=`chat-markdown-file-link-icon`,Wm=`chat-markdown-file-link-label`;function Gm(e){return e.replaceAll(`\\`,`/`).split(`/`).filter(e=>e.length>0).slice(0,-1)}function Km(e){let t=new Map;for(let n of e){let e=n.replaceAll(`\\`,`/`).split(`/`).filter(e=>e.length>0),r=e[e.length-1];if(!r)continue;let i=t.get(r)??new Set;i.add(n),t.set(r,i)}let n=new Map;for(let e of t.values()){let t=[...e];if(t.length<2)continue;let r=new Map(t.map(e=>[e,Gm(e)])),i=new Map;for(let e of t){let n=r.get(e)??[],a=n.length;for(let i=1;i<=n.length;i+=1){let o=n.slice(-i).join(`/`);if(!t.some(t=>t!==e&&(r.get(t)??[]).slice(-i).join(`/`)===o)){a=i;break}}i.set(e,a)}for(let e of t){let t=r.get(e)??[];if(t.length===0)continue;let a=i.get(e)??1,o=Math.min(t.length,Math.max(a,2));n.set(e,t.slice(-o).join(`/`))}}return n}function qm(e){let t=[];for(let n of e.matchAll(Vm)){let e=n[1]?.trim();e&&t.push(e)}return t}function Jm(e){return gm(e.trim())??e.trim()}var Ym=(0,A.memo)(function(e){let t=(0,O.c)(43),{href:n,targetPath:r,displayPath:i,filePath:a,label:o,theme:c,className:l}=e,u;t[0]===r?u=t[1]:(u=()=>{let e=s();if(!e){m.add({type:`error`,title:`Open in editor is unavailable`});return}pe(e,r).catch(eh)},t[0]=r,t[1]=u);let d=u,f=th,p;t[2]!==i||t[3]!==d||t[4]!==r?(p=async e=>{let t=s();if(!t)return;let n=await t.contextMenu.show([{id:`open`,label:`Open in editor`},{id:`copy-relative`,label:`Copy relative path`},{id:`copy-full`,label:`Copy full path`}],e);if(n===`open`){d();return}if(n===`copy-relative`){f(i,`Relative path`);return}n===`copy-full`&&f(r,`Full path`)},t[2]=i,t[3]=d,t[4]=r,t[5]=p):p=t[5];let h=p,g;t[6]===h?g=t[7]:(g=e=>{e.preventDefault(),e.stopPropagation(),h({x:e.clientX,y:e.clientY})},t[6]=h,t[7]=g);let _=g,v=fe()===`phone`,y;t[8]===h?y=t[9]:(y=e=>{h(e)},t[8]=h,t[9]=y);let b=!v,x;t[10]===b?x=t[11]:(x={disabled:b},t[10]=b,t[11]=x);let S=me(y,x),C;t[12]===l?C=t[13]:(C=w(Hm,l),t[12]=l,t[13]=C);let ee=S.onPointerDown,te=S.onPointerMove,ne=S.onPointerUp,re=S.onPointerCancel,ie=S.onPointerLeave,ae=S.onClickCapture,oe;t[14]===d?oe=t[15]:(oe=e=>{e.preventDefault(),e.stopPropagation(),d()},t[14]=d,t[15]=oe);let se;t[16]!==_||t[17]!==S?(se=e=>{S.onContextMenu(e),!e.defaultPrevented&&_(e)},t[16]=_,t[17]=S,t[18]=se):se=t[18];let ce;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(ce=w(Um,`text-current`),t[19]=ce):ce=t[19];let T;t[20]!==a||t[21]!==c?(T=(0,k.jsx)(pp,{pathValue:a,kind:`file`,theme:c,className:ce}),t[20]=a,t[21]=c,t[22]=T):T=t[22];let E;t[23]===o?E=t[24]:(E=(0,k.jsx)(`span`,{className:Wm,children:o}),t[23]=o,t[24]=E);let D;t[25]!==n||t[26]!==S.onClickCapture||t[27]!==S.onPointerCancel||t[28]!==S.onPointerDown||t[29]!==S.onPointerLeave||t[30]!==S.onPointerMove||t[31]!==S.onPointerUp||t[32]!==oe||t[33]!==se||t[34]!==T||t[35]!==E||t[36]!==C?(D=(0,k.jsx)(le,{render:(0,k.jsxs)(`a`,{href:n,className:C,onPointerDown:ee,onPointerMove:te,onPointerUp:ne,onPointerCancel:re,onPointerLeave:ie,onClickCapture:ae,onClick:oe,onContextMenu:se,children:[T,E]})}),t[25]=n,t[26]=S.onClickCapture,t[27]=S.onPointerCancel,t[28]=S.onPointerDown,t[29]=S.onPointerLeave,t[30]=S.onPointerMove,t[31]=S.onPointerUp,t[32]=oe,t[33]=se,t[34]=T,t[35]=E,t[36]=C,t[37]=D):D=t[37];let he;t[38]===i?he=t[39]:(he=(0,k.jsx)(ue,{side:`top`,className:`max-w-[min(40rem,calc(100vw-2rem))] font-mono text-[11px] leading-tight`,children:(0,k.jsx)(`div`,{className:`markdown-file-link-tooltip-scroll overflow-x-auto whitespace-nowrap`,children:i})}),t[38]=i,t[39]=he);let ge;return t[40]!==D||t[41]!==he?(ge=(0,k.jsxs)(de,{children:[D,he]}),t[40]=D,t[41]=he,t[42]=ge):ge=t[42],ge},Xm);function Xm(e,t){return e.href===t.href&&e.targetPath===t.targetPath&&e.displayPath===t.displayPath&&e.filePath===t.filePath&&e.label===t.label&&e.theme===t.theme&&e.className===t.className}function Zm(e){let t=(0,O.c)(3),n=!!e.isStreaming,r=Xp(e.text,n),i=(0,A.useDeferredValue)(r),a=n?i:r,o;return t[0]!==a||t[1]!==e?(o=(0,k.jsx)(Qm,{...e,text:a}),t[0]=a,t[1]=e,t[2]=o):o=t[2],o}var Qm=(0,A.memo)(function({text:e,cwd:t,isStreaming:n=!1,skills:r=Em,searchHighlight:i}){f(`ChatMarkdown`);let{resolvedTheme:a}=D(),o=Lp(a),s=(0,A.useRef)({occurrenceIndex:0});s.current.occurrenceIndex=0;let c=(0,A.useRef)(void 0);c.current=i?{...i,cursor:s.current,keyPrefix:`chat-markdown`}:void 0;let l=(0,A.useMemo)(()=>{let n=new Map;for(let r of qm(e)){let e=Jm(r);if(n.has(e))continue;let i=wm(e,t);i&&n.set(e,i)}return n},[t,e]),u=(0,A.useMemo)(()=>Km([...l.values()].map(e=>e.filePath)),[l]),d=(0,A.useCallback)(e=>gm(e)??ee(e),[]),p=(0,A.useMemo)(()=>({p({node:e,children:t,...n}){return(0,k.jsx)(`p`,{...n,children:Pp(t,r,c.current)})},li({node:e,children:t,...n}){return(0,k.jsx)(`li`,{...n,children:Pp(t,r,c.current)})},blockquote({node:e,children:t,...n}){return(0,k.jsx)(`blockquote`,{...n,children:Pp(t,r,c.current)})},table({node:e,children:t,...n}){return(0,k.jsx)(`div`,{className:`chat-markdown-table-scroll`,children:(0,k.jsx)(`table`,{...n,children:t})})},td({node:e,children:t,...n}){return(0,k.jsx)(`td`,{...n,children:Pp(t,r,c.current)})},th({node:e,children:t,...n}){return(0,k.jsx)(`th`,{...n,children:Pp(t,r,c.current)})},a({node:e,href:t,...n}){let i=t?Jm(t):``,o=i?l.get(i):null;if(!o)return(0,k.jsx)(`a`,{...n,href:t,target:`_blank`,rel:`noopener noreferrer`,children:Pp(n.children,r,c.current)});let s=u.get(o.filePath),d=[o.basename];return typeof s==`string`&&s.length>0&&d.push(s),o.line&&(o.line!==1||o.column)&&d.push(`L${o.line}${o.column?`:C${o.column}`:``}`),(0,k.jsx)(Ym,{href:t??o.targetPath,targetPath:o.targetPath,displayPath:o.displayPath,filePath:o.filePath,label:d.join(` · `),theme:a,className:n.className})},pre({node:e,children:t,...r}){let i=Mm(t);return i?n?(0,k.jsx)(Im,{code:i.code,children:(0,k.jsx)(Bm,{className:i.className,code:i.code,preProps:r})}):(0,k.jsx)(Im,{code:i.code,children:(0,k.jsx)(Tm,{fallback:(0,k.jsx)(`pre`,{...r,children:t}),children:(0,k.jsx)(A.Suspense,{fallback:(0,k.jsx)(`pre`,{...r,children:t}),children:(0,k.jsx)(Rm,{className:i.className,code:i.code,themeName:o})})})}):(0,k.jsx)(`pre`,{...r,children:t})}}),[o,u,n,l,a,r]);return(0,k.jsx)(`div`,{className:`chat-markdown w-full min-w-0 text-sm leading-relaxed text-foreground/80`,children:(0,k.jsx)(_,{remarkPlugins:[re],components:p,urlTransform:d,children:e})})}),$m=(0,A.memo)(Zm);function eh(e){m.add(T({type:`error`,title:`Unable to open file`,description:e instanceof Error?e.message:`An error occurred.`}))}function th(e,t){if(typeof window>`u`||!navigator.clipboard?.writeText){m.add(T({type:`error`,title:`Failed to copy ${t.toLowerCase()}`,description:`Clipboard API unavailable.`}));return}navigator.clipboard.writeText(e).then(()=>{m.add({type:`success`,title:`${t} copied`,description:e})},e=>{m.add(T({type:`error`,title:`Failed to copy ${t.toLowerCase()}`,description:e instanceof Error?e.message:`An error occurred.`}))})}var nh=e(t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):r((n||=self).lru_map=n.lru_map||{})})(e,function(e){let t=Symbol(`newer`),n=Symbol(`older`);class r{constructor(e,t){typeof e!=`number`&&(t=e,e=0),this.size=0,this.limit=e,this.oldest=this.newest=void 0,this._keymap=new Map,t&&(this.assign(t),e<1&&(this.limit=this.size))}_markEntryAsUsed(e){e!==this.newest&&(e[t]&&(e===this.oldest&&(this.oldest=e[t]),e[t][n]=e[n]),e[n]&&(e[n][t]=e[t]),e[t]=void 0,e[n]=this.newest,this.newest&&(this.newest[t]=e),this.newest=e)}assign(e){let r,a=this.limit||Number.MAX_VALUE;this._keymap.clear();let o=e[Symbol.iterator]();for(let e=o.next();!e.done;e=o.next()){let o=new i(e.value[0],e.value[1]);if(this._keymap.set(o.key,o),r?(r[t]=o,o[n]=r):this.oldest=o,r=o,a--==0)throw Error(`overflow`)}this.newest=r,this.size=this._keymap.size}get(e){var t=this._keymap.get(e);return t?(this._markEntryAsUsed(t),t.value):void 0}set(e,r){var a=this._keymap.get(e);return a?(a.value=r,this._markEntryAsUsed(a),this):(this._keymap.set(e,a=new i(e,r)),this.newest?(this.newest[t]=a,a[n]=this.newest):this.oldest=a,this.newest=a,++this.size,this.size>this.limit&&this.shift(),this)}shift(){var e=this.oldest;if(e)return this.oldest[t]?(this.oldest=this.oldest[t],this.oldest[n]=void 0):(this.oldest=void 0,this.newest=void 0),e[t]=e[n]=void 0,this._keymap.delete(e.key),--this.size,[e.key,e.value]}find(e){let t=this._keymap.get(e);return t?t.value:void 0}has(e){return this._keymap.has(e)}delete(e){var r=this._keymap.get(e);return r?(this._keymap.delete(r.key),r[t]&&r[n]?(r[n][t]=r[t],r[t][n]=r[n]):r[t]?(r[t][n]=void 0,this.oldest=r[t]):r[n]?(r[n][t]=void 0,this.newest=r[n]):this.oldest=this.newest=void 0,this.size--,r.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new o(this.oldest)}values(){return new s(this.oldest)}entries(){return this}[Symbol.iterator](){return new a(this.oldest)}forEach(e,n){typeof n!=`object`&&(n=this);let r=this.oldest;for(;r;)e.call(n,r.value,r.key,this),r=r[t]}toJSON(){for(var e=Array(this.size),n=0,r=this.oldest;r;)e[n++]={key:r.key,value:r.value},r=r[t];return e}toString(){for(var e=``,n=this.oldest;n;)e+=String(n.key)+`:`+n.value,n=n[t],n&&(e+=` < `);return e}}e.LRUMap=r;function i(e,r){this.key=e,this.value=r,this[t]=void 0,this[n]=void 0}function a(e){this.entry=e}a.prototype[Symbol.iterator]=function(){return this},a.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:[e.key,e.value]}):{done:!0,value:void 0}};function o(e){this.entry=e}o.prototype[Symbol.iterator]=function(){return this},o.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.key}):{done:!0,value:void 0}};function s(e){this.entry=e}s.prototype[Symbol.iterator]=function(){return this},s.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.value}):{done:!0,value:void 0}}})}))(),1),rh=Symbol(`IGNORE_RESPONSE`),ih=class extends Error{constructor(){super(`WorkerPoolManager: operation canceled because the pool terminated`)}},ah=class extends Error{constructor(){super(`WorkerPoolManager: operation canceled before the task completed`)}},oh=class{options;highlighter;preferredHighlighter;renderOptions;renderOptionsRequestVersion=0;renderOptionsVersion=0;initialized=!1;workers=[];queuedTasks=[];queuedTaskByInstance=new Map;taskByHighlightKey=new Map;activeTaskById=new Map;activeRequestByInstance=new Map;nextRequestId=0;themeSubscribers=new Set;workersFailed=!1;statSubscribers=new Set;fileCache;diffCache;_queuedBroadcast;lifecycleGeneration=0;constructor(e,{langs:t,theme:n=Ue,useTokenTransformer:r=!1,lineDiffType:i=`word-alt`,maxLineDiffLength:a=1e3,tokenizeMaxLineLength:o=1e3,preferredHighlighter:s=`shiki-js`}){this.options=e,this.preferredHighlighter=s,this.renderOptions={theme:n,useTokenTransformer:r,lineDiffType:i,maxLineDiffLength:a,tokenizeMaxLineLength:o},this.fileCache=new nh.default.LRUMap(e.totalASTLRUCacheSize??100),this.diffCache=new nh.default.LRUMap(e.totalASTLRUCacheSize??100),this.queueInitialization(t)}isWorkingPool(){return!this.workersFailed}getFileResultCache(e){return e.cacheKey==null?void 0:this.fileCache.get(e.cacheKey)}getDiffResultCache(e){return e.cacheKey==null?void 0:this.diffCache.get(e.cacheKey)}inspectCaches(){let{fileCache:e,diffCache:t}=this;return{fileCache:e,diffCache:t}}evictFileFromCache(e){try{return this.fileCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}evictDiffFromCache(e){try{return this.diffCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}async setRenderOptions({theme:e=this.renderOptions.theme??Ue,useTokenTransformer:t=this.renderOptions.useTokenTransformer??!1,lineDiffType:n=this.renderOptions.lineDiffType??`word-alt`,maxLineDiffLength:r=this.renderOptions.maxLineDiffLength??1e3,tokenizeMaxLineLength:i=this.renderOptions.tokenizeMaxLineLength??1e3}){let{lifecycleGeneration:a}=this,o=++this.renderOptionsRequestVersion,s=()=>this.isCurrentLifecycle(a)&&this.renderOptionsRequestVersion===o;try{let a={theme:e,useTokenTransformer:t,lineDiffType:n,maxLineDiffLength:r,tokenizeMaxLineLength:i};if(this.isInitialized()||await this.initialize(),!s()||kf(a,this.renderOptions))return;let o=Ed(e),c=[];if($e(a.theme,this.renderOptions.theme)||(c=Dd(o)?sp(o):await cp(o)),!s())return;if(this.highlighter!=null)Qu(c,this.highlighter);else{let e=await Cd({themes:o,langs:[`text`],preferredHighlighter:this.preferredHighlighter});if(!s())return;this.highlighter=e}let l=this.setRenderOptionsOnWorkers(a,c);this.renderOptions=a,this.renderOptionsVersion++,this.diffCache.clear(),this.fileCache.clear(),this.invalidateRenderTasks();for(let e of this.themeSubscribers)e.onThemeChange();await l}catch(e){if(e instanceof ih||!s())return;throw e}}getPreferredHighlighter(){return this.preferredHighlighter}getFileRenderOptions(){let{tokenizeMaxLineLength:e,theme:t,useTokenTransformer:n}=this.renderOptions;return{theme:t,useTokenTransformer:n,tokenizeMaxLineLength:e}}getDiffRenderOptions(){return{...this.renderOptions}}async setRenderOptionsOnWorkers(e,t){if(this.workersFailed)return;this.isInitialized()||await this.initialize();let n=[];for(let r of this.workers){if(!r.initialized)throw console.log({managedWorker:r}),Error(`setRenderOptionsOnWorkers: Somehow we have an uninitialized worker`);n.push(new Promise((n,i)=>{let a=this.generateRequestId(),o={type:`set-render-options`,id:a,request:{type:`set-render-options`,id:a,renderOptions:e,resolvedThemes:t},resolve:n,reject:i,requestStart:Date.now()};this.activeTaskById.set(a,o),r.pendingSetupRequestId=a,r.worker.postMessage(o.request)}))}await Promise.all(n)}subscribeToThemeChanges(e){return this.themeSubscribers.add(e),this.queueBroadcastStateChanges(),()=>{this.unsubscribeToThemeChanges(e),this.queueBroadcastStateChanges()}}unsubscribeToThemeChanges(e){this.themeSubscribers.delete(e),this.queueBroadcastStateChanges()}subscribeToStatChanges(e){return this.statSubscribers.add(e),e(this.getStats()),()=>{this.statSubscribers.delete(e)}}queueBroadcastStateChanges(){this._queuedBroadcast??=requestAnimationFrame(this._broadcastStateChanges)}_broadcastStateChanges=()=>{this._queuedBroadcast!=null&&(cancelAnimationFrame(this._queuedBroadcast),this._queuedBroadcast=void 0);let e=this.getStats();for(let t of this.statSubscribers)t(e)};cleanUpTasks(e){this.detachInstanceFromQueuedTasks(e);let t=this.activeRequestByInstance.get(e);if(t!=null){let n=this.activeTaskById.get(t);lh(n)?(this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeActiveTask(n)):this.activeTaskById.delete(t)}this.activeRequestByInstance.delete(e),this.queueBroadcastStateChanges()}isInitialized(){return this.initialized===!0}async initialize(e=[]){if(this.initialized!==!0){if(this.initialized===!1){let{lifecycleGeneration:t}=this;this.initialized=new Promise((n,r)=>{(async()=>{try{let r=Ed(this.renderOptions.theme),i=[];if(i=Dd(r)?sp(r):await cp(r),!this.isCurrentLifecycle(t)){n();return}let a=[];if(a=ap(e)?ip(e):await op(e),!this.isCurrentLifecycle(t)){n();return}let[o]=await Promise.all([Cd({themes:r,langs:[`text`,...e],preferredHighlighter:this.preferredHighlighter}),this.initializeWorkers(i,a)]);if(!this.isCurrentLifecycle(t)){this.terminateWorkers(),n();return}this.highlighter=o,this.initialized=!0,this.diffCache.clear(),this.fileCache.clear(),this.drainQueue(),this.queueBroadcastStateChanges(),n()}catch(e){if(e instanceof ih||!this.isCurrentLifecycle(t)){n();return}this.initialized=!1,this.workersFailed=!0;for(let t of this.queuedTasks)this.rejectRenderTaskCallbacks(t,dh(e));this.queueBroadcastStateChanges(),r(e)}})()}),this.queueBroadcastStateChanges()}else return this.initialized}}async initializeWorkers(e,t){this.workersFailed=!1;let n=[],r=Md(),i=r>0?Nd():void 0;this.workers.length>0&&this.terminateWorkers();for(let a=0;a<(this.options.poolSize??8);a++){let a=this.options.workerFactory(),o={worker:a,requestId:void 0,pendingSetupRequestId:void 0,initialized:!1,langs:new Set([`text`,...t.map(({name:e})=>e)]),customExtensionsVersion:0};a.addEventListener(`message`,e=>{this.handleWorkerMessage(o,e.data)}),a.addEventListener(`error`,e=>console.error(`Worker error:`,e,o)),this.workers.push(o),n.push(new Promise((n,a)=>{let s=this.generateRequestId(),c={type:`initialize`,id:s,request:{type:`initialize`,id:s,renderOptions:this.renderOptions,preferredHighlighter:this.preferredHighlighter,resolvedThemes:e,resolvedLanguages:t,customExtensionsVersion:i==null?void 0:r,customExtensionMap:i},resolve(){o.initialized=!0,n()},reject:a,requestStart:Date.now()};this.activeTaskById.set(s,c),this.executeTask(o,c)}))}await Promise.all(n)}drainQueue=()=>{if(this._queuedDrain=void 0,this.initialized===!0&&this.queuedTasks.length!==0){for(let e=0;e<this.queuedTasks.length;){let t=this.queuedTasks[e];if(this.hasActiveRequest(t)){e++;continue}let n=ch(t),r=this.getAvailableWorker(n);if(r==null)break;this.queuedTasks.splice(e,1),this.assignWorkerToTask(t,r),this.resolveLanguagesAndExecuteTask(r,t,n)}this.queueBroadcastStateChanges()}};highlightFileAST(e,t){let n=this.getFileResultCache(t);Sf(t)||n!=null&&Od(n.options,this.getFileRenderOptions())||this.hasMatchingFileInstanceTask(e,t)||this.submitTask(e,{type:`file`,file:t})}primeFileHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(Error(`WorkerPoolManager.primeFileHighlightCache: worker pool is not working`));let t=this.getOrCreateFileHighlightCacheTask(e);return t==null?Promise.resolve():this.createRenderTaskCallbacks(t)}getOrCreateFileHighlightCacheTask(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeFileHighlightCache: priming highlight cache requires file.cacheKey; skipping "${e.name}".`);return}let t=this.getFileResultCache(e),n=this.getFileHighlightKey(e);if(n==null||Sf(e)||t!=null&&Od(t.options,this.getFileRenderOptions()))return;let r=this.getTaskByHighlightKey(n);if(r!=null)return r.primeCache=!0,r.type===`file`?r:void 0;{let t=this.submitCacheTask({type:`file`,file:e},n);return t.type===`file`?t:void 0}}getPlainFileAST(e,t,n,r){if(this.highlighter==null){this.queueInitialization();return}return bf(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,lines:r})}highlightDiffAST(e,t){let n=this.getDiffResultCache(t);rp(t)||n!=null&&kf(n.options,this.getDiffRenderOptions())||this.hasMatchingDiffInstanceTask(e,t)||this.submitTask(e,{type:`diff`,diff:t})}primeDiffHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(Error(`WorkerPoolManager.primeDiffHighlightCache: worker pool is not working`));let t=this.getOrCreateDiffHighlightCacheTask(e);return t==null?Promise.resolve():this.createRenderTaskCallbacks(t)}getOrCreateDiffHighlightCacheTask(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeDiffHighlightCache: priming highlight cache requires diff.cacheKey; skipping "${e.prevName??e.name}" -> "${e.name}".`);return}let t=this.getDiffResultCache(e),n=this.getDiffHighlightKey(e);if(n==null||rp(e)||t!=null&&kf(t.options,this.getDiffRenderOptions()))return;let r=this.getTaskByHighlightKey(n);if(r!=null)return r.primeCache=!0,r.type===`diff`?r:void 0;{let t=this.submitCacheTask({type:`diff`,diff:e},n);return t.type===`diff`?t:void 0}}getPlainDiffAST(e,t,n,r,i){return this.highlighter==null?void 0:$f(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,expandedHunks:r,collapsedContextThreshold:i})}terminate(){this.lifecycleGeneration++,this.cancelActiveWorkerTasks(),this.terminateWorkers();let e=new ih;for(let t of this.queuedTasks)this.rejectRenderTaskCallbacks(t,e);this.fileCache.clear(),this.diffCache.clear(),this.activeRequestByInstance.clear(),this.queuedTasks.length=0,this.queuedTaskByInstance.clear(),this.taskByHighlightKey.clear(),this.activeTaskById.clear(),this.highlighter=void 0,this.initialized=!1,this.workersFailed=!1,this.queueBroadcastStateChanges()}isCurrentLifecycle(e){return this.lifecycleGeneration===e}queueInitialization(e){this.initialize(e).catch(e=>{console.error(e)})}cancelActiveWorkerTasks(){let e=new ih;for(let t of this.activeTaskById.values())`reject`in t?t.reject(e):lh(t)&&this.rejectRenderTaskCallbacks(t,e)}terminateWorkers(){for(let e of this.workers)e.worker.terminate();this.workers.length=0}getStats(){return{managerState:this.initialized===!1?`waiting`:this.initialized===!0?`initialized`:`initializing`,totalWorkers:this.workers.length,workersFailed:this.workersFailed,busyWorkers:this.workers.filter(e=>e.requestId!=null||e.pendingSetupRequestId!=null).length,queuedTasks:this.queuedTasks.length,activeTasks:this.activeTaskById.size,themeSubscribers:this.themeSubscribers.size,fileCacheSize:this.fileCache.size,diffCacheSize:this.diffCache.size}}submitTask(e,t){this.initialized===!1&&this.queueInitialization();let n=this.getHighlightKeyForRequest(t),r=n==null?void 0:this.getTaskByHighlightKey(n);if(r!=null){this.detachInstanceFromQueuedTasks(e,r),this.addInstanceToTask(r,e),this.queueBroadcastStateChanges();return}this.detachInstanceFromQueuedTasks(e);let i=this.generateRequestId(),a=Date.now(),{renderOptionsVersion:o}=this,s=(()=>{switch(t.type){case`file`:return{type:`file`,id:i,request:{...t,id:i},instances:new Set([e]),primeCache:!1,highlightKey:n,callbacks:new Set,renderOptionsVersion:o,requestStart:a};case`diff`:return{type:`diff`,id:i,request:{...t,id:i},instances:new Set([e]),primeCache:!1,highlightKey:n,callbacks:new Set,renderOptionsVersion:o,requestStart:a}}})();this.enqueueRenderTask(s,e)}submitCacheTask(e,t){this.initialized===!1&&this.queueInitialization();let n=this.generateRequestId(),r=Date.now(),{renderOptionsVersion:i}=this,a=(()=>{switch(e.type){case`file`:return{type:`file`,id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,callbacks:new Set,renderOptionsVersion:i,requestStart:r};case`diff`:return{type:`diff`,id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,callbacks:new Set,renderOptionsVersion:i,requestStart:r}}})();return this.enqueueRenderTask(a),a}enqueueRenderTask(e,t){this.queuedTasks.push(e),t!=null&&this.queuedTaskByInstance.set(t,e),e.highlightKey!=null&&this.taskByHighlightKey.set(e.highlightKey,e),this.queueDrain()}async resolveLanguagesAndExecuteTask(e,t,n){try{let r=n.filter(t=>!e.langs.has(t));if(r.length>0&&(ap(r)?t.request.resolvedLanguages=ip(r):t.request.resolvedLanguages=await op(r)),!this.activeTaskById.has(t.id)){e.requestId===t.id&&(this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain());return}this.executeTask(e,t)}catch(n){this.rejectRenderTaskCallbacks(t,dh(n)),this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}}handleWorkerMessage(e,t){let n=this.activeTaskById.get(t.id);try{if(n==null)throw rh;if(t.type===`error`){let e=Error(t.error);if(t.stack&&(e.stack=t.stack),`reject`in n)n.reject(e);else if(lh(n))this.notifyHighlightError(n,e),this.rejectRenderTaskCallbacks(n,e);else throw Error(`handleWorkerMessage: unknown task type`);throw e}switch(t.requestType){case`initialize`:if(n.type!==`initialize`)throw Error(`handleWorkerMessage: task/response dont match`);this.syncCustomExtensionVersion(e,n.request),n.resolve();break;case`set-render-options`:if(n.type!==`set-render-options`)throw Error(`handleWorkerMessage: task/response dont match`);n.resolve();break;case`file`:{if(n.type!==`file`)throw Error(`handleWorkerMessage: task/response dont match`);let{result:r,options:i}=t;if(!this.isCurrentRenderTask(n)||!Od(i,this.getFileRenderOptions()))throw rh;let{request:a}=n;this.syncCustomExtensionVersion(e,a),n.cacheKeyAtDispatch!=null&&this.fileCache.set(n.cacheKeyAtDispatch,{result:r,options:i}),this.resolveRenderTaskCallbacks(n),this.notifyFileInstances(n,r,i);break}case`diff`:{if(n.type!==`diff`)throw Error(`handleWorkerMessage: task/response dont match`);let{result:r,options:i}=t;if(!this.isCurrentRenderTask(n)||!kf(i,this.getDiffRenderOptions()))throw rh;let{request:a}=n;this.syncCustomExtensionVersion(e,a),n.cacheKeyAtDispatch!=null&&this.diffCache.set(n.cacheKeyAtDispatch,{result:r,options:i}),this.resolveRenderTaskCallbacks(n),this.notifyDiffInstances(n,r,i);break}}}catch(e){e!==rh&&console.error(e,n,t)}this.cleanWorkerAndTask(e,n,t.id),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}_queuedDrain;queueDrain(){this._queuedDrain??(this._queuedDrain=Promise.resolve().then(this.drainQueue),this.queueBroadcastStateChanges())}assignWorkerToTask(e,t){t.requestId=e.id,lh(e)&&(this.clearQueuedInstanceRequests(e),this.trackInstanceRequests(e)),this.activeTaskById.set(e.id,e)}cleanWorkerAndTask(e,t,n=t?.id){e.requestId===n&&(e.requestId=void 0),e.pendingSetupRequestId===n&&(e.pendingSetupRequestId=void 0),t!=null&&(lh(t)&&(this.rejectRenderTaskCallbacks(t,new ah),this.clearInstanceRequests(t),this.clearHighlightKey(t)),this.activeTaskById.delete(t.id))}executeTask(e,t){sh(t.request)&&this.maybeAttachCustomExtensions(e,t.request),this.activeTaskById.has(t.id)||this.assignWorkerToTask(t,e);for(let n of ch(t))e.langs.add(n);try{t.type===`file`?t.cacheKeyAtDispatch=t.request.file.cacheKey:t.type===`diff`&&(t.cacheKeyAtDispatch=t.request.diff.cacheKey),e.worker.postMessage(t.request)}catch(n){console.error(`Failed to post message to worker:`,n),lh(t)?(this.notifyHighlightError(t,n),this.rejectRenderTaskCallbacks(t,dh(n))):`reject`in t&&t.reject(n),this.cleanWorkerAndTask(e,t),this.queuedTasks.length>0&&this.queueDrain()}this.queueBroadcastStateChanges()}maybeAttachCustomExtensions(e,t){if(t.customExtensionsVersion!=null)return;let n=Md();e.customExtensionsVersion>=n||(t.customExtensionsVersion=n,t.customExtensionMap=Nd())}syncCustomExtensionVersion(e,t){t.customExtensionsVersion!=null&&(e.customExtensionsVersion=t.customExtensionsVersion)}getAvailableWorker(e){let t;for(let n of this.workers){if(n.requestId!=null||n.pendingSetupRequestId!=null||!n.initialized)continue;if(t=n,e.length===0)break;let r=!0;for(let t of e)if(!n.langs.has(t)){r=!1;break}if(r)break}return t}getFileHighlightKey(e){if(e.cacheKey!=null)return`file:${e.cacheKey}:${this.renderOptionsVersion}`}getDiffHighlightKey(e){if(e.cacheKey!=null)return`diff:${e.cacheKey}:${this.renderOptionsVersion}`}getHighlightKeyForRequest(e){switch(e.type){case`file`:return this.getFileHighlightKey(e.file);case`diff`:return this.getDiffHighlightKey(e.diff)}}hasActiveRequest(e){for(let t of uh(e))if(this.activeRequestByInstance.has(t))return!0;return!1}addInstanceToTask(e,t){e.type,e.instances.add(t),this.activeTaskById.has(e.id)?this.activeRequestByInstance.set(t,e.id):this.queuedTaskByInstance.set(t,e)}detachInstanceFromQueuedTasks(e,t){let n=this.queuedTaskByInstance.get(e);n!=null&&n!==t&&(this.queuedTaskByInstance.delete(e),this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeQueuedTask(n))}detachInstanceFromRenderTask(e,t){e.type,e.instances.delete(t)}removeQueuedTask(e){let t=this.queuedTasks.indexOf(e);t!==-1&&this.queuedTasks.splice(t,1),this.rejectRenderTaskCallbacks(e,new ah),this.clearQueuedInstanceRequests(e),this.clearHighlightKey(e)}removeActiveTask(e){this.rejectRenderTaskCallbacks(e,new ah),this.clearInstanceRequests(e),this.clearHighlightKey(e),this.activeTaskById.delete(e.id)}createRenderTaskCallbacks(e){return new Promise((t,n)=>{e.callbacks.add({resolve:t,reject:n})})}resolveRenderTaskCallbacks(e){for(let t of e.callbacks)t.resolve();e.callbacks.clear()}rejectRenderTaskCallbacks(e,t){for(let n of e.callbacks)n.reject(t);e.callbacks.clear()}invalidateRenderTasks(){for(let e=this.queuedTasks.length-1;e>=0;e--){let t=this.queuedTasks[e];t.renderOptionsVersion!==this.renderOptionsVersion&&this.removeQueuedTask(t)}for(let e of Array.from(this.activeTaskById.values()))lh(e)&&e.renderOptionsVersion!==this.renderOptionsVersion&&this.removeActiveTask(e)}clearQueuedInstanceRequests(e){for(let t of uh(e))this.queuedTaskByInstance.get(t)===e&&this.queuedTaskByInstance.delete(t)}clearHighlightKey(e){e.highlightKey!=null&&this.taskByHighlightKey.get(e.highlightKey)===e&&this.taskByHighlightKey.delete(e.highlightKey)}trackInstanceRequests(e){for(let t of uh(e))this.activeRequestByInstance.set(t,e.id)}clearInstanceRequests(e){for(let t of uh(e))this.activeRequestByInstance.get(t)===e.id&&this.activeRequestByInstance.delete(t)}notifyFileInstances(e,t,n){for(let r of e.instances)this.activeRequestByInstance.get(r)===e.id&&r.onHighlightSuccess(e.request.file,t,n)}notifyDiffInstances(e,t,n){for(let r of e.instances)this.activeRequestByInstance.get(r)===e.id&&r.onHighlightSuccess(e.request.diff,t,n)}notifyHighlightError(e,t){for(let n of uh(e))this.activeRequestByInstance.get(n)===e.id&&n.onHighlightError(t)}hasMatchingFileInstanceTask(e,t){for(let n of this.iterateRenderTasks())if(n.type===`file`&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&Ft(t,n.request.file))return!0;return!1}hasMatchingDiffInstanceTask(e,t){for(let n of this.iterateRenderTasks())if(n.type===`diff`&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&Of(n.request.diff,t))return!0;return!1}getTaskByHighlightKey(e){let t=this.taskByHighlightKey.get(e);return t!=null&&this.isCurrentRenderTask(t)?t:void 0}isCurrentRenderTask(e){return e.renderOptionsVersion===this.renderOptionsVersion}*iterateRenderTasks(){for(let e of this.queuedTasks)yield e;for(let e of this.activeTaskById.values())lh(e)&&(yield e)}generateRequestId(){return`req_${++this.nextRequestId}`}};function sh(e){return e.type===`initialize`||e.type===`file`||e.type===`diff`}function ch(e){let t=new Set;if(e.type===`initialize`||e.type===`set-render-options`)return[];switch(e.type){case`file`:t.add(e.request.file.lang??X(e.request.file.name));break;case`diff`:t.add(e.request.diff.lang??X(e.request.diff.name)),t.add(e.request.diff.lang??X(e.request.diff.prevName??`-`))}return t.delete(`text`),Array.from(t)}function lh(e){return e?.type===`file`||e?.type===`diff`}function uh(e){return e.instances}function dh(e){return e instanceof Error?e:Error(String(e))}var fh;function ph({poolOptions:e,highlighterOptions:t}){return fh??=new oh(e,t),fh}function mh(){fh!=null&&(fh.terminate(),fh=void 0)}var hh=(0,A.createContext)(void 0),gh=0;function _h({children:e,poolOptions:t,highlighterOptions:n}){let[r]=(0,A.useState)(()=>{if(!(typeof window>`u`))return ph({poolOptions:t,highlighterOptions:n})});return(0,A.useInsertionEffect)(()=>{if(r!=null)return gh++,()=>{gh--}},[r]),(0,A.useEffect)(()=>()=>{gh===0&&mh()},[]),(0,k.jsx)(hh.Provider,{value:r,children:e})}function vh(){return(0,A.useContext)(hh)}function yh(e){let t=(0,O.c)(6),n;bb0:{if(!e){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=[],t[0]=e):e=t[0],n=e;break bb0}n=e.turnDiffSummaries}let r=n,i;t[1]===r?i=t[2]:(i=ce(r),t[1]=r,t[2]=i);let a=i,o;return t[3]!==a||t[4]!==r?(o={turnDiffSummaries:r,inferredCheckpointTurnCountByTurnId:a},t[3]=a,t[4]=r,t[5]=o):o=t[5],o}function bh(e){return w(`flex items-center justify-between gap-2 px-4`,o&&e!==`sheet`&&e!==`phone`?`drag-region h-[52px] border-b border-border wco:h-[env(titlebar-area-height)] wco:pr-[calc(100vw-env(titlebar-area-width)-env(titlebar-area-x)+1em)]`:`h-12 wco:max-h-[env(titlebar-area-height)]`)}function xh(e){let t=(0,O.c)(10),n=o&&e.mode!==`sheet`&&e.mode!==`phone`,r=e.mode===`inline`?`w-[42vw] min-w-[360px] max-w-[560px] shrink-0 border-l border-border`:`w-full`,i;t[0]===r?i=t[1]:(i=w(`flex h-full min-w-0 flex-col bg-background`,r),t[0]=r,t[1]=i);let a;t[2]!==e.header||t[3]!==e.mode||t[4]!==n?(a=n?(0,k.jsx)(`div`,{className:bh(e.mode),children:e.header}):(0,k.jsx)(`div`,{className:`border-b border-border`,children:(0,k.jsx)(`div`,{className:bh(e.mode),children:e.header})}),t[2]=e.header,t[3]=e.mode,t[4]=n,t[5]=a):a=t[5];let s;return t[6]!==e.children||t[7]!==i||t[8]!==a?(s=(0,k.jsxs)(`div`,{className:i,children:[a,e.children]}),t[6]=e.children,t[7]=i,t[8]=a,t[9]=s):s=t[9],s}function Sh(){let e=(0,O.c)(4),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,k.jsx)(E,{className:`absolute left-0 top-1/2 size-6 -translate-y-1/2 rounded-md border border-border/50`}),n=(0,k.jsx)(E,{className:`absolute right-0 top-1/2 size-6 -translate-y-1/2 rounded-md border border-border/50`}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,k.jsxs)(`div`,{className:`relative min-w-0 flex-1`,children:[t,n,(0,k.jsxs)(`div`,{className:`flex gap-1 overflow-hidden px-8 py-0.5`,children:[(0,k.jsx)(E,{className:`h-6 w-16 shrink-0 rounded-md`}),(0,k.jsx)(E,{className:`h-6 w-24 shrink-0 rounded-md`}),(0,k.jsx)(E,{className:`h-6 w-24 shrink-0 rounded-md phone:hidden`})]})]}),e[2]=r):r=e[2];let i;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,k.jsxs)(k.Fragment,{children:[r,(0,k.jsxs)(`div`,{className:`flex shrink-0 gap-1`,children:[(0,k.jsx)(E,{className:`size-7 rounded-md`}),(0,k.jsx)(E,{className:`size-7 rounded-md`})]})]}),e[3]=i):i=e[3],i}function Ch(e){let t=(0,O.c)(7),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,k.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border/50 px-3 py-2`,children:[(0,k.jsx)(E,{className:`h-4 w-32 rounded-full`}),(0,k.jsx)(E,{className:`ml-auto h-4 w-20 rounded-full`})]}),t[0]=n):n=t[0];let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,k.jsxs)(`div`,{className:`space-y-2`,children:[(0,k.jsx)(E,{className:`h-3 w-full rounded-full`}),(0,k.jsx)(E,{className:`h-3 w-full rounded-full`}),(0,k.jsx)(E,{className:`h-3 w-10/12 rounded-full`}),(0,k.jsx)(E,{className:`h-3 w-11/12 rounded-full`}),(0,k.jsx)(E,{className:`h-3 w-9/12 rounded-full`})]}),t[1]=r):r=t[1];let i;t[2]===e.label?i=t[3]:(i=(0,k.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 px-3 py-4`,children:[r,(0,k.jsx)(`span`,{className:`sr-only`,children:e.label})]}),t[2]=e.label,t[3]=i);let a;return t[4]!==e.label||t[5]!==i?(a=(0,k.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col p-2`,children:(0,k.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden rounded-md border border-border/60 bg-card/25`,role:`status`,"aria-live":`polite`,"aria-label":e.label,children:[n,i]})}),t[4]=e.label,t[5]=i,t[6]=a):a=t[6],a}function wh(e){return new Worker(`/assets/worker-B0IAubm_.js`,{name:e?.name})}var Th=3,Eh=120;function Dh(e){let t=(0,O.c)(4),{themeName:n}=e,r=vh(),i,a;return t[0]!==n||t[1]!==r?(i=()=>{if(!r)return;let e=r.getDiffRenderOptions();e.theme!==n&&r.setRenderOptions({...e,theme:n}).catch(Oh)},a=[n,r],t[0]=n,t[1]=r,t[2]=i,t[3]=a):(i=t[2],a=t[3]),(0,A.useEffect)(i,a),null}function Oh(){}function kh(e){let t=(0,O.c)(10),{children:n}=e,{resolvedTheme:r}=D(),i;t[0]===r?i=t[1]:(i=Lp(r),t[0]=r,t[1]=i);let a=i,o=typeof navigator>`u`?4:Math.max(1,navigator.hardwareConcurrency||4),s=Math.max(1,Math.min(Th,Math.floor(o/3))),c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c={workerFactory:Ah,poolSize:s,totalASTLRUCacheSize:Eh},t[2]=c):c=t[2];let l,u;t[3]===a?(l=t[4],u=t[5]):(l={theme:a,tokenizeMaxLineLength:1e3},u=(0,k.jsx)(Dh,{themeName:a}),t[3]=a,t[4]=l,t[5]=u);let d;return t[6]!==n||t[7]!==l||t[8]!==u?(d=(0,k.jsxs)(_h,{poolOptions:c,highlighterOptions:l,children:[u,n]}),t[6]=n,t[7]=l,t[8]=u,t[9]=d):d=t[9],d}function Ah(){return new wh}var jh={numeric:!0,sensitivity:`base`};function Mh(e){return e.replaceAll(`\\`,`/`).split(`/`).filter(e=>e.length>0)}function Nh(e,t){return e.name.localeCompare(t.name,void 0,jh)}function Ph(e){return!(`additions`in e)||typeof e.additions!=`number`||!(`deletions`in e)||typeof e.deletions!=`number`?null:{additions:e.additions,deletions:e.deletions}}function Fh(e){let t=e.children.map(e=>e.kind===`directory`?Fh(e):e),n={...e,children:t};for(;n.children.length===1&&n.children[0]?.kind===`directory`;){let e=n.children[0];n={kind:`directory`,name:`${n.name}/${e.name}`,path:e.path,stat:e.stat,children:e.children}}return n}function Ih(e){let t=Array.from(e.directories.values()).toSorted(Nh).map(e=>({kind:`directory`,name:e.name,path:e.path,stat:{additions:e.stat.additions,deletions:e.stat.deletions},children:Ih(e)})).map(e=>Fh(e)),n=e.files.toSorted(Nh);return[...t,...n]}function Lh(e){return e.reduce((e,t)=>{let n=Ph(t);return n?{additions:e.additions+n.additions,deletions:e.deletions+n.deletions}:e},{additions:0,deletions:0})}function Rh(e){let t={name:``,path:``,stat:{additions:0,deletions:0},directories:new Map,files:[]};for(let n of e){let e=Mh(n.path);if(e.length===0)continue;let r=n.kind===`directory`,i=Ph(n),a=[t],o=t;for(let t of r?e:e.slice(0,-1)){let e=o.path?`${o.path}/${t}`:t,n=o.directories.get(t);if(n)o=n;else{let n={name:t,path:e,stat:{additions:0,deletions:0},directories:new Map,files:[]};o.directories.set(t,n),o=n}a.push(o)}if(!r){let t=e.join(`/`),n=e.at(-1);if(!n)continue;o.files.push({kind:`file`,name:n,path:t,stat:i})}if(i)for(let e of a)e.stat.additions+=i.additions,e.stat.deletions+=i.deletions}return Ih(t)}function zh(e){return e.additions>0||e.deletions>0}var Bh=(0,A.memo)(function(e){let t=(0,O.c)(14),{additions:n,deletions:r,showParentheses:i}=e,a=i!==void 0&&i,o;t[0]===a?o=t[1]:(o=a&&(0,k.jsx)(`span`,{className:`text-muted-foreground/70`,children:`(`}),t[0]=a,t[1]=o);let s;t[2]===n?s=t[3]:(s=(0,k.jsxs)(`span`,{className:`text-success`,children:[`+`,n]}),t[2]=n,t[3]=s);let c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,k.jsx)(`span`,{className:`mx-0.5 text-muted-foreground/70`,children:`/`}),t[4]=c):c=t[4];let l;t[5]===r?l=t[6]:(l=(0,k.jsxs)(`span`,{className:`text-destructive`,children:[`-`,r]}),t[5]=r,t[6]=l);let u;t[7]===a?u=t[8]:(u=a&&(0,k.jsx)(`span`,{className:`text-muted-foreground/70`,children:`)`}),t[7]=a,t[8]=u);let d;return t[9]!==o||t[10]!==s||t[11]!==l||t[12]!==u?(d=(0,k.jsxs)(k.Fragment,{children:[o,s,c,l,u]}),t[9]=o,t[10]=s,t[11]=l,t[12]=u,t[13]=d):d=t[13],d});export{Xd as $,ke as $t,rp as A,Le as At,Pf as B,je as Bt,yp as C,It as Ct,gp as D,tt as Dt,Sp as E,nt as Et,Uf as F,Ue as Ft,wf as G,Be as Gt,kf as H,Fe as Ht,Rf as I,Je as It,bf as J,Re as Jt,Ef as K,Ve as Kt,Ff as L,Ye as Lt,Gf as M,He as Mt,Nf as N,Xe as Nt,_p as O,et as Ot,Mf as P,Ze as Pt,Zd as Q,Ae as Qt,If as R,qe as Rt,Cp as S,Rt as St,xp as T,Nt as Tt,Of as U,Ie as Ut,Lf as V,Qe as Vt,Cf as W,Ne as Wt,_f as X,We as Xt,gf as Y,Pe as Yt,vf as Z,Ge as Zt,Np as _,ir as _t,kh as a,Q as at,kp as b,Bt as bt,xh as c,Od as ct,$m as d,wd as dt,Oe as en,rf as et,rm as f,Cd as ft,Lp as g,ur as gt,Hp as h,Ma as ht,Lh as i,he as in,nf as it,$f as j,Me as jt,pp as k,$e as kt,yh as l,Dd as lt,Up as m,wi as mt,zh as n,ve as nn,$d as nt,Sh as o,ef as ot,Wp as p,Vu as pt,Sf as q,ze as qt,Rh as r,ge as rn,Qd as rt,Ch as s,X as st,Bh as t,_e as tn,tf as tt,hh as u,Ed as ut,Dp as v,Ht as vt,bp as w,Ft as wt,vp as x,Lt as xt,Op as y,Vt as yt,Wf as z,Ke as zt};