@opentig/cli 0.1.5 → 0.1.7

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 (115) hide show
  1. package/dist/bin.mjs +1 -1
  2. package/dist/chunks/{cli-D_aggpu2.mjs → cli-DCPhUVBb.mjs} +1 -1
  3. package/dist/client/assets/App-CGiS2z40.js +74 -0
  4. package/dist/client/assets/CreatePullRequestDialog-dNbTTo9i.js +2 -0
  5. package/dist/client/assets/{DiffWorkspace-CeYQ0YtE.js → DiffWorkspace-XS025gbZ.js} +1 -1
  6. package/dist/client/assets/{EditableFileViewer-BhwE-QMO.js → EditableFileViewer-Cve4V9RS.js} +1 -1
  7. package/dist/client/assets/{File-C10_BxOu.js → File-BJuBDans.js} +1 -1
  8. package/dist/client/assets/{FilesView-BT4eHbFo.js → FilesView-BUAz46Qa.js} +1 -1
  9. package/dist/client/assets/GitHubAvatar-Depnd_JA.js +1 -0
  10. package/dist/client/assets/HistoryView-Dd4Kr4KN.js +1 -0
  11. package/dist/client/assets/{HtmlFileViewer-Cufzaec9.js → HtmlFileViewer-C3Qylr9B.js} +1 -1
  12. package/dist/client/assets/{IconEdit-RxH71_V-.js → IconEdit-BHqlqze_.js} +1 -1
  13. package/dist/client/assets/{IconFolderPlus-DSSB-ikf.js → IconFolderPlus-BJIo1hfe.js} +1 -1
  14. package/dist/client/assets/{ImageFileViewer-CFUkcXLH.js → ImageFileViewer-BJy0ptmR.js} +1 -1
  15. package/dist/client/assets/{LocalRefsDialog-B2jUCKTx.js → LocalRefsDialog-C1MWMkv1.js} +1 -1
  16. package/dist/client/assets/{MarkdownFileViewer-BLfJ-Vof.js → MarkdownFileViewer-pagMxv2y.js} +2 -2
  17. package/dist/client/assets/{PairingPage-C5Ggk-Z_.js → PairingPage-DOPAXy3a.js} +1 -1
  18. package/dist/client/assets/{PierreDiffViewer-DYj1ZThr.js → PierreDiffViewer-FmgbHdls.js} +1 -1
  19. package/dist/client/assets/PierreEditBoundary-mxtF7x3F.js +2 -0
  20. package/dist/client/assets/{PierreWorkerPool-7EVoquIB.js → PierreWorkerPool-B_NFnwU-.js} +9 -9
  21. package/dist/client/assets/{PullRequestDiff-DxLTcm6L.js → PullRequestDiff-Bcu8Gmrf.js} +1 -1
  22. package/dist/client/assets/PullRequestViewer-oeDoq-3g.js +2 -0
  23. package/dist/client/assets/PullRequestsView-DpTtagTX.js +1 -0
  24. package/dist/client/assets/{QuickOpenDialog-CasQU7pk.js → QuickOpenDialog-rjeV0l_J.js} +1 -1
  25. package/dist/client/assets/RepositoryProjectsDialog-QYXEt7Lg.js +1 -0
  26. package/dist/client/assets/SearchView-C-c6oCil.js +1 -0
  27. package/dist/client/assets/SettingsDialog-DHmWkKYV.js +9 -0
  28. package/dist/client/assets/Viewer-B6qUr83C.js +3 -0
  29. package/dist/client/assets/{abnfDiagram-N423BO3Z-DrlQwm7W.js → abnfDiagram-N423BO3Z-BxGW6tGd.js} +1 -1
  30. package/dist/client/assets/{arc-B9cXI-QL.js → arc-CphVLv_F.js} +1 -1
  31. package/dist/client/assets/{architectureDiagram-T3A2C74G-DZz7ZXbI.js → architectureDiagram-T3A2C74G-D9IDzZ6u.js} +1 -1
  32. package/dist/client/assets/base-ui-DT3JsyND.js +1 -0
  33. package/dist/client/assets/{blockDiagram-VBNYF7ZC-DZFMT63B.js → blockDiagram-VBNYF7ZC-CzCatff9.js} +1 -1
  34. package/dist/client/assets/{c4Diagram-5PPSVZJV-BnHIZMZp.js → c4Diagram-5PPSVZJV-jvC7ACDE.js} +1 -1
  35. package/dist/client/assets/channel-BGbncBYv.js +1 -0
  36. package/dist/client/assets/{checkbox-BpmQTxn7.js → checkbox-DDpujnre.js} +1 -1
  37. package/dist/client/assets/{chunk-2GRJ4B5K-CJOlpI9g.js → chunk-2GRJ4B5K-CNRn3w2y.js} +1 -1
  38. package/dist/client/assets/{chunk-2Q5K7J3B-DhsnoUrJ.js → chunk-2Q5K7J3B-CnTjXDS8.js} +1 -1
  39. package/dist/client/assets/{chunk-5RXB4S5H-Nwsk3OIu.js → chunk-5RXB4S5H-8QZZSU3J.js} +1 -1
  40. package/dist/client/assets/{chunk-5VM5RSS4-Dk9FYU9b.js → chunk-5VM5RSS4-B2MFN1L0.js} +1 -1
  41. package/dist/client/assets/{chunk-6Q2QTUOP-C8lX8T87.js → chunk-6Q2QTUOP-BRGuFKSr.js} +1 -1
  42. package/dist/client/assets/{chunk-GF5L2VYU-DWHvTG6c.js → chunk-GF5L2VYU-CWTKyD7U.js} +1 -1
  43. package/dist/client/assets/{chunk-JWPE2WC7-BLu2-FJl.js → chunk-JWPE2WC7-rGurufZY.js} +1 -1
  44. package/dist/client/assets/{chunk-KBJHAD2P-CEOb10I1.js → chunk-KBJHAD2P-DOwIHyo0.js} +1 -1
  45. package/dist/client/assets/{chunk-RYQCIY6F-BcdMrb_e.js → chunk-RYQCIY6F-qrVd0AV3.js} +1 -1
  46. package/dist/client/assets/{chunk-XXDRQBXY-CzPimvfs.js → chunk-XXDRQBXY-BGvaybJK.js} +1 -1
  47. package/dist/client/assets/classDiagram-JCYQIIEL-BoYriqPM.js +1 -0
  48. package/dist/client/assets/classDiagram-v2-OCEON4UE-BoYriqPM.js +1 -0
  49. package/dist/client/assets/{cose-bilkent-JH36ORCC-BYfzHUkR.js → cose-bilkent-JH36ORCC-CHgOt-vq.js} +1 -1
  50. package/dist/client/assets/{cynefin-VYW2F7L2-B4mEAleX.js → cynefin-VYW2F7L2-DX7Kb3Ft.js} +1 -1
  51. package/dist/client/assets/{cynefinDiagram-MW4NZA55-CioMvT6V.js → cynefinDiagram-MW4NZA55-B4MgYgbV.js} +1 -1
  52. package/dist/client/assets/{dagre-VZM6K2ZE-DWPgHi5i.js → dagre-VZM6K2ZE-xG9l95NU.js} +1 -1
  53. package/dist/client/assets/{diagram-7IWD3JNH-94i9EwB_.js → diagram-7IWD3JNH-BQKb8ivh.js} +1 -1
  54. package/dist/client/assets/{diagram-B4RE2ZJO-BRgMOgy8.js → diagram-B4RE2ZJO-CyIMrtDr.js} +1 -1
  55. package/dist/client/assets/{diagram-LBJQPF4R-DHaXTl1T.js → diagram-LBJQPF4R-WuCMu4WW.js} +1 -1
  56. package/dist/client/assets/{diagram-Q27KOJAE-DtLuyYm1.js → diagram-Q27KOJAE--Oi1nRrR.js} +1 -1
  57. package/dist/client/assets/{diagram-UB23O5K3-D8R3grCW.js → diagram-UB23O5K3-CP1DXsa_.js} +1 -1
  58. package/dist/client/assets/{ebnfDiagram-BXEA7PRR-voe5GU7W.js → ebnfDiagram-BXEA7PRR-C-7jJg9C.js} +1 -1
  59. package/dist/client/assets/{erDiagram-JOGREHBK-BShMJhmY.js → erDiagram-JOGREHBK-FSyqgO_9.js} +1 -1
  60. package/dist/client/assets/{flowDiagram-UKHOOZJN-DASXB2wV.js → flowDiagram-UKHOOZJN-y2e2HZHu.js} +1 -1
  61. package/dist/client/assets/{ganttDiagram-PKOTCBZU-Da1ElnJN.js → ganttDiagram-PKOTCBZU-kZ3m3wwW.js} +1 -1
  62. package/dist/client/assets/{gh-utils-D00lyruw.js → gh-utils-DxPHIkD8.js} +1 -1
  63. package/dist/client/assets/{gitGraphDiagram-DS77QQ5N-DoGRli0p.js → gitGraphDiagram-DS77QQ5N-3Z9e4WPi.js} +1 -1
  64. package/dist/client/assets/index-ChKJF4C_.js +47 -0
  65. package/dist/client/assets/index-WwGOu_aM.css +1 -0
  66. package/dist/client/assets/{infoDiagram-6WML65LV-CxkxF5pn.js → infoDiagram-6WML65LV-TfCo0Rhw.js} +1 -1
  67. package/dist/client/assets/{ishikawaDiagram-WSZJBQD7-l6dk2-PS.js → ishikawaDiagram-WSZJBQD7-DaXI89rw.js} +1 -1
  68. package/dist/client/assets/{journeyDiagram-NVQOT4AX-wJY4ZF5o.js → journeyDiagram-NVQOT4AX-C4jS6BVn.js} +1 -1
  69. package/dist/client/assets/{kanban-definition-27J2QSJJ-CIcwUmJo.js → kanban-definition-27J2QSJJ-bwOtQiC8.js} +1 -1
  70. package/dist/client/assets/{linear-Tf-dXwQ9.js → linear-DfZM9J6Z.js} +1 -1
  71. package/dist/client/assets/{mermaid.core-DnaJSnLe.js → mermaid.core-B-iLnCqi.js} +4 -4
  72. package/dist/client/assets/{mindmap-definition-FAOFIHXS-jFdJ2bLh.js → mindmap-definition-FAOFIHXS-DAdKdypB.js} +1 -1
  73. package/dist/client/assets/{pegDiagram-VL7TDLO6-vq0WE66k.js → pegDiagram-VL7TDLO6-Bl95_ELH.js} +1 -1
  74. package/dist/client/assets/{pieDiagram-7S7Q4E2Y-3edKDMpI.js → pieDiagram-7S7Q4E2Y-DXf4GTLI.js} +1 -1
  75. package/dist/client/assets/{quadrantDiagram-CIZ2JOQS-B6M8U4XV.js → quadrantDiagram-CIZ2JOQS-CDiwouFY.js} +1 -1
  76. package/dist/client/assets/{railroadDiagram-AXF67PYL-C-d5-0YS.js → railroadDiagram-AXF67PYL-CZAR7rja.js} +1 -1
  77. package/dist/client/assets/{render-markdown-GXIpf9CM.js → render-markdown-BiKX2Zdv.js} +1 -1
  78. package/dist/client/assets/{requirementDiagram-LRYGKXZP-FVzmEbFu.js → requirementDiagram-LRYGKXZP-BklWtcnl.js} +1 -1
  79. package/dist/client/assets/{sankeyDiagram-W5VNT64P-B-qcUamt.js → sankeyDiagram-W5VNT64P-CpD7cM5j.js} +1 -1
  80. package/dist/client/assets/{sequenceDiagram-SI44F4Z6-DgFXRLSt.js → sequenceDiagram-SI44F4Z6-BnHPNl9l.js} +1 -1
  81. package/dist/client/assets/{sizeCapture-X5ZJPWSS-CWi_pMb2.js → sizeCapture-X5ZJPWSS-D1eo0r-2.js} +1 -1
  82. package/dist/client/assets/{stateDiagram-OKZ733FA-amQwzlgU.js → stateDiagram-OKZ733FA-ClTacl-d.js} +1 -1
  83. package/dist/client/assets/stateDiagram-v2-UEYNNEHI-DAo7Tfh9.js +1 -0
  84. package/dist/client/assets/{swimlanes-SLNWSIFB-L88WlaUb.js → swimlanes-SLNWSIFB-_PLbkM5u.js} +2 -2
  85. package/dist/client/assets/swimlanesDiagram-ULZ7WXOC-DHeOpgR_.js +8 -0
  86. package/dist/client/assets/{tanstack-Bsd5UOY4.js → tanstack-CtfgE41X.js} +1 -1
  87. package/dist/client/assets/{timeline-definition-Z64GVDOM-D4TJxxc3.js → timeline-definition-Z64GVDOM-C9U6VikV.js} +1 -1
  88. package/dist/client/assets/{vennDiagram-T6HMQDX7-ClJWOyzQ.js → vennDiagram-T6HMQDX7-Desj7KFU.js} +1 -1
  89. package/dist/client/assets/{viewer-tabs-Cp_MC_J3.js → viewer-tabs-BwMhis6Q.js} +1 -1
  90. package/dist/client/assets/{wardleyDiagram-T6FBY63Y-Cxfjpd6V.js → wardleyDiagram-T6FBY63Y-rlMEd5tV.js} +1 -1
  91. package/dist/client/assets/{xychartDiagram-ELKLHX3M-BYqbTvmt.js → xychartDiagram-ELKLHX3M-CzFgA0NM.js} +1 -1
  92. package/dist/client/index.html +4 -4
  93. package/dist/dev.mjs +1 -1
  94. package/dist/manifest.json +1 -1
  95. package/dist/server.mjs +560 -215
  96. package/package.json +1 -1
  97. package/dist/client/assets/App-CeDVj5Hh.js +0 -118
  98. package/dist/client/assets/CreatePullRequestDialog-DMHY_u8X.js +0 -2
  99. package/dist/client/assets/GitHubAvatar-Ch_PaCv3.js +0 -1
  100. package/dist/client/assets/HistoryView-CivGwdxV.js +0 -1
  101. package/dist/client/assets/PierreEditBoundary-UfvbKDbd.js +0 -2
  102. package/dist/client/assets/PullRequestViewer-CyW39MuF.js +0 -2
  103. package/dist/client/assets/PullRequestsView-BHcnarLS.js +0 -1
  104. package/dist/client/assets/RepositoryProjectsDialog-VAiZrDlA.js +0 -1
  105. package/dist/client/assets/SearchView-Bv4bA4UJ.js +0 -1
  106. package/dist/client/assets/SettingsDialog-D33V9Fry.js +0 -9
  107. package/dist/client/assets/Viewer-I1lC_oJU.js +0 -3
  108. package/dist/client/assets/base-ui-D4MeJpa3.js +0 -1
  109. package/dist/client/assets/channel-CE-pdA-6.js +0 -1
  110. package/dist/client/assets/classDiagram-JCYQIIEL-2elbt6qi.js +0 -1
  111. package/dist/client/assets/classDiagram-v2-OCEON4UE-2elbt6qi.js +0 -1
  112. package/dist/client/assets/index-BdjG_WtS.js +0 -3
  113. package/dist/client/assets/index-Uku28hIV.css +0 -1
  114. package/dist/client/assets/stateDiagram-v2-UEYNNEHI-TdV8eIV2.js +0 -1
  115. package/dist/client/assets/swimlanesDiagram-ULZ7WXOC-AWimqvIC.js +0 -8
@@ -1,6 +1,6 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DA-rfuFy.js","assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/css-CLj8gQPS.js","assets/angular-ts-BrjP3tb8.js","assets/scss-D5BDwBP9.js","assets/apl-CORt7UWP.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-HNnZUWAn.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-2xfisSek.js","assets/html-derivative-DlHx6ybY.js","assets/sql-CRqJ_cUM.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nBiQ_Alo.js","assets/coffee-Ch7k5sss.js","assets/cpp-UfJy6YNI.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-DGywbUpC.js","assets/shellscript-Yzrsuije.js","assets/edge-FbVlp4U3.js","assets/elixir-CkH2-t6x.js","assets/elm-DbKCFpqz.js","assets/erb-Dm6A9KJ5.js","assets/ruby-DyJCeAvU.js","assets/haml-D5jkg6IW.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-ByusRIyA.js","assets/glimmer-ts-BfAWNZQY.js","assets/hack-DbPARsA_.js","assets/handlebars-BpdQsYii.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-f2NsQr07.js","assets/jison-wvAkD_A8.js","assets/julia-D7OTSIA_.js","assets/r-Dspwwk_N.js","assets/just-CUsbIsdP.js","assets/perl-B9cMNwum.js","assets/latex-CaSxy8MP.js","assets/tex-idrVyKtj.js","assets/liquid-C0sCDyMI.js","assets/marko-DjSrsDqO.js","assets/less-B1dDrJ26.js","assets/mdc-DTYItulj.js","assets/nextflow-C-mBbutL.js","assets/nextflow-groovy-vE_lwT2v.js","assets/nginx-BpAMiNFr.js","assets/nim-BIad80T-.js","assets/php-Csjmro_R.js","assets/pug-DKIMFp6K.js","assets/qml-3beO22l8.js","assets/razor-BjBPvh-w.js","assets/csharp-DSvCPggb.js","assets/rst-CpCqk9r5.js","assets/cmake-D1j8_8rp.js","assets/sas-DEy46yEz.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-8wufbnw4.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-DI20mbqo.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-Cy7k_4gC.js","assets/templ-DhtptRzy.js","assets/go-C27-OAKa.js","assets/ts-tags-D351s5mN.js","assets/twig-CW1WmMYd.js","assets/vue-D2xRrEX4.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-BoDAl6tE.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js","assets/one-light-CoLDteqg.js","assets/index-BgLrS_2D.js"])))=>i.map(i=>d[i]);
2
- import{D as ee,a as X,h as kt,k as fn,l as hn,e as mn,A as pn,B as gn,F as _n,G as gi,I as vn,J as bn,K as En,L as yn,v as it,x as pe,w as z,C as Ln,H as kn,c as Tn,d as In,U as Rn,M as Sn,N as _i,T as Pn,f as xn}from"./platform-BMNQ8V5r.js";import{a as An,b as wn,g as Dn,J as On,n as Cn,t as Vn,d as Nn,l as Mn}from"./one-light-CoLDteqg.js";import{g as Hn,r as K,j as q}from"./react-rd22PHbN.js";import{_ as o}from"./index-BdjG_WtS.js";import"./index-BgLrS_2D.js";import{t as zn}from"./index-CtEztN1P.js";import{A as Fn}from"./App-CeDVj5Hh.js";const ms={position:"absolute",top:0,bottom:0,textAlign:"center",whiteSpace:"normal",touchAction:"none"},ps={display:"contents"};function gs(){return null}function fe(e,t){return e-(t===0?0:1)}function te(e,t){return fe(e,t)+t}function Oe(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function Un(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}const nt=new Set;function he(e){const t=[],i=new Set;for(const u of Bn(e.themes)){const h=vi(u)?u.getThemes():[u];for(const m of h){if(i.has(m.name))throw new Error(`Theme collection already contains theme "${m.name}"`);i.add(m.name),t.push(m)}}const n=Object.freeze([...t]),r=Object.freeze(n.filter(u=>u.colorScheme==="light")),a=Object.freeze(n.filter(u=>u.colorScheme==="dark")),l=new Map(n.map(u=>[u.name,u])),d=Object.freeze(n.map(u=>u.name)),s=Object.freeze(r.map(u=>u.name)),f=Object.freeze(a.map(u=>u.name));function c(u){if(u==null)return n;const{colorScheme:h,collection:m}=u;return m==null?h==="light"?r:h==="dark"?a:n:n.filter(p=>p.collection!==m?!1:h==null||p.colorScheme===h)}return{getTheme(u){return l.get(u)},getThemes(u){return c(u)},getThemeNames(u){return u?.collection==null?u?.colorScheme==="light"?s:u?.colorScheme==="dark"?f:d:c(u).map(h=>h.name)},hasTheme(u){return l.has(u)},orderBy(u){return he({themes:n.map((h,m)=>({descriptor:h,index:m})).sort((h,m)=>{const p=u(h.descriptor,m.descriptor);return p!==0?p:h.index-m.index}).map(h=>h.descriptor)})},pick(u){const h=[],m=new Set;for(const p of u){if(m.has(p))throw new Error(`Theme collection pick already includes theme "${p}"`);m.add(p);const g=l.get(p);if(g==null)throw new Error(`Theme collection does not contain theme "${p}"`);h.push(g)}return he({themes:h})},registerInto(u){for(const h of n)u.registerThemeIfAbsent(h.name,h.load)}}}function Bn(e){return qn(e)?[e]:e}function qn(e){return vi(e)||Wn(e)}function Wn(e){return typeof e.name=="string"&&typeof e.load=="function"}function vi(e){return typeof e.getThemes=="function"}function bi(e){return e!==null&&typeof e=="object"&&"default"in e?e.default:e}var Ei=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name="DuplicateThemeError"}},$n=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name="UnregisteredThemeError"}},jn=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name="UnresolvedThemeError"}};function Gn(){const e=new Map,t=new Map,i=new Map;let n=0;function r(v,_){if(e.has(v))throw new Ei(v);e.set(v,_)}function a(v,_){return e.has(v)?!1:(e.set(v,_),!0)}function l(v){return e.has(v)}function d(v){const _=t.get(v);if(_!==void 0)return Promise.resolve(_);const b=i.get(v);if(b!==void 0)return b;const k=e.get(v);if(k===void 0)return Promise.reject(new $n(v));const R=n,E=k().then(T=>{const S=bi(T);return R===n&&t.set(v,S),i.get(v)===E&&i.delete(v),S}).catch(T=>{throw i.get(v)===E&&i.delete(v),T});return i.set(v,E),E}function s(v){return Promise.all(v.map(_=>d(_)))}function f(v,_){t.set(v,_)}function c(v){for(const[_,b]of v)f(_,b)}function u(v){return t.get(v)}function h(v){const _=[];for(const b of v){const k=t.get(b);if(k===void 0)throw new jn(b);_.push(k)}return _}function m(v){return t.has(v)}function p(v){for(const _ of v)if(!t.has(_))return!1;return!0}function g(v){const _=t.get(v);return _!==void 0?_:d(v)}function y(){n++,t.clear(),i.clear()}return{clearResolvedThemes:y,getResolvedOrResolveTheme:g,getResolvedTheme:u,getResolvedThemes:h,hasRegisteredTheme:l,hasResolvedTheme:m,hasResolvedThemes:p,registerTheme:r,registerThemeIfAbsent:a,resolveTheme:d,resolveThemes:s,seedResolvedTheme:f,seedResolvedThemes:c}}const U=Gn();function rt(e,t){e=Array.isArray(e)?e:[e];for(let i of e){let n;if(typeof i=="string"){if(n=U.getResolvedTheme(i),n==null)throw new Error(`loadResolvedThemes: ${i} is not resolved, you must resolve it before calling loadResolvedThemes`)}else n=i,i=i.name,U.getResolvedTheme(i)==null&&U.seedResolvedTheme(i,n);nt.has(i)||(nt.add(i),t.loadThemeSync(n))}}const ie=new Map,Fe=new Map,Kn=new Map,ot=new Set;function Tt(e,t){e=Array.isArray(e)?e:[e];for(const i of e){if(ot.has(i.name))continue;let n=ie.get(i.name);n==null&&(n=i,ie.set(i.name,n)),ot.add(n.name),t.loadLanguageSync(n.data)}}function yi(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}var at=Object.defineProperty,Qn=Object.getOwnPropertyDescriptor,Jn=Object.getOwnPropertyNames,Xn=Object.prototype.hasOwnProperty,ht=(e,t)=>{let i={};for(var n in e)at(i,n,{get:e[n],enumerable:!0});return at(i,Symbol.toStringTag,{value:"Module"}),i},Yn=(e,t,i,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(var r=Jn(t),a=0,l=r.length,d;a<l;a++)d=r[a],!Xn.call(e,d)&&d!==i&&at(e,d,{get:(s=>t[s]).bind(null,d),enumerable:!(n=Qn(t,d))||n.enumerable});return e},Li=(e,t,i)=>(Yn(e,t,"default"),i);const Ce=[{id:"abap",name:"ABAP",import:(()=>o(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>o(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>o(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>o(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>o(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>o(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>o(()=>import("./apex-Dqspr-GT.js"),[]))},{id:"apl",name:"APL",import:(()=>o(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>o(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>o(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>o(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>o(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>o(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>o(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>o(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>o(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>o(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>o(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>o(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>o(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>o(()=>import("./bird2-BIv1doCn.js"),[]))},{id:"blade",name:"Blade",import:(()=>o(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>o(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>o(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>o(()=>import("./c3-MRO5bC_T.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>o(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>o(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>o(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>o(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>o(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>o(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>o(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>o(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>o(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>o(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>o(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>o(()=>import("./cpp-UfJy6YNI.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>o(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>o(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>o(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>o(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>o(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>o(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>o(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>o(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>o(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>o(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>o(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>o(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>o(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>o(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>o(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>o(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>o(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>o(()=>import("./emacs-lisp-CXvaQtF9.js"),[]))},{id:"erb",name:"ERB",import:(()=>o(()=>import("./erb-Dm6A9KJ5.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>o(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>o(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>o(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>o(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>o(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>o(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>o(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>o(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>o(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>o(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>o(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>o(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>o(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>o(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>o(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>o(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>o(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>o(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>o(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>o(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>o(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>o(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>o(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>o(()=>import("./hack-DbPARsA_.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>o(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>o(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>o(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>o(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>o(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>o(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>o(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>o(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>o(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>o(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>o(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>o(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>o(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>o(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>o(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>o(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>o(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>o(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>o(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>o(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>o(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>o(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>o(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>o(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>o(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>o(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>o(()=>import("./julia-D7OTSIA_.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>o(()=>import("./just-CUsbIsdP.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>o(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>o(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>o(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>o(()=>import("./latex-CaSxy8MP.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>o(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>o(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>o(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>o(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>o(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>o(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>o(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>o(()=>import("./luau-KW6xsasC.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>o(()=>import("./makefile-DD9maIlR.js").then(e=>e.m),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>o(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>o(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>o(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>o(()=>import("./mdc-DTYItulj.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>o(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>o(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>o(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>o(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>o(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>o(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>o(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>o(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>o(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>o(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>o(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>o(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>o(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>o(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>o(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>o(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>o(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>o(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>o(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>o(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>o(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>o(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>o(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>o(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>o(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>o(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>o(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>o(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>o(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>o(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>o(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>o(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>o(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>o(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>o(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>o(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>o(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>o(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>o(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>o(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>o(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>o(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>o(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>o(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>o(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>o(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>o(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>o(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>o(()=>import("./rst-CpCqk9r5.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>o(()=>import("./ruby-DyJCeAvU.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>o(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>o(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>o(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>o(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>o(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>o(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>o(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>o(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>o(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>o(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>o(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>o(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>o(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>o(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>o(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>o(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>o(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>o(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>o(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>o(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>o(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>o(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>o(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>o(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>o(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>o(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>o(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>o(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>o(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>o(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>o(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>o(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>o(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>o(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>o(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>o(()=>import("./twig-CW1WmMYd.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>o(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>o(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>o(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>o(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>o(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>o(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>o(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>o(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>o(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>o(()=>import("./vue-D2xRrEX4.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>o(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>o(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>o(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>o(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>o(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>o(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>o(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>o(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>o(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>o(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>o(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>o(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>o(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>o(()=>import("./zig-VOosw3JB.js"),[]))}],mt=Object.fromEntries(Ce.map(e=>[e.id,e.import])),pt=Object.fromEntries(Ce.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),gt={...mt,...pt},_t=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>o(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>o(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>o(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>o(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>o(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>o(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>o(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>o(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>o(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>o(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>o(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>o(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>o(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>o(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>o(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>o(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>o(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>o(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>o(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>o(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>o(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>o(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>o(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>o(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>o(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>o(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>o(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>o(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>o(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>o(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>o(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>o(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>o(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>o(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>o(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>o(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>o(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>o(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>o(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>o(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>o(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>o(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>o(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>o(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>o(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>o(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>o(()=>import("./one-light-CoLDteqg.js").then(e=>e.o),__vite__mapDeps([101,102])))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>o(()=>import("./one-light-CoLDteqg.js").then(e=>e.e),__vite__mapDeps([101,102])))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>o(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>o(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>o(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>o(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>o(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>o(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>o(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>o(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>o(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>o(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>o(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>o(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>o(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>o(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>o(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>o(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>o(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],vt=Object.fromEntries(_t.map(e=>[e.id,e.import]));var bt=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Zn(){return 2147483648}function er(){return typeof performance<"u"?performance.now():Date.now()}const tr=(e,t)=>e+(t-e%t)%t;async function ir(e){let t,i;const n={};function r(m){i=m,n.HEAPU8=new Uint8Array(m),n.HEAPU32=new Uint32Array(m)}function a(m,p,g){n.HEAPU8.copyWithin(m,p,p+g)}function l(m){try{return t.grow(m-i.byteLength+65535>>>16),r(t.buffer),1}catch{}}function d(m){const p=n.HEAPU8.length;m=m>>>0;const g=Zn();if(m>g)return!1;for(let y=1;y<=4;y*=2){let v=p*(1+.2/y);v=Math.min(v,m+100663296);const _=Math.min(g,tr(Math.max(m,v),65536));if(l(_))return!0}return!1}const s=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function f(m,p,g=1024){const y=p+g;let v=p;for(;m[v]&&!(v>=y);)++v;if(v-p>16&&m.buffer&&s)return s.decode(m.subarray(p,v));let _="";for(;p<v;){let b=m[p++];if(!(b&128)){_+=String.fromCharCode(b);continue}const k=m[p++]&63;if((b&224)===192){_+=String.fromCharCode((b&31)<<6|k);continue}const R=m[p++]&63;if((b&240)===224?b=(b&15)<<12|k<<6|R:b=(b&7)<<18|k<<12|R<<6|m[p++]&63,b<65536)_+=String.fromCharCode(b);else{const E=b-65536;_+=String.fromCharCode(55296|E>>10,56320|E&1023)}}return _}function c(m,p){return m?f(n.HEAPU8,m,p):""}const u={emscripten_get_now:er,emscripten_memcpy_big:a,emscripten_resize_heap:d,fd_write:()=>0};async function h(){const p=await e({env:u,wasi_snapshot_preview1:u});t=p.memory,r(t.buffer),Object.assign(n,p),n.UTF8ToString=c}return await h(),n}var nr=Object.defineProperty,rr=(e,t,i)=>t in e?nr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,V=(e,t,i)=>rr(e,typeof t!="symbol"?t+"":t,i);let M=null;function or(e){throw new bt(e.UTF8ToString(e.getLastOnigError()))}class Ve{constructor(t){V(this,"utf16Length"),V(this,"utf8Length"),V(this,"utf16Value"),V(this,"utf8Value"),V(this,"utf16OffsetToUtf8"),V(this,"utf8OffsetToUtf16");const i=t.length,n=Ve._utf8ByteLength(t),r=n!==i,a=r?new Uint32Array(i+1):null;r&&(a[i]=n);const l=r?new Uint32Array(n+1):null;r&&(l[n]=i);const d=new Uint8Array(n);let s=0;for(let f=0;f<i;f++){const c=t.charCodeAt(f);let u=c,h=!1;if(c>=55296&&c<=56319&&f+1<i){const m=t.charCodeAt(f+1);m>=56320&&m<=57343&&(u=(c-55296<<10)+65536|m-56320,h=!0)}r&&(a[f]=s,h&&(a[f+1]=s),u<=127?l[s+0]=f:u<=2047?(l[s+0]=f,l[s+1]=f):u<=65535?(l[s+0]=f,l[s+1]=f,l[s+2]=f):(l[s+0]=f,l[s+1]=f,l[s+2]=f,l[s+3]=f)),u<=127?d[s++]=u:u<=2047?(d[s++]=192|(u&1984)>>>6,d[s++]=128|(u&63)>>>0):u<=65535?(d[s++]=224|(u&61440)>>>12,d[s++]=128|(u&4032)>>>6,d[s++]=128|(u&63)>>>0):(d[s++]=240|(u&1835008)>>>18,d[s++]=128|(u&258048)>>>12,d[s++]=128|(u&4032)>>>6,d[s++]=128|(u&63)>>>0),h&&f++}this.utf16Length=i,this.utf8Length=n,this.utf16Value=t,this.utf8Value=d,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=l}static _utf8ByteLength(t){let i=0;for(let n=0,r=t.length;n<r;n++){const a=t.charCodeAt(n);let l=a,d=!1;if(a>=55296&&a<=56319&&n+1<r){const s=t.charCodeAt(n+1);s>=56320&&s<=57343&&(l=(a-55296<<10)+65536|s-56320,d=!0)}l<=127?i+=1:l<=2047?i+=2:l<=65535?i+=3:i+=4,d&&n++}return i}createString(t){const i=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,i),i}}const Ne=class ${constructor(t){if(V(this,"id",++$.LAST_ID),V(this,"_onigBinding"),V(this,"content"),V(this,"utf16Length"),V(this,"utf8Length"),V(this,"utf16OffsetToUtf8"),V(this,"utf8OffsetToUtf16"),V(this,"ptr"),!M)throw new bt("Must invoke loadWasm first.");this._onigBinding=M,this.content=t;const i=new Ve(t);this.utf16Length=i.utf16Length,this.utf8Length=i.utf8Length,this.utf16OffsetToUtf8=i.utf16OffsetToUtf8,this.utf8OffsetToUtf16=i.utf8OffsetToUtf16,this.utf8Length<1e4&&!$._sharedPtrInUse?($._sharedPtr||($._sharedPtr=M.omalloc(1e4)),$._sharedPtrInUse=!0,M.HEAPU8.set(i.utf8Value,$._sharedPtr),this.ptr=$._sharedPtr):this.ptr=i.createString(M)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===$._sharedPtr?$._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};V(Ne,"LAST_ID",0);V(Ne,"_sharedPtr",0);V(Ne,"_sharedPtrInUse",!1);let ki=Ne;class ar{constructor(t){if(V(this,"_onigBinding"),V(this,"_ptr"),!M)throw new bt("Must invoke loadWasm first.");const i=[],n=[];for(let d=0,s=t.length;d<s;d++){const f=new Ve(t[d]);i[d]=f.createString(M),n[d]=f.utf8Length}const r=M.omalloc(4*t.length);M.HEAPU32.set(i,r/4);const a=M.omalloc(4*t.length);M.HEAPU32.set(n,a/4);const l=M.createOnigScanner(r,a,t.length);for(let d=0,s=t.length;d<s;d++)M.ofree(i[d]);M.ofree(a),M.ofree(r),l===0&&or(M),this._onigBinding=M,this._ptr=l}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,i,n){let r=0;if(typeof n=="number"&&(r=n),typeof t=="string"){t=new ki(t);const a=this._findNextMatchSync(t,i,!1,r);return t.dispose(),a}return this._findNextMatchSync(t,i,!1,r)}_findNextMatchSync(t,i,n,r){const a=this._onigBinding,l=a.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(i),r);if(l===0)return null;const d=a.HEAPU32;let s=l/4;const f=d[s++],c=d[s++],u=[];for(let h=0;h<c;h++){const m=t.convertUtf8OffsetToUtf16(d[s++]),p=t.convertUtf8OffsetToUtf16(d[s++]);u[h]={start:m,end:p,length:p-m}}return{index:f,captureIndices:u}}}function sr(e){return typeof e.instantiator=="function"}function lr(e){return typeof e.default=="function"}function dr(e){return typeof e.data<"u"}function cr(e){return typeof Response<"u"&&e instanceof Response}function ur(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let ge;function Et(e){if(ge)return ge;async function t(){M=await ir(async i=>{let n=e;return n=await n,typeof n=="function"&&(n=await n(i)),typeof n=="function"&&(n=await n(i)),sr(n)?n=await n.instantiator(i):lr(n)?n=await n.default(i):(dr(n)&&(n=n.data),cr(n)?typeof WebAssembly.instantiateStreaming=="function"?n=await fr(n)(i):n=await hr(n)(i):ur(n)?n=await Ue(n)(i):n instanceof WebAssembly.Module?n=await Ue(n)(i):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await Ue(n.default)(i))),"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}return ge=t(),ge}function Ue(e){return t=>WebAssembly.instantiate(e,t)}function fr(e){return t=>WebAssembly.instantiateStreaming(e,t)}function hr(e){return async t=>{const i=await e.arrayBuffer();return WebAssembly.instantiate(i,t)}}let Ti;function mr(e){Ti=e}function pr(){return Ti}async function yt(e){return e&&await Et(e),{createScanner(t){return new ar(t.map(i=>typeof i=="string"?i:i.source))},createString(t){return new ki(t)}}}const gr=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:yt,getDefaultWasmLoader:pr,loadWasm:Et,setDefaultWasmLoader:mr},Symbol.toStringTag,{value:"Module"}));var Ii=ht({});Li(Ii,gr);var _r=ht({bundledLanguages:()=>gt,bundledLanguagesAlias:()=>pt,bundledLanguagesBase:()=>mt,bundledLanguagesInfo:()=>Ce,bundledThemes:()=>vt,bundledThemesInfo:()=>_t,codeToHast:()=>Si,codeToHtml:()=>Ri,codeToTokens:()=>Pi,codeToTokensBase:()=>xi,codeToTokensWithThemes:()=>Ai,createHighlighter:()=>Me,getLastGrammarState:()=>Di,getSingletonHighlighter:()=>wi});const Me=An({langs:gt,themes:vt,engine:()=>(0,Ii.createOnigurumaEngine)(o(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:Ri,codeToHast:Si,codeToTokens:Pi,codeToTokensBase:xi,codeToTokensWithThemes:Ai,getSingletonHighlighter:wi,getLastGrammarState:Di}=wn(Me,{guessEmbeddedLanguages:Dn});function Oi(e,t){return zn(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function Ci(e={}){const t={target:"auto",cache:new Map,...e};return t.regexConstructor||=i=>Oi(i,{target:t.target}),{createScanner(i){return new On(i,t)},createString(i){return{content:i}}}}Li(ht({bundledLanguages:()=>gt,bundledLanguagesAlias:()=>pt,bundledLanguagesBase:()=>mt,bundledLanguagesInfo:()=>Ce,bundledThemes:()=>vt,bundledThemesInfo:()=>_t,codeToHast:()=>Si,codeToHtml:()=>Ri,codeToTokens:()=>Pi,codeToTokensBase:()=>xi,codeToTokensWithThemes:()=>Ai,createHighlighter:()=>Me,createJavaScriptRegexEngine:()=>Ci,createOnigurumaEngine:()=>yt,defaultJavaScriptRegexConstructor:()=>Oi,getLastGrammarState:()=>Di,getSingletonHighlighter:()=>wi,loadWasm:()=>Et}),_r);const _e=()=>o(()=>import("./javascript-wDzz0qaB.js"),[]),ve=()=>o(()=>import("./typescript-BPQ3VLAy.js"),[]),vr=()=>o(()=>import("./jsx-g9-lgVsj.js"),[]),br=()=>o(()=>import("./tsx-COt5Ahok.js"),[]),Er=()=>o(()=>import("./json-Cp-IABpG.js"),[]),yr=()=>o(()=>import("./jsonc-Des-eS-w.js"),[]),Lr=()=>o(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])),kr=()=>o(()=>import("./css-CLj8gQPS.js"),[]),Tr=()=>o(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])),Ir=()=>o(()=>import("./less-B1dDrJ26.js"),[]),It=()=>o(()=>import("./markdown-Cvjx9yec.js"),[]),Rr=()=>o(()=>import("./mdx-Cmh6b_Ma.js"),[]),Rt=()=>o(()=>import("./yaml-Buea-lGh.js"),[]),Sr=()=>o(()=>import("./toml-vGWfd6FD.js"),[]),Pr=()=>o(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])),xr=()=>o(()=>import("./sql-CRqJ_cUM.js"),[]),St=()=>o(()=>import("./python-B6aJPvgy.js"),[]),Ar=()=>o(()=>import("./go-C27-OAKa.js"),[]),Pt=()=>o(()=>import("./rust-B1yitclQ.js"),[]),wr=()=>o(()=>import("./java-CylS5w8V.js"),[]),Be=()=>o(()=>import("./kotlin-BdnUsdx6.js"),[]),Dr=()=>o(()=>import("./c-BIGW1oBm.js"),[]),xt=()=>o(()=>import("./cpp-UfJy6YNI.js"),__vite__mapDeps([23,24,25,26,16])),qe=()=>o(()=>import("./csharp-DSvCPggb.js"),[]),At=()=>o(()=>import("./ruby-DyJCeAvU.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])),Or=()=>o(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])),Cr=()=>o(()=>import("./swift-D82vCrfD.js"),[]),ae=()=>o(()=>import("./shellscript-Yzrsuije.js"),[]),We=()=>o(()=>import("./powershell-Dpen1YoG.js"),[]),wt=()=>o(()=>import("./docker-BcOcwvcX.js"),[]),Vr=()=>o(()=>import("./diff-D97Zzqfu.js"),[]),Nr=()=>o(()=>import("./vue-D2xRrEX4.js"),__vite__mapDeps([96,3,2,11,9,1,15])),Mr=()=>o(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([91,2,11,3,12])),Dt=()=>o(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])),Hr=()=>o(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])),zr=()=>o(()=>import("./r-Dspwwk_N.js"),[]),Fr=()=>o(()=>import("./dart-bE4Kk8sk.js"),[]),Ur=()=>o(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([30,1,2,3])),Ot=()=>o(()=>import("./haskell-Df6bDoY_.js"),[]),Br=()=>o(()=>import("./zig-VOosw3JB.js"),[]),qr=()=>o(()=>import("./nix-CwoSXNpI.js"),[]),Ct=()=>o(()=>import("./proto-C7zT0LnQ.js"),[]),be=()=>o(()=>import("./hcl-BWvSN4gD.js"),[]),Vt=()=>o(()=>import("./makefile-DD9maIlR.js").then(e=>e.a),[]),Nt=()=>o(()=>import("./ini-BEwlwnbL.js"),[]),Wr=()=>o(()=>import("./scala-C151Ov-r.js"),[]),$r=()=>o(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([64,1,2,3,7,8,16])),jr={javascript:_e,js:_e,cjs:_e,mjs:_e,typescript:ve,ts:ve,cts:ve,mts:ve,jsx:vr,tsx:br,json:Er,jsonc:yr,html:Lr,css:kr,scss:Tr,less:Ir,markdown:It,md:It,mdx:Rr,yaml:Rt,yml:Rt,toml:Sr,xml:Pr,sql:xr,python:St,py:St,go:Ar,rust:Pt,rs:Pt,java:wr,kotlin:Be,kt:Be,kts:Be,c:Dr,cpp:xt,"c++":xt,csharp:qe,cs:qe,"c#":qe,ruby:At,rb:At,php:Or,swift:Cr,shellscript:ae,bash:ae,sh:ae,shell:ae,zsh:ae,powershell:We,ps:We,ps1:We,docker:wt,dockerfile:wt,diff:Vr,vue:Nr,svelte:Mr,graphql:Dt,gql:Dt,lua:Hr,r:zr,dart:Fr,elixir:Ur,haskell:Ot,hs:Ot,zig:Br,nix:qr,proto:Ct,protobuf:Ct,hcl:be,terraform:be,tf:be,tfvars:be,makefile:Vt,make:Vt,ini:Nt,properties:Nt,scala:Wr,perl:$r};function Mt(e){return()=>Promise.resolve({default:[{name:e,scopeName:`source.${e}`,patterns:[]}]})}const Ht=new Proxy(jr,{get(e,t,i){return typeof t=="string"&&t in e?Reflect.get(e,t,i):typeof t=="string"?Mt(t):Reflect.get(e,t,i)},has(e,t){return typeof t=="string"},getOwnPropertyDescriptor(e,t){return typeof t!="string"?Object.getOwnPropertyDescriptor(e,t):{configurable:!0,enumerable:!0,value:t in e?e[t]:Mt(t)}}});async function Vi(e){if(yi())throw new Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const t=Fe.get(e);if(t!=null)return t;try{let i=Kn.get(e);if(i==null&&Object.prototype.hasOwnProperty.call(Ht,e)&&(i=Ht[e]),i==null)throw new Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);const n=i().then(({default:r})=>{const a={name:e,data:r};return ie.has(e)||ie.set(e,a),a});return Fe.set(e,n),await n}finally{Fe.delete(e)}}function Ni(e){return ie.get(e)??Vi(e)}function Lt({name:e,load:t,colorScheme:i,collection:n,displayName:r}){return{name:e,colorScheme:i,collection:n,displayName:r,load:Gr(t)}}function Gr(e){return async()=>Cn(bi(await e()))}const Kr="pierre",Qr=["pierre-dark","pierre-dark-soft","pierre-dark-vibrant","pierre-dark-protanopia-deuteranopia","pierre-dark-tritanopia"],Mi=["pierre-light","pierre-light-soft","pierre-light-vibrant","pierre-light-protanopia-deuteranopia","pierre-light-tritanopia"],Jr=[...Mi,...Qr],Xr=new Set(Mi);function Yr(e){return Xr.has(e)?"light":"dark"}const Zr={"pierre-dark":"Pierre Dark","pierre-dark-soft":"Pierre Dark Soft","pierre-dark-vibrant":"Pierre Dark Vibrant","pierre-dark-protanopia-deuteranopia":"Pierre Dark Protanopia & Deuteranopia","pierre-dark-tritanopia":"Pierre Dark Tritanopia","pierre-light":"Pierre Light","pierre-light-soft":"Pierre Light Soft","pierre-light-vibrant":"Pierre Light Vibrant","pierre-light-protanopia-deuteranopia":"Pierre Light Protanopia & Deuteranopia","pierre-light-tritanopia":"Pierre Light Tritanopia"},eo={"pierre-dark":()=>o(()=>import("./pierre-dark-CyvmCCZW.js"),[]),"pierre-dark-soft":()=>o(()=>import("./pierre-dark-soft-BHGpRqa4.js"),[]),"pierre-dark-vibrant":()=>o(()=>import("./pierre-dark-vibrant-BWBVywrn.js"),[]),"pierre-dark-protanopia-deuteranopia":()=>o(()=>import("./pierre-dark-protanopia-deuteranopia-Rgc0TwpF.js"),[]),"pierre-dark-tritanopia":()=>o(()=>import("./pierre-dark-tritanopia-Beq2gCRQ.js"),[]),"pierre-light":()=>o(()=>import("./pierre-light-480U9XYS.js"),[]),"pierre-light-soft":()=>o(()=>import("./pierre-light-soft-CVdyfjmI.js"),[]),"pierre-light-vibrant":()=>o(()=>import("./pierre-light-vibrant-DdTDNdfJ.js"),[]),"pierre-light-protanopia-deuteranopia":()=>o(()=>import("./pierre-light-protanopia-deuteranopia-CaVOBURG.js"),[]),"pierre-light-tritanopia":()=>o(()=>import("./pierre-light-tritanopia-B4_gpKOM.js"),[])};function to(e){return Lt({name:e,collection:Kr,colorScheme:Yr(e),displayName:Zr[e],load:eo[e]})}const Hi=he({themes:Jr.map(e=>to(e))}),io="shiki",zi=["ayu-light","catppuccin-latte","everforest-light","github-light","github-light-default","github-light-high-contrast","gruvbox-light-hard","gruvbox-light-medium","gruvbox-light-soft","horizon-bright","kanagawa-lotus","light-plus","material-theme-lighter","min-light","night-owl-light","one-light","rose-pine-dawn","slack-ochin","snazzy-light","solarized-light","vitesse-light"],no=["andromeeda","aurora-x","ayu-dark","ayu-mirage","catppuccin-frappe","catppuccin-macchiato","catppuccin-mocha","dark-plus","dracula","dracula-soft","everforest-dark","github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","gruvbox-dark-hard","gruvbox-dark-medium","gruvbox-dark-soft","horizon","houston","kanagawa-dragon","kanagawa-wave","laserwave","material-theme","material-theme-darker","material-theme-ocean","material-theme-palenight","min-dark","monokai","night-owl","nord","one-dark-pro","plastic","poimandres","red","rose-pine","rose-pine-moon","slack-dark","solarized-dark","synthwave-84","tokyo-night","vesper","vitesse-black","vitesse-dark"],ro=new Set(zi);function oo(e){return ro.has(e)?"light":"dark"}const ao={andromeeda:()=>o(()=>import("./andromeeda-C4gqWexZ.js"),[]),"aurora-x":()=>o(()=>import("./aurora-x-D-2ljcwZ.js"),[]),"ayu-dark":()=>o(()=>import("./ayu-dark-DYE7WIF3.js"),[]),"ayu-light":()=>o(()=>import("./ayu-light-BA47KaF1.js"),[]),"ayu-mirage":()=>o(()=>import("./ayu-mirage-32ctXXKs.js"),[]),"catppuccin-frappe":()=>o(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]),"catppuccin-latte":()=>o(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]),"catppuccin-macchiato":()=>o(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]),"catppuccin-mocha":()=>o(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]),"dark-plus":()=>o(()=>import("./dark-plus-C3mMm8J8.js"),[]),dracula:()=>o(()=>import("./dracula-BzJJZx-M.js"),[]),"dracula-soft":()=>o(()=>import("./dracula-soft-BXkSAIEj.js"),[]),"everforest-dark":()=>o(()=>import("./everforest-dark-BgDCqdQA.js"),[]),"everforest-light":()=>o(()=>import("./everforest-light-C8M2exoo.js"),[]),"github-dark":()=>o(()=>import("./github-dark-DHJKELXO.js"),[]),"github-dark-default":()=>o(()=>import("./github-dark-default-Cuk6v7N8.js"),[]),"github-dark-dimmed":()=>o(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]),"github-dark-high-contrast":()=>o(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]),"github-light":()=>o(()=>import("./github-light-DAi9KRSo.js"),[]),"github-light-default":()=>o(()=>import("./github-light-default-D7oLnXFd.js"),[]),"github-light-high-contrast":()=>o(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]),"gruvbox-dark-hard":()=>o(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]),"gruvbox-dark-medium":()=>o(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]),"gruvbox-dark-soft":()=>o(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]),"gruvbox-light-hard":()=>o(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]),"gruvbox-light-medium":()=>o(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]),"gruvbox-light-soft":()=>o(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]),horizon:()=>o(()=>import("./horizon-BUw7H-hv.js"),[]),"horizon-bright":()=>o(()=>import("./horizon-bright-CUuTKBJd.js"),[]),houston:()=>o(()=>import("./houston-DnULxvSX.js"),[]),"kanagawa-dragon":()=>o(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]),"kanagawa-lotus":()=>o(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]),"kanagawa-wave":()=>o(()=>import("./kanagawa-wave-DWedfzmr.js"),[]),laserwave:()=>o(()=>import("./laserwave-DUszq2jm.js"),[]),"light-plus":()=>o(()=>import("./light-plus-B7mTdjB0.js"),[]),"material-theme":()=>o(()=>import("./material-theme-D5KoaKCx.js"),[]),"material-theme-darker":()=>o(()=>import("./material-theme-darker-BfHTSMKl.js"),[]),"material-theme-lighter":()=>o(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]),"material-theme-ocean":()=>o(()=>import("./material-theme-ocean-CyktbL80.js"),[]),"material-theme-palenight":()=>o(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]),"min-dark":()=>o(()=>import("./min-dark-CafNBF8u.js"),[]),"min-light":()=>o(()=>import("./min-light-CTRr51gU.js"),[]),monokai:()=>o(()=>import("./monokai-D4h5O-jR.js"),[]),"night-owl":()=>o(()=>import("./night-owl-C39BiMTA.js"),[]),"night-owl-light":()=>o(()=>import("./night-owl-light-CMTm3GFP.js"),[]),nord:()=>o(()=>import("./nord-Ddv68eIx.js"),[]),"one-dark-pro":()=>o(()=>import("./one-light-CoLDteqg.js").then(e=>e.o),__vite__mapDeps([101,102])),"one-light":()=>o(()=>import("./one-light-CoLDteqg.js").then(e=>e.e),__vite__mapDeps([101,102])),plastic:()=>o(()=>import("./plastic-3e1v2bzS.js"),[]),poimandres:()=>o(()=>import("./poimandres-CS3Unz2-.js"),[]),red:()=>o(()=>import("./red-bN70gL4F.js"),[]),"rose-pine":()=>o(()=>import("./rose-pine-qdsjHGoJ.js"),[]),"rose-pine-dawn":()=>o(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]),"rose-pine-moon":()=>o(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]),"slack-dark":()=>o(()=>import("./slack-dark-BthQWCQV.js"),[]),"slack-ochin":()=>o(()=>import("./slack-ochin-DqwNpetd.js"),[]),"snazzy-light":()=>o(()=>import("./snazzy-light-Bw305WKR.js"),[]),"solarized-dark":()=>o(()=>import("./solarized-dark-DXbdFlpD.js"),[]),"solarized-light":()=>o(()=>import("./solarized-light-L9t79GZl.js"),[]),"synthwave-84":()=>o(()=>import("./synthwave-84-CbfX1IO0.js"),[]),"tokyo-night":()=>o(()=>import("./tokyo-night-hegEt444.js"),[]),vesper:()=>o(()=>import("./vesper-DRje8inN.js"),[]),"vitesse-black":()=>o(()=>import("./vitesse-black-Bkuqu6BP.js"),[]),"vitesse-dark":()=>o(()=>import("./vitesse-dark-D0r3Knsf.js"),[]),"vitesse-light":()=>o(()=>import("./vitesse-light-CVO1_9PV.js"),[])};function zt(e){return Lt({name:e,collection:io,colorScheme:oo(e),load:ao[e]})}const Fi=he({themes:Object.freeze([...zi.map(e=>zt(e)),...no.map(e=>zt(e))])});he({themes:[Hi,Fi]});function Ui(e){if(yi())throw new Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(U.hasRegisteredTheme(e))return;const t=Fi.getTheme(e);if(t!=null){U.registerThemeIfAbsent(t.name,t.load);return}throw new Error(`No valid theme loader registered for "${e}"`)}function Bi(e,t){if(t.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function so(e){Ui(e);const t=await U.resolveTheme(e);return Bi(e,t),t}function lo(e){return U.getResolvedTheme(e)??so(e)}let G;async function Ft({themes:e,langs:t,preferredHighlighter:i="shiki-js"}){G??=Me({themes:[],langs:["text"],engine:i==="shiki-wasm"?yt(o(()=>import("./wasm-CG6Dc4jp.js"),[])):Ci()});const n=co(G)?await G:G;G=n;const r=[];for(const l of t){if(l==="text"||l==="ansi")continue;const d=Ni(l);"then"in d?r.push(d):Tt(d,n)}const a=[];for(const l of e){const d=lo(l);"then"in d?a.push(d):rt(d,G)}return(r.length>0||a.length>0)&&await Promise.all([Promise.all(r).then(l=>{Tt(l,n)}),Promise.all(a).then(l=>{rt(l,n)})]),n}function _s(){if(G!=null&&!("then"in G))return G}function co(e=G){return e!=null&&"then"in e}for(const e of Hi.getThemes())U.registerThemeIfAbsent(e.name,e.load);function De(e=ee){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function Ut(e){return U.hasResolvedThemes(e)}function $e(e,t){return Oe(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}function Bt(e){return(e.lang??X(e.name))==="text"}function re(e){return{type:"text",value:e}}function A({tagName:e,children:t=[],properties:i={}}){return{type:"element",tagName:e,properties:i,children:t}}function st({name:e,width:t=16,height:i=16,properties:n}){return A({tagName:"svg",properties:{width:t,height:i,viewBox:"0 0 16 16",...n},children:[A({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function uo(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t;"children"in t?t=t.children[0]:t=null}}function vs(e){return A({tagName:"div",properties:{"data-gutter":""},children:e})}function bs(e,t,i,n={}){return A({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":i,...n},children:t!=null?[A({tagName:"span",properties:{"data-line-number-content":""},children:[re(`${t}`)]})]:void 0})}function Es(e,t,i){return A({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":i,"data-line-type":t==="annotation"?void 0:e,style:t==="annotation"?`grid-row: span ${i};`:`grid-row: span ${i};min-height:calc(${i} * 1lh);`}})}function fo(e,t,i){const n=typeof i.lineInfo=="function"?i.lineInfo(t):i.lineInfo[t-1];if(n==null){const r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:i}),new Error(r)}return e.tagName="div",e.properties["data-line"]=n.lineNumber,e.properties["data-alt-line"]=n.altLineNumber,e.properties["data-line-type"]=n.type,e.properties["data-line-index"]=n.lineIndex,e.children.length===0&&e.children.push(re(`
3
- `)),e}const Ee=Symbol("no-token"),je=Symbol("multiple-tokens");function qi(e){const t=ho(e);if(t!=null)return t;let i=Ee;const n=[];let r=[],a;const l=()=>{if(r.length===0||a==null){r=[],a=void 0;return}if(r.length===1){const s=r[0];if(s?.type==="element"){mo(s,a);for(const f of s.children)Ae(f)}else Ae(s);n.push(s),r=[],a=void 0;return}for(const s of r)Ae(s);n.push(A({tagName:"span",properties:{"data-char":a},children:r})),r=[],a=void 0},d=s=>{if(s!==Ee){if(s===je){i=je;return}if(i===Ee){i=s;return}i!==s&&(i=je)}};for(const s of e.children){const f=s.type==="element"?qi(s):Ee;if(d(f),typeof f!="number"){l(),n.push(s);continue}a!=null&&a!==f&&l(),a??=f,r.push(s)}return l(),e.children=n,i}function ho(e){const t=e.properties["data-char"];if(typeof t=="number")return t}function Ae(e){if(e.type==="element"){e.properties["data-char"]=void 0;for(const t of e.children)Ae(t)}}function mo(e,t){e.properties["data-char"]=t}function po(e={}){const{classPrefix:t="__shiki_",classSuffix:i="",classReplacer:n=d=>d}=e,r=new Map;function a(d){return Object.entries(d).map(([s,f])=>`${s}:${f}`).join(";")}function l(d){let s=t+go(typeof d=="string"?d:a(d))+i;return s=n(s),r.has(s)||r.set(s,typeof d=="string"?d:{...d}),s}return{name:"@shikijs/transformers:style-to-class",pre(d){if(!d.properties.style)return;const s=l(d.properties.style);delete d.properties.style,this.addClassToHast(d,s)},tokens(d){for(const s of d)for(const f of s){if(!f.htmlStyle)continue;const c=l(f.htmlStyle);f.htmlStyle={},f.htmlAttrs||={},f.htmlAttrs.class?f.htmlAttrs.class+=` ${c}`:f.htmlAttrs.class=c}},getClassRegistry(){return r},getCSS(){let d="";for(const[s,f]of r.entries())d+=`.${s}{${typeof f=="string"?f:a(f)}}`;return d},clearRegistry(){r.clear()}}}function go(e,t=0){let i=3735928559^t,n=1103547991^t;for(let r=0,a;r<e.length;r++)a=e.charCodeAt(r),i=Math.imul(i^a,2654435761),n=Math.imul(n^a,1597334677);return i=Math.imul(i^i>>>16,2246822507),i^=Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(i^i>>>13,3266489909),(4294967296*(2097151&n)+(i>>>0)).toString(36).slice(0,6)}function Wi(e=!1,t=!1){const i={lineInfo:[]},n=[{line(r){return delete r.properties.class,r},pre(r){const a=uo(r),l=[];if(a!=null){let d=1;for(const s of a.children)s.type==="element"&&(e&&qi(s),l.push(fo(s,d,i)),d++);a.children=l}return r},...e?{tokens(r){for(const a of r){let l=0;for(const d of a){const s=d;s.__lineChar??=l,l+=d.content.length}}},preprocess(r,a){a.mergeWhitespaces="never"},span(r,a,l,d,s){if(s?.offset!=null&&s.content!=null){const f=s.__lineChar;return f!=null&&(r.properties["data-char"]=f),r}return r}}:null}];return t&&n.push(_o,qt),e&&n.push({line:r=>(r.type==="element"&&r.children.length===0&&r.children.push({type:"element",tagName:"br",properties:{},children:[]}),r)}),{state:i,transformers:n,toClass:qt}}const qt=po({classPrefix:"hl-"}),_o={name:"token-style-normalizer",tokens(e){for(const t of e)for(const i of t){if(i.htmlStyle!=null)continue;const n={};i.color!=null&&(n.color=i.color),i.bgColor!=null&&(n["background-color"]=i.bgColor),i.fontStyle!=null&&i.fontStyle!==0&&((i.fontStyle&1)!==0&&(n["font-style"]="italic"),(i.fontStyle&2)!==0&&(n["font-weight"]="bold"),(i.fontStyle&4)!==0&&(n["text-decoration"]="underline")),Object.keys(n).length>0&&(i.htmlStyle=n)}}};function F(e){return`--${e==="token"?"diffs-token":"diffs"}-`}const Wt=new WeakMap;function Ge(e){const t=Wt.get(e);if(t!=null)return t;const i=e.colors??{},n={...i},r=i["editor.background"]??e.bg,a=i["editor.foreground"]??e.fg,l=i["sideBar.background"]??r,d=i["sideBar.foreground"]??a;W(n,"editor.background",r),W(n,"editor.foreground",a),W(n,"sideBar.background",l),W(n,"sideBar.foreground",d),W(n,"input.background",i["input.background"]??l),W(n,"sideBarSectionHeader.foreground",i["sideBarSectionHeader.foreground"]??d),W(n,"list.activeSelectionForeground",i["list.activeSelectionForeground"]??d),W(n,"gitDecoration.addedResourceForeground",Ke(i["gitDecoration.addedResourceForeground"],i["terminal.ansiGreen"],i["editorGutter.addedBackground"])),W(n,"gitDecoration.modifiedResourceForeground",Ke(i["gitDecoration.modifiedResourceForeground"],i["terminal.ansiBlue"],i["editorGutter.modifiedBackground"])),W(n,"gitDecoration.deletedResourceForeground",Ke(i["gitDecoration.deletedResourceForeground"],i["terminal.ansiRed"],i["editorGutter.deletedBackground"]));const s=(kt(i["list.focusOutline"])?void 0:i["list.focusOutline"])??(kt(i.focusBorder)?void 0:i.focusBorder);s!=null?n["list.focusOutline"]=s:delete n["list.focusOutline"];const f=i["list.hoverBackground"];f!=null&&(vo(f,l)||fn(f,l,d))&&delete n["list.hoverBackground"];const c=Object.freeze({...e,colors:Object.freeze(n)});return Wt.set(e,c),c}function W(e,t,i){i!=null&&i!==""&&(e[t]=i)}function Ke(...e){for(const t of e)if(t!=null&&t!=="")return t}function vo(e,t){return t!=null&&e.toLowerCase()===t.toLowerCase()}function $i({theme:e=ee,highlighter:t,prefix:i}){let n="";if(typeof e=="string"){const r=t.getTheme(e),a=Ge(r);n+=`color:${a.fg};`,n+=`background-color:${a.bg};`,n+=`${F("global")}fg:${a.fg};`,n+=`${F("global")}bg:${a.bg};`,n+=Qe(r,i)}else{let r=t.getTheme(e.dark),a=Ge(r);n+=`${F("global")}dark:${a.fg};`,n+=`${F("global")}dark-bg:${a.bg};`,n+=Qe(r,"dark"),r=t.getTheme(e.light),a=Ge(r),n+=`${F("global")}light:${a.fg};`,n+=`${F("global")}light-bg:${a.bg};`,n+=Qe(r,"light")}return n}function Qe(e,t){t=t!=null?`${t}-`:"";let i="";const n=e.colors?.["gitDecoration.addedResourceForeground"]??e.colors?.["terminal.ansiGreen"];n!=null&&(i+=`${F("global")}${t}addition-color:${n};`);const r=e.colors?.["gitDecoration.deletedResourceForeground"]??e.colors?.["terminal.ansiRed"];r!=null&&(i+=`${F("global")}${t}deletion-color:${r};`);const a=e.colors?.["gitDecoration.modifiedResourceForeground"]??e.colors?.["terminal.ansiBlue"];return a!=null&&(i+=`${F("global")}${t}modified-color:${a};`),i}function lt(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t.children;"children"in t?t=t.children[0]:t=null}throw console.error(e),new Error("getLineNodes: Unable to find children")}const bo={forcePlainText:!1};function Eo(e,t,{theme:i=ee,tokenizeMaxLineLength:n,useTokenTransformer:r},{forcePlainText:a,startingLine:l,totalLines:d,lines:s}=bo){a?(l??=0,d??=1/0):(l=0,d=1/0);const f=l>0||d<1/0,{state:c,transformers:u}=Wi(r),h=a?"text":e.lang??X(e.name),m=typeof i=="string"?t.getTheme(i).type:void 0,p=$i({theme:i,highlighter:t});c.lineInfo=_=>({type:"context",lineIndex:_-1+l,lineNumber:_+l});const g=typeof i=="string"?{lang:h,theme:i,transformers:u,defaultColor:!1,cssVariablePrefix:F("token"),tokenizeMaxLineLength:n,tokenizeTimeLimit:0}:{lang:h,themes:i,transformers:u,defaultColor:!1,cssVariablePrefix:F("token"),tokenizeMaxLineLength:n,tokenizeTimeLimit:0},y=lt(t.codeToHast(f?yo(s??hn(e.contents),l,d):e.contents,g)),v=f?new Array(l):y;return f&&v.push(...y),{code:v,themeStyles:p,baseThemeType:m}}function yo(e,t,i){if(e.length===0)return"";const n=Math.min(t+i,e.length);return e.slice(t,n).join("")}function Lo(e,t){return e===t||e?.cacheKey!=null&&e.cacheKey===t?.cacheKey}function ye(e,t){return Oe(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function $t(e){const t=e.lang??X(e.name),i=e.lang??(e.prevName!=null?X(e.prevName):"text");return t==="text"&&i==="text"}function oe(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}function ys(e){return{...mn,...e}}function Ls(e,t){const i=ko(e,t);return t?i:e.diffHeaderHeight+i}function ko(e,t){return e.paddingTop??(t?e.spacing:0)}function ks(e){return e.paddingBottom??e.spacing}function To(e){switch(e){case"simple":return 4;case"metadata":case"line-info":case"line-info-basic":case"custom":return 32}}function dt(e){return[fe(e.additionStart,e.additionCount)+1,te(e.additionStart,e.additionCount)+1]}function He({isPartial:e,rangeSize:t,expandedHunks:i,hunkIndex:n,collapsedContextThreshold:r}){const a=Math.max(t,0);if(a===0||e)return{fromStart:0,fromEnd:0,rangeSize:a,collapsedLines:a,renderAll:!1};if(i===!0||a<=r)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};const l=i?.get(n),d=Math.min(Math.max(l?.fromStart??0,0),a),s=Math.min(Math.max(l?.fromEnd??0,0),a),f=d+s,c=f>=a;return{fromStart:c?a:d,fromEnd:c?0:s,rangeSize:a,collapsedLines:Math.max(a-f,0),renderAll:c}}function Ts(e){const t=e.hunks[e.hunks.length-1];if(t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return!1;const i=e.additionLines.length-te(t.additionStart,t.additionCount),n=e.deletionLines.length-te(t.deletionStart,t.deletionCount);return i<=0&&n<=0?!1:i!==n}function Io({fileDiff:e,errorPrefix:t}){const i=e.hunks[e.hunks.length-1];if(i==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;const n=e.additionLines.length-te(i.additionStart,i.additionCount),r=e.deletionLines.length-te(i.deletionStart,i.deletionCount);if(n<=0&&r<=0)return 0;if(n!==r)throw new Error(`${t}: trailing context mismatch (additions=${n}, deletions=${r}) for ${e.name}`);return Math.min(n,r)}function ze({fileDiff:e,hunkIndex:t,expandedHunks:i,collapsedContextThreshold:n,errorPrefix:r}){if(t!==e.hunks.length-1)return;const a=Io({fileDiff:e,errorPrefix:r});if(a<=0)return;if(i===!0||a<=n)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};const l=i?.get(e.hunks.length),d=Math.min(Math.max(l?.fromStart??0,0),a);return{fromStart:d,fromEnd:0,rangeSize:a,collapsedLines:a-d,renderAll:d>=a}}function Is({fileDiff:e,lineNumber:t,expandedHunks:i,collapsedContextThreshold:n}){if(i===!0||e.isPartial)return!0;for(const[d,s]of e.hunks.entries()){const[f,c]=dt(s);if(t<f){const u=He({isPartial:e.isPartial,rangeSize:s.collapsedBefore,expandedHunks:i,hunkIndex:d,collapsedContextThreshold:n}),h=f-u.rangeSize;return u.renderAll||t<h+u.fromStart||t>=f-u.fromEnd}if(t<c)return!0}const r=ze({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:i,collapsedContextThreshold:n,errorPrefix:"isAdditionLineRenderable"});if(r==null||r.renderAll)return!0;const a=e.hunks[e.hunks.length-1],[,l]=dt(a);return t<l+r.fromStart||t>=l+r.rangeSize}function Rs({fileDiff:e,lineNumber:t,direction:i,expandedHunks:n,collapsedContextThreshold:r}){if(n===!0||e.isPartial)return t;const a=[];let l=1;for(const[s,f]of e.hunks.entries()){const[c,u]=dt(f),h=He({isPartial:e.isPartial,rangeSize:f.collapsedBefore,expandedHunks:n,hunkIndex:s,collapsedContextThreshold:r}),m=c-h.rangeSize;h.renderAll?a.push([m,c]):(h.fromStart>0&&a.push([m,m+h.fromStart]),h.fromEnd>0&&a.push([c-h.fromEnd,c])),a.push([c,u]),l=u}const d=ze({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:"getNearestRenderableAdditionLine"});if(d!=null){const s=l;l=s+d.rangeSize,d.renderAll?a.push([s,l]):d.fromStart>0&&a.push([s,s+d.fromStart])}if(t>=l)return t;if(i==="down"){for(const[s,f]of a)if(f>t)return Math.max(s,t);return}for(let s=a.length-1;s>=0;s--){const[f,c]=a[s];if(f<=t)return Math.min(c-1,t)}}function ji({type:e,metrics:t}){return t.hunkSeparatorHeight??To(e)}function Gi({type:e,metrics:t}){return e==="simple"||e==="metadata"||e==="line-info-basic"?0:t.spacing}function Ro({type:e,hunkIndex:t,hunkSpecs:i}){switch(e){case"simple":return t>0;case"metadata":return i!=null;case"line-info":case"line-info-basic":case"custom":return!0}}function So(e){return e!=="simple"&&e!=="metadata"}function Ss({type:e,metrics:t,hunkIndex:i,hunkSpecs:n}){if(!Ro({type:e,hunkIndex:i,hunkSpecs:n}))return;const r=ji({type:e,metrics:t}),a=Gi({type:e,metrics:t}),l=i>0?a:0,d=a;return{height:r,gapBefore:l,gapAfter:d,totalHeight:l+r+d}}function Ps({type:e,metrics:t}){if(!So(e))return;const i=ji({type:e,metrics:t}),n=Gi({type:e,metrics:t});return{height:i,gapBefore:n,gapAfter:0,totalHeight:n+i}}function Po({diff:e,diffStyle:t,startingLine:i=0,totalLines:n=1/0,expandedHunks:r,collapsedContextThreshold:a=1,callback:l}){const d=xo({diff:e,diffStyle:t,startingLine:i,expandedHunks:r,collapsedContextThreshold:a}),s={viewportStart:i,viewportEnd:i+n,isWindowedHighlight:i>0||n<1/0,splitCount:d.splitCount,unifiedCount:d.unifiedCount,finalHunkIndex:e.hunks.length-1,shouldBreak(){if(!s.isWindowedHighlight)return!1;const f=s.unifiedCount>=i+n,c=s.splitCount>=i+n;return t==="unified"?f:(t==="split"||f)&&c},shouldSkip(f,c){if(!s.isWindowedHighlight)return!1;const u=f>0&&s.unifiedCount+f<=i,h=c>0&&s.splitCount+c<=i;return t==="unified"?u:(t==="split"||u)&&h},incrementCounts(f,c){(t==="unified"||t==="both")&&(s.unifiedCount+=f),(t==="split"||t==="both")&&(s.splitCount+=c)},isInWindow(f,c){if(!s.isWindowedHighlight)return!0;const u=s.isInUnifiedWindow(f),h=s.isInSplitWindow(c);return t==="unified"?u:t==="split"?h:u||h},isInUnifiedWindow(f){return!s.isWindowedHighlight||s.unifiedCount>=i-f&&s.unifiedCount<i+n},isInSplitWindow(f){return!s.isWindowedHighlight||s.splitCount>=i-f&&s.splitCount<i+n},emit(f,c=!1){return c||(t==="unified"?s.incrementCounts(1,0):t==="split"?s.incrementCounts(0,1):s.incrementCounts(1,1)),l(f)??!1}};e:for(let f=d.hunkIndex;f<e.hunks.length;f++){let _=function(I,P){return y==null||y.collapsedLines<=0||y.fromStart+y.fromEnd>0?0:t==="unified"?I===c.unifiedLineStart+c.unifiedLineCount-1?y.collapsedLines:0:P===c.splitLineStart+c.splitLineCount-1?y.collapsedLines:0},k=function(){return b?0:(b=!0,g.collapsedLines)};const c=e.hunks[f];if(c==null)throw new Error("iterateOverDiff: invalid hunk index");if(s.shouldBreak())break;const u=fe(c.deletionStart,c.deletionCount),h=fe(c.additionStart,c.additionCount),m=!e.isPartial&&c.deletionCount===0?u:c.deletionLineIndex,p=!e.isPartial&&c.additionCount===0?h:c.additionLineIndex,g=He({isPartial:e.isPartial,rangeSize:c.collapsedBefore,expandedHunks:r,hunkIndex:f,collapsedContextThreshold:a}),y=f===s.finalHunkIndex?ze({fileDiff:e,hunkIndex:f,expandedHunks:r,collapsedContextThreshold:a,errorPrefix:"iterateOverDiff"}):void 0,v=g.fromStart+g.fromEnd;let b=g.collapsedLines===0;if(s.shouldSkip(v,v))s.incrementCounts(v,v),k();else{let I=c.unifiedLineStart-g.rangeSize,P=c.splitLineStart-g.rangeSize,N=m-g.rangeSize,H=p-g.rangeSize,w=u+1-g.rangeSize,B=h+1-g.rangeSize;if(Le(s,g.fromStart,t,O=>s.emit({hunkIndex:f,hunk:c,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:w+O,lineIndex:N+O,noEOFCR:!1,unifiedLineIndex:I+O,splitLineIndex:P+O},additionLine:{unifiedLineIndex:I+O,splitLineIndex:P+O,lineIndex:H+O,lineNumber:B+O,noEOFCR:!1}}))||(I=c.unifiedLineStart-g.fromEnd,P=c.splitLineStart-g.fromEnd,N=m-g.fromEnd,H=p-g.fromEnd,w=u+1-g.fromEnd,B=h+1-g.fromEnd,Le(s,g.fromEnd,t,O=>s.emit({hunkIndex:f,hunk:c,collapsedBefore:k(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:w+O,lineIndex:N+O,noEOFCR:!1,unifiedLineIndex:I+O,splitLineIndex:P+O},additionLine:{unifiedLineIndex:I+O,splitLineIndex:P+O,lineIndex:H+O,lineNumber:B+O,noEOFCR:!1}}),()=>{k()})))break e}let R=c.unifiedLineStart,E=c.splitLineStart,T=m,S=p,L=u+1,x=h+1;const D=c.hunkContent.at(-1);for(const I of c.hunkContent){if(s.shouldBreak())break e;const P=I===D;if(I.type==="context"){if(s.shouldSkip(I.lines,I.lines))s.incrementCounts(I.lines,I.lines),k();else if(Le(s,I.lines,t,N=>{const H=P&&N===I.lines-1,w=R+N,B=E+N;return s.emit({hunkIndex:f,hunk:c,collapsedBefore:k(),collapsedAfter:_(w,B),type:"context",deletionLine:{lineNumber:L+N,lineIndex:T+N,noEOFCR:H&&c.noEOFCRDeletions,unifiedLineIndex:w,splitLineIndex:B},additionLine:{unifiedLineIndex:w,splitLineIndex:B,lineIndex:S+N,lineNumber:x+N,noEOFCR:H&&c.noEOFCRAdditions}})},()=>{k()}))break e;R+=I.lines,E+=I.lines,T+=I.lines,S+=I.lines,L+=I.lines,x+=I.lines}else{const N=Math.max(I.deletions,I.additions),H=I.deletions+I.additions;if(!s.shouldSkip(H,N)){const w=Do(s,I,t);(w[0]?.[0]??0)>0&&k();for(const[B,O]of w)for(let Y=B;Y<O;Y++){const un=_(R+Y,t==="unified"?E+(Y<I.deletions?Y:Y-I.deletions):E+Y);if(s.emit(Oo({hunkIndex:f,hunk:c,collapsedBefore:k(),collapsedAfter:un,diffStyle:t,index:Y,unifiedLineIndex:R,splitLineIndex:E,additionLineIndex:S,deletionLineIndex:T,additionLineNumber:x,deletionLineNumber:L,content:I,isLastContent:P,unifiedCount:H,splitCount:N}),!0))break e}}k(),s.incrementCounts(H,N),R+=H,E+=N,T+=I.deletions,S+=I.additions,L+=I.deletions,x+=I.additions}}if(y!=null){const{collapsedLines:I,fromStart:P,fromEnd:N}=y,H=P+N;if(Le(s,H,t,w=>{const B=w===H-1;return s.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:B?I:0,type:"context-expanded",deletionLine:{lineNumber:L+w,lineIndex:T+w,noEOFCR:!1,unifiedLineIndex:R+w,splitLineIndex:E+w},additionLine:{unifiedLineIndex:R+w,splitLineIndex:E+w,lineIndex:S+w,lineNumber:x+w,noEOFCR:!1}})},void 0,()=>s.shouldBreak()))break e}}}function xo({diff:e,diffStyle:t,startingLine:i,expandedHunks:n,collapsedContextThreshold:r}){if(i<=0||t==="both")return{hunkIndex:0,splitCount:0,unifiedCount:0};const a=Ao({diff:e,expandedHunks:n,collapsedContextThreshold:r});let l=0,d=e.hunks.length-1,s=e.hunks.length;for(;l<=d;){const c=l+d>>1,u=a[c+1];if(u==null)throw new Error("iterateOverDiff: invalid hunk prefix index");(t==="unified"?u.unifiedCount:u.splitCount)>i?(s=c,d=c-1):l=c+1}if(s>=e.hunks.length){const c=a[e.hunks.length];if(c==null)throw new Error("iterateOverDiff: invalid terminal hunk prefix index");return{hunkIndex:e.hunks.length,splitCount:c.splitCount,unifiedCount:c.unifiedCount}}const f=a[s];if(f==null)throw new Error("iterateOverDiff: invalid selected hunk prefix index");return{hunkIndex:s,splitCount:f.splitCount,unifiedCount:f.unifiedCount}}function Ao({diff:e,expandedHunks:t,collapsedContextThreshold:i}){let n=0,r=0;const a=e.hunks.length-1,l=[{splitCount:0,unifiedCount:0}];for(let d=0;d<e.hunks.length;d++){const s=e.hunks[d];if(s==null)throw new Error("iterateOverDiff: invalid hunk summary index");const f=He({isPartial:e.isPartial,rangeSize:s.collapsedBefore,expandedHunks:t,hunkIndex:d,collapsedContextThreshold:i}),c=f.fromStart+f.fromEnd;n+=c+s.splitLineCount,r+=c+s.unifiedLineCount;const u=d===a?ze({fileDiff:e,hunkIndex:d,expandedHunks:t,collapsedContextThreshold:i,errorPrefix:"iterateOverDiff"}):void 0;if(u!=null){const h=u.fromStart+u.fromEnd;n+=h,r+=h}l.push({splitCount:n,unifiedCount:r})}return l}function wo(e,t,i){if(!e.isWindowedHighlight||t<=0)return[0,t];const n=[];function r(d){const s=Math.max(0,e.viewportStart-d),f=Math.min(t,e.viewportEnd-d);f>s&&n.push([s,f])}if(i!=="split"&&r(e.unifiedCount),i!=="unified"&&r(e.splitCount),n.length===0)return[0,0];let a=n[0][0],l=n[0][1];for(let d=1;d<n.length;d++){const s=n[d];a=Math.min(a,s[0]),l=Math.max(l,s[1])}return[a,l]}function Le(e,t,i,n,r,a){const[l,d]=wo(e,t,i);l>0&&(e.incrementCounts(l,l),r?.());let s=l;for(;s<t;){if(a?.()===!0)return!0;if(s>=d){e.incrementCounts(t-s,t-s);break}if(e.isInWindow(0,0)){if(n(s)===!0)return!0}else e.incrementCounts(1,1);s++}return!1}function Do(e,t,i){if(!e.isWindowedHighlight)return[[0,i==="unified"?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];const n=i!=="split",r=i!=="unified",a=i==="unified"?"unified":"split",l=[];function d(u,h){if(u+h<=e.viewportStart||u>=e.viewportEnd)return;const m=Math.max(0,e.viewportStart-u),p=Math.min(h,e.viewportEnd-u);return p>m?[m,p]:void 0}function s(u,h){return a==="split"?u:h==="additions"?[u[0]+t.deletions,u[1]+t.deletions]:u}function f(u,h){if(u==null)return;const[m,p]=s(u,h);p>m&&l.push([m,p])}if(n&&(f(d(e.unifiedCount,t.deletions),"deletions"),f(d(e.unifiedCount+t.deletions,t.additions),"additions")),r&&(f(d(e.splitCount,t.deletions),"deletions"),f(d(e.splitCount,t.additions),"additions")),l.length===0)return l;l.sort((u,h)=>u[0]-h[0]);const c=[l[0]];for(const[u,h]of l.slice(1)){const m=c[c.length-1];u<=m[1]?m[1]=Math.max(m[1],h):c.push([u,h])}return c}function Oo({hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:n,diffStyle:r,index:a,unifiedLineIndex:l,splitLineIndex:d,additionLineIndex:s,deletionLineIndex:f,additionLineNumber:c,deletionLineNumber:u,content:h,isLastContent:m,unifiedCount:p,splitCount:g}){const y=a<h.deletions?l+a:void 0,v=r==="unified"?a>=h.deletions?l+a:void 0:a<h.additions?l+h.deletions+a:void 0,_=r==="unified"?d+(a<h.deletions?a:a-h.deletions):d+a,b=a<h.deletions?f+a:void 0,k=a<h.deletions?u+a:void 0,R=r==="unified"?a>=h.deletions?s+(a-h.deletions):void 0:a<h.additions?s+a:void 0,E=r==="unified"?a>=h.deletions?c+(a-h.deletions):void 0:a<h.additions?c+a:void 0,T=r==="unified"?m&&a===h.deletions-1&&t.noEOFCRDeletions:m&&a===g-1&&t.noEOFCRDeletions,S=r==="unified"?m&&a===p-1&&t.noEOFCRAdditions:m&&a===g-1&&t.noEOFCRAdditions,L=b!=null&&k!=null&&y!=null?{lineNumber:k,lineIndex:b,noEOFCR:T,unifiedLineIndex:y,splitLineIndex:_}:void 0,x=R!=null&&E!=null&&v!=null?{unifiedLineIndex:v,splitLineIndex:_,lineIndex:R,lineNumber:E,noEOFCR:S}:void 0;if(L==null&&x!=null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:n,deletionLine:void 0,additionLine:x};if(L!=null&&x==null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:n,deletionLine:L,additionLine:void 0};if(L==null||x==null)throw new Error("iterateOverDiff: missing change line data");return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:n,deletionLine:L,additionLine:x}}class Ki{diff(t,i,n={}){let r;typeof n=="function"?(r=n,n={}):"callback"in n&&(r=n.callback);const a=this.castInput(t,n),l=this.castInput(i,n),d=this.removeEmpty(this.tokenize(a,n)),s=this.removeEmpty(this.tokenize(l,n));return this.diffWithOptionsObj(d,s,n,r)}diffWithOptionsObj(t,i,n,r){var a;const l=_=>{if(_=this.postProcess(_,n),r){setTimeout(function(){r(_)},0);return}else return _},d=i.length,s=t.length;let f=1,c=d+s;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));const u=(a=n.timeout)!==null&&a!==void 0?a:1/0,h=Date.now()+u,m=[{oldPos:-1,lastComponent:void 0}];let p=this.extractCommon(m[0],i,t,0,n);if(m[0].oldPos+1>=s&&p+1>=d)return l(this.buildValues(m[0].lastComponent,i,t));let g=-1/0,y=1/0;const v=()=>{for(let _=Math.max(g,-f);_<=Math.min(y,f);_+=2){let b;const k=m[_-1],R=m[_+1];k&&(m[_-1]=void 0);let E=!1;if(R){const S=R.oldPos-_;E=R&&0<=S&&S<d}const T=k&&k.oldPos+1<s;if(!E&&!T){m[_]=void 0;continue}if(!T||E&&k.oldPos<R.oldPos?b=this.addToPath(R,!0,!1,0,n):b=this.addToPath(k,!1,!0,1,n),p=this.extractCommon(b,i,t,_,n),b.oldPos+1>=s&&p+1>=d)return l(this.buildValues(b.lastComponent,i,t))||!0;m[_]=b,b.oldPos+1>=s&&(y=Math.min(y,_-1)),p+1>=d&&(g=Math.max(g,_+1))}f++};if(r)(function _(){setTimeout(function(){if(f>c||Date.now()>h)return r(void 0);v()||_()},0)})();else for(;f<=c&&Date.now()<=h;){const _=v();if(_)return _}}addToPath(t,i,n,r,a){const l=t.lastComponent;return l&&!a.oneChangePerToken&&l.added===i&&l.removed===n?{oldPos:t.oldPos+r,lastComponent:{count:l.count+1,added:i,removed:n,previousComponent:l.previousComponent}}:{oldPos:t.oldPos+r,lastComponent:{count:1,added:i,removed:n,previousComponent:l}}}extractCommon(t,i,n,r,a){const l=i.length,d=n.length;let s=t.oldPos,f=s-r,c=0;for(;f+1<l&&s+1<d&&this.equals(n[s+1],i[f+1],a);)f++,s++,c++,a.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return c&&!a.oneChangePerToken&&(t.lastComponent={count:c,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=s,f}equals(t,i,n){return n.comparator?n.comparator(t,i):t===i||!!n.ignoreCase&&t.toLowerCase()===i.toLowerCase()}removeEmpty(t){const i=[];for(let n=0;n<t.length;n++)t[n]&&i.push(t[n]);return i}castInput(t,i){return t}tokenize(t,i){return Array.from(t)}join(t){return t.join("")}postProcess(t,i){return t}get useLongestToken(){return!1}buildValues(t,i,n){const r=[];let a;for(;t;)r.push(t),a=t.previousComponent,delete t.previousComponent,t=a;r.reverse();const l=r.length;let d=0,s=0,f=0;for(;d<l;d++){const c=r[d];if(c.removed)c.value=this.join(n.slice(f,f+c.count)),f+=c.count;else{if(!c.added&&this.useLongestToken){let u=i.slice(s,s+c.count);u=u.map(function(h,m){const p=n[f+m];return p.length>h.length?p:h}),c.value=this.join(u)}else c.value=this.join(i.slice(s,s+c.count));s+=c.count,c.added||(f+=c.count)}}return r}}class Co extends Ki{}const Vo=new Co;function No(e,t,i){return Vo.diff(e,t,i)}const jt="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";class Mo extends Ki{tokenize(t){const i=new RegExp(`(\\r?\\n)|[${jt}]+|[^\\S\\n\\r]+|[^${jt}]`,"ug");return t.match(i)||[]}}const Ho=new Mo;function zo(e,t,i){return Ho.diff(e,t,i)}function Gt({line:e,spanStart:t,spanLength:i}){return{start:{line:e,character:t},end:{line:e,character:t+i},properties:{"data-diff-span":""},alwaysWrap:!0}}function ke({item:e,arr:t,enableJoin:i,isNeutral:n=!1,isLastItem:r=!1}){const a=t[t.length-1];if(a==null||r||!i){t.push([n?0:1,e.value]);return}const l=a[0]===0;if(n===l||n&&e.value.length===1&&!l){a[1]+=e.value;return}t.push([n?0:1,e.value])}const Fo={forcePlainText:!1};function Uo(e,t,i,{forcePlainText:n,startingLine:r,totalLines:a,expandedHunks:l,collapsedContextThreshold:d=1}=Fo){n?(r??=0,a??=1/0):(r=0,a=1/0);const s=r>0||a<1/0,f=typeof i.theme=="string"?t.getTheme(i.theme).type:void 0,c=$i({theme:i.theme,highlighter:t}),u=n&&!s&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?"none":i.lineDiffType,h={deletionLines:[],additionLines:[]},{maxLineDiffLength:m}=i,p=!n&&!e.isPartial,g=n?l:void 0,y=new Map;function v(b){const k=p?0:b,R=y.get(k)??qo();return y.set(k,R),R}function _(b,k,R,E){if(s){let T=R.at(-1);(T==null||T.targetIndex+T.count!==k)&&(T={targetIndex:k,originalOffset:E.length,count:0},R.push(T)),T.count++}E.push(b)}Po({diff:e,diffStyle:"both",startingLine:r,totalLines:a,expandedHunks:s?g:!0,collapsedContextThreshold:d,callback:({hunkIndex:b,additionLine:k,deletionLine:R,type:E})=>{const T=v(b),S=k!=null?k.splitLineIndex:R.splitLineIndex;E==="change"&&k!=null&&R!=null&&Bo({additionLine:e.additionLines[k.lineIndex],deletionLine:e.deletionLines[R.lineIndex],deletionLineIndex:T.deletionContent.length,additionLineIndex:T.additionContent.length,deletionDecorations:T.deletionDecorations,additionDecorations:T.additionDecorations,lineDiffType:u,maxLineDiffLength:m}),R!=null&&(_(e.deletionLines[R.lineIndex],R.lineIndex,T.deletionSegments,T.deletionContent),T.deletionInfo.push({type:E==="change"?"change-deletion":E,lineNumber:R.lineNumber,altLineNumber:E==="change"?void 0:k.lineNumber??void 0,lineIndex:`${R.unifiedLineIndex},${S}`})),k!=null&&(_(e.additionLines[k.lineIndex],k.lineIndex,T.additionSegments,T.additionContent),T.additionInfo.push({type:E==="change"?"change-addition":E,lineNumber:k.lineNumber,altLineNumber:E==="change"?void 0:R.lineNumber??void 0,lineIndex:`${k.unifiedLineIndex},${S}`}))}});for(const b of y.values()){if(b.deletionContent.length===0&&b.additionContent.length===0)continue;const k={name:e.prevName??e.name,contents:b.deletionContent.value},R={name:e.name,contents:b.additionContent.value},{deletionLines:E,additionLines:T}=Wo({deletionFile:k,deletionInfo:b.deletionInfo,deletionDecorations:b.deletionDecorations,additionFile:R,additionInfo:b.additionInfo,additionDecorations:b.additionDecorations,highlighter:t,options:i,languageOverride:n?"text":e.lang});if(p){h.deletionLines=E,h.additionLines=T;continue}if(b.deletionSegments.length>0)for(const S of b.deletionSegments)for(let L=0;L<S.count;L++)h.deletionLines[S.targetIndex+L]=E[S.originalOffset+L];else h.deletionLines.push(...E);if(b.additionSegments.length>0)for(const S of b.additionSegments)for(let L=0;L<S.count;L++)h.additionLines[S.targetIndex+L]=T[S.originalOffset+L];else h.additionLines.push(...T)}return{code:h,themeStyles:c,baseThemeType:f}}function Bo({deletionLine:e,additionLine:t,deletionLineIndex:i,additionLineIndex:n,deletionDecorations:r,additionDecorations:a,lineDiffType:l,maxLineDiffLength:d}){if(e==null||t==null||l==="none"||(e=oe(e),t=oe(t),e.length>d||t.length>d))return;const s=l==="char"?No(e,t):zo(e,t),f=[],c=[],u=l==="word-alt",h=s.at(-1);for(const p of s){const g=p===h;!p.added&&!p.removed?(ke({item:p,arr:f,enableJoin:u,isNeutral:!0,isLastItem:g}),ke({item:p,arr:c,enableJoin:u,isNeutral:!0,isLastItem:g})):p.removed?ke({item:p,arr:f,enableJoin:u,isLastItem:g}):ke({item:p,arr:c,enableJoin:u,isLastItem:g})}let m=0;for(const p of f)p[0]===1&&r.push(Gt({line:i,spanStart:m,spanLength:p[1].length})),m+=p[1].length;m=0;for(const p of c)p[0]===1&&a.push(Gt({line:n,spanStart:m,spanLength:p[1].length})),m+=p[1].length}function qo(){return{deletionContent:{push(e){this.value+=e,this.length++},value:"",length:0},additionContent:{push(e){this.value+=e,this.length++},value:"",length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function Wo({deletionFile:e,additionFile:t,deletionInfo:i,additionInfo:n,highlighter:r,deletionDecorations:a,additionDecorations:l,languageOverride:d,options:{theme:s=ee,...f}}){const c=d??X(e.name),u=d??X(t.name),{state:h,transformers:m}=Wi(f.useTokenTransformer),p=typeof s=="string"?{...f,lang:"text",theme:s,transformers:m,decorations:void 0,defaultColor:!1,cssVariablePrefix:F("token"),tokenizeTimeLimit:0}:{...f,lang:"text",themes:s,transformers:m,decorations:void 0,defaultColor:!1,cssVariablePrefix:F("token"),tokenizeTimeLimit:0};return{deletionLines:e.contents===""?[]:(p.lang=c,h.lineInfo=i,p.decorations=a,lt(r.codeToHast(oe(e.contents),p))),additionLines:t.contents===""?[]:(p.lang=u,p.decorations=l,h.lineInfo=n,lt(r.codeToHast(oe(t.contents),p)))}}function Kt(e){const t=[];for(const i of e){const n=ie.get(i);if(n==null)throw new Error(`getResolvedLanguages: ${i} is not resolved. Please resolve languages before calling getResolvedLanguages`);t.push(n)}return t}function Qt(e){for(const t of Array.isArray(e)?e:[e])if(!ie.has(t))return!1;return!0}async function Jt(e){const t=[],i=[];for(const n of e){if(n==="text"||n==="ansi")continue;const r=Ni(n)??Vi(n);"then"in r?i.push(r):t.push(r)}return i.length>0&&await Promise.all(i).then(n=>{for(const r of n){if(r==null)throw new Error("resolvedLanguages: unable to resolve language");t.push(r)}}),t}function Xt(e){return U.getResolvedThemes(e)}async function Yt(e){for(const i of e)Ui(i);const t=await U.resolveThemes(e);for(let i=0;i<e.length;i++)Bi(e[i],t[i]);return t}var de={exports:{}},$o=de.exports,Zt;function jo(){return Zt||(Zt=1,(function(e,t){(function(i,n){n(t)})($o,function(i){const n=Symbol("newer"),r=Symbol("older");class a{constructor(u,h){typeof u!="number"&&(h=u,u=0),this.size=0,this.limit=u,this.oldest=this.newest=void 0,this._keymap=new Map,h&&(this.assign(h),u<1&&(this.limit=this.size))}_markEntryAsUsed(u){u!==this.newest&&(u[n]&&(u===this.oldest&&(this.oldest=u[n]),u[n][r]=u[r]),u[r]&&(u[r][n]=u[n]),u[n]=void 0,u[r]=this.newest,this.newest&&(this.newest[n]=u),this.newest=u)}assign(u){let h,m=this.limit||Number.MAX_VALUE;this._keymap.clear();let p=u[Symbol.iterator]();for(let g=p.next();!g.done;g=p.next()){let y=new l(g.value[0],g.value[1]);if(this._keymap.set(y.key,y),h?(h[n]=y,y[r]=h):this.oldest=y,h=y,m--==0)throw new Error("overflow")}this.newest=h,this.size=this._keymap.size}get(u){var h=this._keymap.get(u);return h?(this._markEntryAsUsed(h),h.value):void 0}set(u,h){var m=this._keymap.get(u);return m?(m.value=h,this._markEntryAsUsed(m),this):(this._keymap.set(u,m=new l(u,h)),this.newest?(this.newest[n]=m,m[r]=this.newest):this.oldest=m,this.newest=m,++this.size,this.size>this.limit&&this.shift(),this)}shift(){var u=this.oldest;if(u)return this.oldest[n]?(this.oldest=this.oldest[n],this.oldest[r]=void 0):(this.oldest=void 0,this.newest=void 0),u[n]=u[r]=void 0,this._keymap.delete(u.key),--this.size,[u.key,u.value]}find(u){let h=this._keymap.get(u);return h?h.value:void 0}has(u){return this._keymap.has(u)}delete(u){var h=this._keymap.get(u);return h?(this._keymap.delete(h.key),h[n]&&h[r]?(h[r][n]=h[n],h[n][r]=h[r]):h[n]?(h[n][r]=void 0,this.oldest=h[n]):h[r]?(h[r][n]=void 0,this.newest=h[r]):this.oldest=this.newest=void 0,this.size--,h.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new s(this.oldest)}values(){return new f(this.oldest)}entries(){return this}[Symbol.iterator](){return new d(this.oldest)}forEach(u,h){typeof h!="object"&&(h=this);let m=this.oldest;for(;m;)u.call(h,m.value,m.key,this),m=m[n]}toJSON(){for(var u=new Array(this.size),h=0,m=this.oldest;m;)u[h++]={key:m.key,value:m.value},m=m[n];return u}toString(){for(var u="",h=this.oldest;h;)u+=String(h.key)+":"+h.value,h=h[n],h&&(u+=" < ");return u}}i.LRUMap=a;function l(c,u){this.key=c,this.value=u,this[n]=void 0,this[r]=void 0}function d(c){this.entry=c}d.prototype[Symbol.iterator]=function(){return this},d.prototype.next=function(){let c=this.entry;return c?(this.entry=c[n],{done:!1,value:[c.key,c.value]}):{done:!0,value:void 0}};function s(c){this.entry=c}s.prototype[Symbol.iterator]=function(){return this},s.prototype.next=function(){let c=this.entry;return c?(this.entry=c[n],{done:!1,value:c.key}):{done:!0,value:void 0}};function f(c){this.entry=c}f.prototype[Symbol.iterator]=function(){return this},f.prototype.next=function(){let c=this.entry;return c?(this.entry=c[n],{done:!1,value:c.value}):{done:!0,value:void 0}}})})(de,de.exports)),de.exports}var Go=jo();const ei=Hn(Go),Te=Symbol("IGNORE_RESPONSE");var Ie=class extends Error{constructor(){super("WorkerPoolManager: operation canceled because the pool terminated")}},Je=class extends Error{constructor(){super("WorkerPoolManager: operation canceled before the task completed")}},Ko=class{options;highlighter;preferredHighlighter;renderOptions;renderOptionsRequestVersion=0;renderOptionsVersion=0;initialized=!1;workers=[];queuedTasks=[];queuedTaskByInstance=new Map;taskByHighlightKey=new Map;activeTaskById=new Map;activeRequestByInstance=new Map;nextRequestId=0;themeSubscribers=new Set;workersFailed=!1;statSubscribers=new Set;fileCache;diffCache;_queuedBroadcast;lifecycleGeneration=0;constructor(e,{langs:t,theme:i=ee,useTokenTransformer:n=!1,lineDiffType:r="word-alt",maxLineDiffLength:a=1e3,tokenizeMaxLineLength:l=1e3,preferredHighlighter:d="shiki-js"}){this.options=e,this.preferredHighlighter=d,this.renderOptions={theme:i,useTokenTransformer:n,lineDiffType:r,maxLineDiffLength:a,tokenizeMaxLineLength:l},this.fileCache=new ei.LRUMap(e.totalASTLRUCacheSize??100),this.diffCache=new ei.LRUMap(e.totalASTLRUCacheSize??100),this.queueInitialization(t)}isWorkingPool(){return!this.workersFailed}getFileResultCache(e){return e.cacheKey!=null?this.fileCache.get(e.cacheKey):void 0}getDiffResultCache(e){return e.cacheKey!=null?this.diffCache.get(e.cacheKey):void 0}inspectCaches(){const{fileCache:e,diffCache:t}=this;return{fileCache:e,diffCache:t}}evictFileFromCache(e){try{return this.fileCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}evictDiffFromCache(e){try{return this.diffCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}async setRenderOptions({theme:e=this.renderOptions.theme??ee,useTokenTransformer:t=this.renderOptions.useTokenTransformer??!1,lineDiffType:i=this.renderOptions.lineDiffType??"word-alt",maxLineDiffLength:n=this.renderOptions.maxLineDiffLength??1e3,tokenizeMaxLineLength:r=this.renderOptions.tokenizeMaxLineLength??1e3}){const{lifecycleGeneration:a}=this,l=++this.renderOptionsRequestVersion,d=()=>this.isCurrentLifecycle(a)&&this.renderOptionsRequestVersion===l;try{const s={theme:e,useTokenTransformer:t,lineDiffType:i,maxLineDiffLength:n,tokenizeMaxLineLength:r};if(this.isInitialized()||await this.initialize(),!d()||ye(s,this.renderOptions))return;const f=De(e);let c=[];if(Oe(s.theme,this.renderOptions.theme)||(Ut(f)?c=Xt(f):c=await Yt(f)),!d())return;if(this.highlighter!=null)rt(c,this.highlighter);else{const h=await Ft({themes:f,langs:["text"],preferredHighlighter:this.preferredHighlighter});if(!d())return;this.highlighter=h}const u=this.setRenderOptionsOnWorkers(s,c);this.renderOptions=s,this.renderOptionsVersion++,this.diffCache.clear(),this.fileCache.clear(),this.invalidateRenderTasks();for(const h of this.themeSubscribers)h.onThemeChange();await u}catch(s){if(s instanceof Ie||!d())return;throw s}}getPreferredHighlighter(){return this.preferredHighlighter}getFileRenderOptions(){const{tokenizeMaxLineLength:e,theme:t,useTokenTransformer:i}=this.renderOptions;return{theme:t,useTokenTransformer:i,tokenizeMaxLineLength:e}}getDiffRenderOptions(){return{...this.renderOptions}}async setRenderOptionsOnWorkers(e,t){if(this.workersFailed)return;this.isInitialized()||await this.initialize();const i=[];for(const n of this.workers){if(!n.initialized)throw console.log({managedWorker:n}),new Error("setRenderOptionsOnWorkers: Somehow we have an uninitialized worker");i.push(new Promise((r,a)=>{const l=this.generateRequestId(),d={type:"set-render-options",id:l,request:{type:"set-render-options",id:l,renderOptions:e,resolvedThemes:t},resolve:r,reject:a,requestStart:Date.now()};this.activeTaskById.set(l,d),n.pendingSetupRequestId=l,n.worker.postMessage(d.request)}))}await Promise.all(i)}subscribeToThemeChanges(e){return this.themeSubscribers.add(e),this.queueBroadcastStateChanges(),()=>{this.unsubscribeToThemeChanges(e),this.queueBroadcastStateChanges()}}unsubscribeToThemeChanges(e){this.themeSubscribers.delete(e),this.queueBroadcastStateChanges()}subscribeToStatChanges(e){return this.statSubscribers.add(e),e(this.getStats()),()=>{this.statSubscribers.delete(e)}}queueBroadcastStateChanges(){this._queuedBroadcast==null&&(this._queuedBroadcast=requestAnimationFrame(this._broadcastStateChanges))}_broadcastStateChanges=()=>{this._queuedBroadcast!=null&&(cancelAnimationFrame(this._queuedBroadcast),this._queuedBroadcast=void 0);const e=this.getStats();for(const t of this.statSubscribers)t(e)};cleanUpTasks(e){this.detachInstanceFromQueuedTasks(e);const t=this.activeRequestByInstance.get(e);if(t!=null){const i=this.activeTaskById.get(t);Z(i)?(this.detachInstanceFromRenderTask(i,e),!i.primeCache&&i.instances.size===0&&this.removeActiveTask(i)):this.activeTaskById.delete(t)}this.activeRequestByInstance.delete(e),this.queueBroadcastStateChanges()}isInitialized(){return this.initialized===!0}async initialize(e=[]){if(this.initialized!==!0)if(this.initialized===!1){const{lifecycleGeneration:t}=this;this.initialized=new Promise((i,n)=>{(async()=>{try{const r=De(this.renderOptions.theme);let a=[];if(Ut(r)?a=Xt(r):a=await Yt(r),!this.isCurrentLifecycle(t)){i();return}let l=[];if(Qt(e)?l=Kt(e):l=await Jt(e),!this.isCurrentLifecycle(t)){i();return}const[d]=await Promise.all([Ft({themes:r,langs:["text",...e],preferredHighlighter:this.preferredHighlighter}),this.initializeWorkers(a,l)]);if(!this.isCurrentLifecycle(t)){this.terminateWorkers(),i();return}this.highlighter=d,this.initialized=!0,this.diffCache.clear(),this.fileCache.clear(),this.drainQueue(),this.queueBroadcastStateChanges(),i()}catch(r){if(r instanceof Ie||!this.isCurrentLifecycle(t)){i();return}this.initialized=!1,this.workersFailed=!0;for(const a of this.queuedTasks)this.rejectRenderTaskCallbacks(a,Xe(r));this.queueBroadcastStateChanges(),n(r)}})()}),this.queueBroadcastStateChanges()}else return this.initialized}async initializeWorkers(e,t){this.workersFailed=!1;const i=[],n=void 0;this.workers.length>0&&this.terminateWorkers();for(let r=0;r<(this.options.poolSize??8);r++){const a=this.options.workerFactory(),l={worker:a,requestId:void 0,pendingSetupRequestId:void 0,initialized:!1,langs:new Set(["text",...t.map(({name:d})=>d)]),customExtensionsVersion:0};a.addEventListener("message",d=>{this.handleWorkerMessage(l,d.data)}),a.addEventListener("error",d=>console.error("Worker error:",d,l)),this.workers.push(l),i.push(new Promise((d,s)=>{const f=this.generateRequestId(),c={type:"initialize",id:f,request:{type:"initialize",id:f,renderOptions:this.renderOptions,preferredHighlighter:this.preferredHighlighter,resolvedThemes:e,resolvedLanguages:t,customExtensionsVersion:void 0,customExtensionMap:n},resolve(){l.initialized=!0,d()},reject:s,requestStart:Date.now()};this.activeTaskById.set(f,c),this.executeTask(l,c)}))}await Promise.all(i)}drainQueue=()=>{if(this._queuedDrain=void 0,!(this.initialized!==!0||this.queuedTasks.length===0)){for(let e=0;e<this.queuedTasks.length;){const t=this.queuedTasks[e];if(this.hasActiveRequest(t)){e++;continue}const i=ti(t),n=this.getAvailableWorker(i);if(n==null)break;this.queuedTasks.splice(e,1),this.assignWorkerToTask(t,n),this.resolveLanguagesAndExecuteTask(n,t,i)}this.queueBroadcastStateChanges()}};highlightFileAST(e,t){const i=this.getFileResultCache(t);Bt(t)||i!=null&&$e(i.options,this.getFileRenderOptions())||this.hasMatchingFileInstanceTask(e,t)||this.submitTask(e,{type:"file",file:t})}primeFileHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(new Error("WorkerPoolManager.primeFileHighlightCache: worker pool is not working"));const t=this.getOrCreateFileHighlightCacheTask(e);return t!=null?this.createRenderTaskCallbacks(t):Promise.resolve()}getOrCreateFileHighlightCacheTask(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeFileHighlightCache: priming highlight cache requires file.cacheKey; skipping "${e.name}".`);return}const t=this.getFileResultCache(e),i=this.getFileHighlightKey(e);if(i==null||Bt(e)||t!=null&&$e(t.options,this.getFileRenderOptions()))return;const n=this.getTaskByHighlightKey(i);if(n!=null)return n.primeCache=!0,n.type==="file"?n:void 0;{const r=this.submitCacheTask({type:"file",file:e},i);return r.type==="file"?r:void 0}}getPlainFileAST(e,t,i,n){if(this.highlighter==null){this.queueInitialization();return}return Eo(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:i,lines:n})}highlightDiffAST(e,t){const i=this.getDiffResultCache(t);$t(t)||i!=null&&ye(i.options,this.getDiffRenderOptions())||this.hasMatchingDiffInstanceTask(e,t)||this.submitTask(e,{type:"diff",diff:t})}primeDiffHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(new Error("WorkerPoolManager.primeDiffHighlightCache: worker pool is not working"));const t=this.getOrCreateDiffHighlightCacheTask(e);return t!=null?this.createRenderTaskCallbacks(t):Promise.resolve()}getOrCreateDiffHighlightCacheTask(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeDiffHighlightCache: priming highlight cache requires diff.cacheKey; skipping "${e.prevName??e.name}" -> "${e.name}".`);return}const t=this.getDiffResultCache(e),i=this.getDiffHighlightKey(e);if(i==null||$t(e)||t!=null&&ye(t.options,this.getDiffRenderOptions()))return;const n=this.getTaskByHighlightKey(i);if(n!=null)return n.primeCache=!0,n.type==="diff"?n:void 0;{const r=this.submitCacheTask({type:"diff",diff:e},i);return r.type==="diff"?r:void 0}}getPlainDiffAST(e,t,i,n,r){return this.highlighter!=null?Uo(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:i,expandedHunks:n,collapsedContextThreshold:r}):void 0}terminate(){this.lifecycleGeneration++,this.cancelActiveWorkerTasks(),this.terminateWorkers();const e=new Ie;for(const t of this.queuedTasks)this.rejectRenderTaskCallbacks(t,e);this.fileCache.clear(),this.diffCache.clear(),this.activeRequestByInstance.clear(),this.queuedTasks.length=0,this.queuedTaskByInstance.clear(),this.taskByHighlightKey.clear(),this.activeTaskById.clear(),this.highlighter=void 0,this.initialized=!1,this.workersFailed=!1,this.queueBroadcastStateChanges()}isCurrentLifecycle(e){return this.lifecycleGeneration===e}queueInitialization(e){this.initialize(e).catch(t=>{console.error(t)})}cancelActiveWorkerTasks(){const e=new Ie;for(const t of this.activeTaskById.values())"reject"in t?t.reject(e):Z(t)&&this.rejectRenderTaskCallbacks(t,e)}terminateWorkers(){for(const e of this.workers)e.worker.terminate();this.workers.length=0}getStats(){return{managerState:this.initialized===!1?"waiting":this.initialized!==!0?"initializing":"initialized",totalWorkers:this.workers.length,workersFailed:this.workersFailed,busyWorkers:this.workers.filter(e=>e.requestId!=null||e.pendingSetupRequestId!=null).length,queuedTasks:this.queuedTasks.length,activeTasks:this.activeTaskById.size,themeSubscribers:this.themeSubscribers.size,fileCacheSize:this.fileCache.size,diffCacheSize:this.diffCache.size}}submitTask(e,t){this.initialized===!1&&this.queueInitialization();const i=this.getHighlightKeyForRequest(t),n=i!=null?this.getTaskByHighlightKey(i):void 0;if(n!=null){this.detachInstanceFromQueuedTasks(e,n),this.addInstanceToTask(n,e),this.queueBroadcastStateChanges();return}this.detachInstanceFromQueuedTasks(e);const r=this.generateRequestId(),a=Date.now(),{renderOptionsVersion:l}=this,d=(()=>{switch(t.type){case"file":return{type:"file",id:r,request:{...t,id:r},instances:new Set([e]),primeCache:!1,highlightKey:i,callbacks:new Set,renderOptionsVersion:l,requestStart:a};case"diff":return{type:"diff",id:r,request:{...t,id:r},instances:new Set([e]),primeCache:!1,highlightKey:i,callbacks:new Set,renderOptionsVersion:l,requestStart:a}}})();this.enqueueRenderTask(d,e)}submitCacheTask(e,t){this.initialized===!1&&this.queueInitialization();const i=this.generateRequestId(),n=Date.now(),{renderOptionsVersion:r}=this,a=(()=>{switch(e.type){case"file":return{type:"file",id:i,request:{...e,id:i},instances:new Set,primeCache:!0,highlightKey:t,callbacks:new Set,renderOptionsVersion:r,requestStart:n};case"diff":return{type:"diff",id:i,request:{...e,id:i},instances:new Set,primeCache:!0,highlightKey:t,callbacks:new Set,renderOptionsVersion:r,requestStart:n}}})();return this.enqueueRenderTask(a),a}enqueueRenderTask(e,t){this.queuedTasks.push(e),t!=null&&this.queuedTaskByInstance.set(t,e),e.highlightKey!=null&&this.taskByHighlightKey.set(e.highlightKey,e),this.queueDrain()}async resolveLanguagesAndExecuteTask(e,t,i){try{const n=i.filter(r=>!e.langs.has(r));if(n.length>0&&(Qt(n)?t.request.resolvedLanguages=Kt(n):t.request.resolvedLanguages=await Jt(n)),!this.activeTaskById.has(t.id)){e.requestId===t.id&&(this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain());return}this.executeTask(e,t)}catch(n){this.rejectRenderTaskCallbacks(t,Xe(n)),this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}}handleWorkerMessage(e,t){const i=this.activeTaskById.get(t.id);try{if(i==null)throw Te;if(t.type==="error"){const n=new Error(t.error);if(t.stack&&(n.stack=t.stack),"reject"in i)i.reject(n);else if(Z(i))this.notifyHighlightError(i,n),this.rejectRenderTaskCallbacks(i,n);else throw new Error("handleWorkerMessage: unknown task type");throw n}else switch(t.requestType){case"initialize":if(i.type!=="initialize")throw new Error("handleWorkerMessage: task/response dont match");this.syncCustomExtensionVersion(e,i.request),i.resolve();break;case"set-render-options":if(i.type!=="set-render-options")throw new Error("handleWorkerMessage: task/response dont match");i.resolve();break;case"file":{if(i.type!=="file")throw new Error("handleWorkerMessage: task/response dont match");const{result:n,options:r}=t;if(!this.isCurrentRenderTask(i)||!$e(r,this.getFileRenderOptions()))throw Te;const{request:a}=i;this.syncCustomExtensionVersion(e,a),i.cacheKeyAtDispatch!=null&&this.fileCache.set(i.cacheKeyAtDispatch,{result:n,options:r}),this.resolveRenderTaskCallbacks(i),this.notifyFileInstances(i,n,r);break}case"diff":{if(i.type!=="diff")throw new Error("handleWorkerMessage: task/response dont match");const{result:n,options:r}=t;if(!this.isCurrentRenderTask(i)||!ye(r,this.getDiffRenderOptions()))throw Te;const{request:a}=i;this.syncCustomExtensionVersion(e,a),i.cacheKeyAtDispatch!=null&&this.diffCache.set(i.cacheKeyAtDispatch,{result:n,options:r}),this.resolveRenderTaskCallbacks(i),this.notifyDiffInstances(i,n,r);break}}}catch(n){n!==Te&&console.error(n,i,t)}this.cleanWorkerAndTask(e,i,t.id),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}_queuedDrain;queueDrain(){this._queuedDrain==null&&(this._queuedDrain=Promise.resolve().then(this.drainQueue),this.queueBroadcastStateChanges())}assignWorkerToTask(e,t){t.requestId=e.id,Z(e)&&(this.clearQueuedInstanceRequests(e),this.trackInstanceRequests(e)),this.activeTaskById.set(e.id,e)}cleanWorkerAndTask(e,t,i=t?.id){e.requestId===i&&(e.requestId=void 0),e.pendingSetupRequestId===i&&(e.pendingSetupRequestId=void 0),t!=null&&(Z(t)&&(this.rejectRenderTaskCallbacks(t,new Je),this.clearInstanceRequests(t),this.clearHighlightKey(t)),this.activeTaskById.delete(t.id))}executeTask(e,t){Qo(t.request)&&this.maybeAttachCustomExtensions(e,t.request),this.activeTaskById.has(t.id)||this.assignWorkerToTask(t,e);for(const i of ti(t))e.langs.add(i);try{t.type==="file"?t.cacheKeyAtDispatch=t.request.file.cacheKey:t.type==="diff"&&(t.cacheKeyAtDispatch=t.request.diff.cacheKey),e.worker.postMessage(t.request)}catch(i){console.error("Failed to post message to worker:",i),Z(t)?(this.notifyHighlightError(t,i),this.rejectRenderTaskCallbacks(t,Xe(i))):"reject"in t&&t.reject(i),this.cleanWorkerAndTask(e,t),this.queuedTasks.length>0&&this.queueDrain()}this.queueBroadcastStateChanges()}maybeAttachCustomExtensions(e,t){if(t.customExtensionsVersion!=null)return;const i=gn();e.customExtensionsVersion>=i||(t.customExtensionsVersion=i,t.customExtensionMap=pn())}syncCustomExtensionVersion(e,t){t.customExtensionsVersion!=null&&(e.customExtensionsVersion=t.customExtensionsVersion)}getAvailableWorker(e){let t;for(const i of this.workers){if(i.requestId!=null||i.pendingSetupRequestId!=null||!i.initialized)continue;if(t=i,e.length===0)break;let n=!0;for(const r of e)if(!i.langs.has(r)){n=!1;break}if(n)break}return t}getFileHighlightKey(e){if(e.cacheKey!=null)return`file:${e.cacheKey}:${this.renderOptionsVersion}`}getDiffHighlightKey(e){if(e.cacheKey!=null)return`diff:${e.cacheKey}:${this.renderOptionsVersion}`}getHighlightKeyForRequest(e){switch(e.type){case"file":return this.getFileHighlightKey(e.file);case"diff":return this.getDiffHighlightKey(e.diff)}}hasActiveRequest(e){for(const t of se(e))if(this.activeRequestByInstance.has(t))return!0;return!1}addInstanceToTask(e,t){e.type,e.instances.add(t),this.activeTaskById.has(e.id)?this.activeRequestByInstance.set(t,e.id):this.queuedTaskByInstance.set(t,e)}detachInstanceFromQueuedTasks(e,t){const i=this.queuedTaskByInstance.get(e);i==null||i===t||(this.queuedTaskByInstance.delete(e),this.detachInstanceFromRenderTask(i,e),!i.primeCache&&i.instances.size===0&&this.removeQueuedTask(i))}detachInstanceFromRenderTask(e,t){e.type,e.instances.delete(t)}removeQueuedTask(e){const t=this.queuedTasks.indexOf(e);t!==-1&&this.queuedTasks.splice(t,1),this.rejectRenderTaskCallbacks(e,new Je),this.clearQueuedInstanceRequests(e),this.clearHighlightKey(e)}removeActiveTask(e){this.rejectRenderTaskCallbacks(e,new Je),this.clearInstanceRequests(e),this.clearHighlightKey(e),this.activeTaskById.delete(e.id)}createRenderTaskCallbacks(e){return new Promise((t,i)=>{e.callbacks.add({resolve:t,reject:i})})}resolveRenderTaskCallbacks(e){for(const t of e.callbacks)t.resolve();e.callbacks.clear()}rejectRenderTaskCallbacks(e,t){for(const i of e.callbacks)i.reject(t);e.callbacks.clear()}invalidateRenderTasks(){for(let e=this.queuedTasks.length-1;e>=0;e--){const t=this.queuedTasks[e];t.renderOptionsVersion!==this.renderOptionsVersion&&this.removeQueuedTask(t)}for(const e of Array.from(this.activeTaskById.values()))Z(e)&&e.renderOptionsVersion!==this.renderOptionsVersion&&this.removeActiveTask(e)}clearQueuedInstanceRequests(e){for(const t of se(e))this.queuedTaskByInstance.get(t)===e&&this.queuedTaskByInstance.delete(t)}clearHighlightKey(e){e.highlightKey!=null&&this.taskByHighlightKey.get(e.highlightKey)===e&&this.taskByHighlightKey.delete(e.highlightKey)}trackInstanceRequests(e){for(const t of se(e))this.activeRequestByInstance.set(t,e.id)}clearInstanceRequests(e){for(const t of se(e))this.activeRequestByInstance.get(t)===e.id&&this.activeRequestByInstance.delete(t)}notifyFileInstances(e,t,i){for(const n of e.instances)this.activeRequestByInstance.get(n)===e.id&&n.onHighlightSuccess(e.request.file,t,i)}notifyDiffInstances(e,t,i){for(const n of e.instances)this.activeRequestByInstance.get(n)===e.id&&n.onHighlightSuccess(e.request.diff,t,i)}notifyHighlightError(e,t){for(const i of se(e))this.activeRequestByInstance.get(i)===e.id&&i.onHighlightError(t)}hasMatchingFileInstanceTask(e,t){for(const i of this.iterateRenderTasks())if(i.type==="file"&&this.isCurrentRenderTask(i)&&i.instances.has(e)&&Un(t,i.request.file))return!0;return!1}hasMatchingDiffInstanceTask(e,t){for(const i of this.iterateRenderTasks())if(i.type==="diff"&&this.isCurrentRenderTask(i)&&i.instances.has(e)&&Lo(i.request.diff,t))return!0;return!1}getTaskByHighlightKey(e){const t=this.taskByHighlightKey.get(e);return t!=null&&this.isCurrentRenderTask(t)?t:void 0}isCurrentRenderTask(e){return e.renderOptionsVersion===this.renderOptionsVersion}*iterateRenderTasks(){for(const e of this.queuedTasks)yield e;for(const e of this.activeTaskById.values())Z(e)&&(yield e)}generateRequestId(){return`req_${++this.nextRequestId}`}};function Qo(e){return e.type==="initialize"||e.type==="file"||e.type==="diff"}function ti(e){const t=new Set;if(e.type==="initialize"||e.type==="set-render-options")return[];switch(e.type){case"file":t.add(e.request.file.lang??X(e.request.file.name));break;case"diff":t.add(e.request.diff.lang??X(e.request.diff.name)),t.add(e.request.diff.lang??X(e.request.diff.prevName??"-"));break}return t.delete("text"),Array.from(t)}function Z(e){return e?.type==="file"||e?.type==="diff"}function se(e){return e.instances}function Xe(e){return e instanceof Error?e:new Error(String(e))}let ue;function Jo({poolOptions:e,highlighterOptions:t}){return ue??=new Ko(e,t),ue}function Xo(){ue!=null&&(ue.terminate(),ue=void 0)}const Qi=K.createContext(void 0);let Ye=0;function Yo({children:e,poolOptions:t,highlighterOptions:i}){const[n]=K.useState(()=>{if(!(typeof window>"u"))return Jo({poolOptions:t,highlighterOptions:i})});return K.useInsertionEffect(()=>{if(n!=null)return Ye++,()=>{Ye--}},[n]),K.useEffect(()=>()=>{Ye===0&&Xo()},[]),q.jsx(Qi.Provider,{value:n,children:e})}function Zo(){return K.useContext(Qi)}function ii(e,t,i){if(e===t||e==null||t==null)return e===t;const n=new Set(i),r=Object.keys(e),a=new Set(Object.keys(t));for(const l of r)if(a.delete(l),!n.has(l)&&(!(l in t)||e[l]!==t[l]))return!1;for(const l of Array.from(a))if(!n.has(l))return!1;return!0}function xs(e,t){const i=e?.theme??ee,n=t?.theme??ee,r=ni(e),a=ni(t);return Oe(i,n)&&ii(e,t,["theme","parseDiffOptions"])&&ii(r,a)}function ni(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function ct(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function ri({scrollTop:e,scrollHeight:t,height:i,fitPerfectly:n=!1,fitPerfectlyOverscroll:r=0,overscrollSize:a}){const l=i+a*2,d=n?i+r*2:l;if(t=Math.max(t,d),l>=t||n){const c=Math.max(e-r,0),u=Math.min(e+d,t);return{top:c,bottom:Math.max(u,c)}}let s=e+i/2-l/2,f=s+l;return s<0&&(s=0),f>t&&(f=t),s=Math.floor(Math.max(s,0)),{top:s,bottom:Math.ceil(Math.max(Math.min(f,t),s))}}const ea=new TextEncoder,ta=new TextDecoder("utf-8",{ignoreBOM:!0}),ia=/[\uD800-\uDFFF]/,ut=1024;let ne=new Uint8Array(ut);function Ji(){ne.length!==ut&&(ne=new Uint8Array(ut))}function C(e){if(e.length===0)return e;if(ia.test(e))return JSON.parse(JSON.stringify(e));const t=e.length*3;ne.length<t&&(ne=new Uint8Array(t));const{written:i}=ea.encodeInto(e,ne);return ta.decode(ne.subarray(0,i))}const na=4096,ra=.5;function oa(e){for(const t of e.hunks){for(let i=0;i<t.hunkContent.length;i++){const n=t.hunkContent[i];if(n.type!=="change")continue;const r=sa(e,n);r!=null&&(t.hunkContent.splice(i,1,...r),i+=r.length-1)}aa(t,e)}}function aa(e,t){const{hunkContent:i}=e;for(let n=1;n<i.length;n++){const r=i[n],a=i[n-1];if(r.type!=="change"||r.additions>0&&r.deletions>0||a.type!=="context")continue;const l=r.additions>0,d=l?t.additionLines:t.deletionLines,s=l?r.additionLineIndex:r.deletionLineIndex,f=l?r.additions:r.deletions,c=d[s]??"";if(c.trim()!=="")continue;let u=!0;for(let y=1;y<f;y++)if(d[s+y]!==c){u=!1;break}if(!u)continue;let h=0;for(;h<a.lines&&t.additionLines[a.additionLineIndex+a.lines-1-h]===c;)h++;if(h===0||n===1&&h===a.lines)continue;r.additionLineIndex-=h,r.deletionLineIndex-=h;const m=r.additionLineIndex+r.additions,p=r.deletionLineIndex+r.deletions,g=i[n+1];g?.type==="context"?(g.lines+=h,g.additionLineIndex=m,g.deletionLineIndex=p):i.splice(n+1,0,{type:"context",lines:h,additionLineIndex:m,deletionLineIndex:p}),a.lines-=h,a.lines===0&&(i.splice(n-1,1),n--)}}function sa(e,t){const{deletions:i,additions:n,deletionLineIndex:r,additionLineIndex:a}=t,l=Math.min(i,n),d=Math.abs(n-i);if(l===0||d===0||l*(d+1)>na)return null;const s=[];for(let g=0;g<i;g++)s.push(oi(e.deletionLines[r+g]??""));const f=[];for(let g=0;g<n;g++)f.push(oi(e.additionLines[a+g]??""));const c=n>i;let u=0,h=-1;for(let g=0;g<=d;g++){let y=0;for(let v=0;v<l;v++)y+=da(s[v+(c?0:g)],f[v+(c?g:0)]);g===0?h=y+l*ra:y>h&&(h=y,u=g)}if(u===0)return null;const m=[],p=(g,y,v,_)=>{(g>0||y>0)&&m.push({type:"change",deletions:g,additions:y,deletionLineIndex:v,additionLineIndex:_})};return c?(p(0,u,r,a),p(l,l,r,a+u),p(0,n-l-u,r+l,a+u+l)):(p(u,0,r,a),p(l,l,r+u,a),p(i-l-u,0,r+u+l,a+l)),m}const la=/\s+/g;function oi(e){return e.replace(la,"")}function da(e,t){if(e===t)return 1;const i=Math.max(e.length,t.length),n=Math.min(e.length,t.length);if(n===0)return 0;let r=0;for(;r<n&&e[r]===t[r];)r++;let a=0;for(;a<n-r&&e[e.length-1-a]===t[t.length-1-a];)a++;return(r+a)/i}function ca(e,t,i){try{return ua(e,t,i)}finally{Ji()}}function ua(e,t,i=!1){const n=Ea(e),r=n?ma(e):pa(e);let a;const l=[];for(const d of r){if(n&&!gi.test(d)){if(a==null)a=C(d);else{if(i)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",d)}continue}else if(!n&&!ga(d)){if(a==null)a=C(d);else{if(i)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",d)}continue}const s=Xi(d,{cacheKey:void 0,isGitDiff:n,throwOnError:i});s!=null&&l.push(s)}return{patchMetadata:a,files:l}}function As(e,t){try{return Xi(e,t)}finally{Ji()}}function Xi(e,{cacheKey:t,isGitDiff:i=gi.test(e),oldFile:n,newFile:r,throwOnError:a=!1}={}){let l=0;const d=tn(e,"@@ ");let s;const f=n==null||r==null;let c=0,u=0;for(const h of d){const m=Yi(h),p=m[0];if(p==null){if(a)throw Error("parsePatchContent: invalid hunk");console.error("parsePatchContent: invalid hunk",h);continue}const g=en(p);let y=0,v=0;if(g==null||s==null){if(s!=null){if(a)throw Error("parsePatchContent: Invalid hunk");console.error("parsePatchContent: Invalid hunk",h);continue}s={name:"",type:"change",hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:f,additionLines:!f&&n!=null&&r!=null?ai(r.contents):[],deletionLines:!f&&n!=null&&r!=null?ai(n.contents):[],cacheKey:di(t)},s.additionLines.length===1&&r?.contents===""&&(s.additionLines.length=0),s.deletionLines.length===1&&n?.contents===""&&(s.deletionLines.length=0);for(const L of m){if(L.startsWith("diff --git")){const D=L.trim().match(vn),I=D?.[1]??D?.[2],P=D?.[3]??D?.[4];if(I==null||P==null){if(a)throw Error("parsePatchContent: invalid git diff header");console.error("parsePatchContent: invalid git diff header",L);continue}s.name=C(P.trim()),I!==P&&(s.prevName=C(I.trim()));continue}const x=L.startsWith("---")||L.startsWith("+++")?L.match(i?bn:En):null;if(x!=null){const[,D,I]=x;if(D==="---"&&I!=="/dev/null"){const P=C(I.trim());s.prevName=P,s.name=P}else D==="+++"&&I!=="/dev/null"&&(s.name=C(I.trim()))}else if(i){if(L.startsWith("new mode ")&&(s.mode=C(L.slice(8).trim())),L.startsWith("old mode ")&&(s.prevMode=C(L.slice(8).trim())),L.startsWith("new file mode")&&(s.type="new",s.mode=C(L.slice(13).trim())),L.startsWith("deleted file mode")&&(s.type="deleted",s.mode=C(L.slice(17).trim())),L.startsWith("similarity index")&&(L.startsWith("similarity index 100%")?s.type="rename-pure":s.type="rename-changed"),L.startsWith("index ")){const[,D,I,P]=L.trim().match(yn)??[];D!=null&&(s.prevObjectId=C(D)),I!=null&&(s.newObjectId=C(I)),P!=null&&(s.mode=C(P))}L.startsWith("rename from ")&&(s.prevName=C(L.slice(12).trim())),L.startsWith("rename to ")&&(s.name=C(L.slice(10).trim()))}}continue}let _,b;for(;m.length>0&&(m[m.length-1]===`
2
+ import{D as ee,a as X,h as kt,k as fn,l as hn,e as mn,A as pn,B as gn,F as _n,G as gi,I as vn,J as bn,K as En,L as yn,v as it,x as pe,w as z,C as Ln,H as kn,c as Tn,d as In,U as Rn,M as Sn,N as _i,T as Pn,f as xn}from"./platform-BMNQ8V5r.js";import{a as An,b as wn,g as Dn,J as On,n as Cn,t as Vn,d as Nn,l as Mn}from"./one-light-CoLDteqg.js";import{g as Hn,r as K,j as q}from"./react-rd22PHbN.js";import{_ as o,s as zn}from"./index-ChKJF4C_.js";import"./index-BgLrS_2D.js";import{t as Fn}from"./index-CtEztN1P.js";const hs={position:"absolute",top:0,bottom:0,textAlign:"center",whiteSpace:"normal",touchAction:"none"},ms={display:"contents"};function ps(){return null}function fe(e,t){return e-(t===0?0:1)}function te(e,t){return fe(e,t)+t}function Oe(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function Un(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}const nt=new Set;function he(e){const t=[],i=new Set;for(const u of Bn(e.themes)){const h=vi(u)?u.getThemes():[u];for(const m of h){if(i.has(m.name))throw new Error(`Theme collection already contains theme "${m.name}"`);i.add(m.name),t.push(m)}}const n=Object.freeze([...t]),r=Object.freeze(n.filter(u=>u.colorScheme==="light")),a=Object.freeze(n.filter(u=>u.colorScheme==="dark")),l=new Map(n.map(u=>[u.name,u])),d=Object.freeze(n.map(u=>u.name)),s=Object.freeze(r.map(u=>u.name)),f=Object.freeze(a.map(u=>u.name));function c(u){if(u==null)return n;const{colorScheme:h,collection:m}=u;return m==null?h==="light"?r:h==="dark"?a:n:n.filter(p=>p.collection!==m?!1:h==null||p.colorScheme===h)}return{getTheme(u){return l.get(u)},getThemes(u){return c(u)},getThemeNames(u){return u?.collection==null?u?.colorScheme==="light"?s:u?.colorScheme==="dark"?f:d:c(u).map(h=>h.name)},hasTheme(u){return l.has(u)},orderBy(u){return he({themes:n.map((h,m)=>({descriptor:h,index:m})).sort((h,m)=>{const p=u(h.descriptor,m.descriptor);return p!==0?p:h.index-m.index}).map(h=>h.descriptor)})},pick(u){const h=[],m=new Set;for(const p of u){if(m.has(p))throw new Error(`Theme collection pick already includes theme "${p}"`);m.add(p);const g=l.get(p);if(g==null)throw new Error(`Theme collection does not contain theme "${p}"`);h.push(g)}return he({themes:h})},registerInto(u){for(const h of n)u.registerThemeIfAbsent(h.name,h.load)}}}function Bn(e){return qn(e)?[e]:e}function qn(e){return vi(e)||Wn(e)}function Wn(e){return typeof e.name=="string"&&typeof e.load=="function"}function vi(e){return typeof e.getThemes=="function"}function bi(e){return e!==null&&typeof e=="object"&&"default"in e?e.default:e}var Ei=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name="DuplicateThemeError"}},$n=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name="UnregisteredThemeError"}},jn=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name="UnresolvedThemeError"}};function Gn(){const e=new Map,t=new Map,i=new Map;let n=0;function r(v,_){if(e.has(v))throw new Ei(v);e.set(v,_)}function a(v,_){return e.has(v)?!1:(e.set(v,_),!0)}function l(v){return e.has(v)}function d(v){const _=t.get(v);if(_!==void 0)return Promise.resolve(_);const b=i.get(v);if(b!==void 0)return b;const k=e.get(v);if(k===void 0)return Promise.reject(new $n(v));const R=n,E=k().then(T=>{const S=bi(T);return R===n&&t.set(v,S),i.get(v)===E&&i.delete(v),S}).catch(T=>{throw i.get(v)===E&&i.delete(v),T});return i.set(v,E),E}function s(v){return Promise.all(v.map(_=>d(_)))}function f(v,_){t.set(v,_)}function c(v){for(const[_,b]of v)f(_,b)}function u(v){return t.get(v)}function h(v){const _=[];for(const b of v){const k=t.get(b);if(k===void 0)throw new jn(b);_.push(k)}return _}function m(v){return t.has(v)}function p(v){for(const _ of v)if(!t.has(_))return!1;return!0}function g(v){const _=t.get(v);return _!==void 0?_:d(v)}function y(){n++,t.clear(),i.clear()}return{clearResolvedThemes:y,getResolvedOrResolveTheme:g,getResolvedTheme:u,getResolvedThemes:h,hasRegisteredTheme:l,hasResolvedTheme:m,hasResolvedThemes:p,registerTheme:r,registerThemeIfAbsent:a,resolveTheme:d,resolveThemes:s,seedResolvedTheme:f,seedResolvedThemes:c}}const U=Gn();function rt(e,t){e=Array.isArray(e)?e:[e];for(let i of e){let n;if(typeof i=="string"){if(n=U.getResolvedTheme(i),n==null)throw new Error(`loadResolvedThemes: ${i} is not resolved, you must resolve it before calling loadResolvedThemes`)}else n=i,i=i.name,U.getResolvedTheme(i)==null&&U.seedResolvedTheme(i,n);nt.has(i)||(nt.add(i),t.loadThemeSync(n))}}const ie=new Map,Fe=new Map,Kn=new Map,ot=new Set;function Tt(e,t){e=Array.isArray(e)?e:[e];for(const i of e){if(ot.has(i.name))continue;let n=ie.get(i.name);n==null&&(n=i,ie.set(i.name,n)),ot.add(n.name),t.loadLanguageSync(n.data)}}function yi(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}var at=Object.defineProperty,Qn=Object.getOwnPropertyDescriptor,Jn=Object.getOwnPropertyNames,Xn=Object.prototype.hasOwnProperty,ht=(e,t)=>{let i={};for(var n in e)at(i,n,{get:e[n],enumerable:!0});return at(i,Symbol.toStringTag,{value:"Module"}),i},Yn=(e,t,i,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(var r=Jn(t),a=0,l=r.length,d;a<l;a++)d=r[a],!Xn.call(e,d)&&d!==i&&at(e,d,{get:(s=>t[s]).bind(null,d),enumerable:!(n=Qn(t,d))||n.enumerable});return e},Li=(e,t,i)=>(Yn(e,t,"default"),i);const Ce=[{id:"abap",name:"ABAP",import:(()=>o(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>o(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>o(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>o(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>o(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>o(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>o(()=>import("./apex-Dqspr-GT.js"),[]))},{id:"apl",name:"APL",import:(()=>o(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>o(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>o(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>o(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>o(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>o(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>o(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>o(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>o(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>o(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>o(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>o(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>o(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>o(()=>import("./bird2-BIv1doCn.js"),[]))},{id:"blade",name:"Blade",import:(()=>o(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>o(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>o(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>o(()=>import("./c3-MRO5bC_T.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>o(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>o(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>o(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>o(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>o(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>o(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>o(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>o(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>o(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>o(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>o(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>o(()=>import("./cpp-UfJy6YNI.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>o(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>o(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>o(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>o(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>o(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>o(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>o(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>o(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>o(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>o(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>o(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>o(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>o(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>o(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>o(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>o(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>o(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>o(()=>import("./emacs-lisp-CXvaQtF9.js"),[]))},{id:"erb",name:"ERB",import:(()=>o(()=>import("./erb-Dm6A9KJ5.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>o(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>o(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>o(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>o(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>o(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>o(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>o(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>o(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>o(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>o(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>o(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>o(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>o(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>o(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>o(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>o(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>o(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>o(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>o(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>o(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>o(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>o(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>o(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>o(()=>import("./hack-DbPARsA_.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>o(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>o(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>o(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>o(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>o(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>o(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>o(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>o(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>o(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>o(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>o(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>o(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>o(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>o(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>o(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>o(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>o(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>o(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>o(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>o(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>o(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>o(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>o(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>o(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>o(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>o(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>o(()=>import("./julia-D7OTSIA_.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>o(()=>import("./just-CUsbIsdP.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>o(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>o(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>o(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>o(()=>import("./latex-CaSxy8MP.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>o(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>o(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>o(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>o(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>o(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>o(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>o(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>o(()=>import("./luau-KW6xsasC.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>o(()=>import("./makefile-DD9maIlR.js").then(e=>e.m),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>o(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>o(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>o(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>o(()=>import("./mdc-DTYItulj.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>o(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>o(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>o(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>o(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>o(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>o(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>o(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>o(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>o(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>o(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>o(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>o(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>o(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>o(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>o(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>o(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>o(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>o(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>o(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>o(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>o(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>o(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>o(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>o(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>o(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>o(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>o(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>o(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>o(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>o(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>o(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>o(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>o(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>o(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>o(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>o(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>o(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>o(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>o(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>o(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>o(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>o(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>o(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>o(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>o(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>o(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>o(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>o(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>o(()=>import("./rst-CpCqk9r5.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>o(()=>import("./ruby-DyJCeAvU.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>o(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>o(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>o(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>o(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>o(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>o(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>o(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>o(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>o(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>o(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>o(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>o(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>o(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>o(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>o(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>o(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>o(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>o(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>o(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>o(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>o(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>o(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>o(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>o(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>o(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>o(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>o(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>o(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>o(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>o(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>o(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>o(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>o(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>o(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>o(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>o(()=>import("./twig-CW1WmMYd.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>o(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>o(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>o(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>o(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>o(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>o(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>o(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>o(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>o(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>o(()=>import("./vue-D2xRrEX4.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>o(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>o(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>o(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>o(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>o(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>o(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>o(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>o(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>o(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>o(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>o(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>o(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>o(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>o(()=>import("./zig-VOosw3JB.js"),[]))}],mt=Object.fromEntries(Ce.map(e=>[e.id,e.import])),pt=Object.fromEntries(Ce.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),gt={...mt,...pt},_t=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>o(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>o(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>o(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>o(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>o(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>o(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>o(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>o(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>o(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>o(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>o(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>o(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>o(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>o(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>o(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>o(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>o(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>o(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>o(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>o(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>o(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>o(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>o(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>o(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>o(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>o(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>o(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>o(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>o(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>o(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>o(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>o(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>o(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>o(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>o(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>o(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>o(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>o(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>o(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>o(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>o(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>o(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>o(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>o(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>o(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>o(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>o(()=>import("./one-light-CoLDteqg.js").then(e=>e.o),__vite__mapDeps([101,102])))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>o(()=>import("./one-light-CoLDteqg.js").then(e=>e.e),__vite__mapDeps([101,102])))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>o(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>o(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>o(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>o(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>o(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>o(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>o(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>o(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>o(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>o(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>o(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>o(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>o(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>o(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>o(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>o(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>o(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],vt=Object.fromEntries(_t.map(e=>[e.id,e.import]));var bt=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Zn(){return 2147483648}function er(){return typeof performance<"u"?performance.now():Date.now()}const tr=(e,t)=>e+(t-e%t)%t;async function ir(e){let t,i;const n={};function r(m){i=m,n.HEAPU8=new Uint8Array(m),n.HEAPU32=new Uint32Array(m)}function a(m,p,g){n.HEAPU8.copyWithin(m,p,p+g)}function l(m){try{return t.grow(m-i.byteLength+65535>>>16),r(t.buffer),1}catch{}}function d(m){const p=n.HEAPU8.length;m=m>>>0;const g=Zn();if(m>g)return!1;for(let y=1;y<=4;y*=2){let v=p*(1+.2/y);v=Math.min(v,m+100663296);const _=Math.min(g,tr(Math.max(m,v),65536));if(l(_))return!0}return!1}const s=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function f(m,p,g=1024){const y=p+g;let v=p;for(;m[v]&&!(v>=y);)++v;if(v-p>16&&m.buffer&&s)return s.decode(m.subarray(p,v));let _="";for(;p<v;){let b=m[p++];if(!(b&128)){_+=String.fromCharCode(b);continue}const k=m[p++]&63;if((b&224)===192){_+=String.fromCharCode((b&31)<<6|k);continue}const R=m[p++]&63;if((b&240)===224?b=(b&15)<<12|k<<6|R:b=(b&7)<<18|k<<12|R<<6|m[p++]&63,b<65536)_+=String.fromCharCode(b);else{const E=b-65536;_+=String.fromCharCode(55296|E>>10,56320|E&1023)}}return _}function c(m,p){return m?f(n.HEAPU8,m,p):""}const u={emscripten_get_now:er,emscripten_memcpy_big:a,emscripten_resize_heap:d,fd_write:()=>0};async function h(){const p=await e({env:u,wasi_snapshot_preview1:u});t=p.memory,r(t.buffer),Object.assign(n,p),n.UTF8ToString=c}return await h(),n}var nr=Object.defineProperty,rr=(e,t,i)=>t in e?nr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,V=(e,t,i)=>rr(e,typeof t!="symbol"?t+"":t,i);let M=null;function or(e){throw new bt(e.UTF8ToString(e.getLastOnigError()))}class Ve{constructor(t){V(this,"utf16Length"),V(this,"utf8Length"),V(this,"utf16Value"),V(this,"utf8Value"),V(this,"utf16OffsetToUtf8"),V(this,"utf8OffsetToUtf16");const i=t.length,n=Ve._utf8ByteLength(t),r=n!==i,a=r?new Uint32Array(i+1):null;r&&(a[i]=n);const l=r?new Uint32Array(n+1):null;r&&(l[n]=i);const d=new Uint8Array(n);let s=0;for(let f=0;f<i;f++){const c=t.charCodeAt(f);let u=c,h=!1;if(c>=55296&&c<=56319&&f+1<i){const m=t.charCodeAt(f+1);m>=56320&&m<=57343&&(u=(c-55296<<10)+65536|m-56320,h=!0)}r&&(a[f]=s,h&&(a[f+1]=s),u<=127?l[s+0]=f:u<=2047?(l[s+0]=f,l[s+1]=f):u<=65535?(l[s+0]=f,l[s+1]=f,l[s+2]=f):(l[s+0]=f,l[s+1]=f,l[s+2]=f,l[s+3]=f)),u<=127?d[s++]=u:u<=2047?(d[s++]=192|(u&1984)>>>6,d[s++]=128|(u&63)>>>0):u<=65535?(d[s++]=224|(u&61440)>>>12,d[s++]=128|(u&4032)>>>6,d[s++]=128|(u&63)>>>0):(d[s++]=240|(u&1835008)>>>18,d[s++]=128|(u&258048)>>>12,d[s++]=128|(u&4032)>>>6,d[s++]=128|(u&63)>>>0),h&&f++}this.utf16Length=i,this.utf8Length=n,this.utf16Value=t,this.utf8Value=d,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=l}static _utf8ByteLength(t){let i=0;for(let n=0,r=t.length;n<r;n++){const a=t.charCodeAt(n);let l=a,d=!1;if(a>=55296&&a<=56319&&n+1<r){const s=t.charCodeAt(n+1);s>=56320&&s<=57343&&(l=(a-55296<<10)+65536|s-56320,d=!0)}l<=127?i+=1:l<=2047?i+=2:l<=65535?i+=3:i+=4,d&&n++}return i}createString(t){const i=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,i),i}}const Ne=class ${constructor(t){if(V(this,"id",++$.LAST_ID),V(this,"_onigBinding"),V(this,"content"),V(this,"utf16Length"),V(this,"utf8Length"),V(this,"utf16OffsetToUtf8"),V(this,"utf8OffsetToUtf16"),V(this,"ptr"),!M)throw new bt("Must invoke loadWasm first.");this._onigBinding=M,this.content=t;const i=new Ve(t);this.utf16Length=i.utf16Length,this.utf8Length=i.utf8Length,this.utf16OffsetToUtf8=i.utf16OffsetToUtf8,this.utf8OffsetToUtf16=i.utf8OffsetToUtf16,this.utf8Length<1e4&&!$._sharedPtrInUse?($._sharedPtr||($._sharedPtr=M.omalloc(1e4)),$._sharedPtrInUse=!0,M.HEAPU8.set(i.utf8Value,$._sharedPtr),this.ptr=$._sharedPtr):this.ptr=i.createString(M)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===$._sharedPtr?$._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};V(Ne,"LAST_ID",0);V(Ne,"_sharedPtr",0);V(Ne,"_sharedPtrInUse",!1);let ki=Ne;class ar{constructor(t){if(V(this,"_onigBinding"),V(this,"_ptr"),!M)throw new bt("Must invoke loadWasm first.");const i=[],n=[];for(let d=0,s=t.length;d<s;d++){const f=new Ve(t[d]);i[d]=f.createString(M),n[d]=f.utf8Length}const r=M.omalloc(4*t.length);M.HEAPU32.set(i,r/4);const a=M.omalloc(4*t.length);M.HEAPU32.set(n,a/4);const l=M.createOnigScanner(r,a,t.length);for(let d=0,s=t.length;d<s;d++)M.ofree(i[d]);M.ofree(a),M.ofree(r),l===0&&or(M),this._onigBinding=M,this._ptr=l}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,i,n){let r=0;if(typeof n=="number"&&(r=n),typeof t=="string"){t=new ki(t);const a=this._findNextMatchSync(t,i,!1,r);return t.dispose(),a}return this._findNextMatchSync(t,i,!1,r)}_findNextMatchSync(t,i,n,r){const a=this._onigBinding,l=a.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(i),r);if(l===0)return null;const d=a.HEAPU32;let s=l/4;const f=d[s++],c=d[s++],u=[];for(let h=0;h<c;h++){const m=t.convertUtf8OffsetToUtf16(d[s++]),p=t.convertUtf8OffsetToUtf16(d[s++]);u[h]={start:m,end:p,length:p-m}}return{index:f,captureIndices:u}}}function sr(e){return typeof e.instantiator=="function"}function lr(e){return typeof e.default=="function"}function dr(e){return typeof e.data<"u"}function cr(e){return typeof Response<"u"&&e instanceof Response}function ur(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let ge;function Et(e){if(ge)return ge;async function t(){M=await ir(async i=>{let n=e;return n=await n,typeof n=="function"&&(n=await n(i)),typeof n=="function"&&(n=await n(i)),sr(n)?n=await n.instantiator(i):lr(n)?n=await n.default(i):(dr(n)&&(n=n.data),cr(n)?typeof WebAssembly.instantiateStreaming=="function"?n=await fr(n)(i):n=await hr(n)(i):ur(n)?n=await Ue(n)(i):n instanceof WebAssembly.Module?n=await Ue(n)(i):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await Ue(n.default)(i))),"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}return ge=t(),ge}function Ue(e){return t=>WebAssembly.instantiate(e,t)}function fr(e){return t=>WebAssembly.instantiateStreaming(e,t)}function hr(e){return async t=>{const i=await e.arrayBuffer();return WebAssembly.instantiate(i,t)}}let Ti;function mr(e){Ti=e}function pr(){return Ti}async function yt(e){return e&&await Et(e),{createScanner(t){return new ar(t.map(i=>typeof i=="string"?i:i.source))},createString(t){return new ki(t)}}}const gr=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:yt,getDefaultWasmLoader:pr,loadWasm:Et,setDefaultWasmLoader:mr},Symbol.toStringTag,{value:"Module"}));var Ii=ht({});Li(Ii,gr);var _r=ht({bundledLanguages:()=>gt,bundledLanguagesAlias:()=>pt,bundledLanguagesBase:()=>mt,bundledLanguagesInfo:()=>Ce,bundledThemes:()=>vt,bundledThemesInfo:()=>_t,codeToHast:()=>Si,codeToHtml:()=>Ri,codeToTokens:()=>Pi,codeToTokensBase:()=>xi,codeToTokensWithThemes:()=>Ai,createHighlighter:()=>Me,getLastGrammarState:()=>Di,getSingletonHighlighter:()=>wi});const Me=An({langs:gt,themes:vt,engine:()=>(0,Ii.createOnigurumaEngine)(o(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:Ri,codeToHast:Si,codeToTokens:Pi,codeToTokensBase:xi,codeToTokensWithThemes:Ai,getSingletonHighlighter:wi,getLastGrammarState:Di}=wn(Me,{guessEmbeddedLanguages:Dn});function Oi(e,t){return Fn(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function Ci(e={}){const t={target:"auto",cache:new Map,...e};return t.regexConstructor||=i=>Oi(i,{target:t.target}),{createScanner(i){return new On(i,t)},createString(i){return{content:i}}}}Li(ht({bundledLanguages:()=>gt,bundledLanguagesAlias:()=>pt,bundledLanguagesBase:()=>mt,bundledLanguagesInfo:()=>Ce,bundledThemes:()=>vt,bundledThemesInfo:()=>_t,codeToHast:()=>Si,codeToHtml:()=>Ri,codeToTokens:()=>Pi,codeToTokensBase:()=>xi,codeToTokensWithThemes:()=>Ai,createHighlighter:()=>Me,createJavaScriptRegexEngine:()=>Ci,createOnigurumaEngine:()=>yt,defaultJavaScriptRegexConstructor:()=>Oi,getLastGrammarState:()=>Di,getSingletonHighlighter:()=>wi,loadWasm:()=>Et}),_r);const _e=()=>o(()=>import("./javascript-wDzz0qaB.js"),[]),ve=()=>o(()=>import("./typescript-BPQ3VLAy.js"),[]),vr=()=>o(()=>import("./jsx-g9-lgVsj.js"),[]),br=()=>o(()=>import("./tsx-COt5Ahok.js"),[]),Er=()=>o(()=>import("./json-Cp-IABpG.js"),[]),yr=()=>o(()=>import("./jsonc-Des-eS-w.js"),[]),Lr=()=>o(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])),kr=()=>o(()=>import("./css-CLj8gQPS.js"),[]),Tr=()=>o(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])),Ir=()=>o(()=>import("./less-B1dDrJ26.js"),[]),It=()=>o(()=>import("./markdown-Cvjx9yec.js"),[]),Rr=()=>o(()=>import("./mdx-Cmh6b_Ma.js"),[]),Rt=()=>o(()=>import("./yaml-Buea-lGh.js"),[]),Sr=()=>o(()=>import("./toml-vGWfd6FD.js"),[]),Pr=()=>o(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])),xr=()=>o(()=>import("./sql-CRqJ_cUM.js"),[]),St=()=>o(()=>import("./python-B6aJPvgy.js"),[]),Ar=()=>o(()=>import("./go-C27-OAKa.js"),[]),Pt=()=>o(()=>import("./rust-B1yitclQ.js"),[]),wr=()=>o(()=>import("./java-CylS5w8V.js"),[]),Be=()=>o(()=>import("./kotlin-BdnUsdx6.js"),[]),Dr=()=>o(()=>import("./c-BIGW1oBm.js"),[]),xt=()=>o(()=>import("./cpp-UfJy6YNI.js"),__vite__mapDeps([23,24,25,26,16])),qe=()=>o(()=>import("./csharp-DSvCPggb.js"),[]),At=()=>o(()=>import("./ruby-DyJCeAvU.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])),Or=()=>o(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])),Cr=()=>o(()=>import("./swift-D82vCrfD.js"),[]),ae=()=>o(()=>import("./shellscript-Yzrsuije.js"),[]),We=()=>o(()=>import("./powershell-Dpen1YoG.js"),[]),wt=()=>o(()=>import("./docker-BcOcwvcX.js"),[]),Vr=()=>o(()=>import("./diff-D97Zzqfu.js"),[]),Nr=()=>o(()=>import("./vue-D2xRrEX4.js"),__vite__mapDeps([96,3,2,11,9,1,15])),Mr=()=>o(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([91,2,11,3,12])),Dt=()=>o(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])),Hr=()=>o(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])),zr=()=>o(()=>import("./r-Dspwwk_N.js"),[]),Fr=()=>o(()=>import("./dart-bE4Kk8sk.js"),[]),Ur=()=>o(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([30,1,2,3])),Ot=()=>o(()=>import("./haskell-Df6bDoY_.js"),[]),Br=()=>o(()=>import("./zig-VOosw3JB.js"),[]),qr=()=>o(()=>import("./nix-CwoSXNpI.js"),[]),Ct=()=>o(()=>import("./proto-C7zT0LnQ.js"),[]),be=()=>o(()=>import("./hcl-BWvSN4gD.js"),[]),Vt=()=>o(()=>import("./makefile-DD9maIlR.js").then(e=>e.a),[]),Nt=()=>o(()=>import("./ini-BEwlwnbL.js"),[]),Wr=()=>o(()=>import("./scala-C151Ov-r.js"),[]),$r=()=>o(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([64,1,2,3,7,8,16])),jr={javascript:_e,js:_e,cjs:_e,mjs:_e,typescript:ve,ts:ve,cts:ve,mts:ve,jsx:vr,tsx:br,json:Er,jsonc:yr,html:Lr,css:kr,scss:Tr,less:Ir,markdown:It,md:It,mdx:Rr,yaml:Rt,yml:Rt,toml:Sr,xml:Pr,sql:xr,python:St,py:St,go:Ar,rust:Pt,rs:Pt,java:wr,kotlin:Be,kt:Be,kts:Be,c:Dr,cpp:xt,"c++":xt,csharp:qe,cs:qe,"c#":qe,ruby:At,rb:At,php:Or,swift:Cr,shellscript:ae,bash:ae,sh:ae,shell:ae,zsh:ae,powershell:We,ps:We,ps1:We,docker:wt,dockerfile:wt,diff:Vr,vue:Nr,svelte:Mr,graphql:Dt,gql:Dt,lua:Hr,r:zr,dart:Fr,elixir:Ur,haskell:Ot,hs:Ot,zig:Br,nix:qr,proto:Ct,protobuf:Ct,hcl:be,terraform:be,tf:be,tfvars:be,makefile:Vt,make:Vt,ini:Nt,properties:Nt,scala:Wr,perl:$r};function Mt(e){return()=>Promise.resolve({default:[{name:e,scopeName:`source.${e}`,patterns:[]}]})}const Ht=new Proxy(jr,{get(e,t,i){return typeof t=="string"&&t in e?Reflect.get(e,t,i):typeof t=="string"?Mt(t):Reflect.get(e,t,i)},has(e,t){return typeof t=="string"},getOwnPropertyDescriptor(e,t){return typeof t!="string"?Object.getOwnPropertyDescriptor(e,t):{configurable:!0,enumerable:!0,value:t in e?e[t]:Mt(t)}}});async function Vi(e){if(yi())throw new Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const t=Fe.get(e);if(t!=null)return t;try{let i=Kn.get(e);if(i==null&&Object.prototype.hasOwnProperty.call(Ht,e)&&(i=Ht[e]),i==null)throw new Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);const n=i().then(({default:r})=>{const a={name:e,data:r};return ie.has(e)||ie.set(e,a),a});return Fe.set(e,n),await n}finally{Fe.delete(e)}}function Ni(e){return ie.get(e)??Vi(e)}function Lt({name:e,load:t,colorScheme:i,collection:n,displayName:r}){return{name:e,colorScheme:i,collection:n,displayName:r,load:Gr(t)}}function Gr(e){return async()=>Cn(bi(await e()))}const Kr="pierre",Qr=["pierre-dark","pierre-dark-soft","pierre-dark-vibrant","pierre-dark-protanopia-deuteranopia","pierre-dark-tritanopia"],Mi=["pierre-light","pierre-light-soft","pierre-light-vibrant","pierre-light-protanopia-deuteranopia","pierre-light-tritanopia"],Jr=[...Mi,...Qr],Xr=new Set(Mi);function Yr(e){return Xr.has(e)?"light":"dark"}const Zr={"pierre-dark":"Pierre Dark","pierre-dark-soft":"Pierre Dark Soft","pierre-dark-vibrant":"Pierre Dark Vibrant","pierre-dark-protanopia-deuteranopia":"Pierre Dark Protanopia & Deuteranopia","pierre-dark-tritanopia":"Pierre Dark Tritanopia","pierre-light":"Pierre Light","pierre-light-soft":"Pierre Light Soft","pierre-light-vibrant":"Pierre Light Vibrant","pierre-light-protanopia-deuteranopia":"Pierre Light Protanopia & Deuteranopia","pierre-light-tritanopia":"Pierre Light Tritanopia"},eo={"pierre-dark":()=>o(()=>import("./pierre-dark-CyvmCCZW.js"),[]),"pierre-dark-soft":()=>o(()=>import("./pierre-dark-soft-BHGpRqa4.js"),[]),"pierre-dark-vibrant":()=>o(()=>import("./pierre-dark-vibrant-BWBVywrn.js"),[]),"pierre-dark-protanopia-deuteranopia":()=>o(()=>import("./pierre-dark-protanopia-deuteranopia-Rgc0TwpF.js"),[]),"pierre-dark-tritanopia":()=>o(()=>import("./pierre-dark-tritanopia-Beq2gCRQ.js"),[]),"pierre-light":()=>o(()=>import("./pierre-light-480U9XYS.js"),[]),"pierre-light-soft":()=>o(()=>import("./pierre-light-soft-CVdyfjmI.js"),[]),"pierre-light-vibrant":()=>o(()=>import("./pierre-light-vibrant-DdTDNdfJ.js"),[]),"pierre-light-protanopia-deuteranopia":()=>o(()=>import("./pierre-light-protanopia-deuteranopia-CaVOBURG.js"),[]),"pierre-light-tritanopia":()=>o(()=>import("./pierre-light-tritanopia-B4_gpKOM.js"),[])};function to(e){return Lt({name:e,collection:Kr,colorScheme:Yr(e),displayName:Zr[e],load:eo[e]})}const Hi=he({themes:Jr.map(e=>to(e))}),io="shiki",zi=["ayu-light","catppuccin-latte","everforest-light","github-light","github-light-default","github-light-high-contrast","gruvbox-light-hard","gruvbox-light-medium","gruvbox-light-soft","horizon-bright","kanagawa-lotus","light-plus","material-theme-lighter","min-light","night-owl-light","one-light","rose-pine-dawn","slack-ochin","snazzy-light","solarized-light","vitesse-light"],no=["andromeeda","aurora-x","ayu-dark","ayu-mirage","catppuccin-frappe","catppuccin-macchiato","catppuccin-mocha","dark-plus","dracula","dracula-soft","everforest-dark","github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","gruvbox-dark-hard","gruvbox-dark-medium","gruvbox-dark-soft","horizon","houston","kanagawa-dragon","kanagawa-wave","laserwave","material-theme","material-theme-darker","material-theme-ocean","material-theme-palenight","min-dark","monokai","night-owl","nord","one-dark-pro","plastic","poimandres","red","rose-pine","rose-pine-moon","slack-dark","solarized-dark","synthwave-84","tokyo-night","vesper","vitesse-black","vitesse-dark"],ro=new Set(zi);function oo(e){return ro.has(e)?"light":"dark"}const ao={andromeeda:()=>o(()=>import("./andromeeda-C4gqWexZ.js"),[]),"aurora-x":()=>o(()=>import("./aurora-x-D-2ljcwZ.js"),[]),"ayu-dark":()=>o(()=>import("./ayu-dark-DYE7WIF3.js"),[]),"ayu-light":()=>o(()=>import("./ayu-light-BA47KaF1.js"),[]),"ayu-mirage":()=>o(()=>import("./ayu-mirage-32ctXXKs.js"),[]),"catppuccin-frappe":()=>o(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]),"catppuccin-latte":()=>o(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]),"catppuccin-macchiato":()=>o(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]),"catppuccin-mocha":()=>o(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]),"dark-plus":()=>o(()=>import("./dark-plus-C3mMm8J8.js"),[]),dracula:()=>o(()=>import("./dracula-BzJJZx-M.js"),[]),"dracula-soft":()=>o(()=>import("./dracula-soft-BXkSAIEj.js"),[]),"everforest-dark":()=>o(()=>import("./everforest-dark-BgDCqdQA.js"),[]),"everforest-light":()=>o(()=>import("./everforest-light-C8M2exoo.js"),[]),"github-dark":()=>o(()=>import("./github-dark-DHJKELXO.js"),[]),"github-dark-default":()=>o(()=>import("./github-dark-default-Cuk6v7N8.js"),[]),"github-dark-dimmed":()=>o(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]),"github-dark-high-contrast":()=>o(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]),"github-light":()=>o(()=>import("./github-light-DAi9KRSo.js"),[]),"github-light-default":()=>o(()=>import("./github-light-default-D7oLnXFd.js"),[]),"github-light-high-contrast":()=>o(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]),"gruvbox-dark-hard":()=>o(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]),"gruvbox-dark-medium":()=>o(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]),"gruvbox-dark-soft":()=>o(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]),"gruvbox-light-hard":()=>o(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]),"gruvbox-light-medium":()=>o(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]),"gruvbox-light-soft":()=>o(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]),horizon:()=>o(()=>import("./horizon-BUw7H-hv.js"),[]),"horizon-bright":()=>o(()=>import("./horizon-bright-CUuTKBJd.js"),[]),houston:()=>o(()=>import("./houston-DnULxvSX.js"),[]),"kanagawa-dragon":()=>o(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]),"kanagawa-lotus":()=>o(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]),"kanagawa-wave":()=>o(()=>import("./kanagawa-wave-DWedfzmr.js"),[]),laserwave:()=>o(()=>import("./laserwave-DUszq2jm.js"),[]),"light-plus":()=>o(()=>import("./light-plus-B7mTdjB0.js"),[]),"material-theme":()=>o(()=>import("./material-theme-D5KoaKCx.js"),[]),"material-theme-darker":()=>o(()=>import("./material-theme-darker-BfHTSMKl.js"),[]),"material-theme-lighter":()=>o(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]),"material-theme-ocean":()=>o(()=>import("./material-theme-ocean-CyktbL80.js"),[]),"material-theme-palenight":()=>o(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]),"min-dark":()=>o(()=>import("./min-dark-CafNBF8u.js"),[]),"min-light":()=>o(()=>import("./min-light-CTRr51gU.js"),[]),monokai:()=>o(()=>import("./monokai-D4h5O-jR.js"),[]),"night-owl":()=>o(()=>import("./night-owl-C39BiMTA.js"),[]),"night-owl-light":()=>o(()=>import("./night-owl-light-CMTm3GFP.js"),[]),nord:()=>o(()=>import("./nord-Ddv68eIx.js"),[]),"one-dark-pro":()=>o(()=>import("./one-light-CoLDteqg.js").then(e=>e.o),__vite__mapDeps([101,102])),"one-light":()=>o(()=>import("./one-light-CoLDteqg.js").then(e=>e.e),__vite__mapDeps([101,102])),plastic:()=>o(()=>import("./plastic-3e1v2bzS.js"),[]),poimandres:()=>o(()=>import("./poimandres-CS3Unz2-.js"),[]),red:()=>o(()=>import("./red-bN70gL4F.js"),[]),"rose-pine":()=>o(()=>import("./rose-pine-qdsjHGoJ.js"),[]),"rose-pine-dawn":()=>o(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]),"rose-pine-moon":()=>o(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]),"slack-dark":()=>o(()=>import("./slack-dark-BthQWCQV.js"),[]),"slack-ochin":()=>o(()=>import("./slack-ochin-DqwNpetd.js"),[]),"snazzy-light":()=>o(()=>import("./snazzy-light-Bw305WKR.js"),[]),"solarized-dark":()=>o(()=>import("./solarized-dark-DXbdFlpD.js"),[]),"solarized-light":()=>o(()=>import("./solarized-light-L9t79GZl.js"),[]),"synthwave-84":()=>o(()=>import("./synthwave-84-CbfX1IO0.js"),[]),"tokyo-night":()=>o(()=>import("./tokyo-night-hegEt444.js"),[]),vesper:()=>o(()=>import("./vesper-DRje8inN.js"),[]),"vitesse-black":()=>o(()=>import("./vitesse-black-Bkuqu6BP.js"),[]),"vitesse-dark":()=>o(()=>import("./vitesse-dark-D0r3Knsf.js"),[]),"vitesse-light":()=>o(()=>import("./vitesse-light-CVO1_9PV.js"),[])};function zt(e){return Lt({name:e,collection:io,colorScheme:oo(e),load:ao[e]})}const Fi=he({themes:Object.freeze([...zi.map(e=>zt(e)),...no.map(e=>zt(e))])});he({themes:[Hi,Fi]});function Ui(e){if(yi())throw new Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(U.hasRegisteredTheme(e))return;const t=Fi.getTheme(e);if(t!=null){U.registerThemeIfAbsent(t.name,t.load);return}throw new Error(`No valid theme loader registered for "${e}"`)}function Bi(e,t){if(t.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function so(e){Ui(e);const t=await U.resolveTheme(e);return Bi(e,t),t}function lo(e){return U.getResolvedTheme(e)??so(e)}let G;async function Ft({themes:e,langs:t,preferredHighlighter:i="shiki-js"}){G??=Me({themes:[],langs:["text"],engine:i==="shiki-wasm"?yt(o(()=>import("./wasm-CG6Dc4jp.js"),[])):Ci()});const n=co(G)?await G:G;G=n;const r=[];for(const l of t){if(l==="text"||l==="ansi")continue;const d=Ni(l);"then"in d?r.push(d):Tt(d,n)}const a=[];for(const l of e){const d=lo(l);"then"in d?a.push(d):rt(d,G)}return(r.length>0||a.length>0)&&await Promise.all([Promise.all(r).then(l=>{Tt(l,n)}),Promise.all(a).then(l=>{rt(l,n)})]),n}function gs(){if(G!=null&&!("then"in G))return G}function co(e=G){return e!=null&&"then"in e}for(const e of Hi.getThemes())U.registerThemeIfAbsent(e.name,e.load);function De(e=ee){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function Ut(e){return U.hasResolvedThemes(e)}function $e(e,t){return Oe(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}function Bt(e){return(e.lang??X(e.name))==="text"}function re(e){return{type:"text",value:e}}function A({tagName:e,children:t=[],properties:i={}}){return{type:"element",tagName:e,properties:i,children:t}}function st({name:e,width:t=16,height:i=16,properties:n}){return A({tagName:"svg",properties:{width:t,height:i,viewBox:"0 0 16 16",...n},children:[A({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function uo(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t;"children"in t?t=t.children[0]:t=null}}function _s(e){return A({tagName:"div",properties:{"data-gutter":""},children:e})}function vs(e,t,i,n={}){return A({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":i,...n},children:t!=null?[A({tagName:"span",properties:{"data-line-number-content":""},children:[re(`${t}`)]})]:void 0})}function bs(e,t,i){return A({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":i,"data-line-type":t==="annotation"?void 0:e,style:t==="annotation"?`grid-row: span ${i};`:`grid-row: span ${i};min-height:calc(${i} * 1lh);`}})}function fo(e,t,i){const n=typeof i.lineInfo=="function"?i.lineInfo(t):i.lineInfo[t-1];if(n==null){const r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:i}),new Error(r)}return e.tagName="div",e.properties["data-line"]=n.lineNumber,e.properties["data-alt-line"]=n.altLineNumber,e.properties["data-line-type"]=n.type,e.properties["data-line-index"]=n.lineIndex,e.children.length===0&&e.children.push(re(`
3
+ `)),e}const Ee=Symbol("no-token"),je=Symbol("multiple-tokens");function qi(e){const t=ho(e);if(t!=null)return t;let i=Ee;const n=[];let r=[],a;const l=()=>{if(r.length===0||a==null){r=[],a=void 0;return}if(r.length===1){const s=r[0];if(s?.type==="element"){mo(s,a);for(const f of s.children)Ae(f)}else Ae(s);n.push(s),r=[],a=void 0;return}for(const s of r)Ae(s);n.push(A({tagName:"span",properties:{"data-char":a},children:r})),r=[],a=void 0},d=s=>{if(s!==Ee){if(s===je){i=je;return}if(i===Ee){i=s;return}i!==s&&(i=je)}};for(const s of e.children){const f=s.type==="element"?qi(s):Ee;if(d(f),typeof f!="number"){l(),n.push(s);continue}a!=null&&a!==f&&l(),a??=f,r.push(s)}return l(),e.children=n,i}function ho(e){const t=e.properties["data-char"];if(typeof t=="number")return t}function Ae(e){if(e.type==="element"){e.properties["data-char"]=void 0;for(const t of e.children)Ae(t)}}function mo(e,t){e.properties["data-char"]=t}function po(e={}){const{classPrefix:t="__shiki_",classSuffix:i="",classReplacer:n=d=>d}=e,r=new Map;function a(d){return Object.entries(d).map(([s,f])=>`${s}:${f}`).join(";")}function l(d){let s=t+go(typeof d=="string"?d:a(d))+i;return s=n(s),r.has(s)||r.set(s,typeof d=="string"?d:{...d}),s}return{name:"@shikijs/transformers:style-to-class",pre(d){if(!d.properties.style)return;const s=l(d.properties.style);delete d.properties.style,this.addClassToHast(d,s)},tokens(d){for(const s of d)for(const f of s){if(!f.htmlStyle)continue;const c=l(f.htmlStyle);f.htmlStyle={},f.htmlAttrs||={},f.htmlAttrs.class?f.htmlAttrs.class+=` ${c}`:f.htmlAttrs.class=c}},getClassRegistry(){return r},getCSS(){let d="";for(const[s,f]of r.entries())d+=`.${s}{${typeof f=="string"?f:a(f)}}`;return d},clearRegistry(){r.clear()}}}function go(e,t=0){let i=3735928559^t,n=1103547991^t;for(let r=0,a;r<e.length;r++)a=e.charCodeAt(r),i=Math.imul(i^a,2654435761),n=Math.imul(n^a,1597334677);return i=Math.imul(i^i>>>16,2246822507),i^=Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(i^i>>>13,3266489909),(4294967296*(2097151&n)+(i>>>0)).toString(36).slice(0,6)}function Wi(e=!1,t=!1){const i={lineInfo:[]},n=[{line(r){return delete r.properties.class,r},pre(r){const a=uo(r),l=[];if(a!=null){let d=1;for(const s of a.children)s.type==="element"&&(e&&qi(s),l.push(fo(s,d,i)),d++);a.children=l}return r},...e?{tokens(r){for(const a of r){let l=0;for(const d of a){const s=d;s.__lineChar??=l,l+=d.content.length}}},preprocess(r,a){a.mergeWhitespaces="never"},span(r,a,l,d,s){if(s?.offset!=null&&s.content!=null){const f=s.__lineChar;return f!=null&&(r.properties["data-char"]=f),r}return r}}:null}];return t&&n.push(_o,qt),e&&n.push({line:r=>(r.type==="element"&&r.children.length===0&&r.children.push({type:"element",tagName:"br",properties:{},children:[]}),r)}),{state:i,transformers:n,toClass:qt}}const qt=po({classPrefix:"hl-"}),_o={name:"token-style-normalizer",tokens(e){for(const t of e)for(const i of t){if(i.htmlStyle!=null)continue;const n={};i.color!=null&&(n.color=i.color),i.bgColor!=null&&(n["background-color"]=i.bgColor),i.fontStyle!=null&&i.fontStyle!==0&&((i.fontStyle&1)!==0&&(n["font-style"]="italic"),(i.fontStyle&2)!==0&&(n["font-weight"]="bold"),(i.fontStyle&4)!==0&&(n["text-decoration"]="underline")),Object.keys(n).length>0&&(i.htmlStyle=n)}}};function F(e){return`--${e==="token"?"diffs-token":"diffs"}-`}const Wt=new WeakMap;function Ge(e){const t=Wt.get(e);if(t!=null)return t;const i=e.colors??{},n={...i},r=i["editor.background"]??e.bg,a=i["editor.foreground"]??e.fg,l=i["sideBar.background"]??r,d=i["sideBar.foreground"]??a;W(n,"editor.background",r),W(n,"editor.foreground",a),W(n,"sideBar.background",l),W(n,"sideBar.foreground",d),W(n,"input.background",i["input.background"]??l),W(n,"sideBarSectionHeader.foreground",i["sideBarSectionHeader.foreground"]??d),W(n,"list.activeSelectionForeground",i["list.activeSelectionForeground"]??d),W(n,"gitDecoration.addedResourceForeground",Ke(i["gitDecoration.addedResourceForeground"],i["terminal.ansiGreen"],i["editorGutter.addedBackground"])),W(n,"gitDecoration.modifiedResourceForeground",Ke(i["gitDecoration.modifiedResourceForeground"],i["terminal.ansiBlue"],i["editorGutter.modifiedBackground"])),W(n,"gitDecoration.deletedResourceForeground",Ke(i["gitDecoration.deletedResourceForeground"],i["terminal.ansiRed"],i["editorGutter.deletedBackground"]));const s=(kt(i["list.focusOutline"])?void 0:i["list.focusOutline"])??(kt(i.focusBorder)?void 0:i.focusBorder);s!=null?n["list.focusOutline"]=s:delete n["list.focusOutline"];const f=i["list.hoverBackground"];f!=null&&(vo(f,l)||fn(f,l,d))&&delete n["list.hoverBackground"];const c=Object.freeze({...e,colors:Object.freeze(n)});return Wt.set(e,c),c}function W(e,t,i){i!=null&&i!==""&&(e[t]=i)}function Ke(...e){for(const t of e)if(t!=null&&t!=="")return t}function vo(e,t){return t!=null&&e.toLowerCase()===t.toLowerCase()}function $i({theme:e=ee,highlighter:t,prefix:i}){let n="";if(typeof e=="string"){const r=t.getTheme(e),a=Ge(r);n+=`color:${a.fg};`,n+=`background-color:${a.bg};`,n+=`${F("global")}fg:${a.fg};`,n+=`${F("global")}bg:${a.bg};`,n+=Qe(r,i)}else{let r=t.getTheme(e.dark),a=Ge(r);n+=`${F("global")}dark:${a.fg};`,n+=`${F("global")}dark-bg:${a.bg};`,n+=Qe(r,"dark"),r=t.getTheme(e.light),a=Ge(r),n+=`${F("global")}light:${a.fg};`,n+=`${F("global")}light-bg:${a.bg};`,n+=Qe(r,"light")}return n}function Qe(e,t){t=t!=null?`${t}-`:"";let i="";const n=e.colors?.["gitDecoration.addedResourceForeground"]??e.colors?.["terminal.ansiGreen"];n!=null&&(i+=`${F("global")}${t}addition-color:${n};`);const r=e.colors?.["gitDecoration.deletedResourceForeground"]??e.colors?.["terminal.ansiRed"];r!=null&&(i+=`${F("global")}${t}deletion-color:${r};`);const a=e.colors?.["gitDecoration.modifiedResourceForeground"]??e.colors?.["terminal.ansiBlue"];return a!=null&&(i+=`${F("global")}${t}modified-color:${a};`),i}function lt(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t.children;"children"in t?t=t.children[0]:t=null}throw console.error(e),new Error("getLineNodes: Unable to find children")}const bo={forcePlainText:!1};function Eo(e,t,{theme:i=ee,tokenizeMaxLineLength:n,useTokenTransformer:r},{forcePlainText:a,startingLine:l,totalLines:d,lines:s}=bo){a?(l??=0,d??=1/0):(l=0,d=1/0);const f=l>0||d<1/0,{state:c,transformers:u}=Wi(r),h=a?"text":e.lang??X(e.name),m=typeof i=="string"?t.getTheme(i).type:void 0,p=$i({theme:i,highlighter:t});c.lineInfo=_=>({type:"context",lineIndex:_-1+l,lineNumber:_+l});const g=typeof i=="string"?{lang:h,theme:i,transformers:u,defaultColor:!1,cssVariablePrefix:F("token"),tokenizeMaxLineLength:n,tokenizeTimeLimit:0}:{lang:h,themes:i,transformers:u,defaultColor:!1,cssVariablePrefix:F("token"),tokenizeMaxLineLength:n,tokenizeTimeLimit:0},y=lt(t.codeToHast(f?yo(s??hn(e.contents),l,d):e.contents,g)),v=f?new Array(l):y;return f&&v.push(...y),{code:v,themeStyles:p,baseThemeType:m}}function yo(e,t,i){if(e.length===0)return"";const n=Math.min(t+i,e.length);return e.slice(t,n).join("")}function Lo(e,t){return e===t||e?.cacheKey!=null&&e.cacheKey===t?.cacheKey}function ye(e,t){return Oe(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function $t(e){const t=e.lang??X(e.name),i=e.lang??(e.prevName!=null?X(e.prevName):"text");return t==="text"&&i==="text"}function oe(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}function Es(e){return{...mn,...e}}function ys(e,t){const i=ko(e,t);return t?i:e.diffHeaderHeight+i}function ko(e,t){return e.paddingTop??(t?e.spacing:0)}function Ls(e){return e.paddingBottom??e.spacing}function To(e){switch(e){case"simple":return 4;case"metadata":case"line-info":case"line-info-basic":case"custom":return 32}}function dt(e){return[fe(e.additionStart,e.additionCount)+1,te(e.additionStart,e.additionCount)+1]}function He({isPartial:e,rangeSize:t,expandedHunks:i,hunkIndex:n,collapsedContextThreshold:r}){const a=Math.max(t,0);if(a===0||e)return{fromStart:0,fromEnd:0,rangeSize:a,collapsedLines:a,renderAll:!1};if(i===!0||a<=r)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};const l=i?.get(n),d=Math.min(Math.max(l?.fromStart??0,0),a),s=Math.min(Math.max(l?.fromEnd??0,0),a),f=d+s,c=f>=a;return{fromStart:c?a:d,fromEnd:c?0:s,rangeSize:a,collapsedLines:Math.max(a-f,0),renderAll:c}}function ks(e){const t=e.hunks[e.hunks.length-1];if(t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return!1;const i=e.additionLines.length-te(t.additionStart,t.additionCount),n=e.deletionLines.length-te(t.deletionStart,t.deletionCount);return i<=0&&n<=0?!1:i!==n}function Io({fileDiff:e,errorPrefix:t}){const i=e.hunks[e.hunks.length-1];if(i==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;const n=e.additionLines.length-te(i.additionStart,i.additionCount),r=e.deletionLines.length-te(i.deletionStart,i.deletionCount);if(n<=0&&r<=0)return 0;if(n!==r)throw new Error(`${t}: trailing context mismatch (additions=${n}, deletions=${r}) for ${e.name}`);return Math.min(n,r)}function ze({fileDiff:e,hunkIndex:t,expandedHunks:i,collapsedContextThreshold:n,errorPrefix:r}){if(t!==e.hunks.length-1)return;const a=Io({fileDiff:e,errorPrefix:r});if(a<=0)return;if(i===!0||a<=n)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};const l=i?.get(e.hunks.length),d=Math.min(Math.max(l?.fromStart??0,0),a);return{fromStart:d,fromEnd:0,rangeSize:a,collapsedLines:a-d,renderAll:d>=a}}function Ts({fileDiff:e,lineNumber:t,expandedHunks:i,collapsedContextThreshold:n}){if(i===!0||e.isPartial)return!0;for(const[d,s]of e.hunks.entries()){const[f,c]=dt(s);if(t<f){const u=He({isPartial:e.isPartial,rangeSize:s.collapsedBefore,expandedHunks:i,hunkIndex:d,collapsedContextThreshold:n}),h=f-u.rangeSize;return u.renderAll||t<h+u.fromStart||t>=f-u.fromEnd}if(t<c)return!0}const r=ze({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:i,collapsedContextThreshold:n,errorPrefix:"isAdditionLineRenderable"});if(r==null||r.renderAll)return!0;const a=e.hunks[e.hunks.length-1],[,l]=dt(a);return t<l+r.fromStart||t>=l+r.rangeSize}function Is({fileDiff:e,lineNumber:t,direction:i,expandedHunks:n,collapsedContextThreshold:r}){if(n===!0||e.isPartial)return t;const a=[];let l=1;for(const[s,f]of e.hunks.entries()){const[c,u]=dt(f),h=He({isPartial:e.isPartial,rangeSize:f.collapsedBefore,expandedHunks:n,hunkIndex:s,collapsedContextThreshold:r}),m=c-h.rangeSize;h.renderAll?a.push([m,c]):(h.fromStart>0&&a.push([m,m+h.fromStart]),h.fromEnd>0&&a.push([c-h.fromEnd,c])),a.push([c,u]),l=u}const d=ze({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:"getNearestRenderableAdditionLine"});if(d!=null){const s=l;l=s+d.rangeSize,d.renderAll?a.push([s,l]):d.fromStart>0&&a.push([s,s+d.fromStart])}if(t>=l)return t;if(i==="down"){for(const[s,f]of a)if(f>t)return Math.max(s,t);return}for(let s=a.length-1;s>=0;s--){const[f,c]=a[s];if(f<=t)return Math.min(c-1,t)}}function ji({type:e,metrics:t}){return t.hunkSeparatorHeight??To(e)}function Gi({type:e,metrics:t}){return e==="simple"||e==="metadata"||e==="line-info-basic"?0:t.spacing}function Ro({type:e,hunkIndex:t,hunkSpecs:i}){switch(e){case"simple":return t>0;case"metadata":return i!=null;case"line-info":case"line-info-basic":case"custom":return!0}}function So(e){return e!=="simple"&&e!=="metadata"}function Rs({type:e,metrics:t,hunkIndex:i,hunkSpecs:n}){if(!Ro({type:e,hunkIndex:i,hunkSpecs:n}))return;const r=ji({type:e,metrics:t}),a=Gi({type:e,metrics:t}),l=i>0?a:0,d=a;return{height:r,gapBefore:l,gapAfter:d,totalHeight:l+r+d}}function Ss({type:e,metrics:t}){if(!So(e))return;const i=ji({type:e,metrics:t}),n=Gi({type:e,metrics:t});return{height:i,gapBefore:n,gapAfter:0,totalHeight:n+i}}function Po({diff:e,diffStyle:t,startingLine:i=0,totalLines:n=1/0,expandedHunks:r,collapsedContextThreshold:a=1,callback:l}){const d=xo({diff:e,diffStyle:t,startingLine:i,expandedHunks:r,collapsedContextThreshold:a}),s={viewportStart:i,viewportEnd:i+n,isWindowedHighlight:i>0||n<1/0,splitCount:d.splitCount,unifiedCount:d.unifiedCount,finalHunkIndex:e.hunks.length-1,shouldBreak(){if(!s.isWindowedHighlight)return!1;const f=s.unifiedCount>=i+n,c=s.splitCount>=i+n;return t==="unified"?f:(t==="split"||f)&&c},shouldSkip(f,c){if(!s.isWindowedHighlight)return!1;const u=f>0&&s.unifiedCount+f<=i,h=c>0&&s.splitCount+c<=i;return t==="unified"?u:(t==="split"||u)&&h},incrementCounts(f,c){(t==="unified"||t==="both")&&(s.unifiedCount+=f),(t==="split"||t==="both")&&(s.splitCount+=c)},isInWindow(f,c){if(!s.isWindowedHighlight)return!0;const u=s.isInUnifiedWindow(f),h=s.isInSplitWindow(c);return t==="unified"?u:t==="split"?h:u||h},isInUnifiedWindow(f){return!s.isWindowedHighlight||s.unifiedCount>=i-f&&s.unifiedCount<i+n},isInSplitWindow(f){return!s.isWindowedHighlight||s.splitCount>=i-f&&s.splitCount<i+n},emit(f,c=!1){return c||(t==="unified"?s.incrementCounts(1,0):t==="split"?s.incrementCounts(0,1):s.incrementCounts(1,1)),l(f)??!1}};e:for(let f=d.hunkIndex;f<e.hunks.length;f++){let _=function(I,P){return y==null||y.collapsedLines<=0||y.fromStart+y.fromEnd>0?0:t==="unified"?I===c.unifiedLineStart+c.unifiedLineCount-1?y.collapsedLines:0:P===c.splitLineStart+c.splitLineCount-1?y.collapsedLines:0},k=function(){return b?0:(b=!0,g.collapsedLines)};const c=e.hunks[f];if(c==null)throw new Error("iterateOverDiff: invalid hunk index");if(s.shouldBreak())break;const u=fe(c.deletionStart,c.deletionCount),h=fe(c.additionStart,c.additionCount),m=!e.isPartial&&c.deletionCount===0?u:c.deletionLineIndex,p=!e.isPartial&&c.additionCount===0?h:c.additionLineIndex,g=He({isPartial:e.isPartial,rangeSize:c.collapsedBefore,expandedHunks:r,hunkIndex:f,collapsedContextThreshold:a}),y=f===s.finalHunkIndex?ze({fileDiff:e,hunkIndex:f,expandedHunks:r,collapsedContextThreshold:a,errorPrefix:"iterateOverDiff"}):void 0,v=g.fromStart+g.fromEnd;let b=g.collapsedLines===0;if(s.shouldSkip(v,v))s.incrementCounts(v,v),k();else{let I=c.unifiedLineStart-g.rangeSize,P=c.splitLineStart-g.rangeSize,N=m-g.rangeSize,H=p-g.rangeSize,w=u+1-g.rangeSize,B=h+1-g.rangeSize;if(Le(s,g.fromStart,t,O=>s.emit({hunkIndex:f,hunk:c,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:w+O,lineIndex:N+O,noEOFCR:!1,unifiedLineIndex:I+O,splitLineIndex:P+O},additionLine:{unifiedLineIndex:I+O,splitLineIndex:P+O,lineIndex:H+O,lineNumber:B+O,noEOFCR:!1}}))||(I=c.unifiedLineStart-g.fromEnd,P=c.splitLineStart-g.fromEnd,N=m-g.fromEnd,H=p-g.fromEnd,w=u+1-g.fromEnd,B=h+1-g.fromEnd,Le(s,g.fromEnd,t,O=>s.emit({hunkIndex:f,hunk:c,collapsedBefore:k(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:w+O,lineIndex:N+O,noEOFCR:!1,unifiedLineIndex:I+O,splitLineIndex:P+O},additionLine:{unifiedLineIndex:I+O,splitLineIndex:P+O,lineIndex:H+O,lineNumber:B+O,noEOFCR:!1}}),()=>{k()})))break e}let R=c.unifiedLineStart,E=c.splitLineStart,T=m,S=p,L=u+1,x=h+1;const D=c.hunkContent.at(-1);for(const I of c.hunkContent){if(s.shouldBreak())break e;const P=I===D;if(I.type==="context"){if(s.shouldSkip(I.lines,I.lines))s.incrementCounts(I.lines,I.lines),k();else if(Le(s,I.lines,t,N=>{const H=P&&N===I.lines-1,w=R+N,B=E+N;return s.emit({hunkIndex:f,hunk:c,collapsedBefore:k(),collapsedAfter:_(w,B),type:"context",deletionLine:{lineNumber:L+N,lineIndex:T+N,noEOFCR:H&&c.noEOFCRDeletions,unifiedLineIndex:w,splitLineIndex:B},additionLine:{unifiedLineIndex:w,splitLineIndex:B,lineIndex:S+N,lineNumber:x+N,noEOFCR:H&&c.noEOFCRAdditions}})},()=>{k()}))break e;R+=I.lines,E+=I.lines,T+=I.lines,S+=I.lines,L+=I.lines,x+=I.lines}else{const N=Math.max(I.deletions,I.additions),H=I.deletions+I.additions;if(!s.shouldSkip(H,N)){const w=Do(s,I,t);(w[0]?.[0]??0)>0&&k();for(const[B,O]of w)for(let Y=B;Y<O;Y++){const un=_(R+Y,t==="unified"?E+(Y<I.deletions?Y:Y-I.deletions):E+Y);if(s.emit(Oo({hunkIndex:f,hunk:c,collapsedBefore:k(),collapsedAfter:un,diffStyle:t,index:Y,unifiedLineIndex:R,splitLineIndex:E,additionLineIndex:S,deletionLineIndex:T,additionLineNumber:x,deletionLineNumber:L,content:I,isLastContent:P,unifiedCount:H,splitCount:N}),!0))break e}}k(),s.incrementCounts(H,N),R+=H,E+=N,T+=I.deletions,S+=I.additions,L+=I.deletions,x+=I.additions}}if(y!=null){const{collapsedLines:I,fromStart:P,fromEnd:N}=y,H=P+N;if(Le(s,H,t,w=>{const B=w===H-1;return s.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:B?I:0,type:"context-expanded",deletionLine:{lineNumber:L+w,lineIndex:T+w,noEOFCR:!1,unifiedLineIndex:R+w,splitLineIndex:E+w},additionLine:{unifiedLineIndex:R+w,splitLineIndex:E+w,lineIndex:S+w,lineNumber:x+w,noEOFCR:!1}})},void 0,()=>s.shouldBreak()))break e}}}function xo({diff:e,diffStyle:t,startingLine:i,expandedHunks:n,collapsedContextThreshold:r}){if(i<=0||t==="both")return{hunkIndex:0,splitCount:0,unifiedCount:0};const a=Ao({diff:e,expandedHunks:n,collapsedContextThreshold:r});let l=0,d=e.hunks.length-1,s=e.hunks.length;for(;l<=d;){const c=l+d>>1,u=a[c+1];if(u==null)throw new Error("iterateOverDiff: invalid hunk prefix index");(t==="unified"?u.unifiedCount:u.splitCount)>i?(s=c,d=c-1):l=c+1}if(s>=e.hunks.length){const c=a[e.hunks.length];if(c==null)throw new Error("iterateOverDiff: invalid terminal hunk prefix index");return{hunkIndex:e.hunks.length,splitCount:c.splitCount,unifiedCount:c.unifiedCount}}const f=a[s];if(f==null)throw new Error("iterateOverDiff: invalid selected hunk prefix index");return{hunkIndex:s,splitCount:f.splitCount,unifiedCount:f.unifiedCount}}function Ao({diff:e,expandedHunks:t,collapsedContextThreshold:i}){let n=0,r=0;const a=e.hunks.length-1,l=[{splitCount:0,unifiedCount:0}];for(let d=0;d<e.hunks.length;d++){const s=e.hunks[d];if(s==null)throw new Error("iterateOverDiff: invalid hunk summary index");const f=He({isPartial:e.isPartial,rangeSize:s.collapsedBefore,expandedHunks:t,hunkIndex:d,collapsedContextThreshold:i}),c=f.fromStart+f.fromEnd;n+=c+s.splitLineCount,r+=c+s.unifiedLineCount;const u=d===a?ze({fileDiff:e,hunkIndex:d,expandedHunks:t,collapsedContextThreshold:i,errorPrefix:"iterateOverDiff"}):void 0;if(u!=null){const h=u.fromStart+u.fromEnd;n+=h,r+=h}l.push({splitCount:n,unifiedCount:r})}return l}function wo(e,t,i){if(!e.isWindowedHighlight||t<=0)return[0,t];const n=[];function r(d){const s=Math.max(0,e.viewportStart-d),f=Math.min(t,e.viewportEnd-d);f>s&&n.push([s,f])}if(i!=="split"&&r(e.unifiedCount),i!=="unified"&&r(e.splitCount),n.length===0)return[0,0];let a=n[0][0],l=n[0][1];for(let d=1;d<n.length;d++){const s=n[d];a=Math.min(a,s[0]),l=Math.max(l,s[1])}return[a,l]}function Le(e,t,i,n,r,a){const[l,d]=wo(e,t,i);l>0&&(e.incrementCounts(l,l),r?.());let s=l;for(;s<t;){if(a?.()===!0)return!0;if(s>=d){e.incrementCounts(t-s,t-s);break}if(e.isInWindow(0,0)){if(n(s)===!0)return!0}else e.incrementCounts(1,1);s++}return!1}function Do(e,t,i){if(!e.isWindowedHighlight)return[[0,i==="unified"?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];const n=i!=="split",r=i!=="unified",a=i==="unified"?"unified":"split",l=[];function d(u,h){if(u+h<=e.viewportStart||u>=e.viewportEnd)return;const m=Math.max(0,e.viewportStart-u),p=Math.min(h,e.viewportEnd-u);return p>m?[m,p]:void 0}function s(u,h){return a==="split"?u:h==="additions"?[u[0]+t.deletions,u[1]+t.deletions]:u}function f(u,h){if(u==null)return;const[m,p]=s(u,h);p>m&&l.push([m,p])}if(n&&(f(d(e.unifiedCount,t.deletions),"deletions"),f(d(e.unifiedCount+t.deletions,t.additions),"additions")),r&&(f(d(e.splitCount,t.deletions),"deletions"),f(d(e.splitCount,t.additions),"additions")),l.length===0)return l;l.sort((u,h)=>u[0]-h[0]);const c=[l[0]];for(const[u,h]of l.slice(1)){const m=c[c.length-1];u<=m[1]?m[1]=Math.max(m[1],h):c.push([u,h])}return c}function Oo({hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:n,diffStyle:r,index:a,unifiedLineIndex:l,splitLineIndex:d,additionLineIndex:s,deletionLineIndex:f,additionLineNumber:c,deletionLineNumber:u,content:h,isLastContent:m,unifiedCount:p,splitCount:g}){const y=a<h.deletions?l+a:void 0,v=r==="unified"?a>=h.deletions?l+a:void 0:a<h.additions?l+h.deletions+a:void 0,_=r==="unified"?d+(a<h.deletions?a:a-h.deletions):d+a,b=a<h.deletions?f+a:void 0,k=a<h.deletions?u+a:void 0,R=r==="unified"?a>=h.deletions?s+(a-h.deletions):void 0:a<h.additions?s+a:void 0,E=r==="unified"?a>=h.deletions?c+(a-h.deletions):void 0:a<h.additions?c+a:void 0,T=r==="unified"?m&&a===h.deletions-1&&t.noEOFCRDeletions:m&&a===g-1&&t.noEOFCRDeletions,S=r==="unified"?m&&a===p-1&&t.noEOFCRAdditions:m&&a===g-1&&t.noEOFCRAdditions,L=b!=null&&k!=null&&y!=null?{lineNumber:k,lineIndex:b,noEOFCR:T,unifiedLineIndex:y,splitLineIndex:_}:void 0,x=R!=null&&E!=null&&v!=null?{unifiedLineIndex:v,splitLineIndex:_,lineIndex:R,lineNumber:E,noEOFCR:S}:void 0;if(L==null&&x!=null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:n,deletionLine:void 0,additionLine:x};if(L!=null&&x==null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:n,deletionLine:L,additionLine:void 0};if(L==null||x==null)throw new Error("iterateOverDiff: missing change line data");return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:i,collapsedBefore:n,deletionLine:L,additionLine:x}}class Ki{diff(t,i,n={}){let r;typeof n=="function"?(r=n,n={}):"callback"in n&&(r=n.callback);const a=this.castInput(t,n),l=this.castInput(i,n),d=this.removeEmpty(this.tokenize(a,n)),s=this.removeEmpty(this.tokenize(l,n));return this.diffWithOptionsObj(d,s,n,r)}diffWithOptionsObj(t,i,n,r){var a;const l=_=>{if(_=this.postProcess(_,n),r){setTimeout(function(){r(_)},0);return}else return _},d=i.length,s=t.length;let f=1,c=d+s;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));const u=(a=n.timeout)!==null&&a!==void 0?a:1/0,h=Date.now()+u,m=[{oldPos:-1,lastComponent:void 0}];let p=this.extractCommon(m[0],i,t,0,n);if(m[0].oldPos+1>=s&&p+1>=d)return l(this.buildValues(m[0].lastComponent,i,t));let g=-1/0,y=1/0;const v=()=>{for(let _=Math.max(g,-f);_<=Math.min(y,f);_+=2){let b;const k=m[_-1],R=m[_+1];k&&(m[_-1]=void 0);let E=!1;if(R){const S=R.oldPos-_;E=R&&0<=S&&S<d}const T=k&&k.oldPos+1<s;if(!E&&!T){m[_]=void 0;continue}if(!T||E&&k.oldPos<R.oldPos?b=this.addToPath(R,!0,!1,0,n):b=this.addToPath(k,!1,!0,1,n),p=this.extractCommon(b,i,t,_,n),b.oldPos+1>=s&&p+1>=d)return l(this.buildValues(b.lastComponent,i,t))||!0;m[_]=b,b.oldPos+1>=s&&(y=Math.min(y,_-1)),p+1>=d&&(g=Math.max(g,_+1))}f++};if(r)(function _(){setTimeout(function(){if(f>c||Date.now()>h)return r(void 0);v()||_()},0)})();else for(;f<=c&&Date.now()<=h;){const _=v();if(_)return _}}addToPath(t,i,n,r,a){const l=t.lastComponent;return l&&!a.oneChangePerToken&&l.added===i&&l.removed===n?{oldPos:t.oldPos+r,lastComponent:{count:l.count+1,added:i,removed:n,previousComponent:l.previousComponent}}:{oldPos:t.oldPos+r,lastComponent:{count:1,added:i,removed:n,previousComponent:l}}}extractCommon(t,i,n,r,a){const l=i.length,d=n.length;let s=t.oldPos,f=s-r,c=0;for(;f+1<l&&s+1<d&&this.equals(n[s+1],i[f+1],a);)f++,s++,c++,a.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return c&&!a.oneChangePerToken&&(t.lastComponent={count:c,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=s,f}equals(t,i,n){return n.comparator?n.comparator(t,i):t===i||!!n.ignoreCase&&t.toLowerCase()===i.toLowerCase()}removeEmpty(t){const i=[];for(let n=0;n<t.length;n++)t[n]&&i.push(t[n]);return i}castInput(t,i){return t}tokenize(t,i){return Array.from(t)}join(t){return t.join("")}postProcess(t,i){return t}get useLongestToken(){return!1}buildValues(t,i,n){const r=[];let a;for(;t;)r.push(t),a=t.previousComponent,delete t.previousComponent,t=a;r.reverse();const l=r.length;let d=0,s=0,f=0;for(;d<l;d++){const c=r[d];if(c.removed)c.value=this.join(n.slice(f,f+c.count)),f+=c.count;else{if(!c.added&&this.useLongestToken){let u=i.slice(s,s+c.count);u=u.map(function(h,m){const p=n[f+m];return p.length>h.length?p:h}),c.value=this.join(u)}else c.value=this.join(i.slice(s,s+c.count));s+=c.count,c.added||(f+=c.count)}}return r}}class Co extends Ki{}const Vo=new Co;function No(e,t,i){return Vo.diff(e,t,i)}const jt="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";class Mo extends Ki{tokenize(t){const i=new RegExp(`(\\r?\\n)|[${jt}]+|[^\\S\\n\\r]+|[^${jt}]`,"ug");return t.match(i)||[]}}const Ho=new Mo;function zo(e,t,i){return Ho.diff(e,t,i)}function Gt({line:e,spanStart:t,spanLength:i}){return{start:{line:e,character:t},end:{line:e,character:t+i},properties:{"data-diff-span":""},alwaysWrap:!0}}function ke({item:e,arr:t,enableJoin:i,isNeutral:n=!1,isLastItem:r=!1}){const a=t[t.length-1];if(a==null||r||!i){t.push([n?0:1,e.value]);return}const l=a[0]===0;if(n===l||n&&e.value.length===1&&!l){a[1]+=e.value;return}t.push([n?0:1,e.value])}const Fo={forcePlainText:!1};function Uo(e,t,i,{forcePlainText:n,startingLine:r,totalLines:a,expandedHunks:l,collapsedContextThreshold:d=1}=Fo){n?(r??=0,a??=1/0):(r=0,a=1/0);const s=r>0||a<1/0,f=typeof i.theme=="string"?t.getTheme(i.theme).type:void 0,c=$i({theme:i.theme,highlighter:t}),u=n&&!s&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?"none":i.lineDiffType,h={deletionLines:[],additionLines:[]},{maxLineDiffLength:m}=i,p=!n&&!e.isPartial,g=n?l:void 0,y=new Map;function v(b){const k=p?0:b,R=y.get(k)??qo();return y.set(k,R),R}function _(b,k,R,E){if(s){let T=R.at(-1);(T==null||T.targetIndex+T.count!==k)&&(T={targetIndex:k,originalOffset:E.length,count:0},R.push(T)),T.count++}E.push(b)}Po({diff:e,diffStyle:"both",startingLine:r,totalLines:a,expandedHunks:s?g:!0,collapsedContextThreshold:d,callback:({hunkIndex:b,additionLine:k,deletionLine:R,type:E})=>{const T=v(b),S=k!=null?k.splitLineIndex:R.splitLineIndex;E==="change"&&k!=null&&R!=null&&Bo({additionLine:e.additionLines[k.lineIndex],deletionLine:e.deletionLines[R.lineIndex],deletionLineIndex:T.deletionContent.length,additionLineIndex:T.additionContent.length,deletionDecorations:T.deletionDecorations,additionDecorations:T.additionDecorations,lineDiffType:u,maxLineDiffLength:m}),R!=null&&(_(e.deletionLines[R.lineIndex],R.lineIndex,T.deletionSegments,T.deletionContent),T.deletionInfo.push({type:E==="change"?"change-deletion":E,lineNumber:R.lineNumber,altLineNumber:E==="change"?void 0:k.lineNumber??void 0,lineIndex:`${R.unifiedLineIndex},${S}`})),k!=null&&(_(e.additionLines[k.lineIndex],k.lineIndex,T.additionSegments,T.additionContent),T.additionInfo.push({type:E==="change"?"change-addition":E,lineNumber:k.lineNumber,altLineNumber:E==="change"?void 0:R.lineNumber??void 0,lineIndex:`${k.unifiedLineIndex},${S}`}))}});for(const b of y.values()){if(b.deletionContent.length===0&&b.additionContent.length===0)continue;const k={name:e.prevName??e.name,contents:b.deletionContent.value},R={name:e.name,contents:b.additionContent.value},{deletionLines:E,additionLines:T}=Wo({deletionFile:k,deletionInfo:b.deletionInfo,deletionDecorations:b.deletionDecorations,additionFile:R,additionInfo:b.additionInfo,additionDecorations:b.additionDecorations,highlighter:t,options:i,languageOverride:n?"text":e.lang});if(p){h.deletionLines=E,h.additionLines=T;continue}if(b.deletionSegments.length>0)for(const S of b.deletionSegments)for(let L=0;L<S.count;L++)h.deletionLines[S.targetIndex+L]=E[S.originalOffset+L];else h.deletionLines.push(...E);if(b.additionSegments.length>0)for(const S of b.additionSegments)for(let L=0;L<S.count;L++)h.additionLines[S.targetIndex+L]=T[S.originalOffset+L];else h.additionLines.push(...T)}return{code:h,themeStyles:c,baseThemeType:f}}function Bo({deletionLine:e,additionLine:t,deletionLineIndex:i,additionLineIndex:n,deletionDecorations:r,additionDecorations:a,lineDiffType:l,maxLineDiffLength:d}){if(e==null||t==null||l==="none"||(e=oe(e),t=oe(t),e.length>d||t.length>d))return;const s=l==="char"?No(e,t):zo(e,t),f=[],c=[],u=l==="word-alt",h=s.at(-1);for(const p of s){const g=p===h;!p.added&&!p.removed?(ke({item:p,arr:f,enableJoin:u,isNeutral:!0,isLastItem:g}),ke({item:p,arr:c,enableJoin:u,isNeutral:!0,isLastItem:g})):p.removed?ke({item:p,arr:f,enableJoin:u,isLastItem:g}):ke({item:p,arr:c,enableJoin:u,isLastItem:g})}let m=0;for(const p of f)p[0]===1&&r.push(Gt({line:i,spanStart:m,spanLength:p[1].length})),m+=p[1].length;m=0;for(const p of c)p[0]===1&&a.push(Gt({line:n,spanStart:m,spanLength:p[1].length})),m+=p[1].length}function qo(){return{deletionContent:{push(e){this.value+=e,this.length++},value:"",length:0},additionContent:{push(e){this.value+=e,this.length++},value:"",length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function Wo({deletionFile:e,additionFile:t,deletionInfo:i,additionInfo:n,highlighter:r,deletionDecorations:a,additionDecorations:l,languageOverride:d,options:{theme:s=ee,...f}}){const c=d??X(e.name),u=d??X(t.name),{state:h,transformers:m}=Wi(f.useTokenTransformer),p=typeof s=="string"?{...f,lang:"text",theme:s,transformers:m,decorations:void 0,defaultColor:!1,cssVariablePrefix:F("token"),tokenizeTimeLimit:0}:{...f,lang:"text",themes:s,transformers:m,decorations:void 0,defaultColor:!1,cssVariablePrefix:F("token"),tokenizeTimeLimit:0};return{deletionLines:e.contents===""?[]:(p.lang=c,h.lineInfo=i,p.decorations=a,lt(r.codeToHast(oe(e.contents),p))),additionLines:t.contents===""?[]:(p.lang=u,p.decorations=l,h.lineInfo=n,lt(r.codeToHast(oe(t.contents),p)))}}function Kt(e){const t=[];for(const i of e){const n=ie.get(i);if(n==null)throw new Error(`getResolvedLanguages: ${i} is not resolved. Please resolve languages before calling getResolvedLanguages`);t.push(n)}return t}function Qt(e){for(const t of Array.isArray(e)?e:[e])if(!ie.has(t))return!1;return!0}async function Jt(e){const t=[],i=[];for(const n of e){if(n==="text"||n==="ansi")continue;const r=Ni(n)??Vi(n);"then"in r?i.push(r):t.push(r)}return i.length>0&&await Promise.all(i).then(n=>{for(const r of n){if(r==null)throw new Error("resolvedLanguages: unable to resolve language");t.push(r)}}),t}function Xt(e){return U.getResolvedThemes(e)}async function Yt(e){for(const i of e)Ui(i);const t=await U.resolveThemes(e);for(let i=0;i<e.length;i++)Bi(e[i],t[i]);return t}var de={exports:{}},$o=de.exports,Zt;function jo(){return Zt||(Zt=1,(function(e,t){(function(i,n){n(t)})($o,function(i){const n=Symbol("newer"),r=Symbol("older");class a{constructor(u,h){typeof u!="number"&&(h=u,u=0),this.size=0,this.limit=u,this.oldest=this.newest=void 0,this._keymap=new Map,h&&(this.assign(h),u<1&&(this.limit=this.size))}_markEntryAsUsed(u){u!==this.newest&&(u[n]&&(u===this.oldest&&(this.oldest=u[n]),u[n][r]=u[r]),u[r]&&(u[r][n]=u[n]),u[n]=void 0,u[r]=this.newest,this.newest&&(this.newest[n]=u),this.newest=u)}assign(u){let h,m=this.limit||Number.MAX_VALUE;this._keymap.clear();let p=u[Symbol.iterator]();for(let g=p.next();!g.done;g=p.next()){let y=new l(g.value[0],g.value[1]);if(this._keymap.set(y.key,y),h?(h[n]=y,y[r]=h):this.oldest=y,h=y,m--==0)throw new Error("overflow")}this.newest=h,this.size=this._keymap.size}get(u){var h=this._keymap.get(u);return h?(this._markEntryAsUsed(h),h.value):void 0}set(u,h){var m=this._keymap.get(u);return m?(m.value=h,this._markEntryAsUsed(m),this):(this._keymap.set(u,m=new l(u,h)),this.newest?(this.newest[n]=m,m[r]=this.newest):this.oldest=m,this.newest=m,++this.size,this.size>this.limit&&this.shift(),this)}shift(){var u=this.oldest;if(u)return this.oldest[n]?(this.oldest=this.oldest[n],this.oldest[r]=void 0):(this.oldest=void 0,this.newest=void 0),u[n]=u[r]=void 0,this._keymap.delete(u.key),--this.size,[u.key,u.value]}find(u){let h=this._keymap.get(u);return h?h.value:void 0}has(u){return this._keymap.has(u)}delete(u){var h=this._keymap.get(u);return h?(this._keymap.delete(h.key),h[n]&&h[r]?(h[r][n]=h[n],h[n][r]=h[r]):h[n]?(h[n][r]=void 0,this.oldest=h[n]):h[r]?(h[r][n]=void 0,this.newest=h[r]):this.oldest=this.newest=void 0,this.size--,h.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new s(this.oldest)}values(){return new f(this.oldest)}entries(){return this}[Symbol.iterator](){return new d(this.oldest)}forEach(u,h){typeof h!="object"&&(h=this);let m=this.oldest;for(;m;)u.call(h,m.value,m.key,this),m=m[n]}toJSON(){for(var u=new Array(this.size),h=0,m=this.oldest;m;)u[h++]={key:m.key,value:m.value},m=m[n];return u}toString(){for(var u="",h=this.oldest;h;)u+=String(h.key)+":"+h.value,h=h[n],h&&(u+=" < ");return u}}i.LRUMap=a;function l(c,u){this.key=c,this.value=u,this[n]=void 0,this[r]=void 0}function d(c){this.entry=c}d.prototype[Symbol.iterator]=function(){return this},d.prototype.next=function(){let c=this.entry;return c?(this.entry=c[n],{done:!1,value:[c.key,c.value]}):{done:!0,value:void 0}};function s(c){this.entry=c}s.prototype[Symbol.iterator]=function(){return this},s.prototype.next=function(){let c=this.entry;return c?(this.entry=c[n],{done:!1,value:c.key}):{done:!0,value:void 0}};function f(c){this.entry=c}f.prototype[Symbol.iterator]=function(){return this},f.prototype.next=function(){let c=this.entry;return c?(this.entry=c[n],{done:!1,value:c.value}):{done:!0,value:void 0}}})})(de,de.exports)),de.exports}var Go=jo();const ei=Hn(Go),Te=Symbol("IGNORE_RESPONSE");var Ie=class extends Error{constructor(){super("WorkerPoolManager: operation canceled because the pool terminated")}},Je=class extends Error{constructor(){super("WorkerPoolManager: operation canceled before the task completed")}},Ko=class{options;highlighter;preferredHighlighter;renderOptions;renderOptionsRequestVersion=0;renderOptionsVersion=0;initialized=!1;workers=[];queuedTasks=[];queuedTaskByInstance=new Map;taskByHighlightKey=new Map;activeTaskById=new Map;activeRequestByInstance=new Map;nextRequestId=0;themeSubscribers=new Set;workersFailed=!1;statSubscribers=new Set;fileCache;diffCache;_queuedBroadcast;lifecycleGeneration=0;constructor(e,{langs:t,theme:i=ee,useTokenTransformer:n=!1,lineDiffType:r="word-alt",maxLineDiffLength:a=1e3,tokenizeMaxLineLength:l=1e3,preferredHighlighter:d="shiki-js"}){this.options=e,this.preferredHighlighter=d,this.renderOptions={theme:i,useTokenTransformer:n,lineDiffType:r,maxLineDiffLength:a,tokenizeMaxLineLength:l},this.fileCache=new ei.LRUMap(e.totalASTLRUCacheSize??100),this.diffCache=new ei.LRUMap(e.totalASTLRUCacheSize??100),this.queueInitialization(t)}isWorkingPool(){return!this.workersFailed}getFileResultCache(e){return e.cacheKey!=null?this.fileCache.get(e.cacheKey):void 0}getDiffResultCache(e){return e.cacheKey!=null?this.diffCache.get(e.cacheKey):void 0}inspectCaches(){const{fileCache:e,diffCache:t}=this;return{fileCache:e,diffCache:t}}evictFileFromCache(e){try{return this.fileCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}evictDiffFromCache(e){try{return this.diffCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}async setRenderOptions({theme:e=this.renderOptions.theme??ee,useTokenTransformer:t=this.renderOptions.useTokenTransformer??!1,lineDiffType:i=this.renderOptions.lineDiffType??"word-alt",maxLineDiffLength:n=this.renderOptions.maxLineDiffLength??1e3,tokenizeMaxLineLength:r=this.renderOptions.tokenizeMaxLineLength??1e3}){const{lifecycleGeneration:a}=this,l=++this.renderOptionsRequestVersion,d=()=>this.isCurrentLifecycle(a)&&this.renderOptionsRequestVersion===l;try{const s={theme:e,useTokenTransformer:t,lineDiffType:i,maxLineDiffLength:n,tokenizeMaxLineLength:r};if(this.isInitialized()||await this.initialize(),!d()||ye(s,this.renderOptions))return;const f=De(e);let c=[];if(Oe(s.theme,this.renderOptions.theme)||(Ut(f)?c=Xt(f):c=await Yt(f)),!d())return;if(this.highlighter!=null)rt(c,this.highlighter);else{const h=await Ft({themes:f,langs:["text"],preferredHighlighter:this.preferredHighlighter});if(!d())return;this.highlighter=h}const u=this.setRenderOptionsOnWorkers(s,c);this.renderOptions=s,this.renderOptionsVersion++,this.diffCache.clear(),this.fileCache.clear(),this.invalidateRenderTasks();for(const h of this.themeSubscribers)h.onThemeChange();await u}catch(s){if(s instanceof Ie||!d())return;throw s}}getPreferredHighlighter(){return this.preferredHighlighter}getFileRenderOptions(){const{tokenizeMaxLineLength:e,theme:t,useTokenTransformer:i}=this.renderOptions;return{theme:t,useTokenTransformer:i,tokenizeMaxLineLength:e}}getDiffRenderOptions(){return{...this.renderOptions}}async setRenderOptionsOnWorkers(e,t){if(this.workersFailed)return;this.isInitialized()||await this.initialize();const i=[];for(const n of this.workers){if(!n.initialized)throw console.log({managedWorker:n}),new Error("setRenderOptionsOnWorkers: Somehow we have an uninitialized worker");i.push(new Promise((r,a)=>{const l=this.generateRequestId(),d={type:"set-render-options",id:l,request:{type:"set-render-options",id:l,renderOptions:e,resolvedThemes:t},resolve:r,reject:a,requestStart:Date.now()};this.activeTaskById.set(l,d),n.pendingSetupRequestId=l,n.worker.postMessage(d.request)}))}await Promise.all(i)}subscribeToThemeChanges(e){return this.themeSubscribers.add(e),this.queueBroadcastStateChanges(),()=>{this.unsubscribeToThemeChanges(e),this.queueBroadcastStateChanges()}}unsubscribeToThemeChanges(e){this.themeSubscribers.delete(e),this.queueBroadcastStateChanges()}subscribeToStatChanges(e){return this.statSubscribers.add(e),e(this.getStats()),()=>{this.statSubscribers.delete(e)}}queueBroadcastStateChanges(){this._queuedBroadcast==null&&(this._queuedBroadcast=requestAnimationFrame(this._broadcastStateChanges))}_broadcastStateChanges=()=>{this._queuedBroadcast!=null&&(cancelAnimationFrame(this._queuedBroadcast),this._queuedBroadcast=void 0);const e=this.getStats();for(const t of this.statSubscribers)t(e)};cleanUpTasks(e){this.detachInstanceFromQueuedTasks(e);const t=this.activeRequestByInstance.get(e);if(t!=null){const i=this.activeTaskById.get(t);Z(i)?(this.detachInstanceFromRenderTask(i,e),!i.primeCache&&i.instances.size===0&&this.removeActiveTask(i)):this.activeTaskById.delete(t)}this.activeRequestByInstance.delete(e),this.queueBroadcastStateChanges()}isInitialized(){return this.initialized===!0}async initialize(e=[]){if(this.initialized!==!0)if(this.initialized===!1){const{lifecycleGeneration:t}=this;this.initialized=new Promise((i,n)=>{(async()=>{try{const r=De(this.renderOptions.theme);let a=[];if(Ut(r)?a=Xt(r):a=await Yt(r),!this.isCurrentLifecycle(t)){i();return}let l=[];if(Qt(e)?l=Kt(e):l=await Jt(e),!this.isCurrentLifecycle(t)){i();return}const[d]=await Promise.all([Ft({themes:r,langs:["text",...e],preferredHighlighter:this.preferredHighlighter}),this.initializeWorkers(a,l)]);if(!this.isCurrentLifecycle(t)){this.terminateWorkers(),i();return}this.highlighter=d,this.initialized=!0,this.diffCache.clear(),this.fileCache.clear(),this.drainQueue(),this.queueBroadcastStateChanges(),i()}catch(r){if(r instanceof Ie||!this.isCurrentLifecycle(t)){i();return}this.initialized=!1,this.workersFailed=!0;for(const a of this.queuedTasks)this.rejectRenderTaskCallbacks(a,Xe(r));this.queueBroadcastStateChanges(),n(r)}})()}),this.queueBroadcastStateChanges()}else return this.initialized}async initializeWorkers(e,t){this.workersFailed=!1;const i=[],n=void 0;this.workers.length>0&&this.terminateWorkers();for(let r=0;r<(this.options.poolSize??8);r++){const a=this.options.workerFactory(),l={worker:a,requestId:void 0,pendingSetupRequestId:void 0,initialized:!1,langs:new Set(["text",...t.map(({name:d})=>d)]),customExtensionsVersion:0};a.addEventListener("message",d=>{this.handleWorkerMessage(l,d.data)}),a.addEventListener("error",d=>console.error("Worker error:",d,l)),this.workers.push(l),i.push(new Promise((d,s)=>{const f=this.generateRequestId(),c={type:"initialize",id:f,request:{type:"initialize",id:f,renderOptions:this.renderOptions,preferredHighlighter:this.preferredHighlighter,resolvedThemes:e,resolvedLanguages:t,customExtensionsVersion:void 0,customExtensionMap:n},resolve(){l.initialized=!0,d()},reject:s,requestStart:Date.now()};this.activeTaskById.set(f,c),this.executeTask(l,c)}))}await Promise.all(i)}drainQueue=()=>{if(this._queuedDrain=void 0,!(this.initialized!==!0||this.queuedTasks.length===0)){for(let e=0;e<this.queuedTasks.length;){const t=this.queuedTasks[e];if(this.hasActiveRequest(t)){e++;continue}const i=ti(t),n=this.getAvailableWorker(i);if(n==null)break;this.queuedTasks.splice(e,1),this.assignWorkerToTask(t,n),this.resolveLanguagesAndExecuteTask(n,t,i)}this.queueBroadcastStateChanges()}};highlightFileAST(e,t){const i=this.getFileResultCache(t);Bt(t)||i!=null&&$e(i.options,this.getFileRenderOptions())||this.hasMatchingFileInstanceTask(e,t)||this.submitTask(e,{type:"file",file:t})}primeFileHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(new Error("WorkerPoolManager.primeFileHighlightCache: worker pool is not working"));const t=this.getOrCreateFileHighlightCacheTask(e);return t!=null?this.createRenderTaskCallbacks(t):Promise.resolve()}getOrCreateFileHighlightCacheTask(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeFileHighlightCache: priming highlight cache requires file.cacheKey; skipping "${e.name}".`);return}const t=this.getFileResultCache(e),i=this.getFileHighlightKey(e);if(i==null||Bt(e)||t!=null&&$e(t.options,this.getFileRenderOptions()))return;const n=this.getTaskByHighlightKey(i);if(n!=null)return n.primeCache=!0,n.type==="file"?n:void 0;{const r=this.submitCacheTask({type:"file",file:e},i);return r.type==="file"?r:void 0}}getPlainFileAST(e,t,i,n){if(this.highlighter==null){this.queueInitialization();return}return Eo(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:i,lines:n})}highlightDiffAST(e,t){const i=this.getDiffResultCache(t);$t(t)||i!=null&&ye(i.options,this.getDiffRenderOptions())||this.hasMatchingDiffInstanceTask(e,t)||this.submitTask(e,{type:"diff",diff:t})}primeDiffHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(new Error("WorkerPoolManager.primeDiffHighlightCache: worker pool is not working"));const t=this.getOrCreateDiffHighlightCacheTask(e);return t!=null?this.createRenderTaskCallbacks(t):Promise.resolve()}getOrCreateDiffHighlightCacheTask(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeDiffHighlightCache: priming highlight cache requires diff.cacheKey; skipping "${e.prevName??e.name}" -> "${e.name}".`);return}const t=this.getDiffResultCache(e),i=this.getDiffHighlightKey(e);if(i==null||$t(e)||t!=null&&ye(t.options,this.getDiffRenderOptions()))return;const n=this.getTaskByHighlightKey(i);if(n!=null)return n.primeCache=!0,n.type==="diff"?n:void 0;{const r=this.submitCacheTask({type:"diff",diff:e},i);return r.type==="diff"?r:void 0}}getPlainDiffAST(e,t,i,n,r){return this.highlighter!=null?Uo(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:i,expandedHunks:n,collapsedContextThreshold:r}):void 0}terminate(){this.lifecycleGeneration++,this.cancelActiveWorkerTasks(),this.terminateWorkers();const e=new Ie;for(const t of this.queuedTasks)this.rejectRenderTaskCallbacks(t,e);this.fileCache.clear(),this.diffCache.clear(),this.activeRequestByInstance.clear(),this.queuedTasks.length=0,this.queuedTaskByInstance.clear(),this.taskByHighlightKey.clear(),this.activeTaskById.clear(),this.highlighter=void 0,this.initialized=!1,this.workersFailed=!1,this.queueBroadcastStateChanges()}isCurrentLifecycle(e){return this.lifecycleGeneration===e}queueInitialization(e){this.initialize(e).catch(t=>{console.error(t)})}cancelActiveWorkerTasks(){const e=new Ie;for(const t of this.activeTaskById.values())"reject"in t?t.reject(e):Z(t)&&this.rejectRenderTaskCallbacks(t,e)}terminateWorkers(){for(const e of this.workers)e.worker.terminate();this.workers.length=0}getStats(){return{managerState:this.initialized===!1?"waiting":this.initialized!==!0?"initializing":"initialized",totalWorkers:this.workers.length,workersFailed:this.workersFailed,busyWorkers:this.workers.filter(e=>e.requestId!=null||e.pendingSetupRequestId!=null).length,queuedTasks:this.queuedTasks.length,activeTasks:this.activeTaskById.size,themeSubscribers:this.themeSubscribers.size,fileCacheSize:this.fileCache.size,diffCacheSize:this.diffCache.size}}submitTask(e,t){this.initialized===!1&&this.queueInitialization();const i=this.getHighlightKeyForRequest(t),n=i!=null?this.getTaskByHighlightKey(i):void 0;if(n!=null){this.detachInstanceFromQueuedTasks(e,n),this.addInstanceToTask(n,e),this.queueBroadcastStateChanges();return}this.detachInstanceFromQueuedTasks(e);const r=this.generateRequestId(),a=Date.now(),{renderOptionsVersion:l}=this,d=(()=>{switch(t.type){case"file":return{type:"file",id:r,request:{...t,id:r},instances:new Set([e]),primeCache:!1,highlightKey:i,callbacks:new Set,renderOptionsVersion:l,requestStart:a};case"diff":return{type:"diff",id:r,request:{...t,id:r},instances:new Set([e]),primeCache:!1,highlightKey:i,callbacks:new Set,renderOptionsVersion:l,requestStart:a}}})();this.enqueueRenderTask(d,e)}submitCacheTask(e,t){this.initialized===!1&&this.queueInitialization();const i=this.generateRequestId(),n=Date.now(),{renderOptionsVersion:r}=this,a=(()=>{switch(e.type){case"file":return{type:"file",id:i,request:{...e,id:i},instances:new Set,primeCache:!0,highlightKey:t,callbacks:new Set,renderOptionsVersion:r,requestStart:n};case"diff":return{type:"diff",id:i,request:{...e,id:i},instances:new Set,primeCache:!0,highlightKey:t,callbacks:new Set,renderOptionsVersion:r,requestStart:n}}})();return this.enqueueRenderTask(a),a}enqueueRenderTask(e,t){this.queuedTasks.push(e),t!=null&&this.queuedTaskByInstance.set(t,e),e.highlightKey!=null&&this.taskByHighlightKey.set(e.highlightKey,e),this.queueDrain()}async resolveLanguagesAndExecuteTask(e,t,i){try{const n=i.filter(r=>!e.langs.has(r));if(n.length>0&&(Qt(n)?t.request.resolvedLanguages=Kt(n):t.request.resolvedLanguages=await Jt(n)),!this.activeTaskById.has(t.id)){e.requestId===t.id&&(this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain());return}this.executeTask(e,t)}catch(n){this.rejectRenderTaskCallbacks(t,Xe(n)),this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}}handleWorkerMessage(e,t){const i=this.activeTaskById.get(t.id);try{if(i==null)throw Te;if(t.type==="error"){const n=new Error(t.error);if(t.stack&&(n.stack=t.stack),"reject"in i)i.reject(n);else if(Z(i))this.notifyHighlightError(i,n),this.rejectRenderTaskCallbacks(i,n);else throw new Error("handleWorkerMessage: unknown task type");throw n}else switch(t.requestType){case"initialize":if(i.type!=="initialize")throw new Error("handleWorkerMessage: task/response dont match");this.syncCustomExtensionVersion(e,i.request),i.resolve();break;case"set-render-options":if(i.type!=="set-render-options")throw new Error("handleWorkerMessage: task/response dont match");i.resolve();break;case"file":{if(i.type!=="file")throw new Error("handleWorkerMessage: task/response dont match");const{result:n,options:r}=t;if(!this.isCurrentRenderTask(i)||!$e(r,this.getFileRenderOptions()))throw Te;const{request:a}=i;this.syncCustomExtensionVersion(e,a),i.cacheKeyAtDispatch!=null&&this.fileCache.set(i.cacheKeyAtDispatch,{result:n,options:r}),this.resolveRenderTaskCallbacks(i),this.notifyFileInstances(i,n,r);break}case"diff":{if(i.type!=="diff")throw new Error("handleWorkerMessage: task/response dont match");const{result:n,options:r}=t;if(!this.isCurrentRenderTask(i)||!ye(r,this.getDiffRenderOptions()))throw Te;const{request:a}=i;this.syncCustomExtensionVersion(e,a),i.cacheKeyAtDispatch!=null&&this.diffCache.set(i.cacheKeyAtDispatch,{result:n,options:r}),this.resolveRenderTaskCallbacks(i),this.notifyDiffInstances(i,n,r);break}}}catch(n){n!==Te&&console.error(n,i,t)}this.cleanWorkerAndTask(e,i,t.id),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}_queuedDrain;queueDrain(){this._queuedDrain==null&&(this._queuedDrain=Promise.resolve().then(this.drainQueue),this.queueBroadcastStateChanges())}assignWorkerToTask(e,t){t.requestId=e.id,Z(e)&&(this.clearQueuedInstanceRequests(e),this.trackInstanceRequests(e)),this.activeTaskById.set(e.id,e)}cleanWorkerAndTask(e,t,i=t?.id){e.requestId===i&&(e.requestId=void 0),e.pendingSetupRequestId===i&&(e.pendingSetupRequestId=void 0),t!=null&&(Z(t)&&(this.rejectRenderTaskCallbacks(t,new Je),this.clearInstanceRequests(t),this.clearHighlightKey(t)),this.activeTaskById.delete(t.id))}executeTask(e,t){Qo(t.request)&&this.maybeAttachCustomExtensions(e,t.request),this.activeTaskById.has(t.id)||this.assignWorkerToTask(t,e);for(const i of ti(t))e.langs.add(i);try{t.type==="file"?t.cacheKeyAtDispatch=t.request.file.cacheKey:t.type==="diff"&&(t.cacheKeyAtDispatch=t.request.diff.cacheKey),e.worker.postMessage(t.request)}catch(i){console.error("Failed to post message to worker:",i),Z(t)?(this.notifyHighlightError(t,i),this.rejectRenderTaskCallbacks(t,Xe(i))):"reject"in t&&t.reject(i),this.cleanWorkerAndTask(e,t),this.queuedTasks.length>0&&this.queueDrain()}this.queueBroadcastStateChanges()}maybeAttachCustomExtensions(e,t){if(t.customExtensionsVersion!=null)return;const i=gn();e.customExtensionsVersion>=i||(t.customExtensionsVersion=i,t.customExtensionMap=pn())}syncCustomExtensionVersion(e,t){t.customExtensionsVersion!=null&&(e.customExtensionsVersion=t.customExtensionsVersion)}getAvailableWorker(e){let t;for(const i of this.workers){if(i.requestId!=null||i.pendingSetupRequestId!=null||!i.initialized)continue;if(t=i,e.length===0)break;let n=!0;for(const r of e)if(!i.langs.has(r)){n=!1;break}if(n)break}return t}getFileHighlightKey(e){if(e.cacheKey!=null)return`file:${e.cacheKey}:${this.renderOptionsVersion}`}getDiffHighlightKey(e){if(e.cacheKey!=null)return`diff:${e.cacheKey}:${this.renderOptionsVersion}`}getHighlightKeyForRequest(e){switch(e.type){case"file":return this.getFileHighlightKey(e.file);case"diff":return this.getDiffHighlightKey(e.diff)}}hasActiveRequest(e){for(const t of se(e))if(this.activeRequestByInstance.has(t))return!0;return!1}addInstanceToTask(e,t){e.type,e.instances.add(t),this.activeTaskById.has(e.id)?this.activeRequestByInstance.set(t,e.id):this.queuedTaskByInstance.set(t,e)}detachInstanceFromQueuedTasks(e,t){const i=this.queuedTaskByInstance.get(e);i==null||i===t||(this.queuedTaskByInstance.delete(e),this.detachInstanceFromRenderTask(i,e),!i.primeCache&&i.instances.size===0&&this.removeQueuedTask(i))}detachInstanceFromRenderTask(e,t){e.type,e.instances.delete(t)}removeQueuedTask(e){const t=this.queuedTasks.indexOf(e);t!==-1&&this.queuedTasks.splice(t,1),this.rejectRenderTaskCallbacks(e,new Je),this.clearQueuedInstanceRequests(e),this.clearHighlightKey(e)}removeActiveTask(e){this.rejectRenderTaskCallbacks(e,new Je),this.clearInstanceRequests(e),this.clearHighlightKey(e),this.activeTaskById.delete(e.id)}createRenderTaskCallbacks(e){return new Promise((t,i)=>{e.callbacks.add({resolve:t,reject:i})})}resolveRenderTaskCallbacks(e){for(const t of e.callbacks)t.resolve();e.callbacks.clear()}rejectRenderTaskCallbacks(e,t){for(const i of e.callbacks)i.reject(t);e.callbacks.clear()}invalidateRenderTasks(){for(let e=this.queuedTasks.length-1;e>=0;e--){const t=this.queuedTasks[e];t.renderOptionsVersion!==this.renderOptionsVersion&&this.removeQueuedTask(t)}for(const e of Array.from(this.activeTaskById.values()))Z(e)&&e.renderOptionsVersion!==this.renderOptionsVersion&&this.removeActiveTask(e)}clearQueuedInstanceRequests(e){for(const t of se(e))this.queuedTaskByInstance.get(t)===e&&this.queuedTaskByInstance.delete(t)}clearHighlightKey(e){e.highlightKey!=null&&this.taskByHighlightKey.get(e.highlightKey)===e&&this.taskByHighlightKey.delete(e.highlightKey)}trackInstanceRequests(e){for(const t of se(e))this.activeRequestByInstance.set(t,e.id)}clearInstanceRequests(e){for(const t of se(e))this.activeRequestByInstance.get(t)===e.id&&this.activeRequestByInstance.delete(t)}notifyFileInstances(e,t,i){for(const n of e.instances)this.activeRequestByInstance.get(n)===e.id&&n.onHighlightSuccess(e.request.file,t,i)}notifyDiffInstances(e,t,i){for(const n of e.instances)this.activeRequestByInstance.get(n)===e.id&&n.onHighlightSuccess(e.request.diff,t,i)}notifyHighlightError(e,t){for(const i of se(e))this.activeRequestByInstance.get(i)===e.id&&i.onHighlightError(t)}hasMatchingFileInstanceTask(e,t){for(const i of this.iterateRenderTasks())if(i.type==="file"&&this.isCurrentRenderTask(i)&&i.instances.has(e)&&Un(t,i.request.file))return!0;return!1}hasMatchingDiffInstanceTask(e,t){for(const i of this.iterateRenderTasks())if(i.type==="diff"&&this.isCurrentRenderTask(i)&&i.instances.has(e)&&Lo(i.request.diff,t))return!0;return!1}getTaskByHighlightKey(e){const t=this.taskByHighlightKey.get(e);return t!=null&&this.isCurrentRenderTask(t)?t:void 0}isCurrentRenderTask(e){return e.renderOptionsVersion===this.renderOptionsVersion}*iterateRenderTasks(){for(const e of this.queuedTasks)yield e;for(const e of this.activeTaskById.values())Z(e)&&(yield e)}generateRequestId(){return`req_${++this.nextRequestId}`}};function Qo(e){return e.type==="initialize"||e.type==="file"||e.type==="diff"}function ti(e){const t=new Set;if(e.type==="initialize"||e.type==="set-render-options")return[];switch(e.type){case"file":t.add(e.request.file.lang??X(e.request.file.name));break;case"diff":t.add(e.request.diff.lang??X(e.request.diff.name)),t.add(e.request.diff.lang??X(e.request.diff.prevName??"-"));break}return t.delete("text"),Array.from(t)}function Z(e){return e?.type==="file"||e?.type==="diff"}function se(e){return e.instances}function Xe(e){return e instanceof Error?e:new Error(String(e))}let ue;function Jo({poolOptions:e,highlighterOptions:t}){return ue??=new Ko(e,t),ue}function Xo(){ue!=null&&(ue.terminate(),ue=void 0)}const Qi=K.createContext(void 0);let Ye=0;function Yo({children:e,poolOptions:t,highlighterOptions:i}){const[n]=K.useState(()=>{if(!(typeof window>"u"))return Jo({poolOptions:t,highlighterOptions:i})});return K.useInsertionEffect(()=>{if(n!=null)return Ye++,()=>{Ye--}},[n]),K.useEffect(()=>()=>{Ye===0&&Xo()},[]),q.jsx(Qi.Provider,{value:n,children:e})}function Zo(){return K.useContext(Qi)}function ii(e,t,i){if(e===t||e==null||t==null)return e===t;const n=new Set(i),r=Object.keys(e),a=new Set(Object.keys(t));for(const l of r)if(a.delete(l),!n.has(l)&&(!(l in t)||e[l]!==t[l]))return!1;for(const l of Array.from(a))if(!n.has(l))return!1;return!0}function Ps(e,t){const i=e?.theme??ee,n=t?.theme??ee,r=ni(e),a=ni(t);return Oe(i,n)&&ii(e,t,["theme","parseDiffOptions"])&&ii(r,a)}function ni(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function ct(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function ri({scrollTop:e,scrollHeight:t,height:i,fitPerfectly:n=!1,fitPerfectlyOverscroll:r=0,overscrollSize:a}){const l=i+a*2,d=n?i+r*2:l;if(t=Math.max(t,d),l>=t||n){const c=Math.max(e-r,0),u=Math.min(e+d,t);return{top:c,bottom:Math.max(u,c)}}let s=e+i/2-l/2,f=s+l;return s<0&&(s=0),f>t&&(f=t),s=Math.floor(Math.max(s,0)),{top:s,bottom:Math.ceil(Math.max(Math.min(f,t),s))}}const ea=new TextEncoder,ta=new TextDecoder("utf-8",{ignoreBOM:!0}),ia=/[\uD800-\uDFFF]/,ut=1024;let ne=new Uint8Array(ut);function Ji(){ne.length!==ut&&(ne=new Uint8Array(ut))}function C(e){if(e.length===0)return e;if(ia.test(e))return JSON.parse(JSON.stringify(e));const t=e.length*3;ne.length<t&&(ne=new Uint8Array(t));const{written:i}=ea.encodeInto(e,ne);return ta.decode(ne.subarray(0,i))}const na=4096,ra=.5;function oa(e){for(const t of e.hunks){for(let i=0;i<t.hunkContent.length;i++){const n=t.hunkContent[i];if(n.type!=="change")continue;const r=sa(e,n);r!=null&&(t.hunkContent.splice(i,1,...r),i+=r.length-1)}aa(t,e)}}function aa(e,t){const{hunkContent:i}=e;for(let n=1;n<i.length;n++){const r=i[n],a=i[n-1];if(r.type!=="change"||r.additions>0&&r.deletions>0||a.type!=="context")continue;const l=r.additions>0,d=l?t.additionLines:t.deletionLines,s=l?r.additionLineIndex:r.deletionLineIndex,f=l?r.additions:r.deletions,c=d[s]??"";if(c.trim()!=="")continue;let u=!0;for(let y=1;y<f;y++)if(d[s+y]!==c){u=!1;break}if(!u)continue;let h=0;for(;h<a.lines&&t.additionLines[a.additionLineIndex+a.lines-1-h]===c;)h++;if(h===0||n===1&&h===a.lines)continue;r.additionLineIndex-=h,r.deletionLineIndex-=h;const m=r.additionLineIndex+r.additions,p=r.deletionLineIndex+r.deletions,g=i[n+1];g?.type==="context"?(g.lines+=h,g.additionLineIndex=m,g.deletionLineIndex=p):i.splice(n+1,0,{type:"context",lines:h,additionLineIndex:m,deletionLineIndex:p}),a.lines-=h,a.lines===0&&(i.splice(n-1,1),n--)}}function sa(e,t){const{deletions:i,additions:n,deletionLineIndex:r,additionLineIndex:a}=t,l=Math.min(i,n),d=Math.abs(n-i);if(l===0||d===0||l*(d+1)>na)return null;const s=[];for(let g=0;g<i;g++)s.push(oi(e.deletionLines[r+g]??""));const f=[];for(let g=0;g<n;g++)f.push(oi(e.additionLines[a+g]??""));const c=n>i;let u=0,h=-1;for(let g=0;g<=d;g++){let y=0;for(let v=0;v<l;v++)y+=da(s[v+(c?0:g)],f[v+(c?g:0)]);g===0?h=y+l*ra:y>h&&(h=y,u=g)}if(u===0)return null;const m=[],p=(g,y,v,_)=>{(g>0||y>0)&&m.push({type:"change",deletions:g,additions:y,deletionLineIndex:v,additionLineIndex:_})};return c?(p(0,u,r,a),p(l,l,r,a+u),p(0,n-l-u,r+l,a+u+l)):(p(u,0,r,a),p(l,l,r+u,a),p(i-l-u,0,r+u+l,a+l)),m}const la=/\s+/g;function oi(e){return e.replace(la,"")}function da(e,t){if(e===t)return 1;const i=Math.max(e.length,t.length),n=Math.min(e.length,t.length);if(n===0)return 0;let r=0;for(;r<n&&e[r]===t[r];)r++;let a=0;for(;a<n-r&&e[e.length-1-a]===t[t.length-1-a];)a++;return(r+a)/i}function ca(e,t,i){try{return ua(e,t,i)}finally{Ji()}}function ua(e,t,i=!1){const n=Ea(e),r=n?ma(e):pa(e);let a;const l=[];for(const d of r){if(n&&!gi.test(d)){if(a==null)a=C(d);else{if(i)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",d)}continue}else if(!n&&!ga(d)){if(a==null)a=C(d);else{if(i)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",d)}continue}const s=Xi(d,{cacheKey:void 0,isGitDiff:n,throwOnError:i});s!=null&&l.push(s)}return{patchMetadata:a,files:l}}function xs(e,t){try{return Xi(e,t)}finally{Ji()}}function Xi(e,{cacheKey:t,isGitDiff:i=gi.test(e),oldFile:n,newFile:r,throwOnError:a=!1}={}){let l=0;const d=tn(e,"@@ ");let s;const f=n==null||r==null;let c=0,u=0;for(const h of d){const m=Yi(h),p=m[0];if(p==null){if(a)throw Error("parsePatchContent: invalid hunk");console.error("parsePatchContent: invalid hunk",h);continue}const g=en(p);let y=0,v=0;if(g==null||s==null){if(s!=null){if(a)throw Error("parsePatchContent: Invalid hunk");console.error("parsePatchContent: Invalid hunk",h);continue}s={name:"",type:"change",hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:f,additionLines:!f&&n!=null&&r!=null?ai(r.contents):[],deletionLines:!f&&n!=null&&r!=null?ai(n.contents):[],cacheKey:di(t)},s.additionLines.length===1&&r?.contents===""&&(s.additionLines.length=0),s.deletionLines.length===1&&n?.contents===""&&(s.deletionLines.length=0);for(const L of m){if(L.startsWith("diff --git")){const D=L.trim().match(vn),I=D?.[1]??D?.[2],P=D?.[3]??D?.[4];if(I==null||P==null){if(a)throw Error("parsePatchContent: invalid git diff header");console.error("parsePatchContent: invalid git diff header",L);continue}s.name=C(P.trim()),I!==P&&(s.prevName=C(I.trim()));continue}const x=L.startsWith("---")||L.startsWith("+++")?L.match(i?bn:En):null;if(x!=null){const[,D,I]=x;if(D==="---"&&I!=="/dev/null"){const P=C(I.trim());s.prevName=P,s.name=P}else D==="+++"&&I!=="/dev/null"&&(s.name=C(I.trim()))}else if(i){if(L.startsWith("new mode ")&&(s.mode=C(L.slice(8).trim())),L.startsWith("old mode ")&&(s.prevMode=C(L.slice(8).trim())),L.startsWith("new file mode")&&(s.type="new",s.mode=C(L.slice(13).trim())),L.startsWith("deleted file mode")&&(s.type="deleted",s.mode=C(L.slice(17).trim())),L.startsWith("similarity index")&&(L.startsWith("similarity index 100%")?s.type="rename-pure":s.type="rename-changed"),L.startsWith("index ")){const[,D,I,P]=L.trim().match(yn)??[];D!=null&&(s.prevObjectId=C(D)),I!=null&&(s.newObjectId=C(I)),P!=null&&(s.mode=C(P))}L.startsWith("rename from ")&&(s.prevName=C(L.slice(12).trim())),L.startsWith("rename to ")&&(s.name=C(L.slice(10).trim()))}}continue}let _,b;for(;m.length>0&&(m[m.length-1]===`
4
4
  `||m[m.length-1]==="\r"||m[m.length-1]===`\r
5
5
  `||m[m.length-1]==="");)m.pop();const{additionStart:k,deletionStart:R}=g;c=f?c:R-1,u=f?u:k-1;const E={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:g.additionCount,additionStart:k,additionLines:y,deletionCount:g.deletionCount,deletionStart:R,deletionLines:v,deletionLineIndex:c,additionLineIndex:u,hunkContent:[],hunkContext:di(g.hunkContext),hunkSpecs:C(p),noEOFCRAdditions:!1,noEOFCRDeletions:!1};let T=0,S=0;for(let L=1;L<m.length;L++){const x=m[L];if(T>=E.additionCount&&S>=E.deletionCount&&!x.startsWith("\\")){if(a&&_a(x)&&!va(x))throw Error("parsePatchContent: hunk has more lines than expected");break}const D=x[0];if(D!=="+"&&D!=="-"&&D!==" "&&D!=="\\"){if(a)throw Error("parsePatchContent: invalid hunk line");console.error(`parseLineType: Invalid firstChar: "${D}", full line: "${x}"`),console.error("processFile: invalid rawLine:",x);continue}const I=ya(D);if(I==="addition"){if(a&&T>=E.additionCount)throw Error("parsePatchContent: hunk has too many addition lines");const P=Ze(x);(_==null||_.type!=="change")&&(_=et("change",c,u),E.hunkContent.push(_)),u++,T++,f&&s.additionLines.push(P),_.additions++,y++,b="addition"}else if(I==="deletion"){if(a&&S>=E.deletionCount)throw Error("parsePatchContent: hunk has too many deletion lines");const P=Ze(x);(_==null||_.type!=="change")&&(_=et("change",c,u),E.hunkContent.push(_)),c++,S++,f&&s.deletionLines.push(P),_.deletions++,v++,b="deletion"}else if(I==="context"){if(a&&(S>=E.deletionCount||T>=E.additionCount))throw Error("parsePatchContent: hunk has too many context lines");const P=Ze(x);(_==null||_.type!=="context")&&(_=et("context",c,u),E.hunkContent.push(_)),u++,c++,T++,S++,f&&(s.deletionLines.push(P),s.additionLines.push(P)),_.lines++,b="context"}else if(I==="metadata"&&_!=null){if(_.type==="context"?(E.noEOFCRAdditions=!0,E.noEOFCRDeletions=!0):b==="deletion"?E.noEOFCRDeletions=!0:b==="addition"&&(E.noEOFCRAdditions=!0),f&&(b==="addition"||b==="context")){const P=s.additionLines.length-1;P>=0&&(s.additionLines[P]=oe(s.additionLines[P]))}if(f&&(b==="deletion"||b==="context")){const P=s.deletionLines.length-1;P>=0&&(s.deletionLines[P]=oe(s.deletionLines[P]))}}}if(a&&(T!==E.additionCount||S!==E.deletionCount))throw Error("parsePatchContent: hunk line count mismatch");E.additionLines=y,E.deletionLines=v,E.collapsedBefore=Math.max(fe(E.additionStart,E.additionCount)-l,0),s.hunks.push(E),l=te(E.additionStart,E.additionCount);for(const L of E.hunkContent)L.type==="context"?(E.splitLineCount+=L.lines,E.unifiedLineCount+=L.lines):(E.splitLineCount+=Math.max(L.additions,L.deletions),E.unifiedLineCount+=L.deletions+L.additions);E.splitLineStart=s.splitLineCount+E.collapsedBefore,E.unifiedLineStart=s.unifiedLineCount+E.collapsedBefore,s.splitLineCount+=E.collapsedBefore+E.splitLineCount,s.unifiedLineCount+=E.collapsedBefore+E.unifiedLineCount}if(s!=null){if(a&&f&&!i&&s.hunks.length===0)throw Error("parsePatchContent: unified file has no hunks");if(s.hunks.length>0&&!f&&s.additionLines.length>0&&s.deletionLines.length>0){const h=s.hunks[s.hunks.length-1],m=te(h.additionStart,h.additionCount),p=s.additionLines.length,g=Math.max(p-m,0);s.splitLineCount+=g,s.unifiedLineCount+=g}return i||(s.prevName!=null&&s.name!==s.prevName?s.hunks.length>0?s.type="rename-changed":s.type="rename-pure":(n==null||n.contents==="")&&r!=null&&r.contents!==""?s.type="new":n!=null&&n.contents!==""&&(r==null||r.contents==="")&&(s.type="deleted")),s.type!=="rename-pure"&&s.type!=="rename-changed"&&(s.prevName=void 0),oa(s),s}}function fa(e,t,i=!1){const n=[],r=ha(e)?e.split(_n):[e];for(const a of r)try{n.push(ca(a,t!=null?`${t}-${n.length}`:void 0,i))}catch(l){if(i)throw l;console.error(l)}return n}function ha(e){return e.startsWith("From ")||e.includes(`
6
6
  From `)}function ai(e){const t=Yi(e);for(let i=0;i<t.length;i++)t[i]=C(t[i]);return t}function Yi(e){if(e.length===0)return[""];const t=[];let i=0;for(;;){const n=e.indexOf(`
@@ -12,11 +12,11 @@ From `)}function ai(e){const t=Yi(e);for(let i=0;i<t.length;i++)t[i]=C(t[i]);ret
12
12
  `)?e.slice(0,-1):e}function Ea(e){return e.startsWith("diff --git")||e.includes(`
13
13
  diff --git`)}function tn(e,t){if(e.length===0)return[""];const i=`
14
14
  ${t}`,n=e.startsWith(t)?0:li(e,i,0);if(n===-1)return[e];const r=[];n>0&&r.push(e.slice(0,n));let a=n;for(;;){const l=li(e,i,a+1);if(l===-1)break;r.push(e.slice(a,l)),a=l}return r.push(e.slice(a)),r}function li(e,t,i){const n=e.indexOf(t,i);return n===-1?-1:n+1}function di(e){return e==null?e:C(e)}function ya(e){return e===" "?"context":e==="\\"?"metadata":e==="+"?"addition":"deletion"}function Ze(e){const t=e.slice(1);return C(t===""?`
15
- `:t)}function et(e,t,i){return e==="change"?{type:"change",additions:0,deletions:0,additionLineIndex:i,deletionLineIndex:t}:{type:"context",lines:0,additionLineIndex:i,deletionLineIndex:t}}function ws(e){if(typeof HTMLStyleElement<"u"&&e instanceof HTMLStyleElement)return!0;const t=e.tagName??e.nodeName;return typeof t=="string"&&t.toLowerCase()==="style"}const Ds="-1,-1";function Os(e){return e?.some(t=>t.lineNumber===0)??!1}function Cs(e){const t=e[0];return t!=null&&t.length>0?t:void 0}function Vs(e){return e.startingLine===0&&e.totalLines>0}function La(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}function ka(){return A({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[st({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}var Ns=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;selectedRangeHighlightSide;selectedRangeLineNumberOnly=!1;editorActiveLine=null;editorActiveLineSide;editorLineNumberOnly=!1;proposedSelectedRange;renderedSelectedLinesState;renderedEditorActiveLineState;selectionAnchor;pointerSession={mode:"idle"};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),it(this.renderSelection),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1,this.setSelectionDirty()}setup(e){this.setSelectionDirty();const{usesCustomGutterUtility:t=!1,enableGutterUtility:i=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),i?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode==="gutterSelecting"&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectedLinesState=void 0,this.renderedEditorActiveLineState=void 0}isSelectionDirty(){return this.renderedSelectedLinesState===void 0||this.renderedEditorActiveLineState===void 0}setSelection(e,t){const i=!(e===this.selectedRange||ct(e??void 0,this.selectedRange??void 0)),n=t?.lineNumberOnly??!1,r=t?.activeLineSide!==this.selectedRangeHighlightSide||n!==this.selectedRangeLineNumberOnly;!this.isSelectionDirty()&&!i&&!r||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.selectedRangeHighlightSide=t?.activeLineSide,this.selectedRangeLineNumberOnly=n,this.renderSelection(),this.placeUtility(),i&&t?.notify!==!1&&this.notifySelectionCommitted(e))}setEditorActiveLine(e,{lineNumberOnly:t=!1,side:i}={}){const n=e!==this.editorActiveLine,r=i!==this.editorActiveLineSide||t!==this.editorLineNumberOnly;!this.isSelectionDirty()&&!n&&!r||(this.editorActiveLine=e,this.editorActiveLineSide=i,this.editorLineNumberOnly=t,this.renderSelection())}getSelection(){return this.selectedRange}getHoveredLine=()=>{const e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode==="diff"&&e.type==="diff-line")return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode==="file"&&e.type==="line")return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{const{onHunkExpand:t,onLineClick:i,onLineNumberClick:n,onTokenClick:r,onMergeConflictActionClick:a}=this.options;t==null&&i==null&&n==null&&a==null&&r==null||this.options.onGutterUtilityClick!=null&&pe(e.composedPath())||(Q(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if(e.pointerType!=="mouse")return;const{lineHoverHighlight:t="disabled",onLineEnter:i,onLineLeave:n,onTokenEnter:r,onTokenLeave:a,enableGutterUtility:l=!1}=this.options;t==="disabled"&&!l&&i==null&&n==null&&r==null&&a==null||(Q(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if(Q(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){Q(t,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){const{__debugPointerEvents:i}=this.options,n=t.composedPath();Q(i,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:n});const r=this.resolvePointerTarget(n);Q(i,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",r);const{onLineClick:a,onLineNumberClick:l,onLineEnter:d,onLineLeave:s,onTokenClick:f,onTokenEnter:c,onTokenLeave:u,onHunkExpand:h,onMergeConflictActionClick:m}=this.options;switch(e){case"move":{const p=tt(r)&&this.hoveredLine?.lineElement===r.lineElement;we(r)&&this.hoveredToken?.tokenElement===r.tokenElement||(this.hoveredToken!=null&&(u?.(this.hoveredToken,t),this.clearHoveredToken()),we(r)&&(this.setHoveredToken(this.toTokenEventBaseProps(r)),c?.(this.hoveredToken,t))),p||(this.hoveredLine!=null&&(s?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),tt(r)?(this.setHoveredLine(this.toEventBaseProps(r)),this.placeUtility(),d?.({...this.hoveredLine,event:t})):this.placeUtility());break}case"click":{if(r==null)break;if(Ra(r)&&m!=null){m(r);break}if(Ia(r)&&h!=null){h(r.hunkIndex,r.all||t.shiftKey?"both":r.direction,r.all||t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!tt(r))break;we(r)&&f!=null&&f(this.toTokenEventBaseProps(r),t);const p=this.toEventBaseProps(r);l!=null&&r.numberColumn?l({...p,event:t}):a?.({...p,event:t});break}}}syncPointerListeners(e){const{__debugPointerEvents:t,lineHoverHighlight:i="disabled",onLineClick:n,onLineNumberClick:r,onLineEnter:a,onLineLeave:l,onTokenClick:d,onTokenEnter:s,onTokenLeave:f,onHunkExpand:c,onMergeConflictActionClick:u,enableGutterUtility:h=!1,enableLineSelection:m=!1,onGutterUtilityClick:p}=this.options,g=p!=null,y=i!=="disabled"||n!=null||r!=null||a!=null||l!=null||d!=null||s!=null||f!=null||c!=null||u!=null||h||m||g;y&&!this.hasPointerListeners?(e.addEventListener("click",this.handlePointerClick),e.addEventListener("pointerdown",this.handlePointerDown),e.addEventListener("pointermove",this.handlePointerMove),e.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,Q(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const b=[];return(t==="both"||t==="click")&&(n!=null&&b.push("onLineClick"),r!=null&&b.push("onLineNumberClick"),c!=null&&b.push("expandable hunk separators"),u!=null&&b.push("merge conflict actions")),b})()),Q(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),Q(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!y&&this.hasPointerListeners&&(e.removeEventListener("click",this.handlePointerClick),e.removeEventListener("pointerdown",this.handlePointerDown),e.removeEventListener("pointermove",this.handlePointerMove),e.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const v=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",_=this.pointerSession.mode==="gutterSelecting";(!m&&v||!g&&_)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:t,enableLineSelection:i=!1}=this.options,n=e!=null,r=t!=null||i;n&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!n&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),r&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!r&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType==="mouse"&&e.button!==0||this.pre==null||this.pointerSession.mode!=="idle")return;const t=e.composedPath();pe(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){const{enableLineSelection:t=!1}=this.options;if(!t)return;const i=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(i==null)return;const{pre:n}=this;if(n==null)return;const{lineNumber:r,eventSide:a,lineIndex:l}=i;if(e.shiftKey&&this.selectedRange!=null){const d=this.getIndexesFromSelection(this.selectedRange,n.getAttribute("data-diff-type")==="split");if(d==null)return;const s=d.start<=d.end?l>=d.start:l<=d.end;this.selectionAnchor={lineNumber:s?this.selectedRange.start:this.selectedRange.end,side:s?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(r,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===r&&this.selectedRange?.end===r){const d={lineNumber:r,side:a};this.selectionAnchor=d,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:d,pending:d},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:r,side:a},this.updateSelection(r,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){const{onGutterUtilityClick:t}=this.options;if(t==null)return;const i=this.currentSelectionEnds(),n=i?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),r=i?.top??n;n==null||r==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:r,current:n},this.selectionAnchor={lineNumber:r.lineNumber,side:r.side},this.updateSelection(n.lineNumber,n.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionPoint(e,{source:"coordinates-first"});if(t==null)return;this.pointerSession.current=t,this.updateSelection(t.lineNumber,t.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;const i={lineNumber:t.lineNumber,side:t.eventSide};if(La(this.pointerSession.pending,i))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{const{pointerSession:i}=this;if(e.pointerId!==i.pointerId)return;e.preventDefault();const n=this.resolveSelectionPoint(e,{source:"coordinates-first"});n!=null&&(i.current=n,this.updateSelection(n.lineNumber,n.side));const r=this.buildSelectedLineRange(i.anchor,i.current);t?.({...r}),this.selectionAnchor=void 0,this.notifySelectionEnd(r),this.notifySelectionCommitted(r),this.clearProposedSelection(),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(e){const{lineHoverHighlight:t="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!=="disabled"&&((t==="both"||t==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(t==="both"||t==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer==null&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot==null&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){const t=document.createElement("div");t.innerHTML=Vn(ka());const i=t.firstElementChild;if(!(i instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");i.remove(),this.gutterUtilityButton=i}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const t=this.resolvePointerTarget(e);ce(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){const e=this.currentSelectionEnds();if(e==null)return!1;const t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){const e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){const t={lineNumber:e.start,side:e.side},i={lineNumber:e.end,side:e.endSide??e.side},n=this.selectionPointRowIndex(t),r=this.selectionPointRowIndex(i);if(!(n==null||r==null))return n>r?{top:i,bottom:t}:{top:t,bottom:i}}selectionPointRowIndex(e){const t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;const t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;const i=this.mode==="diff"?`${t[0]},${t[1]}`:`${t[0]}`,n=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${i}"]`);for(const r of n){if(!(r instanceof HTMLElement))continue;const a=this.resolvePointerTarget(Se(r));if(ce(a)&&!(this.mode==="diff"&&e.side!=null&&a.side!==e.side))return a}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){this.pointerSession.mode==="pendingSingleLineUnselect"&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(e,t){const i=this.resolvePointerTarget(e);if(ce(i)&&!(t&&!i.numberColumn)&&i.splitLineIndex!=null)return{lineIndex:i.splitLineIndex,lineNumber:i.lineNumber,eventSide:this.mode==="diff"?i.side:void 0}}resolveSelectionInfo(e,t){const i=this.resolveSelectionPath(e,t);return i!=null?this.selectionInfoFromPath(i,t.requireNumberColumn):void 0}selectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(ce(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}resolveSelectionPoint(e,t){const i=this.resolveSelectionPath(e,t);return i!=null?this.selectionPointFromPath(i):void 0}resolveSelectionPath(e,t){const i=t.excludeUtility!==!1;switch(t.source){case"event-path":return this.pathFromEventPath(e.composedPath(),i);case"coordinates-first":{const n=this.pathFromCoordinates(e,i);return n!==void 0?n??void 0:this.pathFromEventPath(e.composedPath(),i)}}}pathFromCoordinates(e,t){const i=this.hitTest(e);if(i!==void 0)return i===null?null:this.pathFromElement(i,t)??null}pathFromEventPath(e,t){if(!(t&&pe(e))){for(const i of e)if(i instanceof Element)return this.pathFromElement(i,t)}}pathFromElement(e,t){const i=Se(e);if(t&&pe(i))return;const n=Pa(e);return n!=null?Se(n):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const t=Aa(xa(e));if(t==null)return;const i=this.targetForSelectionPoint(t);return i!=null?Se(i.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const t=this.pre?.getRootNode(),i=ui(t)?t:ui(document)?document:void 0;if(i!=null)return i.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){const{getLineIndex:i}=this.options;return i!=null?i(e,t):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,i=!0){const n=this.getCurrentSelectionRange();let r;if(e==null)r=null;else{const a=this.selectionAnchor?.side??t,l=this.selectionAnchor?.lineNumber??e;r=this.buildSelectionRange(l,e,a,t)}ct(n??void 0,r??void 0)||(this.selectedRangeHighlightSide=void 0,this.selectedRangeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=r:(this.selectedRange=r,z(this.renderSelection)),this.placeUtility(),i&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;const i=this.getLineIndex(e.start,e.side),n=this.getLineIndex(e.end,e.endSide??e.side);return i!=null&&n!=null?{start:t?i[1]:i[0],end:t?n[1]:n[0]}:void 0}getSelectionRenderState(){return{selectedLines:{range:this.selectedRange,highlightSide:this.selectedRangeHighlightSide,lineNumberOnly:this.selectedRangeLineNumberOnly},editorActiveLine:{range:this.editorActiveLine==null?null:{start:this.editorActiveLine,end:this.editorActiveLine,side:this.editorActiveLineSide},highlightSide:this.editorActiveLineSide,lineNumberOnly:this.editorLineNumberOnly}}}resolveLineRenderRange(e,t,i){if(e.range==null)return;const n=this.getIndexesFromSelection(e.range,t);if(n==null)throw console.error({rowRange:n,range:e.range}),new Error(`InteractionManager.renderSelection: No valid ${i} rowRange`);return n}getLineRenderColumns(e,t,i,n){if(this.pre==null||t==null&&n==null)return[];const{children:r}=this.pre;if(r.length>2)throw console.error(r),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const a=[];for(const l of r){const d=l.hasAttribute("data-deletions")?"deletions":l.hasAttribute("data-additions")?"additions":void 0,s=e!=null&&t!=null&&(e.highlightSide==null||d==null||e.highlightSide===d),f=i!=null&&n!=null&&(i.highlightSide==null||d==null||i.highlightSide===d);if(!s&&!f)continue;const[c,u]=l.children;if(!(c instanceof HTMLElement)||!(u instanceof HTMLElement))throw new Error("InteractionManager.renderSelection: missing gutter or content element");if(u.children.length!==c.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");a.push({content:u,gutter:c,renderEditorActiveLine:f,renderSelectedLines:s})}return a}renderSelection=()=>{it(this.renderSelection);const e=this.getSelectionRenderState();if(this.pre==null)return;const{editorActiveLine:t,selectedLines:i}=e,n=!fi(this.renderedSelectedLinesState,i),r=!fi(this.renderedEditorActiveLineState,t);if(!n&&!r)return;n&&(this.renderedSelectedLinesState=void 0),r&&(this.renderedEditorActiveLineState=void 0);const a=this.pre.getAttribute("data-diff-type")==="split",l=n?this.resolveLineRenderRange(i,a,"selected-lines"):void 0,d=r?this.resolveLineRenderRange(t,a,"editor-active-line"):void 0,s=this.getLineRenderColumns(n?i:void 0,l,r?t:void 0,d),f=i.range==null||s.some(g=>g.renderSelectedLines),c=t.range==null||s.some(g=>g.renderEditorActiveLine);if(n)for(const g of this.pre.querySelectorAll("[data-selected-line]"))g.removeAttribute("data-selected-line");if(r)for(const g of this.pre.querySelectorAll("[data-editor-active-line]"))g.removeAttribute("data-editor-active-line");const u=l==null?void 0:Math.min(l.start,l.end),h=l==null?void 0:Math.max(l.start,l.end),m=u===h,p=d?.start;for(const g of s){const{content:y,gutter:v,renderEditorActiveLine:_,renderSelectedLines:b}=g,k=Math.max(b?h??-1/0:-1/0,_?p??-1/0:-1/0),R=y.children.length;for(let E=0;E<R;E++){const T=y.children[E],S=v.children[E];if(!(T instanceof HTMLElement)||!(S instanceof HTMLElement))continue;const L=this.parseLineIndex(T,a);if((L??0)>k)break;if(L!=null){if(b&&u!=null&&h!=null&&L>=u&&L<=h){let x=m?"single":L===u?"first":L===h?"last":"";S.setAttribute("data-selected-line",x),i.lineNumberOnly||(T.setAttribute("data-selected-line",x),S.nextSibling instanceof HTMLElement&&T.nextSibling instanceof HTMLElement&&(T.nextSibling.hasAttribute("data-line-annotation")||T.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(m?(x="last",T.setAttribute("data-selected-line","first")):L===u?x="":L===h&&T.setAttribute("data-selected-line",""),T.nextSibling.setAttribute("data-selected-line",x),S.nextSibling.setAttribute("data-selected-line",x)))}_&&L===p&&(S.setAttribute("data-editor-active-line",""),t.lineNumberOnly||T.setAttribute("data-editor-active-line",""))}}}n&&f&&(this.renderedSelectedLinesState=i),r&&c&&(this.renderedEditorActiveLineState=t)};notifySelectionCommitted(e){this.options.onLineSelected?.(e)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode==="file"?{type:"line",lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:"diff-line",annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:i,side:n,tokenElement:r,tokenText:a}){return this.mode==="file"?{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:i,tokenElement:r,tokenText:a}:{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:i,side:n,tokenElement:r,tokenText:a}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,i,n){return{start:e,end:t,...i!=null?{side:i}:{},...i!==n&&n!=null?{endSide:n}:{}}}resolvePointerTarget(e){let t=!1,i,n,r,a,l,d,s,f,c,u;for(const m of e){if(!(m instanceof HTMLElement))continue;if(u==null&&m.hasAttribute("data-merge-conflict-action")){const v=m.getAttribute("data-merge-conflict-action")??void 0,_=m.getAttribute("data-merge-conflict-conflict-index")??void 0,b=_!=null?Number.parseInt(_,10):NaN;Sa(v)&&Number.isFinite(b)&&(u={kind:"merge-conflict-action",resolution:v,conflictIndex:b})}if(d==null&&m.hasAttribute("data-char")){d=m;const v=m.getAttribute("data-char");if(v!=null){const _=Number.parseInt(v,10);if(!Number.isNaN(_)){const b=m.textContent??"",k=_+b.length;(b.trim()!==""||this.options.enableTokenInteractionsOnWhitespace===!0)&&(s={tokenElement:d,lineCharStart:_,lineCharEnd:k,tokenText:b});continue}}}const p=l==null?m.getAttribute("data-column-number")??void 0:void 0;if(p!=null){l=m,c=Number.parseInt(p,10),t=!0,i=mi(m),a=m.getAttribute("data-line-index")??void 0;continue}const g=r==null?m.getAttribute("data-line")??void 0:void 0;if(g!=null){r=m,c=Number.parseInt(g,10),i=mi(m),a=m.getAttribute("data-line-index")??void 0;continue}if(f==null&&(m.hasAttribute("data-expand-button")||m.hasAttribute("data-unmodified-lines"))){f={hunkIndex:void 0,direction:m.hasAttribute("data-expand-up")?"up":m.hasAttribute("data-expand-down")?"down":"both",all:m.hasAttribute("data-expand-all-button")};continue}const y=f!=null?m.getAttribute("data-expand-index")??void 0:void 0;if(f!=null&&y!=null){const v=Number.parseInt(y,10);Number.isNaN(v)||(f.hunkIndex=v);continue}if(n==null&&m.hasAttribute("data-code")){n=m;break}}if(u!=null)return u;if(f?.hunkIndex!=null)return{type:"line-info",hunkIndex:f.hunkIndex,direction:f.direction,all:f.all};if(r??=a!=null?ci(n,`[data-line][data-line-index="${a}"]`):void 0,l??=a!=null?ci(n,`[data-column-number][data-line-index="${a}"]`):void 0,n==null||r==null||l==null||i==null||c==null||Number.isNaN(c))return;const h=this.parseLineIndex(r,this.isSplitDiff());return s!=null?this.mode==="file"?{kind:"token",lineType:i,lineElement:r,lineNumber:c,numberColumn:t,numberElement:l,side:void 0,splitLineIndex:h,...s}:{kind:"token",lineType:i,lineElement:r,lineNumber:c,numberColumn:t,numberElement:l,side:hi(i,n),splitLineIndex:h,...s}:this.mode==="file"?{kind:"line",lineType:i,lineElement:r,lineNumber:c,numberColumn:t,numberElement:l,side:void 0,splitLineIndex:h}:{kind:"line",lineType:i,lineElement:r,lineNumber:c,numberColumn:t,numberElement:l,side:hi(i,n),splitLineIndex:h}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,t){const i=(e.getAttribute("data-line-index")??"").split(",").map(n=>Number.parseInt(n,10)).filter(n=>!Number.isNaN(n));if(t&&i.length===2)return i[1];if(!t)return i[0]}};function Ms({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:i,onGutterUtilityClick:n,onLineClick:r,onLineEnter:a,onLineLeave:l,onLineNumberClick:d,onTokenClick:s,onTokenEnter:f,onTokenLeave:c,renderGutterUtility:u,__debugPointerEvents:h,enableLineSelection:m,controlledSelection:p,onLineSelected:g,onLineSelectionStart:y,onLineSelectionChange:v,onLineSelectionEnd:_},b,k,R){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:Ta({enableGutterUtility:t,renderGutterUtility:u,onGutterUtilityClick:n}),usesCustomGutterUtility:u!=null,lineHoverHighlight:i,onGutterUtilityClick:n,onHunkExpand:b,onMergeConflictActionClick:R,onLineClick:r,onLineEnter:a,onLineLeave:l,onLineNumberClick:d,onTokenClick:s,onTokenEnter:f,onTokenLeave:c,__debugPointerEvents:h,enableLineSelection:m,controlledSelection:p,onLineSelected:g,onLineSelectionStart:y,onLineSelectionChange:v,onLineSelectionEnd:_,getLineIndex:k}}function Ta({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:i}){if(i!=null&&t!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function ce(e){return e!=null&&"kind"in e&&e.kind==="line"}function we(e){return e!=null&&"kind"in e&&e.kind==="token"}function tt(e){return ce(e)||we(e)}function Ia(e){return"type"in e&&e.type==="line-info"}function Ra(e){return"kind"in e&&e.kind==="merge-conflict-action"}function Sa(e){return e==="current"||e==="incoming"||e==="both"}function ci(e,t){const i=e?.querySelector(t);return i instanceof HTMLElement?i:void 0}function Se(e){const t=[];let i=e;for(;i!=null;)t.push(i),i=i.parentNode;return t}function Pa(e){const t=e.closest("[data-line], [data-column-number]");if(t instanceof HTMLElement)return t;const i=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(i instanceof HTMLElement))return;const n=i.previousElementSibling;return n instanceof HTMLElement&&(n.hasAttribute("data-line")||n.hasAttribute("data-column-number"))?n:void 0}function xa(e){const t=e.closest('[slot^="annotation-"]');if(t instanceof HTMLElement)return t.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const i=e.getAttribute("name")??void 0;return i!=null&&i.startsWith("annotation-")?i:void 0}}function Aa(e){if(e==null)return;const t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;const i=Number.parseInt(t[2],10);if(!(!Number.isFinite(i)||i<=0))return{lineNumber:i,side:t[1]}}function ui(e){return e!=null&&typeof e.elementFromPoint=="function"}function wa(e,t){return e===t||ct(e??void 0,t??void 0)}function fi(e,t){return e?.highlightSide===t.highlightSide&&e?.lineNumberOnly===t.lineNumberOnly&&wa(e?.range??null,t.range)}function hi(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function mi(e){const t=e.getAttribute("data-line-type");if(t!=null)switch(t){case"change-deletion":case"change-addition":case"context":case"context-expanded":return t;default:return}}function Q(e="none",t,...i){switch(e){case"none":return;case"both":break;case"click":if(t!=="click")return;break;case"move":if(t!=="move")return;break}console.log(...i)}var Hs=class J{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const t=J.resizeObserver??new ResizeObserver(J.handleSharedResizeEntries);return J.resizeObserver=t,t}static handleSharedResizeEntries(t){const i=new Map;for(const n of t){const r=J.managersByElement.get(n.target);if(r==null)continue;const a=i.get(r);a==null?i.set(r,[n]):a.push(n)}for(const[n,r]of i)n.handleResizeEntries(r)}observedNodes=new Map;setup(t,{disableAnnotations:i,columnVariables:n="apply"}){const r=new Set,a=n==="apply";let l=0;const d=new Map(this.observedNodes);this.observedNodes.clear();for(const s of t.children){if(l===2)break;const f=(()=>{if(s instanceof HTMLElement&&s.tagName==="CODE")return s})();if(f==null)continue;l++;let c=d.get(f);if(c!=null&&c.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let u=f.firstElementChild;u instanceof HTMLElement||(u=null),c!=null?(this.observedNodes.set(f,c),d.delete(f),c.numberElement!==u?(c.numberElement!=null&&(this.unobserve(c.numberElement),d.delete(c.numberElement)),u!=null&&(this.observe(u),d.delete(u),this.observedNodes.set(u,c)),c.numberElement=u,c.numberWidth=0):c.numberElement!=null?(d.delete(c.numberElement),this.observedNodes.set(c.numberElement,c)):c.numberWidth=0,Ca(c,a)):(c={type:"code",codeElement:f,numberElement:u,codeWidth:"auto",numberWidth:0,applyColumnVariables:a},this.observedNodes.set(f,c),this.observe(f),u!=null&&(this.observedNodes.set(u,c),this.observe(u)))}if(l>1&&!i){const s=t.querySelectorAll('[data-line-annotation*=","]'),f=new Map;for(const c of s){if(!(c instanceof HTMLElement))continue;const u=c.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(u)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:u,element:c});continue}let h=f.get(u);h==null&&(h=[],f.set(u,h)),h.push(c)}for(const[c,u]of f){if(u.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",c,u);continue}const[h,m]=u,p=h.firstElementChild,g=m.firstElementChild;if(!(h instanceof HTMLElement)||!(m instanceof HTMLElement)||!(p instanceof HTMLElement)||!(g instanceof HTMLElement))continue;let y=d.get(p);if(y!=null){this.observedNodes.set(p,y),this.observedNodes.set(g,y),d.delete(p),d.delete(g);continue}const v=p.getBoundingClientRect().height,_=g.getBoundingClientRect().height;y={type:"annotations",column1:{container:h,child:p,childHeight:v},column2:{container:m,child:g,childHeight:_},currentHeight:"auto"},r.add({child1:p,child2:g,item:y,newHeight:Math.max(v,_)})}for(const c of r)this.applyNewHeight(c.item,c.newHeight),this.observedNodes.set(c.child1,c.item),this.observedNodes.set(c.child2,c.item),this.observe(c.child1),this.observe(c.child2);r.clear()}for(const[s,f]of d)this.unobserve(s),f.type==="code"?Va(f):Na(f);d.clear()}cleanUp(){for(const t of this.observedNodes.keys())this.unobserve(t);this.observedNodes.clear()}observe(t){const{managersByElement:i}=J,n=i.get(t);if(n!==this){if(n!=null&&n!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");i.set(t,this),J.getResizeObserver().observe(t)}}unobserve(t){const{managersByElement:i,resizeObserver:n}=J,r=i.get(t);if(r!=null){if(r!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");i.delete(t),n?.unobserve(t),n!=null&&i.size===0&&(n.disconnect(),J.resizeObserver=void 0)}}handleResizeEntries(t){const i=new Map,n=new Set;for(const r of t){const{target:a,borderBoxSize:l,contentBoxSize:d}=r;if(!(a instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",r);continue}const s=this.observedNodes.get(a);if(s==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",r);continue}if(s.type==="annotations"){const f=(()=>{if(a===s.column1.child)return s.column1;if(a===s.column2.child)return s.column2})();if(f==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:s,target:a});continue}f.childHeight=l[0].blockSize,n.add(s)}else if(s.type==="code"){const f=i.get(s)??{},c=d[0].inlineSize;a===s.codeElement?f.codeInlineSize=c:a===s.numberElement&&(f.numberInlineSize=c),i.set(s,f)}}this.applyAnnotationUpdates(n),n.clear(),this.applyColumnUpdates(i),i.clear()}applyAnnotationUpdates(t){for(const i of t)this.applyNewHeight(i,Math.max(i.column1.childHeight,i.column2.childHeight))}applyColumnUpdates=t=>{for(const[i,n]of t){const r=n.codeInlineSize!=null?Da(n.codeInlineSize):i.codeWidth,a=n.numberInlineSize!=null?Oa(n.numberInlineSize):i.numberWidth,l=r!==i.codeWidth,d=a!==i.numberWidth;!l&&!d||(i.codeWidth=r,i.numberWidth=a,i.applyColumnVariables&&nn(i,{codeWidthChanged:l,numberWidthChanged:d}))}};applyNewHeight(t,i){i!==t.currentHeight&&(t.currentHeight=Math.max(i,0),t.column1.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`),t.column2.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`))}};function Da(e){const t=Math.max(Math.floor(e),0);return t===0?"auto":t}function Oa(e){return Math.max(Math.ceil(e),0)}function Ca(e,t){e.applyColumnVariables!==t&&(e.applyColumnVariables=t,t?nn(e,{codeWidthChanged:!0,numberWidthChanged:!0}):rn(e))}function nn(e,{codeWidthChanged:t,numberWidthChanged:i}){const{codeElement:n,codeWidth:r,numberWidth:a}=e;if(t&&n.style.setProperty("--diffs-column-width",`${typeof r=="number"?`${r}px`:"auto"}`),i&&n.style.setProperty("--diffs-column-number-width",`${a===0?"auto":`${a}px`}`),t||i&&r!=="auto"){const l=typeof r=="number"?Math.max(r-a,0):0;n.style.setProperty("--diffs-column-content-width",`${l>0?`${l}px`:"auto"}`)}}function rn(e){e.codeElement.style.removeProperty("--diffs-column-content-width"),e.codeElement.style.removeProperty("--diffs-column-number-width"),e.codeElement.style.removeProperty("--diffs-column-width")}function Va(e){e.codeElement.isConnected&&rn(e)}function Na(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty("--diffs-annotation-min-height"),e.column2.container.isConnected&&e.column2.container.style.removeProperty("--diffs-annotation-min-height")}function zs(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function Fs(e){for(const t of Array.isArray(e)?e:[e])if(!(t==="text"||t==="ansi")&&!ot.has(t))return!1;return!0}function Us(e){for(const t of De(e))if(!nt.has(t))return!1;return!0}function Bs(e,t){return e.endsWith(`\r
15
+ `:t)}function et(e,t,i){return e==="change"?{type:"change",additions:0,deletions:0,additionLineIndex:i,deletionLineIndex:t}:{type:"context",lines:0,additionLineIndex:i,deletionLineIndex:t}}function As(e){if(typeof HTMLStyleElement<"u"&&e instanceof HTMLStyleElement)return!0;const t=e.tagName??e.nodeName;return typeof t=="string"&&t.toLowerCase()==="style"}const ws="-1,-1";function Ds(e){return e?.some(t=>t.lineNumber===0)??!1}function Os(e){const t=e[0];return t!=null&&t.length>0?t:void 0}function Cs(e){return e.startingLine===0&&e.totalLines>0}function La(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}function ka(){return A({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[st({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}var Vs=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;selectedRangeHighlightSide;selectedRangeLineNumberOnly=!1;editorActiveLine=null;editorActiveLineSide;editorLineNumberOnly=!1;proposedSelectedRange;renderedSelectedLinesState;renderedEditorActiveLineState;selectionAnchor;pointerSession={mode:"idle"};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),it(this.renderSelection),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1,this.setSelectionDirty()}setup(e){this.setSelectionDirty();const{usesCustomGutterUtility:t=!1,enableGutterUtility:i=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),i?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode==="gutterSelecting"&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectedLinesState=void 0,this.renderedEditorActiveLineState=void 0}isSelectionDirty(){return this.renderedSelectedLinesState===void 0||this.renderedEditorActiveLineState===void 0}setSelection(e,t){const i=!(e===this.selectedRange||ct(e??void 0,this.selectedRange??void 0)),n=t?.lineNumberOnly??!1,r=t?.activeLineSide!==this.selectedRangeHighlightSide||n!==this.selectedRangeLineNumberOnly;!this.isSelectionDirty()&&!i&&!r||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.selectedRangeHighlightSide=t?.activeLineSide,this.selectedRangeLineNumberOnly=n,this.renderSelection(),this.placeUtility(),i&&t?.notify!==!1&&this.notifySelectionCommitted(e))}setEditorActiveLine(e,{lineNumberOnly:t=!1,side:i}={}){const n=e!==this.editorActiveLine,r=i!==this.editorActiveLineSide||t!==this.editorLineNumberOnly;!this.isSelectionDirty()&&!n&&!r||(this.editorActiveLine=e,this.editorActiveLineSide=i,this.editorLineNumberOnly=t,this.renderSelection())}getSelection(){return this.selectedRange}getHoveredLine=()=>{const e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode==="diff"&&e.type==="diff-line")return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode==="file"&&e.type==="line")return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{const{onHunkExpand:t,onLineClick:i,onLineNumberClick:n,onTokenClick:r,onMergeConflictActionClick:a}=this.options;t==null&&i==null&&n==null&&a==null&&r==null||this.options.onGutterUtilityClick!=null&&pe(e.composedPath())||(Q(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if(e.pointerType!=="mouse")return;const{lineHoverHighlight:t="disabled",onLineEnter:i,onLineLeave:n,onTokenEnter:r,onTokenLeave:a,enableGutterUtility:l=!1}=this.options;t==="disabled"&&!l&&i==null&&n==null&&r==null&&a==null||(Q(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if(Q(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){Q(t,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){const{__debugPointerEvents:i}=this.options,n=t.composedPath();Q(i,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:n});const r=this.resolvePointerTarget(n);Q(i,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",r);const{onLineClick:a,onLineNumberClick:l,onLineEnter:d,onLineLeave:s,onTokenClick:f,onTokenEnter:c,onTokenLeave:u,onHunkExpand:h,onMergeConflictActionClick:m}=this.options;switch(e){case"move":{const p=tt(r)&&this.hoveredLine?.lineElement===r.lineElement;we(r)&&this.hoveredToken?.tokenElement===r.tokenElement||(this.hoveredToken!=null&&(u?.(this.hoveredToken,t),this.clearHoveredToken()),we(r)&&(this.setHoveredToken(this.toTokenEventBaseProps(r)),c?.(this.hoveredToken,t))),p||(this.hoveredLine!=null&&(s?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),tt(r)?(this.setHoveredLine(this.toEventBaseProps(r)),this.placeUtility(),d?.({...this.hoveredLine,event:t})):this.placeUtility());break}case"click":{if(r==null)break;if(Ra(r)&&m!=null){m(r);break}if(Ia(r)&&h!=null){h(r.hunkIndex,r.all||t.shiftKey?"both":r.direction,r.all||t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!tt(r))break;we(r)&&f!=null&&f(this.toTokenEventBaseProps(r),t);const p=this.toEventBaseProps(r);l!=null&&r.numberColumn?l({...p,event:t}):a?.({...p,event:t});break}}}syncPointerListeners(e){const{__debugPointerEvents:t,lineHoverHighlight:i="disabled",onLineClick:n,onLineNumberClick:r,onLineEnter:a,onLineLeave:l,onTokenClick:d,onTokenEnter:s,onTokenLeave:f,onHunkExpand:c,onMergeConflictActionClick:u,enableGutterUtility:h=!1,enableLineSelection:m=!1,onGutterUtilityClick:p}=this.options,g=p!=null,y=i!=="disabled"||n!=null||r!=null||a!=null||l!=null||d!=null||s!=null||f!=null||c!=null||u!=null||h||m||g;y&&!this.hasPointerListeners?(e.addEventListener("click",this.handlePointerClick),e.addEventListener("pointerdown",this.handlePointerDown),e.addEventListener("pointermove",this.handlePointerMove),e.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,Q(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const b=[];return(t==="both"||t==="click")&&(n!=null&&b.push("onLineClick"),r!=null&&b.push("onLineNumberClick"),c!=null&&b.push("expandable hunk separators"),u!=null&&b.push("merge conflict actions")),b})()),Q(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),Q(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!y&&this.hasPointerListeners&&(e.removeEventListener("click",this.handlePointerClick),e.removeEventListener("pointerdown",this.handlePointerDown),e.removeEventListener("pointermove",this.handlePointerMove),e.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const v=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",_=this.pointerSession.mode==="gutterSelecting";(!m&&v||!g&&_)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:t,enableLineSelection:i=!1}=this.options,n=e!=null,r=t!=null||i;n&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!n&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),r&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!r&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType==="mouse"&&e.button!==0||this.pre==null||this.pointerSession.mode!=="idle")return;const t=e.composedPath();pe(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){const{enableLineSelection:t=!1}=this.options;if(!t)return;const i=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(i==null)return;const{pre:n}=this;if(n==null)return;const{lineNumber:r,eventSide:a,lineIndex:l}=i;if(e.shiftKey&&this.selectedRange!=null){const d=this.getIndexesFromSelection(this.selectedRange,n.getAttribute("data-diff-type")==="split");if(d==null)return;const s=d.start<=d.end?l>=d.start:l<=d.end;this.selectionAnchor={lineNumber:s?this.selectedRange.start:this.selectedRange.end,side:s?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(r,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===r&&this.selectedRange?.end===r){const d={lineNumber:r,side:a};this.selectionAnchor=d,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:d,pending:d},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:r,side:a},this.updateSelection(r,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){const{onGutterUtilityClick:t}=this.options;if(t==null)return;const i=this.currentSelectionEnds(),n=i?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),r=i?.top??n;n==null||r==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:r,current:n},this.selectionAnchor={lineNumber:r.lineNumber,side:r.side},this.updateSelection(n.lineNumber,n.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionPoint(e,{source:"coordinates-first"});if(t==null)return;this.pointerSession.current=t,this.updateSelection(t.lineNumber,t.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;const i={lineNumber:t.lineNumber,side:t.eventSide};if(La(this.pointerSession.pending,i))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{const{pointerSession:i}=this;if(e.pointerId!==i.pointerId)return;e.preventDefault();const n=this.resolveSelectionPoint(e,{source:"coordinates-first"});n!=null&&(i.current=n,this.updateSelection(n.lineNumber,n.side));const r=this.buildSelectedLineRange(i.anchor,i.current);t?.({...r}),this.selectionAnchor=void 0,this.notifySelectionEnd(r),this.notifySelectionCommitted(r),this.clearProposedSelection(),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(e){const{lineHoverHighlight:t="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!=="disabled"&&((t==="both"||t==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(t==="both"||t==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer==null&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot==null&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){const t=document.createElement("div");t.innerHTML=Vn(ka());const i=t.firstElementChild;if(!(i instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");i.remove(),this.gutterUtilityButton=i}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const t=this.resolvePointerTarget(e);ce(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){const e=this.currentSelectionEnds();if(e==null)return!1;const t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){const e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){const t={lineNumber:e.start,side:e.side},i={lineNumber:e.end,side:e.endSide??e.side},n=this.selectionPointRowIndex(t),r=this.selectionPointRowIndex(i);if(!(n==null||r==null))return n>r?{top:i,bottom:t}:{top:t,bottom:i}}selectionPointRowIndex(e){const t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;const t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;const i=this.mode==="diff"?`${t[0]},${t[1]}`:`${t[0]}`,n=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${i}"]`);for(const r of n){if(!(r instanceof HTMLElement))continue;const a=this.resolvePointerTarget(Se(r));if(ce(a)&&!(this.mode==="diff"&&e.side!=null&&a.side!==e.side))return a}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){this.pointerSession.mode==="pendingSingleLineUnselect"&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(e,t){const i=this.resolvePointerTarget(e);if(ce(i)&&!(t&&!i.numberColumn)&&i.splitLineIndex!=null)return{lineIndex:i.splitLineIndex,lineNumber:i.lineNumber,eventSide:this.mode==="diff"?i.side:void 0}}resolveSelectionInfo(e,t){const i=this.resolveSelectionPath(e,t);return i!=null?this.selectionInfoFromPath(i,t.requireNumberColumn):void 0}selectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(ce(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}resolveSelectionPoint(e,t){const i=this.resolveSelectionPath(e,t);return i!=null?this.selectionPointFromPath(i):void 0}resolveSelectionPath(e,t){const i=t.excludeUtility!==!1;switch(t.source){case"event-path":return this.pathFromEventPath(e.composedPath(),i);case"coordinates-first":{const n=this.pathFromCoordinates(e,i);return n!==void 0?n??void 0:this.pathFromEventPath(e.composedPath(),i)}}}pathFromCoordinates(e,t){const i=this.hitTest(e);if(i!==void 0)return i===null?null:this.pathFromElement(i,t)??null}pathFromEventPath(e,t){if(!(t&&pe(e))){for(const i of e)if(i instanceof Element)return this.pathFromElement(i,t)}}pathFromElement(e,t){const i=Se(e);if(t&&pe(i))return;const n=Pa(e);return n!=null?Se(n):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const t=Aa(xa(e));if(t==null)return;const i=this.targetForSelectionPoint(t);return i!=null?Se(i.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const t=this.pre?.getRootNode(),i=ui(t)?t:ui(document)?document:void 0;if(i!=null)return i.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){const{getLineIndex:i}=this.options;return i!=null?i(e,t):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,i=!0){const n=this.getCurrentSelectionRange();let r;if(e==null)r=null;else{const a=this.selectionAnchor?.side??t,l=this.selectionAnchor?.lineNumber??e;r=this.buildSelectionRange(l,e,a,t)}ct(n??void 0,r??void 0)||(this.selectedRangeHighlightSide=void 0,this.selectedRangeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=r:(this.selectedRange=r,z(this.renderSelection)),this.placeUtility(),i&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;const i=this.getLineIndex(e.start,e.side),n=this.getLineIndex(e.end,e.endSide??e.side);return i!=null&&n!=null?{start:t?i[1]:i[0],end:t?n[1]:n[0]}:void 0}getSelectionRenderState(){return{selectedLines:{range:this.selectedRange,highlightSide:this.selectedRangeHighlightSide,lineNumberOnly:this.selectedRangeLineNumberOnly},editorActiveLine:{range:this.editorActiveLine==null?null:{start:this.editorActiveLine,end:this.editorActiveLine,side:this.editorActiveLineSide},highlightSide:this.editorActiveLineSide,lineNumberOnly:this.editorLineNumberOnly}}}resolveLineRenderRange(e,t,i){if(e.range==null)return;const n=this.getIndexesFromSelection(e.range,t);if(n==null)throw console.error({rowRange:n,range:e.range}),new Error(`InteractionManager.renderSelection: No valid ${i} rowRange`);return n}getLineRenderColumns(e,t,i,n){if(this.pre==null||t==null&&n==null)return[];const{children:r}=this.pre;if(r.length>2)throw console.error(r),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const a=[];for(const l of r){const d=l.hasAttribute("data-deletions")?"deletions":l.hasAttribute("data-additions")?"additions":void 0,s=e!=null&&t!=null&&(e.highlightSide==null||d==null||e.highlightSide===d),f=i!=null&&n!=null&&(i.highlightSide==null||d==null||i.highlightSide===d);if(!s&&!f)continue;const[c,u]=l.children;if(!(c instanceof HTMLElement)||!(u instanceof HTMLElement))throw new Error("InteractionManager.renderSelection: missing gutter or content element");if(u.children.length!==c.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");a.push({content:u,gutter:c,renderEditorActiveLine:f,renderSelectedLines:s})}return a}renderSelection=()=>{it(this.renderSelection);const e=this.getSelectionRenderState();if(this.pre==null)return;const{editorActiveLine:t,selectedLines:i}=e,n=!fi(this.renderedSelectedLinesState,i),r=!fi(this.renderedEditorActiveLineState,t);if(!n&&!r)return;n&&(this.renderedSelectedLinesState=void 0),r&&(this.renderedEditorActiveLineState=void 0);const a=this.pre.getAttribute("data-diff-type")==="split",l=n?this.resolveLineRenderRange(i,a,"selected-lines"):void 0,d=r?this.resolveLineRenderRange(t,a,"editor-active-line"):void 0,s=this.getLineRenderColumns(n?i:void 0,l,r?t:void 0,d),f=i.range==null||s.some(g=>g.renderSelectedLines),c=t.range==null||s.some(g=>g.renderEditorActiveLine);if(n)for(const g of this.pre.querySelectorAll("[data-selected-line]"))g.removeAttribute("data-selected-line");if(r)for(const g of this.pre.querySelectorAll("[data-editor-active-line]"))g.removeAttribute("data-editor-active-line");const u=l==null?void 0:Math.min(l.start,l.end),h=l==null?void 0:Math.max(l.start,l.end),m=u===h,p=d?.start;for(const g of s){const{content:y,gutter:v,renderEditorActiveLine:_,renderSelectedLines:b}=g,k=Math.max(b?h??-1/0:-1/0,_?p??-1/0:-1/0),R=y.children.length;for(let E=0;E<R;E++){const T=y.children[E],S=v.children[E];if(!(T instanceof HTMLElement)||!(S instanceof HTMLElement))continue;const L=this.parseLineIndex(T,a);if((L??0)>k)break;if(L!=null){if(b&&u!=null&&h!=null&&L>=u&&L<=h){let x=m?"single":L===u?"first":L===h?"last":"";S.setAttribute("data-selected-line",x),i.lineNumberOnly||(T.setAttribute("data-selected-line",x),S.nextSibling instanceof HTMLElement&&T.nextSibling instanceof HTMLElement&&(T.nextSibling.hasAttribute("data-line-annotation")||T.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(m?(x="last",T.setAttribute("data-selected-line","first")):L===u?x="":L===h&&T.setAttribute("data-selected-line",""),T.nextSibling.setAttribute("data-selected-line",x),S.nextSibling.setAttribute("data-selected-line",x)))}_&&L===p&&(S.setAttribute("data-editor-active-line",""),t.lineNumberOnly||T.setAttribute("data-editor-active-line",""))}}}n&&f&&(this.renderedSelectedLinesState=i),r&&c&&(this.renderedEditorActiveLineState=t)};notifySelectionCommitted(e){this.options.onLineSelected?.(e)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode==="file"?{type:"line",lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:"diff-line",annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:i,side:n,tokenElement:r,tokenText:a}){return this.mode==="file"?{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:i,tokenElement:r,tokenText:a}:{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:i,side:n,tokenElement:r,tokenText:a}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,i,n){return{start:e,end:t,...i!=null?{side:i}:{},...i!==n&&n!=null?{endSide:n}:{}}}resolvePointerTarget(e){let t=!1,i,n,r,a,l,d,s,f,c,u;for(const m of e){if(!(m instanceof HTMLElement))continue;if(u==null&&m.hasAttribute("data-merge-conflict-action")){const v=m.getAttribute("data-merge-conflict-action")??void 0,_=m.getAttribute("data-merge-conflict-conflict-index")??void 0,b=_!=null?Number.parseInt(_,10):NaN;Sa(v)&&Number.isFinite(b)&&(u={kind:"merge-conflict-action",resolution:v,conflictIndex:b})}if(d==null&&m.hasAttribute("data-char")){d=m;const v=m.getAttribute("data-char");if(v!=null){const _=Number.parseInt(v,10);if(!Number.isNaN(_)){const b=m.textContent??"",k=_+b.length;(b.trim()!==""||this.options.enableTokenInteractionsOnWhitespace===!0)&&(s={tokenElement:d,lineCharStart:_,lineCharEnd:k,tokenText:b});continue}}}const p=l==null?m.getAttribute("data-column-number")??void 0:void 0;if(p!=null){l=m,c=Number.parseInt(p,10),t=!0,i=mi(m),a=m.getAttribute("data-line-index")??void 0;continue}const g=r==null?m.getAttribute("data-line")??void 0:void 0;if(g!=null){r=m,c=Number.parseInt(g,10),i=mi(m),a=m.getAttribute("data-line-index")??void 0;continue}if(f==null&&(m.hasAttribute("data-expand-button")||m.hasAttribute("data-unmodified-lines"))){f={hunkIndex:void 0,direction:m.hasAttribute("data-expand-up")?"up":m.hasAttribute("data-expand-down")?"down":"both",all:m.hasAttribute("data-expand-all-button")};continue}const y=f!=null?m.getAttribute("data-expand-index")??void 0:void 0;if(f!=null&&y!=null){const v=Number.parseInt(y,10);Number.isNaN(v)||(f.hunkIndex=v);continue}if(n==null&&m.hasAttribute("data-code")){n=m;break}}if(u!=null)return u;if(f?.hunkIndex!=null)return{type:"line-info",hunkIndex:f.hunkIndex,direction:f.direction,all:f.all};if(r??=a!=null?ci(n,`[data-line][data-line-index="${a}"]`):void 0,l??=a!=null?ci(n,`[data-column-number][data-line-index="${a}"]`):void 0,n==null||r==null||l==null||i==null||c==null||Number.isNaN(c))return;const h=this.parseLineIndex(r,this.isSplitDiff());return s!=null?this.mode==="file"?{kind:"token",lineType:i,lineElement:r,lineNumber:c,numberColumn:t,numberElement:l,side:void 0,splitLineIndex:h,...s}:{kind:"token",lineType:i,lineElement:r,lineNumber:c,numberColumn:t,numberElement:l,side:hi(i,n),splitLineIndex:h,...s}:this.mode==="file"?{kind:"line",lineType:i,lineElement:r,lineNumber:c,numberColumn:t,numberElement:l,side:void 0,splitLineIndex:h}:{kind:"line",lineType:i,lineElement:r,lineNumber:c,numberColumn:t,numberElement:l,side:hi(i,n),splitLineIndex:h}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,t){const i=(e.getAttribute("data-line-index")??"").split(",").map(n=>Number.parseInt(n,10)).filter(n=>!Number.isNaN(n));if(t&&i.length===2)return i[1];if(!t)return i[0]}};function Ns({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:i,onGutterUtilityClick:n,onLineClick:r,onLineEnter:a,onLineLeave:l,onLineNumberClick:d,onTokenClick:s,onTokenEnter:f,onTokenLeave:c,renderGutterUtility:u,__debugPointerEvents:h,enableLineSelection:m,controlledSelection:p,onLineSelected:g,onLineSelectionStart:y,onLineSelectionChange:v,onLineSelectionEnd:_},b,k,R){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:Ta({enableGutterUtility:t,renderGutterUtility:u,onGutterUtilityClick:n}),usesCustomGutterUtility:u!=null,lineHoverHighlight:i,onGutterUtilityClick:n,onHunkExpand:b,onMergeConflictActionClick:R,onLineClick:r,onLineEnter:a,onLineLeave:l,onLineNumberClick:d,onTokenClick:s,onTokenEnter:f,onTokenLeave:c,__debugPointerEvents:h,enableLineSelection:m,controlledSelection:p,onLineSelected:g,onLineSelectionStart:y,onLineSelectionChange:v,onLineSelectionEnd:_,getLineIndex:k}}function Ta({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:i}){if(i!=null&&t!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function ce(e){return e!=null&&"kind"in e&&e.kind==="line"}function we(e){return e!=null&&"kind"in e&&e.kind==="token"}function tt(e){return ce(e)||we(e)}function Ia(e){return"type"in e&&e.type==="line-info"}function Ra(e){return"kind"in e&&e.kind==="merge-conflict-action"}function Sa(e){return e==="current"||e==="incoming"||e==="both"}function ci(e,t){const i=e?.querySelector(t);return i instanceof HTMLElement?i:void 0}function Se(e){const t=[];let i=e;for(;i!=null;)t.push(i),i=i.parentNode;return t}function Pa(e){const t=e.closest("[data-line], [data-column-number]");if(t instanceof HTMLElement)return t;const i=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(i instanceof HTMLElement))return;const n=i.previousElementSibling;return n instanceof HTMLElement&&(n.hasAttribute("data-line")||n.hasAttribute("data-column-number"))?n:void 0}function xa(e){const t=e.closest('[slot^="annotation-"]');if(t instanceof HTMLElement)return t.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const i=e.getAttribute("name")??void 0;return i!=null&&i.startsWith("annotation-")?i:void 0}}function Aa(e){if(e==null)return;const t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;const i=Number.parseInt(t[2],10);if(!(!Number.isFinite(i)||i<=0))return{lineNumber:i,side:t[1]}}function ui(e){return e!=null&&typeof e.elementFromPoint=="function"}function wa(e,t){return e===t||ct(e??void 0,t??void 0)}function fi(e,t){return e?.highlightSide===t.highlightSide&&e?.lineNumberOnly===t.lineNumberOnly&&wa(e?.range??null,t.range)}function hi(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function mi(e){const t=e.getAttribute("data-line-type");if(t!=null)switch(t){case"change-deletion":case"change-addition":case"context":case"context-expanded":return t;default:return}}function Q(e="none",t,...i){switch(e){case"none":return;case"both":break;case"click":if(t!=="click")return;break;case"move":if(t!=="move")return;break}console.log(...i)}var Ms=class J{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const t=J.resizeObserver??new ResizeObserver(J.handleSharedResizeEntries);return J.resizeObserver=t,t}static handleSharedResizeEntries(t){const i=new Map;for(const n of t){const r=J.managersByElement.get(n.target);if(r==null)continue;const a=i.get(r);a==null?i.set(r,[n]):a.push(n)}for(const[n,r]of i)n.handleResizeEntries(r)}observedNodes=new Map;setup(t,{disableAnnotations:i,columnVariables:n="apply"}){const r=new Set,a=n==="apply";let l=0;const d=new Map(this.observedNodes);this.observedNodes.clear();for(const s of t.children){if(l===2)break;const f=(()=>{if(s instanceof HTMLElement&&s.tagName==="CODE")return s})();if(f==null)continue;l++;let c=d.get(f);if(c!=null&&c.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let u=f.firstElementChild;u instanceof HTMLElement||(u=null),c!=null?(this.observedNodes.set(f,c),d.delete(f),c.numberElement!==u?(c.numberElement!=null&&(this.unobserve(c.numberElement),d.delete(c.numberElement)),u!=null&&(this.observe(u),d.delete(u),this.observedNodes.set(u,c)),c.numberElement=u,c.numberWidth=0):c.numberElement!=null?(d.delete(c.numberElement),this.observedNodes.set(c.numberElement,c)):c.numberWidth=0,Ca(c,a)):(c={type:"code",codeElement:f,numberElement:u,codeWidth:"auto",numberWidth:0,applyColumnVariables:a},this.observedNodes.set(f,c),this.observe(f),u!=null&&(this.observedNodes.set(u,c),this.observe(u)))}if(l>1&&!i){const s=t.querySelectorAll('[data-line-annotation*=","]'),f=new Map;for(const c of s){if(!(c instanceof HTMLElement))continue;const u=c.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(u)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:u,element:c});continue}let h=f.get(u);h==null&&(h=[],f.set(u,h)),h.push(c)}for(const[c,u]of f){if(u.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",c,u);continue}const[h,m]=u,p=h.firstElementChild,g=m.firstElementChild;if(!(h instanceof HTMLElement)||!(m instanceof HTMLElement)||!(p instanceof HTMLElement)||!(g instanceof HTMLElement))continue;let y=d.get(p);if(y!=null){this.observedNodes.set(p,y),this.observedNodes.set(g,y),d.delete(p),d.delete(g);continue}const v=p.getBoundingClientRect().height,_=g.getBoundingClientRect().height;y={type:"annotations",column1:{container:h,child:p,childHeight:v},column2:{container:m,child:g,childHeight:_},currentHeight:"auto"},r.add({child1:p,child2:g,item:y,newHeight:Math.max(v,_)})}for(const c of r)this.applyNewHeight(c.item,c.newHeight),this.observedNodes.set(c.child1,c.item),this.observedNodes.set(c.child2,c.item),this.observe(c.child1),this.observe(c.child2);r.clear()}for(const[s,f]of d)this.unobserve(s),f.type==="code"?Va(f):Na(f);d.clear()}cleanUp(){for(const t of this.observedNodes.keys())this.unobserve(t);this.observedNodes.clear()}observe(t){const{managersByElement:i}=J,n=i.get(t);if(n!==this){if(n!=null&&n!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");i.set(t,this),J.getResizeObserver().observe(t)}}unobserve(t){const{managersByElement:i,resizeObserver:n}=J,r=i.get(t);if(r!=null){if(r!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");i.delete(t),n?.unobserve(t),n!=null&&i.size===0&&(n.disconnect(),J.resizeObserver=void 0)}}handleResizeEntries(t){const i=new Map,n=new Set;for(const r of t){const{target:a,borderBoxSize:l,contentBoxSize:d}=r;if(!(a instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",r);continue}const s=this.observedNodes.get(a);if(s==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",r);continue}if(s.type==="annotations"){const f=(()=>{if(a===s.column1.child)return s.column1;if(a===s.column2.child)return s.column2})();if(f==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:s,target:a});continue}f.childHeight=l[0].blockSize,n.add(s)}else if(s.type==="code"){const f=i.get(s)??{},c=d[0].inlineSize;a===s.codeElement?f.codeInlineSize=c:a===s.numberElement&&(f.numberInlineSize=c),i.set(s,f)}}this.applyAnnotationUpdates(n),n.clear(),this.applyColumnUpdates(i),i.clear()}applyAnnotationUpdates(t){for(const i of t)this.applyNewHeight(i,Math.max(i.column1.childHeight,i.column2.childHeight))}applyColumnUpdates=t=>{for(const[i,n]of t){const r=n.codeInlineSize!=null?Da(n.codeInlineSize):i.codeWidth,a=n.numberInlineSize!=null?Oa(n.numberInlineSize):i.numberWidth,l=r!==i.codeWidth,d=a!==i.numberWidth;!l&&!d||(i.codeWidth=r,i.numberWidth=a,i.applyColumnVariables&&nn(i,{codeWidthChanged:l,numberWidthChanged:d}))}};applyNewHeight(t,i){i!==t.currentHeight&&(t.currentHeight=Math.max(i,0),t.column1.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`),t.column2.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`))}};function Da(e){const t=Math.max(Math.floor(e),0);return t===0?"auto":t}function Oa(e){return Math.max(Math.ceil(e),0)}function Ca(e,t){e.applyColumnVariables!==t&&(e.applyColumnVariables=t,t?nn(e,{codeWidthChanged:!0,numberWidthChanged:!0}):rn(e))}function nn(e,{codeWidthChanged:t,numberWidthChanged:i}){const{codeElement:n,codeWidth:r,numberWidth:a}=e;if(t&&n.style.setProperty("--diffs-column-width",`${typeof r=="number"?`${r}px`:"auto"}`),i&&n.style.setProperty("--diffs-column-number-width",`${a===0?"auto":`${a}px`}`),t||i&&r!=="auto"){const l=typeof r=="number"?Math.max(r-a,0):0;n.style.setProperty("--diffs-column-content-width",`${l>0?`${l}px`:"auto"}`)}}function rn(e){e.codeElement.style.removeProperty("--diffs-column-content-width"),e.codeElement.style.removeProperty("--diffs-column-number-width"),e.codeElement.style.removeProperty("--diffs-column-width")}function Va(e){e.codeElement.isConnected&&rn(e)}function Na(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty("--diffs-annotation-min-height"),e.column2.container.isConnected&&e.column2.container.style.removeProperty("--diffs-annotation-min-height")}function Hs(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function zs(e){for(const t of Array.isArray(e)?e:[e])if(!(t==="text"||t==="ansi")&&!ot.has(t))return!1;return!0}function Fs(e){for(const t of De(e))if(!nt.has(t))return!1;return!0}function Us(e,t){return e.endsWith(`\r
16
16
  `)?t+`\r
17
17
  `:e.endsWith("\r")?t+"\r":e.endsWith(`
18
18
  `)?t+`
19
- `:t}function qs(e){return A({tagName:"div",children:[A({tagName:"div",children:e.annotations?.map(t=>A({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function Ws(e,t){return A({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${t}`}})}function Ma(e){switch(e){case"file":return"diffs-icon-file-code";case"change":return"diffs-icon-symbol-modified";case"new":return"diffs-icon-symbol-added";case"deleted":return"diffs-icon-symbol-deleted";case"rename-pure":case"rename-changed":return"diffs-icon-symbol-moved"}}function $s({fileOrDiff:e,mode:t,stickyHeader:i}){const n="type"in e?e:void 0,r={"data-diffs-header":t,"data-change-type":n?.type,"data-sticky":i?"":void 0};return A({tagName:"div",children:[t==="custom"?A({tagName:"slot",properties:{name:Ln}}):Ha({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:n?.type??"file"}),...t==="custom"?[]:[za(n)]],properties:r})}function Ha({name:e,prevName:t,iconType:i}){const n=[A({tagName:"slot",properties:{name:kn}}),st({name:Ma(i),properties:{"data-change-icon":i}})];return t!=null&&(n.push(A({tagName:"div",children:[A({tagName:"bdi",children:[re(t)]})],properties:{"data-prev-name":""}})),n.push(st({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),n.push(A({tagName:"div",children:[A({tagName:"bdi",children:[re(e)]})],properties:{"data-title":""}})),n.push(A({tagName:"slot",properties:{name:Tn}})),A({tagName:"div",children:n,properties:{"data-header-content":""}})}function za(e){const t=[];if(e!=null){let i=0,n=0;for(const r of e.hunks)i+=r.additionLines,n+=r.deletionLines;(n>0||i===0)&&t.push(A({tagName:"span",children:[re(`-${n}`)],properties:{"data-deletions-count":""}})),(i>0||n===0)&&t.push(A({tagName:"span",children:[re(`+${i}`)],properties:{"data-additions-count":""}}))}return t.push(A({tagName:"slot",properties:{name:In}})),A({tagName:"div",children:t,properties:{"data-metadata":""}})}function js(e){return A({tagName:"pre",properties:Fa(e)})}function Fa({diffIndicators:e,disableBackground:t,disableLineNumbers:i,overflow:n,split:r,totalLines:a,type:l,customProperties:d}){return{...d,"data-diff":l==="diff"?"":void 0,"data-file":l==="file"?"":void 0,"data-diff-type":l==="diff"?r?"split":"single":void 0,"data-overflow":n,"data-disable-line-numbers":i?"":void 0,"data-background":t?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,style:`--diffs-min-number-column-width-default:${`${a}`.length}ch;`}}function Gs(e,{theme:t,preferredHighlighter:i="shiki-js"}){return{langs:[e??"text"],themes:De(t),preferredHighlighter:i}}const Ks=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
19
+ `:t}function Bs(e){return A({tagName:"div",children:[A({tagName:"div",children:e.annotations?.map(t=>A({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function qs(e,t){return A({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${t}`}})}function Ma(e){switch(e){case"file":return"diffs-icon-file-code";case"change":return"diffs-icon-symbol-modified";case"new":return"diffs-icon-symbol-added";case"deleted":return"diffs-icon-symbol-deleted";case"rename-pure":case"rename-changed":return"diffs-icon-symbol-moved"}}function Ws({fileOrDiff:e,mode:t,stickyHeader:i}){const n="type"in e?e:void 0,r={"data-diffs-header":t,"data-change-type":n?.type,"data-sticky":i?"":void 0};return A({tagName:"div",children:[t==="custom"?A({tagName:"slot",properties:{name:Ln}}):Ha({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:n?.type??"file"}),...t==="custom"?[]:[za(n)]],properties:r})}function Ha({name:e,prevName:t,iconType:i}){const n=[A({tagName:"slot",properties:{name:kn}}),st({name:Ma(i),properties:{"data-change-icon":i}})];return t!=null&&(n.push(A({tagName:"div",children:[A({tagName:"bdi",children:[re(t)]})],properties:{"data-prev-name":""}})),n.push(st({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),n.push(A({tagName:"div",children:[A({tagName:"bdi",children:[re(e)]})],properties:{"data-title":""}})),n.push(A({tagName:"slot",properties:{name:Tn}})),A({tagName:"div",children:n,properties:{"data-header-content":""}})}function za(e){const t=[];if(e!=null){let i=0,n=0;for(const r of e.hunks)i+=r.additionLines,n+=r.deletionLines;(n>0||i===0)&&t.push(A({tagName:"span",children:[re(`-${n}`)],properties:{"data-deletions-count":""}})),(i>0||n===0)&&t.push(A({tagName:"span",children:[re(`+${i}`)],properties:{"data-additions-count":""}}))}return t.push(A({tagName:"slot",properties:{name:In}})),A({tagName:"div",children:t,properties:{"data-metadata":""}})}function $s(e){return A({tagName:"pre",properties:Fa(e)})}function Fa({diffIndicators:e,disableBackground:t,disableLineNumbers:i,overflow:n,split:r,totalLines:a,type:l,customProperties:d}){return{...d,"data-diff":l==="diff"?"":void 0,"data-file":l==="file"?"":void 0,"data-diff-type":l==="diff"?r?"split":"single":void 0,"data-overflow":n,"data-disable-line-numbers":i?"":void 0,"data-background":t?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,style:`--diffs-min-number-column-width-default:${`${a}`.length}ch;`}}function js(e,{theme:t,preferredHighlighter:i="shiki-js"}){return{langs:[e??"text"],themes:De(t),preferredHighlighter:i}}const Gs=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
20
20
  <symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
21
21
  <path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>
22
22
  </symbol>
@@ -68,7 +68,7 @@ ${t}`,n=e.startsWith(t)?0:li(e,i,0);if(n===-1)return[e];const r=[];n>0&&r.push(e
68
68
  <symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
69
69
  <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706.286.286.71.54 1.41.73V1.86c-.7.19-1.124.444-1.41.73-.324.325-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8m4 6.397c.697.07 1.522.103 2.5.103 1.613 0 2.806-.088 3.704-.288.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5c-.978 0-1.803.033-2.5.103zM0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m7-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z"/>
70
70
  </symbol>
71
- </svg>`;function Qs(e,t){return e==null||t==null?e===t:Ua(e.customProperties,t.customProperties)&&e.type===t.type&&e.diffIndicators===t.diffIndicators&&e.disableBackground===t.disableBackground&&e.disableLineNumbers===t.disableLineNumbers&&e.overflow===t.overflow&&e.split===t.split&&e.totalLines===t.totalLines}const pi={};function Ua(e=pi,t=pi){if(e===t)return!0;const i=Object.keys(e),n=Object.keys(t);if(i.length!==n.length)return!1;for(const r of i)if(e[r]!==t[r])return!1;return!0}function Js(e){const t=document.createElement("div");return t.dataset.annotationSlot="",t.slot=e,t.style.whiteSpace="normal",t}function Xs(){const e=document.createElement("div");return e.slot="gutter-utility-slot",e.style.position="absolute",e.style.top="0",e.style.bottom="0",e.style.textAlign="center",e.style.whiteSpace="normal",e.style.touchAction="none",e}function Ys(){const e=document.createElement("style");return e.setAttribute(Rn,""),e}let Pe;function Ba(e){if(Pe!=null)return Pe;const t=e.host;if(typeof HTMLElement<"u"&&t instanceof HTMLElement&&!t.isConnected)return;const i=document.createElement("div");i.setAttribute("data-code",""),i.setAttribute(Sn,"true");const n=document.createElement("div");return n.style.position="relative",n.style.width="200%",n.style.height="200%",i.appendChild(n),e.appendChild(i),Pe=Math.max(i.offsetHeight-i.clientHeight,0),i.remove(),Pe}function on(e){return`${_i}: ${e==null?"var(--diffs-scrollbar-gutter-fallback)":`${e}px`};`}var qa=`@layer base {
71
+ </svg>`;function Ks(e,t){return e==null||t==null?e===t:Ua(e.customProperties,t.customProperties)&&e.type===t.type&&e.diffIndicators===t.diffIndicators&&e.disableBackground===t.disableBackground&&e.disableLineNumbers===t.disableLineNumbers&&e.overflow===t.overflow&&e.split===t.split&&e.totalLines===t.totalLines}const pi={};function Ua(e=pi,t=pi){if(e===t)return!0;const i=Object.keys(e),n=Object.keys(t);if(i.length!==n.length)return!1;for(const r of i)if(e[r]!==t[r])return!1;return!0}function Qs(e){const t=document.createElement("div");return t.dataset.annotationSlot="",t.slot=e,t.style.whiteSpace="normal",t}function Js(){const e=document.createElement("div");return e.slot="gutter-utility-slot",e.style.position="absolute",e.style.top="0",e.style.bottom="0",e.style.textAlign="center",e.style.whiteSpace="normal",e.style.touchAction="none",e}function Xs(){const e=document.createElement("style");return e.setAttribute(Rn,""),e}let Pe;function Ba(e){if(Pe!=null)return Pe;const t=e.host;if(typeof HTMLElement<"u"&&t instanceof HTMLElement&&!t.isConnected)return;const i=document.createElement("div");i.setAttribute("data-code",""),i.setAttribute(Sn,"true");const n=document.createElement("div");return n.style.position="relative",n.style.width="200%",n.style.height="200%",i.appendChild(n),e.appendChild(i),Pe=Math.max(i.offsetHeight-i.clientHeight,0),i.remove(),Pe}function on(e){return`${_i}: ${e==null?"var(--diffs-scrollbar-gutter-fallback)":`${e}px`};`}var qa=`@layer base {
72
72
  :host {
73
73
  --diffs-font-fallback: "SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono",
74
74
  "Courier New", monospace;
@@ -1346,17 +1346,17 @@ ${t}`,n=e.startsWith(t)?0:li(e,i,0);if(n===-1)return[e];const r=[];n>0&&r.push(e
1346
1346
  }
1347
1347
 
1348
1348
  @layer theme, rendered, unsafe;
1349
- `;const an="@layer base, theme, rendered, unsafe;",Wa=new RegExp(`${$a(_i)}\\s*:\\s*[^;]+;`);function Zs(e){return`${an}
1349
+ `;const an="@layer base, theme, rendered, unsafe;",Wa=new RegExp(`${$a(_i)}\\s*:\\s*[^;]+;`);function Ys(e){return`${an}
1350
1350
  @layer unsafe {
1351
1351
  ${e}
1352
- }`}function el(e,t="system",i){return`${an}
1352
+ }`}function Zs(e,t="system",i){return`${an}
1353
1353
  @layer rendered {
1354
1354
  :host {${t==="system"?"":`
1355
1355
  color-scheme: ${t};`}
1356
1356
  ${on(i)}
1357
1357
  ${e}
1358
1358
  }
1359
- }`}function tl(e,t){const i=on(t);return e.replace(Wa,i)}function $a(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function il(e){return e?.useTokenTransformer===!0||e?.onTokenClick!=null||e?.onTokenEnter!=null||e?.onTokenLeave!=null}function nl({code:e,pre:t,columnType:i,rowSpan:n,containerSize:r=!1}={}){return e==null&&(e=document.createElement("code"),e.setAttribute("data-code",""),i!=null&&e.setAttribute(`data-${i}`,""),t?.appendChild(e)),n!=null?e.style.setProperty("grid-row",`span ${n}`):e.style.removeProperty("grid-row"),r?e.setAttribute("data-container-size",""):e.removeAttribute("data-container-size"),e}function rl(e,t){const i=e?.offsetHeight??0;if(e==null||i===0){t();return}e.style.minHeight=`${i}px`;try{t(),e.offsetHeight}finally{e.style.minHeight=""}}function ol({shadowRoot:e,currentNode:t,themeCSS:i}){if(i.trim()===""){t?.remove();return}return t??=ja(),t.textContent=i,t.parentNode!==e&&e.appendChild(t),t}function ja(){const e=document.createElement("style");return e.setAttribute(Pn,""),e}function al(e,t){if(t==null)return;const i=e.shadowRoot??e.attachShadow({mode:"open"});i.innerHTML===""&&(i.innerHTML=t)}function sl(e,{type:t,diffIndicators:i,disableBackground:n,disableLineNumbers:r,overflow:a,split:l,totalLines:d,customProperties:s}){if(s!=null)for(const f in s){const c=s[f];c!=null&&e.setAttribute(f,`${c}`)}switch(t==="diff"?(e.setAttribute("data-diff",""),e.removeAttribute("data-file")):(e.setAttribute("data-file",""),e.removeAttribute("data-diff")),i){case"bars":case"classic":e.setAttribute("data-indicators",i);break;case"none":e.removeAttribute("data-indicators");break}return r?e.setAttribute("data-disable-line-numbers",""):e.removeAttribute("data-disable-line-numbers"),n?e.removeAttribute("data-background"):e.setAttribute("data-background",""),t==="diff"?e.setAttribute("data-diff-type",l?"split":"single"):e.removeAttribute("data-diff-type"),e.setAttribute("data-overflow",a),e.style.setProperty("--diffs-min-number-column-width-default",`${`${d}`.length}ch`),e}if(typeof HTMLElement<"u"&&customElements.get("diffs-container")==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;const n=this.attachShadow({mode:"open"});e==null&&(e=new CSSStyleSheet,e.replaceSync(qa)),n.adoptedStyleSheets=[e]}connectedCallback(){Ba(this.shadowRoot??this.attachShadow({mode:"open"}))}}customElements.define(xn,t)}function ll(e,t){return typeof window>"u"&&t!=null?q.jsxs(q.Fragment,{children:[q.jsx("template",{shadowrootmode:"open",dangerouslySetInnerHTML:{__html:t}}),e]}):q.jsx(q.Fragment,{children:e})}function Ga(e,t){return e==null||t==null?e===t:e.top===t.top&&e.bottom===t.bottom}const sn=1e3,Ka=sn*4,Qa=[0,1e-6,.99999,1],Ja={overscrollSize:sn,intersectionObserverMargin:Ka,resizeDebugging:!1};let xe=0,Xa=-1;var Ya=class j{static __STOP=!1;static __lastScrollPosition=0;__id=`virtualizer-${++Xa}`;config;type="simple";intersectionObserver;scrollTop=0;height=0;scrollHeight=0;windowSpecs={top:0,bottom:0};root;contentContainer;resizeObserver;observers=new Map;visibleInstances=new Map;visibleInstancesDirty=!1;instancesChanged=new Set;reconcileQueue=new Set;scrollDirty=!0;heightDirty=!0;scrollHeightDirty=!0;renderedObservers=0;connectQueue=new Map;constructor(t){this.config={...Ja,...t}}setup(t,i){if(this.root==null){this.root=t,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.intersectionObserver=new IntersectionObserver(this.handleIntersectionChange,{root:this.root,threshold:Qa,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),t instanceof Document?this.setupWindow():this.setupElement(i),window.__INSTANCE=this,window.__TOGGLE=()=>{j.__STOP?(j.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:j.__lastScrollPosition}),z(this.computeRenderRangeAndEmit)):(j.__lastScrollPosition=this.getScrollTop(),j.__STOP=!0)};for(const[n,r]of this.connectQueue.entries())this.connect(n,r);this.connectQueue.clear(),this.markDOMDirty(),z(this.computeRenderRangeAndEmit)}}instanceChanged(t,i){this.instancesChanged.add(t),i&&this.markDOMDirty(),z(this.computeRenderRangeAndEmit)}requestHeightReconcile(t){this.reconcileQueue.add(t),z(this.computeRenderRangeAndEmit)}getWindowSpecs(){return this.windowSpecs.top===0&&this.windowSpecs.bottom===0&&(this.windowSpecs=ri({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize})),this.windowSpecs}getRoot(){return this.root}isInstanceVisible(t,i){const n=this.getScrollTop(),r=this.getHeight(),a=this.config.intersectionObserverMargin,l=n-a,d=n+r+a;return!(t<l-i||t>d)}handleContainerResize=t=>{if(this.root==null)return;let i=!1;for(const n of t){const r=n.borderBoxSize[0].blockSize;this.root instanceof Document?r!==this.scrollHeight&&(this.scrollHeightDirty=!0,i=!0,this.config.resizeDebugging&&(console.log("Virtualizer: content size change",this.__id,{sizeChange:r-xe,newSize:r}),xe=r)):n.target===this.root?r!==this.height&&(this.heightDirty=!0,i=!0):n.target===this.contentContainer&&(this.scrollHeightDirty=!0,i=!0,this.config.resizeDebugging&&(console.log("Virtualizer: scroller size change",this.__id,{sizeChange:r-xe,newSize:r}),xe=r))}i&&z(this.computeRenderRangeAndEmit)};setupWindow(){if(this.root==null||!(this.root instanceof Document))throw new Error("Virtualizer.setupWindow: Invalid setup method");window.addEventListener("scroll",this.handleWindowScroll,{passive:!0}),window.addEventListener("resize",this.handleWindowResize,{passive:!0}),this.resizeObserver?.observe(this.root.documentElement)}setupElement(t){if(this.root==null||this.root instanceof Document)throw new Error("Virtualizer.setupElement: Invalid setup method");this.root.addEventListener("scroll",this.handleElementScroll,{passive:!0}),this.resizeObserver?.observe(this.root),t??=this.root.firstElementChild??void 0,t instanceof HTMLElement&&(this.contentContainer=t,this.resizeObserver?.observe(t))}cleanUp(){it(this.computeRenderRangeAndEmit),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.root?.removeEventListener("scroll",this.handleElementScroll),window.removeEventListener("scroll",this.handleWindowScroll),window.removeEventListener("resize",this.handleWindowResize),this.root=void 0,this.contentContainer=void 0,this.observers.clear(),this.visibleInstances.clear(),this.instancesChanged.clear(),this.reconcileQueue.clear(),this.connectQueue.clear(),this.visibleInstancesDirty=!1,this.windowSpecs={top:0,bottom:0},this.scrollTop=0,this.height=0,this.scrollHeight=0,this.scrollDirty=!0,this.heightDirty=!0,this.scrollHeightDirty=!0}getOffsetInScrollContainer(t){return this.getScrollTop()+le(t,this.getScrollContainerElement())}connect(t,i){if(this.observers.has(t))throw new Error("Virtualizer.connect: instance is already connected...");return this.intersectionObserver==null?this.connectQueue.set(t,i):(this.intersectionObserver.observe(t),this.observers.set(t,i),this.instancesChanged.add(i),this.markDOMDirty(),z(this.computeRenderRangeAndEmit)),()=>this.disconnect(t)}disconnect(t){const i=this.observers.get(t);this.connectQueue.delete(t),i!=null&&(this.intersectionObserver?.unobserve(t),this.observers.delete(t),this.instancesChanged.delete(i),this.reconcileQueue.delete(i),this.visibleInstances.delete(t)&&(this.visibleInstancesDirty=!0),this.markDOMDirty(),z(this.computeRenderRangeAndEmit))}handleWindowResize=()=>{j.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,z(this.computeRenderRangeAndEmit))};handleWindowScroll=()=>{j.__STOP||this.root==null||!(this.root instanceof Document)||(this.scrollDirty=!0,z(this.computeRenderRangeAndEmit))};handleElementScroll=()=>{j.__STOP||this.root==null||this.root instanceof Document||(this.scrollDirty=!0,z(this.computeRenderRangeAndEmit))};computeRenderRangeAndEmit=()=>{if(j.__STOP)return;const t=this.heightDirty||this.scrollHeightDirty;let i=this.instancesChanged.size>0;if(this.instancesChanged.size===0){const a=ri({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize});if(!t&&Ga(this.windowSpecs,a)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&this.reconcileQueue.size===0)return;this.windowSpecs=a}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;const n=this.getScrollAnchor(this.height),r=new Set;for(const a of t?this.observers.values():this.visibleInstances.values())a.onRender(t)&&r.add(a);for(const a of this.instancesChanged)r.has(a)||a.onRender(t)&&r.add(a);this.scrollFix(n);for(const a of r)this.reconcileQueue.delete(a),a.reconcileHeights();for(const a of this.reconcileQueue)a.reconcileHeights()&&(i=!0);this.reconcileQueue.clear(),i||=this.instancesChanged.size>0,i&&this.markDOMDirty(),(i||t)&&z(this.computeRenderRangeAndEmit),r.clear(),this.instancesChanged.clear()};scrollFix(t){if(t==null)return;const i=this.getScrollContainerElement(),{lineIndex:n,lineOffset:r,fileElement:a,fileOffset:l,fileTypeOffset:d}=t;if(n!=null&&r!=null){const f=a.shadowRoot?.querySelector(`[data-line][data-line-index="${n}"]`);if(f instanceof HTMLElement){const c=le(f,i);if(c!==r){const u=c-r;this.applyScrollFix(u)}return}}const s=le(a,i);if(d==="top")s!==l&&this.applyScrollFix(s-l);else{const f=s+a.getBoundingClientRect().height;f!==l&&this.applyScrollFix(f-l)}}applyScrollFix(t){this.root==null||this.root instanceof Document?window.scrollTo({top:window.scrollY+t,behavior:"instant"}):this.root.scrollTo({top:this.root.scrollTop+t,behavior:"instant"}),this.markDOMDirty()}getScrollAnchor(t){const i=this.getScrollContainerElement();let n;for(const[r]of this.visibleInstances.entries()){const a=le(r,i),l=a+r.offsetHeight;let d,s;l<=0?(d=l,s="bottom"):(d=a,s="top");let f,c;if(l>0&&a<t)for(const h of r.shadowRoot?.querySelectorAll("[data-line][data-line-index]")??[]){if(!(h instanceof HTMLElement))continue;const m=h.dataset.lineIndex;if(m==null)continue;const p=le(h,i);if(!(p<0)){f=m,c=p;break}}if(n?.lineOffset!=null&&c==null)continue;let u=!1;(n==null||c!=null&&(n.lineOffset==null||c<n.lineOffset)||c==null&&n.lineOffset==null&&(d>=0&&(n.fileOffset<0||d<n.fileOffset)||d<0&&n.fileOffset<0&&d>n.fileOffset))&&(u=!0),u&&(n={fileElement:r,fileTypeOffset:s,fileOffset:d,lineIndex:f,lineOffset:c})}return n}handleIntersectionChange=t=>{this.scrollDirty=!0;for(const{target:i,isIntersecting:n}of t){if(!(i instanceof HTMLElement))throw new Error("Virtualizer.handleIntersectionChange: target not an HTMLElement");const r=this.observers.get(i);r!=null&&(n&&!this.visibleInstances.has(i)?(r.setVisibility(!0),this.visibleInstances.set(i,r),this.visibleInstancesDirty=!0):!n&&this.visibleInstances.has(i)&&(r.setVisibility(!1),this.visibleInstances.delete(i),this.visibleInstancesDirty=!0))}this.visibleInstancesDirty&&z(this.computeRenderRangeAndEmit)};getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let t=this.root==null?0:this.root instanceof Document?window.scrollY:this.root.scrollTop;return t=this.clampScrollTop(t),this.scrollTop=t,t}scrollTo({top:t,behavior:i="auto"}){const{root:n}=this;if(n==null)return;const r=this.clampScrollTop(t);n instanceof Document?window.scrollTo({top:r,behavior:i}):n.scrollTo({top:r,behavior:i}),this.scrollDirty=!0,z(this.computeRenderRangeAndEmit)}clampScrollTop(t){return Math.max(0,Math.min(t,this.getScrollHeight()-this.getHeight()))}getScrollHeight(){return this.scrollHeightDirty?(this.scrollHeightDirty=!1,this.scrollHeight=this.root==null?0:this.root instanceof Document?this.root.documentElement.scrollHeight:this.root.scrollHeight,this.scrollHeight):this.scrollHeight}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root==null?0:this.root instanceof Document?globalThis.innerHeight:this.root.getBoundingClientRect().height,this.height):this.height}markDOMDirty(){this.scrollDirty=!0,this.scrollHeightDirty=!0,this.heightDirty=!0}getScrollContainerElement(){return this.root==null||this.root instanceof Document?void 0:this.root}};function le(e,t){const i=e.getBoundingClientRect(),n=t?.getBoundingClientRect().top??0;return i.top-n}const ln=K.createContext(void 0);function dl({children:e,config:t,className:i,style:n,contentClassName:r,contentStyle:a}){const[l]=K.useState(()=>typeof window<"u"?new Ya(t):void 0),d=K.useCallback(s=>{s!=null?l?.setup(s):l?.cleanUp()},[l]);return q.jsx(ln.Provider,{value:l,children:q.jsx("div",{className:i,style:n,ref:d,children:q.jsx("div",{className:r,style:a,children:e})})})}function cl(){return K.useContext(ln)}function Za(e){const t=fa(e);if(t.length!==1)throw console.error(t),new Error("PatchDiff: Provided patch must include only 1 patch, with 1 diff");const{files:i}=t[0];if(i.length!==1)throw console.error(i),new Error("FileDiff: Provided patch must contain exactly 1 file diff");return i[0]}function dn(e,t){try{const i=Lt({name:e,load:t});U.registerTheme(i.name,i.load)}catch(i){if(i instanceof Ei){console.error("SharedHighlight.registerCustomTheme: theme name already registered",e);return}throw i}}const es={light:Mn.tokenColors??[],dark:Nn.tokenColors??[]},me={light:"opentig-light",dark:"opentig-dark"},ts=["diff-editor-background","diff-editor-foreground","diff-selection","diff-line-highlight","diff-line-number","diff-added","diff-deleted","diff-modified"],is={light:{"diff-editor-background":"#ffffff","diff-editor-foreground":"#25292e","diff-selection":"#cfe8d3","diff-line-highlight":"#f3f7f4","diff-line-number":"#7b898e","diff-added":"#218739","diff-deleted":"#c9362b","diff-modified":"#2563c7"},dark:{"diff-editor-background":"#17191a","diff-editor-foreground":"#f3f5f5","diff-selection":"#294a31","diff-line-highlight":"#202526","diff-line-number":"#748186","diff-added":"#63d471","diff-deleted":"#f0746b","diff-modified":"#65a8ff"}};function ns(e){const t=document.documentElement,i=e==="dark",n=t.classList.contains("dark");n!==i&&t.classList.toggle("dark",i);const r=document.createElement("div");r.style.position="fixed",r.style.top="-9999px",r.style.left="-9999px",r.style.pointerEvents="none",t.appendChild(r);const a=getComputedStyle(r),l=is[e],d={};for(const s of ts)d[s]=a.getPropertyValue(`--${s}`).trim()||l[s];return r.remove(),n!==i&&t.classList.toggle("dark",n),d}function cn(e,t){const i=ns(t),n=i["diff-added"],r=i["diff-deleted"],a=i["diff-modified"];return{name:e,type:t,colors:{"editor.background":i["diff-editor-background"],"editor.foreground":i["diff-editor-foreground"],foreground:i["diff-editor-foreground"],"editor.selectionBackground":i["diff-selection"],"editor.lineHighlightBackground":i["diff-line-highlight"],"editorLineNumber.foreground":i["diff-line-number"],"editorLineNumber.activeForeground":i["diff-editor-foreground"],"gitDecoration.addedResourceForeground":n,"gitDecoration.deletedResourceForeground":r,"gitDecoration.modifiedResourceForeground":a,"terminal.ansiGreen":n,"terminal.ansiRed":r,"terminal.ansiBlue":a},tokenColors:[...es[t],{scope:["markup.inserted","punctuation.definition.inserted"],settings:{foreground:n}},{scope:["markup.deleted","punctuation.definition.deleted"],settings:{foreground:r}},{scope:["markup.changed","punctuation.definition.changed"],settings:{foreground:a}}]}}dn(me.light,async()=>cn(me.light,"light"));dn(me.dark,async()=>cn(me.dark,"dark"));const ul=`
1359
+ }`}function el(e,t){const i=on(t);return e.replace(Wa,i)}function $a(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tl(e){return e?.useTokenTransformer===!0||e?.onTokenClick!=null||e?.onTokenEnter!=null||e?.onTokenLeave!=null}function il({code:e,pre:t,columnType:i,rowSpan:n,containerSize:r=!1}={}){return e==null&&(e=document.createElement("code"),e.setAttribute("data-code",""),i!=null&&e.setAttribute(`data-${i}`,""),t?.appendChild(e)),n!=null?e.style.setProperty("grid-row",`span ${n}`):e.style.removeProperty("grid-row"),r?e.setAttribute("data-container-size",""):e.removeAttribute("data-container-size"),e}function nl(e,t){const i=e?.offsetHeight??0;if(e==null||i===0){t();return}e.style.minHeight=`${i}px`;try{t(),e.offsetHeight}finally{e.style.minHeight=""}}function rl({shadowRoot:e,currentNode:t,themeCSS:i}){if(i.trim()===""){t?.remove();return}return t??=ja(),t.textContent=i,t.parentNode!==e&&e.appendChild(t),t}function ja(){const e=document.createElement("style");return e.setAttribute(Pn,""),e}function ol(e,t){if(t==null)return;const i=e.shadowRoot??e.attachShadow({mode:"open"});i.innerHTML===""&&(i.innerHTML=t)}function al(e,{type:t,diffIndicators:i,disableBackground:n,disableLineNumbers:r,overflow:a,split:l,totalLines:d,customProperties:s}){if(s!=null)for(const f in s){const c=s[f];c!=null&&e.setAttribute(f,`${c}`)}switch(t==="diff"?(e.setAttribute("data-diff",""),e.removeAttribute("data-file")):(e.setAttribute("data-file",""),e.removeAttribute("data-diff")),i){case"bars":case"classic":e.setAttribute("data-indicators",i);break;case"none":e.removeAttribute("data-indicators");break}return r?e.setAttribute("data-disable-line-numbers",""):e.removeAttribute("data-disable-line-numbers"),n?e.removeAttribute("data-background"):e.setAttribute("data-background",""),t==="diff"?e.setAttribute("data-diff-type",l?"split":"single"):e.removeAttribute("data-diff-type"),e.setAttribute("data-overflow",a),e.style.setProperty("--diffs-min-number-column-width-default",`${`${d}`.length}ch`),e}if(typeof HTMLElement<"u"&&customElements.get("diffs-container")==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;const n=this.attachShadow({mode:"open"});e==null&&(e=new CSSStyleSheet,e.replaceSync(qa)),n.adoptedStyleSheets=[e]}connectedCallback(){Ba(this.shadowRoot??this.attachShadow({mode:"open"}))}}customElements.define(xn,t)}function sl(e,t){return typeof window>"u"&&t!=null?q.jsxs(q.Fragment,{children:[q.jsx("template",{shadowrootmode:"open",dangerouslySetInnerHTML:{__html:t}}),e]}):q.jsx(q.Fragment,{children:e})}function Ga(e,t){return e==null||t==null?e===t:e.top===t.top&&e.bottom===t.bottom}const sn=1e3,Ka=sn*4,Qa=[0,1e-6,.99999,1],Ja={overscrollSize:sn,intersectionObserverMargin:Ka,resizeDebugging:!1};let xe=0,Xa=-1;var Ya=class j{static __STOP=!1;static __lastScrollPosition=0;__id=`virtualizer-${++Xa}`;config;type="simple";intersectionObserver;scrollTop=0;height=0;scrollHeight=0;windowSpecs={top:0,bottom:0};root;contentContainer;resizeObserver;observers=new Map;visibleInstances=new Map;visibleInstancesDirty=!1;instancesChanged=new Set;reconcileQueue=new Set;scrollDirty=!0;heightDirty=!0;scrollHeightDirty=!0;renderedObservers=0;connectQueue=new Map;constructor(t){this.config={...Ja,...t}}setup(t,i){if(this.root==null){this.root=t,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.intersectionObserver=new IntersectionObserver(this.handleIntersectionChange,{root:this.root,threshold:Qa,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),t instanceof Document?this.setupWindow():this.setupElement(i),window.__INSTANCE=this,window.__TOGGLE=()=>{j.__STOP?(j.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:j.__lastScrollPosition}),z(this.computeRenderRangeAndEmit)):(j.__lastScrollPosition=this.getScrollTop(),j.__STOP=!0)};for(const[n,r]of this.connectQueue.entries())this.connect(n,r);this.connectQueue.clear(),this.markDOMDirty(),z(this.computeRenderRangeAndEmit)}}instanceChanged(t,i){this.instancesChanged.add(t),i&&this.markDOMDirty(),z(this.computeRenderRangeAndEmit)}requestHeightReconcile(t){this.reconcileQueue.add(t),z(this.computeRenderRangeAndEmit)}getWindowSpecs(){return this.windowSpecs.top===0&&this.windowSpecs.bottom===0&&(this.windowSpecs=ri({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize})),this.windowSpecs}getRoot(){return this.root}isInstanceVisible(t,i){const n=this.getScrollTop(),r=this.getHeight(),a=this.config.intersectionObserverMargin,l=n-a,d=n+r+a;return!(t<l-i||t>d)}handleContainerResize=t=>{if(this.root==null)return;let i=!1;for(const n of t){const r=n.borderBoxSize[0].blockSize;this.root instanceof Document?r!==this.scrollHeight&&(this.scrollHeightDirty=!0,i=!0,this.config.resizeDebugging&&(console.log("Virtualizer: content size change",this.__id,{sizeChange:r-xe,newSize:r}),xe=r)):n.target===this.root?r!==this.height&&(this.heightDirty=!0,i=!0):n.target===this.contentContainer&&(this.scrollHeightDirty=!0,i=!0,this.config.resizeDebugging&&(console.log("Virtualizer: scroller size change",this.__id,{sizeChange:r-xe,newSize:r}),xe=r))}i&&z(this.computeRenderRangeAndEmit)};setupWindow(){if(this.root==null||!(this.root instanceof Document))throw new Error("Virtualizer.setupWindow: Invalid setup method");window.addEventListener("scroll",this.handleWindowScroll,{passive:!0}),window.addEventListener("resize",this.handleWindowResize,{passive:!0}),this.resizeObserver?.observe(this.root.documentElement)}setupElement(t){if(this.root==null||this.root instanceof Document)throw new Error("Virtualizer.setupElement: Invalid setup method");this.root.addEventListener("scroll",this.handleElementScroll,{passive:!0}),this.resizeObserver?.observe(this.root),t??=this.root.firstElementChild??void 0,t instanceof HTMLElement&&(this.contentContainer=t,this.resizeObserver?.observe(t))}cleanUp(){it(this.computeRenderRangeAndEmit),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.root?.removeEventListener("scroll",this.handleElementScroll),window.removeEventListener("scroll",this.handleWindowScroll),window.removeEventListener("resize",this.handleWindowResize),this.root=void 0,this.contentContainer=void 0,this.observers.clear(),this.visibleInstances.clear(),this.instancesChanged.clear(),this.reconcileQueue.clear(),this.connectQueue.clear(),this.visibleInstancesDirty=!1,this.windowSpecs={top:0,bottom:0},this.scrollTop=0,this.height=0,this.scrollHeight=0,this.scrollDirty=!0,this.heightDirty=!0,this.scrollHeightDirty=!0}getOffsetInScrollContainer(t){return this.getScrollTop()+le(t,this.getScrollContainerElement())}connect(t,i){if(this.observers.has(t))throw new Error("Virtualizer.connect: instance is already connected...");return this.intersectionObserver==null?this.connectQueue.set(t,i):(this.intersectionObserver.observe(t),this.observers.set(t,i),this.instancesChanged.add(i),this.markDOMDirty(),z(this.computeRenderRangeAndEmit)),()=>this.disconnect(t)}disconnect(t){const i=this.observers.get(t);this.connectQueue.delete(t),i!=null&&(this.intersectionObserver?.unobserve(t),this.observers.delete(t),this.instancesChanged.delete(i),this.reconcileQueue.delete(i),this.visibleInstances.delete(t)&&(this.visibleInstancesDirty=!0),this.markDOMDirty(),z(this.computeRenderRangeAndEmit))}handleWindowResize=()=>{j.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,z(this.computeRenderRangeAndEmit))};handleWindowScroll=()=>{j.__STOP||this.root==null||!(this.root instanceof Document)||(this.scrollDirty=!0,z(this.computeRenderRangeAndEmit))};handleElementScroll=()=>{j.__STOP||this.root==null||this.root instanceof Document||(this.scrollDirty=!0,z(this.computeRenderRangeAndEmit))};computeRenderRangeAndEmit=()=>{if(j.__STOP)return;const t=this.heightDirty||this.scrollHeightDirty;let i=this.instancesChanged.size>0;if(this.instancesChanged.size===0){const a=ri({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize});if(!t&&Ga(this.windowSpecs,a)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&this.reconcileQueue.size===0)return;this.windowSpecs=a}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;const n=this.getScrollAnchor(this.height),r=new Set;for(const a of t?this.observers.values():this.visibleInstances.values())a.onRender(t)&&r.add(a);for(const a of this.instancesChanged)r.has(a)||a.onRender(t)&&r.add(a);this.scrollFix(n);for(const a of r)this.reconcileQueue.delete(a),a.reconcileHeights();for(const a of this.reconcileQueue)a.reconcileHeights()&&(i=!0);this.reconcileQueue.clear(),i||=this.instancesChanged.size>0,i&&this.markDOMDirty(),(i||t)&&z(this.computeRenderRangeAndEmit),r.clear(),this.instancesChanged.clear()};scrollFix(t){if(t==null)return;const i=this.getScrollContainerElement(),{lineIndex:n,lineOffset:r,fileElement:a,fileOffset:l,fileTypeOffset:d}=t;if(n!=null&&r!=null){const f=a.shadowRoot?.querySelector(`[data-line][data-line-index="${n}"]`);if(f instanceof HTMLElement){const c=le(f,i);if(c!==r){const u=c-r;this.applyScrollFix(u)}return}}const s=le(a,i);if(d==="top")s!==l&&this.applyScrollFix(s-l);else{const f=s+a.getBoundingClientRect().height;f!==l&&this.applyScrollFix(f-l)}}applyScrollFix(t){this.root==null||this.root instanceof Document?window.scrollTo({top:window.scrollY+t,behavior:"instant"}):this.root.scrollTo({top:this.root.scrollTop+t,behavior:"instant"}),this.markDOMDirty()}getScrollAnchor(t){const i=this.getScrollContainerElement();let n;for(const[r]of this.visibleInstances.entries()){const a=le(r,i),l=a+r.offsetHeight;let d,s;l<=0?(d=l,s="bottom"):(d=a,s="top");let f,c;if(l>0&&a<t)for(const h of r.shadowRoot?.querySelectorAll("[data-line][data-line-index]")??[]){if(!(h instanceof HTMLElement))continue;const m=h.dataset.lineIndex;if(m==null)continue;const p=le(h,i);if(!(p<0)){f=m,c=p;break}}if(n?.lineOffset!=null&&c==null)continue;let u=!1;(n==null||c!=null&&(n.lineOffset==null||c<n.lineOffset)||c==null&&n.lineOffset==null&&(d>=0&&(n.fileOffset<0||d<n.fileOffset)||d<0&&n.fileOffset<0&&d>n.fileOffset))&&(u=!0),u&&(n={fileElement:r,fileTypeOffset:s,fileOffset:d,lineIndex:f,lineOffset:c})}return n}handleIntersectionChange=t=>{this.scrollDirty=!0;for(const{target:i,isIntersecting:n}of t){if(!(i instanceof HTMLElement))throw new Error("Virtualizer.handleIntersectionChange: target not an HTMLElement");const r=this.observers.get(i);r!=null&&(n&&!this.visibleInstances.has(i)?(r.setVisibility(!0),this.visibleInstances.set(i,r),this.visibleInstancesDirty=!0):!n&&this.visibleInstances.has(i)&&(r.setVisibility(!1),this.visibleInstances.delete(i),this.visibleInstancesDirty=!0))}this.visibleInstancesDirty&&z(this.computeRenderRangeAndEmit)};getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let t=this.root==null?0:this.root instanceof Document?window.scrollY:this.root.scrollTop;return t=this.clampScrollTop(t),this.scrollTop=t,t}scrollTo({top:t,behavior:i="auto"}){const{root:n}=this;if(n==null)return;const r=this.clampScrollTop(t);n instanceof Document?window.scrollTo({top:r,behavior:i}):n.scrollTo({top:r,behavior:i}),this.scrollDirty=!0,z(this.computeRenderRangeAndEmit)}clampScrollTop(t){return Math.max(0,Math.min(t,this.getScrollHeight()-this.getHeight()))}getScrollHeight(){return this.scrollHeightDirty?(this.scrollHeightDirty=!1,this.scrollHeight=this.root==null?0:this.root instanceof Document?this.root.documentElement.scrollHeight:this.root.scrollHeight,this.scrollHeight):this.scrollHeight}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root==null?0:this.root instanceof Document?globalThis.innerHeight:this.root.getBoundingClientRect().height,this.height):this.height}markDOMDirty(){this.scrollDirty=!0,this.scrollHeightDirty=!0,this.heightDirty=!0}getScrollContainerElement(){return this.root==null||this.root instanceof Document?void 0:this.root}};function le(e,t){const i=e.getBoundingClientRect(),n=t?.getBoundingClientRect().top??0;return i.top-n}const ln=K.createContext(void 0);function ll({children:e,config:t,className:i,style:n,contentClassName:r,contentStyle:a}){const[l]=K.useState(()=>typeof window<"u"?new Ya(t):void 0),d=K.useCallback(s=>{s!=null?l?.setup(s):l?.cleanUp()},[l]);return q.jsx(ln.Provider,{value:l,children:q.jsx("div",{className:i,style:n,ref:d,children:q.jsx("div",{className:r,style:a,children:e})})})}function dl(){return K.useContext(ln)}function Za(e){const t=fa(e);if(t.length!==1)throw console.error(t),new Error("PatchDiff: Provided patch must include only 1 patch, with 1 diff");const{files:i}=t[0];if(i.length!==1)throw console.error(i),new Error("FileDiff: Provided patch must contain exactly 1 file diff");return i[0]}function dn(e,t){try{const i=Lt({name:e,load:t});U.registerTheme(i.name,i.load)}catch(i){if(i instanceof Ei){console.error("SharedHighlight.registerCustomTheme: theme name already registered",e);return}throw i}}const es={light:Mn.tokenColors??[],dark:Nn.tokenColors??[]},me={light:"opentig-light",dark:"opentig-dark"},ts=["diff-editor-background","diff-editor-foreground","diff-selection","diff-line-highlight","diff-line-number","diff-added","diff-deleted","diff-modified"],is={light:{"diff-editor-background":"#ffffff","diff-editor-foreground":"#25292e","diff-selection":"#cfe8d3","diff-line-highlight":"#f3f7f4","diff-line-number":"#7b898e","diff-added":"#218739","diff-deleted":"#c9362b","diff-modified":"#2563c7"},dark:{"diff-editor-background":"#17191a","diff-editor-foreground":"#f3f5f5","diff-selection":"#294a31","diff-line-highlight":"#202526","diff-line-number":"#748186","diff-added":"#63d471","diff-deleted":"#f0746b","diff-modified":"#65a8ff"}};function ns(e){const t=document.documentElement,i=e==="dark",n=t.classList.contains("dark");n!==i&&t.classList.toggle("dark",i);const r=document.createElement("div");r.style.position="fixed",r.style.top="-9999px",r.style.left="-9999px",r.style.pointerEvents="none",t.appendChild(r);const a=getComputedStyle(r),l=is[e],d={};for(const s of ts)d[s]=a.getPropertyValue(`--${s}`).trim()||l[s];return r.remove(),n!==i&&t.classList.toggle("dark",n),d}function cn(e,t){const i=ns(t),n=i["diff-added"],r=i["diff-deleted"],a=i["diff-modified"];return{name:e,type:t,colors:{"editor.background":i["diff-editor-background"],"editor.foreground":i["diff-editor-foreground"],foreground:i["diff-editor-foreground"],"editor.selectionBackground":i["diff-selection"],"editor.lineHighlightBackground":i["diff-line-highlight"],"editorLineNumber.foreground":i["diff-line-number"],"editorLineNumber.activeForeground":i["diff-editor-foreground"],"gitDecoration.addedResourceForeground":n,"gitDecoration.deletedResourceForeground":r,"gitDecoration.modifiedResourceForeground":a,"terminal.ansiGreen":n,"terminal.ansiRed":r,"terminal.ansiBlue":a},tokenColors:[...es[t],{scope:["markup.inserted","punctuation.definition.inserted"],settings:{foreground:n}},{scope:["markup.deleted","punctuation.definition.deleted"],settings:{foreground:r}},{scope:["markup.changed","punctuation.definition.changed"],settings:{foreground:a}}]}}dn(me.light,async()=>cn(me.light,"light"));dn(me.dark,async()=>cn(me.dark,"dark"));const cl=`
1360
1360
  [data-code] {
1361
1361
  overflow-x: auto;
1362
1362
  overflow-y: clip;
@@ -1381,4 +1381,4 @@ ${t}`,n=e.startsWith(t)?0:li(e,i,0);if(n===-1)return[e];const r=[];n>0&&r.push(e
1381
1381
  input, textarea, [contenteditable="true"] { font-size: 16px; }
1382
1382
  button { min-height: 40px; touch-action: manipulation; }
1383
1383
  }
1384
- `;function rs(e){const t=[...e.matchAll(/^diff --git .*$/gm)];return t.length<=1?e.trim()?[e]:[]:t.map((i,n)=>e.slice(i.index,t[n+1]?.index??e.length))}function fl(e){return rs(e).map((t,i)=>{const n=Za(t);return{key:`${n.prevName??""}:${n.name}:${i}`,path:n.name,previousPath:n.prevName,patch:t,additions:n.hunks.reduce((r,a)=>r+a.additionLines,0),deletions:n.hunks.reduce((r,a)=>r+a.deletionLines,0),changeType:n.type}})}function os(e){return new Worker("/assets/worker-iQRq_znZ.js",{type:"module",name:e?.name})}function hl({children:e,theme:t=me}){return q.jsxs(Yo,{poolOptions:{workerFactory:()=>new os,poolSize:1,totalASTLRUCacheSize:20},highlighterOptions:{theme:t,tokenizeMaxLineLength:1e4},children:[q.jsx(as,{theme:t}),e]})}function as({theme:e}){const t=Zo(),{light:i,dark:n}=e;return K.useEffect(()=>{if(!t)return;let r=!0;return t.setRenderOptions({theme:{light:i,dark:n},tokenizeMaxLineLength:1e4}).catch(a=>{r&&Fn.error({title:"Could not update the syntax theme",description:a instanceof Error?a.message:"Unknown error"})}),()=>{r=!1}},[n,i,t]),null}export{Ls as $,Ms as A,Oe as B,al as C,Js as D,Xs as E,Ys as F,ms as G,Zs as H,Ns as I,Ba as J,ol as K,tl as L,nl as M,rl as N,me as O,hl as P,ws as Q,Hs as R,Ks as S,Qs as T,sl as U,ul as V,el as W,ys as X,ii as Y,xs as Z,Os as _,dl as a,ks as a0,Ds as a1,Qi as a2,gs as a3,ll as a4,re as a5,fe as a6,te as a7,ps as a8,Ki as a9,As as aa,oe as ab,Ts as ac,He as ad,ze as ae,Ss as af,Ps as ag,st as ah,$t as ai,ye as aj,Lo as ak,Uo as al,Po as am,Io as an,Is as ao,Rs as ap,dt as aq,Za as ar,fl as as,Us as b,$e as c,Un as d,Bs as e,zs as f,_s as g,Fs as h,Bt as i,Ut as j,De as k,Cs as l,Es as m,qs as n,bs as o,$s as p,A as q,Eo as r,Vs as s,Ws as t,cl as u,Ft as v,Gs as w,js as x,vs as y,il as z};
1384
+ `;function rs(e){const t=[...e.matchAll(/^diff --git .*$/gm)];return t.length<=1?e.trim()?[e]:[]:t.map((i,n)=>e.slice(i.index,t[n+1]?.index??e.length))}function ul(e){return rs(e).map((t,i)=>{const n=Za(t);return{key:`${n.prevName??""}:${n.name}:${i}`,path:n.name,previousPath:n.prevName,patch:t,additions:n.hunks.reduce((r,a)=>r+a.additionLines,0),deletions:n.hunks.reduce((r,a)=>r+a.deletionLines,0),changeType:n.type}})}function os(e){return new Worker("/assets/worker-iQRq_znZ.js",{type:"module",name:e?.name})}function fl({children:e,theme:t=me}){return q.jsxs(Yo,{poolOptions:{workerFactory:()=>new os,poolSize:1,totalASTLRUCacheSize:20},highlighterOptions:{theme:t,tokenizeMaxLineLength:1e4},children:[q.jsx(as,{theme:t}),e]})}function as({theme:e}){const t=Zo(),{light:i,dark:n}=e;return K.useEffect(()=>{if(!t)return;let r=!0;return t.setRenderOptions({theme:{light:i,dark:n},tokenizeMaxLineLength:1e4}).catch(a=>{r&&zn.error({title:"Could not update the syntax theme",description:a instanceof Error?a.message:"Unknown error"})}),()=>{r=!1}},[n,i,t]),null}export{ys as $,Ns as A,Oe as B,ol as C,Qs as D,Js as E,Xs as F,hs as G,Ys as H,Vs as I,Ba as J,rl as K,el as L,il as M,nl as N,me as O,fl as P,As as Q,Ms as R,Gs as S,Ks as T,al as U,cl as V,Zs as W,Es as X,ii as Y,Ps as Z,Ds as _,ll as a,Ls as a0,ws as a1,Qi as a2,ps as a3,sl as a4,re as a5,fe as a6,te as a7,ms as a8,Ki as a9,xs as aa,oe as ab,ks as ac,He as ad,ze as ae,Rs as af,Ss as ag,st as ah,$t as ai,ye as aj,Lo as ak,Uo as al,Po as am,Io as an,Ts as ao,Is as ap,dt as aq,Za as ar,ul as as,Fs as b,$e as c,Un as d,Us as e,Hs as f,gs as g,zs as h,Bt as i,Ut as j,De as k,Os as l,bs as m,Bs as n,vs as o,Ws as p,A as q,Eo as r,Cs as s,qs as t,dl as u,Ft as v,js as w,$s as x,_s as y,tl as z};