@openchambery/web 2.1.8-beta.3 → 2.1.8-beta.5

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 (117) hide show
  1. package/dist/assets/{AgentAvatar-DTgZob6V.js → AgentAvatar-qSjSZvIG.js} +1 -1
  2. package/dist/assets/{AssistantView-CzNcYiVL.js → AssistantView-DOr44dum.js} +3 -3
  3. package/dist/assets/{DiagramView-Cmdi3PAV.js → DiagramView-DwjEsYl2.js} +1 -1
  4. package/dist/assets/{FadeInOnReveal-Dcu_ZfKa.js → FadeInOnReveal-CD5d1k_u.js} +1 -1
  5. package/dist/assets/{Icon-BKVaYkO0.js → Icon-QASb6r3F.js} +1 -1
  6. package/dist/assets/{ImageLoadingPlaceholder-CICdqe37.js → ImageLoadingPlaceholder-BuGiEI7w.js} +1 -1
  7. package/dist/assets/{LoadingImage-DC63uLZK.js → LoadingImage-FRySi1BM.js} +1 -1
  8. package/dist/assets/{MarkdownRenderer-CIapvMEi.js → MarkdownRenderer-BVTJzJKH.js} +2 -2
  9. package/dist/assets/{MarkdownRendererImpl-CuovZBls.js → MarkdownRendererImpl-DKRawvvq.js} +1 -1
  10. package/dist/assets/{MarkstreamRendererImpl-DtQlVw4f.js → MarkstreamRendererImpl-8IdRnZ2d.js} +1 -1
  11. package/dist/assets/{MobileDetailNavigation-BcQ1gCG1.js → MobileDetailNavigation-WqYrphqb.js} +1 -1
  12. package/dist/assets/{MobileShareBridge-CZbknYvz.js → MobileShareBridge-C6AvFHjG.js} +1 -1
  13. package/dist/assets/MobileTabPageHeader-BbDsAtKl.js +2 -0
  14. package/dist/assets/{MultiRunWindow-CsDXEsR_.js → MultiRunWindow-19VPj6Of.js} +1 -1
  15. package/dist/assets/{OnboardingScreen-B8R06QbP.js → OnboardingScreen-CHa767GT.js} +1 -1
  16. package/dist/assets/{OverlayScrollbar-BrYVChrM.js → OverlayScrollbar-C7Ls30Hy.js} +1 -1
  17. package/dist/assets/{SettingsView-bWUvVuP2.js → SettingsView-DruiCw4C.js} +10 -10
  18. package/dist/assets/{SettingsWindow-Cs1Z7BAg.js → SettingsWindow-BBfF03M7.js} +1 -1
  19. package/dist/assets/{TerminalView-Cfa5bIj1.js → TerminalView-BE1wI19_.js} +1 -1
  20. package/dist/assets/{ToolOutputDialog-ChVqyMGX.js → ToolOutputDialog-DOXDmUxQ.js} +1 -1
  21. package/dist/assets/{appThemeRegistry-CuS2weCQ.js → appThemeRegistry-D4TkQDbf.js} +1 -1
  22. package/dist/assets/{button-NnBwy1et.js → button-DOrwfkre.js} +1 -1
  23. package/dist/assets/{collapsible-Divs2HzS.js → collapsible-BJwPZMpo.js} +1 -1
  24. package/dist/assets/{diagram-Dw2fVTEr.js → diagram-BFevUcKu.js} +1 -1
  25. package/dist/assets/{dialog-thtcgEoi.js → dialog-FSXwOR2i.js} +1 -1
  26. package/dist/assets/{dropdown-menu.styles-DG86fojG.js → dropdown-menu.styles-CfTQwJHe.js} +1 -1
  27. package/dist/assets/{es-CyvQWK39.js → es-VbQQdCdi.js} +1 -1
  28. package/dist/assets/{fileMentionTouchSelection-D9YYbFDF.js → fileMentionTouchSelection-DuGw9C0F.js} +1 -1
  29. package/dist/assets/{fr-BgKUUIer.js → fr-BotRbS9t.js} +1 -1
  30. package/dist/assets/{gitApi-q2aVvcM1.js → gitApi-QxaZos8j.js} +1 -1
  31. package/dist/assets/{input-BFFtmAyl.js → input-Ctgb06ot.js} +1 -1
  32. package/dist/assets/{insertionBoundaries-B2M9QiEF.js → insertionBoundaries-BFtbjSBb.js} +1 -1
  33. package/dist/assets/{ja-vAsqZ3i2.js → ja-l_gq6Coh.js} +1 -1
  34. package/dist/assets/{ko-CjgHIGr_.js → ko-yhU5rfe5.js} +1 -1
  35. package/dist/assets/{main-B3grbXe8.js → main-BJckugyb.js} +2 -2
  36. package/dist/assets/{main-4h6m9pZ0.js → main-CSpFdmT4.js} +10 -10
  37. package/dist/assets/{markdownHeightCache-qy-s2Sd8.js → markdownHeightCache-B6drDnVO.js} +1 -1
  38. package/dist/assets/{mcpQueries-BD28dy9B.js → mcpQueries-WrVQC4xT.js} +1 -1
  39. package/dist/assets/miniChat-YVKGcjkV.js +2 -0
  40. package/dist/assets/mobile-DtAt6Tnq.js +2 -0
  41. package/dist/assets/{multirun-Dhq8Cx1W.js → multirun-lQfWeDYv.js} +1 -1
  42. package/dist/assets/{pl-CNRmHctC.js → pl-BkynZgOJ.js} +1 -1
  43. package/dist/assets/{projectMeta-2J4Ull4h.js → projectMeta-gv05m6Dm.js} +1 -1
  44. package/dist/assets/{pt-BR-B4NRHMT2.js → pt-BR-Dw_Dokez.js} +1 -1
  45. package/dist/assets/renderElectronMiniChatApp-BRhwzG7e.js +2 -0
  46. package/dist/assets/{renderMobileApp-Zl-L5gSE.js → renderMobileApp-FbnzqDL3.js} +6 -6
  47. package/dist/assets/{runtimeConfig-GAVzvQGc.js → runtimeConfig-Bm1EPWPq.js} +1 -1
  48. package/dist/assets/{runtimeEndpointReset-DdNzM2Ae.js → runtimeEndpointReset-C4gavnsn.js} +5 -5
  49. package/dist/assets/{scheduledTaskNavigation-DqwoOss-.js → scheduledTaskNavigation-DEMPeoot.js} +1 -1
  50. package/dist/assets/sessionChangeSummary-DkNmkmIq.js +1 -0
  51. package/dist/assets/{sessionLookup-BPCTTSdg.js → sessionLookup-DWJfnR75.js} +1 -1
  52. package/dist/assets/{sortable-tabs-strip-BLrK5Ln9.js → sortable-tabs-strip-BVnwfMAa.js} +1 -1
  53. package/dist/assets/speechSettingsQueries-CoNlugxH.js +4 -0
  54. package/dist/assets/{store-_hKtW1V3.js → store-COtDAfPx.js} +2 -2
  55. package/dist/assets/{textarea-CN-vZS5F.js → textarea-DJ52TDJj.js} +1 -1
  56. package/dist/assets/{tooltip-uzT2SsYJ.js → tooltip-JgW0lJaV.js} +1 -1
  57. package/dist/assets/{uk-CXna2F44.js → uk-DSl09YqU.js} +1 -1
  58. package/dist/assets/{useAppFontEffects-BlstuBSz.js → useAppFontEffects-DAeZcw5Z.js} +51 -53
  59. package/dist/assets/{useDesktopWindowControlsLayout-BhS1NmBt.js → useDesktopWindowControlsLayout-ia1w5b_c.js} +1 -1
  60. package/dist/assets/{useEffectiveDirectory-CiR2SqiL.js → useEffectiveDirectory-BWMFhdHo.js} +1 -1
  61. package/dist/assets/{useMobileNavigationStore-BRqifj9r.js → useMobileNavigationStore-D7wof6Tl.js} +6 -6
  62. package/dist/assets/{useWorkerHighlightedLines-Jea_E56b.js → useWorkerHighlightedLines-DdBSr8AB.js} +1 -1
  63. package/dist/assets/vendor-codemirror-autocomplete-7c2L_4dM.js +12 -0
  64. package/dist/assets/vendor-codemirror-commands-B8KrBQ9B.js +1 -0
  65. package/dist/assets/vendor-codemirror-lang-angular-DXOgWEVj.js +23 -0
  66. package/dist/assets/{vendor-codemirror-lang-cpp-C3UKgJaQ.js → vendor-codemirror-lang-cpp-Dh8C3xqP.js} +1 -1
  67. package/dist/assets/{vendor-codemirror-lang-go-Cv5NYdGm.js → vendor-codemirror-lang-go-BXAJ1_dh.js} +5 -5
  68. package/dist/assets/{vendor-codemirror-lang-java-D6hBTIgD.js → vendor-codemirror-lang-java-DAyCHRhk.js} +1 -1
  69. package/dist/assets/{vendor-codemirror-lang-jinja-ehGXhAov.js → vendor-codemirror-lang-jinja-0TICrMfO.js} +1 -1
  70. package/dist/assets/{vendor-codemirror-lang-json-tHviF6YN.js → vendor-codemirror-lang-json-mLulNbwB.js} +1 -1
  71. package/dist/assets/{vendor-codemirror-lang-less-B-yDfSDo.js → vendor-codemirror-lang-less-CNvptX3P.js} +1 -1
  72. package/dist/assets/{vendor-codemirror-lang-liquid-BdoLH4KN.js → vendor-codemirror-lang-liquid-8g5seytq.js} +1 -1
  73. package/dist/assets/vendor-codemirror-lang-markdown-CV1IO6Qs.js +6 -0
  74. package/dist/assets/{vendor-codemirror-lang-php-Ch8GW4Xz.js → vendor-codemirror-lang-php-xP7rf28_.js} +1 -1
  75. package/dist/assets/vendor-codemirror-lang-python-YM2WVLHF.js +9 -0
  76. package/dist/assets/{vendor-codemirror-lang-rust-BEUlElU6.js → vendor-codemirror-lang-rust-CtafR0gt.js} +1 -1
  77. package/dist/assets/vendor-codemirror-lang-sass-B4iav_Ps.js +1 -0
  78. package/dist/assets/{vendor-codemirror-lang-sql-BnZql454.js → vendor-codemirror-lang-sql-C6q09UUZ.js} +2 -2
  79. package/dist/assets/{vendor-codemirror-lang-vue-BCwQBvLR.js → vendor-codemirror-lang-vue-DIB78UsR.js} +1 -1
  80. package/dist/assets/{vendor-codemirror-lang-wast-mrtA2eML.js → vendor-codemirror-lang-wast-C_JVdOCF.js} +1 -1
  81. package/dist/assets/{vendor-codemirror-lang-xml-ClAh-G2D.js → vendor-codemirror-lang-xml-DIuzY_d4.js} +1 -1
  82. package/dist/assets/{vendor-codemirror-lang-yaml-CjL8XEf2.js → vendor-codemirror-lang-yaml-BO0hIfQM.js} +1 -1
  83. package/dist/assets/{vendor-codemirror-language-data-DGDYune4.js → vendor-codemirror-language-data-Ctd4WxgW.js} +2 -2
  84. package/dist/assets/vendor-codemirror-search-ZqtrPLjU.js +2 -0
  85. package/dist/assets/{vendor-replit-codemirror-vim-CEibx3EP.js → vendor-replit-codemirror-vim-DDj0dSVY.js} +6 -6
  86. package/dist/assets/{zh-CN-C0S7hK8T.js → zh-CN-NtO1bA00.js} +1 -1
  87. package/dist/assets/{zh-TW-CVG-Rqd-.js → zh-TW-CF0z_L0k.js} +1 -1
  88. package/dist/index.html +2 -2
  89. package/dist/mini-chat.html +2 -2
  90. package/dist/mobile.html +2 -2
  91. package/package.json +1 -1
  92. package/server/lib/config-sync/DOCUMENTATION.md +10 -5
  93. package/server/lib/config-sync/engine.js +1 -1
  94. package/server/lib/config-sync/magpie-auth.js +111 -0
  95. package/server/lib/config-sync/magpie-auth.test.js +79 -0
  96. package/server/lib/config-sync/magpie.js +76 -7
  97. package/server/lib/config-sync/magpie.test.js +102 -2
  98. package/server/lib/opencode/DOCUMENTATION.md +2 -0
  99. package/server/lib/opencode/config-entities-layering.test.js +2 -1
  100. package/server/lib/opencode/lifecycle.js +4 -0
  101. package/server/lib/opencode/lifecycle.test.js +7 -2
  102. package/server/lib/opencode/plugin-routes.test.js +1 -1
  103. package/server/lib/opencode/plugins.js +31 -21
  104. package/server/lib/opencode/plugins.test.js +55 -10
  105. package/dist/assets/MobileTabPageHeader-DjbyneLy.js +0 -2
  106. package/dist/assets/miniChat-ChSEmnwp.js +0 -2
  107. package/dist/assets/mobile-CrKlS4SH.js +0 -2
  108. package/dist/assets/renderElectronMiniChatApp-DsPg8kQs.js +0 -2
  109. package/dist/assets/sessionChangeSummary-CFlwf4sL.js +0 -2
  110. package/dist/assets/speechSettingsQueries-D4rx8jJk.js +0 -4
  111. package/dist/assets/vendor-codemirror-autocomplete-DHomsvW7.js +0 -12
  112. package/dist/assets/vendor-codemirror-commands-C9DCaJ0C.js +0 -1
  113. package/dist/assets/vendor-codemirror-lang-angular-BDXnzWgq.js +0 -23
  114. package/dist/assets/vendor-codemirror-lang-markdown-Bt-vLz9k.js +0 -6
  115. package/dist/assets/vendor-codemirror-lang-python-B4naLXMo.js +0 -9
  116. package/dist/assets/vendor-codemirror-lang-sass-ibtp2iUB.js +0 -1
  117. package/dist/assets/vendor-codemirror-search-D2SOgzph.js +0 -2
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-codemirror-lang-sql-BnZql454.js","assets/rolldown-runtime-hePW80VL.js","assets/vendor-codemirror-autocomplete-DHomsvW7.js","assets/vendor-codemirror-lang-angular-BDXnzWgq.js","assets/vendor-codemirror-lang-cpp-C3UKgJaQ.js","assets/vendor-codemirror-lang-go-Cv5NYdGm.js","assets/vendor-codemirror-lang-java-D6hBTIgD.js","assets/vendor-codemirror-lang-jinja-ehGXhAov.js","assets/vendor-codemirror-lang-json-tHviF6YN.js","assets/vendor-codemirror-lang-less-B-yDfSDo.js","assets/vendor-codemirror-lang-liquid-BdoLH4KN.js","assets/vendor-codemirror-lang-markdown-Bt-vLz9k.js","assets/vendor-codemirror-lang-php-Ch8GW4Xz.js","assets/vendor-codemirror-lang-python-B4naLXMo.js","assets/vendor-codemirror-lang-rust-BEUlElU6.js","assets/vendor-codemirror-lang-sass-ibtp2iUB.js","assets/vendor-codemirror-lang-wast-mrtA2eML.js","assets/vendor-codemirror-lang-xml-ClAh-G2D.js","assets/vendor-codemirror-lang-yaml-CjL8XEf2.js","assets/vendor-codemirror-legacy-modes-DwltVFbT.js","assets/vendor-codemirror-lang-vue-BCwQBvLR.js"])))=>i.map(i=>d[i]);
2
- import{o as e}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{f as t,l as n,u as r}from"./vendor-codemirror-autocomplete-DHomsvW7.js";function i(e){return new r(t.define(e))}function a(t){return e(()=>import(`./vendor-codemirror-lang-sql-BnZql454.js`).then(e=>e.t).then(e=>e.sql({dialect:e[t]})),__vite__mapDeps([0,1,2,3]))}var o=[n.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return e(()=>import(`./vendor-codemirror-lang-cpp-C3UKgJaQ.js`).then(e=>e.t).then(e=>e.cpp()),__vite__mapDeps([4,1,2,3]))}}),n.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return e(()=>import(`./vendor-codemirror-lang-cpp-C3UKgJaQ.js`).then(e=>e.t).then(e=>e.cpp()),__vite__mapDeps([4,1,2,3]))}}),n.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return a(`Cassandra`)}}),n.of({name:`CSS`,extensions:[`css`],load(){return e(()=>import(`./vendor-codemirror-lang-angular-BDXnzWgq.js`).then(e=>e.u).then(e=>e.css()),__vite__mapDeps([3,1,2]))}}),n.of({name:`Go`,extensions:[`go`],load(){return e(()=>import(`./vendor-codemirror-lang-go-Cv5NYdGm.js`).then(e=>e.t).then(e=>e.go()),__vite__mapDeps([5,1,2,3]))}}),n.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return e(()=>import(`./vendor-codemirror-lang-angular-BDXnzWgq.js`).then(e=>e.n).then(e=>e.html()),__vite__mapDeps([3,1,2]))}}),n.of({name:`Java`,extensions:[`java`],load(){return e(()=>import(`./vendor-codemirror-lang-java-D6hBTIgD.js`).then(e=>e.t).then(e=>e.java()),__vite__mapDeps([6,1,2,3]))}}),n.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return e(()=>import(`./vendor-codemirror-lang-angular-BDXnzWgq.js`).then(e=>e.a).then(e=>e.javascript()),__vite__mapDeps([3,1,2]))}}),n.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return e(()=>import(`./vendor-codemirror-lang-jinja-ehGXhAov.js`).then(e=>e.t).then(e=>e.jinja()),__vite__mapDeps([7,1,2,3]))}}),n.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return e(()=>import(`./vendor-codemirror-lang-json-tHviF6YN.js`).then(e=>e.t).then(e=>e.json()),__vite__mapDeps([8,1,2,3]))}}),n.of({name:`JSX`,extensions:[`jsx`],load(){return e(()=>import(`./vendor-codemirror-lang-angular-BDXnzWgq.js`).then(e=>e.a).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([3,1,2]))}}),n.of({name:`LESS`,extensions:[`less`],load(){return e(()=>import(`./vendor-codemirror-lang-less-B-yDfSDo.js`).then(e=>e.t).then(e=>e.less()),__vite__mapDeps([9,1,2,3]))}}),n.of({name:`Liquid`,extensions:[`liquid`],load(){return e(()=>import(`./vendor-codemirror-lang-liquid-BdoLH4KN.js`).then(e=>e.t).then(e=>e.liquid()),__vite__mapDeps([10,1,2,3]))}}),n.of({name:`MariaDB SQL`,load(){return a(`MariaSQL`)}}),n.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return e(()=>import(`./vendor-codemirror-lang-markdown-Bt-vLz9k.js`).then(e=>e.t).then(e=>e.markdown()),__vite__mapDeps([11,1,2,3]))}}),n.of({name:`MS SQL`,load(){return a(`MSSQL`)}}),n.of({name:`MySQL`,load(){return a(`MySQL`)}}),n.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return e(()=>import(`./vendor-codemirror-lang-php-Ch8GW4Xz.js`).then(e=>e.t).then(e=>e.php()),__vite__mapDeps([12,1,2,3]))}}),n.of({name:`PLSQL`,extensions:[`pls`],load(){return a(`PLSQL`)}}),n.of({name:`PostgreSQL`,load(){return a(`PostgreSQL`)}}),n.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return e(()=>import(`./vendor-codemirror-lang-python-B4naLXMo.js`).then(e=>e.t).then(e=>e.python()),__vite__mapDeps([13,1,2,3]))}}),n.of({name:`Rust`,extensions:[`rs`],load(){return e(()=>import(`./vendor-codemirror-lang-rust-BEUlElU6.js`).then(e=>e.t).then(e=>e.rust()),__vite__mapDeps([14,1,2,3]))}}),n.of({name:`Sass`,extensions:[`sass`],load(){return e(()=>import(`./vendor-codemirror-lang-sass-ibtp2iUB.js`).then(e=>e.t).then(e=>e.sass({indented:!0})),__vite__mapDeps([15,1,2,3]))}}),n.of({name:`SCSS`,extensions:[`scss`],load(){return e(()=>import(`./vendor-codemirror-lang-sass-ibtp2iUB.js`).then(e=>e.t).then(e=>e.sass()),__vite__mapDeps([15,1,2,3]))}}),n.of({name:`SQL`,extensions:[`sql`],load(){return a(`StandardSQL`)}}),n.of({name:`SQLite`,load(){return a(`SQLite`)}}),n.of({name:`TSX`,extensions:[`tsx`],load(){return e(()=>import(`./vendor-codemirror-lang-angular-BDXnzWgq.js`).then(e=>e.a).then(e=>e.javascript({jsx:!0,typescript:!0})),__vite__mapDeps([3,1,2]))}}),n.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return e(()=>import(`./vendor-codemirror-lang-angular-BDXnzWgq.js`).then(e=>e.a).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([3,1,2]))}}),n.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return e(()=>import(`./vendor-codemirror-lang-wast-mrtA2eML.js`).then(e=>e.t).then(e=>e.wast()),__vite__mapDeps([16,1,2,3]))}}),n.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return e(()=>import(`./vendor-codemirror-lang-xml-ClAh-G2D.js`).then(e=>e.t).then(e=>e.xml()),__vite__mapDeps([17,1,2,3]))}}),n.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return e(()=>import(`./vendor-codemirror-lang-yaml-CjL8XEf2.js`).then(e=>e.t).then(e=>e.yaml()),__vite__mapDeps([18,1,2,3]))}}),n.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Vt).then(e=>i(e.apl)),__vite__mapDeps([19,1]))}}),n.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Bt).then(e=>i(e.asciiArmor)),__vite__mapDeps([19,1]))}}),n.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.zt).then(e=>i(e.asn1({}))),__vite__mapDeps([19,1]))}}),n.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Rt).then(e=>i(e.asterisk)),__vite__mapDeps([19,1]))}}),n.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Lt).then(e=>i(e.brainfuck)),__vite__mapDeps([19,1]))}}),n.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Nt).then(e=>i(e.cobol)),__vite__mapDeps([19,1]))}}),n.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.It).then(e=>i(e.csharp)),__vite__mapDeps([19,1]))}}),n.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Ft).then(e=>i(e.clojure)),__vite__mapDeps([19,1]))}}),n.of({name:`ClojureScript`,extensions:[`cljs`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Ft).then(e=>i(e.clojure)),__vite__mapDeps([19,1]))}}),n.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.kt).then(e=>i(e.gss)),__vite__mapDeps([19,1]))}}),n.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Pt).then(e=>i(e.cmake)),__vite__mapDeps([19,1]))}}),n.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Mt).then(e=>i(e.coffeeScript)),__vite__mapDeps([19,1]))}}),n.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.jt).then(e=>i(e.commonLisp)),__vite__mapDeps([19,1]))}}),n.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Ot).then(e=>i(e.cypher)),__vite__mapDeps([19,1]))}}),n.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.I).then(e=>i(e.cython)),__vite__mapDeps([19,1]))}}),n.of({name:`Crystal`,extensions:[`cr`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.At).then(e=>i(e.crystal)),__vite__mapDeps([19,1]))}}),n.of({name:`D`,extensions:[`d`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Dt).then(e=>i(e.d)),__vite__mapDeps([19,1]))}}),n.of({name:`Dart`,extensions:[`dart`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.It).then(e=>i(e.dart)),__vite__mapDeps([19,1]))}}),n.of({name:`diff`,extensions:[`diff`,`patch`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Et).then(e=>i(e.diff)),__vite__mapDeps([19,1]))}}),n.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Tt).then(e=>i(e.dockerFile)),__vite__mapDeps([19,1]))}}),n.of({name:`DTD`,extensions:[`dtd`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.wt).then(e=>i(e.dtd)),__vite__mapDeps([19,1]))}}),n.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Ct).then(e=>i(e.dylan)),__vite__mapDeps([19,1]))}}),n.of({name:`EBNF`,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.St).then(e=>i(e.ebnf)),__vite__mapDeps([19,1]))}}),n.of({name:`ECL`,extensions:[`ecl`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.xt).then(e=>i(e.ecl)),__vite__mapDeps([19,1]))}}),n.of({name:`edn`,extensions:[`edn`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Ft).then(e=>i(e.clojure)),__vite__mapDeps([19,1]))}}),n.of({name:`Eiffel`,extensions:[`e`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.bt).then(e=>i(e.eiffel)),__vite__mapDeps([19,1]))}}),n.of({name:`Elm`,extensions:[`elm`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.yt).then(e=>i(e.elm)),__vite__mapDeps([19,1]))}}),n.of({name:`Erlang`,extensions:[`erl`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.vt).then(e=>i(e.erlang)),__vite__mapDeps([19,1]))}}),n.of({name:`Esper`,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.S).then(e=>i(e.esper)),__vite__mapDeps([19,1]))}}),n.of({name:`Factor`,extensions:[`factor`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e._t).then(e=>i(e.factor)),__vite__mapDeps([19,1]))}}),n.of({name:`FCL`,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.gt).then(e=>i(e.fcl)),__vite__mapDeps([19,1]))}}),n.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.ht).then(e=>i(e.forth)),__vite__mapDeps([19,1]))}}),n.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.mt).then(e=>i(e.fortran)),__vite__mapDeps([19,1]))}}),n.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.$).then(e=>i(e.fSharp)),__vite__mapDeps([19,1]))}}),n.of({name:`Gas`,extensions:[`s`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.pt).then(e=>i(e.gas)),__vite__mapDeps([19,1]))}}),n.of({name:`Gherkin`,extensions:[`feature`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.ft).then(e=>i(e.gherkin)),__vite__mapDeps([19,1]))}}),n.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.dt).then(e=>i(e.groovy)),__vite__mapDeps([19,1]))}}),n.of({name:`Haskell`,extensions:[`hs`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.ut).then(e=>i(e.haskell)),__vite__mapDeps([19,1]))}}),n.of({name:`Haxe`,extensions:[`hx`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.lt).then(e=>i(e.haxe)),__vite__mapDeps([19,1]))}}),n.of({name:`HXML`,extensions:[`hxml`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.lt).then(e=>i(e.hxml)),__vite__mapDeps([19,1]))}}),n.of({name:`HTTP`,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.ct).then(e=>i(e.http)),__vite__mapDeps([19,1]))}}),n.of({name:`IDL`,extensions:[`pro`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.st).then(e=>i(e.idl)),__vite__mapDeps([19,1]))}}),n.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.ot).then(e=>i(e.jsonld)),__vite__mapDeps([19,1]))}}),n.of({name:`Julia`,extensions:[`jl`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.at).then(e=>i(e.julia)),__vite__mapDeps([19,1]))}}),n.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.It).then(e=>i(e.kotlin)),__vite__mapDeps([19,1]))}}),n.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.it).then(e=>i(e.liveScript)),__vite__mapDeps([19,1]))}}),n.of({name:`Lua`,extensions:[`lua`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.rt).then(e=>i(e.lua)),__vite__mapDeps([19,1]))}}),n.of({name:`mIRC`,extensions:[`mrc`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.et).then(e=>i(e.mirc)),__vite__mapDeps([19,1]))}}),n.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.nt).then(e=>i(e.mathematica)),__vite__mapDeps([19,1]))}}),n.of({name:`Modelica`,extensions:[`mo`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Q).then(e=>i(e.modelica)),__vite__mapDeps([19,1]))}}),n.of({name:`MUMPS`,extensions:[`mps`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.X).then(e=>i(e.mumps)),__vite__mapDeps([19,1]))}}),n.of({name:`Mbox`,extensions:[`mbox`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.tt).then(e=>i(e.mbox)),__vite__mapDeps([19,1]))}}),n.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Y).then(e=>i(e.nginx)),__vite__mapDeps([19,1]))}}),n.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.J).then(e=>i(e.nsis)),__vite__mapDeps([19,1]))}}),n.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.q).then(e=>i(e.ntriples)),__vite__mapDeps([19,1]))}}),n.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.It).then(e=>i(e.objectiveC)),__vite__mapDeps([19,1]))}}),n.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.It).then(e=>i(e.objectiveCpp)),__vite__mapDeps([19,1]))}}),n.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.$).then(e=>i(e.oCaml)),__vite__mapDeps([19,1]))}}),n.of({name:`Octave`,extensions:[`m`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.K).then(e=>i(e.octave)),__vite__mapDeps([19,1]))}}),n.of({name:`Oz`,extensions:[`oz`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.G).then(e=>i(e.oz)),__vite__mapDeps([19,1]))}}),n.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.W).then(e=>i(e.pascal)),__vite__mapDeps([19,1]))}}),n.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.U).then(e=>i(e.perl)),__vite__mapDeps([19,1]))}}),n.of({name:`Pig`,extensions:[`pig`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.H).then(e=>i(e.pig)),__vite__mapDeps([19,1]))}}),n.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.V).then(e=>i(e.powerShell)),__vite__mapDeps([19,1]))}}),n.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.B).then(e=>i(e.properties)),__vite__mapDeps([19,1]))}}),n.of({name:`ProtoBuf`,extensions:[`proto`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.z).then(e=>i(e.protobuf)),__vite__mapDeps([19,1]))}}),n.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.R).then(e=>i(e.pug)),__vite__mapDeps([19,1]))}}),n.of({name:`Puppet`,extensions:[`pp`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.L).then(e=>i(e.puppet)),__vite__mapDeps([19,1]))}}),n.of({name:`Q`,extensions:[`q`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.F).then(e=>i(e.q)),__vite__mapDeps([19,1]))}}),n.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.P).then(e=>i(e.r)),__vite__mapDeps([19,1]))}}),n.of({name:`RPM Changes`,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.N).then(e=>i(e.rpmChanges)),__vite__mapDeps([19,1]))}}),n.of({name:`RPM Spec`,extensions:[`spec`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.N).then(e=>i(e.rpmSpec)),__vite__mapDeps([19,1]))}}),n.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.M).then(e=>i(e.ruby)),__vite__mapDeps([19,1]))}}),n.of({name:`SAS`,extensions:[`sas`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.j).then(e=>i(e.sas)),__vite__mapDeps([19,1]))}}),n.of({name:`Scala`,extensions:[`scala`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.It).then(e=>i(e.scala)),__vite__mapDeps([19,1]))}}),n.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.A).then(e=>i(e.scheme)),__vite__mapDeps([19,1]))}}),n.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.k).then(e=>i(e.shell)),__vite__mapDeps([19,1]))}}),n.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.D).then(e=>i(e.sieve)),__vite__mapDeps([19,1]))}}),n.of({name:`Smalltalk`,extensions:[`st`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.E).then(e=>i(e.smalltalk)),__vite__mapDeps([19,1]))}}),n.of({name:`Solr`,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.T).then(e=>i(e.solr)),__vite__mapDeps([19,1]))}}),n.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.$).then(e=>i(e.sml)),__vite__mapDeps([19,1]))}}),n.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.w).then(e=>i(e.sparql)),__vite__mapDeps([19,1]))}}),n.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.C).then(e=>i(e.spreadsheet)),__vite__mapDeps([19,1]))}}),n.of({name:`Squirrel`,extensions:[`nut`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.It).then(e=>i(e.squirrel)),__vite__mapDeps([19,1]))}}),n.of({name:`Stylus`,extensions:[`styl`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.b).then(e=>i(e.stylus)),__vite__mapDeps([19,1]))}}),n.of({name:`Swift`,extensions:[`swift`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.y).then(e=>i(e.swift)),__vite__mapDeps([19,1]))}}),n.of({name:`sTeX`,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.x).then(e=>i(e.stex)),__vite__mapDeps([19,1]))}}),n.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.x).then(e=>i(e.stex)),__vite__mapDeps([19,1]))}}),n.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.o).then(e=>i(e.verilog)),__vite__mapDeps([19,1]))}}),n.of({name:`Tcl`,extensions:[`tcl`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.v).then(e=>i(e.tcl)),__vite__mapDeps([19,1]))}}),n.of({name:`Textile`,extensions:[`textile`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e._).then(e=>i(e.textile)),__vite__mapDeps([19,1]))}}),n.of({name:`TiddlyWiki`,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.g).then(e=>i(e.tiddlyWiki)),__vite__mapDeps([19,1]))}}),n.of({name:`Tiki wiki`,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.h).then(e=>i(e.tiki)),__vite__mapDeps([19,1]))}}),n.of({name:`TOML`,extensions:[`toml`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.m).then(e=>i(e.toml)),__vite__mapDeps([19,1]))}}),n.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.p).then(e=>i(e.troff)),__vite__mapDeps([19,1]))}}),n.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.d).then(e=>i(e.ttcn)),__vite__mapDeps([19,1]))}}),n.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.f).then(e=>i(e.ttcnCfg)),__vite__mapDeps([19,1]))}}),n.of({name:`Turtle`,extensions:[`ttl`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.u).then(e=>i(e.turtle)),__vite__mapDeps([19,1]))}}),n.of({name:`Web IDL`,extensions:[`webidl`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.i).then(e=>i(e.webIDL)),__vite__mapDeps([19,1]))}}),n.of({name:`VB.NET`,extensions:[`vb`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.l).then(e=>i(e.vb)),__vite__mapDeps([19,1]))}}),n.of({name:`VBScript`,extensions:[`vbs`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.c).then(e=>i(e.vbScript)),__vite__mapDeps([19,1]))}}),n.of({name:`Velocity`,extensions:[`vtl`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.s).then(e=>i(e.velocity)),__vite__mapDeps([19,1]))}}),n.of({name:`Verilog`,extensions:[`v`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.o).then(e=>i(e.verilog)),__vite__mapDeps([19,1]))}}),n.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.a).then(e=>i(e.vhdl)),__vite__mapDeps([19,1]))}}),n.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.r).then(e=>i(e.xQuery)),__vite__mapDeps([19,1]))}}),n.of({name:`Yacas`,extensions:[`ys`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.n).then(e=>i(e.yacas)),__vite__mapDeps([19,1]))}}),n.of({name:`Z80`,extensions:[`z80`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.t).then(e=>i(e.z80)),__vite__mapDeps([19,1]))}}),n.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Z).then(e=>i(e.mscgen)),__vite__mapDeps([19,1]))}}),n.of({name:`Xù`,extensions:[`xu`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Z).then(e=>i(e.xu)),__vite__mapDeps([19,1]))}}),n.of({name:`MsGenny`,extensions:[`msgenny`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Z).then(e=>i(e.msgenny)),__vite__mapDeps([19,1]))}}),n.of({name:`Vue`,extensions:[`vue`],load(){return e(()=>import(`./vendor-codemirror-lang-vue-BCwQBvLR.js`).then(e=>e.t).then(e=>e.vue()),__vite__mapDeps([20,1,2,3]))}}),n.of({name:`Angular Template`,load(){return e(()=>import(`./vendor-codemirror-lang-angular-BDXnzWgq.js`).then(e=>e.t).then(e=>e.angular()),__vite__mapDeps([3,1,2]))}})];export{o as t};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-codemirror-lang-sql-C6q09UUZ.js","assets/rolldown-runtime-hePW80VL.js","assets/vendor-codemirror-autocomplete-7c2L_4dM.js","assets/vendor-codemirror-lang-angular-DXOgWEVj.js","assets/vendor-codemirror-lang-cpp-Dh8C3xqP.js","assets/vendor-codemirror-lang-go-BXAJ1_dh.js","assets/vendor-codemirror-lang-java-DAyCHRhk.js","assets/vendor-codemirror-lang-jinja-0TICrMfO.js","assets/vendor-codemirror-lang-json-mLulNbwB.js","assets/vendor-codemirror-lang-less-CNvptX3P.js","assets/vendor-codemirror-lang-liquid-8g5seytq.js","assets/vendor-codemirror-lang-markdown-CV1IO6Qs.js","assets/vendor-codemirror-lang-php-xP7rf28_.js","assets/vendor-codemirror-lang-python-YM2WVLHF.js","assets/vendor-codemirror-lang-rust-CtafR0gt.js","assets/vendor-codemirror-lang-sass-B4iav_Ps.js","assets/vendor-codemirror-lang-wast-C_JVdOCF.js","assets/vendor-codemirror-lang-xml-DIuzY_d4.js","assets/vendor-codemirror-lang-yaml-BO0hIfQM.js","assets/vendor-codemirror-legacy-modes-DwltVFbT.js","assets/vendor-codemirror-lang-vue-DIB78UsR.js"])))=>i.map(i=>d[i]);
2
+ import{o as e}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{f as t,l as n,u as r}from"./vendor-codemirror-autocomplete-7c2L_4dM.js";function i(e){return new r(t.define(e))}function a(t){return e(()=>import(`./vendor-codemirror-lang-sql-C6q09UUZ.js`).then(e=>e.t).then(e=>e.sql({dialect:e[t]})),__vite__mapDeps([0,1,2,3]))}var o=[n.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return e(()=>import(`./vendor-codemirror-lang-cpp-Dh8C3xqP.js`).then(e=>e.t).then(e=>e.cpp()),__vite__mapDeps([4,1,2,3]))}}),n.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return e(()=>import(`./vendor-codemirror-lang-cpp-Dh8C3xqP.js`).then(e=>e.t).then(e=>e.cpp()),__vite__mapDeps([4,1,2,3]))}}),n.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return a(`Cassandra`)}}),n.of({name:`CSS`,extensions:[`css`],load(){return e(()=>import(`./vendor-codemirror-lang-angular-DXOgWEVj.js`).then(e=>e.u).then(e=>e.css()),__vite__mapDeps([3,1,2]))}}),n.of({name:`Go`,extensions:[`go`],load(){return e(()=>import(`./vendor-codemirror-lang-go-BXAJ1_dh.js`).then(e=>e.t).then(e=>e.go()),__vite__mapDeps([5,1,2,3]))}}),n.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return e(()=>import(`./vendor-codemirror-lang-angular-DXOgWEVj.js`).then(e=>e.n).then(e=>e.html()),__vite__mapDeps([3,1,2]))}}),n.of({name:`Java`,extensions:[`java`],load(){return e(()=>import(`./vendor-codemirror-lang-java-DAyCHRhk.js`).then(e=>e.t).then(e=>e.java()),__vite__mapDeps([6,1,2,3]))}}),n.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return e(()=>import(`./vendor-codemirror-lang-angular-DXOgWEVj.js`).then(e=>e.a).then(e=>e.javascript()),__vite__mapDeps([3,1,2]))}}),n.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return e(()=>import(`./vendor-codemirror-lang-jinja-0TICrMfO.js`).then(e=>e.t).then(e=>e.jinja()),__vite__mapDeps([7,1,2,3]))}}),n.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return e(()=>import(`./vendor-codemirror-lang-json-mLulNbwB.js`).then(e=>e.t).then(e=>e.json()),__vite__mapDeps([8,1,2,3]))}}),n.of({name:`JSX`,extensions:[`jsx`],load(){return e(()=>import(`./vendor-codemirror-lang-angular-DXOgWEVj.js`).then(e=>e.a).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([3,1,2]))}}),n.of({name:`LESS`,extensions:[`less`],load(){return e(()=>import(`./vendor-codemirror-lang-less-CNvptX3P.js`).then(e=>e.t).then(e=>e.less()),__vite__mapDeps([9,1,2,3]))}}),n.of({name:`Liquid`,extensions:[`liquid`],load(){return e(()=>import(`./vendor-codemirror-lang-liquid-8g5seytq.js`).then(e=>e.t).then(e=>e.liquid()),__vite__mapDeps([10,1,2,3]))}}),n.of({name:`MariaDB SQL`,load(){return a(`MariaSQL`)}}),n.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return e(()=>import(`./vendor-codemirror-lang-markdown-CV1IO6Qs.js`).then(e=>e.t).then(e=>e.markdown()),__vite__mapDeps([11,1,2,3]))}}),n.of({name:`MS SQL`,load(){return a(`MSSQL`)}}),n.of({name:`MySQL`,load(){return a(`MySQL`)}}),n.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return e(()=>import(`./vendor-codemirror-lang-php-xP7rf28_.js`).then(e=>e.t).then(e=>e.php()),__vite__mapDeps([12,1,2,3]))}}),n.of({name:`PLSQL`,extensions:[`pls`],load(){return a(`PLSQL`)}}),n.of({name:`PostgreSQL`,load(){return a(`PostgreSQL`)}}),n.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return e(()=>import(`./vendor-codemirror-lang-python-YM2WVLHF.js`).then(e=>e.t).then(e=>e.python()),__vite__mapDeps([13,1,2,3]))}}),n.of({name:`Rust`,extensions:[`rs`],load(){return e(()=>import(`./vendor-codemirror-lang-rust-CtafR0gt.js`).then(e=>e.t).then(e=>e.rust()),__vite__mapDeps([14,1,2,3]))}}),n.of({name:`Sass`,extensions:[`sass`],load(){return e(()=>import(`./vendor-codemirror-lang-sass-B4iav_Ps.js`).then(e=>e.t).then(e=>e.sass({indented:!0})),__vite__mapDeps([15,1,2,3]))}}),n.of({name:`SCSS`,extensions:[`scss`],load(){return e(()=>import(`./vendor-codemirror-lang-sass-B4iav_Ps.js`).then(e=>e.t).then(e=>e.sass()),__vite__mapDeps([15,1,2,3]))}}),n.of({name:`SQL`,extensions:[`sql`],load(){return a(`StandardSQL`)}}),n.of({name:`SQLite`,load(){return a(`SQLite`)}}),n.of({name:`TSX`,extensions:[`tsx`],load(){return e(()=>import(`./vendor-codemirror-lang-angular-DXOgWEVj.js`).then(e=>e.a).then(e=>e.javascript({jsx:!0,typescript:!0})),__vite__mapDeps([3,1,2]))}}),n.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return e(()=>import(`./vendor-codemirror-lang-angular-DXOgWEVj.js`).then(e=>e.a).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([3,1,2]))}}),n.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return e(()=>import(`./vendor-codemirror-lang-wast-C_JVdOCF.js`).then(e=>e.t).then(e=>e.wast()),__vite__mapDeps([16,1,2,3]))}}),n.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return e(()=>import(`./vendor-codemirror-lang-xml-DIuzY_d4.js`).then(e=>e.t).then(e=>e.xml()),__vite__mapDeps([17,1,2,3]))}}),n.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return e(()=>import(`./vendor-codemirror-lang-yaml-BO0hIfQM.js`).then(e=>e.t).then(e=>e.yaml()),__vite__mapDeps([18,1,2,3]))}}),n.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Vt).then(e=>i(e.apl)),__vite__mapDeps([19,1]))}}),n.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Bt).then(e=>i(e.asciiArmor)),__vite__mapDeps([19,1]))}}),n.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.zt).then(e=>i(e.asn1({}))),__vite__mapDeps([19,1]))}}),n.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Rt).then(e=>i(e.asterisk)),__vite__mapDeps([19,1]))}}),n.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Lt).then(e=>i(e.brainfuck)),__vite__mapDeps([19,1]))}}),n.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Nt).then(e=>i(e.cobol)),__vite__mapDeps([19,1]))}}),n.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.It).then(e=>i(e.csharp)),__vite__mapDeps([19,1]))}}),n.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Ft).then(e=>i(e.clojure)),__vite__mapDeps([19,1]))}}),n.of({name:`ClojureScript`,extensions:[`cljs`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Ft).then(e=>i(e.clojure)),__vite__mapDeps([19,1]))}}),n.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.kt).then(e=>i(e.gss)),__vite__mapDeps([19,1]))}}),n.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Pt).then(e=>i(e.cmake)),__vite__mapDeps([19,1]))}}),n.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Mt).then(e=>i(e.coffeeScript)),__vite__mapDeps([19,1]))}}),n.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.jt).then(e=>i(e.commonLisp)),__vite__mapDeps([19,1]))}}),n.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Ot).then(e=>i(e.cypher)),__vite__mapDeps([19,1]))}}),n.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.I).then(e=>i(e.cython)),__vite__mapDeps([19,1]))}}),n.of({name:`Crystal`,extensions:[`cr`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.At).then(e=>i(e.crystal)),__vite__mapDeps([19,1]))}}),n.of({name:`D`,extensions:[`d`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Dt).then(e=>i(e.d)),__vite__mapDeps([19,1]))}}),n.of({name:`Dart`,extensions:[`dart`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.It).then(e=>i(e.dart)),__vite__mapDeps([19,1]))}}),n.of({name:`diff`,extensions:[`diff`,`patch`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Et).then(e=>i(e.diff)),__vite__mapDeps([19,1]))}}),n.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Tt).then(e=>i(e.dockerFile)),__vite__mapDeps([19,1]))}}),n.of({name:`DTD`,extensions:[`dtd`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.wt).then(e=>i(e.dtd)),__vite__mapDeps([19,1]))}}),n.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Ct).then(e=>i(e.dylan)),__vite__mapDeps([19,1]))}}),n.of({name:`EBNF`,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.St).then(e=>i(e.ebnf)),__vite__mapDeps([19,1]))}}),n.of({name:`ECL`,extensions:[`ecl`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.xt).then(e=>i(e.ecl)),__vite__mapDeps([19,1]))}}),n.of({name:`edn`,extensions:[`edn`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Ft).then(e=>i(e.clojure)),__vite__mapDeps([19,1]))}}),n.of({name:`Eiffel`,extensions:[`e`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.bt).then(e=>i(e.eiffel)),__vite__mapDeps([19,1]))}}),n.of({name:`Elm`,extensions:[`elm`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.yt).then(e=>i(e.elm)),__vite__mapDeps([19,1]))}}),n.of({name:`Erlang`,extensions:[`erl`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.vt).then(e=>i(e.erlang)),__vite__mapDeps([19,1]))}}),n.of({name:`Esper`,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.S).then(e=>i(e.esper)),__vite__mapDeps([19,1]))}}),n.of({name:`Factor`,extensions:[`factor`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e._t).then(e=>i(e.factor)),__vite__mapDeps([19,1]))}}),n.of({name:`FCL`,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.gt).then(e=>i(e.fcl)),__vite__mapDeps([19,1]))}}),n.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.ht).then(e=>i(e.forth)),__vite__mapDeps([19,1]))}}),n.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.mt).then(e=>i(e.fortran)),__vite__mapDeps([19,1]))}}),n.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.$).then(e=>i(e.fSharp)),__vite__mapDeps([19,1]))}}),n.of({name:`Gas`,extensions:[`s`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.pt).then(e=>i(e.gas)),__vite__mapDeps([19,1]))}}),n.of({name:`Gherkin`,extensions:[`feature`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.ft).then(e=>i(e.gherkin)),__vite__mapDeps([19,1]))}}),n.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.dt).then(e=>i(e.groovy)),__vite__mapDeps([19,1]))}}),n.of({name:`Haskell`,extensions:[`hs`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.ut).then(e=>i(e.haskell)),__vite__mapDeps([19,1]))}}),n.of({name:`Haxe`,extensions:[`hx`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.lt).then(e=>i(e.haxe)),__vite__mapDeps([19,1]))}}),n.of({name:`HXML`,extensions:[`hxml`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.lt).then(e=>i(e.hxml)),__vite__mapDeps([19,1]))}}),n.of({name:`HTTP`,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.ct).then(e=>i(e.http)),__vite__mapDeps([19,1]))}}),n.of({name:`IDL`,extensions:[`pro`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.st).then(e=>i(e.idl)),__vite__mapDeps([19,1]))}}),n.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.ot).then(e=>i(e.jsonld)),__vite__mapDeps([19,1]))}}),n.of({name:`Julia`,extensions:[`jl`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.at).then(e=>i(e.julia)),__vite__mapDeps([19,1]))}}),n.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.It).then(e=>i(e.kotlin)),__vite__mapDeps([19,1]))}}),n.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.it).then(e=>i(e.liveScript)),__vite__mapDeps([19,1]))}}),n.of({name:`Lua`,extensions:[`lua`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.rt).then(e=>i(e.lua)),__vite__mapDeps([19,1]))}}),n.of({name:`mIRC`,extensions:[`mrc`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.et).then(e=>i(e.mirc)),__vite__mapDeps([19,1]))}}),n.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.nt).then(e=>i(e.mathematica)),__vite__mapDeps([19,1]))}}),n.of({name:`Modelica`,extensions:[`mo`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Q).then(e=>i(e.modelica)),__vite__mapDeps([19,1]))}}),n.of({name:`MUMPS`,extensions:[`mps`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.X).then(e=>i(e.mumps)),__vite__mapDeps([19,1]))}}),n.of({name:`Mbox`,extensions:[`mbox`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.tt).then(e=>i(e.mbox)),__vite__mapDeps([19,1]))}}),n.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Y).then(e=>i(e.nginx)),__vite__mapDeps([19,1]))}}),n.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.J).then(e=>i(e.nsis)),__vite__mapDeps([19,1]))}}),n.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.q).then(e=>i(e.ntriples)),__vite__mapDeps([19,1]))}}),n.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.It).then(e=>i(e.objectiveC)),__vite__mapDeps([19,1]))}}),n.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.It).then(e=>i(e.objectiveCpp)),__vite__mapDeps([19,1]))}}),n.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.$).then(e=>i(e.oCaml)),__vite__mapDeps([19,1]))}}),n.of({name:`Octave`,extensions:[`m`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.K).then(e=>i(e.octave)),__vite__mapDeps([19,1]))}}),n.of({name:`Oz`,extensions:[`oz`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.G).then(e=>i(e.oz)),__vite__mapDeps([19,1]))}}),n.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.W).then(e=>i(e.pascal)),__vite__mapDeps([19,1]))}}),n.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.U).then(e=>i(e.perl)),__vite__mapDeps([19,1]))}}),n.of({name:`Pig`,extensions:[`pig`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.H).then(e=>i(e.pig)),__vite__mapDeps([19,1]))}}),n.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.V).then(e=>i(e.powerShell)),__vite__mapDeps([19,1]))}}),n.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.B).then(e=>i(e.properties)),__vite__mapDeps([19,1]))}}),n.of({name:`ProtoBuf`,extensions:[`proto`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.z).then(e=>i(e.protobuf)),__vite__mapDeps([19,1]))}}),n.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.R).then(e=>i(e.pug)),__vite__mapDeps([19,1]))}}),n.of({name:`Puppet`,extensions:[`pp`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.L).then(e=>i(e.puppet)),__vite__mapDeps([19,1]))}}),n.of({name:`Q`,extensions:[`q`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.F).then(e=>i(e.q)),__vite__mapDeps([19,1]))}}),n.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.P).then(e=>i(e.r)),__vite__mapDeps([19,1]))}}),n.of({name:`RPM Changes`,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.N).then(e=>i(e.rpmChanges)),__vite__mapDeps([19,1]))}}),n.of({name:`RPM Spec`,extensions:[`spec`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.N).then(e=>i(e.rpmSpec)),__vite__mapDeps([19,1]))}}),n.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.M).then(e=>i(e.ruby)),__vite__mapDeps([19,1]))}}),n.of({name:`SAS`,extensions:[`sas`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.j).then(e=>i(e.sas)),__vite__mapDeps([19,1]))}}),n.of({name:`Scala`,extensions:[`scala`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.It).then(e=>i(e.scala)),__vite__mapDeps([19,1]))}}),n.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.A).then(e=>i(e.scheme)),__vite__mapDeps([19,1]))}}),n.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.k).then(e=>i(e.shell)),__vite__mapDeps([19,1]))}}),n.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.D).then(e=>i(e.sieve)),__vite__mapDeps([19,1]))}}),n.of({name:`Smalltalk`,extensions:[`st`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.E).then(e=>i(e.smalltalk)),__vite__mapDeps([19,1]))}}),n.of({name:`Solr`,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.T).then(e=>i(e.solr)),__vite__mapDeps([19,1]))}}),n.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.$).then(e=>i(e.sml)),__vite__mapDeps([19,1]))}}),n.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.w).then(e=>i(e.sparql)),__vite__mapDeps([19,1]))}}),n.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.C).then(e=>i(e.spreadsheet)),__vite__mapDeps([19,1]))}}),n.of({name:`Squirrel`,extensions:[`nut`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.It).then(e=>i(e.squirrel)),__vite__mapDeps([19,1]))}}),n.of({name:`Stylus`,extensions:[`styl`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.b).then(e=>i(e.stylus)),__vite__mapDeps([19,1]))}}),n.of({name:`Swift`,extensions:[`swift`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.y).then(e=>i(e.swift)),__vite__mapDeps([19,1]))}}),n.of({name:`sTeX`,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.x).then(e=>i(e.stex)),__vite__mapDeps([19,1]))}}),n.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.x).then(e=>i(e.stex)),__vite__mapDeps([19,1]))}}),n.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.o).then(e=>i(e.verilog)),__vite__mapDeps([19,1]))}}),n.of({name:`Tcl`,extensions:[`tcl`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.v).then(e=>i(e.tcl)),__vite__mapDeps([19,1]))}}),n.of({name:`Textile`,extensions:[`textile`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e._).then(e=>i(e.textile)),__vite__mapDeps([19,1]))}}),n.of({name:`TiddlyWiki`,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.g).then(e=>i(e.tiddlyWiki)),__vite__mapDeps([19,1]))}}),n.of({name:`Tiki wiki`,load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.h).then(e=>i(e.tiki)),__vite__mapDeps([19,1]))}}),n.of({name:`TOML`,extensions:[`toml`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.m).then(e=>i(e.toml)),__vite__mapDeps([19,1]))}}),n.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.p).then(e=>i(e.troff)),__vite__mapDeps([19,1]))}}),n.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.d).then(e=>i(e.ttcn)),__vite__mapDeps([19,1]))}}),n.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.f).then(e=>i(e.ttcnCfg)),__vite__mapDeps([19,1]))}}),n.of({name:`Turtle`,extensions:[`ttl`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.u).then(e=>i(e.turtle)),__vite__mapDeps([19,1]))}}),n.of({name:`Web IDL`,extensions:[`webidl`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.i).then(e=>i(e.webIDL)),__vite__mapDeps([19,1]))}}),n.of({name:`VB.NET`,extensions:[`vb`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.l).then(e=>i(e.vb)),__vite__mapDeps([19,1]))}}),n.of({name:`VBScript`,extensions:[`vbs`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.c).then(e=>i(e.vbScript)),__vite__mapDeps([19,1]))}}),n.of({name:`Velocity`,extensions:[`vtl`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.s).then(e=>i(e.velocity)),__vite__mapDeps([19,1]))}}),n.of({name:`Verilog`,extensions:[`v`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.o).then(e=>i(e.verilog)),__vite__mapDeps([19,1]))}}),n.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.a).then(e=>i(e.vhdl)),__vite__mapDeps([19,1]))}}),n.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.r).then(e=>i(e.xQuery)),__vite__mapDeps([19,1]))}}),n.of({name:`Yacas`,extensions:[`ys`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.n).then(e=>i(e.yacas)),__vite__mapDeps([19,1]))}}),n.of({name:`Z80`,extensions:[`z80`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.t).then(e=>i(e.z80)),__vite__mapDeps([19,1]))}}),n.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Z).then(e=>i(e.mscgen)),__vite__mapDeps([19,1]))}}),n.of({name:`Xù`,extensions:[`xu`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Z).then(e=>i(e.xu)),__vite__mapDeps([19,1]))}}),n.of({name:`MsGenny`,extensions:[`msgenny`],load(){return e(()=>import(`./vendor-codemirror-legacy-modes-DwltVFbT.js`).then(e=>e.Z).then(e=>i(e.msgenny)),__vite__mapDeps([19,1]))}}),n.of({name:`Vue`,extensions:[`vue`],load(){return e(()=>import(`./vendor-codemirror-lang-vue-DIB78UsR.js`).then(e=>e.t).then(e=>e.vue()),__vite__mapDeps([20,1,2,3]))}}),n.of({name:`Angular Template`,load(){return e(()=>import(`./vendor-codemirror-lang-angular-DXOgWEVj.js`).then(e=>e.t).then(e=>e.angular()),__vite__mapDeps([3,1,2]))}})];export{o as t};
@@ -0,0 +1,2 @@
1
+ import{$ as e,B as t,H as n,Q as r,U as i,Z as a,_t as o,bt as s,ct as c,dt as l,et as u,ft as d,gt as f,it as p,ot as m,pt as h,q as g,st as ee,ut as _,vt as te,xt as ne}from"./vendor-codemirror-autocomplete-7c2L_4dM.js";var v=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFKD`):e=>e,y=class{constructor(e,t,n=0,r=e.length,i,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer=``,this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(v(e)):v,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return f(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=ne(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=o(e);let r=this.normalize(t);if(r.length)for(let e=0,i=n;;e++){let a=r.charCodeAt(e),o=this.match(a,i,this.bufferPos+this.bufferStart);if(e==r.length-1){if(o)return this.value=o,this;break}i==n&&e<t.length&&t.charCodeAt(e)==a&&i++}}}match(e,t,n){let r=null;for(let t=0;t<this.matches.length;t+=2){let i=this.matches[t],a=!1;this.query.charCodeAt(i)==e&&(i==this.query.length-1?r={from:this.matches[t+1],to:n}:(this.matches[t]++,a=!0)),a||(this.matches.splice(t,2),t-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?r={from:t,to:n}:this.matches.push(1,t)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}};typeof Symbol<`u`&&(y.prototype[Symbol.iterator]=function(){return this});var b={from:-1,to:-1,match:/.*/.exec(``)},x=`gm`+(/x/.unicode==null?``:`u`),S=class{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine=``,this.done=!1,this.value=b,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new T(e,t,n,r,i);this.re=new RegExp(t,x+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.iter=e.iter();let a=e.lineAt(r);this.curLineStart=a.from,this.matchPos=E(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine=``:(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine=``:this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=E(this.text,r+ +(n==r)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}},C=new WeakMap,w=class e{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(t,n,r){let i=C.get(t);if(!i||i.from>=r||i.to<=n){let i=new e(n,t.sliceString(n,r));return C.set(t,i),i}if(i.from==n&&i.to==r)return i;let{text:a,from:o}=i;return o>n&&(a=t.sliceString(n,o)+a,o=n),i.to<r&&(a+=t.sliceString(i.to,r)),C.set(t,new e(o,a)),new e(n,a.slice(n-o,r-o))}},T=class{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=b,this.matchPos=E(e,r),this.re=new RegExp(t,x+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.flat=w.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,match:t},this.matchPos=E(this.text,n+ +(e==n)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=w.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<`u`&&(S.prototype[Symbol.iterator]=T.prototype[Symbol.iterator]=function(){return this});function re(e){try{return new RegExp(e,x),!0}catch{return!1}}function E(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}var ie=e=>{let{state:t}=e,i=String(t.doc.lineAt(e.state.selection.main.head).number),{close:a,result:o}=r(e,{label:t.phrase(`Go to line`),input:{type:`text`,name:`line`,value:i},focus:!0,submitLabel:t.phrase(`go`)});return o.then(r=>{let i=r&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(r.elements.line.value);if(!i){e.dispatch({effects:a});return}let o=t.doc.lineAt(t.selection.main.head),[,s,c,l,u]=i,d=l?+l.slice(1):0,f=c?+c:o.number;if(c&&u){let e=f/100;s&&(e=e*(s==`-`?-1:1)+o.number/t.doc.lines),f=Math.round(t.doc.lines*e)}else c&&s&&(f=f*(s==`-`?-1:1)+o.number);let p=t.doc.line(Math.max(1,Math.min(t.doc.lines,f))),h=m.cursor(p.from+Math.max(0,Math.min(d,p.length)));e.dispatch({effects:[a,n.scrollIntoView(h.from,{y:`center`})],selection:h})}),!0},ae=({state:e,dispatch:t})=>{let{selection:n}=e,r=m.create(n.ranges.map(t=>e.wordAt(t.head)||m.cursor(t.head)),n.mainIndex);return!r.eq(n)&&(t(e.update({selection:r})),!0)};function D(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),a=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new y(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new y(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}else{if(n&&r.some(e=>e.from==i.value.from))continue;if(a){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}}var oe=({state:e,dispatch:t})=>{let{ranges:r}=e.selection;if(r.some(e=>e.from===e.to))return ae({state:e,dispatch:t});let i=e.sliceDoc(r[0].from,r[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=i))return!1;let a=D(e,i);return a?(t(e.update({selection:e.selection.addRange(m.range(a.from,a.to),!1),effects:n.scrollIntoView(a.to)})),!0):!1},O=c.define({combine(e){return te(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new Ce(e),scrollToMatch:e=>n.scrollIntoView(e)})}});function se(e){return e?[O.of(e),$]:$}var k=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||``,this.valid=!!this.search&&(!this.regexp||re(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>t==`n`?`
2
+ `:t==`r`?`\r`:t==`t`?` `:`\\`)}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new pe(this):new ue(this)}getCursor(e,t=0,n){let r=e.doc?e:ee.create({doc:e});return n??=r.doc.length,this.regexp?M(this,r,t,n):j(this,r,t,n)}},A=class{constructor(e){this.spec=e}};function ce(e,t,n){return(r,i,a,o)=>n&&!n(r,i,a,o)?!1:e(r>=o&&i<=o+a.length?a.slice(r-o,i-o):t.doc.sliceString(r,i),t,r,i)}function j(e,t,n,r){let i;return e.wholeWord&&(i=le(t.doc,t.charCategorizer(t.selection.main.head))),e.test&&(i=ce(e.test,t,i)),new y(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),i)}function le(e,t){return(n,r,i,a)=>((a>n||a+i.length<r)&&(a=Math.max(0,n-2),i=e.sliceString(a,Math.min(e.length,r+2))),(t(N(i,n-a))!=p.Word||t(P(i,n-a))!=p.Word)&&(t(P(i,r-a))!=p.Word||t(N(i,r-a))!=p.Word))}var ue=class extends A{constructor(e){super(e)}nextMatch(e,t,n){let r=j(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=j(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),i=j(this.spec,e,n,r),a=null;for(;!i.nextOverlapping().done;)a=i.value;if(a)return a;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length),r&&(r.from!=t||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=j(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=j(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}};function de(e,t,n){return(r,i,a)=>(!n||n(r,i,a))&&e(a[0],t,r,i)}function M(e,t,n,r){let i;return e.wholeWord&&(i=fe(t.charCategorizer(t.selection.main.head))),e.test&&(i=de(e.test,t,i)),new S(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:i},n,r)}function N(e,t){return e.slice(s(e,t,!1),t)}function P(e,t){return e.slice(t,s(e,t))}function fe(e){return(t,n,r)=>!r[0].length||(e(N(r.input,r.index))!=p.Word||e(P(r.input,r.index))!=p.Word)&&(e(P(r.input,r.index+r[0].length))!=p.Word||e(N(r.input,r.index+r[0].length))!=p.Word)}var pe=class extends A{nextMatch(e,t,n){let r=M(this.spec,e,n,e.doc.length).next();return r.done&&(r=M(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-r*1e4),a=M(this.spec,e,i,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(i==t||o.from>i+10))return o;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n==`&`)return e.match[0];if(n==`$`)return`$`;for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r<e.match.length)return e.match[r]+n.slice(t)}return t})}matchAll(e,t){let n=M(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=M(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},F=d.define(),I=d.define(),L=h.define({create(e){return new R(W(e).create(),null)},update(e,t){for(let n of t.effects)n.is(F)?e=new R(n.value.create(),e.panel):n.is(I)&&(e=new R(e.query,n.value?U:null));return e},provide:t=>e.from(t,e=>e.panel)});function me(e){let t=e.field(L,!1);return t?t.query.spec:W(e)}function he(e){return e.field(L,!1)?.panel!=null}var R=class{constructor(e,t){this.query=e,this.panel=t}},ge=t.mark({class:`cm-searchMatch`}),_e=t.mark({class:`cm-searchMatch cm-searchMatch-selected`}),ve=i.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(L))}update(e){let t=e.state.field(L);(t!=e.startState.field(L)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:n}){if(!n||!e.spec.valid)return t.none;let{view:r}=this,i=new l;for(let t=0,n=r.visibleRanges,a=n.length;t<a;t++){let{from:o,to:s}=n[t];for(;t<a-1&&s>n[t+1].from-500;)s=n[++t].to;e.highlight(r.state,o,s,(e,t)=>{let n=r.state.selection.ranges.some(n=>n.from==e&&n.to==t);i.add(e,t,n?_e:ge)})}return i.finish()}},{decorations:e=>e.decorations});function z(e){return t=>{let n=t.state.field(L,!1);return n&&n.query.spec.valid?e(t,n):q(t)}}var B=z((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=m.single(r.from,r.to),a=e.state.facet(O);return e.dispatch({selection:i,effects:[Q(e,r),a.scrollToMatch(i.main,e)],userEvent:`select.search`}),K(e),!0}),V=z((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let a=m.single(i.from,i.to),o=e.state.facet(O);return e.dispatch({selection:a,effects:[Q(e,i),o.scrollToMatch(a.main,e)],userEvent:`select.search`}),K(e),!0}),ye=z((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:m.create(n.map(e=>m.range(e.from,e.to))),userEvent:`select.search.matches`}),!0)}),be=({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,a=[],o=0;for(let t=new y(e.doc,e.sliceDoc(r,i));!t.next().done;){if(a.length>1e3)return!1;t.value.from==r&&(o=a.length),a.push(m.range(t.value.from,t.value.to))}return t(e.update({selection:m.create(a,o),userEvent:`select.search.matches`})),!0},H=z((e,{query:t})=>{let{state:r}=e,{from:i,to:a}=r.selection.main;if(r.readOnly)return!1;let o=t.nextMatch(r,i,i);if(!o)return!1;let s=o,c=[],l,u,d=[];s.from==i&&s.to==a&&(u=r.toText(t.getReplacement(s)),c.push({from:s.from,to:s.to,insert:u}),s=t.nextMatch(r,s.from,s.to),d.push(n.announce.of(r.phrase(`replaced match on line $`,r.doc.lineAt(i).number)+`.`)));let f=e.state.changes(c);return s&&(l=m.single(s.from,s.to).map(f),d.push(Q(e,s)),d.push(r.facet(O).scrollToMatch(l.main,e))),e.dispatch({changes:f,selection:l,effects:d,userEvent:`input.replace`}),!0}),xe=z((e,{query:t})=>{if(e.state.readOnly)return!1;let r=t.matchAll(e.state,1e9).map(e=>{let{from:n,to:r}=e;return{from:n,to:r,insert:t.getReplacement(e)}});if(!r.length)return!1;let i=e.state.phrase(`replaced $ matches`,r.length)+`.`;return e.dispatch({changes:r,effects:n.announce.of(i),userEvent:`input.replace.all`}),!0});function U(e){return e.state.facet(O).createPanel(e)}function W(e,t){let n=e.selection.main,r=n.empty||n.to>n.from+100?``:e.sliceDoc(n.from,n.to);if(t&&!r)return t;let i=e.facet(O);return new k({search:t?.literal??i.literal?r:r.replace(/\n/g,`\\n`),caseSensitive:t?.caseSensitive??i.caseSensitive,literal:t?.literal??i.literal,regexp:t?.regexp??i.regexp,wholeWord:t?.wholeWord??i.wholeWord})}function G(e){let t=g(e,U);return t&&t.dom.querySelector(`[main-field]`)}function K(e){let t=G(e);t&&t==e.root.activeElement&&t.select()}var q=e=>{let t=e.state.field(L,!1);if(t&&t.panel){let n=G(e);if(n&&n!=e.root.activeElement){let r=W(e.state,t.query.spec);r.valid&&e.dispatch({effects:F.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[I.of(!0),t?F.of(W(e.state,t.query.spec)):d.appendConfig.of($)]});return!0},J=e=>{let t=e.state.field(L,!1);if(!t||!t.panel)return!1;let n=g(e,U);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:I.of(!1)}),!0},Se=[{key:`Mod-f`,run:q,scope:`editor search-panel`},{key:`F3`,run:B,shift:V,scope:`editor search-panel`,preventDefault:!0},{key:`Mod-g`,run:B,shift:V,scope:`editor search-panel`,preventDefault:!0},{key:`Escape`,run:J,scope:`editor search-panel`},{key:`Mod-Shift-l`,run:be},{key:`Mod-Alt-g`,run:ie},{key:`Mod-d`,run:oe,preventDefault:!0}],Ce=class{constructor(e){this.view=e;let t=this.query=e.state.field(L).query.spec;this.commit=this.commit.bind(this),this.searchField=u(`input`,{value:t.search,placeholder:Y(e,`Find`),"aria-label":Y(e,`Find`),class:`cm-textfield`,name:`search`,form:``,"main-field":`true`,onchange:this.commit,onkeyup:this.commit}),this.replaceField=u(`input`,{value:t.replace,placeholder:Y(e,`Replace`),"aria-label":Y(e,`Replace`),class:`cm-textfield`,name:`replace`,form:``,onchange:this.commit,onkeyup:this.commit}),this.caseField=u(`input`,{type:`checkbox`,name:`case`,form:``,checked:t.caseSensitive,onchange:this.commit}),this.reField=u(`input`,{type:`checkbox`,name:`re`,form:``,checked:t.regexp,onchange:this.commit}),this.wordField=u(`input`,{type:`checkbox`,name:`word`,form:``,checked:t.wholeWord,onchange:this.commit});function n(e,t,n){return u(`button`,{class:`cm-button`,name:e,onclick:t,type:`button`},n)}this.dom=u(`div`,{onkeydown:e=>this.keydown(e),class:`cm-search`},[this.searchField,n(`next`,()=>B(e),[Y(e,`next`)]),n(`prev`,()=>V(e),[Y(e,`previous`)]),n(`select`,()=>ye(e),[Y(e,`all`)]),u(`label`,null,[this.caseField,Y(e,`match case`)]),u(`label`,null,[this.reField,Y(e,`regexp`)]),u(`label`,null,[this.wordField,Y(e,`by word`)]),...e.state.readOnly?[]:[u(`br`),this.replaceField,n(`replace`,()=>H(e),[Y(e,`replace`)]),n(`replaceAll`,()=>xe(e),[Y(e,`replace all`)])],u(`button`,{name:`close`,onclick:()=>J(e),"aria-label":Y(e,`close`),type:`button`},[`×`])])}commit(){let e=new k({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:F.of(e)}))}keydown(e){a(this.view,e,`search-panel`)?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?V:B)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),H(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(F)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(O).top}};function Y(e,t){return e.state.phrase(t)}var X=30,Z=/[\s\.,:;?!]/;function Q(e,{from:t,to:r}){let i=e.state.doc.lineAt(t),a=e.state.doc.lineAt(r).to,o=Math.max(i.from,t-X),s=Math.min(a,r+X),c=e.state.sliceDoc(o,s);if(o!=i.from){for(let e=0;e<X;e++)if(!Z.test(c[e+1])&&Z.test(c[e])){c=c.slice(e);break}}if(s!=a){for(let e=c.length-1;e>c.length-X;e--)if(!Z.test(c[e-1])&&Z.test(c[e])){c=c.slice(0,e);break}}return n.announce.of(`${e.state.phrase(`current match`)}. ${c} ${e.state.phrase(`on line`)} ${i.number}.`)}var we=n.baseTheme({".cm-panel.cm-search":{padding:`2px 6px 4px`,position:`relative`,"& [name=close]":{position:`absolute`,top:`0`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0},"& input, & button, & label":{margin:`.2em .6em .2em 0`},"& input[type=checkbox]":{marginRight:`.2em`},"& label":{fontSize:`80%`,whiteSpace:`pre`}},"&light .cm-searchMatch":{backgroundColor:`#ffff0054`},"&dark .cm-searchMatch":{backgroundColor:`#00ffff8a`},"&light .cm-searchMatch-selected":{backgroundColor:`#ff6a0054`},"&dark .cm-searchMatch-selected":{backgroundColor:`#ff00ff8a`}}),$=[L,_.low(ve),we];export{q as a,he as c,me as i,F as l,k as n,se as o,J as r,Se as s,S as t};
@@ -1,4 +1,4 @@
1
- import{$ as e,A as t,G as n,H as r,J as i,M as a,U as o,W as s,ct as c,dt as l,ft as u,ht as d,mt as f,p,pt as m,tt as h,x as g,y as _}from"./vendor-codemirror-autocomplete-DHomsvW7.js";import{c as v,f as y,i as b,l as x,m as S,n as C,p as w,r as T,t as E,u as D}from"./vendor-codemirror-commands-C9DCaJ0C.js";import{l as O,n as k,t as ee}from"./vendor-codemirror-search-D2SOgzph.js";function te(e){var t=e.Pos;function n(e,t,n){if(t.line===n.line&&t.ch>=n.ch-1){var r=e.getLine(t.line).charCodeAt(t.ch);55296<=r&&r<=55551&&(n.ch+=1)}return{start:t,end:n}}var r=[{keys:`<Left>`,type:`keyToKey`,toKeys:`h`},{keys:`<Right>`,type:`keyToKey`,toKeys:`l`},{keys:`<Up>`,type:`keyToKey`,toKeys:`k`},{keys:`<Down>`,type:`keyToKey`,toKeys:`j`},{keys:`g<Up>`,type:`keyToKey`,toKeys:`gk`},{keys:`g<Down>`,type:`keyToKey`,toKeys:`gj`},{keys:`<Space>`,type:`keyToKey`,toKeys:`l`},{keys:`<BS>`,type:`keyToKey`,toKeys:`h`},{keys:`<Del>`,type:`keyToKey`,toKeys:`x`},{keys:`<C-Space>`,type:`keyToKey`,toKeys:`W`},{keys:`<C-BS>`,type:`keyToKey`,toKeys:`B`},{keys:`<S-Space>`,type:`keyToKey`,toKeys:`w`},{keys:`<S-BS>`,type:`keyToKey`,toKeys:`b`},{keys:`<C-n>`,type:`keyToKey`,toKeys:`j`},{keys:`<C-p>`,type:`keyToKey`,toKeys:`k`},{keys:`<C-[>`,type:`keyToKey`,toKeys:`<Esc>`},{keys:`<C-c>`,type:`keyToKey`,toKeys:`<Esc>`},{keys:`<C-[>`,type:`keyToKey`,toKeys:`<Esc>`,context:`insert`},{keys:`<C-c>`,type:`keyToKey`,toKeys:`<Esc>`,context:`insert`},{keys:`<C-Esc>`,type:`keyToKey`,toKeys:`<Esc>`},{keys:`<C-Esc>`,type:`keyToKey`,toKeys:`<Esc>`,context:`insert`},{keys:`s`,type:`keyToKey`,toKeys:`cl`,context:`normal`},{keys:`s`,type:`keyToKey`,toKeys:`c`,context:`visual`},{keys:`S`,type:`keyToKey`,toKeys:`cc`,context:`normal`},{keys:`S`,type:`keyToKey`,toKeys:`VdO`,context:`visual`},{keys:`<Home>`,type:`keyToKey`,toKeys:`0`},{keys:`<End>`,type:`keyToKey`,toKeys:`$`},{keys:`<PageUp>`,type:`keyToKey`,toKeys:`<C-b>`},{keys:`<PageDown>`,type:`keyToKey`,toKeys:`<C-f>`},{keys:`<CR>`,type:`keyToKey`,toKeys:`j^`,context:`normal`},{keys:`<Ins>`,type:`keyToKey`,toKeys:`i`,context:`normal`},{keys:`<Ins>`,type:`action`,action:`toggleOverwrite`,context:`insert`},{keys:`H`,type:`motion`,motion:`moveToTopLine`,motionArgs:{linewise:!0,toJumplist:!0}},{keys:`M`,type:`motion`,motion:`moveToMiddleLine`,motionArgs:{linewise:!0,toJumplist:!0}},{keys:`L`,type:`motion`,motion:`moveToBottomLine`,motionArgs:{linewise:!0,toJumplist:!0}},{keys:`h`,type:`motion`,motion:`moveByCharacters`,motionArgs:{forward:!1}},{keys:`l`,type:`motion`,motion:`moveByCharacters`,motionArgs:{forward:!0}},{keys:`j`,type:`motion`,motion:`moveByLines`,motionArgs:{forward:!0,linewise:!0}},{keys:`k`,type:`motion`,motion:`moveByLines`,motionArgs:{forward:!1,linewise:!0}},{keys:`gj`,type:`motion`,motion:`moveByDisplayLines`,motionArgs:{forward:!0}},{keys:`gk`,type:`motion`,motion:`moveByDisplayLines`,motionArgs:{forward:!1}},{keys:`w`,type:`motion`,motion:`moveByWords`,motionArgs:{forward:!0,wordEnd:!1}},{keys:`W`,type:`motion`,motion:`moveByWords`,motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:`e`,type:`motion`,motion:`moveByWords`,motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:`E`,type:`motion`,motion:`moveByWords`,motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:`b`,type:`motion`,motion:`moveByWords`,motionArgs:{forward:!1,wordEnd:!1}},{keys:`B`,type:`motion`,motion:`moveByWords`,motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:`ge`,type:`motion`,motion:`moveByWords`,motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:`gE`,type:`motion`,motion:`moveByWords`,motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:`{`,type:`motion`,motion:`moveByParagraph`,motionArgs:{forward:!1,toJumplist:!0}},{keys:`}`,type:`motion`,motion:`moveByParagraph`,motionArgs:{forward:!0,toJumplist:!0}},{keys:`(`,type:`motion`,motion:`moveBySentence`,motionArgs:{forward:!1}},{keys:`)`,type:`motion`,motion:`moveBySentence`,motionArgs:{forward:!0}},{keys:`<C-f>`,type:`motion`,motion:`moveByPage`,motionArgs:{forward:!0}},{keys:`<C-b>`,type:`motion`,motion:`moveByPage`,motionArgs:{forward:!1}},{keys:`<C-d>`,type:`motion`,motion:`moveByScroll`,motionArgs:{forward:!0,explicitRepeat:!0}},{keys:`<C-u>`,type:`motion`,motion:`moveByScroll`,motionArgs:{forward:!1,explicitRepeat:!0}},{keys:`gg`,type:`motion`,motion:`moveToLineOrEdgeOfDocument`,motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:`G`,type:`motion`,motion:`moveToLineOrEdgeOfDocument`,motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:`g$`,type:`motion`,motion:`moveToEndOfDisplayLine`},{keys:`g^`,type:`motion`,motion:`moveToStartOfDisplayLine`},{keys:`g0`,type:`motion`,motion:`moveToStartOfDisplayLine`},{keys:`0`,type:`motion`,motion:`moveToStartOfLine`},{keys:`^`,type:`motion`,motion:`moveToFirstNonWhiteSpaceCharacter`},{keys:`+`,type:`motion`,motion:`moveByLines`,motionArgs:{forward:!0,toFirstChar:!0}},{keys:`-`,type:`motion`,motion:`moveByLines`,motionArgs:{forward:!1,toFirstChar:!0}},{keys:`_`,type:`motion`,motion:`moveByLines`,motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:`$`,type:`motion`,motion:`moveToEol`,motionArgs:{inclusive:!0}},{keys:`%`,type:`motion`,motion:`moveToMatchedSymbol`,motionArgs:{inclusive:!0,toJumplist:!0}},{keys:`f<character>`,type:`motion`,motion:`moveToCharacter`,motionArgs:{forward:!0,inclusive:!0}},{keys:`F<character>`,type:`motion`,motion:`moveToCharacter`,motionArgs:{forward:!1}},{keys:`t<character>`,type:`motion`,motion:`moveTillCharacter`,motionArgs:{forward:!0,inclusive:!0}},{keys:`T<character>`,type:`motion`,motion:`moveTillCharacter`,motionArgs:{forward:!1}},{keys:`;`,type:`motion`,motion:`repeatLastCharacterSearch`,motionArgs:{forward:!0}},{keys:`,`,type:`motion`,motion:`repeatLastCharacterSearch`,motionArgs:{forward:!1}},{keys:`'<register>`,type:`motion`,motion:`goToMark`,motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<register>",type:`motion`,motion:`goToMark`,motionArgs:{toJumplist:!0}},{keys:"]`",type:`motion`,motion:`jumpToMark`,motionArgs:{forward:!0}},{keys:"[`",type:`motion`,motion:`jumpToMark`,motionArgs:{forward:!1}},{keys:`]'`,type:`motion`,motion:`jumpToMark`,motionArgs:{forward:!0,linewise:!0}},{keys:`['`,type:`motion`,motion:`jumpToMark`,motionArgs:{forward:!1,linewise:!0}},{keys:`]p`,type:`action`,action:`paste`,isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:`[p`,type:`action`,action:`paste`,isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:`]<character>`,type:`motion`,motion:`moveToSymbol`,motionArgs:{forward:!0,toJumplist:!0}},{keys:`[<character>`,type:`motion`,motion:`moveToSymbol`,motionArgs:{forward:!1,toJumplist:!0}},{keys:`|`,type:`motion`,motion:`moveToColumn`},{keys:`o`,type:`motion`,motion:`moveToOtherHighlightedEnd`,context:`visual`},{keys:`O`,type:`motion`,motion:`moveToOtherHighlightedEnd`,motionArgs:{sameLine:!0},context:`visual`},{keys:`d`,type:`operator`,operator:`delete`},{keys:`y`,type:`operator`,operator:`yank`},{keys:`c`,type:`operator`,operator:`change`},{keys:`=`,type:`operator`,operator:`indentAuto`},{keys:`>`,type:`operator`,operator:`indent`,operatorArgs:{indentRight:!0}},{keys:`<`,type:`operator`,operator:`indent`,operatorArgs:{indentRight:!1}},{keys:`g~`,type:`operator`,operator:`changeCase`},{keys:`gu`,type:`operator`,operator:`changeCase`,operatorArgs:{toLower:!0},isEdit:!0},{keys:`gU`,type:`operator`,operator:`changeCase`,operatorArgs:{toLower:!1},isEdit:!0},{keys:`n`,type:`motion`,motion:`findNext`,motionArgs:{forward:!0,toJumplist:!0}},{keys:`N`,type:`motion`,motion:`findNext`,motionArgs:{forward:!1,toJumplist:!0}},{keys:`gn`,type:`motion`,motion:`findAndSelectNextInclusive`,motionArgs:{forward:!0}},{keys:`gN`,type:`motion`,motion:`findAndSelectNextInclusive`,motionArgs:{forward:!1}},{keys:`gq`,type:`operator`,operator:`hardWrap`},{keys:`gw`,type:`operator`,operator:`hardWrap`,operatorArgs:{keepCursor:!0}},{keys:`g?`,type:`operator`,operator:`rot13`},{keys:`x`,type:`operatorMotion`,operator:`delete`,motion:`moveByCharacters`,motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:`X`,type:`operatorMotion`,operator:`delete`,motion:`moveByCharacters`,motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:`D`,type:`operatorMotion`,operator:`delete`,motion:`moveToEol`,motionArgs:{inclusive:!0},context:`normal`},{keys:`D`,type:`operator`,operator:`delete`,operatorArgs:{linewise:!0},context:`visual`},{keys:`Y`,type:`operatorMotion`,operator:`yank`,motion:`expandToLine`,motionArgs:{linewise:!0},context:`normal`},{keys:`Y`,type:`operator`,operator:`yank`,operatorArgs:{linewise:!0},context:`visual`},{keys:`C`,type:`operatorMotion`,operator:`change`,motion:`moveToEol`,motionArgs:{inclusive:!0},context:`normal`},{keys:`C`,type:`operator`,operator:`change`,operatorArgs:{linewise:!0},context:`visual`},{keys:`~`,type:`operatorMotion`,operator:`changeCase`,motion:`moveByCharacters`,motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:`normal`},{keys:`~`,type:`operator`,operator:`changeCase`,context:`visual`},{keys:`<C-u>`,type:`operatorMotion`,operator:`delete`,motion:`moveToStartOfLine`,context:`insert`},{keys:`<C-w>`,type:`operatorMotion`,operator:`delete`,motion:`moveByWords`,motionArgs:{forward:!1,wordEnd:!1},context:`insert`},{keys:`<C-w>`,type:`idle`,context:`normal`},{keys:`<C-i>`,type:`action`,action:`jumpListWalk`,actionArgs:{forward:!0}},{keys:`<C-o>`,type:`action`,action:`jumpListWalk`,actionArgs:{forward:!1}},{keys:`<C-e>`,type:`action`,action:`scroll`,actionArgs:{forward:!0,linewise:!0}},{keys:`<C-y>`,type:`action`,action:`scroll`,actionArgs:{forward:!1,linewise:!0}},{keys:`a`,type:`action`,action:`enterInsertMode`,isEdit:!0,actionArgs:{insertAt:`charAfter`},context:`normal`},{keys:`A`,type:`action`,action:`enterInsertMode`,isEdit:!0,actionArgs:{insertAt:`eol`},context:`normal`},{keys:`A`,type:`action`,action:`enterInsertMode`,isEdit:!0,actionArgs:{insertAt:`endOfSelectedArea`},context:`visual`},{keys:`i`,type:`action`,action:`enterInsertMode`,isEdit:!0,actionArgs:{insertAt:`inplace`},context:`normal`},{keys:`gi`,type:`action`,action:`enterInsertMode`,isEdit:!0,actionArgs:{insertAt:`lastEdit`},context:`normal`},{keys:`I`,type:`action`,action:`enterInsertMode`,isEdit:!0,actionArgs:{insertAt:`firstNonBlank`},context:`normal`},{keys:`gI`,type:`action`,action:`enterInsertMode`,isEdit:!0,actionArgs:{insertAt:`bol`},context:`normal`},{keys:`I`,type:`action`,action:`enterInsertMode`,isEdit:!0,actionArgs:{insertAt:`startOfSelectedArea`},context:`visual`},{keys:`o`,type:`action`,action:`newLineAndEnterInsertMode`,isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:`normal`},{keys:`O`,type:`action`,action:`newLineAndEnterInsertMode`,isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:`normal`},{keys:`v`,type:`action`,action:`toggleVisualMode`},{keys:`V`,type:`action`,action:`toggleVisualMode`,actionArgs:{linewise:!0}},{keys:`<C-v>`,type:`action`,action:`toggleVisualMode`,actionArgs:{blockwise:!0}},{keys:`<C-q>`,type:`action`,action:`toggleVisualMode`,actionArgs:{blockwise:!0}},{keys:`gv`,type:`action`,action:`reselectLastSelection`},{keys:`J`,type:`action`,action:`joinLines`,isEdit:!0},{keys:`gJ`,type:`action`,action:`joinLines`,actionArgs:{keepSpaces:!0},isEdit:!0},{keys:`p`,type:`action`,action:`paste`,isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:`P`,type:`action`,action:`paste`,isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:`r<character>`,type:`action`,action:`replace`,isEdit:!0},{keys:`@<register>`,type:`action`,action:`replayMacro`},{keys:`q<register>`,type:`action`,action:`enterMacroRecordMode`},{keys:`R`,type:`action`,action:`enterInsertMode`,isEdit:!0,actionArgs:{replace:!0},context:`normal`},{keys:`R`,type:`operator`,operator:`change`,operatorArgs:{linewise:!0,fullLine:!0},context:`visual`,exitVisualBlock:!0},{keys:`u`,type:`action`,action:`undo`,context:`normal`},{keys:`u`,type:`operator`,operator:`changeCase`,operatorArgs:{toLower:!0},context:`visual`,isEdit:!0},{keys:`U`,type:`operator`,operator:`changeCase`,operatorArgs:{toLower:!1},context:`visual`,isEdit:!0},{keys:`<C-r>`,type:`action`,action:`redo`},{keys:`m<register>`,type:`action`,action:`setMark`},{keys:`"<register>`,type:`action`,action:`setRegister`},{keys:`<C-r><register>`,type:`action`,action:`insertRegister`,context:`insert`,isEdit:!0},{keys:`<C-o>`,type:`action`,action:`oneNormalCommand`,context:`insert`},{keys:`zz`,type:`action`,action:`scrollToCursor`,actionArgs:{position:`center`}},{keys:`z.`,type:`action`,action:`scrollToCursor`,actionArgs:{position:`center`},motion:`moveToFirstNonWhiteSpaceCharacter`},{keys:`zt`,type:`action`,action:`scrollToCursor`,actionArgs:{position:`top`}},{keys:`z<CR>`,type:`action`,action:`scrollToCursor`,actionArgs:{position:`top`},motion:`moveToFirstNonWhiteSpaceCharacter`},{keys:`zb`,type:`action`,action:`scrollToCursor`,actionArgs:{position:`bottom`}},{keys:`z-`,type:`action`,action:`scrollToCursor`,actionArgs:{position:`bottom`},motion:`moveToFirstNonWhiteSpaceCharacter`},{keys:`.`,type:`action`,action:`repeatLastEdit`},{keys:`<C-a>`,type:`action`,action:`incrementNumberToken`,isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:`<C-x>`,type:`action`,action:`incrementNumberToken`,isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:`<C-t>`,type:`action`,action:`indent`,actionArgs:{indentRight:!0},context:`insert`},{keys:`<C-d>`,type:`action`,action:`indent`,actionArgs:{indentRight:!1},context:`insert`},{keys:`a<register>`,type:`motion`,motion:`textObjectManipulation`},{keys:`i<register>`,type:`motion`,motion:`textObjectManipulation`,motionArgs:{textObjectInner:!0}},{keys:`/`,type:`search`,searchArgs:{forward:!0,querySrc:`prompt`,toJumplist:!0}},{keys:`?`,type:`search`,searchArgs:{forward:!1,querySrc:`prompt`,toJumplist:!0}},{keys:`*`,type:`search`,searchArgs:{forward:!0,querySrc:`wordUnderCursor`,wholeWordOnly:!0,toJumplist:!0}},{keys:`#`,type:`search`,searchArgs:{forward:!1,querySrc:`wordUnderCursor`,wholeWordOnly:!0,toJumplist:!0}},{keys:`g*`,type:`search`,searchArgs:{forward:!0,querySrc:`wordUnderCursor`,toJumplist:!0}},{keys:`g#`,type:`search`,searchArgs:{forward:!1,querySrc:`wordUnderCursor`,toJumplist:!0}},{keys:`:`,type:`ex`}],i=Object.create(null),a=r.length,o=[{name:`colorscheme`,shortName:`colo`},{name:`map`},{name:`imap`,shortName:`im`},{name:`nmap`,shortName:`nm`},{name:`vmap`,shortName:`vm`},{name:`omap`,shortName:`om`},{name:`noremap`,shortName:`no`},{name:`nnoremap`,shortName:`nn`},{name:`vnoremap`,shortName:`vn`},{name:`inoremap`,shortName:`ino`},{name:`onoremap`,shortName:`ono`},{name:`unmap`},{name:`mapclear`,shortName:`mapc`},{name:`nmapclear`,shortName:`nmapc`},{name:`vmapclear`,shortName:`vmapc`},{name:`imapclear`,shortName:`imapc`},{name:`omapclear`,shortName:`omapc`},{name:`write`,shortName:`w`},{name:`undo`,shortName:`u`},{name:`redo`,shortName:`red`},{name:`set`,shortName:`se`},{name:`setlocal`,shortName:`setl`},{name:`setglobal`,shortName:`setg`},{name:`sort`,shortName:`sor`},{name:`substitute`,shortName:`s`,possiblyAsync:!0},{name:`startinsert`,shortName:`start`},{name:`nohlsearch`,shortName:`noh`},{name:`yank`,shortName:`y`},{name:`delmarks`,shortName:`delm`},{name:`marks`,excludeFromCommandHistory:!0},{name:`registers`,shortName:`reg`,excludeFromCommandHistory:!0},{name:`vglobal`,shortName:`v`},{name:`delete`,shortName:`d`},{name:`join`,shortName:`j`},{name:`normal`,shortName:`norm`},{name:`global`,shortName:`g`}],s=pe(``);function c(t){t.setOption(`disableInput`,!0),t.setOption(`showCursorWhenSelecting`,!1),e.signal(t,`vim-mode-change`,{mode:`normal`}),t.on(`cursorActivity`,Jt),j(t),e.on(t.getInputField(),`paste`,u(t))}function l(t){t.setOption(`disableInput`,!1),t.off(`cursorActivity`,Jt),e.off(t.getInputField(),`paste`,u(t)),t.state.vim=null,Et&&clearTimeout(Et)}function u(e){var t=e.state.vim;return t.onPasteFn||=function(){t.insertMode||(e.setCursor(V(e.getCursor(),0,1)),we.enterInsertMode(e,{},t))},t.onPasteFn}var d=/[\d]/,f=[e.isWordChar,function(t){return t&&!e.isWordChar(t)&&!/\s/.test(t)}],p=[function(e){return/\S/.test(e)}],m=[`<`,`>`],h=[`-`,`"`,`.`,`:`,`_`,`/`,`+`],g=/^\w$/,_=/^[A-Z]$/;try{_=RegExp(`^[\\p{Lu}]$`,`u`)}catch{}function v(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function y(e){return/^[a-z]$/.test(e)}function b(e){return`()[]{}`.indexOf(e)!=-1}function x(e){return d.test(e)}function S(e){return _.test(e)}function C(e){return/^\s*$/.test(e)}function w(e){return`.?!`.indexOf(e)!=-1}function T(e,t){for(var n=0;n<t.length;n++)if(t[n]==e)return!0;return!1}var E={};function D(e,t,n,r,i){if(t===void 0&&!i)throw Error(`defaultValue is required unless callback is provided`);if(n||=`string`,E[e]={type:n,defaultValue:t,callback:i},r)for(var a=0;a<r.length;a++)E[r[a]]=E[e];t&&O(e,t)}function O(e,t,n,r){var i=E[e];r||={};var a=r.scope;if(!i)return Error(`Unknown option: `+e);if(i.type==`boolean`){if(t&&t!==!0)return Error(`Invalid argument: `+e+`=`+t);t!==!1&&(t=!0)}i.callback?(a!==`local`&&i.callback(t,void 0),a!==`global`&&n&&i.callback(t,n)):(a!==`local`&&(i.value=i.type==`boolean`?!!t:t),a!==`global`&&n&&(n.state.vim.options[e]={value:t}))}function k(e,t,n){var r=E[e];n||={};var i=n.scope;if(!r)return Error(`Unknown option: `+e);if(r.callback){let e=t&&r.callback(void 0,t);return i!==`global`&&e!==void 0?e:i===`local`?void 0:r.callback()}return(i!==`global`&&t&&t.state.vim.options[e]||i!==`local`&&r||{}).value}D(`filetype`,void 0,`string`,[`ft`],function(e,t){if(t!==void 0){if(e===void 0){let e=t.getOption(`mode`);return e==`null`?``:e}{let n=e==``?`null`:e;t.setOption(`mode`,n)}}}),D(`textwidth`,80,`number`,[`tw`],function(e,t){if(t!==void 0){if(e===void 0)return t.getOption(`textwidth`);var n=Math.round(e);n>1&&t.setOption(`textwidth`,n)}});var ee=function(){var e=100,t=-1,n=0,r=0,i=Array(e);function a(a,o,s){var c=i[t%e];function l(n){var r=++t%e,o=i[r];o&&o.clear(),i[r]=a.setBookmark(n)}if(c){var u=c.find();u&&!U(u,o)&&l(o)}else l(o);l(s),n=t,r=t-e+1,r<0&&(r=0)}function o(a,o){t+=o,t>n?t=n:t<r&&(t=r);var s=i[(e+t)%e];if(s&&!s.find()){var c=o>0?1:-1,l,u=a.getCursor();do if(t+=c,s=i[(e+t)%e],s&&(l=s.find())&&!U(u,l))break;while(t<n&&t>r)}return s}function s(e,n){var r=t,i=o(e,n);return t=r,i&&i.find()}return{cachedCursor:void 0,add:a,find:s,move:o}},te=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};class A{constructor(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=te()}exitMacroRecordMode(){var e=M.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1}enterMacroRecordMode(e,t){var n=M.registerController.getRegister(t);if(n){if(n.clear(),this.latestRegister=t,e.openDialog){var r=Z(`span`,{class:`cm-vim-message`},`recording @`+t);this.onRecordingDone=e.openDialog(r,function(){},{bottom:!0})}this.isRecording=!0}}}function j(e){return e.state.vim||(e.state.vim={inputState:new me,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:void 0,sel:{anchor:new t(0,0),head:new t(0,0)},options:{},expectLiteralNext:!1,status:``}),e.state.vim}var M;function ne(){for(var e in M={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:ee(),macroModeState:new A,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:``},registerController:new _e({}),searchHistoryController:new ve,exCommandHistoryController:new ve},E){var t=E[e];t.value=t.defaultValue}}class re{constructor(e,t){this.keyName=e,this.key=t.key,this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.shiftKey=t.shiftKey}}var ie,N={enterVimMode:c,leaveVimMode:l,buildKeyMap:function(){},getRegisterController:function(){return M.registerController},resetVimGlobalState_:ne,getVimGlobalState_:function(){return M},maybeInitVimState_:j,suppressErrorLogging:!1,InsertModeKey:re,map:function(e,t,n){$.map(e,t,n)},unmap:function(e,t){return $.unmap(e,t)},noremap:function(e,t,n){$.map(e,t,n,!0)},mapclear:function(e){var t=r.length,n=a,i=r.slice(0,t-n);if(r=r.slice(t-n),e)for(var o=i.length-1;o>=0;o--){var s=i[o];if(e!==s.context)if(s.context)this._mapCommand(s);else{var c=[`normal`,`insert`,`visual`];for(var l in c)if(c[l]!==e){var u=Object.assign({},s);u.context=c[l],this._mapCommand(u)}}}},langmap:fe,vimKeyFromEvent:de,setOption:O,getOption:k,defineOption:D,defineEx:function(e,t,n){if(!t)t=e;else if(e.indexOf(t)!==0)throw Error(`(Vim.defineEx) "`+t+`" is not a prefix of "`+e+`", command not registered`);It[e]=n,$.commandMap_[t]={name:e,shortName:t,type:`api`}},handleKey:function(e,t,n){var r=this.findKey(e,t,n);if(typeof r==`function`)return r()},multiSelectHandleKey:tn,findKey:function(t,n,i){var a=j(t),o=t;function s(){var e=M.macroModeState;if(e.isRecording){if(n==`q`)return e.exitMacroRecordMode(),I(o),!0;i!=`mapping`&&Wt(e,n)}}function c(){if(n==`<Esc>`){if(a.visualMode)J(o);else if(a.insertMode)Rt(o);else return;return I(o),!0}}function l(){if(c())return!0;a.inputState.keyBuffer.push(n);var e=a.inputState.keyBuffer.join(``),t=n.length==1,i=ye.matchCommand(e,r,a.inputState,`insert`),s=a.inputState.changeQueue;if(i.type==`none`)return I(o),!1;if(i.type==`partial`){if(i.expectLiteralNext&&(a.expectLiteralNext=!0),ie&&window.clearTimeout(ie),ie=t&&window.setTimeout(function(){a.insertMode&&a.inputState.keyBuffer.length&&I(o)},k(`insertModeEscKeysTimeout`)),t){var l=o.listSelections();(!s||s.removed.length!=l.length)&&(s=a.inputState.changeQueue=new he),s.inserted+=n;for(var u=0;u<l.length;u++){var d=G(l[u].anchor,l[u].head),f=K(l[u].anchor,l[u].head),p=o.getRange(d,o.state.overwrite?V(f,0,1):f);s.removed[u]=(s.removed[u]||``)+p}}return!t}if(i.type==`full`&&(a.inputState.keyBuffer.length=0),a.expectLiteralNext=!1,ie&&window.clearTimeout(ie),i.command&&s){for(var l=o.listSelections(),u=0;u<l.length;u++){var m=l[u].head;o.replaceRange(s.removed[u]||``,V(m,0,-s.inserted.length),m,`+input`)}M.macroModeState.lastInsertModeChanges.changes.pop()}return i.command||I(o),i.command}function u(){if(s()||c())return!0;a.inputState.keyBuffer.push(n);var e=a.inputState.keyBuffer.join(``);if(/^[1-9]\d*$/.test(e))return!0;var t=/^(\d*)(.*)$/.exec(e);if(!t)return I(o),!1;var i=a.visualMode?`visual`:`normal`,l=t[2]||t[1];a.inputState.operatorShortcut&&a.inputState.operatorShortcut.slice(-1)==l&&(l=a.inputState.operatorShortcut);var u=ye.matchCommand(l,r,a.inputState,i);return u.type==`none`?(I(o),!1):u.type==`partial`?(u.expectLiteralNext&&(a.expectLiteralNext=!0),!0):u.type==`clear`?(I(o),!0):(a.expectLiteralNext=!1,a.inputState.keyBuffer.length=0,t=/^(\d*)(.*)$/.exec(e),t&&t[1]&&t[1]!=`0`&&a.inputState.pushRepeatDigit(t[1]),u.command)}var d=a.insertMode?l():u();if(d===!1)return!a.insertMode&&(n.length===1||e.isMac&&/<A-.>/.test(n))?function(){return!0}:void 0;if(d===!0)return function(){return!0};if(d)return function(){return o.operation(function(){o.curOp.isVimOp=!0;try{if(typeof d!=`object`)return;d.type==`keyToKey`?F(o,d.toKeys,d):ye.processCommand(o,a,d)}catch(e){throw o.state.vim=void 0,j(o),N.suppressErrorLogging,e}return!0})}},handleEx:function(e,t){$.processCommand(e,t)},defineMotion:be,defineAction:Te,defineOperator:Ce,mapCommand:Ht,_mapCommand:zt,defineRegister:ge,exitVisualMode:J,exitInsertMode:Rt},ae=[],oe=!1,P;function se(e){if(!P)throw Error(`No prompt to send key to`);if(e[0]==`<`){var t=e.toLowerCase().slice(1,-1);if(t=t.split(`-`).pop()||``,t==`lt`)e=`<`;else if(t==`space`)e=` `;else if(t==`cr`)e=`
1
+ import{$ as e,A as t,B as n,H as r,K as i,M as a,U as o,V as s,Z as c,dt as l,ft as u,lt as d,ot as f,p,pt as m,ut as h,x as g,y as _}from"./vendor-codemirror-autocomplete-7c2L_4dM.js";import{c as v,f as y,i as b,l as x,m as S,n as C,p as w,r as T,t as E,u as D}from"./vendor-codemirror-commands-B8KrBQ9B.js";import{l as O,n as k,t as ee}from"./vendor-codemirror-search-ZqtrPLjU.js";function te(e){var t=e.Pos;function n(e,t,n){if(t.line===n.line&&t.ch>=n.ch-1){var r=e.getLine(t.line).charCodeAt(t.ch);55296<=r&&r<=55551&&(n.ch+=1)}return{start:t,end:n}}var r=[{keys:`<Left>`,type:`keyToKey`,toKeys:`h`},{keys:`<Right>`,type:`keyToKey`,toKeys:`l`},{keys:`<Up>`,type:`keyToKey`,toKeys:`k`},{keys:`<Down>`,type:`keyToKey`,toKeys:`j`},{keys:`g<Up>`,type:`keyToKey`,toKeys:`gk`},{keys:`g<Down>`,type:`keyToKey`,toKeys:`gj`},{keys:`<Space>`,type:`keyToKey`,toKeys:`l`},{keys:`<BS>`,type:`keyToKey`,toKeys:`h`},{keys:`<Del>`,type:`keyToKey`,toKeys:`x`},{keys:`<C-Space>`,type:`keyToKey`,toKeys:`W`},{keys:`<C-BS>`,type:`keyToKey`,toKeys:`B`},{keys:`<S-Space>`,type:`keyToKey`,toKeys:`w`},{keys:`<S-BS>`,type:`keyToKey`,toKeys:`b`},{keys:`<C-n>`,type:`keyToKey`,toKeys:`j`},{keys:`<C-p>`,type:`keyToKey`,toKeys:`k`},{keys:`<C-[>`,type:`keyToKey`,toKeys:`<Esc>`},{keys:`<C-c>`,type:`keyToKey`,toKeys:`<Esc>`},{keys:`<C-[>`,type:`keyToKey`,toKeys:`<Esc>`,context:`insert`},{keys:`<C-c>`,type:`keyToKey`,toKeys:`<Esc>`,context:`insert`},{keys:`<C-Esc>`,type:`keyToKey`,toKeys:`<Esc>`},{keys:`<C-Esc>`,type:`keyToKey`,toKeys:`<Esc>`,context:`insert`},{keys:`s`,type:`keyToKey`,toKeys:`cl`,context:`normal`},{keys:`s`,type:`keyToKey`,toKeys:`c`,context:`visual`},{keys:`S`,type:`keyToKey`,toKeys:`cc`,context:`normal`},{keys:`S`,type:`keyToKey`,toKeys:`VdO`,context:`visual`},{keys:`<Home>`,type:`keyToKey`,toKeys:`0`},{keys:`<End>`,type:`keyToKey`,toKeys:`$`},{keys:`<PageUp>`,type:`keyToKey`,toKeys:`<C-b>`},{keys:`<PageDown>`,type:`keyToKey`,toKeys:`<C-f>`},{keys:`<CR>`,type:`keyToKey`,toKeys:`j^`,context:`normal`},{keys:`<Ins>`,type:`keyToKey`,toKeys:`i`,context:`normal`},{keys:`<Ins>`,type:`action`,action:`toggleOverwrite`,context:`insert`},{keys:`H`,type:`motion`,motion:`moveToTopLine`,motionArgs:{linewise:!0,toJumplist:!0}},{keys:`M`,type:`motion`,motion:`moveToMiddleLine`,motionArgs:{linewise:!0,toJumplist:!0}},{keys:`L`,type:`motion`,motion:`moveToBottomLine`,motionArgs:{linewise:!0,toJumplist:!0}},{keys:`h`,type:`motion`,motion:`moveByCharacters`,motionArgs:{forward:!1}},{keys:`l`,type:`motion`,motion:`moveByCharacters`,motionArgs:{forward:!0}},{keys:`j`,type:`motion`,motion:`moveByLines`,motionArgs:{forward:!0,linewise:!0}},{keys:`k`,type:`motion`,motion:`moveByLines`,motionArgs:{forward:!1,linewise:!0}},{keys:`gj`,type:`motion`,motion:`moveByDisplayLines`,motionArgs:{forward:!0}},{keys:`gk`,type:`motion`,motion:`moveByDisplayLines`,motionArgs:{forward:!1}},{keys:`w`,type:`motion`,motion:`moveByWords`,motionArgs:{forward:!0,wordEnd:!1}},{keys:`W`,type:`motion`,motion:`moveByWords`,motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:`e`,type:`motion`,motion:`moveByWords`,motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:`E`,type:`motion`,motion:`moveByWords`,motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:`b`,type:`motion`,motion:`moveByWords`,motionArgs:{forward:!1,wordEnd:!1}},{keys:`B`,type:`motion`,motion:`moveByWords`,motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:`ge`,type:`motion`,motion:`moveByWords`,motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:`gE`,type:`motion`,motion:`moveByWords`,motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:`{`,type:`motion`,motion:`moveByParagraph`,motionArgs:{forward:!1,toJumplist:!0}},{keys:`}`,type:`motion`,motion:`moveByParagraph`,motionArgs:{forward:!0,toJumplist:!0}},{keys:`(`,type:`motion`,motion:`moveBySentence`,motionArgs:{forward:!1}},{keys:`)`,type:`motion`,motion:`moveBySentence`,motionArgs:{forward:!0}},{keys:`<C-f>`,type:`motion`,motion:`moveByPage`,motionArgs:{forward:!0}},{keys:`<C-b>`,type:`motion`,motion:`moveByPage`,motionArgs:{forward:!1}},{keys:`<C-d>`,type:`motion`,motion:`moveByScroll`,motionArgs:{forward:!0,explicitRepeat:!0}},{keys:`<C-u>`,type:`motion`,motion:`moveByScroll`,motionArgs:{forward:!1,explicitRepeat:!0}},{keys:`gg`,type:`motion`,motion:`moveToLineOrEdgeOfDocument`,motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:`G`,type:`motion`,motion:`moveToLineOrEdgeOfDocument`,motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:`g$`,type:`motion`,motion:`moveToEndOfDisplayLine`},{keys:`g^`,type:`motion`,motion:`moveToStartOfDisplayLine`},{keys:`g0`,type:`motion`,motion:`moveToStartOfDisplayLine`},{keys:`0`,type:`motion`,motion:`moveToStartOfLine`},{keys:`^`,type:`motion`,motion:`moveToFirstNonWhiteSpaceCharacter`},{keys:`+`,type:`motion`,motion:`moveByLines`,motionArgs:{forward:!0,toFirstChar:!0}},{keys:`-`,type:`motion`,motion:`moveByLines`,motionArgs:{forward:!1,toFirstChar:!0}},{keys:`_`,type:`motion`,motion:`moveByLines`,motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:`$`,type:`motion`,motion:`moveToEol`,motionArgs:{inclusive:!0}},{keys:`%`,type:`motion`,motion:`moveToMatchedSymbol`,motionArgs:{inclusive:!0,toJumplist:!0}},{keys:`f<character>`,type:`motion`,motion:`moveToCharacter`,motionArgs:{forward:!0,inclusive:!0}},{keys:`F<character>`,type:`motion`,motion:`moveToCharacter`,motionArgs:{forward:!1}},{keys:`t<character>`,type:`motion`,motion:`moveTillCharacter`,motionArgs:{forward:!0,inclusive:!0}},{keys:`T<character>`,type:`motion`,motion:`moveTillCharacter`,motionArgs:{forward:!1}},{keys:`;`,type:`motion`,motion:`repeatLastCharacterSearch`,motionArgs:{forward:!0}},{keys:`,`,type:`motion`,motion:`repeatLastCharacterSearch`,motionArgs:{forward:!1}},{keys:`'<register>`,type:`motion`,motion:`goToMark`,motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<register>",type:`motion`,motion:`goToMark`,motionArgs:{toJumplist:!0}},{keys:"]`",type:`motion`,motion:`jumpToMark`,motionArgs:{forward:!0}},{keys:"[`",type:`motion`,motion:`jumpToMark`,motionArgs:{forward:!1}},{keys:`]'`,type:`motion`,motion:`jumpToMark`,motionArgs:{forward:!0,linewise:!0}},{keys:`['`,type:`motion`,motion:`jumpToMark`,motionArgs:{forward:!1,linewise:!0}},{keys:`]p`,type:`action`,action:`paste`,isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:`[p`,type:`action`,action:`paste`,isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:`]<character>`,type:`motion`,motion:`moveToSymbol`,motionArgs:{forward:!0,toJumplist:!0}},{keys:`[<character>`,type:`motion`,motion:`moveToSymbol`,motionArgs:{forward:!1,toJumplist:!0}},{keys:`|`,type:`motion`,motion:`moveToColumn`},{keys:`o`,type:`motion`,motion:`moveToOtherHighlightedEnd`,context:`visual`},{keys:`O`,type:`motion`,motion:`moveToOtherHighlightedEnd`,motionArgs:{sameLine:!0},context:`visual`},{keys:`d`,type:`operator`,operator:`delete`},{keys:`y`,type:`operator`,operator:`yank`},{keys:`c`,type:`operator`,operator:`change`},{keys:`=`,type:`operator`,operator:`indentAuto`},{keys:`>`,type:`operator`,operator:`indent`,operatorArgs:{indentRight:!0}},{keys:`<`,type:`operator`,operator:`indent`,operatorArgs:{indentRight:!1}},{keys:`g~`,type:`operator`,operator:`changeCase`},{keys:`gu`,type:`operator`,operator:`changeCase`,operatorArgs:{toLower:!0},isEdit:!0},{keys:`gU`,type:`operator`,operator:`changeCase`,operatorArgs:{toLower:!1},isEdit:!0},{keys:`n`,type:`motion`,motion:`findNext`,motionArgs:{forward:!0,toJumplist:!0}},{keys:`N`,type:`motion`,motion:`findNext`,motionArgs:{forward:!1,toJumplist:!0}},{keys:`gn`,type:`motion`,motion:`findAndSelectNextInclusive`,motionArgs:{forward:!0}},{keys:`gN`,type:`motion`,motion:`findAndSelectNextInclusive`,motionArgs:{forward:!1}},{keys:`gq`,type:`operator`,operator:`hardWrap`},{keys:`gw`,type:`operator`,operator:`hardWrap`,operatorArgs:{keepCursor:!0}},{keys:`g?`,type:`operator`,operator:`rot13`},{keys:`x`,type:`operatorMotion`,operator:`delete`,motion:`moveByCharacters`,motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:`X`,type:`operatorMotion`,operator:`delete`,motion:`moveByCharacters`,motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:`D`,type:`operatorMotion`,operator:`delete`,motion:`moveToEol`,motionArgs:{inclusive:!0},context:`normal`},{keys:`D`,type:`operator`,operator:`delete`,operatorArgs:{linewise:!0},context:`visual`},{keys:`Y`,type:`operatorMotion`,operator:`yank`,motion:`expandToLine`,motionArgs:{linewise:!0},context:`normal`},{keys:`Y`,type:`operator`,operator:`yank`,operatorArgs:{linewise:!0},context:`visual`},{keys:`C`,type:`operatorMotion`,operator:`change`,motion:`moveToEol`,motionArgs:{inclusive:!0},context:`normal`},{keys:`C`,type:`operator`,operator:`change`,operatorArgs:{linewise:!0},context:`visual`},{keys:`~`,type:`operatorMotion`,operator:`changeCase`,motion:`moveByCharacters`,motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:`normal`},{keys:`~`,type:`operator`,operator:`changeCase`,context:`visual`},{keys:`<C-u>`,type:`operatorMotion`,operator:`delete`,motion:`moveToStartOfLine`,context:`insert`},{keys:`<C-w>`,type:`operatorMotion`,operator:`delete`,motion:`moveByWords`,motionArgs:{forward:!1,wordEnd:!1},context:`insert`},{keys:`<C-w>`,type:`idle`,context:`normal`},{keys:`<C-i>`,type:`action`,action:`jumpListWalk`,actionArgs:{forward:!0}},{keys:`<C-o>`,type:`action`,action:`jumpListWalk`,actionArgs:{forward:!1}},{keys:`<C-e>`,type:`action`,action:`scroll`,actionArgs:{forward:!0,linewise:!0}},{keys:`<C-y>`,type:`action`,action:`scroll`,actionArgs:{forward:!1,linewise:!0}},{keys:`a`,type:`action`,action:`enterInsertMode`,isEdit:!0,actionArgs:{insertAt:`charAfter`},context:`normal`},{keys:`A`,type:`action`,action:`enterInsertMode`,isEdit:!0,actionArgs:{insertAt:`eol`},context:`normal`},{keys:`A`,type:`action`,action:`enterInsertMode`,isEdit:!0,actionArgs:{insertAt:`endOfSelectedArea`},context:`visual`},{keys:`i`,type:`action`,action:`enterInsertMode`,isEdit:!0,actionArgs:{insertAt:`inplace`},context:`normal`},{keys:`gi`,type:`action`,action:`enterInsertMode`,isEdit:!0,actionArgs:{insertAt:`lastEdit`},context:`normal`},{keys:`I`,type:`action`,action:`enterInsertMode`,isEdit:!0,actionArgs:{insertAt:`firstNonBlank`},context:`normal`},{keys:`gI`,type:`action`,action:`enterInsertMode`,isEdit:!0,actionArgs:{insertAt:`bol`},context:`normal`},{keys:`I`,type:`action`,action:`enterInsertMode`,isEdit:!0,actionArgs:{insertAt:`startOfSelectedArea`},context:`visual`},{keys:`o`,type:`action`,action:`newLineAndEnterInsertMode`,isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:`normal`},{keys:`O`,type:`action`,action:`newLineAndEnterInsertMode`,isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:`normal`},{keys:`v`,type:`action`,action:`toggleVisualMode`},{keys:`V`,type:`action`,action:`toggleVisualMode`,actionArgs:{linewise:!0}},{keys:`<C-v>`,type:`action`,action:`toggleVisualMode`,actionArgs:{blockwise:!0}},{keys:`<C-q>`,type:`action`,action:`toggleVisualMode`,actionArgs:{blockwise:!0}},{keys:`gv`,type:`action`,action:`reselectLastSelection`},{keys:`J`,type:`action`,action:`joinLines`,isEdit:!0},{keys:`gJ`,type:`action`,action:`joinLines`,actionArgs:{keepSpaces:!0},isEdit:!0},{keys:`p`,type:`action`,action:`paste`,isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:`P`,type:`action`,action:`paste`,isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:`r<character>`,type:`action`,action:`replace`,isEdit:!0},{keys:`@<register>`,type:`action`,action:`replayMacro`},{keys:`q<register>`,type:`action`,action:`enterMacroRecordMode`},{keys:`R`,type:`action`,action:`enterInsertMode`,isEdit:!0,actionArgs:{replace:!0},context:`normal`},{keys:`R`,type:`operator`,operator:`change`,operatorArgs:{linewise:!0,fullLine:!0},context:`visual`,exitVisualBlock:!0},{keys:`u`,type:`action`,action:`undo`,context:`normal`},{keys:`u`,type:`operator`,operator:`changeCase`,operatorArgs:{toLower:!0},context:`visual`,isEdit:!0},{keys:`U`,type:`operator`,operator:`changeCase`,operatorArgs:{toLower:!1},context:`visual`,isEdit:!0},{keys:`<C-r>`,type:`action`,action:`redo`},{keys:`m<register>`,type:`action`,action:`setMark`},{keys:`"<register>`,type:`action`,action:`setRegister`},{keys:`<C-r><register>`,type:`action`,action:`insertRegister`,context:`insert`,isEdit:!0},{keys:`<C-o>`,type:`action`,action:`oneNormalCommand`,context:`insert`},{keys:`zz`,type:`action`,action:`scrollToCursor`,actionArgs:{position:`center`}},{keys:`z.`,type:`action`,action:`scrollToCursor`,actionArgs:{position:`center`},motion:`moveToFirstNonWhiteSpaceCharacter`},{keys:`zt`,type:`action`,action:`scrollToCursor`,actionArgs:{position:`top`}},{keys:`z<CR>`,type:`action`,action:`scrollToCursor`,actionArgs:{position:`top`},motion:`moveToFirstNonWhiteSpaceCharacter`},{keys:`zb`,type:`action`,action:`scrollToCursor`,actionArgs:{position:`bottom`}},{keys:`z-`,type:`action`,action:`scrollToCursor`,actionArgs:{position:`bottom`},motion:`moveToFirstNonWhiteSpaceCharacter`},{keys:`.`,type:`action`,action:`repeatLastEdit`},{keys:`<C-a>`,type:`action`,action:`incrementNumberToken`,isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:`<C-x>`,type:`action`,action:`incrementNumberToken`,isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:`<C-t>`,type:`action`,action:`indent`,actionArgs:{indentRight:!0},context:`insert`},{keys:`<C-d>`,type:`action`,action:`indent`,actionArgs:{indentRight:!1},context:`insert`},{keys:`a<register>`,type:`motion`,motion:`textObjectManipulation`},{keys:`i<register>`,type:`motion`,motion:`textObjectManipulation`,motionArgs:{textObjectInner:!0}},{keys:`/`,type:`search`,searchArgs:{forward:!0,querySrc:`prompt`,toJumplist:!0}},{keys:`?`,type:`search`,searchArgs:{forward:!1,querySrc:`prompt`,toJumplist:!0}},{keys:`*`,type:`search`,searchArgs:{forward:!0,querySrc:`wordUnderCursor`,wholeWordOnly:!0,toJumplist:!0}},{keys:`#`,type:`search`,searchArgs:{forward:!1,querySrc:`wordUnderCursor`,wholeWordOnly:!0,toJumplist:!0}},{keys:`g*`,type:`search`,searchArgs:{forward:!0,querySrc:`wordUnderCursor`,toJumplist:!0}},{keys:`g#`,type:`search`,searchArgs:{forward:!1,querySrc:`wordUnderCursor`,toJumplist:!0}},{keys:`:`,type:`ex`}],i=Object.create(null),a=r.length,o=[{name:`colorscheme`,shortName:`colo`},{name:`map`},{name:`imap`,shortName:`im`},{name:`nmap`,shortName:`nm`},{name:`vmap`,shortName:`vm`},{name:`omap`,shortName:`om`},{name:`noremap`,shortName:`no`},{name:`nnoremap`,shortName:`nn`},{name:`vnoremap`,shortName:`vn`},{name:`inoremap`,shortName:`ino`},{name:`onoremap`,shortName:`ono`},{name:`unmap`},{name:`mapclear`,shortName:`mapc`},{name:`nmapclear`,shortName:`nmapc`},{name:`vmapclear`,shortName:`vmapc`},{name:`imapclear`,shortName:`imapc`},{name:`omapclear`,shortName:`omapc`},{name:`write`,shortName:`w`},{name:`undo`,shortName:`u`},{name:`redo`,shortName:`red`},{name:`set`,shortName:`se`},{name:`setlocal`,shortName:`setl`},{name:`setglobal`,shortName:`setg`},{name:`sort`,shortName:`sor`},{name:`substitute`,shortName:`s`,possiblyAsync:!0},{name:`startinsert`,shortName:`start`},{name:`nohlsearch`,shortName:`noh`},{name:`yank`,shortName:`y`},{name:`delmarks`,shortName:`delm`},{name:`marks`,excludeFromCommandHistory:!0},{name:`registers`,shortName:`reg`,excludeFromCommandHistory:!0},{name:`vglobal`,shortName:`v`},{name:`delete`,shortName:`d`},{name:`join`,shortName:`j`},{name:`normal`,shortName:`norm`},{name:`global`,shortName:`g`}],s=pe(``);function c(t){t.setOption(`disableInput`,!0),t.setOption(`showCursorWhenSelecting`,!1),e.signal(t,`vim-mode-change`,{mode:`normal`}),t.on(`cursorActivity`,Jt),j(t),e.on(t.getInputField(),`paste`,u(t))}function l(t){t.setOption(`disableInput`,!1),t.off(`cursorActivity`,Jt),e.off(t.getInputField(),`paste`,u(t)),t.state.vim=null,Et&&clearTimeout(Et)}function u(e){var t=e.state.vim;return t.onPasteFn||=function(){t.insertMode||(e.setCursor(V(e.getCursor(),0,1)),we.enterInsertMode(e,{},t))},t.onPasteFn}var d=/[\d]/,f=[e.isWordChar,function(t){return t&&!e.isWordChar(t)&&!/\s/.test(t)}],p=[function(e){return/\S/.test(e)}],m=[`<`,`>`],h=[`-`,`"`,`.`,`:`,`_`,`/`,`+`],g=/^\w$/,_=/^[A-Z]$/;try{_=RegExp(`^[\\p{Lu}]$`,`u`)}catch{}function v(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function y(e){return/^[a-z]$/.test(e)}function b(e){return`()[]{}`.indexOf(e)!=-1}function x(e){return d.test(e)}function S(e){return _.test(e)}function C(e){return/^\s*$/.test(e)}function w(e){return`.?!`.indexOf(e)!=-1}function T(e,t){for(var n=0;n<t.length;n++)if(t[n]==e)return!0;return!1}var E={};function D(e,t,n,r,i){if(t===void 0&&!i)throw Error(`defaultValue is required unless callback is provided`);if(n||=`string`,E[e]={type:n,defaultValue:t,callback:i},r)for(var a=0;a<r.length;a++)E[r[a]]=E[e];t&&O(e,t)}function O(e,t,n,r){var i=E[e];r||={};var a=r.scope;if(!i)return Error(`Unknown option: `+e);if(i.type==`boolean`){if(t&&t!==!0)return Error(`Invalid argument: `+e+`=`+t);t!==!1&&(t=!0)}i.callback?(a!==`local`&&i.callback(t,void 0),a!==`global`&&n&&i.callback(t,n)):(a!==`local`&&(i.value=i.type==`boolean`?!!t:t),a!==`global`&&n&&(n.state.vim.options[e]={value:t}))}function k(e,t,n){var r=E[e];n||={};var i=n.scope;if(!r)return Error(`Unknown option: `+e);if(r.callback){let e=t&&r.callback(void 0,t);return i!==`global`&&e!==void 0?e:i===`local`?void 0:r.callback()}return(i!==`global`&&t&&t.state.vim.options[e]||i!==`local`&&r||{}).value}D(`filetype`,void 0,`string`,[`ft`],function(e,t){if(t!==void 0){if(e===void 0){let e=t.getOption(`mode`);return e==`null`?``:e}{let n=e==``?`null`:e;t.setOption(`mode`,n)}}}),D(`textwidth`,80,`number`,[`tw`],function(e,t){if(t!==void 0){if(e===void 0)return t.getOption(`textwidth`);var n=Math.round(e);n>1&&t.setOption(`textwidth`,n)}});var ee=function(){var e=100,t=-1,n=0,r=0,i=Array(e);function a(a,o,s){var c=i[t%e];function l(n){var r=++t%e,o=i[r];o&&o.clear(),i[r]=a.setBookmark(n)}if(c){var u=c.find();u&&!U(u,o)&&l(o)}else l(o);l(s),n=t,r=t-e+1,r<0&&(r=0)}function o(a,o){t+=o,t>n?t=n:t<r&&(t=r);var s=i[(e+t)%e];if(s&&!s.find()){var c=o>0?1:-1,l,u=a.getCursor();do if(t+=c,s=i[(e+t)%e],s&&(l=s.find())&&!U(u,l))break;while(t<n&&t>r)}return s}function s(e,n){var r=t,i=o(e,n);return t=r,i&&i.find()}return{cachedCursor:void 0,add:a,find:s,move:o}},te=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};class A{constructor(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=te()}exitMacroRecordMode(){var e=M.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1}enterMacroRecordMode(e,t){var n=M.registerController.getRegister(t);if(n){if(n.clear(),this.latestRegister=t,e.openDialog){var r=Z(`span`,{class:`cm-vim-message`},`recording @`+t);this.onRecordingDone=e.openDialog(r,function(){},{bottom:!0})}this.isRecording=!0}}}function j(e){return e.state.vim||(e.state.vim={inputState:new me,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:void 0,sel:{anchor:new t(0,0),head:new t(0,0)},options:{},expectLiteralNext:!1,status:``}),e.state.vim}var M;function ne(){for(var e in M={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:ee(),macroModeState:new A,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:``},registerController:new _e({}),searchHistoryController:new ve,exCommandHistoryController:new ve},E){var t=E[e];t.value=t.defaultValue}}class re{constructor(e,t){this.keyName=e,this.key=t.key,this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.shiftKey=t.shiftKey}}var ie,N={enterVimMode:c,leaveVimMode:l,buildKeyMap:function(){},getRegisterController:function(){return M.registerController},resetVimGlobalState_:ne,getVimGlobalState_:function(){return M},maybeInitVimState_:j,suppressErrorLogging:!1,InsertModeKey:re,map:function(e,t,n){$.map(e,t,n)},unmap:function(e,t){return $.unmap(e,t)},noremap:function(e,t,n){$.map(e,t,n,!0)},mapclear:function(e){var t=r.length,n=a,i=r.slice(0,t-n);if(r=r.slice(t-n),e)for(var o=i.length-1;o>=0;o--){var s=i[o];if(e!==s.context)if(s.context)this._mapCommand(s);else{var c=[`normal`,`insert`,`visual`];for(var l in c)if(c[l]!==e){var u=Object.assign({},s);u.context=c[l],this._mapCommand(u)}}}},langmap:fe,vimKeyFromEvent:de,setOption:O,getOption:k,defineOption:D,defineEx:function(e,t,n){if(!t)t=e;else if(e.indexOf(t)!==0)throw Error(`(Vim.defineEx) "`+t+`" is not a prefix of "`+e+`", command not registered`);It[e]=n,$.commandMap_[t]={name:e,shortName:t,type:`api`}},handleKey:function(e,t,n){var r=this.findKey(e,t,n);if(typeof r==`function`)return r()},multiSelectHandleKey:tn,findKey:function(t,n,i){var a=j(t),o=t;function s(){var e=M.macroModeState;if(e.isRecording){if(n==`q`)return e.exitMacroRecordMode(),I(o),!0;i!=`mapping`&&Wt(e,n)}}function c(){if(n==`<Esc>`){if(a.visualMode)J(o);else if(a.insertMode)Rt(o);else return;return I(o),!0}}function l(){if(c())return!0;a.inputState.keyBuffer.push(n);var e=a.inputState.keyBuffer.join(``),t=n.length==1,i=ye.matchCommand(e,r,a.inputState,`insert`),s=a.inputState.changeQueue;if(i.type==`none`)return I(o),!1;if(i.type==`partial`){if(i.expectLiteralNext&&(a.expectLiteralNext=!0),ie&&window.clearTimeout(ie),ie=t&&window.setTimeout(function(){a.insertMode&&a.inputState.keyBuffer.length&&I(o)},k(`insertModeEscKeysTimeout`)),t){var l=o.listSelections();(!s||s.removed.length!=l.length)&&(s=a.inputState.changeQueue=new he),s.inserted+=n;for(var u=0;u<l.length;u++){var d=G(l[u].anchor,l[u].head),f=K(l[u].anchor,l[u].head),p=o.getRange(d,o.state.overwrite?V(f,0,1):f);s.removed[u]=(s.removed[u]||``)+p}}return!t}if(i.type==`full`&&(a.inputState.keyBuffer.length=0),a.expectLiteralNext=!1,ie&&window.clearTimeout(ie),i.command&&s){for(var l=o.listSelections(),u=0;u<l.length;u++){var m=l[u].head;o.replaceRange(s.removed[u]||``,V(m,0,-s.inserted.length),m,`+input`)}M.macroModeState.lastInsertModeChanges.changes.pop()}return i.command||I(o),i.command}function u(){if(s()||c())return!0;a.inputState.keyBuffer.push(n);var e=a.inputState.keyBuffer.join(``);if(/^[1-9]\d*$/.test(e))return!0;var t=/^(\d*)(.*)$/.exec(e);if(!t)return I(o),!1;var i=a.visualMode?`visual`:`normal`,l=t[2]||t[1];a.inputState.operatorShortcut&&a.inputState.operatorShortcut.slice(-1)==l&&(l=a.inputState.operatorShortcut);var u=ye.matchCommand(l,r,a.inputState,i);return u.type==`none`?(I(o),!1):u.type==`partial`?(u.expectLiteralNext&&(a.expectLiteralNext=!0),!0):u.type==`clear`?(I(o),!0):(a.expectLiteralNext=!1,a.inputState.keyBuffer.length=0,t=/^(\d*)(.*)$/.exec(e),t&&t[1]&&t[1]!=`0`&&a.inputState.pushRepeatDigit(t[1]),u.command)}var d=a.insertMode?l():u();if(d===!1)return!a.insertMode&&(n.length===1||e.isMac&&/<A-.>/.test(n))?function(){return!0}:void 0;if(d===!0)return function(){return!0};if(d)return function(){return o.operation(function(){o.curOp.isVimOp=!0;try{if(typeof d!=`object`)return;d.type==`keyToKey`?F(o,d.toKeys,d):ye.processCommand(o,a,d)}catch(e){throw o.state.vim=void 0,j(o),N.suppressErrorLogging,e}return!0})}},handleEx:function(e,t){$.processCommand(e,t)},defineMotion:be,defineAction:Te,defineOperator:Ce,mapCommand:Ht,_mapCommand:zt,defineRegister:ge,exitVisualMode:J,exitInsertMode:Rt},ae=[],oe=!1,P;function se(e){if(!P)throw Error(`No prompt to send key to`);if(e[0]==`<`){var t=e.toLowerCase().slice(1,-1);if(t=t.split(`-`).pop()||``,t==`lt`)e=`<`;else if(t==`space`)e=` `;else if(t==`cr`)e=`
2
2
  `;else if(ue[t]){var n=P.value||``,r={key:ue[t],target:{value:n,selectionEnd:n.length,selectionStart:n.length}};P.onKeyDown&&P.onKeyDown(r,P.value,a),P&&P.onKeyUp&&P.onKeyUp(r,P.value,a);return}}if(e==`
3
3
  `){var i=P;P=null,i.onClose&&i.onClose(i.value)}else P.value=(P.value||``)+e;function a(e){P&&(typeof e==`string`?P.value=e:P=null)}}function F(e,t,n){var r=oe;if(n){if(ae.indexOf(n)!=-1)return;ae.push(n),oe=n.noremap!=0}try{for(var i=j(e),a=/<(?:[CSMA]-)*\w+>|./gi,o;o=a.exec(t);){var s=o[0],c=i.insertMode;if(P){se(s);continue}if(!N.handleKey(e,s,`mapping`)&&c&&i.insertMode){if(s[0]==`<`){var l=s.toLowerCase().slice(1,-1);if(l=l.split(`-`).pop()||``,l==`lt`)s=`<`;else if(l==`space`)s=` `;else if(l==`cr`)s=`
4
4
  `;else if(ue.hasOwnProperty(l)){s=ue[l],Qt(e,s);continue}else s=s[0],a.lastIndex=o.index+1}e.replaceSelection(s)}}}finally{if(ae.pop(),oe=ae.length?r:!1,!ae.length&&P){var u=P;P=null,St(e,u)}}}var ce={Return:`CR`,Backspace:`BS`,Delete:`Del`,Escape:`Esc`,Insert:`Ins`,ArrowLeft:`Left`,ArrowRight:`Right`,ArrowUp:`Up`,ArrowDown:`Down`,Enter:`CR`," ":`Space`},le={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},ue={};`Left|Right|Up|Down|End|Home`.split(`|`).concat(Object.keys(ce)).forEach(function(e){ue[(ce[e]||``).toLowerCase()]=ue[e.toLowerCase()]=e});function de(t,n){var r=t.key;if(!le[r]){r.length>1&&r[0]==`n`&&(r=r.replace(`Numpad`,``)),r=ce[r]||r;var a=``;if(t.ctrlKey&&(a+=`C-`),t.altKey&&(a+=`A-`),t.metaKey&&(a+=`M-`),e.isMac&&a==`A-`&&r.length==1&&(a=a.slice(2)),(a||r.length>1)&&t.shiftKey&&(a+=`S-`),n&&!n.expectLiteralNext&&r.length==1){if(s.keymap&&r in s.keymap)(s.remapCtrl!=0||!a)&&(r=s.keymap[r]);else if(r.charCodeAt(0)>128&&!i[r]){var o=t.code?.slice(-1)||``;t.shiftKey||(o=o.toLowerCase()),o&&(r=o,!a&&t.altKey&&(a=`A-`))}}return a+=r,a.length>1&&(a=`<`+a+`>`),a}}function fe(e,t){s.string!==e&&(s=pe(e)),s.remapCtrl=t}function pe(e){let t={};if(!e)return{keymap:t,string:``};function n(e){return e.split(/\\?(.)/).filter(Boolean)}return e.split(/((?:[^\\,]|\\.)+),/).map(e=>{if(!e)return;let r=e.split(/((?:[^\\;]|\\.)+);/);if(r.length==3){let e=n(r[1]),i=n(r[2]);if(e.length!==i.length)return;for(let n=0;n<e.length;++n)t[e[n]]=i[n]}else if(r.length==1){let r=n(e);if(r.length%2!=0)return;for(let e=0;e<r.length;e+=2)t[r[e]]=r[e+1]}}),{keymap:t,string:e}}D(`langmap`,void 0,`string`,[`lmap`],function(e,t){if(e===void 0)return s.string;fe(e)});class me{constructor(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=void 0,this.changeQueue=null}pushRepeatDigit(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)}getRepeat(){var e=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(e=1,this.prefixRepeat.length>0&&(e*=parseInt(this.prefixRepeat.join(``),10)),this.motionRepeat.length>0&&(e*=parseInt(this.motionRepeat.join(``),10))),e}}function I(t,n){t.state.vim.inputState=new me,t.state.vim.expectLiteralNext=!1,e.signal(t,`vim-command-done`,n)}function he(){this.removed=[],this.inserted=``}class L{constructor(e,t,n){this.clear(),this.keyBuffer=[e||``],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!t,this.blockwise=!!n}setText(e,t,n){this.keyBuffer=[e||``],this.linewise=!!t,this.blockwise=!!n}pushText(e,t){t&&(this.linewise||this.keyBuffer.push(`
@@ -31,9 +31,9 @@ mark line col
31
31
  `),g=s==`decimal`?/(-?)([\d]+)/:s==`hex`?/(-?)(?:0x)?([0-9a-f]+)/i:s==`octal`?/([0-7]+)/:null,_=s==`decimal`?10:s==`hex`?16:s==`octal`?8:void 0,v=[],y=[];if(s||c)for(var b=0;b<h.length;b++){var x=c?h[b].match(c):null;x&&x[0]!=``?v.push(x):g&&g.exec(h[b])?v.push(h[b]):y.push(h[b])}else y=h;function S(e,t){if(i){var n=e;e=t,t=n}a&&(e=e.toLowerCase(),t=t.toLowerCase());var r=g&&g.exec(e),o=g&&g.exec(t);return!r||!o?e<t?-1:1:parseInt((r[1]+r[2]).toLowerCase(),_)-parseInt((o[1]+o[2]).toLowerCase(),_)}function C(e,t){if(i){var n=e;e=t,t=n}return a&&(e[0]=e[0].toLowerCase(),t[0]=t[0].toLowerCase()),e[0]<t[0]?-1:1}if(v.sort(c?C:S),c)for(var b=0;b<v.length;b++)v[b]=v[b].input;else s||y.sort(S);if(h=i?v.concat(y):y.concat(v),o){var w=h,T;h=[];for(var b=0;b<w.length;b++)w[b]!=T&&h.push(w[b]),T=w[b]}n.replaceRange(h.join(`
32
32
  `),p,m)},vglobal:function(e,t){this.global(e,t)},normal:function(e,t){var n=!1,r=t.argString;if(r&&r[0]==`!`&&(r=r.slice(1),n=!0),r=r.trimStart(),!r){Q(e,`Argument is required.`);return}var i=t.line;if(typeof i==`number`)for(var a=isNaN(t.lineEnd)?i:t.lineEnd,o=i;o<=a;o++)e.setCursor(o,0),F(e,t.argString.trimStart(),{noremap:n}),e.state.vim.insertMode&&Rt(e,!0);else F(e,t.argString.trimStart(),{noremap:n}),e.state.vim.insertMode&&Rt(e,!0)},global:function(e,t){var n=t.argString;if(!n){Q(e,`Regular Expression missing from global`);return}var r=t.commandName[0]===`v`;n[0]===`!`&&t.commandName[0]===`g`&&(r=!0,n=n.slice(1));var i=t.line===void 0?e.firstLine():t.line,a=t.lineEnd||t.line||e.lastLine(),o=dt(n),s=n,c=``;if(o&&o.length&&(s=o[0],c=o.slice(1,o.length).join(`/`)),s)try{wt(e,s,!0,!0)}catch{Q(e,`Invalid regex: `+s);return}for(var l=X(e).getQuery(),u=[],d=i;d<=a;d++){var f=e.getLine(d);l.test(f)!==r&&u.push(c?e.getLineHandle(d):f)}if(!c){Q(e,u.join(`
33
33
  `));return}var p=0,m=function(){if(p<u.length){var t=u[p++],n=e.getLineNumber(t);if(n==null){m();return}var r=n+1+c;$.processCommand(e,r,{callback:m})}else e.releaseLineHandles&&e.releaseLineHandles()};m()},substitute:function(e,n){if(!e.getSearchCursor)throw Error(`Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.`);var r=n.argString,i=r?pt(r,r[0]):[],a=``,o=``,s,c,l,u=!1,d=!1;if(i&&i.length)a=i[0],k(`pcre`)&&a!==``&&(a=new RegExp(a).source),o=i[1],o!==void 0&&(o=k(`pcre`)?yt(o.replace(/([^\\])&/g,`$1$$&`)):_t(o),M.lastSubstituteReplacePart=o),s=i[2]?i[2].split(` `):[];else if(r&&r.length){Q(e,`Substitutions should be of the form :s/pattern/replace/`);return}if(s&&(c=s[0],l=parseInt(s[1]),c&&(c.indexOf(`c`)!=-1&&(u=!0),c.indexOf(`g`)!=-1&&(d=!0),a=k(`pcre`)?a+`/`+c:a.replace(/\//g,`\\/`)+`/`+c)),a)try{wt(e,a,!0,!0)}catch{Q(e,`Invalid regex: `+a);return}if(o||=M.lastSubstituteReplacePart,o===void 0){Q(e,`No previous substitute regular expression`);return}var f=X(e).getQuery(),p=n.line===void 0?e.getCursor().line:n.line,m=n.lineEnd||p;p==e.firstLine()&&m==e.lastLine()&&(m=1/0),l&&(p=m,m=p+l-1);var h=z(e,new t(p,0)),g=e.getSearchCursor(f,h);Lt(e,u,d,p,m,g,f,o,n.callback)},startinsert:function(e,t){F(e,t.argString==`!`?`A`:`i`,{})},redo:e.commands.redo,undo:e.commands.undo,write:function(t){e.commands.save?e.commands.save(t):t.save&&t.save()},nohlsearch:function(e){At(e)},yank:function(e){var t=H(e.getCursor()).line,n=e.getLine(t);M.registerController.pushText(`0`,`yank`,n,!0,!0)},delete:function(e,n){var r=n.selectionLine,i=isNaN(n.selectionLineEnd)?r:n.selectionLineEnd;Se.delete(e,{linewise:!0},[{anchor:new t(r,0),head:new t(i+1,0)}])},join:function(e,n){var r=n.selectionLine,i=isNaN(n.selectionLineEnd)?r:n.selectionLineEnd;e.setCursor(new t(r,0)),we.joinLines(e,{repeat:i-r},e.state.vim)},delmarks:function(t,n){if(!n.argString||!je(n.argString)){Q(t,`Argument required`);return}for(var r=t.state.vim,i=new e.StringStream(je(n.argString));!i.eol();){i.eatSpace();var a=i.pos;if(!i.match(/[a-zA-Z]/,!1)){Q(t,`Invalid argument: `+n.argString.substring(a));return}var o=i.next();if(i.match(`-`,!0)){if(!i.match(/[a-zA-Z]/,!1)){Q(t,`Invalid argument: `+n.argString.substring(a));return}var s=o,c=i.next();if(s&&c&&y(s)==y(c)){var l=s.charCodeAt(0),u=c.charCodeAt(0);if(l>=u){Q(t,`Invalid argument: `+n.argString.substring(a));return}for(var d=0;d<=u-l;d++){var f=String.fromCharCode(l+d);delete r.marks[f]}}else{Q(t,`Invalid argument: `+s+`-`);return}}else o&&delete r.marks[o]}}},$=new Ft;N.defineEx(`version`,`ve`,e=>{Q(e,`Codemirror-vim version: 6.3.0`)});function Lt(t,n,r,i,a,o,s,c,l){t.state.vim.exMode=!0;var u=!1,d=0,f,p,m;function h(){t.operation(function(){for(;!u;)g(),v();y()})}function g(){var e=``,n=o.match||o.pos&&o.pos.match;e=n?c.replace(/\$(\d{1,3}|[$&])/g,function(e,t){if(t==`$`)return`$`;if(t==`&`)return n[0];for(var r=t;parseInt(r)>=n.length&&r.length>0;)r=r.slice(0,r.length-1);return r?n[r]+t.slice(r.length,t.length):e}):t.getRange(o.from(),o.to()).replace(s,c);var r=o.to().line;o.replace(e),p=o.to().line,a+=p-r,m=p<r}function _(){var e=f&&H(o.to()),t=o.findNext();return t&&!t[0]&&e&&U(o.from(),e)&&(t=o.findNext()),t&&d++,t}function v(){for(;_()&&jt(o.from(),i,a);)if(!(!r&&o.from().line==p&&!m)){t.scrollIntoView(o.from(),30),t.setSelection(o.from(),o.to()),f=o.from(),u=!1;return}u=!0}function y(e){if(e&&e(),t.focus(),f){t.setCursor(f);var n=t.state.vim;n.exMode=!1,n.lastHPos=n.lastHSPos=f.ch}l?l():u&&Q(t,(d?`Found `+d+` matches`:`No matches found`)+` for pattern: `+s+(k(`pcre`)?` (set nopcre to use Vim regexps)`:``))}function b(n,r,i){switch(e.e_stop(n),de(n)){case`y`:g(),v();break;case`n`:v();break;case`a`:var a=l;l=void 0,t.operation(h),l=a;break;case`l`:g();case`q`:case`<Esc>`:case`<C-c>`:case`<C-[>`:y(i)}return u&&y(i),!0}if(v(),u){Q(t,`No matches for `+s+(k(`pcre`)?` (set nopcre to use vim regexps)`:``));return}if(!n){h(),l&&l();return}St(t,{prefix:Z(`span`,`replace with `,Z(`strong`,c),` (y/n/a/q/l)`),onKeyDown:b})}function Rt(t,n){var r=t.state.vim,i=M.macroModeState,a=M.registerController.getRegister(`.`),o=i.isPlaying,s=i.lastInsertModeChanges;o||(t.off(`change`,qt),r.insertEnd&&r.insertEnd.clear(),r.insertEnd=void 0,e.off(t.getInputField(),`keydown`,Xt)),!o&&r.insertModeRepeat&&r.insertModeRepeat>1&&(Zt(t,r,r.insertModeRepeat-1,!0),r.lastEditInputState.repeatOverride=r.insertModeRepeat),delete r.insertModeRepeat,r.insertMode=!1,n||t.setCursor(t.getCursor().line,t.getCursor().ch-1),t.setOption(`keyMap`,`vim`),t.setOption(`disableInput`,!0),t.toggleOverwrite(!1),a.setText(s.changes.join(``)),e.signal(t,`vim-mode-change`,{mode:`normal`}),i.isRecording&&Gt(i)}function zt(e){r.unshift(e),e.keys&&Bt(e.keys)}function Bt(e){e.split(/(<(?:[CSMA]-)*\w+>|.)/i).forEach(function(e){e&&(i[e]||(i[e]=0),i[e]++)})}function Vt(e){e.split(/(<(?:[CSMA]-)*\w+>|.)/i).forEach(function(e){i[e]&&i[e]--})}function Ht(e,t,n,r,i){var a={keys:e,type:t};for(var o in a[t]=n,a[t+`Args`]=r,i)a[o]=i[o];zt(a)}D(`insertModeEscKeysTimeout`,200,`number`);function Ut(e,t,n,r){var i=M.registerController.getRegister(r);if(r==`:`){i.keyBuffer[0]&&$.processCommand(e,i.keyBuffer[0]),n.isPlaying=!1;return}var a=i.keyBuffer,o=0;n.isPlaying=!0,n.replaySearchQueries=i.searchQueries.slice(0);for(var s=0;s<a.length;s++)for(var c=a[s],l,u,d=/<(?:[CSMA]-)*\w+>|./gi;l=d.exec(c);)if(u=l[0],N.handleKey(e,u,`macro`),t.insertMode){var f=i.insertModeChanges[o++].changes;M.macroModeState.lastInsertModeChanges.changes=f,$t(e,f,1),Rt(e)}n.isPlaying=!1}function Wt(e,t){if(!e.isPlaying){var n=e.latestRegister,r=M.registerController.getRegister(n);r&&r.pushText(t)}}function Gt(e){if(!e.isPlaying){var t=e.latestRegister,n=M.registerController.getRegister(t);n&&n.pushInsertModeChanges&&n.pushInsertModeChanges(e.lastInsertModeChanges)}}function Kt(e,t){if(!e.isPlaying){var n=e.latestRegister,r=M.registerController.getRegister(n);r&&r.pushSearchQuery&&r.pushSearchQuery(t)}}function qt(e,t){var n=M.macroModeState,r=n.lastInsertModeChanges;if(!n.isPlaying)for(var i=e.state.vim;t;){if(r.expectCursorActivityForChange=!0,r.ignoreCount>1)r.ignoreCount--;else if(t.origin==`+input`||t.origin==`paste`||t.origin===void 0){var a=e.listSelections().length;a>1&&(r.ignoreCount=a);var o=t.text.join(`
34
- `);if(r.maybeReset&&=(r.changes=[],!1),o)if(e.state.overwrite&&!/\n/.test(o))r.changes.push([o]);else{if(o.length>1){var s=i&&i.insertEnd&&i.insertEnd.find(),c=e.getCursor();if(s&&s.line==c.line){var l=s.ch-c.ch;l>0&&l<o.length&&(r.changes.push([o,l]),o=``)}}o&&r.changes.push(o)}}t=t.next}}function Jt(e){var t=e.state.vim;if(t.insertMode){var n=M.macroModeState;if(n.isPlaying)return;var r=n.lastInsertModeChanges;r.expectCursorActivityForChange?r.expectCursorActivityForChange=!1:(r.maybeReset=!0,t.insertEnd&&t.insertEnd.clear(),t.insertEnd=e.setBookmark(e.getCursor(),{insertLeft:!0}))}else e.curOp?.isVimOp||Yt(e,t)}function Yt(t,n){var r=t.getCursor(`anchor`),i=t.getCursor(`head`);if(n.visualMode&&!t.somethingSelected()?J(t,!1):!n.visualMode&&!n.insertMode&&t.somethingSelected()&&(n.visualMode=!0,n.visualLine=!1,e.signal(t,`vim-mode-change`,{mode:`visual`})),n.visualMode){var a=W(i,r)?0:-1,o=W(i,r)?-1:0;i=V(i,0,a),r=V(r,0,o),n.sel={anchor:r,head:i},rt(t,n,`<`,G(i,r)),rt(t,n,`>`,K(i,r))}else n.insertMode||(n.lastHPos=t.getCursor().ch)}function Xt(t){var n=M.macroModeState.lastInsertModeChanges,r=e.keyName?e.keyName(t):t.key;r&&(r.indexOf(`Delete`)!=-1||r.indexOf(`Backspace`)!=-1)&&(n.maybeReset&&=(n.changes=[],!1),n.changes.push(new re(r,t)))}function Zt(e,t,n,r){var i=M.macroModeState;i.isPlaying=!0;var a=t.lastEditActionCommand,o=t.inputState;function s(){a?ye.processAction(e,t,a):ye.evalInput(e,t)}function c(n){if(i.lastInsertModeChanges.changes.length>0){n=t.lastEditActionCommand?n:1;var r=i.lastInsertModeChanges;$t(e,r.changes,n)}}if(t.inputState=t.lastEditInputState,a&&a.interlaceInsertRepeat)for(var l=0;l<n;l++)s(),c(1);else r||s(),c(n);t.inputState=o,t.insertMode&&!r&&Rt(e),i.isPlaying=!1}function Qt(t,n){e.lookupKey(n,`vim-insert`,function(n){return typeof n==`string`?e.commands[n](t):n(t),!0})}function $t(e,t,n){var r=e.getCursor(`head`),i=M.macroModeState.lastInsertModeChanges.visualBlock;i&&(Fe(e,r,i+1),n=e.listSelections().length,e.setCursor(r));for(var a=0;a<n;a++){i&&e.setCursor(V(r,a,0));for(var o=0;o<t.length;o++){var s=t[o];if(s instanceof re)Qt(e,s.keyName);else if(typeof s==`string`)e.replaceSelection(s);else{var c=e.getCursor(),l=V(c,0,s[0].length-(s[1]||0));e.replaceRange(s[0],c,s[1]?c:l),e.setCursor(l)}}}i&&e.setCursor(V(r,0,1))}function en(e){var t=new e.constructor;return Object.keys(e).forEach(function(n){if(n!=`insertEnd`){var r=e[n];Array.isArray(r)?r=r.slice():r&&typeof r==`object`&&r.constructor!=Object&&(r=en(r)),t[n]=r}}),e.sel&&(t.sel={head:e.sel.head&&H(e.sel.head),anchor:e.sel.anchor&&H(e.sel.anchor)}),t}function tn(e,t,n){var r=j(e),i=e,a=!1,r=N.maybeInitVimState_(i),o=r.visualBlock||r.wasInVisualBlock;if(i.state.closeVimNotification){var s=i.state.closeVimNotification;if(i.state.closeVimNotification=null,s(),t==`<CR>`)return I(i),!0}var c=i.isInMultiSelectMode();if(r.wasInVisualBlock&&!c?r.wasInVisualBlock=!1:c&&r.visualBlock&&(r.wasInVisualBlock=!0),t==`<Esc>`&&!r.insertMode&&!r.visualMode&&c&&r.status==`<Esc>`)I(i);else if(o||!c||i.inVirtualSelectionMode)a=N.handleKey(i,t,n);else{var l=en(r),u=r.inputState.changeQueueList||[];i.operation(function(){i.curOp&&(i.curOp.isVimOp=!0);var e=0;i.forEachSelection(function(){i.state.vim.inputState.changeQueue=u[e];var r=i.getCursor(`head`),o=i.getCursor(`anchor`),s=W(r,o)?0:-1,c=W(r,o)?-1:0;r=V(r,0,s),o=V(o,0,c),i.state.vim.sel.head=r,i.state.vim.sel.anchor=o,a=N.handleKey(i,t,n),i.virtualSelection&&(u[e]=i.state.vim.inputState.changeQueue,i.state.vim=en(l)),e++}),i.curOp?.cursorActivity&&!a&&(i.curOp.cursorActivity=!1),i.state.vim=r,r.inputState.changeQueueList=u,r.inputState.changeQueue=null},!0)}return a&&!r.visualMode&&!r.insertMode&&r.visualMode!=i.somethingSelected()&&Yt(i,r),a}return ne(),N}function A(e,t){var n=t.ch,r=t.line+1;r<1&&(r=1,n=0),r>e.lines&&(r=e.lines,n=Number.MAX_VALUE);var i=e.line(r);return Math.min(i.from+Math.max(0,n),i.to)}function j(e,t){let n=e.lineAt(t);return{line:n.number-1,ch:t-n.from}}var M=class{constructor(e,t){this.line=e,this.ch=t}};function ne(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else{var r=e._handlers||={};r[t]=(r[t]||[]).concat(n)}}function re(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else{var r=e._handlers,i=r&&r[t];if(i){var a=i.indexOf(n);a>-1&&(r[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function ie(e,t,...n){var r=e._handlers?.[t];if(r)for(var i=0;i<r.length;++i)r[i](...n)}function N(e,...t){if(e)for(var n=0;n<e.length;++n)e[n](...t)}var ae;try{ae=RegExp(`[\\w\\p{Alphabetic}\\p{Number}_]`,`u`)}catch{ae=/[\w]/}function oe(e,t){var n=e.cm6;if(!n.state.readOnly){var r=`input.type.compose`;if(e.curOp&&(e.curOp.lastChange||(r=`input.type.compose.start`)),t.annotations)try{t.annotations.some(function(e){e.value==`input`&&(e.value=r)})}catch(e){console.error(e)}else t.userEvent=r;return n.dispatch(t)}}function P(e,t){e.curOp&&(e.curOp.$changeStart=void 0),(t?S:w)(e.cm6);let n=e.curOp?.$changeStart;n!=null&&e.cm6.dispatch({selection:{anchor:n}})}var se={Left:t=>e(t.cm6,{key:`Left`},`editor`),Right:t=>e(t.cm6,{key:`Right`},`editor`),Up:t=>e(t.cm6,{key:`Up`},`editor`),Down:t=>e(t.cm6,{key:`Down`},`editor`),Backspace:t=>e(t.cm6,{key:`Backspace`},`editor`),Delete:t=>e(t.cm6,{key:`Delete`},`editor`)},F=class e{openDialog(e,t,n){return pe(this,e,t,n)}openNotification(e,t){return ue(this,e,t)}constructor(e){this.state={},this.marks=Object.create(null),this.$mid=0,this.options={},this._handlers={},this.$lastChangeEndOffset=0,this.virtualSelection=null,this.cm6=e,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this)}on(e,t){ne(this,e,t)}off(e,t){re(this,e,t)}signal(e,t,n){ie(this,e,t,n)}indexFromPos(e){return A(this.cm6.state.doc,e)}posFromIndex(e){return j(this.cm6.state.doc,e)}foldCode(e){let t=this.cm6,n=t.state.selection.ranges,r=this.cm6.state.doc,i=A(r,e),a=c.create([c.range(i,i)],0).ranges;t.state.selection.ranges=a,g(t),t.state.selection.ranges=n}firstLine(){return 0}lastLine(){return this.cm6.state.doc.lines-1}lineCount(){return this.cm6.state.doc.lines}setCursor(e,t){typeof e==`object`&&(t=e.ch,e=e.line);var n=A(this.cm6.state.doc,{line:e,ch:t||0});this.cm6.dispatch({selection:{anchor:n}},{scrollIntoView:!this.curOp}),this.curOp&&!this.curOp.isVimOp&&this.onBeforeEndOperation()}getCursor(e){var t=this.cm6.state.selection.main,n=e==`head`||!e?t.head:e==`anchor`?t.anchor:e==`start`?t.from:e==`end`?t.to:null;if(n==null)throw Error(`Invalid cursor type`);return this.posFromIndex(n)}listSelections(){var e=this.cm6.state.doc;return this.cm6.state.selection.ranges.map(t=>({anchor:j(e,t.anchor),head:j(e,t.head)}))}setSelections(e,t){var n=this.cm6.state.doc,r=e.map(e=>{var t=A(n,e.head),r=A(n,e.anchor);return t==r?c.cursor(t,1):c.range(r,t)});this.cm6.dispatch({selection:c.create(r,t)})}setSelection(e,t,n){this.setSelections([{anchor:e,head:t}],0),n&&n.origin==`*mouse`&&this.onBeforeEndOperation()}getLine(e){var t=this.cm6.state.doc;return e<0||e>=t.lines?``:this.cm6.state.doc.line(e+1).text}getLineHandle(e){return this.$lineHandleChanges||=[],{row:e,index:this.indexFromPos(new M(e,0))}}getLineNumber(e){var t=this.$lineHandleChanges;if(!t)return null;for(var n=e.index,r=0;r<t.length;r++)if(n=t[r].changes.mapPos(n,1,l.TrackAfter),n==null)return null;var i=this.posFromIndex(n);return i.ch==0?i.line:null}releaseLineHandles(){this.$lineHandleChanges=void 0}getRange(e,t){var n=this.cm6.state.doc;return this.cm6.state.sliceDoc(A(n,e),A(n,t))}replaceRange(e,t,n,r){n||=t;var i=this.cm6.state.doc,a=A(i,t),o=A(i,n);oe(this,{changes:{from:a,to:o,insert:e}})}replaceSelection(e){oe(this,this.cm6.state.replaceSelection(e))}replaceSelections(e){var t=this.cm6.state.selection.ranges.map((t,n)=>({from:t.from,to:t.to,insert:e[n]||``}));oe(this,{changes:t})}getSelection(){return this.getSelections().join(`
35
- `)}getSelections(){var e=this.cm6;return e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to))}somethingSelected(){return this.cm6.state.selection.ranges.some(e=>!e.empty)}getInputField(){return this.cm6.contentDOM}clipPos(e){var t=this.cm6.state.doc,n=e.ch,r=e.line+1;r<1&&(r=1,n=0),r>t.lines&&(r=t.lines,n=Number.MAX_VALUE);var i=t.line(r);return n=Math.min(Math.max(0,n),i.to-i.from),new M(r-1,n)}getValue(){return this.cm6.state.doc.toString()}setValue(e){var t=this.cm6;return t.dispatch({changes:{from:0,to:t.state.doc.length,insert:e},selection:c.range(0,0)})}focus(){return this.cm6.focus()}blur(){return this.cm6.contentDOM.blur()}defaultTextHeight(){return this.cm6.defaultLineHeight}findMatchingBracket(e,t){var n=this.cm6.state,r=A(n.doc,e),i=a(n,r+1,-1);return i&&i.end||(i=a(n,r,1),i&&i.end)?{to:j(n.doc,i.end.from)}:{to:void 0}}scanForBracket(e,t,n,r){return he(this,e,t,n,r)}indentLine(e,t){t?this.indentMore():this.indentLess()}indentMore(){x(this.cm6)}indentLess(){v(this.cm6)}execCommand(t){if(t==`indentAuto`)e.commands.indentAuto(this);else if(t==`goLineLeft`)T(this.cm6);else if(t==`goLineRight`){b(this.cm6);let e=this.cm6.state,t=e.selection.main.head;t<e.doc.length&&e.sliceDoc(t,t+1)!==`
36
- `&&E(this.cm6)}else t+``}setBookmark(e,t){var n=t?.insertLeft?1:-1,r=this.indexFromPos(e);return new ve(this,r,n)}addOverlay({query:e}){let t=new k({regexp:!0,search:e.source,caseSensitive:!/i/.test(e.flags)});if(t.valid){t.forVim=!0,this.cm6Query=t;let e=O.of(t);return this.cm6.dispatch({effects:e}),t}}removeOverlay(e){if(!this.cm6Query)return;this.cm6Query.forVim=!1;let t=O.of(this.cm6Query);this.cm6.dispatch({effects:t})}getSearchCursor(e,t){var n=this,r=null,i=null,a=!1;t.ch??=Number.MAX_VALUE;var o=A(n.cm6.state.doc,t),s=e.source.replace(/(\\.|{(?:\d+(?:,\d*)?|,\d+)})|[{}]/g,function(e,t){return t||`\\`+e});function c(t,n=0,r=t.length){return new ee(t,s,{ignoreCase:e.ignoreCase},n,r)}function l(e){var t=n.cm6.state.doc;if(e>t.length)return null;let r=c(t,e).next();return r.done?null:r.value}var u=1e4;function d(e,t){var r=n.cm6.state.doc;for(let n=1;;n++){let i=Math.max(e,t-n*u),a=c(r,i,t),o=null;for(;!a.next().done;)o=a.value;if(o&&(i==e||o.from>i+10))return o;if(i==e)return null}}return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(e){var t=n.cm6.state.doc;return r=e?d(0,r?a?r.to-1:r.from:o):l(r?a?r.to+1:r.to:o),i=r&&{from:j(t,r.from),to:j(t,r.to),match:r.match},a=r?r.from==r.to:!1,r&&r.match},from:function(){return i?.from},to:function(){return i?.to},replace:function(e){r&&(oe(n,{changes:{from:r.from,to:r.to,insert:e}}),r.to=r.from+e.length,i&&(i.to=j(n.cm6.state.doc,r.to)))},get match(){return i&&i.match}}}findPosV(e,t,n,r){let{cm6:i}=this,a=i.state.doc,o=n==`page`?i.dom.clientHeight:0,s=A(a,e),l=c.cursor(s,1,void 0,r),u=Math.round(Math.abs(t));for(let e=0;e<u;e++)n==`page`?l=i.moveVertically(l,t>0,o):n==`line`&&(l=i.moveVertically(l,t>0));let d=j(a,l.head);return(t<0&&l.head==0&&r!=0&&e.line==0&&e.ch!=0||t>0&&l.head==a.length&&d.ch!=r&&e.line==d.line)&&(d.hitSide=!0),d}charCoords(e,t){var n=this.cm6.contentDOM.getBoundingClientRect(),r=A(this.cm6.state.doc,e),i=this.cm6.coordsAtPos(r),a=-n.top;return{left:(i?.left||0)-n.left,top:(i?.top||0)+a,bottom:(i?.bottom||0)+a}}coordsChar(e,t){var n=this.cm6.contentDOM.getBoundingClientRect(),r=this.cm6.posAtCoords({x:e.left+n.left,y:e.top+n.top})||0;return j(this.cm6.state.doc,r)}getScrollInfo(){var e=this.cm6.scrollDOM;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight,width:e.scrollWidth,clientHeight:e.clientHeight,clientWidth:e.clientWidth}}scrollTo(e,t){e!=null&&(this.cm6.scrollDOM.scrollLeft=e),t!=null&&(this.cm6.scrollDOM.scrollTop=t)}scrollIntoView(e,t){if(e){var n=this.indexFromPos(e);this.cm6.dispatch({effects:s.scrollIntoView(n)})}else this.cm6.dispatch({scrollIntoView:!0,userEvent:`scroll`})}getWrapperElement(){return this.cm6.dom}getMode(){return{name:this.getOption(`mode`)}}setSize(e,t){this.cm6.dom.style.width=e+4+`px`,this.cm6.dom.style.height=t+`px`,this.refresh()}refresh(){this.cm6.measure()}destroy(){this.removeOverlay()}getLastEditEnd(){return this.posFromIndex(this.$lastChangeEndOffset)}onChange(e){this.$lineHandleChanges&&this.$lineHandleChanges.push(e);for(let t in this.marks)this.marks[t].update(e.changes);this.virtualSelection&&(this.virtualSelection.ranges=this.virtualSelection.ranges.map(t=>t.map(e.changes)));var t=this.curOp=this.curOp||{};e.changes.iterChanges((e,n,r,i,a)=>{(t.$changeStart==null||t.$changeStart>r)&&(t.$changeStart=r),this.$lastChangeEndOffset=i;var o={text:a.toJSON()};t.lastChange?t.lastChange.next=t.lastChange=o:t.lastChange=t.change=o},!0),t.changeHandlers||=this._handlers.change&&this._handlers.change.slice()}onSelectionChange(){var e=this.curOp=this.curOp||{};e.cursorActivityHandlers||=this._handlers.cursorActivity&&this._handlers.cursorActivity.slice(),this.curOp.cursorActivity=!0}operation(e,t){this.curOp||={$d:0},this.curOp.$d++;try{var n=e()}finally{this.curOp&&(this.curOp.$d--,this.curOp.$d||this.onBeforeEndOperation())}return n}onBeforeEndOperation(){var e=this.curOp,t=!1;e&&(e.change&&N(e.changeHandlers,this,e.change),e&&e.cursorActivity&&(N(e.cursorActivityHandlers,this,null),e.isVimOp&&(t=!0)),this.curOp=null),t&&this.scrollIntoView()}moveH(e,t){if(t==`char`){var n=this.getCursor();this.setCursor(n.line,n.ch+e)}}setOption(e,t){switch(e){case`keyMap`:this.state.keyMap=t;break;case`textwidth`:this.state.textwidth=t}}getOption(e){switch(e){case`firstLineNumber`:return 1;case`tabSize`:return this.cm6.state.tabSize||4;case`readOnly`:return this.cm6.state.readOnly;case`indentWithTabs`:return this.cm6.state.facet(t)==` `;case`indentUnit`:return this.cm6.state.facet(t).length||2;case`textwidth`:return this.state.textwidth;case`keyMap`:return this.state.keyMap||`vim`}}toggleOverwrite(e){this.state.overwrite=e}getTokenTypeAt(e){var t=this.indexFromPos(e),n=(_(this.cm6.state,t)?.resolve(t))?.type?.name||``;return/comment/i.test(n)?`comment`:/string/i.test(n)?`string`:``}overWriteSelection(e){var t=this.cm6.state.doc,n=this.cm6.state.selection,r=n.ranges.map(e=>{if(e.empty){var n=e.to<t.length?t.sliceString(e.from,e.to+1):``;if(n&&!/\n/.test(n))return c.range(e.from,e.to+1)}return e});this.cm6.dispatch({selection:c.create(r,n.mainIndex)}),this.replaceSelection(e)}isInMultiSelectMode(){return this.cm6.state.selection.ranges.length>1}virtualSelectionMode(){return!!this.virtualSelection}forEachSelection(e){var t=this.cm6.state.selection;this.virtualSelection=c.create(t.ranges,t.mainIndex);for(var n=0;n<this.virtualSelection.ranges.length;n++){var r=this.virtualSelection.ranges[n];r&&(this.cm6.dispatch({selection:c.create([r])}),e(),this.virtualSelection.ranges[n]=this.cm6.state.selection.ranges[0])}this.cm6.dispatch({selection:this.virtualSelection}),this.virtualSelection=null}hardWrap(e){return ye(this,e)}};F.isMac=typeof navigator<`u`&&/Mac/.test(navigator.platform),F.Pos=M,F.StringStream=p,F.commands={cursorCharLeft:function(e){C(e.cm6)},redo:function(e){P(e,!1)},undo:function(e){P(e,!0)},newlineAndIndent:function(e){y({state:e.cm6.state,dispatch:t=>oe(e,t)})},indentAuto:function(e){D(e.cm6)},newlineAndIndentContinueComment:void 0,save:void 0},F.isWordChar=function(e){return ae.test(e)},F.keys=se,F.addClass=function(e,t){},F.rmClass=function(e,t){},F.e_preventDefault=function(e){e.preventDefault()},F.e_stop=function(e){var t,n;(t=e?.stopPropagation)==null||t.call(e),(n=e?.preventDefault)==null||n.call(e)},F.lookupKey=function(e,t,n){var r=F.keys[e];!r&&/^Arrow/.test(e)&&(r=F.keys[e.slice(5)]),r&&n(r)},F.on=ne,F.off=re,F.signal=ie,F.findMatchingTag=L,F.findEnclosingTag=ge,F.keyName=void 0;function ce(e,t,n){var r=document.createElement(`div`);return r.appendChild(t),r}function le(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}function ue(e,t,n){le(e,s);var r=ce(e,t,n&&n.bottom),i=!1,a,o=n&&n.duration!==void 0?n.duration:5e3;function s(){i||(i=!0,clearTimeout(a),r.remove(),fe(e,r))}return r.onclick=function(e){e.preventDefault(),s()},de(e,r),o&&(a=setTimeout(s,o)),s}function de(e,t){var n=e.state.dialog;e.state.dialog=t,t.style.flex=`1`,t&&n!==t&&(n&&n.contains(document.activeElement)&&e.focus(),n&&n.parentElement?n.parentElement.replaceChild(t,n):n&&n.remove(),F.signal(e,`dialog`))}function fe(e,t){e.state.dialog==t&&(e.state.dialog=null,F.signal(e,`dialog`))}function pe(e,t,n,r){r||={},le(e,void 0);var i=ce(e,t,r.bottom),a=!1;de(e,i);function o(t){if(typeof t==`string`)s.value=t;else{if(a)return;a=!0,fe(e,i),e.state.dialog||e.focus(),r.onClose&&r.onClose(i)}}var s=i.getElementsByTagName(`input`)[0];return s&&(r.value&&(s.value=r.value,r.selectValueOnOpen!==!1&&s.select()),r.onInput&&F.on(s,`input`,function(e){r.onInput(e,s.value,o)}),r.onKeyUp&&F.on(s,`keyup`,function(e){r.onKeyUp(e,s.value,o)}),F.on(s,`keydown`,function(e){r&&r.onKeyDown&&r.onKeyDown(e,s.value,o)||(e.keyCode==13&&n&&n(s.value),(e.keyCode==27||r.closeOnEnter!==!1&&e.keyCode==13)&&(s.blur(),F.e_stop(e),o()))}),r.closeOnBlur!==!1&&F.on(s,`blur`,function(){setTimeout(function(){document.activeElement!==s&&o()})}),s.focus()),o}var me={"(":`)>`,")":`(<`,"[":`]>`,"]":`[<`,"{":`}>`,"}":`{<`,"<":`>>`,">":`<<`};function I(e){return e&&e.bracketRegex||/[(){}[\]]/}function he(e,t,n,r,i){for(var a=i&&i.maxScanLineLength||1e4,o=i&&i.maxScanLines||1e3,s=[],c=I(i),l=n>0?Math.min(t.line+o,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-o),u=t.line;u!=l;u+=n){var d=e.getLine(u);if(d){var f=n>0?0:d.length-1,p=n>0?d.length:-1;if(!(d.length>a))for(u==t.line&&(f=t.ch-+(n<0));f!=p;f+=n){var m=d.charAt(f);if(c.test(m)){var h=me[m];if(h&&h.charAt(1)==`>`==n>0)s.push(m);else if(s.length)s.pop();else return{pos:new M(u,f),ch:m}}}}}return u-n!=(n>0?e.lastLine():e.firstLine())&&null}function L(e,t){return null}function ge(e,t){var n=e.cm6.state,r=e.indexFromPos(t);r<n.doc.length&&n.sliceDoc(r,r+1)==`<`&&r++;for(var i=_(n,r)?.resolve(r)||null;i;){if(i.firstChild?.type.name==`OpenTag`&&i.lastChild?.type.name==`CloseTag`)return{open:_e(n.doc,i.firstChild),close:_e(n.doc,i.lastChild)};i=i.parent}}function _e(e,t){return{from:j(e,t.from),to:j(e,t.to)}}var ve=class{constructor(e,t,n){this.cm=e,this.id=e.$mid++,this.offset=t,this.assoc=n,e.marks[this.id]=this}clear(){delete this.cm.marks[this.id]}find(){return this.offset==null?null:this.cm.posFromIndex(this.offset)}update(e){this.offset!=null&&(this.offset=e.mapPos(this.offset,this.assoc,l.TrackDel))}};function ye(e,t){for(var n=t.column||e.getOption(`textwidth`)||80,r=t.allowMerge!=0,i=Math.min(t.from,t.to),a=Math.max(t.from,t.to);i<=a;){var o=e.getLine(i);if(o.length>n){var s=p(o,n,5);if(s){var c=/^\s*/.exec(o)?.[0];e.replaceRange(`
37
- `+c,new M(i,s.start),new M(i,s.end))}a++}else if(r&&/\S/.test(o)&&i!=a){var l=e.getLine(i+1);if(l&&/\S/.test(l)){var u=o.replace(/\s+$/,``),d=l.replace(/^\s+/,``),f=u+` `+d,s=p(f,n,5);s&&s.start>u.length||f.length<n?(e.replaceRange(` `,new M(i,u.length),new M(i+1,l.length-d.length)),i--,a--):u.length<o.length&&e.replaceRange(``,new M(i,u.length),new M(i,o.length))}}i++}return i;function p(e,t,n){if(!(e.length<t)){var r=e.slice(0,t),i=e.slice(t),a=/^(?:(\s+)|(\S+)(\s+))/.exec(i),o=/(?:(\s+)|(\s+)(\S+))$/.exec(r),s=0,c=0;if(o&&!o[2]&&(s=t-o[1].length,c=t),a&&!a[2]&&(s||=t,c=t+a[1].length),s)return{start:s,end:c};if(o&&o[2]&&o.index>n)return{start:o.index,end:o.index+o[2].length};if(a&&a[2])return s=t+a[2].length,{start:s,end:s+a[3].length}}}}var R=i||function(){let e={cursorBlinkRate:1200};return function(){return e}}(),be=class{constructor(e,t,n,r,i,a,o,s,c,l){this.left=e,this.top=t,this.height=n,this.fontFamily=r,this.fontSize=i,this.fontWeight=a,this.color=o,this.className=s,this.letter=c,this.partial=l}draw(){let e=document.createElement(`div`);return e.className=this.className,this.adjust(e),e}adjust(e){e.style.left=this.left+`px`,e.style.top=this.top+`px`,e.style.height=this.height+`px`,e.style.lineHeight=this.height+`px`,e.style.fontFamily=this.fontFamily,e.style.fontSize=this.fontSize,e.style.fontWeight=this.fontWeight,e.style.color=this.partial?`transparent`:this.color,e.className=this.className,e.textContent=this.letter}eq(e){return this.left==e.left&&this.top==e.top&&this.height==e.height&&this.fontFamily==e.fontFamily&&this.fontSize==e.fontSize&&this.fontWeight==e.fontWeight&&this.color==e.color&&this.className==e.className&&this.letter==e.letter}},xe=class{constructor(e,t){this.view=e,this.rangePieces=[],this.cursors=[],this.cm=t,this.measureReq={read:this.readPos.bind(this),write:this.drawSel.bind(this)},this.cursorLayer=e.scrollDOM.appendChild(document.createElement(`div`)),this.cursorLayer.className=`cm-cursorLayer cm-vimCursorLayer`,this.cursorLayer.setAttribute(`aria-hidden`,`true`),e.requestMeasure(this.measureReq),this.setBlinkRate()}setBlinkRate(){let e=R(this.cm.cm6.state).cursorBlinkRate;this.cursorLayer.style.animationDuration=e+`ms`}update(e){(e.selectionSet||e.geometryChanged||e.viewportChanged)&&(this.view.requestMeasure(this.measureReq),this.cursorLayer.style.animationName=this.cursorLayer.style.animationName==`cm-blink`?`cm-blink2`:`cm-blink`),Se(e)&&this.setBlinkRate()}scheduleRedraw(){this.view.requestMeasure(this.measureReq)}readPos(){let{state:e}=this.view,t=[];for(let n of e.selection.ranges){let r=n==e.selection.main,i=Te(this.cm,this.view,n,r);i&&t.push(i)}return{cursors:t}}drawSel({cursors:e}){if(e.length!=this.cursors.length||e.some((e,t)=>!e.eq(this.cursors[t]))){let t=this.cursorLayer.children;if(t.length!==e.length){this.cursorLayer.textContent=``;for(let t of e)this.cursorLayer.appendChild(t.draw())}else e.forEach((e,n)=>e.adjust(t[n]));this.cursors=e}}destroy(){this.cursorLayer.remove()}};function Se(e){return R(e.startState)!=R(e.state)}var Ce=u.highest(s.theme({".cm-vimMode .cm-line":{"& ::selection":{backgroundColor:`transparent !important`},"&::selection":{backgroundColor:`transparent !important`},caretColor:`transparent !important`},".cm-fat-cursor":{position:`absolute`,background:`#ff9696`,border:`none`,whiteSpace:`pre`},"&:not(.cm-focused) .cm-fat-cursor":{background:`none`,outline:`solid 1px #ff9696`,color:`transparent !important`}}));function we(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==o.LTR?t.left:t.right-e.scrollDOM.clientWidth)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function Te(e,t,n,r){var i;let a=n.head,o=!1,s=1,c=e.state.vim;if(c&&(!c.insertMode||e.state.overwrite)){if(o=!0,c.visualBlock&&!r)return null;n.anchor<n.head&&(a<t.state.doc.length&&t.state.sliceDoc(a,a+1))!=`
34
+ `);if(r.maybeReset&&=(r.changes=[],!1),o)if(e.state.overwrite&&!/\n/.test(o))r.changes.push([o]);else{if(o.length>1){var s=i&&i.insertEnd&&i.insertEnd.find(),c=e.getCursor();if(s&&s.line==c.line){var l=s.ch-c.ch;l>0&&l<o.length&&(r.changes.push([o,l]),o=``)}}o&&r.changes.push(o)}}t=t.next}}function Jt(e){var t=e.state.vim;if(t.insertMode){var n=M.macroModeState;if(n.isPlaying)return;var r=n.lastInsertModeChanges;r.expectCursorActivityForChange?r.expectCursorActivityForChange=!1:(r.maybeReset=!0,t.insertEnd&&t.insertEnd.clear(),t.insertEnd=e.setBookmark(e.getCursor(),{insertLeft:!0}))}else e.curOp?.isVimOp||Yt(e,t)}function Yt(t,n){var r=t.getCursor(`anchor`),i=t.getCursor(`head`);if(n.visualMode&&!t.somethingSelected()?J(t,!1):!n.visualMode&&!n.insertMode&&t.somethingSelected()&&(n.visualMode=!0,n.visualLine=!1,e.signal(t,`vim-mode-change`,{mode:`visual`})),n.visualMode){var a=W(i,r)?0:-1,o=W(i,r)?-1:0;i=V(i,0,a),r=V(r,0,o),n.sel={anchor:r,head:i},rt(t,n,`<`,G(i,r)),rt(t,n,`>`,K(i,r))}else n.insertMode||(n.lastHPos=t.getCursor().ch)}function Xt(t){var n=M.macroModeState.lastInsertModeChanges,r=e.keyName?e.keyName(t):t.key;r&&(r.indexOf(`Delete`)!=-1||r.indexOf(`Backspace`)!=-1)&&(n.maybeReset&&=(n.changes=[],!1),n.changes.push(new re(r,t)))}function Zt(e,t,n,r){var i=M.macroModeState;i.isPlaying=!0;var a=t.lastEditActionCommand,o=t.inputState;function s(){a?ye.processAction(e,t,a):ye.evalInput(e,t)}function c(n){if(i.lastInsertModeChanges.changes.length>0){n=t.lastEditActionCommand?n:1;var r=i.lastInsertModeChanges;$t(e,r.changes,n)}}if(t.inputState=t.lastEditInputState,a&&a.interlaceInsertRepeat)for(var l=0;l<n;l++)s(),c(1);else r||s(),c(n);t.inputState=o,t.insertMode&&!r&&Rt(e),i.isPlaying=!1}function Qt(t,n){e.lookupKey(n,`vim-insert`,function(n){return typeof n==`string`?e.commands[n](t):n(t),!0})}function $t(e,t,n){var r=e.getCursor(`head`),i=M.macroModeState.lastInsertModeChanges.visualBlock;i&&(Fe(e,r,i+1),n=e.listSelections().length,e.setCursor(r));for(var a=0;a<n;a++){i&&e.setCursor(V(r,a,0));for(var o=0;o<t.length;o++){var s=t[o];if(s instanceof re)Qt(e,s.keyName);else if(typeof s==`string`)e.replaceSelection(s);else{var c=e.getCursor(),l=V(c,0,s[0].length-(s[1]||0));e.replaceRange(s[0],c,s[1]?c:l),e.setCursor(l)}}}i&&e.setCursor(V(r,0,1))}function en(e){var t=new e.constructor;return Object.keys(e).forEach(function(n){if(n!=`insertEnd`){var r=e[n];Array.isArray(r)?r=r.slice():r&&typeof r==`object`&&r.constructor!=Object&&(r=en(r)),t[n]=r}}),e.sel&&(t.sel={head:e.sel.head&&H(e.sel.head),anchor:e.sel.anchor&&H(e.sel.anchor)}),t}function tn(e,t,n){var r=j(e),i=e,a=!1,r=N.maybeInitVimState_(i),o=r.visualBlock||r.wasInVisualBlock;if(i.state.closeVimNotification){var s=i.state.closeVimNotification;if(i.state.closeVimNotification=null,s(),t==`<CR>`)return I(i),!0}var c=i.isInMultiSelectMode();if(r.wasInVisualBlock&&!c?r.wasInVisualBlock=!1:c&&r.visualBlock&&(r.wasInVisualBlock=!0),t==`<Esc>`&&!r.insertMode&&!r.visualMode&&c&&r.status==`<Esc>`)I(i);else if(o||!c||i.inVirtualSelectionMode)a=N.handleKey(i,t,n);else{var l=en(r),u=r.inputState.changeQueueList||[];i.operation(function(){i.curOp&&(i.curOp.isVimOp=!0);var e=0;i.forEachSelection(function(){i.state.vim.inputState.changeQueue=u[e];var r=i.getCursor(`head`),o=i.getCursor(`anchor`),s=W(r,o)?0:-1,c=W(r,o)?-1:0;r=V(r,0,s),o=V(o,0,c),i.state.vim.sel.head=r,i.state.vim.sel.anchor=o,a=N.handleKey(i,t,n),i.virtualSelection&&(u[e]=i.state.vim.inputState.changeQueue,i.state.vim=en(l)),e++}),i.curOp?.cursorActivity&&!a&&(i.curOp.cursorActivity=!1),i.state.vim=r,r.inputState.changeQueueList=u,r.inputState.changeQueue=null},!0)}return a&&!r.visualMode&&!r.insertMode&&r.visualMode!=i.somethingSelected()&&Yt(i,r),a}return ne(),N}function A(e,t){var n=t.ch,r=t.line+1;r<1&&(r=1,n=0),r>e.lines&&(r=e.lines,n=Number.MAX_VALUE);var i=e.line(r);return Math.min(i.from+Math.max(0,n),i.to)}function j(e,t){let n=e.lineAt(t);return{line:n.number-1,ch:t-n.from}}var M=class{constructor(e,t){this.line=e,this.ch=t}};function ne(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else{var r=e._handlers||={};r[t]=(r[t]||[]).concat(n)}}function re(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else{var r=e._handlers,i=r&&r[t];if(i){var a=i.indexOf(n);a>-1&&(r[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function ie(e,t,...n){var r=e._handlers?.[t];if(r)for(var i=0;i<r.length;++i)r[i](...n)}function N(e,...t){if(e)for(var n=0;n<e.length;++n)e[n](...t)}var ae;try{ae=RegExp(`[\\w\\p{Alphabetic}\\p{Number}_]`,`u`)}catch{ae=/[\w]/}function oe(e,t){var n=e.cm6;if(!n.state.readOnly){var r=`input.type.compose`;if(e.curOp&&(e.curOp.lastChange||(r=`input.type.compose.start`)),t.annotations)try{t.annotations.some(function(e){e.value==`input`&&(e.value=r)})}catch(e){console.error(e)}else t.userEvent=r;return n.dispatch(t)}}function P(e,t){e.curOp&&(e.curOp.$changeStart=void 0),(t?S:w)(e.cm6);let n=e.curOp?.$changeStart;n!=null&&e.cm6.dispatch({selection:{anchor:n}})}var se={Left:e=>c(e.cm6,{key:`Left`},`editor`),Right:e=>c(e.cm6,{key:`Right`},`editor`),Up:e=>c(e.cm6,{key:`Up`},`editor`),Down:e=>c(e.cm6,{key:`Down`},`editor`),Backspace:e=>c(e.cm6,{key:`Backspace`},`editor`),Delete:e=>c(e.cm6,{key:`Delete`},`editor`)},F=class e{openDialog(e,t,n){return pe(this,e,t,n)}openNotification(e,t){return ue(this,e,t)}constructor(e){this.state={},this.marks=Object.create(null),this.$mid=0,this.options={},this._handlers={},this.$lastChangeEndOffset=0,this.virtualSelection=null,this.cm6=e,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this)}on(e,t){ne(this,e,t)}off(e,t){re(this,e,t)}signal(e,t,n){ie(this,e,t,n)}indexFromPos(e){return A(this.cm6.state.doc,e)}posFromIndex(e){return j(this.cm6.state.doc,e)}foldCode(e){let t=this.cm6,n=t.state.selection.ranges,r=this.cm6.state.doc,i=A(r,e),a=f.create([f.range(i,i)],0).ranges;t.state.selection.ranges=a,g(t),t.state.selection.ranges=n}firstLine(){return 0}lastLine(){return this.cm6.state.doc.lines-1}lineCount(){return this.cm6.state.doc.lines}setCursor(e,t){typeof e==`object`&&(t=e.ch,e=e.line);var n=A(this.cm6.state.doc,{line:e,ch:t||0});this.cm6.dispatch({selection:{anchor:n}},{scrollIntoView:!this.curOp}),this.curOp&&!this.curOp.isVimOp&&this.onBeforeEndOperation()}getCursor(e){var t=this.cm6.state.selection.main,n=e==`head`||!e?t.head:e==`anchor`?t.anchor:e==`start`?t.from:e==`end`?t.to:null;if(n==null)throw Error(`Invalid cursor type`);return this.posFromIndex(n)}listSelections(){var e=this.cm6.state.doc;return this.cm6.state.selection.ranges.map(t=>({anchor:j(e,t.anchor),head:j(e,t.head)}))}setSelections(e,t){var n=this.cm6.state.doc,r=e.map(e=>{var t=A(n,e.head),r=A(n,e.anchor);return t==r?f.cursor(t,1):f.range(r,t)});this.cm6.dispatch({selection:f.create(r,t)})}setSelection(e,t,n){this.setSelections([{anchor:e,head:t}],0),n&&n.origin==`*mouse`&&this.onBeforeEndOperation()}getLine(e){var t=this.cm6.state.doc;return e<0||e>=t.lines?``:this.cm6.state.doc.line(e+1).text}getLineHandle(e){return this.$lineHandleChanges||=[],{row:e,index:this.indexFromPos(new M(e,0))}}getLineNumber(e){var t=this.$lineHandleChanges;if(!t)return null;for(var n=e.index,r=0;r<t.length;r++)if(n=t[r].changes.mapPos(n,1,d.TrackAfter),n==null)return null;var i=this.posFromIndex(n);return i.ch==0?i.line:null}releaseLineHandles(){this.$lineHandleChanges=void 0}getRange(e,t){var n=this.cm6.state.doc;return this.cm6.state.sliceDoc(A(n,e),A(n,t))}replaceRange(e,t,n,r){n||=t;var i=this.cm6.state.doc,a=A(i,t),o=A(i,n);oe(this,{changes:{from:a,to:o,insert:e}})}replaceSelection(e){oe(this,this.cm6.state.replaceSelection(e))}replaceSelections(e){var t=this.cm6.state.selection.ranges.map((t,n)=>({from:t.from,to:t.to,insert:e[n]||``}));oe(this,{changes:t})}getSelection(){return this.getSelections().join(`
35
+ `)}getSelections(){var e=this.cm6;return e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to))}somethingSelected(){return this.cm6.state.selection.ranges.some(e=>!e.empty)}getInputField(){return this.cm6.contentDOM}clipPos(e){var t=this.cm6.state.doc,n=e.ch,r=e.line+1;r<1&&(r=1,n=0),r>t.lines&&(r=t.lines,n=Number.MAX_VALUE);var i=t.line(r);return n=Math.min(Math.max(0,n),i.to-i.from),new M(r-1,n)}getValue(){return this.cm6.state.doc.toString()}setValue(e){var t=this.cm6;return t.dispatch({changes:{from:0,to:t.state.doc.length,insert:e},selection:f.range(0,0)})}focus(){return this.cm6.focus()}blur(){return this.cm6.contentDOM.blur()}defaultTextHeight(){return this.cm6.defaultLineHeight}findMatchingBracket(e,t){var n=this.cm6.state,r=A(n.doc,e),i=a(n,r+1,-1);return i&&i.end||(i=a(n,r,1),i&&i.end)?{to:j(n.doc,i.end.from)}:{to:void 0}}scanForBracket(e,t,n,r){return he(this,e,t,n,r)}indentLine(e,t){t?this.indentMore():this.indentLess()}indentMore(){x(this.cm6)}indentLess(){v(this.cm6)}execCommand(t){if(t==`indentAuto`)e.commands.indentAuto(this);else if(t==`goLineLeft`)T(this.cm6);else if(t==`goLineRight`){b(this.cm6);let e=this.cm6.state,t=e.selection.main.head;t<e.doc.length&&e.sliceDoc(t,t+1)!==`
36
+ `&&E(this.cm6)}else t+``}setBookmark(e,t){var n=t?.insertLeft?1:-1,r=this.indexFromPos(e);return new ve(this,r,n)}addOverlay({query:e}){let t=new k({regexp:!0,search:e.source,caseSensitive:!/i/.test(e.flags)});if(t.valid){t.forVim=!0,this.cm6Query=t;let e=O.of(t);return this.cm6.dispatch({effects:e}),t}}removeOverlay(e){if(!this.cm6Query)return;this.cm6Query.forVim=!1;let t=O.of(this.cm6Query);this.cm6.dispatch({effects:t})}getSearchCursor(e,t){var n=this,r=null,i=null,a=!1;t.ch??=Number.MAX_VALUE;var o=A(n.cm6.state.doc,t),s=e.source.replace(/(\\.|{(?:\d+(?:,\d*)?|,\d+)})|[{}]/g,function(e,t){return t||`\\`+e});function c(t,n=0,r=t.length){return new ee(t,s,{ignoreCase:e.ignoreCase},n,r)}function l(e){var t=n.cm6.state.doc;if(e>t.length)return null;let r=c(t,e).next();return r.done?null:r.value}var u=1e4;function d(e,t){var r=n.cm6.state.doc;for(let n=1;;n++){let i=Math.max(e,t-n*u),a=c(r,i,t),o=null;for(;!a.next().done;)o=a.value;if(o&&(i==e||o.from>i+10))return o;if(i==e)return null}}return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(e){var t=n.cm6.state.doc;return r=e?d(0,r?a?r.to-1:r.from:o):l(r?a?r.to+1:r.to:o),i=r&&{from:j(t,r.from),to:j(t,r.to),match:r.match},a=r?r.from==r.to:!1,r&&r.match},from:function(){return i?.from},to:function(){return i?.to},replace:function(e){r&&(oe(n,{changes:{from:r.from,to:r.to,insert:e}}),r.to=r.from+e.length,i&&(i.to=j(n.cm6.state.doc,r.to)))},get match(){return i&&i.match}}}findPosV(e,t,n,r){let{cm6:i}=this,a=i.state.doc,o=n==`page`?i.dom.clientHeight:0,s=A(a,e),c=f.cursor(s,1,void 0,r),l=Math.round(Math.abs(t));for(let e=0;e<l;e++)n==`page`?c=i.moveVertically(c,t>0,o):n==`line`&&(c=i.moveVertically(c,t>0));let u=j(a,c.head);return(t<0&&c.head==0&&r!=0&&e.line==0&&e.ch!=0||t>0&&c.head==a.length&&u.ch!=r&&e.line==u.line)&&(u.hitSide=!0),u}charCoords(e,t){var n=this.cm6.contentDOM.getBoundingClientRect(),r=A(this.cm6.state.doc,e),i=this.cm6.coordsAtPos(r),a=-n.top;return{left:(i?.left||0)-n.left,top:(i?.top||0)+a,bottom:(i?.bottom||0)+a}}coordsChar(e,t){var n=this.cm6.contentDOM.getBoundingClientRect(),r=this.cm6.posAtCoords({x:e.left+n.left,y:e.top+n.top})||0;return j(this.cm6.state.doc,r)}getScrollInfo(){var e=this.cm6.scrollDOM;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight,width:e.scrollWidth,clientHeight:e.clientHeight,clientWidth:e.clientWidth}}scrollTo(e,t){e!=null&&(this.cm6.scrollDOM.scrollLeft=e),t!=null&&(this.cm6.scrollDOM.scrollTop=t)}scrollIntoView(e,t){if(e){var n=this.indexFromPos(e);this.cm6.dispatch({effects:r.scrollIntoView(n)})}else this.cm6.dispatch({scrollIntoView:!0,userEvent:`scroll`})}getWrapperElement(){return this.cm6.dom}getMode(){return{name:this.getOption(`mode`)}}setSize(e,t){this.cm6.dom.style.width=e+4+`px`,this.cm6.dom.style.height=t+`px`,this.refresh()}refresh(){this.cm6.measure()}destroy(){this.removeOverlay()}getLastEditEnd(){return this.posFromIndex(this.$lastChangeEndOffset)}onChange(e){this.$lineHandleChanges&&this.$lineHandleChanges.push(e);for(let t in this.marks)this.marks[t].update(e.changes);this.virtualSelection&&(this.virtualSelection.ranges=this.virtualSelection.ranges.map(t=>t.map(e.changes)));var t=this.curOp=this.curOp||{};e.changes.iterChanges((e,n,r,i,a)=>{(t.$changeStart==null||t.$changeStart>r)&&(t.$changeStart=r),this.$lastChangeEndOffset=i;var o={text:a.toJSON()};t.lastChange?t.lastChange.next=t.lastChange=o:t.lastChange=t.change=o},!0),t.changeHandlers||=this._handlers.change&&this._handlers.change.slice()}onSelectionChange(){var e=this.curOp=this.curOp||{};e.cursorActivityHandlers||=this._handlers.cursorActivity&&this._handlers.cursorActivity.slice(),this.curOp.cursorActivity=!0}operation(e,t){this.curOp||={$d:0},this.curOp.$d++;try{var n=e()}finally{this.curOp&&(this.curOp.$d--,this.curOp.$d||this.onBeforeEndOperation())}return n}onBeforeEndOperation(){var e=this.curOp,t=!1;e&&(e.change&&N(e.changeHandlers,this,e.change),e&&e.cursorActivity&&(N(e.cursorActivityHandlers,this,null),e.isVimOp&&(t=!0)),this.curOp=null),t&&this.scrollIntoView()}moveH(e,t){if(t==`char`){var n=this.getCursor();this.setCursor(n.line,n.ch+e)}}setOption(e,t){switch(e){case`keyMap`:this.state.keyMap=t;break;case`textwidth`:this.state.textwidth=t}}getOption(e){switch(e){case`firstLineNumber`:return 1;case`tabSize`:return this.cm6.state.tabSize||4;case`readOnly`:return this.cm6.state.readOnly;case`indentWithTabs`:return this.cm6.state.facet(t)==` `;case`indentUnit`:return this.cm6.state.facet(t).length||2;case`textwidth`:return this.state.textwidth;case`keyMap`:return this.state.keyMap||`vim`}}toggleOverwrite(e){this.state.overwrite=e}getTokenTypeAt(e){var t=this.indexFromPos(e),n=(_(this.cm6.state,t)?.resolve(t))?.type?.name||``;return/comment/i.test(n)?`comment`:/string/i.test(n)?`string`:``}overWriteSelection(e){var t=this.cm6.state.doc,n=this.cm6.state.selection,r=n.ranges.map(e=>{if(e.empty){var n=e.to<t.length?t.sliceString(e.from,e.to+1):``;if(n&&!/\n/.test(n))return f.range(e.from,e.to+1)}return e});this.cm6.dispatch({selection:f.create(r,n.mainIndex)}),this.replaceSelection(e)}isInMultiSelectMode(){return this.cm6.state.selection.ranges.length>1}virtualSelectionMode(){return!!this.virtualSelection}forEachSelection(e){var t=this.cm6.state.selection;this.virtualSelection=f.create(t.ranges,t.mainIndex);for(var n=0;n<this.virtualSelection.ranges.length;n++){var r=this.virtualSelection.ranges[n];r&&(this.cm6.dispatch({selection:f.create([r])}),e(),this.virtualSelection.ranges[n]=this.cm6.state.selection.ranges[0])}this.cm6.dispatch({selection:this.virtualSelection}),this.virtualSelection=null}hardWrap(e){return ye(this,e)}};F.isMac=typeof navigator<`u`&&/Mac/.test(navigator.platform),F.Pos=M,F.StringStream=p,F.commands={cursorCharLeft:function(e){C(e.cm6)},redo:function(e){P(e,!1)},undo:function(e){P(e,!0)},newlineAndIndent:function(e){y({state:e.cm6.state,dispatch:t=>oe(e,t)})},indentAuto:function(e){D(e.cm6)},newlineAndIndentContinueComment:void 0,save:void 0},F.isWordChar=function(e){return ae.test(e)},F.keys=se,F.addClass=function(e,t){},F.rmClass=function(e,t){},F.e_preventDefault=function(e){e.preventDefault()},F.e_stop=function(e){var t,n;(t=e?.stopPropagation)==null||t.call(e),(n=e?.preventDefault)==null||n.call(e)},F.lookupKey=function(e,t,n){var r=F.keys[e];!r&&/^Arrow/.test(e)&&(r=F.keys[e.slice(5)]),r&&n(r)},F.on=ne,F.off=re,F.signal=ie,F.findMatchingTag=L,F.findEnclosingTag=ge,F.keyName=void 0;function ce(e,t,n){var r=document.createElement(`div`);return r.appendChild(t),r}function le(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}function ue(e,t,n){le(e,s);var r=ce(e,t,n&&n.bottom),i=!1,a,o=n&&n.duration!==void 0?n.duration:5e3;function s(){i||(i=!0,clearTimeout(a),r.remove(),fe(e,r))}return r.onclick=function(e){e.preventDefault(),s()},de(e,r),o&&(a=setTimeout(s,o)),s}function de(e,t){var n=e.state.dialog;e.state.dialog=t,t.style.flex=`1`,t&&n!==t&&(n&&n.contains(document.activeElement)&&e.focus(),n&&n.parentElement?n.parentElement.replaceChild(t,n):n&&n.remove(),F.signal(e,`dialog`))}function fe(e,t){e.state.dialog==t&&(e.state.dialog=null,F.signal(e,`dialog`))}function pe(e,t,n,r){r||={},le(e,void 0);var i=ce(e,t,r.bottom),a=!1;de(e,i);function o(t){if(typeof t==`string`)s.value=t;else{if(a)return;a=!0,fe(e,i),e.state.dialog||e.focus(),r.onClose&&r.onClose(i)}}var s=i.getElementsByTagName(`input`)[0];return s&&(r.value&&(s.value=r.value,r.selectValueOnOpen!==!1&&s.select()),r.onInput&&F.on(s,`input`,function(e){r.onInput(e,s.value,o)}),r.onKeyUp&&F.on(s,`keyup`,function(e){r.onKeyUp(e,s.value,o)}),F.on(s,`keydown`,function(e){r&&r.onKeyDown&&r.onKeyDown(e,s.value,o)||(e.keyCode==13&&n&&n(s.value),(e.keyCode==27||r.closeOnEnter!==!1&&e.keyCode==13)&&(s.blur(),F.e_stop(e),o()))}),r.closeOnBlur!==!1&&F.on(s,`blur`,function(){setTimeout(function(){document.activeElement!==s&&o()})}),s.focus()),o}var me={"(":`)>`,")":`(<`,"[":`]>`,"]":`[<`,"{":`}>`,"}":`{<`,"<":`>>`,">":`<<`};function I(e){return e&&e.bracketRegex||/[(){}[\]]/}function he(e,t,n,r,i){for(var a=i&&i.maxScanLineLength||1e4,o=i&&i.maxScanLines||1e3,s=[],c=I(i),l=n>0?Math.min(t.line+o,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-o),u=t.line;u!=l;u+=n){var d=e.getLine(u);if(d){var f=n>0?0:d.length-1,p=n>0?d.length:-1;if(!(d.length>a))for(u==t.line&&(f=t.ch-+(n<0));f!=p;f+=n){var m=d.charAt(f);if(c.test(m)){var h=me[m];if(h&&h.charAt(1)==`>`==n>0)s.push(m);else if(s.length)s.pop();else return{pos:new M(u,f),ch:m}}}}}return u-n!=(n>0?e.lastLine():e.firstLine())&&null}function L(e,t){return null}function ge(e,t){var n=e.cm6.state,r=e.indexFromPos(t);r<n.doc.length&&n.sliceDoc(r,r+1)==`<`&&r++;for(var i=_(n,r)?.resolve(r)||null;i;){if(i.firstChild?.type.name==`OpenTag`&&i.lastChild?.type.name==`CloseTag`)return{open:_e(n.doc,i.firstChild),close:_e(n.doc,i.lastChild)};i=i.parent}}function _e(e,t){return{from:j(e,t.from),to:j(e,t.to)}}var ve=class{constructor(e,t,n){this.cm=e,this.id=e.$mid++,this.offset=t,this.assoc=n,e.marks[this.id]=this}clear(){delete this.cm.marks[this.id]}find(){return this.offset==null?null:this.cm.posFromIndex(this.offset)}update(e){this.offset!=null&&(this.offset=e.mapPos(this.offset,this.assoc,d.TrackDel))}};function ye(e,t){for(var n=t.column||e.getOption(`textwidth`)||80,r=t.allowMerge!=0,i=Math.min(t.from,t.to),a=Math.max(t.from,t.to);i<=a;){var o=e.getLine(i);if(o.length>n){var s=p(o,n,5);if(s){var c=/^\s*/.exec(o)?.[0];e.replaceRange(`
37
+ `+c,new M(i,s.start),new M(i,s.end))}a++}else if(r&&/\S/.test(o)&&i!=a){var l=e.getLine(i+1);if(l&&/\S/.test(l)){var u=o.replace(/\s+$/,``),d=l.replace(/^\s+/,``),f=u+` `+d,s=p(f,n,5);s&&s.start>u.length||f.length<n?(e.replaceRange(` `,new M(i,u.length),new M(i+1,l.length-d.length)),i--,a--):u.length<o.length&&e.replaceRange(``,new M(i,u.length),new M(i,o.length))}}i++}return i;function p(e,t,n){if(!(e.length<t)){var r=e.slice(0,t),i=e.slice(t),a=/^(?:(\s+)|(\S+)(\s+))/.exec(i),o=/(?:(\s+)|(\s+)(\S+))$/.exec(r),s=0,c=0;if(o&&!o[2]&&(s=t-o[1].length,c=t),a&&!a[2]&&(s||=t,c=t+a[1].length),s)return{start:s,end:c};if(o&&o[2]&&o.index>n)return{start:o.index,end:o.index+o[2].length};if(a&&a[2])return s=t+a[2].length,{start:s,end:s+a[3].length}}}}var R=i||function(){let e={cursorBlinkRate:1200};return function(){return e}}(),be=class{constructor(e,t,n,r,i,a,o,s,c,l){this.left=e,this.top=t,this.height=n,this.fontFamily=r,this.fontSize=i,this.fontWeight=a,this.color=o,this.className=s,this.letter=c,this.partial=l}draw(){let e=document.createElement(`div`);return e.className=this.className,this.adjust(e),e}adjust(e){e.style.left=this.left+`px`,e.style.top=this.top+`px`,e.style.height=this.height+`px`,e.style.lineHeight=this.height+`px`,e.style.fontFamily=this.fontFamily,e.style.fontSize=this.fontSize,e.style.fontWeight=this.fontWeight,e.style.color=this.partial?`transparent`:this.color,e.className=this.className,e.textContent=this.letter}eq(e){return this.left==e.left&&this.top==e.top&&this.height==e.height&&this.fontFamily==e.fontFamily&&this.fontSize==e.fontSize&&this.fontWeight==e.fontWeight&&this.color==e.color&&this.className==e.className&&this.letter==e.letter}},xe=class{constructor(e,t){this.view=e,this.rangePieces=[],this.cursors=[],this.cm=t,this.measureReq={read:this.readPos.bind(this),write:this.drawSel.bind(this)},this.cursorLayer=e.scrollDOM.appendChild(document.createElement(`div`)),this.cursorLayer.className=`cm-cursorLayer cm-vimCursorLayer`,this.cursorLayer.setAttribute(`aria-hidden`,`true`),e.requestMeasure(this.measureReq),this.setBlinkRate()}setBlinkRate(){let e=R(this.cm.cm6.state).cursorBlinkRate;this.cursorLayer.style.animationDuration=e+`ms`}update(e){(e.selectionSet||e.geometryChanged||e.viewportChanged)&&(this.view.requestMeasure(this.measureReq),this.cursorLayer.style.animationName=this.cursorLayer.style.animationName==`cm-blink`?`cm-blink2`:`cm-blink`),Se(e)&&this.setBlinkRate()}scheduleRedraw(){this.view.requestMeasure(this.measureReq)}readPos(){let{state:e}=this.view,t=[];for(let n of e.selection.ranges){let r=n==e.selection.main,i=Te(this.cm,this.view,n,r);i&&t.push(i)}return{cursors:t}}drawSel({cursors:e}){if(e.length!=this.cursors.length||e.some((e,t)=>!e.eq(this.cursors[t]))){let t=this.cursorLayer.children;if(t.length!==e.length){this.cursorLayer.textContent=``;for(let t of e)this.cursorLayer.appendChild(t.draw())}else e.forEach((e,n)=>e.adjust(t[n]));this.cursors=e}}destroy(){this.cursorLayer.remove()}};function Se(e){return R(e.startState)!=R(e.state)}var Ce=h.highest(r.theme({".cm-vimMode .cm-line":{"& ::selection":{backgroundColor:`transparent !important`},"&::selection":{backgroundColor:`transparent !important`},caretColor:`transparent !important`},".cm-fat-cursor":{position:`absolute`,background:`#ff9696`,border:`none`,whiteSpace:`pre`},"&:not(.cm-focused) .cm-fat-cursor":{background:`none`,outline:`solid 1px #ff9696`,color:`transparent !important`}}));function we(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==s.LTR?t.left:t.right-e.scrollDOM.clientWidth)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function Te(e,t,n,r){var i;let a=n.head,o=!1,s=1,c=e.state.vim;if(c&&(!c.insertMode||e.state.overwrite)){if(o=!0,c.visualBlock&&!r)return null;n.anchor<n.head&&(a<t.state.doc.length&&t.state.sliceDoc(a,a+1))!=`
38
38
  `&&a--,e.state.overwrite?s=.2:c.status&&(s=.5)}if(o){let e=a<t.state.doc.length&&t.state.sliceDoc(a,a+1);e&&/[\uDC00-\uDFFF]/.test(e)&&a>1&&(a--,e=t.state.sliceDoc(a,a+1));let n=t.coordsAtPos(a,1);if(!n)return null;let o=we(t),c=t.domAtPos(a),u=c?c.node:t.contentDOM;for(u instanceof Text&&c.offset>=u.data.length&&u.parentElement?.nextSibling&&(u=u.parentElement?.nextSibling,c={node:u,offset:0});c&&c.node instanceof HTMLElement;)u=c.node,c={node:c.node.childNodes[c.offset],offset:0};if(!(u instanceof HTMLElement)){if(!u.parentNode)return null;u=u.parentNode}let d=getComputedStyle(u),f=n.left,p=(i=t).coordsForChar?.call(i,a);if(p&&(f=p.left),!e||e==`
39
- `||e==`\r`)e=`\xA0`;else if(e==` `){e=`\xA0`;var l=t.coordsAtPos(a+1,-1);l&&(f=l.left-(l.left-n.left)/parseInt(d.tabSize))}else/[\uD800-\uDBFF]/.test(e)&&a<t.state.doc.length-1&&(e+=t.state.sliceDoc(a+1,a+2));let m=n.bottom-n.top;return new be((f-o.left)/t.scaleX,(n.top-o.top+m*(1-s))/t.scaleY,m*s/t.scaleY,d.fontFamily,d.fontSize,d.fontWeight,d.color,r?`cm-fat-cursor cm-cursor-primary`:`cm-fat-cursor cm-cursor-secondary`,e,s!=1)}return null}var z=typeof navigator<`u`&&/linux/i.test(navigator.platform)&&/ Gecko\/\d+/.exec(navigator.userAgent),B=te(F),V=s.baseTheme({".cm-vimMode .cm-cursorLayer:not(.cm-vimCursorLayer)":{display:`none`},".cm-vim-panel":{padding:`0px 10px`,fontFamily:`monospace`,minHeight:`1.3em`,display:`flex`},".cm-vim-panel input":{border:`none`,outline:`none`,backgroundColor:`inherit`},"&light .cm-searchMatch":{backgroundColor:`#ffff0054`},"&dark .cm-searchMatch":{backgroundColor:`#00ffff8a`}}),Ee=n.fromClass(class{constructor(e){this.status=``,this.query=null,this.decorations=r.none,this.waitForCopy=!1,this.lastKeydown=``,this.useNextTextInput=!1,this.compositionText=``,this.view=e;let t=this.cm=new F(e);B.enterVimMode(this.cm),this.view.cm=this.cm,this.cm.state.vimPlugin=this,this.blockCursor=new xe(e,t),this.updateClass(),this.cm.on(`vim-command-done`,()=>{t.state.vim&&(t.state.vim.status=``),this.blockCursor.scheduleRedraw(),this.updateStatus()}),this.cm.on(`vim-mode-change`,e=>{t.state.vim&&(t.state.vim.mode=e.mode,e.subMode&&(t.state.vim.mode+=` block`),t.state.vim.status=``,this.blockCursor.scheduleRedraw(),this.updateClass(),this.updateStatus())}),this.cm.on(`dialog`,()=>{this.cm.state.statusbar?this.updateStatus():e.dispatch({effects:ke.of(!!this.cm.state.dialog)})}),this.dom=document.createElement(`span`),this.spacer=document.createElement(`span`),this.spacer.style.flex=`1`,this.statusButton=document.createElement(`span`),this.statusButton.onclick=e=>{B.handleKey(this.cm,`<Esc>`,`user`),this.cm.focus()},this.statusButton.style.cssText=`cursor: pointer`}update(e){if((e.viewportChanged||e.docChanged)&&this.query&&this.highlight(this.query),e.docChanged&&this.cm.onChange(e),e.selectionSet&&this.cm.onSelectionChange(),e.viewportChanged,this.cm.curOp&&!this.cm.curOp.isVimOp&&this.cm.onBeforeEndOperation(),e.transactions){for(let t of e.transactions)for(let e of t.effects)if(e.is(O))if(!e.value?.forVim)this.highlight(null);else{let t=e.value.create();this.highlight(t)}}this.blockCursor.update(e)}updateClass(){let e=this.cm.state;!e.vim||e.vim.insertMode&&!e.overwrite?this.view.scrollDOM.classList.remove(`cm-vimMode`):this.view.scrollDOM.classList.add(`cm-vimMode`)}updateStatus(){let e=this.cm.state.statusbar,t=this.cm.state.vim;if(!e||!t)return;let n=this.cm.state.dialog;if(n)n.parentElement!=e&&(e.textContent=``,e.appendChild(n));else{e.textContent=``;var r=(t.mode||`normal`).toUpperCase();t.insertModeReturn&&(r+=`(C-O)`),this.statusButton.textContent=`--${r}--`,e.appendChild(this.statusButton),e.appendChild(this.spacer)}this.dom.textContent=t.status,e.appendChild(this.dom)}destroy(){B.leaveVimMode(this.cm),this.updateClass(),this.blockCursor.destroy(),delete this.view.cm}highlight(e){if(this.query=e,!e)return this.decorations=r.none;let{view:t}=this,n=new m;for(let r=0,i=t.visibleRanges,a=i.length;r<a;r++){let{from:o,to:s}=i[r];for(;r<a-1&&s>i[r+1].from-500;)s=i[++r].to;e.highlight(t.state,o,s,(e,t)=>{n.add(e,t,Oe)})}return this.decorations=n.finish()}handleKey(e,t){let n=this.cm,r=n.state.vim;if(!r)return;let i=B.vimKeyFromEvent(e,r);if(F.signal(this.cm,`inputEvent`,{type:`handleKey`,key:i}),!i)return;if(i==`<Esc>`&&!r.insertMode&&!r.visualMode&&this.query){let e=r.searchState_;e&&(n.removeOverlay(e.getOverlay()),e.setOverlay(null))}if(i===`<C-c>`&&!F.isMac&&n.somethingSelected())return this.waitForCopy=!0,!0;r.status=(r.status||``)+i;let a=B.multiSelectHandleKey(n,i,`user`);return r=B.maybeInitVimState_(n),!a&&r.insertMode&&n.state.overwrite&&(e.key&&e.key.length==1&&!/\n/.test(e.key)?(a=!0,n.overWriteSelection(e.key)):e.key==`Backspace`&&(a=!0,F.commands.cursorCharLeft(n))),a&&(F.signal(this.cm,`vim-keypress`,i),e.preventDefault(),e.stopPropagation(),this.blockCursor.scheduleRedraw()),this.updateStatus(),!!a}},{eventHandlers:{copy:function(e,t){this.waitForCopy&&(this.waitForCopy=!1,Promise.resolve().then(()=>{var e=this.cm,t=e.state.vim;t&&(t.insertMode?e.setSelection(e.getCursor(),e.getCursor()):e.operation(()=>{e.curOp&&(e.curOp.isVimOp=!0),B.handleKey(e,`<Esc>`,`user`)}))}))},compositionstart:function(e,t){this.useNextTextInput=!0,F.signal(this.cm,`inputEvent`,e)},compositionupdate:function(e,t){F.signal(this.cm,`inputEvent`,e)},compositionend:function(e,t){F.signal(this.cm,`inputEvent`,e)},keypress:function(e,t){F.signal(this.cm,`inputEvent`,e),this.lastKeydown==`Dead`&&this.handleKey(e,t)},keydown:function(e,t){F.signal(this.cm,`inputEvent`,e),this.lastKeydown=e.key,this.lastKeydown==`Unidentified`||this.lastKeydown==`Process`||this.lastKeydown==`Dead`?this.useNextTextInput=!0:(this.useNextTextInput=!1,this.handleKey(e,t))}},provide:()=>[s.inputHandler.of((e,t,n,r)=>{var i=K(e);if(!i)return!1;var a=i.state?.vim,o=i.state.vimPlugin;if(a&&!a.insertMode&&!i.curOp?.isVimOp){if(r===`\0\0`)return!0;if(F.signal(i,`inputEvent`,{type:`text`,text:r,from:t,to:n}),r.length==1&&o.useNextTextInput){if(a.expectLiteralNext&&e.composing)return o.compositionText=r,!1;if(o.compositionText){var s=o.compositionText;o.compositionText=``;var c=e.state.selection.main.head;if(s===e.state.sliceDoc(c-s.length,c)){var l=i.getCursor();i.replaceRange(``,i.posFromIndex(c-s.length),l)}}return o.handleKey({key:r,preventDefault:()=>{},stopPropagation:()=>{}}),De(e),!0}}return!1})],decorations:e=>e.decorations});function De(e){var t=e.scrollDOM.parentElement;if(t){if(z){e.contentDOM.textContent=`\0\0`,e.contentDOM.dispatchEvent(new CustomEvent(`compositionend`));return}var n=e.scrollDOM.nextSibling,r=window.getSelection(),i=r&&{anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset};e.scrollDOM.remove(),t.insertBefore(e.scrollDOM,n);try{i&&r&&(r.setPosition(i.anchorNode,i.anchorOffset),i.focusNode&&r.extend(i.focusNode,i.focusOffset))}catch(e){console.error(e)}e.focus(),e.contentDOM.dispatchEvent(new CustomEvent(`compositionend`))}}var Oe=r.mark({class:`cm-searchMatch`}),ke=f.define(),H=d.define({create:()=>!1,update(e,t){for(let n of t.effects)n.is(ke)&&(e=n.value);return e},provide:e=>h.from(e,e=>e?U:null)});function U(e){let t=document.createElement(`div`);t.className=`cm-vim-panel`;let n=e.cm;return n.state.dialog&&t.appendChild(n.state.dialog),{top:!1,dom:t}}function W(e){let t=document.createElement(`div`);t.className=`cm-vim-panel`;let n=e.cm;return n.state.statusbar=t,n.state.vimPlugin.updateStatus(),{dom:t}}function G(e={}){return[V,Ee,Ce,e.status?h.of(W):H]}function K(e){return e.cm||null}export{G as n,K as t};
39
+ `||e==`\r`)e=`\xA0`;else if(e==` `){e=`\xA0`;var l=t.coordsAtPos(a+1,-1);l&&(f=l.left-(l.left-n.left)/parseInt(d.tabSize))}else/[\uD800-\uDBFF]/.test(e)&&a<t.state.doc.length-1&&(e+=t.state.sliceDoc(a+1,a+2));let m=n.bottom-n.top;return new be((f-o.left)/t.scaleX,(n.top-o.top+m*(1-s))/t.scaleY,m*s/t.scaleY,d.fontFamily,d.fontSize,d.fontWeight,d.color,r?`cm-fat-cursor cm-cursor-primary`:`cm-fat-cursor cm-cursor-secondary`,e,s!=1)}return null}var z=typeof navigator<`u`&&/linux/i.test(navigator.platform)&&/ Gecko\/\d+/.exec(navigator.userAgent),B=te(F),V=r.baseTheme({".cm-vimMode .cm-cursorLayer:not(.cm-vimCursorLayer)":{display:`none`},".cm-vim-panel":{padding:`0px 10px`,fontFamily:`monospace`,minHeight:`1.3em`,display:`flex`},".cm-vim-panel input":{border:`none`,outline:`none`,backgroundColor:`inherit`},"&light .cm-searchMatch":{backgroundColor:`#ffff0054`},"&dark .cm-searchMatch":{backgroundColor:`#00ffff8a`}}),Ee=o.fromClass(class{constructor(e){this.status=``,this.query=null,this.decorations=n.none,this.waitForCopy=!1,this.lastKeydown=``,this.useNextTextInput=!1,this.compositionText=``,this.view=e;let t=this.cm=new F(e);B.enterVimMode(this.cm),this.view.cm=this.cm,this.cm.state.vimPlugin=this,this.blockCursor=new xe(e,t),this.updateClass(),this.cm.on(`vim-command-done`,()=>{t.state.vim&&(t.state.vim.status=``),this.blockCursor.scheduleRedraw(),this.updateStatus()}),this.cm.on(`vim-mode-change`,e=>{t.state.vim&&(t.state.vim.mode=e.mode,e.subMode&&(t.state.vim.mode+=` block`),t.state.vim.status=``,this.blockCursor.scheduleRedraw(),this.updateClass(),this.updateStatus())}),this.cm.on(`dialog`,()=>{this.cm.state.statusbar?this.updateStatus():e.dispatch({effects:ke.of(!!this.cm.state.dialog)})}),this.dom=document.createElement(`span`),this.spacer=document.createElement(`span`),this.spacer.style.flex=`1`,this.statusButton=document.createElement(`span`),this.statusButton.onclick=e=>{B.handleKey(this.cm,`<Esc>`,`user`),this.cm.focus()},this.statusButton.style.cssText=`cursor: pointer`}update(e){if((e.viewportChanged||e.docChanged)&&this.query&&this.highlight(this.query),e.docChanged&&this.cm.onChange(e),e.selectionSet&&this.cm.onSelectionChange(),e.viewportChanged,this.cm.curOp&&!this.cm.curOp.isVimOp&&this.cm.onBeforeEndOperation(),e.transactions){for(let t of e.transactions)for(let e of t.effects)if(e.is(O))if(!e.value?.forVim)this.highlight(null);else{let t=e.value.create();this.highlight(t)}}this.blockCursor.update(e)}updateClass(){let e=this.cm.state;!e.vim||e.vim.insertMode&&!e.overwrite?this.view.scrollDOM.classList.remove(`cm-vimMode`):this.view.scrollDOM.classList.add(`cm-vimMode`)}updateStatus(){let e=this.cm.state.statusbar,t=this.cm.state.vim;if(!e||!t)return;let n=this.cm.state.dialog;if(n)n.parentElement!=e&&(e.textContent=``,e.appendChild(n));else{e.textContent=``;var r=(t.mode||`normal`).toUpperCase();t.insertModeReturn&&(r+=`(C-O)`),this.statusButton.textContent=`--${r}--`,e.appendChild(this.statusButton),e.appendChild(this.spacer)}this.dom.textContent=t.status,e.appendChild(this.dom)}destroy(){B.leaveVimMode(this.cm),this.updateClass(),this.blockCursor.destroy(),delete this.view.cm}highlight(e){if(this.query=e,!e)return this.decorations=n.none;let{view:t}=this,r=new l;for(let n=0,i=t.visibleRanges,a=i.length;n<a;n++){let{from:o,to:s}=i[n];for(;n<a-1&&s>i[n+1].from-500;)s=i[++n].to;e.highlight(t.state,o,s,(e,t)=>{r.add(e,t,Oe)})}return this.decorations=r.finish()}handleKey(e,t){let n=this.cm,r=n.state.vim;if(!r)return;let i=B.vimKeyFromEvent(e,r);if(F.signal(this.cm,`inputEvent`,{type:`handleKey`,key:i}),!i)return;if(i==`<Esc>`&&!r.insertMode&&!r.visualMode&&this.query){let e=r.searchState_;e&&(n.removeOverlay(e.getOverlay()),e.setOverlay(null))}if(i===`<C-c>`&&!F.isMac&&n.somethingSelected())return this.waitForCopy=!0,!0;r.status=(r.status||``)+i;let a=B.multiSelectHandleKey(n,i,`user`);return r=B.maybeInitVimState_(n),!a&&r.insertMode&&n.state.overwrite&&(e.key&&e.key.length==1&&!/\n/.test(e.key)?(a=!0,n.overWriteSelection(e.key)):e.key==`Backspace`&&(a=!0,F.commands.cursorCharLeft(n))),a&&(F.signal(this.cm,`vim-keypress`,i),e.preventDefault(),e.stopPropagation(),this.blockCursor.scheduleRedraw()),this.updateStatus(),!!a}},{eventHandlers:{copy:function(e,t){this.waitForCopy&&(this.waitForCopy=!1,Promise.resolve().then(()=>{var e=this.cm,t=e.state.vim;t&&(t.insertMode?e.setSelection(e.getCursor(),e.getCursor()):e.operation(()=>{e.curOp&&(e.curOp.isVimOp=!0),B.handleKey(e,`<Esc>`,`user`)}))}))},compositionstart:function(e,t){this.useNextTextInput=!0,F.signal(this.cm,`inputEvent`,e)},compositionupdate:function(e,t){F.signal(this.cm,`inputEvent`,e)},compositionend:function(e,t){F.signal(this.cm,`inputEvent`,e)},keypress:function(e,t){F.signal(this.cm,`inputEvent`,e),this.lastKeydown==`Dead`&&this.handleKey(e,t)},keydown:function(e,t){F.signal(this.cm,`inputEvent`,e),this.lastKeydown=e.key,this.lastKeydown==`Unidentified`||this.lastKeydown==`Process`||this.lastKeydown==`Dead`?this.useNextTextInput=!0:(this.useNextTextInput=!1,this.handleKey(e,t))}},provide:()=>[r.inputHandler.of((e,t,n,r)=>{var i=K(e);if(!i)return!1;var a=i.state?.vim,o=i.state.vimPlugin;if(a&&!a.insertMode&&!i.curOp?.isVimOp){if(r===`\0\0`)return!0;if(F.signal(i,`inputEvent`,{type:`text`,text:r,from:t,to:n}),r.length==1&&o.useNextTextInput){if(a.expectLiteralNext&&e.composing)return o.compositionText=r,!1;if(o.compositionText){var s=o.compositionText;o.compositionText=``;var c=e.state.selection.main.head;if(s===e.state.sliceDoc(c-s.length,c)){var l=i.getCursor();i.replaceRange(``,i.posFromIndex(c-s.length),l)}}return o.handleKey({key:r,preventDefault:()=>{},stopPropagation:()=>{}}),De(e),!0}}return!1})],decorations:e=>e.decorations});function De(e){var t=e.scrollDOM.parentElement;if(t){if(z){e.contentDOM.textContent=`\0\0`,e.contentDOM.dispatchEvent(new CustomEvent(`compositionend`));return}var n=e.scrollDOM.nextSibling,r=window.getSelection(),i=r&&{anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset};e.scrollDOM.remove(),t.insertBefore(e.scrollDOM,n);try{i&&r&&(r.setPosition(i.anchorNode,i.anchorOffset),i.focusNode&&r.extend(i.focusNode,i.focusOffset))}catch(e){console.error(e)}e.focus(),e.contentDOM.dispatchEvent(new CustomEvent(`compositionend`))}}var Oe=n.mark({class:`cm-searchMatch`}),ke=u.define(),H=m.define({create:()=>!1,update(e,t){for(let n of t.effects)n.is(ke)&&(e=n.value);return e},provide:t=>e.from(t,e=>e?U:null)});function U(e){let t=document.createElement(`div`);t.className=`cm-vim-panel`;let n=e.cm;return n.state.dialog&&t.appendChild(n.state.dialog),{top:!1,dom:t}}function W(e){let t=document.createElement(`div`);t.className=`cm-vim-panel`;let n=e.cm;return n.state.statusbar=t,n.state.vimPlugin.updateStatus(),{dom:t}}function G(t={}){return[V,Ee,Ce,t.status?e.of(W):H]}function K(e){return e.cm||null}export{G as n,K as t};