@seqyuan/annovibe 0.8.39 → 0.8.41

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 (106) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +5 -5
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/react-loadable-manifest.json +315 -2197
  6. package/.next/required-server-files.js +1 -1
  7. package/.next/required-server-files.json +1 -1
  8. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  9. package/.next/server/app/_global-error.html +1 -1
  10. package/.next/server/app/_global-error.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  16. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  17. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  18. package/.next/server/app/_not-found.html +1 -1
  19. package/.next/server/app/_not-found.rsc +1 -1
  20. package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  21. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  22. package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  23. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  24. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  25. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  26. package/.next/server/app/api/agent/runtime/route.js +1 -1
  27. package/.next/server/app/api/internal/runtime/route.js +1 -1
  28. package/.next/server/app/api/version/route.js +1 -1
  29. package/.next/server/app/index.html +1 -1
  30. package/.next/server/app/index.rsc +2 -2
  31. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  32. package/.next/server/app/index.segments/_full.segment.rsc +2 -2
  33. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  34. package/.next/server/app/index.segments/_index.segment.rsc +1 -1
  35. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  36. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  37. package/.next/server/app/login.html +1 -1
  38. package/.next/server/app/login.rsc +1 -1
  39. package/.next/server/app/login.segments/_full.segment.rsc +1 -1
  40. package/.next/server/app/login.segments/_head.segment.rsc +1 -1
  41. package/.next/server/app/login.segments/_index.segment.rsc +1 -1
  42. package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
  43. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
  44. package/.next/server/app/login.segments/login.segment.rsc +1 -1
  45. package/.next/server/app/page.js +4 -4
  46. package/.next/server/app/page_client-reference-manifest.js +1 -1
  47. package/.next/server/app/smoke/page.js +2 -2
  48. package/.next/server/app/smoke/page_client-reference-manifest.js +1 -1
  49. package/.next/server/app/smoke.html +2 -2
  50. package/.next/server/app/smoke.rsc +2 -2
  51. package/.next/server/app/smoke.segments/_full.segment.rsc +2 -2
  52. package/.next/server/app/smoke.segments/_head.segment.rsc +1 -1
  53. package/.next/server/app/smoke.segments/_index.segment.rsc +1 -1
  54. package/.next/server/app/smoke.segments/_tree.segment.rsc +1 -1
  55. package/.next/server/app/smoke.segments/smoke/__PAGE__.segment.rsc +2 -2
  56. package/.next/server/app/smoke.segments/smoke.segment.rsc +1 -1
  57. package/.next/server/app-paths-manifest.json +5 -5
  58. package/.next/server/chunks/1210.js +246 -0
  59. package/.next/server/chunks/2242.js +1 -0
  60. package/.next/server/chunks/3386.js +1 -0
  61. package/.next/server/chunks/3460.js +1 -0
  62. package/.next/server/chunks/5715.js +1 -0
  63. package/.next/server/chunks/6121.js +1 -0
  64. package/.next/server/chunks/6465.js +1 -0
  65. package/.next/server/chunks/7426.js +1 -0
  66. package/.next/server/chunks/8251.js +1 -0
  67. package/.next/server/chunks/8915.js +1 -0
  68. package/.next/server/chunks/8973.js +1 -0
  69. package/.next/server/chunks/9093.js +349 -0
  70. package/.next/server/chunks/9868.js +1 -0
  71. package/.next/server/chunks/9906.js +1 -0
  72. package/.next/server/middleware-build-manifest.js +1 -1
  73. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  74. package/.next/server/pages/404.html +1 -1
  75. package/.next/server/pages/500.html +1 -1
  76. package/.next/server/server-reference-manifest.json +1 -1
  77. package/.next/static/chunks/1209.6d037cb2674eafa2.js +1 -0
  78. package/.next/static/chunks/144.26e4646d1b55baa3.js +1 -0
  79. package/.next/static/chunks/2320.fd867786b7cc6d5f.js +1 -0
  80. package/.next/static/chunks/2733.8bc8208edd9edde5.js +1 -0
  81. package/.next/static/chunks/2774.0811cda036dfeb94.js +1 -0
  82. package/.next/static/chunks/3307.e638f7fa43f28bac.js +1 -0
  83. package/.next/static/chunks/{5690.332f301b9df6f2dd.js → 3309.d0c34b5ef504a551.js} +1 -1
  84. package/.next/static/chunks/3689.0336d97dde6c9084.js +1 -0
  85. package/.next/static/chunks/4097.7f5a996cb7ab16e2.js +1 -0
  86. package/.next/static/chunks/5135.db90392e58298a66.js +1 -0
  87. package/.next/static/chunks/5460.6384269ca3add9f0.js +1 -0
  88. package/.next/static/chunks/5690.64d843d3db8e1b4b.js +1 -0
  89. package/.next/static/chunks/{2766.99a29d6b0cd152ac.js → 6586.395c3c72e985da50.js} +3 -3
  90. package/.next/static/chunks/7482.485c6cc8694747d0.js +1 -0
  91. package/.next/static/chunks/8194-4a4c6b44dcfc55b3.js +173 -0
  92. package/.next/static/chunks/8198.42369073fedf8a54.js +1 -0
  93. package/.next/static/chunks/{8863.4b2faadd47deb00c.js → 8863.8b769013468d83d4.js} +1 -1
  94. package/.next/static/chunks/9595-2f001a1f6d133466.js +246 -0
  95. package/.next/static/chunks/app/{page-443865609e7e67a7.js → page-d82d53365a2be371.js} +3 -3
  96. package/.next/static/chunks/app/smoke/{page-57d2b282f9b2d200.js → page-431310549b820f3b.js} +2 -2
  97. package/.next/static/chunks/webpack-b7b531a4a8559f64.js +1 -0
  98. package/package.json +1 -3
  99. package/.next/server/chunks/4831.js +0 -349
  100. package/.next/server/chunks/7358.js +0 -246
  101. package/.next/static/chunks/3041-2a1bf2ba5b31db24.js +0 -246
  102. package/.next/static/chunks/3309.581b04bacfeed701.js +0 -1
  103. package/.next/static/chunks/6236-1f7433425e0ceda5.js +0 -173
  104. package/.next/static/chunks/webpack-19a6d5696c9d0290.js +0 -1
  105. /package/.next/static/{tzG34HSOTS30YvTSTz81W → 3gDAeILrwgLWhlwi2MAOg}/_buildManifest.js +0 -0
  106. /package/.next/static/{tzG34HSOTS30YvTSTz81W → 3gDAeILrwgLWhlwi2MAOg}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2766],{42766:(e,t,n)=>{let r,i,a;n.r(t),n.d(t,{ShikiError:()=>D,addClassToHast:()=>na,applyColorReplacements:()=>eY,bundledLanguages:()=>k,bundledLanguagesAlias:()=>y,bundledLanguagesBase:()=>b,bundledLanguagesInfo:()=>f,bundledThemes:()=>w,bundledThemesInfo:()=>_,codeToHast:()=>nQ,codeToHtml:()=>nX,codeToTokens:()=>nJ,codeToTokensBase:()=>nZ,codeToTokensWithThemes:()=>nK,createBundledHighlighter:()=>nU,createCssVariablesTheme:()=>nq,createHighlighter:()=>nV,createHighlighterCore:()=>nO,createHighlighterCoreSync:()=>nD,createJavaScriptRegexEngine:()=>ij,createOnigurumaEngine:()=>B,createPositionConverter:()=>nu,createShikiInternal:()=>tc,createShikiInternalSync:()=>to,createShikiPrimitive:()=>ts,createShikiPrimitiveAsync:()=>tl,createSingletonShorthands:()=>nH,defaultJavaScriptRegexConstructor:()=>iF,flatTokenVariants:()=>ng,getLastGrammarState:()=>n0,getSingletonHighlighter:()=>nY,getSingletonHighlighterCore:()=>nj,getTokenStyleObject:()=>nf,guessEmbeddedLanguages:()=>nd,hastToHtml:()=>nG,isNoneTheme:()=>e5,isPlainLang:()=>e2,isSpecialLang:()=>e3,isSpecialTheme:()=>e8,loadWasm:()=>$,makeSingletonHighlighter:()=>nW,makeSingletonHighlighterCore:()=>nF,normalizeGetter:()=>e1,normalizeTheme:()=>e9,resolveColorReplacements:()=>eK,splitLines:()=>e7,splitToken:()=>np,splitTokens:()=>nm,stringifyTokenStyle:()=>nb,toArray:()=>e0,tokenizeAnsiWithTheme:()=>nE,tokenizeWithTheme:()=>ty,tokensToHast:()=>nM,transformerDecorations:()=>ny});var s,o,l={};n.r(l),n.d(l,{createOnigurumaEngine:()=>B,getDefaultWasmLoader:()=>G,loadWasm:()=>$,setDefaultWasmLoader:()=>M});var c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,h=Object.prototype.hasOwnProperty,p=(e,t)=>{let n={};for(var r in e)c(n,r,{get:e[r],enumerable:!0});return t||c(n,Symbol.toStringTag,{value:"Module"}),n},m=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,a=d(t),s=0,o=a.length;s<o;s++)i=a[s],h.call(e,i)||i===n||c(e,i,{get:(e=>t[e]).bind(null,i),enumerable:!(r=u(t,i))||r.enumerable});return e},g=(e,t,n)=>(m(e,t,"default"),n&&m(n,t,"default"));let f=[{id:"abap",name:"ABAP",import:()=>n.e(8773).then(n.bind(n,48773))},{id:"actionscript-3",name:"ActionScript",import:()=>n.e(36).then(n.bind(n,10036))},{id:"ada",name:"Ada",import:()=>n.e(5575).then(n.bind(n,55575))},{id:"angular-html",name:"Angular HTML",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(3175)]).then(n.bind(n,23175))},{id:"angular-ts",name:"Angular TypeScript",import:()=>Promise.all([n.e(2577),n.e(1630),n.e(3782),n.e(3476),n.e(3111),n.e(3186)]).then(n.bind(n,76359))},{id:"apache",name:"Apache Conf",import:()=>n.e(2765).then(n.bind(n,52765))},{id:"apex",name:"Apex",import:()=>n.e(7455).then(n.bind(n,27455))},{id:"apl",name:"APL",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(4174)]).then(n.bind(n,54174))},{id:"applescript",name:"AppleScript",import:()=>n.e(9178).then(n.bind(n,19178))},{id:"ara",name:"Ara",import:()=>n.e(3313).then(n.bind(n,93313))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>n.e(8318).then(n.bind(n,98318))},{id:"asm",name:"Assembly",import:()=>n.e(7846).then(n.bind(n,87846))},{id:"astro",name:"Astro",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(3782),n.e(6686)]).then(n.bind(n,36686))},{id:"awk",name:"AWK",import:()=>n.e(4900).then(n.bind(n,54900))},{id:"ballerina",name:"Ballerina",import:()=>n.e(2747).then(n.bind(n,92747))},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>n.e(3290).then(n.bind(n,73290))},{id:"beancount",name:"Beancount",import:()=>n.e(8496).then(n.bind(n,98496))},{id:"berry",name:"Berry",aliases:["be"],import:()=>n.e(5331).then(n.bind(n,95331))},{id:"bibtex",name:"BibTeX",import:()=>n.e(5937).then(n.bind(n,25937))},{id:"bicep",name:"Bicep",import:()=>n.e(8406).then(n.bind(n,68406))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:()=>n.e(1410).then(n.bind(n,71410))},{id:"blade",name:"Blade",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(5005)]).then(n.bind(n,25005))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>n.e(4608).then(n.bind(n,4608))},{id:"c",name:"C",import:()=>n.e(8192).then(n.bind(n,88192))},{id:"c3",name:"C3",import:()=>n.e(7113).then(n.bind(n,7113))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>n.e(4242).then(n.bind(n,64242))},{id:"cairo",name:"Cairo",import:()=>Promise.all([n.e(893),n.e(4367)]).then(n.bind(n,84367))},{id:"clarity",name:"Clarity",import:()=>n.e(5183).then(n.bind(n,15183))},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>n.e(6959).then(n.bind(n,66959))},{id:"cmake",name:"CMake",import:()=>n.e(5482).then(n.bind(n,55482))},{id:"cobol",name:"COBOL",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(5498)]).then(n.bind(n,15498))},{id:"codeowners",name:"CODEOWNERS",import:()=>n.e(1188).then(n.bind(n,21188))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>n.e(2403).then(n.bind(n,22403))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>Promise.all([n.e(2577),n.e(6647)]).then(n.bind(n,76647))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>n.e(3787).then(n.bind(n,93787))},{id:"coq",name:"Coq",import:()=>n.e(5920).then(n.bind(n,55920))},{id:"cpp",name:"C++",aliases:["c++"],import:()=>Promise.all([n.e(6666),n.e(8835),n.e(2503),n.e(8192),n.e(6110)]).then(n.bind(n,27816))},{id:"crystal",name:"Crystal",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(2503),n.e(8192),n.e(7152),n.e(6175)]).then(n.bind(n,43794))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>n.e(1642).then(n.bind(n,71642))},{id:"css",name:"CSS",import:()=>n.e(3782).then(n.bind(n,63782))},{id:"csv",name:"CSV",import:()=>n.e(6331).then(n.bind(n,66331))},{id:"cue",name:"CUE",import:()=>n.e(5338).then(n.bind(n,45338))},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>n.e(4350).then(n.bind(n,14350))},{id:"d",name:"D",import:()=>n.e(9015).then(n.bind(n,59015))},{id:"dart",name:"Dart",import:()=>n.e(3288).then(n.bind(n,3288))},{id:"dax",name:"DAX",import:()=>n.e(1932).then(n.bind(n,21932))},{id:"desktop",name:"Desktop",import:()=>n.e(7819).then(n.bind(n,7819))},{id:"diff",name:"Diff",import:()=>n.e(2614).then(n.bind(n,62614))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>n.e(2783).then(n.bind(n,52783))},{id:"dotenv",name:"dotEnv",import:()=>n.e(7210).then(n.bind(n,44829))},{id:"dream-maker",name:"Dream Maker",import:()=>n.e(425).then(n.bind(n,32806))},{id:"edge",name:"Edge",import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(7844)]).then(n.bind(n,67844))},{id:"elixir",name:"Elixir",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(698)]).then(n.bind(n,20698))},{id:"elm",name:"Elm",import:()=>Promise.all([n.e(8192),n.e(4583)]).then(n.bind(n,84583))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>n.e(3879).then(n.bind(n,62965))},{id:"erb",name:"ERB",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(8848),n.e(1198)]).then(n.bind(n,91198))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>Promise.all([n.e(3304),n.e(4678)]).then(n.bind(n,64678))},{id:"fennel",name:"Fennel",import:()=>n.e(2964).then(n.bind(n,60583))},{id:"fish",name:"Fish",import:()=>n.e(2349).then(n.bind(n,52349))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>n.e(6293).then(n.bind(n,26293))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>Promise.all([n.e(4823),n.e(5061)]).then(n.bind(n,85061))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>n.e(4823).then(n.bind(n,94823))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>Promise.all([n.e(3304),n.e(2501)]).then(n.bind(n,52501))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:()=>n.e(8670).then(n.bind(n,98670))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:()=>n.e(4223).then(n.bind(n,34223))},{id:"gdshader",name:"GDShader",import:()=>n.e(7977).then(n.bind(n,67977))},{id:"genie",name:"Genie",import:()=>n.e(2031).then(n.bind(n,42031))},{id:"gherkin",name:"Gherkin",import:()=>n.e(8457).then(n.bind(n,88457))},{id:"git-commit",name:"Git Commit Message",import:()=>n.e(2041).then(n.bind(n,92041))},{id:"git-rebase",name:"Git Rebase Message",import:()=>Promise.all([n.e(7152),n.e(3194)]).then(n.bind(n,33194))},{id:"gleam",name:"Gleam",import:()=>n.e(2895).then(n.bind(n,62895))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(640)]).then(n.bind(n,30640))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(9186)]).then(n.bind(n,59186))},{id:"glsl",name:"GLSL",import:()=>Promise.all([n.e(8192),n.e(6887)]).then(n.bind(n,6887))},{id:"gn",name:"GN",import:()=>n.e(9448).then(n.bind(n,99448))},{id:"gnuplot",name:"Gnuplot",import:()=>n.e(9690).then(n.bind(n,79690))},{id:"go",name:"Go",import:()=>n.e(4553).then(n.bind(n,64553))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(1248)]).then(n.bind(n,41248))},{id:"groovy",name:"Groovy",import:()=>n.e(9189).then(n.bind(n,39189))},{id:"hack",name:"Hack",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(2503),n.e(400)]).then(n.bind(n,70400))},{id:"haml",name:"Ruby Haml",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3437)]).then(n.bind(n,63437))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(2735)]).then(n.bind(n,12735))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>n.e(1335).then(n.bind(n,21335))},{id:"haxe",name:"Haxe",import:()=>n.e(1215).then(n.bind(n,11215))},{id:"hcl",name:"HashiCorp HCL",import:()=>n.e(2374).then(n.bind(n,82374))},{id:"hjson",name:"Hjson",import:()=>n.e(9421).then(n.bind(n,79421))},{id:"hlsl",name:"HLSL",import:()=>n.e(10).then(n.bind(n,80010))},{id:"html",name:"HTML",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476)]).then(n.bind(n,43476))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(1656)]).then(n.bind(n,51656))},{id:"http",name:"HTTP",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6931),n.e(7152),n.e(1248),n.e(8243)]).then(n.bind(n,98243))},{id:"hurl",name:"Hurl",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6931),n.e(1248),n.e(816)]).then(n.bind(n,20816))},{id:"hxml",name:"HXML",import:()=>n.e(376).then(n.bind(n,50376))},{id:"hy",name:"Hy",import:()=>n.e(6938).then(n.bind(n,26938))},{id:"imba",name:"Imba",import:()=>n.e(794).then(n.bind(n,30794))},{id:"ini",name:"INI",aliases:["properties"],import:()=>n.e(4309).then(n.bind(n,34309))},{id:"java",name:"Java",import:()=>n.e(6931).then(n.bind(n,76931))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:()=>n.e(2577).then(n.bind(n,52970))},{id:"jinja",name:"Jinja",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(3392)]).then(n.bind(n,43392))},{id:"jison",name:"Jison",import:()=>Promise.all([n.e(2577),n.e(6402)]).then(n.bind(n,36402))},{id:"json",name:"JSON",import:()=>n.e(4053).then(n.bind(n,4053))},{id:"json5",name:"JSON5",import:()=>n.e(3860).then(n.bind(n,63860))},{id:"jsonc",name:"JSON with Comments",import:()=>n.e(4650).then(n.bind(n,4650))},{id:"jsonl",name:"JSON Lines",import:()=>n.e(1453).then(n.bind(n,91453))},{id:"jsonnet",name:"Jsonnet",import:()=>n.e(8132).then(n.bind(n,8132))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>n.e(4634).then(n.bind(n,24634))},{id:"jsx",name:"JSX",import:()=>n.e(9312).then(n.bind(n,29228))},{id:"julia",name:"Julia",aliases:["jl"],import:()=>Promise.all([n.e(2577),n.e(6666),n.e(8835),n.e(2503),n.e(8192),n.e(893),n.e(6339)]).then(n.bind(n,85816))},{id:"just",name:"Just",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(893),n.e(8848),n.e(968),n.e(8977)]).then(n.bind(n,18977))},{id:"kdl",name:"KDL",import:()=>n.e(5968).then(n.bind(n,95968))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>n.e(6572).then(n.bind(n,26572))},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>n.e(583).then(n.bind(n,50583))},{id:"latex",name:"LaTeX",import:()=>n.e(2839).then(n.bind(n,72839))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>n.e(7227).then(n.bind(n,77227))},{id:"less",name:"Less",import:()=>n.e(1280).then(n.bind(n,11280))},{id:"liquid",name:"Liquid",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(5347)]).then(n.bind(n,25347))},{id:"llvm",name:"LLVM IR",import:()=>n.e(9220).then(n.bind(n,19220))},{id:"log",name:"Log file",import:()=>n.e(6741).then(n.bind(n,16741))},{id:"logo",name:"Logo",import:()=>n.e(5670).then(n.bind(n,25670))},{id:"lua",name:"Lua",import:()=>Promise.all([n.e(8192),n.e(3873)]).then(n.bind(n,33873))},{id:"luau",name:"Luau",import:()=>n.e(3072).then(n.bind(n,33072))},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>n.e(541).then(n.bind(n,30541))},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>n.e(3304).then(n.bind(n,13304))},{id:"marko",name:"Marko",import:()=>Promise.all([n.e(535),n.e(3782),n.e(3111),n.e(1280),n.e(5645)]).then(n.bind(n,65645))},{id:"matlab",name:"MATLAB",import:()=>n.e(1184).then(n.bind(n,31184))},{id:"mdc",name:"MDC",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(3304),n.e(6729)]).then(n.bind(n,86729))},{id:"mdx",name:"MDX",import:()=>n.e(5690).then(n.bind(n,33309))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>n.e(9842).then(n.bind(n,29842))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>n.e(1501).then(n.bind(n,11501))},{id:"mojo",name:"Mojo",import:()=>n.e(194).then(n.bind(n,50194))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:()=>n.e(4567).then(n.bind(n,24567))},{id:"move",name:"Move",import:()=>n.e(4540).then(n.bind(n,24540))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>n.e(6455).then(n.bind(n,36455))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>n.e(5320).then(n.bind(n,35320))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:()=>n.e(3633).then(n.bind(n,53633))},{id:"nginx",name:"Nginx",import:()=>Promise.all([n.e(8192),n.e(2215)]).then(n.bind(n,2215))},{id:"nim",name:"Nim",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(8192),n.e(3304),n.e(7799)]).then(n.bind(n,7799))},{id:"nix",name:"Nix",import:()=>n.e(6099).then(n.bind(n,86099))},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>n.e(8288).then(n.bind(n,38288))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>n.e(6290).then(n.bind(n,36290))},{id:"objective-cpp",name:"Objective-C++",import:()=>n.e(4763).then(n.bind(n,21946))},{id:"ocaml",name:"OCaml",import:()=>n.e(3419).then(n.bind(n,3419))},{id:"odin",name:"Odin",import:()=>n.e(9547).then(n.bind(n,69547))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:()=>n.e(4474).then(n.bind(n,4474))},{id:"pascal",name:"Pascal",import:()=>n.e(6948).then(n.bind(n,46948))},{id:"perl",name:"Perl",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(968),n.e(7040)]).then(n.bind(n,30968))},{id:"php",name:"PHP",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(6155),n.e(4659)]).then(n.bind(n,86155))},{id:"pkl",name:"Pkl",import:()=>n.e(6166).then(n.bind(n,96166))},{id:"plsql",name:"PL/SQL",import:()=>n.e(8947).then(n.bind(n,48947))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>n.e(3324).then(n.bind(n,43324))},{id:"polar",name:"Polar",import:()=>n.e(3095).then(n.bind(n,93095))},{id:"postcss",name:"PostCSS",import:()=>n.e(9240).then(n.bind(n,19240))},{id:"powerquery",name:"PowerQuery",import:()=>n.e(9294).then(n.bind(n,19294))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>n.e(7636).then(n.bind(n,7636))},{id:"prisma",name:"Prisma",import:()=>n.e(327).then(n.bind(n,40327))},{id:"prolog",name:"Prolog",import:()=>n.e(34).then(n.bind(n,80034))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>n.e(8545).then(n.bind(n,58545))},{id:"pug",name:"Pug",aliases:["jade"],import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(5755)]).then(n.bind(n,55755))},{id:"puppet",name:"Puppet",import:()=>n.e(9569).then(n.bind(n,19569))},{id:"purescript",name:"PureScript",import:()=>n.e(6580).then(n.bind(n,36580))},{id:"python",name:"Python",aliases:["py"],import:()=>n.e(893).then(n.bind(n,40893))},{id:"qml",name:"QML",import:()=>Promise.all([n.e(2577),n.e(3077)]).then(n.bind(n,73077))},{id:"qmldir",name:"QML Directory",import:()=>n.e(6144).then(n.bind(n,46144))},{id:"qss",name:"Qt Style Sheets",import:()=>n.e(5712).then(n.bind(n,55712))},{id:"r",name:"R",import:()=>n.e(5025).then(n.bind(n,25025))},{id:"racket",name:"Racket",import:()=>n.e(3229).then(n.bind(n,3229))},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>n.e(252).then(n.bind(n,30252))},{id:"razor",name:"ASP.NET Razor",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(1642),n.e(4903)]).then(n.bind(n,84903))},{id:"reg",name:"Windows Registry Script",import:()=>n.e(5997).then(n.bind(n,85997))},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>n.e(6412).then(n.bind(n,86412))},{id:"rel",name:"Rel",import:()=>n.e(2062).then(n.bind(n,62062))},{id:"riscv",name:"RISC-V",import:()=>n.e(2710).then(n.bind(n,52710))},{id:"ron",name:"RON",import:()=>n.e(862).then(n.bind(n,80862))},{id:"rosmsg",name:"ROS Interface",import:()=>n.e(5728).then(n.bind(n,95728))},{id:"rst",name:"reStructuredText",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(893),n.e(8848),n.e(2504)]).then(n.bind(n,52504))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(8848)]).then(n.bind(n,72331))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>n.e(1161).then(n.bind(n,61161))},{id:"sas",name:"SAS",import:()=>Promise.all([n.e(2503),n.e(6360)]).then(n.bind(n,66360))},{id:"sass",name:"Sass",import:()=>n.e(8113).then(n.bind(n,88113))},{id:"scala",name:"Scala",import:()=>n.e(9377).then(n.bind(n,89377))},{id:"scheme",name:"Scheme",import:()=>n.e(7142).then(n.bind(n,97142))},{id:"scss",name:"SCSS",import:()=>Promise.all([n.e(3782),n.e(3111)]).then(n.bind(n,43111))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>n.e(9648).then(n.bind(n,59648))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>n.e(1379).then(n.bind(n,1379))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>n.e(7152).then(n.bind(n,57152))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>Promise.all([n.e(7152),n.e(8257)]).then(n.bind(n,8257))},{id:"smalltalk",name:"Smalltalk",import:()=>n.e(1556).then(n.bind(n,61556))},{id:"solidity",name:"Solidity",import:()=>n.e(8704).then(n.bind(n,38704))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(2728)]).then(n.bind(n,72728))},{id:"sparql",name:"SPARQL",import:()=>n.e(8432).then(n.bind(n,68432))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>n.e(7610).then(n.bind(n,47610))},{id:"sql",name:"SQL",import:()=>n.e(2503).then(n.bind(n,2503))},{id:"ssh-config",name:"SSH Config",import:()=>n.e(6046).then(n.bind(n,16046))},{id:"stata",name:"Stata",import:()=>Promise.all([n.e(2503),n.e(4080)]).then(n.bind(n,64080))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>n.e(7557).then(n.bind(n,97557))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:()=>Promise.all([n.e(2577),n.e(830)]).then(n.bind(n,30830))},{id:"svelte",name:"Svelte",import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(1142)]).then(n.bind(n,81142))},{id:"swift",name:"Swift",import:()=>n.e(5922).then(n.bind(n,35922))},{id:"system-verilog",name:"SystemVerilog",import:()=>n.e(5655).then(n.bind(n,90893))},{id:"systemd",name:"Systemd Units",import:()=>n.e(9006).then(n.bind(n,9006))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>n.e(1078).then(n.bind(n,21078))},{id:"tasl",name:"Tasl",import:()=>n.e(4963).then(n.bind(n,94963))},{id:"tcl",name:"Tcl",import:()=>n.e(1274).then(n.bind(n,41274))},{id:"templ",name:"Templ",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(4553),n.e(1977)]).then(n.bind(n,81977))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>n.e(3483).then(n.bind(n,43483))},{id:"tex",name:"TeX",import:()=>n.e(1456).then(n.bind(n,11456))},{id:"toml",name:"TOML",import:()=>n.e(4163).then(n.bind(n,84163))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(4357)]).then(n.bind(n,74357))},{id:"tsv",name:"TSV",import:()=>n.e(840).then(n.bind(n,30840))},{id:"tsx",name:"TSX",import:()=>n.e(6814).then(n.bind(n,33710))},{id:"turtle",name:"Turtle",import:()=>n.e(1365).then(n.bind(n,41365))},{id:"twig",name:"Twig",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(893),n.e(8848),n.e(3111),n.e(6155),n.e(6588)]).then(n.bind(n,74207))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:()=>n.e(535).then(n.bind(n,5346))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>n.e(9466).then(n.bind(n,19466))},{id:"typst",name:"Typst",aliases:["typ"],import:()=>n.e(2013).then(n.bind(n,62013))},{id:"v",name:"V",import:()=>n.e(7525).then(n.bind(n,7525))},{id:"vala",name:"Vala",import:()=>n.e(9565).then(n.bind(n,59565))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>n.e(2179).then(n.bind(n,62179))},{id:"verilog",name:"Verilog",import:()=>n.e(4801).then(n.bind(n,34801))},{id:"vhdl",name:"VHDL",import:()=>n.e(7425).then(n.bind(n,37425))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>n.e(4539).then(n.bind(n,14539))},{id:"vue",name:"Vue",import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(5553)]).then(n.bind(n,45553))},{id:"vue-html",name:"Vue HTML",import:()=>Promise.all([n.e(2577),n.e(7021)]).then(n.bind(n,17021))},{id:"vue-vine",name:"Vue Vine",import:()=>Promise.all([n.e(2577),n.e(1290),n.e(3782),n.e(3111),n.e(1280),n.e(2160)]).then(n.bind(n,98110))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>n.e(1219).then(n.bind(n,21219))},{id:"wasm",name:"WebAssembly",import:()=>n.e(4275).then(n.bind(n,84275))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>n.e(5269).then(n.bind(n,65269))},{id:"wgsl",name:"WGSL",import:()=>n.e(4976).then(n.bind(n,44976))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>n.e(4370).then(n.bind(n,44370))},{id:"wit",name:"WebAssembly Interface Types",import:()=>n.e(624).then(n.bind(n,58243))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>n.e(7442).then(n.bind(n,6987))},{id:"xml",name:"XML",import:()=>Promise.all([n.e(6931),n.e(2278)]).then(n.bind(n,77040))},{id:"xsl",name:"XSL",import:()=>Promise.all([n.e(6931),n.e(3942)]).then(n.bind(n,3942))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>n.e(5518).then(n.bind(n,95518))},{id:"zenscript",name:"ZenScript",import:()=>n.e(2485).then(n.bind(n,92485))},{id:"zig",name:"Zig",import:()=>n.e(7041).then(n.bind(n,57041))}],b=Object.fromEntries(f.map(e=>[e.id,e.import])),y=Object.fromEntries(f.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),k={...b,...y},_=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>n.e(2812).then(n.bind(n,62812))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>n.e(7635).then(n.bind(n,27635))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>n.e(7884).then(n.bind(n,77884))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:()=>n.e(4358).then(n.bind(n,94358))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:()=>n.e(9005).then(n.bind(n,19005))},{id:"catppuccin-frappe",displayName:"Catppuccin Frapp\xe9",type:"dark",import:()=>n.e(1595).then(n.bind(n,51595))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>n.e(3979).then(n.bind(n,83979))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>n.e(9680).then(n.bind(n,59680))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>n.e(2107).then(n.bind(n,2107))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>n.e(5375).then(n.bind(n,75375))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>n.e(5136).then(n.bind(n,55136))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>n.e(4295).then(n.bind(n,4295))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>n.e(7258).then(n.bind(n,87258))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>n.e(9996).then(n.bind(n,49996))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>n.e(9224).then(n.bind(n,39224))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>n.e(6704).then(n.bind(n,86704))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>n.e(6927).then(n.bind(n,96927))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>n.e(5424).then(n.bind(n,15424))},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>n.e(3082).then(n.bind(n,23082))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>n.e(9382).then(n.bind(n,69382))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>n.e(2130).then(n.bind(n,32130))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>n.e(9666).then(n.bind(n,49666))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>n.e(392).then(n.bind(n,80392))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>n.e(9841).then(n.bind(n,49841))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>n.e(3492).then(n.bind(n,53492))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>n.e(214).then(n.bind(n,214))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>n.e(579).then(n.bind(n,60579))},{id:"horizon",displayName:"Horizon",type:"dark",import:()=>n.e(6311).then(n.bind(n,96311))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:()=>n.e(3526).then(n.bind(n,23526))},{id:"houston",displayName:"Houston",type:"dark",import:()=>n.e(7524).then(n.bind(n,7524))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>n.e(6563).then(n.bind(n,56563))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>n.e(6701).then(n.bind(n,26701))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>n.e(7785).then(n.bind(n,97785))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>n.e(9136).then(n.bind(n,19136))},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>n.e(2489).then(n.bind(n,82489))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>n.e(1247).then(n.bind(n,21247))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>n.e(6859).then(n.bind(n,76859))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>n.e(7921).then(n.bind(n,67921))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>n.e(6846).then(n.bind(n,96846))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>n.e(3074).then(n.bind(n,83074))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>n.e(9521).then(n.bind(n,89521))},{id:"min-light",displayName:"Min Light",type:"light",import:()=>n.e(6089).then(n.bind(n,6089))},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>n.e(5520).then(n.bind(n,15520))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>n.e(4969).then(n.bind(n,44969))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:()=>n.e(2954).then(n.bind(n,92954))},{id:"nord",displayName:"Nord",type:"dark",import:()=>n.e(5491).then(n.bind(n,5491))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>n.e(9615).then(n.bind(n,9615))},{id:"one-light",displayName:"One Light",type:"light",import:()=>n.e(7625).then(n.bind(n,67625))},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>n.e(1534).then(n.bind(n,21534))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>n.e(8430).then(n.bind(n,28430))},{id:"red",displayName:"Red",type:"dark",import:()=>n.e(8555).then(n.bind(n,48555))},{id:"rose-pine",displayName:"Ros\xe9 Pine",type:"dark",import:()=>n.e(7082).then(n.bind(n,87082))},{id:"rose-pine-dawn",displayName:"Ros\xe9 Pine Dawn",type:"light",import:()=>n.e(1583).then(n.bind(n,1583))},{id:"rose-pine-moon",displayName:"Ros\xe9 Pine Moon",type:"dark",import:()=>n.e(5750).then(n.bind(n,35750))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>n.e(7465).then(n.bind(n,17465))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>n.e(1898).then(n.bind(n,21898))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>n.e(7130).then(n.bind(n,67130))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>n.e(966).then(n.bind(n,966))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>n.e(1664).then(n.bind(n,31664))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>n.e(3286).then(n.bind(n,83286))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>n.e(4593).then(n.bind(n,94593))},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>n.e(9267).then(n.bind(n,39267))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>n.e(7889).then(n.bind(n,47889))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>n.e(5318).then(n.bind(n,55318))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>n.e(8656).then(n.bind(n,78656))}],w=Object.fromEntries(_.map(e=>[e.id,e.import]));var C=n(92619).Buffer,S=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function x(){return"u">typeof performance?performance.now():Date.now()}let v=(e,t)=>e+(t-e%t)%t;async function A(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}let a="u">typeof TextDecoder?new TextDecoder("utf8"):void 0;function s(e,t){return e?function(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&a)return a.decode(e.subarray(t,i));let s="";for(;t<i;){let n=e[t++];if(!(128&n)){s+=String.fromCharCode(n);continue}let r=63&e[t++];if((224&n)==192){s+=String.fromCharCode((31&n)<<6|r);continue}let i=63&e[t++];if((n=(240&n)==224?(15&n)<<12|r<<6|i:(7&n)<<18|r<<12|i<<6|63&e[t++])<65536)s+=String.fromCharCode(n);else{let e=n-65536;s+=String.fromCharCode(55296|e>>10,56320|1023&e)}}return s}(r.HEAPU8,e,t):""}let o={emscripten_get_now:x,emscripten_memcpy_big:function(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)},emscripten_resize_heap:function(e){let a=r.HEAPU8.length;if((e>>>=0)>0x80000000)return!1;for(let r=1;r<=4;r*=2){let s=a*(1+.2/r);if(s=Math.min(s,e+0x6000000),function(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}(Math.min(0x80000000,v(Math.max(e,s),65536))))return!0}return!1},fd_write:()=>0};async function l(){let n=await e({env:o,wasi_snapshot_preview1:o});i((t=n.memory).buffer),Object.assign(r,n),r.UTF8ToString=s}return await l(),r}var N=Object.defineProperty,E=(e,t,n)=>{let r;return(r="symbol"!=typeof t?t+"":t)in e?N(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n};let P=null;class L{constructor(e){E(this,"utf16Length"),E(this,"utf8Length"),E(this,"utf16Value"),E(this,"utf8Value"),E(this,"utf16OffsetToUtf8"),E(this,"utf8OffsetToUtf16");const t=e.length,n=L._utf8ByteLength(e),r=n!==t,i=r?new Uint32Array(t+1):null;r&&(i[t]=n);const a=r?new Uint32Array(n+1):null;r&&(a[n]=t);const s=new Uint8Array(n);let o=0;for(let n=0;n<t;n++){const l=e.charCodeAt(n);let c=l,u=!1;if(l>=55296&&l<=56319&&n+1<t){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(c=(l-55296<<10)+65536|t-56320,u=!0)}r&&(i[n]=o,u&&(i[n+1]=o),c<=127?a[o+0]=n:c<=2047?(a[o+0]=n,a[o+1]=n):c<=65535?(a[o+0]=n,a[o+1]=n,a[o+2]=n):(a[o+0]=n,a[o+1]=n,a[o+2]=n,a[o+3]=n)),c<=127?s[o++]=c:(c<=2047?s[o++]=192|(1984&c)>>>6:(c<=65535?s[o++]=224|(61440&c)>>>12:(s[o++]=240|(1835008&c)>>>18,s[o++]=128|(258048&c)>>>12),s[o++]=128|(4032&c)>>>6),s[o++]=128|(63&c)>>>0),u&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=s,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=a}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,s=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,s=!0)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,s&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}let T=class e{constructor(t){if(E(this,"id",++e.LAST_ID),E(this,"_onigBinding"),E(this,"content"),E(this,"utf16Length"),E(this,"utf8Length"),E(this,"utf16OffsetToUtf8"),E(this,"utf8OffsetToUtf16"),E(this,"ptr"),!P)throw new S("Must invoke loadWasm first.");this._onigBinding=P,this.content=t;const n=new L(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||(e._sharedPtr=P.omalloc(1e4)),e._sharedPtrInUse=!0,P.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(P)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};E(T,"LAST_ID",0),E(T,"_sharedPtr",0),E(T,"_sharedPtrInUse",!1);class I{constructor(e){if(E(this,"_onigBinding"),E(this,"_ptr"),!P)throw new S("Must invoke loadWasm first.");const t=[],n=[];for(let r=0,i=e.length;r<i;r++){const i=new L(e[r]);t[r]=i.createString(P),n[r]=i.utf8Length}const r=P.omalloc(4*e.length);P.HEAPU32.set(t,r/4);const i=P.omalloc(4*e.length);P.HEAPU32.set(n,i/4);const a=P.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)P.ofree(t[n]);P.ofree(i),P.ofree(r),0===a&&function(e){throw new S(e.UTF8ToString(e.getLastOnigError()))}(P),this._onigBinding=P,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if("number"==typeof n&&(r=n),"string"==typeof e){e=new T(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(0===a)return null;let s=i.HEAPU32,o=a/4,l=s[o++],c=s[o++],u=[];for(let t=0;t<c;t++){let n=e.convertUtf8OffsetToUtf16(s[o++]),r=e.convertUtf8OffsetToUtf16(s[o++]);u[t]={start:n,end:r,length:r-n}}return{index:l,captureIndices:u}}}function $(e){return r||(r=async function(){P=await A(async t=>{let n=e;if("function"==typeof(n=await n)&&(n=await n(t)),"function"==typeof n&&(n=await n(t)),"function"==typeof n.instantiator)n=await n.instantiator(t);else if("function"==typeof n.default)n=await n.default(t);else{var r,i,a,s;if(void 0!==n.data&&(n=n.data),r=n,"u">typeof Response&&r instanceof Response){n="function"==typeof WebAssembly.instantiateStreaming?await (a=n,e=>WebAssembly.instantiateStreaming(a,e))(t):await (s=n,async e=>{let t=await s.arrayBuffer();return WebAssembly.instantiate(t,e)})(t)}else(i=n,"u">typeof ArrayBuffer&&(i instanceof ArrayBuffer||ArrayBuffer.isView(i))||void 0!==C&&C.isBuffer?.(i)||"u">typeof SharedArrayBuffer&&i instanceof SharedArrayBuffer||"u">typeof Uint32Array&&i instanceof Uint32Array||n instanceof WebAssembly.Module)?n=await R(n)(t):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await R(n.default)(t))}return"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}())}function R(e){return t=>WebAssembly.instantiate(e,t)}function M(e){i=e}function G(){return i}async function B(e){return e&&await $(e),{createScanner:e=>new I(e.map(e=>"string"==typeof e?e:e.source)),createString:e=>new T(e)}}var O=p({});g(O,l);var D=class extends Error{constructor(e){super(e),this.name="ShikiError"}},F=n(41463);function j(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}var U=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,W=class{static hasCaptures(e){return null!==e&&(U.lastIndex=0,U.test(e))}static replaceCaptures(e,t,n){return e.replace(U,(e,r,i,a)=>{let s=n[parseInt(r||i,10)];if(!s)return e;{let e=t.substring(s.start,s.end);for(;"."===e[0];)e=e.substring(1);switch(a){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function H(e,t){if(null===e&&null===t)return 0;if(!e)return -1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){var i,a;let n=(i=e[r],i<(a=t[r])?-1:+(i>a));if(0!==n)return n}return 0}return n-r}function q(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function z(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var V=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},X=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(function(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i,a=t[e];if(!a.settings)continue;if("string"==typeof a.scope){let e=a.scope;i=(e=(e=e.replace(/^[,]+/,"")).replace(/[,]+$/,"")).split(",")}else i=Array.isArray(a.scope)?a.scope:[""];let s=-1;if("string"==typeof a.settings.fontStyle){s=0;let e=a.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++)switch(e[t]){case"italic":s|=1;break;case"bold":s|=2;break;case"underline":s|=4;break;case"strikethrough":s|=8}}let o=null;"string"==typeof a.settings.foreground&&q(a.settings.foreground)&&(o=a.settings.foreground);let l=null;"string"==typeof a.settings.background&&q(a.settings.background)&&(l=a.settings.background);for(let t=0,a=i.length;t<a;t++){let a=i[t].trim().split(" "),c=a[a.length-1],u=null;a.length>1&&(u=a.slice(0,a.length-1)).reverse(),n[r++]=new Z(c,u,e,s,o,l)}}return n}(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort((e,t)=>{var n,r;let i=(n=e.scope,n<(r=t.scope)?-1:+(n>r));return 0!==i||0!==(i=H(e.parentScopes,t.parentScopes))?i:e.index-t.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(r=t.foreground),null!==t.background&&(i=t.background)}let a=new Y(t),s=new J(n,a.getId(r),a.getId(i)),o=new en(new et(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];o.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new X(a,s,o)}(e,t)}_cachedMatchRoot=new V(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>(function(e,t){if(0===t.length)return!0;for(let i=0;i<t.length;i++){var n,r;let a=t[i],s=!1;if(">"===a){if(i===t.length-1)return!1;a=t[++i],s=!0}for(;e&&(n=e.scopeName,!((r=a)===n||n.startsWith(r)&&"."===n[r.length]));){if(s)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0})(e.parent,t.parentScopes));return n?new J(n.fontStyle,n.foreground,n.background):null}},Q=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e||null!==this.parent&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}},J=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}},Z=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},K=((s=K||{})[s.NotSet=-1]="NotSet",s[s.None=0]="None",s[s.Italic=1]="Italic",s[s.Bold=2]="Bold",s[s.Underline=4]="Underline",s[s.Strikethrough=8]="Strikethrough",s),Y=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},ee=Object.freeze([]),et=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||ee,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==r&&(this.background=r)}},en=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;">"===e.parentScopes[n]&&n++,">"===t.parentScopes[r]&&r++,!(n>=e.parentScopes.length)&&!(r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(0!==i)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,n,r=t.indexOf(".");if(-1===r?(e=t,n=""):(e=t.substring(0,r),n=t.substring(r+1)),this._children.hasOwnProperty(e))return this._children[e].match(n)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,s){let o,l,c;if(""===n)return void this._doInsertHere(t,r,i,a,s);let u=n.indexOf(".");-1===u?(o=n,l=""):(o=n.substring(0,u),l=n.substring(u+1)),this._children.hasOwnProperty(o)?c=this._children[o]:(c=new e(this._mainRule.clone(),et.cloneArr(this._rulesWithParentScopes)),this._children[o]=c),c.insert(t+1,l,r,i,a,s)}_doInsertHere(e,t,n,r,i){if(null===t)return void this._mainRule.acceptOverwrite(e,n,r,i);for(let a=0,s=this._rulesWithParentScopes.length;a<s;a++){let s=this._rulesWithParentScopes[a];if(0===H(s.parentScopes,t))return void s.acceptOverwrite(e,n,r,i)}-1===n&&(n=this._mainRule.fontStyle),0===r&&(r=this._mainRule.foreground),0===i&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new et(e,t,n,r,i))}},er=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:e.getForeground(t),background:e.getBackground(t)})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return(1024&e)!=0}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(0xff8000&e)>>>15}static getBackground(e){return(0xff000000&e)>>>24}static set(t,n,r,i,a,s,o){let l=e.getLanguageId(t),c=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),h=e.getForeground(t),p=e.getBackground(t);return 0!==n&&(l=n),8!==r&&(c=r),null!==i&&(u=+!!i),-1!==a&&(d=a),0!==s&&(h=s),0!==o&&(p=o),(l|c<<8|u<<10|d<<11|h<<15|p<<24)>>>0}};function ei(e,t){var n;let r,i,a=[],s=(n=e,i=(r=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g).exec(n),{next:()=>{if(!i)return null;let e=i[0];return i=r.exec(n),e}}),o=s.next();for(;null!==o;){let e=0;if(2===o.length&&":"===o.charAt(1)){switch(o.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=s.next()}let t=c();if(a.push({matcher:t,priority:e}),","!==o)break;o=s.next()}return a;function l(){if("-"===o){o=s.next();let e=l();return t=>!!e&&!e(t)}if("("===o){o=s.next();let e=function(){let e=[],t=c();for(;t&&(e.push(t),"|"===o||","===o);){do o=s.next();while("|"===o||","===o);t=c()}return t=>e.some(e=>e(t))}();return")"===o&&(o=s.next()),e}if(ea(o)){let e=[];do e.push(o),o=s.next();while(ea(o));return n=>t(e,n)}return null}function c(){let e=[],t=l();for(;t;)e.push(t),t=l();return t=>e.every(e=>e(t))}}function ea(e){return!!e&&!!e.match(/[\w\.:]+/)}var es=((o=es||{})[o.None=0]="None",o[o.NotBeginString=1]="NotBeginString",o[o.NotEndString=2]="NotEndString",o[o.NotBeginPosition=4]="NotBeginPosition",o[o.DebugCall=8]="DebugCall",o);function eo(e){"function"==typeof e.dispose&&e.dispose()}var el=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},ec=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},eu=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},ed=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new el(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new eu;for(let n of e)!function(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof el?ep({baseGrammar:a,selfGrammar:i},r):eh(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let s=n.injections(e.scopeName);if(s)for(let e of s)r.add(new el(e))}(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof el){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function eh(e,t,n){t.repository&&t.repository[e]&&em([t.repository[e]],t,n)}function ep(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&em(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&em(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function em(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?j({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&em(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=e_(i);switch(a.kind){case 0:ep({...t,selfGrammar:t.baseGrammar},n);break;case 1:ep(t,n);break;case 2:eh(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let s=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(s){let r={baseGrammar:t.baseGrammar,selfGrammar:s,repository:e};4===a.kind?eh(a.ruleName,r,n):ep(r,n)}else 4===a.kind?n.add(new ec(a.scopeName,a.ruleName)):n.add(new el(a.scopeName))}}}var eg=class{kind=0},ef=class{kind=1},eb=class{constructor(e){this.ruleName=e}kind=2},ey=class{constructor(e){this.scopeName=e}kind=3},ek=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function e_(e){if("$base"===e)return new eg;if("$self"===e)return new ef;let t=e.indexOf("#");return -1===t?new ey(e):0===t?new eb(e.substring(1)):new ek(e.substring(0,t),e.substring(t+1))}var ew=/\\(\d+)/,eC=/\\(\d+)/g;Symbol("RuleId");var eS=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=W.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=W.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${function e(t){let n=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===n?t:~n==t.length-1?e(t.substring(0,t.length-1)):t.substr(~n+1)}(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?W.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?W.replaceCaptures(this._contentName,e,t):this._contentName}},ex=class extends eS{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error("Not supported!")}compile(e,t){throw Error("Not supported!")}compileAG(e,t,n,r){throw Error("Not supported!")}},ev=class extends eS{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new eL(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new eT,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},eA=class extends eS{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new eT,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},eN=class extends eS{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,s,o,l,c){super(e,t,n,r),this._begin=new eL(i,this.id),this.beginCaptures=a,this._end=new eL(s||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=o,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){for(let t of(this._cachedCompiledPatterns=new eT,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},eE=class extends eS{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,s,o,l){super(e,t,n,r),this._begin=new eL(i,this.id),this.beginCaptures=a,this.whileCaptures=o,this._while=new eL(s,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns)for(let t of(this._cachedCompiledPatterns=new eT,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new eT,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},eP=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new ex(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new ev(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(void 0===t.begin){t.repository&&(r=j({},r,t.repository));let i=t.patterns;return void 0===i&&t.include&&(i=[{include:t.include}]),new eA(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new eE(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new eN(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if("$vscodeTextmateLocation"===e)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if("$vscodeTextmateLocation"===a)continue;let s=parseInt(a,10),o=0;t[a].patterns&&(o=e.getCompiledRuleId(t[a],n,r)),i[s]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,o)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,s=t.length;a<s;a++){let s=t[a],o=-1;if(s.include){let t=e_(s.include);switch(t.kind){case 0:case 1:o=e.getCompiledRuleId(r[s.include],n,r);break;case 2:let i=r[t.ruleName];i&&(o=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,l=4===t.kind?t.ruleName:null,c=n.getExternalGrammar(a,r);if(c)if(l){let t=c.repository[l];t&&(o=e.getCompiledRuleId(t,n,c.repository))}else o=e.getCompiledRuleId(c.repository.$self,n,c.repository)}}else o=e.getCompiledRuleId(s,n,r);if(-1!==o){let e=n.getRule(o),t=!1;if((e instanceof eA||e instanceof eN||e instanceof eE)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;i.push(o)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},eL=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&"string"==typeof e){const t=e.length;let n=0,r=[],i=!1;for(let a=0;a<t;a++)if("\\"===e.charAt(a)&&a+1<t){const t=e.charAt(a+1);"z"===t?(r.push(e.substring(n,a)),r.push("$(?!\\n)(?<!\\n)"),n=a+2):("A"===t||"G"===t)&&(i=!0),a++}this.hasAnchor=i,0===n?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,"string"==typeof this.source?this.hasBackReferences=ew.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let n=t.map(t=>e.substring(t.start,t.end));return eC.lastIndex=0,this.source.replace(eC,(e,t)=>z(n[parseInt(t,10)]||""))}_buildAnchorCache(){let e,t,n,r;if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let i=[],a=[],s=[],o=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),i[e]=n,a[e]=n,s[e]=n,o[e]=n,"\\"===n&&e+1<t&&("A"===(r=this.source.charAt(e+1))?(i[e+1]="￿",a[e+1]="￿",s[e+1]="A",o[e+1]="A"):"G"===r?(i[e+1]="￿",a[e+1]="G",s[e+1]="￿",o[e+1]="G"):(i[e+1]=r,a[e+1]=r,s[e+1]=r,o[e+1]=r),e++);return{A0_G0:i.join(""),A0_G1:a.join(""),A1_G0:s.join(""),A1_G1:o.join("")}}resolveAnchors(e,t){if(!this.hasAnchor||!this._anchorCache||"string"!=typeof this.source)return this.source;if(e)if(t)return this._anchorCache.A1_G1;else return this._anchorCache.A1_G0;return t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},eT=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new eI(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){if(!this._hasAnchors)return this.compile(e);if(t)if(n)return this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1;else return this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0;return n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0)}_resolveAnchors(e,t,n){return new eI(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},eI=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},e$=class{constructor(e,t){this.languageId=e,this.tokenType=t}},eR=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new e$(e,8),this._embeddedLanguagesMatcher=new eM(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return null===t?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new e$(0,0);_getBasicScopeAttributes=new V(e=>new e$(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},eM=class{values;scopesRegExp;constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([e,t])=>z(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};void 0!==F&&F.env.VSCODE_TEXTMATE_DEBUG;var eG=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function eB(e,t,n,r,i,a,s,o){let l=t.content.length,c=!1,u=-1;if(s){let s=function(e,t,n,r,i,a){let s=i.beginRuleCapturedEOL?0:-1,o=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof eE&&o.push({rule:n,stack:t})}for(let p=o.pop();p;p=o.pop()){var l,c,u,d,h;let{ruleScanner:o,findOptions:m}=(l=p.rule,c=e,u=p.stack.endRule,d=n,h=r===s,{ruleScanner:l.compileWhileAG(c,u,d,h),findOptions:0}),g=o.findNextMatchSync(t,r,m);if(g){if(-2!==g.ruleId){i=p.stack.pop();break}g.captureIndices&&g.captureIndices.length&&(a.produce(p.stack,g.captureIndices[0].start),eD(e,t,n,p.stack,a,p.rule.whileCaptures,g.captureIndices),a.produce(p.stack,g.captureIndices[0].end),s=g.captureIndices[0].end,g.captureIndices[0].end>r&&(r=g.captureIndices[0].end,n=!1))}else{i=p.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:s,isFirstLine:n}}(e,t,n,r,i,a);i=s.stack,r=s.linePos,n=s.isFirstLine,u=s.anchorPosition}let d=Date.now();for(;!c;){if(0!==o&&Date.now()-d>o)return new eG(i,!0);!function(){let s=function(e,t,n,r,i,a){let s=function(e,t,n,r,i,a){let{ruleScanner:s,findOptions:o}=eO(i.getRule(e),e,i.endRule,n,r===a),l=s.findNextMatchSync(t,r,o);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}(e,t,n,r,i,a),o=e.getInjections();if(0===o.length)return s;let l=function(e,t,n,r,i,a,s){let o,l=Number.MAX_VALUE,c=null,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,h=e.length;a<h;a++){let h=e[a];if(!h.matcher(d))continue;let{ruleScanner:p,findOptions:m}=eO(t.getRule(h.ruleId),t,null,r,i===s),g=p.findNextMatchSync(n,i,m);if(!g)continue;let f=g.captureIndices[0].start;if(!(f>=l)&&(l=f,c=g.captureIndices,o=g.ruleId,u=h.priority,l===i))break}return c?{priorityMatch:-1===u,captureIndices:c,matchedRuleId:o}:null}(o,e,t,n,r,i,a);if(!l)return s;if(!s)return l;let c=s.captureIndices[0].start,u=l.captureIndices[0].start;return u<c||l.priorityMatch&&u===c?l:s}(e,t,n,r,i,u);if(!s){a.produce(i,l),c=!0;return}let o=s.captureIndices,d=s.matchedRuleId,h=!!o&&o.length>0&&o[0].end>r;if(-1===d){let s=i.getRule(e);a.produce(i,o[0].start),i=i.withContentNameScopesList(i.nameScopesList),eD(e,t,n,i,a,s.endCaptures,o),a.produce(i,o[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!h&&d.getEnterPos()===r){i=d,a.produce(i,l),c=!0;return}}else{let s=e.getRule(d);a.produce(i,o[0].start);let p=i,m=s.getName(t.content,o),g=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,o[0].end===l,null,g,g),s instanceof eN){eD(e,t,n,i,a,s.beginCaptures,o),a.produce(i,o[0].end),u=o[0].end;let r=s.getContentName(t.content,o),d=g.pushAttributed(r,e);if(i=i.withContentNameScopesList(d),s.endHasBackReferences&&(i=i.withEndRule(s.getEndWithResolvedBackReferences(t.content,o))),!h&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,l),c=!0;return}}else if(s instanceof eE){eD(e,t,n,i,a,s.beginCaptures,o),a.produce(i,o[0].end),u=o[0].end;let r=s.getContentName(t.content,o),d=g.pushAttributed(r,e);if(i=i.withContentNameScopesList(d),s.whileHasBackReferences&&(i=i.withEndRule(s.getWhileWithResolvedBackReferences(t.content,o))),!h&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,l),c=!0;return}}else if(eD(e,t,n,i,a,s.captures,o),a.produce(i,o[0].end),i=i.pop(),!h){i=i.safePop(),a.produce(i,l),c=!0;return}}o[0].end>r&&(r=o[0].end,n=!1)}()}return new eG(i,!1)}function eO(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function eD(e,t,n,r,i,a,s){if(0===a.length)return;let o=t.content,l=Math.min(a.length,s.length),c=[],u=s[0].end;for(let t=0;t<l;t++){let l=a[t];if(null===l)continue;let d=s[t];if(0===d.length)continue;if(d.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=d.start;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?i.produceFromScopes(c[c.length-1].scopes,d.start):i.produce(r,d.start),l.retokenizeCapturedWithRuleId){let t=l.getName(o,s),a=r.contentNameScopesList.pushAttributed(t,e),c=l.getContentName(o,s),u=a.pushAttributed(c,e),h=r.push(l.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(o.substring(0,d.end));eB(e,p,n&&0===d.start,d.start,h,i,!1,0),eo(p);continue}let h=l.getName(o,s);if(null!==h){let t=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(h,e);c.push(new eF(t,d.end))}}for(;c.length>0;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var eF=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function ej(e,t,n,r,i){let a=ei(t,eU),s=eP.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:s,grammar:i,priority:n.priority})}function eU(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(function(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}(t[r],e))return n=r+1,!0;return!1})}var eW=class{constructor(e,t,n,r,i,a,s,o){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=o,this._basicScopeAttributesProvider=new eR(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=eH(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const e of Object.keys(i))for(const t of ei(e,eU))this._tokenTypeMatchers.push({matcher:t.matcher,type:i[e]})}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e=[],t=this._rootScopeName,n=({lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)}).lookup(t);if(n){let r=n.injections;if(r)for(let t in r)ej(e,t,r[t],this,n);let i=this._grammarRepository.injections(t);i&&i.forEach(t=>{let n=this.getExternalGrammar(t);if(n){let t=n.injectionSelector;t&&ej(e,t,n,this,n)}})}return e.sort((e,t)=>e.priority-t.priority),e}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=eH(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){let i;if(-1===this._rootId&&(this._rootId=eP.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==ez.NULL)i=!1,t.reset();else{let e;i=!0;let n=this._basicScopeAttributesProvider.getDefaultAttributes(),r=this.themeProvider.getDefaults(),a=er.set(0,n.languageId,n.tokenType,null,r.fontStyle,r.foregroundId,r.backgroundId),s=this.getRule(this._rootId).getName(null,null);e=s?eq.createRootAndLookUpScopeName(s,a,this):eq.createRoot("unknown",a),t=new ez(null,this._rootId,-1,-1,!1,null,e,e)}e+="\n";let a=this.createOnigString(e),s=a.content.length,o=new eX(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=eB(this,a,i,0,t,o,!0,r);return eo(a),{lineLength:s,lineTokens:o,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function eH(e,t){return(e=function e(t){return Array.isArray(t)?function(t){let n=[];for(let r=0,i=t.length;r<i;r++)n[r]=e(t[r]);return n}(t):t instanceof RegExp?t:"object"==typeof t?function(t){let n={};for(let r in t)n[r]=e(t[r]);return n}(t):t}(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var eq=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)r=new e(r,i=Q.push(i,t.scopeNames),t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Q(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Q(null,t),s=r.themeProvider.themeMatch(a),o=e.mergeAttributes(n,i,s);return new e(null,a,o)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return e.equals(this,t)}static equals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return null!==n&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),er.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),s=r.themeProvider.themeMatch(a),o=e.mergeAttributes(t.tokenAttributes,i,s);return new e(t,a,o)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},ez=class e{constructor(e,t,n,r,i,a,s,o){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=s,this.contentNameScopesList=o,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return null!==t&&e._equals(this,t)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&eq.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,s,o){return new e(this,t,n,r,i,a,s,o)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=eq.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,eq.fromExtension(r,n.contentNameScopesList))}},eV=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):ei(e,eU).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>ei(e,eU).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},eX=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=er.set(n,0,e.type,null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=er.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},eQ=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,new eW(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},eJ=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new eQ(X.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(X.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new eV(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new ed(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},eZ=ez.NULL;function eK(e,t){let n="string"==typeof e?{}:{...e.colorReplacements},r="string"==typeof e?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))"string"==typeof i?n[e]=i:e===r&&Object.assign(n,i);return n}function eY(e,t){return e&&t?.[e?.toLowerCase()]||e}function e0(e){return Array.isArray(e)?e:[e]}async function e1(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function e2(e){return!e||["plaintext","txt","text","plain"].includes(e)}function e3(e){return"ansi"===e||e2(e)}function e5(e){return"none"===e}function e8(e){return e5(e)}let e6=/(\r?\n)/g;function e7(e,t=!1){if(0===e.length)return[["",0]];let n=e.split(e6),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||""):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}let e4="__shiki_resolved";function e9(e){if(e?.[e4])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r="light"===t.type?"#333333":"#bbbbbb"),n||(n="light"===t.type?"#fffffe":"#1e1e1e"),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function s(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?s(e):(a.set(e,n),n)}for(let e of(t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith("#"),r=e.settings?.background&&!e.settings.background.startsWith("#");if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=s(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=s(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i}),Object.keys(t.colors||{})))if(("editor.foreground"===e||"editor.background"===e||e.startsWith("terminal.ansi"))&&!t.colors[e]?.startsWith("#")){let n=s(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,e4,{enumerable:!1,writable:!1,value:!0}),t}async function te(e){return[...new Set((await Promise.all(e.filter(e=>!e3(e)).map(async e=>await e1(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function tt(e){return(await Promise.all(e.map(async e=>e5(e)?null:e9(await e1(e))))).filter(e=>!!e)}function tn(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new D(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var tr=class extends eJ{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return"string"==typeof e?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=e9(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=X.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=tn(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>!!t&&(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e))).filter(e=>!n.includes(e));throw new D(`Missing languages ${n.map(([e])=>`\`${e}\``).join(", ")}, required by ${e.map(([e])=>`\`${e}\``).join(", ")}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},ti=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split("."),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(".");n=[...n,...this._injections.get(r)||[]]}return n}};let ta=0;function ts(e){let t;ta+=1,!1!==e.warnings&&ta>=10&&ta%10==0&&console.warn(`[Shiki] ${ta} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let n=!1;if(!e.engine)throw new D("`engine` option is required for synchronous mode");let r=(e.langs||[]).flat(1),i=(e.themes||[]).flat(1).map(e9),a=new tr(new ti(e.engine,r),i,r,e.langAlias);function s(e){if("none"===e)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};c();let t=a.getTheme(e);if(!t)throw new D(`Theme \`${e}\` not found, you may need to load it first`);return t}function o(...e){c(),a.loadLanguages(e.flat(1))}function l(...e){for(let t of(c(),e.flat(1)))a.loadTheme(t)}function c(){if(n)throw new D("Shiki instance has been disposed")}function u(){n||(n=!0,a.dispose(),ta-=1)}return{setTheme:function(e){c();let n=s(e);return t!==e&&(a.setTheme(n),t=e),{theme:n,colorMap:a.getColorMap()}},getTheme:s,getLanguage:function(e){c();let t=a.getGrammar("string"==typeof e?e:e.name);if(!t)throw new D(`Language \`${e}\` not found, you may need to load it first`);return t},getLoadedThemes:function(){return c(),a.getLoadedThemes()},getLoadedLanguages:function(){return c(),a.getLoadedLanguages()},resolveLangAlias:function(t){return tn(t,e.langAlias)},loadLanguage:async function(...e){return o(await te(e))},loadLanguageSync:o,loadTheme:async function(...e){return c(),l(await tt(e))},loadThemeSync:l,dispose:u,[Symbol.dispose]:u}}let to=ts;async function tl(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([tt(e.themes||[]),te(e.langs||[]),e.engine]);return ts({...e,themes:t,langs:n,engine:r})}let tc=tl,tu=new WeakMap;function td(e,t){tu.set(e,t)}function th(e){return tu.get(e)}var tp=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(e0(n).map(e=>[e,eZ])),t)}constructor(...e){if(2===e.length){const[t,n]=e;this.lang=n,this._stacks=t}else{const[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){var t;let n,r;return t=this._stacks[e],n=[],r=new Set,!function e(t){if(r.has(t))return;r.add(t);let i=t?.nameScopesList?.scopeName;i&&n.push(i),t.parent&&e(t.parent)}(t),n}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};let tm=/,/,tg=/ /;function tf(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(e2(e.resolveLangAlias(n.lang||"text"))||e5(r))return e7(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),s=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==s.name)throw new D(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(i.name))throw new D(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return ty(t,s,i,a,n)}function tb(...e){if(2===e.length)return th(e[1]);let[t,n,r={}]=e,{lang:i="text",theme:a=t.getLoadedThemes()[0]}=r;if(e2(i)||e5(a))throw new D("Plain language does not have grammar state");if("ansi"===i)throw new D("ANSI language does not have grammar state");let{theme:s,colorMap:o}=t.setTheme(a),l=t.getLanguage(i);return new tp(tk(n,l,s,o,r).stateStack,l.name,s.name)}function ty(e,t,n,r,i){let a=tk(e,t,n,r,i),s=new tp(a.stateStack,t.name,n.name);return td(a.tokens,s),a.tokens}function tk(e,t,n,r,i){let a=eK(n,i),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:o=500}=i,l=e7(e),c=i.grammarState?function(e,t){if(!(e instanceof tp))throw new D("Invalid grammar state");return e.getInternalStack(t)}(i.grammarState,n.name)??eZ:null!=i.grammarContextCode?tk(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:eZ,u=[],d=[];for(let e=0,h=l.length;e<h;e++){let h,p,[m,g]=l[e];if(""===m){u=[],d.push([]);continue}if(s>0&&m.length>=s){u=[],d.push([{content:m,offset:g,color:"",fontStyle:0}]);continue}i.includeExplanation&&(h=t.tokenizeLine(m,c,o).tokens,p=0);let f=t.tokenizeLine2(m,c,o),b=f.tokens.length/2;for(let e=0;e<b;e++){let t=f.tokens[2*e],s=e+1<b?f.tokens[2*e+2]:m.length;if(t===s)continue;let o=f.tokens[2*e+1],l=eY(r[er.getForeground(o)],a),c=er.getFontStyle(o),d={content:m.substring(t,s),offset:g+t,color:l,fontStyle:c};if(i.includeExplanation){let e=[];if("scopeName"!==i.includeExplanation)for(let t of n.settings){let n;switch(typeof t.scope){case"string":n=t.scope.split(tm).map(e=>e.trim());break;case"object":n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(tg))})}d.explanation=[];let r=0;for(;t+r<s;){let t=h[p],n=m.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:"scopeName"===i.includeExplanation?t.scopes.map(e=>({scopeName:e})):function(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:function(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(function(e,t,n){if(!t_(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)t_(e[r],n[i])&&(r-=1),i-=1;return -1===r}(e,t,n)){r.push(a);break}return r}(e,i,t.slice(0,r))}}return n}(e,t.scopes)}),p+=1}}u.push(d)}d.push(u),u=[],c=f.ruleStack}return{tokens:d,stateStack:c}}function t_(e,t){return e===t||t.substring(0,e.length)===e&&"."===t[e.length]}function tw(e,t,n,r=tf){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:th(a),theme:"string"==typeof i.theme?i.theme:i.theme.name}}),s=function(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let s=i.map(()=>0),o=i.map(e=>e[0]);for(;o.every(e=>e);){let e=Math.min(...o.map(e=>e.content.length));for(let t=0;t<n;t++){let n=o[t];n.content.length===e?(a[t].push(n),s[t]+=1,o[t]=i[t][s[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),o[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}(...a.map(e=>e.tokens)),o=s[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return"includeExplanation"in n&&n.includeExplanation&&(a.explanation=e.explanation),s.forEach((e,n)=>{let{content:s,explanation:o,offset:l,...c}=e[t][r];a.variants[i[n].color]=c}),a})),l=a[0].state?new tp(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return l&&td(o,l),o}var tC=n(51640),tS=n(4918),tx=n(27629);let tv=/["&'<>`]/g,tA=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,tN=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,tE=/[|\\{}()[\]^$+*?.]/g,tP=new WeakMap,tL=/[\dA-Fa-f]/,tT=/\d/;var tI=n(6801);let t$={nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},tR=["cent","copy","divide","gt","lt","not","para","times"],tM={}.hasOwnProperty,tG={};for(a in t$)tM.call(t$,a)&&(tG[t$[a]]=a);let tB=/[^\dA-Za-z]/;function tO(e,t,n){var r,i;let a,s,o=(r=n.omitOptionalSemicolons,a="&#x"+e.toString(16).toUpperCase(),r&&t&&!tL.test(String.fromCharCode(t))?a:a+";");if((n.useNamedReferences||n.useShortestReferences)&&(s=function(e,t,n,r){let i=String.fromCharCode(e);if(tM.call(tG,i)){let e=tG[i],a="&"+e;return n&&tI.K.includes(e)&&!tR.includes(e)&&(!r||t&&61!==t&&tB.test(String.fromCharCode(t)))?a:a+";"}return""}(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!s)&&n.useShortestReferences){let r,a=(i=n.omitOptionalSemicolons,r="&#"+String(e),i&&t&&!tT.test(String.fromCharCode(t))?r:r+";");a.length<o.length&&(o=a)}return s&&(!n.useShortestReferences||s.length<o.length)?s:o}function tD(e,t){let n;var r,i=e,a=Object.assign({format:tO},t);if(i=i.replace(a.subset?(r=a.subset,(n=tP.get(r))||(n=function(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(tE,"\\$&"));return RegExp("(?:"+t.join("|")+")","g")}(r),tP.set(r,n)),n):tv,s),a.subset||a.escapeOnly)return i;return i.replace(tA,function(e,t,n){return a.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,n.charCodeAt(t+2),a)}).replace(tN,s);function s(e,t,n){return a.format(e.charCodeAt(0),n.charCodeAt(t+1),a)}}let tF=/^>|^->|<!--|-->|--!>|<!-$/g,tj=[">"],tU=["<",">"];var tW=n(49884),tH=n(86994),tq=n(38609),tz=n(51705),tV=n(36887);let tX=tZ(1),tQ=tZ(-1),tJ=[];function tZ(e){return function(t,n,r){let i=t?t.children:tJ,a=(n||0)+e,s=i[a];if(!r)for(;s&&(0,tV.m)(s);)a+=e,s=i[a];return s}}let tK={}.hasOwnProperty;function tY(e){return function(t,n,r){return tK.call(e,t.tagName)&&e[t.tagName](t,n,r)}}let t0=tY({body:function(e,t,n){let r=tX(n,t);return!r||"comment"!==r.type},caption:t1,colgroup:t1,dd:function(e,t,n){let r=tX(n,t);return!r||"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName)},dt:function(e,t,n){let r=tX(n,t);return!!(r&&"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName))},head:t1,html:function(e,t,n){let r=tX(n,t);return!r||"comment"!==r.type},li:function(e,t,n){let r=tX(n,t);return!r||"element"===r.type&&"li"===r.tagName},optgroup:function(e,t,n){let r=tX(n,t);return!r||"element"===r.type&&"optgroup"===r.tagName},option:function(e,t,n){let r=tX(n,t);return!r||"element"===r.type&&("option"===r.tagName||"optgroup"===r.tagName)},p:function(e,t,n){let r=tX(n,t);return r?"element"===r.type&&("address"===r.tagName||"article"===r.tagName||"aside"===r.tagName||"blockquote"===r.tagName||"details"===r.tagName||"div"===r.tagName||"dl"===r.tagName||"fieldset"===r.tagName||"figcaption"===r.tagName||"figure"===r.tagName||"footer"===r.tagName||"form"===r.tagName||"h1"===r.tagName||"h2"===r.tagName||"h3"===r.tagName||"h4"===r.tagName||"h5"===r.tagName||"h6"===r.tagName||"header"===r.tagName||"hgroup"===r.tagName||"hr"===r.tagName||"main"===r.tagName||"menu"===r.tagName||"nav"===r.tagName||"ol"===r.tagName||"p"===r.tagName||"pre"===r.tagName||"section"===r.tagName||"table"===r.tagName||"ul"===r.tagName):!n||"element"!==n.type||"a"!==n.tagName&&"audio"!==n.tagName&&"del"!==n.tagName&&"ins"!==n.tagName&&"map"!==n.tagName&&"noscript"!==n.tagName&&"video"!==n.tagName},rp:t2,rt:t2,tbody:function(e,t,n){let r=tX(n,t);return!r||"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName)},td:t3,tfoot:function(e,t,n){return!tX(n,t)},th:t3,thead:function(e,t,n){let r=tX(n,t);return!!(r&&"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName))},tr:function(e,t,n){let r=tX(n,t);return!r||"element"===r.type&&"tr"===r.tagName}});function t1(e,t,n){let r=tX(n,t,!0);return!r||"comment"!==r.type&&!("text"===r.type&&(0,tV.m)(r.value.charAt(0)))}function t2(e,t,n){let r=tX(n,t);return!r||"element"===r.type&&("rp"===r.tagName||"rt"===r.tagName)}function t3(e,t,n){let r=tX(n,t);return!r||"element"===r.type&&("td"===r.tagName||"th"===r.tagName)}let t5=tY({body:function(e){let t=tX(e,-1,!0);return!t||"comment"!==t.type&&!("text"===t.type&&(0,tV.m)(t.value.charAt(0)))&&("element"!==t.type||"meta"!==t.tagName&&"link"!==t.tagName&&"script"!==t.tagName&&"style"!==t.tagName&&"template"!==t.tagName)},colgroup:function(e,t,n){let r=tQ(n,t),i=tX(e,-1,!0);return!(n&&r&&"element"===r.type&&"colgroup"===r.tagName&&t0(r,n.children.indexOf(r),n))&&!!(i&&"element"===i.type&&"col"===i.tagName)},head:function(e){let t=new Set;for(let n of e.children)if("element"===n.type&&("base"===n.tagName||"title"===n.tagName)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||"element"===n.type},html:function(e){let t=tX(e,-1);return!t||"comment"!==t.type},tbody:function(e,t,n){let r=tQ(n,t),i=tX(e,-1);return!(n&&r&&"element"===r.type&&("thead"===r.tagName||"tbody"===r.tagName)&&t0(r,n.children.indexOf(r),n))&&!!(i&&"element"===i.type&&"tr"===i.tagName)}}),t8={name:[[" \n\f\r &/=>".split("")," \n\f\r \"&'/=>`".split("")],["\0 \n\f\r \"&'/<=>".split(""),"\0 \n\f\r \"&'/<=>`".split("")]],unquoted:[[" \n\f\r &>".split(""),"\0 \n\f\r \"&'<=>`".split("")],["\0 \n\f\r \"&'<=>`".split(""),"\0 \n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]},t6=["<","&"];function t7(e,t,n,r){return n&&"element"===n.type&&("script"===n.tagName||"style"===n.tagName)?e.value:tD(e.value,Object.assign({},r.settings.characterReferences,{subset:t6}))}let t4=(0,tx.A)("type",{invalid:function(e){throw Error("Expected node, not `"+e+"`")},unknown:function(e){throw Error("Cannot compile unknown node `"+e.type+"`")},handlers:{comment:function(e,t,n,r){return r.settings.bogusComments?"<?"+tD(e.value,Object.assign({},r.settings.characterReferences,{subset:tj}))+">":"\x3c!--"+e.value.replace(tF,function(e){return tD(e,Object.assign({},r.settings.characterReferences,{subset:tU}))})+"--\x3e"},doctype:function(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"},element:function(e,t,n,r){let i,a=r.schema,s="svg"!==a.space&&r.settings.omitOptionalTags,o="svg"===a.space?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),l=[];"html"===a.space&&"svg"===e.tagName&&(r.schema=tS.JW);let c=function(e,t){let n,r=[],i=-1;if(t){for(n in t)if(null!==t[n]&&void 0!==t[n]){let i=function(e,t,n){let r,i=(0,tq.I)(e.schema,t),a=e.settings.allowParseErrors&&"html"===e.schema.space?0:1,s=+!e.settings.allowDangerousCharacters,o=e.quote;if(i.overloadedBoolean&&(n===i.attribute||""===n)?n=!0:(i.boolean||i.overloadedBoolean)&&("string"!=typeof n||n===i.attribute||""===n)&&(n=!!n),null==n||!1===n||"number"==typeof n&&Number.isNaN(n))return"";let l=tD(i.attribute,Object.assign({},e.settings.characterReferences,{subset:t8.name[a][s]}));return!0===n||(n=Array.isArray(n)?(i.commaSeparated?tH.A:tz.A)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?l:(e.settings.preferUnquoted&&(r=tD(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:t8.unquoted[a][s]}))),r!==n&&(e.settings.quoteSmart&&(0,tW.D)(n,o)>(0,tW.D)(n,e.alternative)&&(o=e.alternative),r=o+tD(n,Object.assign({},e.settings.characterReferences,{subset:("'"===o?t8.single:t8.double)[a][s],attribute:!0}))+o),l+(r?"="+r:r))}(e,n,t[n]);i&&r.push(i)}}for(;++i<r.length;){let t=e.settings.tightAttributes?r[i].charAt(r[i].length-1):void 0;i!==r.length-1&&'"'!==t&&"'"!==t&&(r[i]+=" ")}return r.join("")}(r,e.properties),u=r.all("html"===a.space&&"template"===e.tagName?e.content:e);return r.schema=a,u&&(o=!1),!c&&s&&t5(e,t,n)||(l.push("<",e.tagName,c?" "+c:""),o&&("svg"===a.space||r.settings.closeSelfClosing)&&(i=c.charAt(c.length-1),(!r.settings.tightSelfClosing||"/"===i||i&&'"'!==i&&"'"!==i)&&l.push(" "),l.push("/")),l.push(">")),l.push(u),o||s&&t0(e,t,n)||l.push("</"+e.tagName+">"),l.join("")},raw:function(e,t,n,r){return r.settings.allowDangerousHtml?e.value:t7(e,t,n,r)},root:function(e,t,n,r){return r.all(e)},text:t7}}),t9={},ne={},nt=[];function nn(e,t,n){return t4(e,t,n,this)}function nr(e){let t=[],n=e&&e.children||nt,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}let ni=/\s+/g;function na(e,t){if(!t)return e;for(let n of(e.properties||={},e.properties.class||=[],"string"==typeof e.properties.class&&(e.properties.class=e.properties.class.split(ni)),Array.isArray(e.properties.class)||(e.properties.class=[]),Array.isArray(t)?t:t.split(ni)))n&&!e.properties.class.includes(n)&&e.properties.class.push(n);return e}let ns=/:?lang=["']([^"']+)["']/g,no=/(?:```|~~~)([\w-]+)/g,nl=/\\begin\{([\w-]+)\}/g,nc=/<script\s+(?:type|lang)=["']([^"']+)["']/gi;function nu(e){let t=e7(e,!0).map(([e])=>e);return{lines:t,indexToPos:function(n){if(n===e.length)return{line:t.length-1,character:t.at(-1).length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}},posToIndex:function(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+n}}}function nd(e,t,n){let r=new Set;for(let t of e.matchAll(ns)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(no)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(nl)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(nc)){let e=t[1].toLowerCase().trim(),n=e.includes("/")?e.split("/").pop():e;n&&r.add(n)}if(!n)return[...r];let i=n.getBundledLanguages();return[...r].filter(e=>e&&i[e])}let nh=["color","background-color"];function np(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function nm(e,t){let n=[...t instanceof Set?t:new Set(t)].sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?np(e,t):e})):e}function ng(e,t,n,r,i="css-vars"){let a={content:e.content,explanation:e.explanation,offset:e.offset},s=t.map(t=>nf(e.variants[t])),o=new Set(s.flatMap(e=>Object.keys(e))),l={},c=(e,r)=>{let i="color"===r?"":"background-color"===r?"-bg":`-${r}`;return n+t[e]+("color"===r?"":i)};return s.forEach((e,n)=>{for(let a of o){let o=e[a]||"inherit";if(0===n&&r&&nh.includes(a))if("light-dark()"===r&&s.length>1){let e=t.findIndex(e=>"light"===e),r=t.findIndex(e=>"dark"===e);if(-1===e||-1===r)throw new D('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');l[a]=`light-dark(${s[e][a]||"inherit"}, ${s[r][a]||"inherit"})`,"css-vars"===i&&(l[c(n,a)]=o)}else l[a]=o;else"css-vars"===i&&(l[c(n,a)]=o)}}),a.htmlStyle=l,a}function nf(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&K.Italic&&(t["font-style"]="italic"),e.fontStyle&K.Bold&&(t["font-weight"]="bold");let n=[];e.fontStyle&K.Underline&&n.push("underline"),e.fontStyle&K.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function nb(e){return"string"==typeof e?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}function ny(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let r=nu(t.source);function n(e){if("number"==typeof e){if(e<0||e>t.source.length)throw new D(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}{let t=r.lines[e.line];if(void 0===t)throw new D(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new D(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:r.posToIndex(e.line,n)}}}let i=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));(function(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new D(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,s=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,o=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||s||o){if(i&&a||s&&o||s&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new D(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}})(i),e.set(t.meta,{decorations:i,converter:r,source:t.source})}return e.get(t.meta)}return{name:"shiki:decorations",tokens(e){if(this.options.decorations?.length)return nm(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=[...e.children].filter(e=>"element"===e.type&&"span"===e.tagName);if(r.length!==n.converter.lines.length)throw new D(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let s=r[e],o="",l=-1,c=-1;if(0===t&&(l=0),0===n&&(c=0),n===1/0&&(c=s.children.length),-1===l||-1===c)for(let e=0;e<s.children.length;e++)o+=function e(t){return"text"===t.type?t.value:"element"===t.type?t.children.map(e).join(""):""}(s.children[e]),-1===l&&o.length===t&&(l=e+1),-1===c&&o.length===n&&(c=e+1);if(-1===l)throw new D(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(-1===c)throw new D(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=s.children.slice(l,c);if(i.alwaysWrap||u.length!==s.children.length)if(i.alwaysWrap||1!==u.length||"element"!==u[0].type){let e={type:"element",tagName:"span",properties:{},children:u};a(e,i,"wrapper"),s.children.splice(l,u.length,e)}else a(u[0],i,"token");else a(s,i,"line")}function a(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||"span",e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&na(e,t.properties.class),e=i(e,n)||e}let s=[];for(let e of n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset)){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let i=t.line+1;i<n.line;i++)s.unshift(()=>{var t;r[t=i]=a(r[t],e,"line")});i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}let nk=[ny()];function n_(e){let t=function(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case"pre":t.push(i);break;case"post":n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...nk]}var nw=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],nC={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function nS(e){let t=e.shift();if("2"===t){let t=e.splice(0,3).map(e=>Number.parseInt(e));if(3!==t.length||t.some(e=>Number.isNaN(e)))return;return{type:"rgb",rgb:t}}if("5"===t){let t=e.shift();if(t)return{type:"table",index:Number(t)}}}var nx={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};let nv=/#([0-9a-f]{3,8})/i,nA=/var\((--[\w-]+-ansi-[\w-]+)\)/,nN={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function nE(e,t,n){let r,i,a,s=eK(e,n),o=e7(t),l=function(e=nx){let t;function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0")).join("")}`}return{value:function(r){switch(r.type){case"named":return e[r.name];case"rgb":return n(r.rgb);case"table":var i;return i=r.index,function(){if(t)return t;t=[];for(let n=0;n<nw.length;n++)t.push(e[nw[n]]);let r=[0,95,135,175,215,255];for(let e=0;e<6;e++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)t.push(n([r[e],r[i],r[a]]));let i=8;for(let e=0;e<24;e++,i+=10)t.push(n([i,i,i]));return t}()[i]}}}}(Object.fromEntries(nw.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||nN[t]]}))),c=(r=null,i=null,a=new Set,{parse(e){let t=[],n=0;do{let s=function(e,t){let n=e.indexOf("\x1b",t);if(-1!==n&&"["===e[n+1]){let t=e.indexOf("m",n);if(-1!==t)return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}(e,n),o=s.sequence?e.substring(n,s.startPosition):e.substring(n);if(o.length>0&&t.push({value:o,foreground:r,background:i,decorations:new Set(a)}),s.sequence){let e=function(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(0===r)t.push({type:"resetAll"});else if(r<=9)nC[r]&&t.push({type:"setDecoration",value:nC[r]});else if(r<=29){let e=nC[r-20];e&&(t.push({type:"resetDecoration",value:e}),"dim"===e&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:nw[r-30]}});else if(38===r){let n=nS(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===r)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:nw[r-40]}});else if(48===r){let n=nS(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===r?t.push({type:"resetBackgroundColor"}):53===r?t.push({type:"setDecoration",value:"overline"}):55===r?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:nw[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:nw[r-100+8]}})}return t}(s.sequence);for(let t of e)"resetAll"===t.type?(r=null,i=null,a.clear()):"resetForegroundColor"===t.type?r=null:"resetBackgroundColor"===t.type?i=null:"resetDecoration"===t.type&&a.delete(t.value);for(let t of e)"setForegroundColor"===t.type?r=t.value:"setBackgroundColor"===t.type?i=t.value:"setDecoration"===t.type&&a.add(t.value)}n=s.position}while(n<e.length);return t}});return o.map(t=>c.parse(t[0]).map(n=>{let r,i;n.decorations.has("reverse")?(r=n.background?l.value(n.background):e.bg,i=n.foreground?l.value(n.foreground):e.fg):(r=n.foreground?l.value(n.foreground):e.fg,i=n.background?l.value(n.background):void 0),r=eY(r,s),i=eY(i,s),n.decorations.has("dim")&&(r=function(e){let t=e.match(nv);if(t){let e=t[1];if(8===e.length){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${e.slice(0,6)}${t}`}if(6===e.length)return`#${e}80`;if(4===e.length){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,"0")}`}else if(3===e.length){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(nA);return n?`var(${n[1]}-dim)`:e}(r));let a=K.None;return n.decorations.has("bold")&&(a|=K.Bold),n.decorations.has("italic")&&(a|=K.Italic),n.decorations.has("underline")&&(a|=K.Underline),n.decorations.has("strikethrough")&&(a|=K.Strikethrough),{content:n.value,offset:t[1],color:r,bgColor:i,fontStyle:a}}))}function nP(e,t,n={}){let r=e.resolveLangAlias(n.lang||"text"),{theme:i=e.getLoadedThemes()[0]}=n;if(!e2(r)&&!e5(i)&&"ansi"===r){let{theme:r}=e.setTheme(i);return nE(r,t,n)}return tf(e,t,n)}function nL(e,t,n){let r,i,a,s,o,l;if("themes"in n){let{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:d="css-vars"}=n,h=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===c?-1:+(t.color===c));if(0===h.length)throw new D("`themes` option must not be empty");let p=tw(e,t,n,nP);if(l=th(p),c&&"light-dark()"!==c&&!h.some(e=>e.color===c))throw new D(`\`themes\` option must contain the defaultColor key \`${c}\``);let m=h.map(t=>e.getTheme(t.theme)),g=h.map(e=>e.color);a=p.map(e=>e.map(e=>ng(e,g,u,c,d))),l&&td(a,l);let f=h.map(e=>eK(e.theme,n));i=nT(h,m,f,u,c,"fg",d),r=nT(h,m,f,u,c,"bg",d),s=`shiki-themes ${m.map(e=>e.name).join(" ")}`,o=c?void 0:[i,r].join(";")}else if("theme"in n){let o=eK(n.theme,n);a=nP(e,t,n);let c=e.getTheme(n.theme);r=eY(c.bg,o),i=eY(c.fg,o),s=c.name,l=th(a)}else throw new D("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:s,rootStyle:o,grammarState:l}}function nT(e,t,n,r,i,a,s){return e.map((o,l)=>{let c=eY(t[l][a],n[l])||"inherit",u=`${r+o.color}${"bg"===a?"-bg":""}:${c}`;if(0===l&&i){if("light-dark()"===i&&e.length>1){let r=e.findIndex(e=>"light"===e.color),i=e.findIndex(e=>"dark"===e.color);if(-1===r||-1===i)throw new D('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${eY(t[r][a],n[r])||"inherit"}, ${eY(t[i][a],n[i])||"inherit"});${u}`}return c}return"css-vars"===s?u:null}).filter(e=>!!e).join(";")}let nI=/^\s+$/,n$=/^(\s*)(.*?)(\s*)$/;function nR(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>nR(e,t,n),codeToTokens:(t,n)=>nL(e,t,n)}){let i=t;for(let e of n_(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:s,bg:o,themeName:l,rootStyle:c,grammarState:u}=nL(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:h=!1}=n;!0===d?a=a.map(e=>{let t,n=[],r="";return e.forEach((i,a)=>{let s=!(i.fontStyle&&(i.fontStyle&K.Underline||i.fontStyle&K.Strikethrough));s&&nI.test(i.content)&&e[a+1]?(void 0===t&&(t=i.offset),r+=i.content):r?(s?n.push({...i,offset:t,content:r+i.content}):n.push({content:r,offset:t},i),t=void 0,r=""):n.push(i)}),n}):"never"===d&&(a=a.map(e=>e.flatMap(e=>{if(nI.test(e.content))return e;let t=e.content.match(n$);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))),h&&(a=a.map(e=>{let t=[];for(let n of e){if(0===t.length){t.push({...n});continue}let e=t.at(-1),r=nb(e.htmlStyle||nf(e)),i=nb(n.htmlStyle||nf(n)),a=e.fontStyle&&(e.fontStyle&K.Underline||e.fontStyle&K.Strikethrough),s=n.fontStyle&&(n.fontStyle&K.Underline||n.fontStyle&K.Strikethrough);a||s||r!==i?t.push({...n}):e.content+=n.content}return t}));let p={...r,get source(){return i}};for(let e of n_(n))a=e.tokens?.call(p,a)||a;return nM(a,{...n,fg:s,bg:o,themeName:l,rootStyle:!1!==n.rootStyle&&(n.rootStyle??c)},p,u)}function nM(e,t,n,r=th(e)){let i=n_(t),a=[],s={type:"root",children:[]},{structure:o="classic",tabindex:l="0"}=t,c={class:`shiki ${t.themeName||""}`};for(let[e,n]of(!1!==t.rootStyle&&(null!=t.rootStyle?c.style=t.rootStyle:c.style=`background-color:${t.bg};color:${t.fg}`),!1!==l&&null!=l&&(c.tabindex=l.toString()),Object.entries(t.meta||{})))e.startsWith("_")||(c[e]=n);let u={type:"element",tagName:"pre",properties:c,children:[],data:t.data},d={type:"element",tagName:"code",properties:{},children:a},h=[],p={...n,structure:o,addClassToHast:na,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return s},get pre(){return u},get code(){return d},get lines(){return h}};if(e.forEach((e,t)=>{t&&("inline"===o?s.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===o&&a.push({type:"text",value:"\n"}));let n={type:"element",tagName:"span",properties:{class:"line"},children:[]},r=0;for(let a of e){let e={type:"element",tagName:"span",properties:{...a.htmlAttrs},children:[{type:"text",value:a.content}]},l=nb(a.htmlStyle||nf(a));for(let s of(l&&(e.properties.style=l),i))e=s?.span?.call(p,e,t+1,r,n,a)||e;"inline"===o?s.children.push(e):"classic"===o&&n.children.push(e),r+=a.content.length}if("classic"===o){for(let e of i)n=e?.line?.call(p,n,t+1)||n;h.push(n),a.push(n)}else"inline"===o&&h.push(n)}),"classic"===o){for(let e of i)d=e?.code?.call(p,d)||d;for(let e of(u.children.push(d),i))u=e?.pre?.call(p,u)||u;s.children.push(u)}else if("inline"===o){let e=[],t={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(let n of s.children)"element"===n.type&&"br"===n.tagName?(e.push(t),t={type:"element",tagName:"span",properties:{class:"line"},children:[]}):("element"===n.type||"text"===n.type)&&t.children.push(n);e.push(t);let n={type:"element",tagName:"code",properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;s.children=[];for(let e=0;e<n.children.length;e++){e>0&&s.children.push({type:"element",tagName:"br",properties:{},children:[]});let t=n.children[e];"element"===t.type&&s.children.push(...t.children)}}let m=s;for(let e of i)m=e?.root?.call(p,m)||m;return r&&td(m,r),m}let nG=function(e,t){let n=t||t9,r=n.quote||'"';if('"'!==r&&"'"!==r)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return({one:nn,all:nr,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||tC.b,characterReferences:n.characterReferences||ne,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:"svg"===n.space?tS.JW:tS.qy,quote:r,alternative:'"'===r?"'":'"'}).one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)};function nB(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>nR(e,t,n),codeToTokens:(t,n)=>nL(e,t,n)},i=nG(nR(e,t,n,r));for(let e of n_(n))i=e.postprocess?.call(r,i,n)||i;return i}async function nO(e){let t=await tl(e);return{getLastGrammarState:(...e)=>tb(t,...e),codeToTokensBase:(e,n)=>nP(t,e,n),codeToTokensWithThemes:(e,n)=>tw(t,e,n),codeToTokens:(e,n)=>nL(t,e,n),codeToHast:(e,n)=>nR(t,e,n),codeToHtml:(e,n)=>nB(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function nD(e){let t=ts(e);return{getLastGrammarState:(...e)=>tb(t,...e),codeToTokensBase:(e,n)=>nP(t,e,n),codeToTokensWithThemes:(e,n)=>tw(t,e,n),codeToTokens:(e,n)=>nL(t,e,n),codeToHast:(e,n)=>nR(t,e,n),codeToHtml:(e,n)=>nB(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function nF(e){let t;return async function(n){if(!t)return t=e({...n,themes:n.themes||[],langs:n.langs||[]});{let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}}}let nj=nF(nO);function nU(e){let t=e.langs,n=e.themes,r=e.engine;return async function(e){function i(n){if("string"==typeof n){if(e3(n=e.langAlias?.[n]||n))return[];let r=t[n];if(!r)throw new D(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(e5(e))return"none";if("string"==typeof e){let t=n[e];if(!t)throw new D(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let s=(e.themes??[]).map(e=>a(e)),o=(e.langs??[]).map(e=>i(e)),l=await nO({engine:e.engine??r(),...e,themes:s,langs:o});return{...l,loadLanguage:(...e)=>l.loadLanguage(...e.map(i)),loadTheme:(...e)=>l.loadTheme(...e.map(a)),getBundledLanguages:()=>t,getBundledThemes:()=>n}}}function nW(e){let t;return async function(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}}function nH(e,t){let n=nW(e);async function r(e,r){let i=await n({langs:[r.lang],themes:"theme"in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter:e=>n(e),codeToHtml:async(e,t)=>(await r(e,t)).codeToHtml(e,t),codeToHast:async(e,t)=>(await r(e,t)).codeToHast(e,t),codeToTokens:async(e,t)=>(await r(e,t)).codeToTokens(e,t),codeToTokensBase:async(e,t)=>(await r(e,t)).codeToTokensBase(e,t),codeToTokensWithThemes:async(e,t)=>(await r(e,t)).codeToTokensWithThemes(e,t),getLastGrammarState:async(e,t)=>(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}function nq(e={}){let{name:t="css-variables",variablePrefix:n="--shiki-",fontStyle:r=!0}=e,i=t=>e.variableDefaults?.[t]?`var(${n}${t}, ${e.variableDefaults[t]})`:`var(${n}${t})`,a={name:t,type:"dark",colors:{"editor.foreground":i("foreground"),"editor.background":i("background"),"terminal.ansiBlack":i("ansi-black"),"terminal.ansiRed":i("ansi-red"),"terminal.ansiGreen":i("ansi-green"),"terminal.ansiYellow":i("ansi-yellow"),"terminal.ansiBlue":i("ansi-blue"),"terminal.ansiMagenta":i("ansi-magenta"),"terminal.ansiCyan":i("ansi-cyan"),"terminal.ansiWhite":i("ansi-white"),"terminal.ansiBrightBlack":i("ansi-bright-black"),"terminal.ansiBrightRed":i("ansi-bright-red"),"terminal.ansiBrightGreen":i("ansi-bright-green"),"terminal.ansiBrightYellow":i("ansi-bright-yellow"),"terminal.ansiBrightBlue":i("ansi-bright-blue"),"terminal.ansiBrightMagenta":i("ansi-bright-magenta"),"terminal.ansiBrightCyan":i("ansi-bright-cyan"),"terminal.ansiBrightWhite":i("ansi-bright-white")},tokenColors:[{scope:["keyword.operator.accessor","meta.group.braces.round.function.arguments","meta.template.expression","markup.fenced_code meta.embedded.block"],settings:{foreground:i("foreground")}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:["strong","markup.heading.markdown","markup.bold.markdown"],settings:{fontStyle:"bold"}},{scope:["markup.italic.markdown"],settings:{fontStyle:"italic"}},{scope:"meta.link.inline.markdown",settings:{fontStyle:"underline",foreground:i("token-link")}},{scope:["string","markup.fenced_code","markup.inline"],settings:{foreground:i("token-string")}},{scope:["comment","string.quoted.docstring.multi"],settings:{foreground:i("token-comment")}},{scope:["constant.numeric","constant.language","constant.other.placeholder","constant.character.format.placeholder","variable.language.this","variable.other.object","variable.other.class","variable.other.constant","meta.property-name","meta.property-value","support"],settings:{foreground:i("token-constant")}},{scope:["keyword","storage.modifier","storage.type","storage.control.clojure","entity.name.function.clojure","entity.name.tag.yaml","support.function.node","support.type.property-name.json","punctuation.separator.key-value","punctuation.definition.template-expression"],settings:{foreground:i("token-keyword")}},{scope:"variable.parameter.function",settings:{foreground:i("token-parameter")}},{scope:["support.function","entity.name.type","entity.other.inherited-class","meta.function-call","meta.instance.constructor","entity.other.attribute-name","entity.name.function","constant.keyword.clojure"],settings:{foreground:i("token-function")}},{scope:["entity.name.tag","string.quoted","string.regexp","string.interpolated","string.template","string.unquoted.plain.out.yaml","keyword.other.template"],settings:{foreground:i("token-string-expression")}},{scope:["punctuation.definition.arguments","punctuation.definition.dict","punctuation.separator","meta.function-call.arguments"],settings:{foreground:i("token-punctuation")}},{scope:["markup.underline.link","punctuation.definition.metadata.markdown"],settings:{foreground:i("token-link")}},{scope:["beginning.punctuation.definition.list.markdown"],settings:{foreground:i("token-string")}},{scope:["punctuation.definition.string.begin.markdown","punctuation.definition.string.end.markdown","string.other.link.title.markdown","string.other.link.description.markdown"],settings:{foreground:i("token-keyword")}},{scope:["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],settings:{foreground:i("token-inserted")}},{scope:["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],settings:{foreground:i("token-deleted")}},{scope:["markup.changed","punctuation.definition.changed"],settings:{foreground:i("token-changed")}}]};return r||(a.tokenColors=a.tokenColors?.map(e=>(e.settings?.fontStyle&&delete e.settings.fontStyle,e))),a}var nz=p({bundledLanguages:()=>k,bundledLanguagesAlias:()=>y,bundledLanguagesBase:()=>b,bundledLanguagesInfo:()=>f,bundledThemes:()=>w,bundledThemesInfo:()=>_,codeToHast:()=>nQ,codeToHtml:()=>nX,codeToTokens:()=>nJ,codeToTokensBase:()=>nZ,codeToTokensWithThemes:()=>nK,createHighlighter:()=>nV,getLastGrammarState:()=>n0,getSingletonHighlighter:()=>nY});let nV=nU({langs:k,themes:w,engine:()=>(0,O.createOnigurumaEngine)(Promise.all([n.e(4814),n.e(9302)]).then(n.bind(n,49302)))}),{codeToHtml:nX,codeToHast:nQ,codeToTokens:nJ,codeToTokensBase:nZ,codeToTokensWithThemes:nK,getSingletonHighlighter:nY,getLastGrammarState:n0}=nH(nV,{guessEmbeddedLanguages:nd});var n1=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;const{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if("string"!=typeof e)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}findNextMatchSync(e,t,n){let r="string"==typeof e?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>null==e?{start:0xffffffff,end:0xffffffff,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let s=n.exec(r);if(!s)continue;if(s.index===t)return a(e,s,0);i.push([e,s,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}};function n2(e){if(1!=[...e].length)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}let n3=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),n5=String.raw;function n8(e,t){if(null==e)throw Error(t??"Value expected");return e}let n6=n5`\[\^?`,n7=`c.? | C(?:-.?)?|${n5`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${n5`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${n5`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${n5`o\{[^\}]*\}?`}|${n5`\d{1,3}`}`,n4=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,n9=RegExp(n5`
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6586],{66586:(e,t,n)=>{let r,i,a;n.r(t),n.d(t,{ShikiError:()=>D,addClassToHast:()=>na,applyColorReplacements:()=>eY,bundledLanguages:()=>k,bundledLanguagesAlias:()=>y,bundledLanguagesBase:()=>b,bundledLanguagesInfo:()=>f,bundledThemes:()=>w,bundledThemesInfo:()=>_,codeToHast:()=>nQ,codeToHtml:()=>nX,codeToTokens:()=>nJ,codeToTokensBase:()=>nZ,codeToTokensWithThemes:()=>nK,createBundledHighlighter:()=>nj,createCssVariablesTheme:()=>nq,createHighlighter:()=>nV,createHighlighterCore:()=>nB,createHighlighterCoreSync:()=>nD,createJavaScriptRegexEngine:()=>iU,createOnigurumaEngine:()=>O,createPositionConverter:()=>nu,createShikiInternal:()=>tc,createShikiInternalSync:()=>to,createShikiPrimitive:()=>ts,createShikiPrimitiveAsync:()=>tl,createSingletonShorthands:()=>nH,defaultJavaScriptRegexConstructor:()=>iF,flatTokenVariants:()=>ng,getLastGrammarState:()=>n0,getSingletonHighlighter:()=>nY,getSingletonHighlighterCore:()=>nU,getTokenStyleObject:()=>nf,guessEmbeddedLanguages:()=>nd,hastToHtml:()=>nG,isNoneTheme:()=>e5,isPlainLang:()=>e2,isSpecialLang:()=>e3,isSpecialTheme:()=>e8,loadWasm:()=>$,makeSingletonHighlighter:()=>nW,makeSingletonHighlighterCore:()=>nF,normalizeGetter:()=>e1,normalizeTheme:()=>e9,resolveColorReplacements:()=>eK,splitLines:()=>e7,splitToken:()=>np,splitTokens:()=>nm,stringifyTokenStyle:()=>nb,toArray:()=>e0,tokenizeAnsiWithTheme:()=>nE,tokenizeWithTheme:()=>ty,tokensToHast:()=>nM,transformerDecorations:()=>ny});var s,o,l={};n.r(l),n.d(l,{createOnigurumaEngine:()=>O,getDefaultWasmLoader:()=>G,loadWasm:()=>$,setDefaultWasmLoader:()=>M});var c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,h=Object.prototype.hasOwnProperty,p=(e,t)=>{let n={};for(var r in e)c(n,r,{get:e[r],enumerable:!0});return t||c(n,Symbol.toStringTag,{value:"Module"}),n},m=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,a=d(t),s=0,o=a.length;s<o;s++)i=a[s],h.call(e,i)||i===n||c(e,i,{get:(e=>t[e]).bind(null,i),enumerable:!(r=u(t,i))||r.enumerable});return e},g=(e,t,n)=>(m(e,t,"default"),n&&m(n,t,"default"));let f=[{id:"abap",name:"ABAP",import:()=>n.e(8773).then(n.bind(n,48773))},{id:"actionscript-3",name:"ActionScript",import:()=>n.e(36).then(n.bind(n,10036))},{id:"ada",name:"Ada",import:()=>n.e(5575).then(n.bind(n,55575))},{id:"angular-html",name:"Angular HTML",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(3175)]).then(n.bind(n,23175))},{id:"angular-ts",name:"Angular TypeScript",import:()=>Promise.all([n.e(2577),n.e(1630),n.e(3782),n.e(3476),n.e(3111),n.e(3186)]).then(n.bind(n,76359))},{id:"apache",name:"Apache Conf",import:()=>n.e(2765).then(n.bind(n,52765))},{id:"apex",name:"Apex",import:()=>n.e(7455).then(n.bind(n,27455))},{id:"apl",name:"APL",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(4174)]).then(n.bind(n,54174))},{id:"applescript",name:"AppleScript",import:()=>n.e(9178).then(n.bind(n,19178))},{id:"ara",name:"Ara",import:()=>n.e(3313).then(n.bind(n,93313))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>n.e(8318).then(n.bind(n,98318))},{id:"asm",name:"Assembly",import:()=>n.e(7846).then(n.bind(n,87846))},{id:"astro",name:"Astro",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(3782),n.e(6686)]).then(n.bind(n,36686))},{id:"awk",name:"AWK",import:()=>n.e(4900).then(n.bind(n,54900))},{id:"ballerina",name:"Ballerina",import:()=>n.e(2747).then(n.bind(n,92747))},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>n.e(3290).then(n.bind(n,73290))},{id:"beancount",name:"Beancount",import:()=>n.e(8496).then(n.bind(n,98496))},{id:"berry",name:"Berry",aliases:["be"],import:()=>n.e(5331).then(n.bind(n,95331))},{id:"bibtex",name:"BibTeX",import:()=>n.e(5937).then(n.bind(n,25937))},{id:"bicep",name:"Bicep",import:()=>n.e(8406).then(n.bind(n,68406))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:()=>n.e(1410).then(n.bind(n,71410))},{id:"blade",name:"Blade",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(5005)]).then(n.bind(n,25005))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>n.e(4608).then(n.bind(n,4608))},{id:"c",name:"C",import:()=>n.e(8192).then(n.bind(n,88192))},{id:"c3",name:"C3",import:()=>n.e(7113).then(n.bind(n,7113))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>n.e(4242).then(n.bind(n,64242))},{id:"cairo",name:"Cairo",import:()=>Promise.all([n.e(893),n.e(4367)]).then(n.bind(n,84367))},{id:"clarity",name:"Clarity",import:()=>n.e(5183).then(n.bind(n,15183))},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>n.e(6959).then(n.bind(n,66959))},{id:"cmake",name:"CMake",import:()=>n.e(5482).then(n.bind(n,55482))},{id:"cobol",name:"COBOL",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(5498)]).then(n.bind(n,15498))},{id:"codeowners",name:"CODEOWNERS",import:()=>n.e(1188).then(n.bind(n,21188))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>n.e(2403).then(n.bind(n,22403))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>Promise.all([n.e(2577),n.e(6647)]).then(n.bind(n,76647))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>n.e(3787).then(n.bind(n,93787))},{id:"coq",name:"Coq",import:()=>n.e(5920).then(n.bind(n,55920))},{id:"cpp",name:"C++",aliases:["c++"],import:()=>Promise.all([n.e(6666),n.e(8835),n.e(2503),n.e(8192),n.e(6110)]).then(n.bind(n,27816))},{id:"crystal",name:"Crystal",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(2503),n.e(8192),n.e(7152),n.e(6175)]).then(n.bind(n,43794))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>n.e(1642).then(n.bind(n,71642))},{id:"css",name:"CSS",import:()=>n.e(3782).then(n.bind(n,63782))},{id:"csv",name:"CSV",import:()=>n.e(6331).then(n.bind(n,66331))},{id:"cue",name:"CUE",import:()=>n.e(5338).then(n.bind(n,45338))},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>n.e(4350).then(n.bind(n,14350))},{id:"d",name:"D",import:()=>n.e(9015).then(n.bind(n,59015))},{id:"dart",name:"Dart",import:()=>n.e(3288).then(n.bind(n,3288))},{id:"dax",name:"DAX",import:()=>n.e(1932).then(n.bind(n,21932))},{id:"desktop",name:"Desktop",import:()=>n.e(7819).then(n.bind(n,7819))},{id:"diff",name:"Diff",import:()=>n.e(2614).then(n.bind(n,62614))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>n.e(2783).then(n.bind(n,52783))},{id:"dotenv",name:"dotEnv",import:()=>n.e(7210).then(n.bind(n,44829))},{id:"dream-maker",name:"Dream Maker",import:()=>n.e(425).then(n.bind(n,32806))},{id:"edge",name:"Edge",import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(7844)]).then(n.bind(n,67844))},{id:"elixir",name:"Elixir",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(698)]).then(n.bind(n,20698))},{id:"elm",name:"Elm",import:()=>Promise.all([n.e(8192),n.e(4583)]).then(n.bind(n,84583))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>n.e(3879).then(n.bind(n,62965))},{id:"erb",name:"ERB",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(8848),n.e(1198)]).then(n.bind(n,91198))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>Promise.all([n.e(3304),n.e(4678)]).then(n.bind(n,64678))},{id:"fennel",name:"Fennel",import:()=>n.e(2964).then(n.bind(n,60583))},{id:"fish",name:"Fish",import:()=>n.e(2349).then(n.bind(n,52349))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>n.e(6293).then(n.bind(n,26293))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>Promise.all([n.e(4823),n.e(5061)]).then(n.bind(n,85061))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>n.e(4823).then(n.bind(n,94823))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>Promise.all([n.e(3304),n.e(2501)]).then(n.bind(n,52501))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:()=>n.e(8670).then(n.bind(n,98670))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:()=>n.e(4223).then(n.bind(n,34223))},{id:"gdshader",name:"GDShader",import:()=>n.e(7977).then(n.bind(n,67977))},{id:"genie",name:"Genie",import:()=>n.e(2031).then(n.bind(n,42031))},{id:"gherkin",name:"Gherkin",import:()=>n.e(8457).then(n.bind(n,88457))},{id:"git-commit",name:"Git Commit Message",import:()=>n.e(2041).then(n.bind(n,92041))},{id:"git-rebase",name:"Git Rebase Message",import:()=>Promise.all([n.e(7152),n.e(3194)]).then(n.bind(n,33194))},{id:"gleam",name:"Gleam",import:()=>n.e(2895).then(n.bind(n,62895))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(640)]).then(n.bind(n,30640))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(9186)]).then(n.bind(n,59186))},{id:"glsl",name:"GLSL",import:()=>Promise.all([n.e(8192),n.e(6887)]).then(n.bind(n,6887))},{id:"gn",name:"GN",import:()=>n.e(9448).then(n.bind(n,99448))},{id:"gnuplot",name:"Gnuplot",import:()=>n.e(9690).then(n.bind(n,79690))},{id:"go",name:"Go",import:()=>n.e(4553).then(n.bind(n,64553))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(1248)]).then(n.bind(n,41248))},{id:"groovy",name:"Groovy",import:()=>n.e(9189).then(n.bind(n,39189))},{id:"hack",name:"Hack",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(2503),n.e(400)]).then(n.bind(n,70400))},{id:"haml",name:"Ruby Haml",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3437)]).then(n.bind(n,63437))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(2735)]).then(n.bind(n,12735))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>n.e(1335).then(n.bind(n,21335))},{id:"haxe",name:"Haxe",import:()=>n.e(1215).then(n.bind(n,11215))},{id:"hcl",name:"HashiCorp HCL",import:()=>n.e(2374).then(n.bind(n,82374))},{id:"hjson",name:"Hjson",import:()=>n.e(9421).then(n.bind(n,79421))},{id:"hlsl",name:"HLSL",import:()=>n.e(10).then(n.bind(n,80010))},{id:"html",name:"HTML",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476)]).then(n.bind(n,43476))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(1656)]).then(n.bind(n,51656))},{id:"http",name:"HTTP",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6931),n.e(7152),n.e(1248),n.e(8243)]).then(n.bind(n,98243))},{id:"hurl",name:"Hurl",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6931),n.e(1248),n.e(816)]).then(n.bind(n,20816))},{id:"hxml",name:"HXML",import:()=>n.e(376).then(n.bind(n,50376))},{id:"hy",name:"Hy",import:()=>n.e(6938).then(n.bind(n,26938))},{id:"imba",name:"Imba",import:()=>n.e(794).then(n.bind(n,30794))},{id:"ini",name:"INI",aliases:["properties"],import:()=>n.e(4309).then(n.bind(n,34309))},{id:"java",name:"Java",import:()=>n.e(6931).then(n.bind(n,76931))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:()=>n.e(2577).then(n.bind(n,52970))},{id:"jinja",name:"Jinja",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(3392)]).then(n.bind(n,43392))},{id:"jison",name:"Jison",import:()=>Promise.all([n.e(2577),n.e(6402)]).then(n.bind(n,36402))},{id:"json",name:"JSON",import:()=>n.e(4053).then(n.bind(n,4053))},{id:"json5",name:"JSON5",import:()=>n.e(3860).then(n.bind(n,63860))},{id:"jsonc",name:"JSON with Comments",import:()=>n.e(4650).then(n.bind(n,4650))},{id:"jsonl",name:"JSON Lines",import:()=>n.e(1453).then(n.bind(n,91453))},{id:"jsonnet",name:"Jsonnet",import:()=>n.e(8132).then(n.bind(n,8132))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>n.e(4634).then(n.bind(n,24634))},{id:"jsx",name:"JSX",import:()=>n.e(9312).then(n.bind(n,29228))},{id:"julia",name:"Julia",aliases:["jl"],import:()=>Promise.all([n.e(2577),n.e(6666),n.e(8835),n.e(2503),n.e(8192),n.e(893),n.e(6339)]).then(n.bind(n,85816))},{id:"just",name:"Just",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(893),n.e(8848),n.e(968),n.e(8977)]).then(n.bind(n,18977))},{id:"kdl",name:"KDL",import:()=>n.e(5968).then(n.bind(n,95968))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>n.e(6572).then(n.bind(n,26572))},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>n.e(583).then(n.bind(n,50583))},{id:"latex",name:"LaTeX",import:()=>n.e(2839).then(n.bind(n,72839))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>n.e(7227).then(n.bind(n,77227))},{id:"less",name:"Less",import:()=>n.e(1280).then(n.bind(n,11280))},{id:"liquid",name:"Liquid",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(5347)]).then(n.bind(n,25347))},{id:"llvm",name:"LLVM IR",import:()=>n.e(9220).then(n.bind(n,19220))},{id:"log",name:"Log file",import:()=>n.e(6741).then(n.bind(n,16741))},{id:"logo",name:"Logo",import:()=>n.e(5670).then(n.bind(n,25670))},{id:"lua",name:"Lua",import:()=>Promise.all([n.e(8192),n.e(3873)]).then(n.bind(n,33873))},{id:"luau",name:"Luau",import:()=>n.e(3072).then(n.bind(n,33072))},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>n.e(541).then(n.bind(n,30541))},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>n.e(3304).then(n.bind(n,13304))},{id:"marko",name:"Marko",import:()=>Promise.all([n.e(535),n.e(3782),n.e(3111),n.e(1280),n.e(5645)]).then(n.bind(n,65645))},{id:"matlab",name:"MATLAB",import:()=>n.e(1184).then(n.bind(n,31184))},{id:"mdc",name:"MDC",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(3304),n.e(6729)]).then(n.bind(n,86729))},{id:"mdx",name:"MDX",import:()=>n.e(3309).then(n.bind(n,55690))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>n.e(9842).then(n.bind(n,29842))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>n.e(1501).then(n.bind(n,11501))},{id:"mojo",name:"Mojo",import:()=>n.e(194).then(n.bind(n,50194))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:()=>n.e(4567).then(n.bind(n,24567))},{id:"move",name:"Move",import:()=>n.e(4540).then(n.bind(n,24540))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>n.e(6455).then(n.bind(n,36455))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>n.e(5320).then(n.bind(n,35320))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:()=>n.e(3633).then(n.bind(n,53633))},{id:"nginx",name:"Nginx",import:()=>Promise.all([n.e(8192),n.e(2215)]).then(n.bind(n,2215))},{id:"nim",name:"Nim",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(8192),n.e(3304),n.e(7799)]).then(n.bind(n,7799))},{id:"nix",name:"Nix",import:()=>n.e(6099).then(n.bind(n,86099))},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>n.e(8288).then(n.bind(n,38288))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>n.e(6290).then(n.bind(n,36290))},{id:"objective-cpp",name:"Objective-C++",import:()=>n.e(4763).then(n.bind(n,21946))},{id:"ocaml",name:"OCaml",import:()=>n.e(3419).then(n.bind(n,3419))},{id:"odin",name:"Odin",import:()=>n.e(9547).then(n.bind(n,69547))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:()=>n.e(4474).then(n.bind(n,4474))},{id:"pascal",name:"Pascal",import:()=>n.e(6948).then(n.bind(n,46948))},{id:"perl",name:"Perl",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(968),n.e(7040)]).then(n.bind(n,30968))},{id:"php",name:"PHP",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(6155),n.e(4659)]).then(n.bind(n,86155))},{id:"pkl",name:"Pkl",import:()=>n.e(6166).then(n.bind(n,96166))},{id:"plsql",name:"PL/SQL",import:()=>n.e(8947).then(n.bind(n,48947))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>n.e(3324).then(n.bind(n,43324))},{id:"polar",name:"Polar",import:()=>n.e(3095).then(n.bind(n,93095))},{id:"postcss",name:"PostCSS",import:()=>n.e(9240).then(n.bind(n,19240))},{id:"powerquery",name:"PowerQuery",import:()=>n.e(9294).then(n.bind(n,19294))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>n.e(7636).then(n.bind(n,7636))},{id:"prisma",name:"Prisma",import:()=>n.e(327).then(n.bind(n,40327))},{id:"prolog",name:"Prolog",import:()=>n.e(34).then(n.bind(n,80034))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>n.e(8545).then(n.bind(n,58545))},{id:"pug",name:"Pug",aliases:["jade"],import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(5755)]).then(n.bind(n,55755))},{id:"puppet",name:"Puppet",import:()=>n.e(9569).then(n.bind(n,19569))},{id:"purescript",name:"PureScript",import:()=>n.e(6580).then(n.bind(n,36580))},{id:"python",name:"Python",aliases:["py"],import:()=>n.e(893).then(n.bind(n,40893))},{id:"qml",name:"QML",import:()=>Promise.all([n.e(2577),n.e(3077)]).then(n.bind(n,73077))},{id:"qmldir",name:"QML Directory",import:()=>n.e(6144).then(n.bind(n,46144))},{id:"qss",name:"Qt Style Sheets",import:()=>n.e(5712).then(n.bind(n,55712))},{id:"r",name:"R",import:()=>n.e(5025).then(n.bind(n,25025))},{id:"racket",name:"Racket",import:()=>n.e(3229).then(n.bind(n,3229))},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>n.e(252).then(n.bind(n,30252))},{id:"razor",name:"ASP.NET Razor",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(1642),n.e(4903)]).then(n.bind(n,84903))},{id:"reg",name:"Windows Registry Script",import:()=>n.e(5997).then(n.bind(n,85997))},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>n.e(6412).then(n.bind(n,86412))},{id:"rel",name:"Rel",import:()=>n.e(2062).then(n.bind(n,62062))},{id:"riscv",name:"RISC-V",import:()=>n.e(2710).then(n.bind(n,52710))},{id:"ron",name:"RON",import:()=>n.e(862).then(n.bind(n,80862))},{id:"rosmsg",name:"ROS Interface",import:()=>n.e(5728).then(n.bind(n,95728))},{id:"rst",name:"reStructuredText",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(893),n.e(8848),n.e(2504)]).then(n.bind(n,52504))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(8848)]).then(n.bind(n,72331))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>n.e(1161).then(n.bind(n,61161))},{id:"sas",name:"SAS",import:()=>Promise.all([n.e(2503),n.e(6360)]).then(n.bind(n,66360))},{id:"sass",name:"Sass",import:()=>n.e(8113).then(n.bind(n,88113))},{id:"scala",name:"Scala",import:()=>n.e(9377).then(n.bind(n,89377))},{id:"scheme",name:"Scheme",import:()=>n.e(7142).then(n.bind(n,97142))},{id:"scss",name:"SCSS",import:()=>Promise.all([n.e(3782),n.e(3111)]).then(n.bind(n,43111))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>n.e(9648).then(n.bind(n,59648))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>n.e(1379).then(n.bind(n,1379))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>n.e(7152).then(n.bind(n,57152))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>Promise.all([n.e(7152),n.e(8257)]).then(n.bind(n,8257))},{id:"smalltalk",name:"Smalltalk",import:()=>n.e(1556).then(n.bind(n,61556))},{id:"solidity",name:"Solidity",import:()=>n.e(8704).then(n.bind(n,38704))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(2728)]).then(n.bind(n,72728))},{id:"sparql",name:"SPARQL",import:()=>n.e(8432).then(n.bind(n,68432))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>n.e(7610).then(n.bind(n,47610))},{id:"sql",name:"SQL",import:()=>n.e(2503).then(n.bind(n,2503))},{id:"ssh-config",name:"SSH Config",import:()=>n.e(6046).then(n.bind(n,16046))},{id:"stata",name:"Stata",import:()=>Promise.all([n.e(2503),n.e(4080)]).then(n.bind(n,64080))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>n.e(7557).then(n.bind(n,97557))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:()=>Promise.all([n.e(2577),n.e(830)]).then(n.bind(n,30830))},{id:"svelte",name:"Svelte",import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(1142)]).then(n.bind(n,81142))},{id:"swift",name:"Swift",import:()=>n.e(5922).then(n.bind(n,35922))},{id:"system-verilog",name:"SystemVerilog",import:()=>n.e(5655).then(n.bind(n,90893))},{id:"systemd",name:"Systemd Units",import:()=>n.e(9006).then(n.bind(n,9006))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>n.e(1078).then(n.bind(n,21078))},{id:"tasl",name:"Tasl",import:()=>n.e(4963).then(n.bind(n,94963))},{id:"tcl",name:"Tcl",import:()=>n.e(1274).then(n.bind(n,41274))},{id:"templ",name:"Templ",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(4553),n.e(1977)]).then(n.bind(n,81977))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>n.e(3483).then(n.bind(n,43483))},{id:"tex",name:"TeX",import:()=>n.e(1456).then(n.bind(n,11456))},{id:"toml",name:"TOML",import:()=>n.e(4163).then(n.bind(n,84163))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(4357)]).then(n.bind(n,74357))},{id:"tsv",name:"TSV",import:()=>n.e(840).then(n.bind(n,30840))},{id:"tsx",name:"TSX",import:()=>n.e(6814).then(n.bind(n,33710))},{id:"turtle",name:"Turtle",import:()=>n.e(1365).then(n.bind(n,41365))},{id:"twig",name:"Twig",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(893),n.e(8848),n.e(3111),n.e(6155),n.e(6588)]).then(n.bind(n,74207))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:()=>n.e(535).then(n.bind(n,5346))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>n.e(9466).then(n.bind(n,19466))},{id:"typst",name:"Typst",aliases:["typ"],import:()=>n.e(2013).then(n.bind(n,62013))},{id:"v",name:"V",import:()=>n.e(7525).then(n.bind(n,7525))},{id:"vala",name:"Vala",import:()=>n.e(9565).then(n.bind(n,59565))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>n.e(2179).then(n.bind(n,62179))},{id:"verilog",name:"Verilog",import:()=>n.e(4801).then(n.bind(n,34801))},{id:"vhdl",name:"VHDL",import:()=>n.e(7425).then(n.bind(n,37425))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>n.e(4539).then(n.bind(n,14539))},{id:"vue",name:"Vue",import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(5553)]).then(n.bind(n,45553))},{id:"vue-html",name:"Vue HTML",import:()=>Promise.all([n.e(2577),n.e(7021)]).then(n.bind(n,17021))},{id:"vue-vine",name:"Vue Vine",import:()=>Promise.all([n.e(2577),n.e(1290),n.e(3782),n.e(3111),n.e(1280),n.e(2160)]).then(n.bind(n,98110))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>n.e(1219).then(n.bind(n,21219))},{id:"wasm",name:"WebAssembly",import:()=>n.e(4275).then(n.bind(n,84275))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>n.e(5269).then(n.bind(n,65269))},{id:"wgsl",name:"WGSL",import:()=>n.e(4976).then(n.bind(n,44976))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>n.e(4370).then(n.bind(n,44370))},{id:"wit",name:"WebAssembly Interface Types",import:()=>n.e(624).then(n.bind(n,58243))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>n.e(7442).then(n.bind(n,6987))},{id:"xml",name:"XML",import:()=>Promise.all([n.e(6931),n.e(2278)]).then(n.bind(n,77040))},{id:"xsl",name:"XSL",import:()=>Promise.all([n.e(6931),n.e(3942)]).then(n.bind(n,3942))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>n.e(5518).then(n.bind(n,95518))},{id:"zenscript",name:"ZenScript",import:()=>n.e(2485).then(n.bind(n,92485))},{id:"zig",name:"Zig",import:()=>n.e(7041).then(n.bind(n,57041))}],b=Object.fromEntries(f.map(e=>[e.id,e.import])),y=Object.fromEntries(f.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),k={...b,...y},_=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>n.e(2812).then(n.bind(n,62812))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>n.e(7635).then(n.bind(n,27635))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>n.e(7884).then(n.bind(n,77884))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:()=>n.e(4358).then(n.bind(n,94358))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:()=>n.e(9005).then(n.bind(n,19005))},{id:"catppuccin-frappe",displayName:"Catppuccin Frapp\xe9",type:"dark",import:()=>n.e(1595).then(n.bind(n,51595))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>n.e(3979).then(n.bind(n,83979))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>n.e(9680).then(n.bind(n,59680))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>n.e(2107).then(n.bind(n,2107))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>n.e(5375).then(n.bind(n,75375))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>n.e(5136).then(n.bind(n,55136))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>n.e(4295).then(n.bind(n,4295))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>n.e(7258).then(n.bind(n,87258))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>n.e(9996).then(n.bind(n,49996))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>n.e(9224).then(n.bind(n,39224))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>n.e(6704).then(n.bind(n,86704))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>n.e(6927).then(n.bind(n,96927))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>n.e(5424).then(n.bind(n,15424))},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>n.e(3082).then(n.bind(n,23082))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>n.e(9382).then(n.bind(n,69382))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>n.e(2130).then(n.bind(n,32130))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>n.e(9666).then(n.bind(n,49666))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>n.e(392).then(n.bind(n,80392))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>n.e(9841).then(n.bind(n,49841))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>n.e(3492).then(n.bind(n,53492))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>n.e(214).then(n.bind(n,214))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>n.e(579).then(n.bind(n,60579))},{id:"horizon",displayName:"Horizon",type:"dark",import:()=>n.e(6311).then(n.bind(n,96311))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:()=>n.e(3526).then(n.bind(n,23526))},{id:"houston",displayName:"Houston",type:"dark",import:()=>n.e(7524).then(n.bind(n,7524))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>n.e(6563).then(n.bind(n,56563))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>n.e(6701).then(n.bind(n,26701))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>n.e(7785).then(n.bind(n,97785))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>n.e(9136).then(n.bind(n,19136))},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>n.e(2489).then(n.bind(n,82489))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>n.e(1247).then(n.bind(n,21247))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>n.e(6859).then(n.bind(n,76859))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>n.e(7921).then(n.bind(n,67921))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>n.e(6846).then(n.bind(n,96846))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>n.e(3074).then(n.bind(n,83074))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>n.e(9521).then(n.bind(n,89521))},{id:"min-light",displayName:"Min Light",type:"light",import:()=>n.e(6089).then(n.bind(n,6089))},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>n.e(5520).then(n.bind(n,15520))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>n.e(4969).then(n.bind(n,44969))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:()=>n.e(2954).then(n.bind(n,92954))},{id:"nord",displayName:"Nord",type:"dark",import:()=>n.e(5491).then(n.bind(n,5491))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>n.e(9615).then(n.bind(n,9615))},{id:"one-light",displayName:"One Light",type:"light",import:()=>n.e(7625).then(n.bind(n,67625))},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>n.e(1534).then(n.bind(n,21534))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>n.e(8430).then(n.bind(n,28430))},{id:"red",displayName:"Red",type:"dark",import:()=>n.e(8555).then(n.bind(n,48555))},{id:"rose-pine",displayName:"Ros\xe9 Pine",type:"dark",import:()=>n.e(7082).then(n.bind(n,87082))},{id:"rose-pine-dawn",displayName:"Ros\xe9 Pine Dawn",type:"light",import:()=>n.e(1583).then(n.bind(n,1583))},{id:"rose-pine-moon",displayName:"Ros\xe9 Pine Moon",type:"dark",import:()=>n.e(5750).then(n.bind(n,35750))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>n.e(7465).then(n.bind(n,17465))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>n.e(1898).then(n.bind(n,21898))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>n.e(7130).then(n.bind(n,67130))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>n.e(966).then(n.bind(n,966))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>n.e(1664).then(n.bind(n,31664))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>n.e(3286).then(n.bind(n,83286))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>n.e(4593).then(n.bind(n,94593))},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>n.e(9267).then(n.bind(n,39267))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>n.e(7889).then(n.bind(n,47889))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>n.e(5318).then(n.bind(n,55318))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>n.e(8656).then(n.bind(n,78656))}],w=Object.fromEntries(_.map(e=>[e.id,e.import]));var C=n(92619).Buffer,S=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function v(){return"u">typeof performance?performance.now():Date.now()}let x=(e,t)=>e+(t-e%t)%t;async function A(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}let a="u">typeof TextDecoder?new TextDecoder("utf8"):void 0;function s(e,t){return e?function(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&a)return a.decode(e.subarray(t,i));let s="";for(;t<i;){let n=e[t++];if(!(128&n)){s+=String.fromCharCode(n);continue}let r=63&e[t++];if((224&n)==192){s+=String.fromCharCode((31&n)<<6|r);continue}let i=63&e[t++];if((n=(240&n)==224?(15&n)<<12|r<<6|i:(7&n)<<18|r<<12|i<<6|63&e[t++])<65536)s+=String.fromCharCode(n);else{let e=n-65536;s+=String.fromCharCode(55296|e>>10,56320|1023&e)}}return s}(r.HEAPU8,e,t):""}let o={emscripten_get_now:v,emscripten_memcpy_big:function(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)},emscripten_resize_heap:function(e){let a=r.HEAPU8.length;if((e>>>=0)>0x80000000)return!1;for(let r=1;r<=4;r*=2){let s=a*(1+.2/r);if(s=Math.min(s,e+0x6000000),function(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}(Math.min(0x80000000,x(Math.max(e,s),65536))))return!0}return!1},fd_write:()=>0};async function l(){let n=await e({env:o,wasi_snapshot_preview1:o});i((t=n.memory).buffer),Object.assign(r,n),r.UTF8ToString=s}return await l(),r}var N=Object.defineProperty,E=(e,t,n)=>{let r;return(r="symbol"!=typeof t?t+"":t)in e?N(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n};let P=null;class L{constructor(e){E(this,"utf16Length"),E(this,"utf8Length"),E(this,"utf16Value"),E(this,"utf8Value"),E(this,"utf16OffsetToUtf8"),E(this,"utf8OffsetToUtf16");const t=e.length,n=L._utf8ByteLength(e),r=n!==t,i=r?new Uint32Array(t+1):null;r&&(i[t]=n);const a=r?new Uint32Array(n+1):null;r&&(a[n]=t);const s=new Uint8Array(n);let o=0;for(let n=0;n<t;n++){const l=e.charCodeAt(n);let c=l,u=!1;if(l>=55296&&l<=56319&&n+1<t){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(c=(l-55296<<10)+65536|t-56320,u=!0)}r&&(i[n]=o,u&&(i[n+1]=o),c<=127?a[o+0]=n:c<=2047?(a[o+0]=n,a[o+1]=n):c<=65535?(a[o+0]=n,a[o+1]=n,a[o+2]=n):(a[o+0]=n,a[o+1]=n,a[o+2]=n,a[o+3]=n)),c<=127?s[o++]=c:(c<=2047?s[o++]=192|(1984&c)>>>6:(c<=65535?s[o++]=224|(61440&c)>>>12:(s[o++]=240|(1835008&c)>>>18,s[o++]=128|(258048&c)>>>12),s[o++]=128|(4032&c)>>>6),s[o++]=128|(63&c)>>>0),u&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=s,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=a}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,s=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,s=!0)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,s&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}let T=class e{constructor(t){if(E(this,"id",++e.LAST_ID),E(this,"_onigBinding"),E(this,"content"),E(this,"utf16Length"),E(this,"utf8Length"),E(this,"utf16OffsetToUtf8"),E(this,"utf8OffsetToUtf16"),E(this,"ptr"),!P)throw new S("Must invoke loadWasm first.");this._onigBinding=P,this.content=t;const n=new L(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||(e._sharedPtr=P.omalloc(1e4)),e._sharedPtrInUse=!0,P.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(P)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};E(T,"LAST_ID",0),E(T,"_sharedPtr",0),E(T,"_sharedPtrInUse",!1);class I{constructor(e){if(E(this,"_onigBinding"),E(this,"_ptr"),!P)throw new S("Must invoke loadWasm first.");const t=[],n=[];for(let r=0,i=e.length;r<i;r++){const i=new L(e[r]);t[r]=i.createString(P),n[r]=i.utf8Length}const r=P.omalloc(4*e.length);P.HEAPU32.set(t,r/4);const i=P.omalloc(4*e.length);P.HEAPU32.set(n,i/4);const a=P.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)P.ofree(t[n]);P.ofree(i),P.ofree(r),0===a&&function(e){throw new S(e.UTF8ToString(e.getLastOnigError()))}(P),this._onigBinding=P,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if("number"==typeof n&&(r=n),"string"==typeof e){e=new T(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(0===a)return null;let s=i.HEAPU32,o=a/4,l=s[o++],c=s[o++],u=[];for(let t=0;t<c;t++){let n=e.convertUtf8OffsetToUtf16(s[o++]),r=e.convertUtf8OffsetToUtf16(s[o++]);u[t]={start:n,end:r,length:r-n}}return{index:l,captureIndices:u}}}function $(e){return r||(r=async function(){P=await A(async t=>{let n=e;if("function"==typeof(n=await n)&&(n=await n(t)),"function"==typeof n&&(n=await n(t)),"function"==typeof n.instantiator)n=await n.instantiator(t);else if("function"==typeof n.default)n=await n.default(t);else{var r,i,a,s;if(void 0!==n.data&&(n=n.data),r=n,"u">typeof Response&&r instanceof Response){n="function"==typeof WebAssembly.instantiateStreaming?await (a=n,e=>WebAssembly.instantiateStreaming(a,e))(t):await (s=n,async e=>{let t=await s.arrayBuffer();return WebAssembly.instantiate(t,e)})(t)}else(i=n,"u">typeof ArrayBuffer&&(i instanceof ArrayBuffer||ArrayBuffer.isView(i))||void 0!==C&&C.isBuffer?.(i)||"u">typeof SharedArrayBuffer&&i instanceof SharedArrayBuffer||"u">typeof Uint32Array&&i instanceof Uint32Array||n instanceof WebAssembly.Module)?n=await R(n)(t):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await R(n.default)(t))}return"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}())}function R(e){return t=>WebAssembly.instantiate(e,t)}function M(e){i=e}function G(){return i}async function O(e){return e&&await $(e),{createScanner:e=>new I(e.map(e=>"string"==typeof e?e:e.source)),createString:e=>new T(e)}}var B=p({});g(B,l);var D=class extends Error{constructor(e){super(e),this.name="ShikiError"}},F=n(41463);function U(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}var j=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,W=class{static hasCaptures(e){return null!==e&&(j.lastIndex=0,j.test(e))}static replaceCaptures(e,t,n){return e.replace(j,(e,r,i,a)=>{let s=n[parseInt(r||i,10)];if(!s)return e;{let e=t.substring(s.start,s.end);for(;"."===e[0];)e=e.substring(1);switch(a){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function H(e,t){if(null===e&&null===t)return 0;if(!e)return -1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){var i,a;let n=(i=e[r],i<(a=t[r])?-1:+(i>a));if(0!==n)return n}return 0}return n-r}function q(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function z(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var V=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},X=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(function(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i,a=t[e];if(!a.settings)continue;if("string"==typeof a.scope){let e=a.scope;i=(e=(e=e.replace(/^[,]+/,"")).replace(/[,]+$/,"")).split(",")}else i=Array.isArray(a.scope)?a.scope:[""];let s=-1;if("string"==typeof a.settings.fontStyle){s=0;let e=a.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++)switch(e[t]){case"italic":s|=1;break;case"bold":s|=2;break;case"underline":s|=4;break;case"strikethrough":s|=8}}let o=null;"string"==typeof a.settings.foreground&&q(a.settings.foreground)&&(o=a.settings.foreground);let l=null;"string"==typeof a.settings.background&&q(a.settings.background)&&(l=a.settings.background);for(let t=0,a=i.length;t<a;t++){let a=i[t].trim().split(" "),c=a[a.length-1],u=null;a.length>1&&(u=a.slice(0,a.length-1)).reverse(),n[r++]=new Z(c,u,e,s,o,l)}}return n}(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort((e,t)=>{var n,r;let i=(n=e.scope,n<(r=t.scope)?-1:+(n>r));return 0!==i||0!==(i=H(e.parentScopes,t.parentScopes))?i:e.index-t.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(r=t.foreground),null!==t.background&&(i=t.background)}let a=new Y(t),s=new J(n,a.getId(r),a.getId(i)),o=new en(new et(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];o.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new X(a,s,o)}(e,t)}_cachedMatchRoot=new V(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>(function(e,t){if(0===t.length)return!0;for(let i=0;i<t.length;i++){var n,r;let a=t[i],s=!1;if(">"===a){if(i===t.length-1)return!1;a=t[++i],s=!0}for(;e&&(n=e.scopeName,!((r=a)===n||n.startsWith(r)&&"."===n[r.length]));){if(s)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0})(e.parent,t.parentScopes));return n?new J(n.fontStyle,n.foreground,n.background):null}},Q=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e||null!==this.parent&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}},J=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}},Z=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},K=((s=K||{})[s.NotSet=-1]="NotSet",s[s.None=0]="None",s[s.Italic=1]="Italic",s[s.Bold=2]="Bold",s[s.Underline=4]="Underline",s[s.Strikethrough=8]="Strikethrough",s),Y=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},ee=Object.freeze([]),et=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||ee,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==r&&(this.background=r)}},en=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;">"===e.parentScopes[n]&&n++,">"===t.parentScopes[r]&&r++,!(n>=e.parentScopes.length)&&!(r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(0!==i)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,n,r=t.indexOf(".");if(-1===r?(e=t,n=""):(e=t.substring(0,r),n=t.substring(r+1)),this._children.hasOwnProperty(e))return this._children[e].match(n)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,s){let o,l,c;if(""===n)return void this._doInsertHere(t,r,i,a,s);let u=n.indexOf(".");-1===u?(o=n,l=""):(o=n.substring(0,u),l=n.substring(u+1)),this._children.hasOwnProperty(o)?c=this._children[o]:(c=new e(this._mainRule.clone(),et.cloneArr(this._rulesWithParentScopes)),this._children[o]=c),c.insert(t+1,l,r,i,a,s)}_doInsertHere(e,t,n,r,i){if(null===t)return void this._mainRule.acceptOverwrite(e,n,r,i);for(let a=0,s=this._rulesWithParentScopes.length;a<s;a++){let s=this._rulesWithParentScopes[a];if(0===H(s.parentScopes,t))return void s.acceptOverwrite(e,n,r,i)}-1===n&&(n=this._mainRule.fontStyle),0===r&&(r=this._mainRule.foreground),0===i&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new et(e,t,n,r,i))}},er=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:e.getForeground(t),background:e.getBackground(t)})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return(1024&e)!=0}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(0xff8000&e)>>>15}static getBackground(e){return(0xff000000&e)>>>24}static set(t,n,r,i,a,s,o){let l=e.getLanguageId(t),c=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),h=e.getForeground(t),p=e.getBackground(t);return 0!==n&&(l=n),8!==r&&(c=r),null!==i&&(u=+!!i),-1!==a&&(d=a),0!==s&&(h=s),0!==o&&(p=o),(l|c<<8|u<<10|d<<11|h<<15|p<<24)>>>0}};function ei(e,t){var n;let r,i,a=[],s=(n=e,i=(r=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g).exec(n),{next:()=>{if(!i)return null;let e=i[0];return i=r.exec(n),e}}),o=s.next();for(;null!==o;){let e=0;if(2===o.length&&":"===o.charAt(1)){switch(o.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=s.next()}let t=c();if(a.push({matcher:t,priority:e}),","!==o)break;o=s.next()}return a;function l(){if("-"===o){o=s.next();let e=l();return t=>!!e&&!e(t)}if("("===o){o=s.next();let e=function(){let e=[],t=c();for(;t&&(e.push(t),"|"===o||","===o);){do o=s.next();while("|"===o||","===o);t=c()}return t=>e.some(e=>e(t))}();return")"===o&&(o=s.next()),e}if(ea(o)){let e=[];do e.push(o),o=s.next();while(ea(o));return n=>t(e,n)}return null}function c(){let e=[],t=l();for(;t;)e.push(t),t=l();return t=>e.every(e=>e(t))}}function ea(e){return!!e&&!!e.match(/[\w\.:]+/)}var es=((o=es||{})[o.None=0]="None",o[o.NotBeginString=1]="NotBeginString",o[o.NotEndString=2]="NotEndString",o[o.NotBeginPosition=4]="NotBeginPosition",o[o.DebugCall=8]="DebugCall",o);function eo(e){"function"==typeof e.dispose&&e.dispose()}var el=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},ec=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},eu=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},ed=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new el(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new eu;for(let n of e)!function(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof el?ep({baseGrammar:a,selfGrammar:i},r):eh(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let s=n.injections(e.scopeName);if(s)for(let e of s)r.add(new el(e))}(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof el){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function eh(e,t,n){t.repository&&t.repository[e]&&em([t.repository[e]],t,n)}function ep(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&em(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&em(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function em(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?U({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&em(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=e_(i);switch(a.kind){case 0:ep({...t,selfGrammar:t.baseGrammar},n);break;case 1:ep(t,n);break;case 2:eh(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let s=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(s){let r={baseGrammar:t.baseGrammar,selfGrammar:s,repository:e};4===a.kind?eh(a.ruleName,r,n):ep(r,n)}else 4===a.kind?n.add(new ec(a.scopeName,a.ruleName)):n.add(new el(a.scopeName))}}}var eg=class{kind=0},ef=class{kind=1},eb=class{constructor(e){this.ruleName=e}kind=2},ey=class{constructor(e){this.scopeName=e}kind=3},ek=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function e_(e){if("$base"===e)return new eg;if("$self"===e)return new ef;let t=e.indexOf("#");return -1===t?new ey(e):0===t?new eb(e.substring(1)):new ek(e.substring(0,t),e.substring(t+1))}var ew=/\\(\d+)/,eC=/\\(\d+)/g;Symbol("RuleId");var eS=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=W.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=W.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${function e(t){let n=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===n?t:~n==t.length-1?e(t.substring(0,t.length-1)):t.substr(~n+1)}(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?W.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?W.replaceCaptures(this._contentName,e,t):this._contentName}},ev=class extends eS{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error("Not supported!")}compile(e,t){throw Error("Not supported!")}compileAG(e,t,n,r){throw Error("Not supported!")}},ex=class extends eS{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new eL(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new eT,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},eA=class extends eS{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new eT,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},eN=class extends eS{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,s,o,l,c){super(e,t,n,r),this._begin=new eL(i,this.id),this.beginCaptures=a,this._end=new eL(s||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=o,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){for(let t of(this._cachedCompiledPatterns=new eT,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},eE=class extends eS{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,s,o,l){super(e,t,n,r),this._begin=new eL(i,this.id),this.beginCaptures=a,this.whileCaptures=o,this._while=new eL(s,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns)for(let t of(this._cachedCompiledPatterns=new eT,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new eT,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},eP=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new ev(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new ex(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(void 0===t.begin){t.repository&&(r=U({},r,t.repository));let i=t.patterns;return void 0===i&&t.include&&(i=[{include:t.include}]),new eA(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new eE(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new eN(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if("$vscodeTextmateLocation"===e)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if("$vscodeTextmateLocation"===a)continue;let s=parseInt(a,10),o=0;t[a].patterns&&(o=e.getCompiledRuleId(t[a],n,r)),i[s]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,o)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,s=t.length;a<s;a++){let s=t[a],o=-1;if(s.include){let t=e_(s.include);switch(t.kind){case 0:case 1:o=e.getCompiledRuleId(r[s.include],n,r);break;case 2:let i=r[t.ruleName];i&&(o=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,l=4===t.kind?t.ruleName:null,c=n.getExternalGrammar(a,r);if(c)if(l){let t=c.repository[l];t&&(o=e.getCompiledRuleId(t,n,c.repository))}else o=e.getCompiledRuleId(c.repository.$self,n,c.repository)}}else o=e.getCompiledRuleId(s,n,r);if(-1!==o){let e=n.getRule(o),t=!1;if((e instanceof eA||e instanceof eN||e instanceof eE)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;i.push(o)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},eL=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&"string"==typeof e){const t=e.length;let n=0,r=[],i=!1;for(let a=0;a<t;a++)if("\\"===e.charAt(a)&&a+1<t){const t=e.charAt(a+1);"z"===t?(r.push(e.substring(n,a)),r.push("$(?!\\n)(?<!\\n)"),n=a+2):("A"===t||"G"===t)&&(i=!0),a++}this.hasAnchor=i,0===n?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,"string"==typeof this.source?this.hasBackReferences=ew.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let n=t.map(t=>e.substring(t.start,t.end));return eC.lastIndex=0,this.source.replace(eC,(e,t)=>z(n[parseInt(t,10)]||""))}_buildAnchorCache(){let e,t,n,r;if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let i=[],a=[],s=[],o=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),i[e]=n,a[e]=n,s[e]=n,o[e]=n,"\\"===n&&e+1<t&&("A"===(r=this.source.charAt(e+1))?(i[e+1]="￿",a[e+1]="￿",s[e+1]="A",o[e+1]="A"):"G"===r?(i[e+1]="￿",a[e+1]="G",s[e+1]="￿",o[e+1]="G"):(i[e+1]=r,a[e+1]=r,s[e+1]=r,o[e+1]=r),e++);return{A0_G0:i.join(""),A0_G1:a.join(""),A1_G0:s.join(""),A1_G1:o.join("")}}resolveAnchors(e,t){if(!this.hasAnchor||!this._anchorCache||"string"!=typeof this.source)return this.source;if(e)if(t)return this._anchorCache.A1_G1;else return this._anchorCache.A1_G0;return t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},eT=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new eI(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){if(!this._hasAnchors)return this.compile(e);if(t)if(n)return this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1;else return this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0;return n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0)}_resolveAnchors(e,t,n){return new eI(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},eI=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},e$=class{constructor(e,t){this.languageId=e,this.tokenType=t}},eR=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new e$(e,8),this._embeddedLanguagesMatcher=new eM(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return null===t?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new e$(0,0);_getBasicScopeAttributes=new V(e=>new e$(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},eM=class{values;scopesRegExp;constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([e,t])=>z(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};void 0!==F&&F.env.VSCODE_TEXTMATE_DEBUG;var eG=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function eO(e,t,n,r,i,a,s,o){let l=t.content.length,c=!1,u=-1;if(s){let s=function(e,t,n,r,i,a){let s=i.beginRuleCapturedEOL?0:-1,o=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof eE&&o.push({rule:n,stack:t})}for(let p=o.pop();p;p=o.pop()){var l,c,u,d,h;let{ruleScanner:o,findOptions:m}=(l=p.rule,c=e,u=p.stack.endRule,d=n,h=r===s,{ruleScanner:l.compileWhileAG(c,u,d,h),findOptions:0}),g=o.findNextMatchSync(t,r,m);if(g){if(-2!==g.ruleId){i=p.stack.pop();break}g.captureIndices&&g.captureIndices.length&&(a.produce(p.stack,g.captureIndices[0].start),eD(e,t,n,p.stack,a,p.rule.whileCaptures,g.captureIndices),a.produce(p.stack,g.captureIndices[0].end),s=g.captureIndices[0].end,g.captureIndices[0].end>r&&(r=g.captureIndices[0].end,n=!1))}else{i=p.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:s,isFirstLine:n}}(e,t,n,r,i,a);i=s.stack,r=s.linePos,n=s.isFirstLine,u=s.anchorPosition}let d=Date.now();for(;!c;){if(0!==o&&Date.now()-d>o)return new eG(i,!0);!function(){let s=function(e,t,n,r,i,a){let s=function(e,t,n,r,i,a){let{ruleScanner:s,findOptions:o}=eB(i.getRule(e),e,i.endRule,n,r===a),l=s.findNextMatchSync(t,r,o);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}(e,t,n,r,i,a),o=e.getInjections();if(0===o.length)return s;let l=function(e,t,n,r,i,a,s){let o,l=Number.MAX_VALUE,c=null,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,h=e.length;a<h;a++){let h=e[a];if(!h.matcher(d))continue;let{ruleScanner:p,findOptions:m}=eB(t.getRule(h.ruleId),t,null,r,i===s),g=p.findNextMatchSync(n,i,m);if(!g)continue;let f=g.captureIndices[0].start;if(!(f>=l)&&(l=f,c=g.captureIndices,o=g.ruleId,u=h.priority,l===i))break}return c?{priorityMatch:-1===u,captureIndices:c,matchedRuleId:o}:null}(o,e,t,n,r,i,a);if(!l)return s;if(!s)return l;let c=s.captureIndices[0].start,u=l.captureIndices[0].start;return u<c||l.priorityMatch&&u===c?l:s}(e,t,n,r,i,u);if(!s){a.produce(i,l),c=!0;return}let o=s.captureIndices,d=s.matchedRuleId,h=!!o&&o.length>0&&o[0].end>r;if(-1===d){let s=i.getRule(e);a.produce(i,o[0].start),i=i.withContentNameScopesList(i.nameScopesList),eD(e,t,n,i,a,s.endCaptures,o),a.produce(i,o[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!h&&d.getEnterPos()===r){i=d,a.produce(i,l),c=!0;return}}else{let s=e.getRule(d);a.produce(i,o[0].start);let p=i,m=s.getName(t.content,o),g=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,o[0].end===l,null,g,g),s instanceof eN){eD(e,t,n,i,a,s.beginCaptures,o),a.produce(i,o[0].end),u=o[0].end;let r=s.getContentName(t.content,o),d=g.pushAttributed(r,e);if(i=i.withContentNameScopesList(d),s.endHasBackReferences&&(i=i.withEndRule(s.getEndWithResolvedBackReferences(t.content,o))),!h&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,l),c=!0;return}}else if(s instanceof eE){eD(e,t,n,i,a,s.beginCaptures,o),a.produce(i,o[0].end),u=o[0].end;let r=s.getContentName(t.content,o),d=g.pushAttributed(r,e);if(i=i.withContentNameScopesList(d),s.whileHasBackReferences&&(i=i.withEndRule(s.getWhileWithResolvedBackReferences(t.content,o))),!h&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,l),c=!0;return}}else if(eD(e,t,n,i,a,s.captures,o),a.produce(i,o[0].end),i=i.pop(),!h){i=i.safePop(),a.produce(i,l),c=!0;return}}o[0].end>r&&(r=o[0].end,n=!1)}()}return new eG(i,!1)}function eB(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function eD(e,t,n,r,i,a,s){if(0===a.length)return;let o=t.content,l=Math.min(a.length,s.length),c=[],u=s[0].end;for(let t=0;t<l;t++){let l=a[t];if(null===l)continue;let d=s[t];if(0===d.length)continue;if(d.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=d.start;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?i.produceFromScopes(c[c.length-1].scopes,d.start):i.produce(r,d.start),l.retokenizeCapturedWithRuleId){let t=l.getName(o,s),a=r.contentNameScopesList.pushAttributed(t,e),c=l.getContentName(o,s),u=a.pushAttributed(c,e),h=r.push(l.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(o.substring(0,d.end));eO(e,p,n&&0===d.start,d.start,h,i,!1,0),eo(p);continue}let h=l.getName(o,s);if(null!==h){let t=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(h,e);c.push(new eF(t,d.end))}}for(;c.length>0;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var eF=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function eU(e,t,n,r,i){let a=ei(t,ej),s=eP.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:s,grammar:i,priority:n.priority})}function ej(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(function(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}(t[r],e))return n=r+1,!0;return!1})}var eW=class{constructor(e,t,n,r,i,a,s,o){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=o,this._basicScopeAttributesProvider=new eR(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=eH(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const e of Object.keys(i))for(const t of ei(e,ej))this._tokenTypeMatchers.push({matcher:t.matcher,type:i[e]})}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e=[],t=this._rootScopeName,n=({lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)}).lookup(t);if(n){let r=n.injections;if(r)for(let t in r)eU(e,t,r[t],this,n);let i=this._grammarRepository.injections(t);i&&i.forEach(t=>{let n=this.getExternalGrammar(t);if(n){let t=n.injectionSelector;t&&eU(e,t,n,this,n)}})}return e.sort((e,t)=>e.priority-t.priority),e}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=eH(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){let i;if(-1===this._rootId&&(this._rootId=eP.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==ez.NULL)i=!1,t.reset();else{let e;i=!0;let n=this._basicScopeAttributesProvider.getDefaultAttributes(),r=this.themeProvider.getDefaults(),a=er.set(0,n.languageId,n.tokenType,null,r.fontStyle,r.foregroundId,r.backgroundId),s=this.getRule(this._rootId).getName(null,null);e=s?eq.createRootAndLookUpScopeName(s,a,this):eq.createRoot("unknown",a),t=new ez(null,this._rootId,-1,-1,!1,null,e,e)}e+="\n";let a=this.createOnigString(e),s=a.content.length,o=new eX(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=eO(this,a,i,0,t,o,!0,r);return eo(a),{lineLength:s,lineTokens:o,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function eH(e,t){return(e=function e(t){return Array.isArray(t)?function(t){let n=[];for(let r=0,i=t.length;r<i;r++)n[r]=e(t[r]);return n}(t):t instanceof RegExp?t:"object"==typeof t?function(t){let n={};for(let r in t)n[r]=e(t[r]);return n}(t):t}(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var eq=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)r=new e(r,i=Q.push(i,t.scopeNames),t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Q(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Q(null,t),s=r.themeProvider.themeMatch(a),o=e.mergeAttributes(n,i,s);return new e(null,a,o)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return e.equals(this,t)}static equals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return null!==n&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),er.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),s=r.themeProvider.themeMatch(a),o=e.mergeAttributes(t.tokenAttributes,i,s);return new e(t,a,o)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},ez=class e{constructor(e,t,n,r,i,a,s,o){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=s,this.contentNameScopesList=o,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return null!==t&&e._equals(this,t)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&eq.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,s,o){return new e(this,t,n,r,i,a,s,o)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=eq.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,eq.fromExtension(r,n.contentNameScopesList))}},eV=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):ei(e,ej).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>ei(e,ej).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},eX=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=er.set(n,0,e.type,null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=er.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},eQ=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,new eW(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},eJ=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new eQ(X.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(X.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new eV(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new ed(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},eZ=ez.NULL;function eK(e,t){let n="string"==typeof e?{}:{...e.colorReplacements},r="string"==typeof e?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))"string"==typeof i?n[e]=i:e===r&&Object.assign(n,i);return n}function eY(e,t){return e&&t?.[e?.toLowerCase()]||e}function e0(e){return Array.isArray(e)?e:[e]}async function e1(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function e2(e){return!e||["plaintext","txt","text","plain"].includes(e)}function e3(e){return"ansi"===e||e2(e)}function e5(e){return"none"===e}function e8(e){return e5(e)}let e6=/(\r?\n)/g;function e7(e,t=!1){if(0===e.length)return[["",0]];let n=e.split(e6),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||""):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}let e4="__shiki_resolved";function e9(e){if(e?.[e4])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r="light"===t.type?"#333333":"#bbbbbb"),n||(n="light"===t.type?"#fffffe":"#1e1e1e"),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function s(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?s(e):(a.set(e,n),n)}for(let e of(t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith("#"),r=e.settings?.background&&!e.settings.background.startsWith("#");if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=s(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=s(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i}),Object.keys(t.colors||{})))if(("editor.foreground"===e||"editor.background"===e||e.startsWith("terminal.ansi"))&&!t.colors[e]?.startsWith("#")){let n=s(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,e4,{enumerable:!1,writable:!1,value:!0}),t}async function te(e){return[...new Set((await Promise.all(e.filter(e=>!e3(e)).map(async e=>await e1(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function tt(e){return(await Promise.all(e.map(async e=>e5(e)?null:e9(await e1(e))))).filter(e=>!!e)}function tn(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new D(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var tr=class extends eJ{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return"string"==typeof e?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=e9(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=X.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=tn(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>!!t&&(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e))).filter(e=>!n.includes(e));throw new D(`Missing languages ${n.map(([e])=>`\`${e}\``).join(", ")}, required by ${e.map(([e])=>`\`${e}\``).join(", ")}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},ti=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split("."),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(".");n=[...n,...this._injections.get(r)||[]]}return n}};let ta=0;function ts(e){let t;ta+=1,!1!==e.warnings&&ta>=10&&ta%10==0&&console.warn(`[Shiki] ${ta} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let n=!1;if(!e.engine)throw new D("`engine` option is required for synchronous mode");let r=(e.langs||[]).flat(1),i=(e.themes||[]).flat(1).map(e9),a=new tr(new ti(e.engine,r),i,r,e.langAlias);function s(e){if("none"===e)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};c();let t=a.getTheme(e);if(!t)throw new D(`Theme \`${e}\` not found, you may need to load it first`);return t}function o(...e){c(),a.loadLanguages(e.flat(1))}function l(...e){for(let t of(c(),e.flat(1)))a.loadTheme(t)}function c(){if(n)throw new D("Shiki instance has been disposed")}function u(){n||(n=!0,a.dispose(),ta-=1)}return{setTheme:function(e){c();let n=s(e);return t!==e&&(a.setTheme(n),t=e),{theme:n,colorMap:a.getColorMap()}},getTheme:s,getLanguage:function(e){c();let t=a.getGrammar("string"==typeof e?e:e.name);if(!t)throw new D(`Language \`${e}\` not found, you may need to load it first`);return t},getLoadedThemes:function(){return c(),a.getLoadedThemes()},getLoadedLanguages:function(){return c(),a.getLoadedLanguages()},resolveLangAlias:function(t){return tn(t,e.langAlias)},loadLanguage:async function(...e){return o(await te(e))},loadLanguageSync:o,loadTheme:async function(...e){return c(),l(await tt(e))},loadThemeSync:l,dispose:u,[Symbol.dispose]:u}}let to=ts;async function tl(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([tt(e.themes||[]),te(e.langs||[]),e.engine]);return ts({...e,themes:t,langs:n,engine:r})}let tc=tl,tu=new WeakMap;function td(e,t){tu.set(e,t)}function th(e){return tu.get(e)}var tp=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(e0(n).map(e=>[e,eZ])),t)}constructor(...e){if(2===e.length){const[t,n]=e;this.lang=n,this._stacks=t}else{const[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){var t;let n,r;return t=this._stacks[e],n=[],r=new Set,!function e(t){if(r.has(t))return;r.add(t);let i=t?.nameScopesList?.scopeName;i&&n.push(i),t.parent&&e(t.parent)}(t),n}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};let tm=/,/,tg=/ /;function tf(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(e2(e.resolveLangAlias(n.lang||"text"))||e5(r))return e7(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),s=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==s.name)throw new D(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(i.name))throw new D(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return ty(t,s,i,a,n)}function tb(...e){if(2===e.length)return th(e[1]);let[t,n,r={}]=e,{lang:i="text",theme:a=t.getLoadedThemes()[0]}=r;if(e2(i)||e5(a))throw new D("Plain language does not have grammar state");if("ansi"===i)throw new D("ANSI language does not have grammar state");let{theme:s,colorMap:o}=t.setTheme(a),l=t.getLanguage(i);return new tp(tk(n,l,s,o,r).stateStack,l.name,s.name)}function ty(e,t,n,r,i){let a=tk(e,t,n,r,i),s=new tp(a.stateStack,t.name,n.name);return td(a.tokens,s),a.tokens}function tk(e,t,n,r,i){let a=eK(n,i),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:o=500}=i,l=e7(e),c=i.grammarState?function(e,t){if(!(e instanceof tp))throw new D("Invalid grammar state");return e.getInternalStack(t)}(i.grammarState,n.name)??eZ:null!=i.grammarContextCode?tk(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:eZ,u=[],d=[];for(let e=0,h=l.length;e<h;e++){let h,p,[m,g]=l[e];if(""===m){u=[],d.push([]);continue}if(s>0&&m.length>=s){u=[],d.push([{content:m,offset:g,color:"",fontStyle:0}]);continue}i.includeExplanation&&(h=t.tokenizeLine(m,c,o).tokens,p=0);let f=t.tokenizeLine2(m,c,o),b=f.tokens.length/2;for(let e=0;e<b;e++){let t=f.tokens[2*e],s=e+1<b?f.tokens[2*e+2]:m.length;if(t===s)continue;let o=f.tokens[2*e+1],l=eY(r[er.getForeground(o)],a),c=er.getFontStyle(o),d={content:m.substring(t,s),offset:g+t,color:l,fontStyle:c};if(i.includeExplanation){let e=[];if("scopeName"!==i.includeExplanation)for(let t of n.settings){let n;switch(typeof t.scope){case"string":n=t.scope.split(tm).map(e=>e.trim());break;case"object":n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(tg))})}d.explanation=[];let r=0;for(;t+r<s;){let t=h[p],n=m.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:"scopeName"===i.includeExplanation?t.scopes.map(e=>({scopeName:e})):function(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:function(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(function(e,t,n){if(!t_(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)t_(e[r],n[i])&&(r-=1),i-=1;return -1===r}(e,t,n)){r.push(a);break}return r}(e,i,t.slice(0,r))}}return n}(e,t.scopes)}),p+=1}}u.push(d)}d.push(u),u=[],c=f.ruleStack}return{tokens:d,stateStack:c}}function t_(e,t){return e===t||t.substring(0,e.length)===e&&"."===t[e.length]}function tw(e,t,n,r=tf){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:th(a),theme:"string"==typeof i.theme?i.theme:i.theme.name}}),s=function(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let s=i.map(()=>0),o=i.map(e=>e[0]);for(;o.every(e=>e);){let e=Math.min(...o.map(e=>e.content.length));for(let t=0;t<n;t++){let n=o[t];n.content.length===e?(a[t].push(n),s[t]+=1,o[t]=i[t][s[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),o[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}(...a.map(e=>e.tokens)),o=s[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return"includeExplanation"in n&&n.includeExplanation&&(a.explanation=e.explanation),s.forEach((e,n)=>{let{content:s,explanation:o,offset:l,...c}=e[t][r];a.variants[i[n].color]=c}),a})),l=a[0].state?new tp(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return l&&td(o,l),o}var tC=n(51640),tS=n(4918),tv=n(27629);let tx=/["&'<>`]/g,tA=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,tN=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,tE=/[|\\{}()[\]^$+*?.]/g,tP=new WeakMap,tL=/[\dA-Fa-f]/,tT=/\d/,tI=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],t$={nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},tR=["cent","copy","divide","gt","lt","not","para","times"],tM={}.hasOwnProperty,tG={};for(a in t$)tM.call(t$,a)&&(tG[t$[a]]=a);let tO=/[^\dA-Za-z]/;function tB(e,t,n){var r,i;let a,s,o=(r=n.omitOptionalSemicolons,a="&#x"+e.toString(16).toUpperCase(),r&&t&&!tL.test(String.fromCharCode(t))?a:a+";");if((n.useNamedReferences||n.useShortestReferences)&&(s=function(e,t,n,r){let i=String.fromCharCode(e);if(tM.call(tG,i)){let e=tG[i],a="&"+e;return n&&tI.includes(e)&&!tR.includes(e)&&(!r||t&&61!==t&&tO.test(String.fromCharCode(t)))?a:a+";"}return""}(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!s)&&n.useShortestReferences){let r,a=(i=n.omitOptionalSemicolons,r="&#"+String(e),i&&t&&!tT.test(String.fromCharCode(t))?r:r+";");a.length<o.length&&(o=a)}return s&&(!n.useShortestReferences||s.length<o.length)?s:o}function tD(e,t){let n;var r,i=e,a=Object.assign({format:tB},t);if(i=i.replace(a.subset?(r=a.subset,(n=tP.get(r))||(n=function(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(tE,"\\$&"));return RegExp("(?:"+t.join("|")+")","g")}(r),tP.set(r,n)),n):tx,s),a.subset||a.escapeOnly)return i;return i.replace(tA,function(e,t,n){return a.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,n.charCodeAt(t+2),a)}).replace(tN,s);function s(e,t,n){return a.format(e.charCodeAt(0),n.charCodeAt(t+1),a)}}let tF=/^>|^->|<!--|-->|--!>|<!-$/g,tU=[">"],tj=["<",">"];var tW=n(49884),tH=n(86994),tq=n(38609),tz=n(51705),tV=n(36887);let tX=tZ(1),tQ=tZ(-1),tJ=[];function tZ(e){return function(t,n,r){let i=t?t.children:tJ,a=(n||0)+e,s=i[a];if(!r)for(;s&&(0,tV.m)(s);)a+=e,s=i[a];return s}}let tK={}.hasOwnProperty;function tY(e){return function(t,n,r){return tK.call(e,t.tagName)&&e[t.tagName](t,n,r)}}let t0=tY({body:function(e,t,n){let r=tX(n,t);return!r||"comment"!==r.type},caption:t1,colgroup:t1,dd:function(e,t,n){let r=tX(n,t);return!r||"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName)},dt:function(e,t,n){let r=tX(n,t);return!!(r&&"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName))},head:t1,html:function(e,t,n){let r=tX(n,t);return!r||"comment"!==r.type},li:function(e,t,n){let r=tX(n,t);return!r||"element"===r.type&&"li"===r.tagName},optgroup:function(e,t,n){let r=tX(n,t);return!r||"element"===r.type&&"optgroup"===r.tagName},option:function(e,t,n){let r=tX(n,t);return!r||"element"===r.type&&("option"===r.tagName||"optgroup"===r.tagName)},p:function(e,t,n){let r=tX(n,t);return r?"element"===r.type&&("address"===r.tagName||"article"===r.tagName||"aside"===r.tagName||"blockquote"===r.tagName||"details"===r.tagName||"div"===r.tagName||"dl"===r.tagName||"fieldset"===r.tagName||"figcaption"===r.tagName||"figure"===r.tagName||"footer"===r.tagName||"form"===r.tagName||"h1"===r.tagName||"h2"===r.tagName||"h3"===r.tagName||"h4"===r.tagName||"h5"===r.tagName||"h6"===r.tagName||"header"===r.tagName||"hgroup"===r.tagName||"hr"===r.tagName||"main"===r.tagName||"menu"===r.tagName||"nav"===r.tagName||"ol"===r.tagName||"p"===r.tagName||"pre"===r.tagName||"section"===r.tagName||"table"===r.tagName||"ul"===r.tagName):!n||"element"!==n.type||"a"!==n.tagName&&"audio"!==n.tagName&&"del"!==n.tagName&&"ins"!==n.tagName&&"map"!==n.tagName&&"noscript"!==n.tagName&&"video"!==n.tagName},rp:t2,rt:t2,tbody:function(e,t,n){let r=tX(n,t);return!r||"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName)},td:t3,tfoot:function(e,t,n){return!tX(n,t)},th:t3,thead:function(e,t,n){let r=tX(n,t);return!!(r&&"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName))},tr:function(e,t,n){let r=tX(n,t);return!r||"element"===r.type&&"tr"===r.tagName}});function t1(e,t,n){let r=tX(n,t,!0);return!r||"comment"!==r.type&&!("text"===r.type&&(0,tV.m)(r.value.charAt(0)))}function t2(e,t,n){let r=tX(n,t);return!r||"element"===r.type&&("rp"===r.tagName||"rt"===r.tagName)}function t3(e,t,n){let r=tX(n,t);return!r||"element"===r.type&&("td"===r.tagName||"th"===r.tagName)}let t5=tY({body:function(e){let t=tX(e,-1,!0);return!t||"comment"!==t.type&&!("text"===t.type&&(0,tV.m)(t.value.charAt(0)))&&("element"!==t.type||"meta"!==t.tagName&&"link"!==t.tagName&&"script"!==t.tagName&&"style"!==t.tagName&&"template"!==t.tagName)},colgroup:function(e,t,n){let r=tQ(n,t),i=tX(e,-1,!0);return!(n&&r&&"element"===r.type&&"colgroup"===r.tagName&&t0(r,n.children.indexOf(r),n))&&!!(i&&"element"===i.type&&"col"===i.tagName)},head:function(e){let t=new Set;for(let n of e.children)if("element"===n.type&&("base"===n.tagName||"title"===n.tagName)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||"element"===n.type},html:function(e){let t=tX(e,-1);return!t||"comment"!==t.type},tbody:function(e,t,n){let r=tQ(n,t),i=tX(e,-1);return!(n&&r&&"element"===r.type&&("thead"===r.tagName||"tbody"===r.tagName)&&t0(r,n.children.indexOf(r),n))&&!!(i&&"element"===i.type&&"tr"===i.tagName)}}),t8={name:[[" \n\f\r &/=>".split("")," \n\f\r \"&'/=>`".split("")],["\0 \n\f\r \"&'/<=>".split(""),"\0 \n\f\r \"&'/<=>`".split("")]],unquoted:[[" \n\f\r &>".split(""),"\0 \n\f\r \"&'<=>`".split("")],["\0 \n\f\r \"&'<=>`".split(""),"\0 \n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]},t6=["<","&"];function t7(e,t,n,r){return n&&"element"===n.type&&("script"===n.tagName||"style"===n.tagName)?e.value:tD(e.value,Object.assign({},r.settings.characterReferences,{subset:t6}))}let t4=(0,tv.A)("type",{invalid:function(e){throw Error("Expected node, not `"+e+"`")},unknown:function(e){throw Error("Cannot compile unknown node `"+e.type+"`")},handlers:{comment:function(e,t,n,r){return r.settings.bogusComments?"<?"+tD(e.value,Object.assign({},r.settings.characterReferences,{subset:tU}))+">":"\x3c!--"+e.value.replace(tF,function(e){return tD(e,Object.assign({},r.settings.characterReferences,{subset:tj}))})+"--\x3e"},doctype:function(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"},element:function(e,t,n,r){let i,a=r.schema,s="svg"!==a.space&&r.settings.omitOptionalTags,o="svg"===a.space?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),l=[];"html"===a.space&&"svg"===e.tagName&&(r.schema=tS.JW);let c=function(e,t){let n,r=[],i=-1;if(t){for(n in t)if(null!==t[n]&&void 0!==t[n]){let i=function(e,t,n){let r,i=(0,tq.I)(e.schema,t),a=e.settings.allowParseErrors&&"html"===e.schema.space?0:1,s=+!e.settings.allowDangerousCharacters,o=e.quote;if(i.overloadedBoolean&&(n===i.attribute||""===n)?n=!0:(i.boolean||i.overloadedBoolean)&&("string"!=typeof n||n===i.attribute||""===n)&&(n=!!n),null==n||!1===n||"number"==typeof n&&Number.isNaN(n))return"";let l=tD(i.attribute,Object.assign({},e.settings.characterReferences,{subset:t8.name[a][s]}));return!0===n||(n=Array.isArray(n)?(i.commaSeparated?tH.A:tz.A)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?l:(e.settings.preferUnquoted&&(r=tD(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:t8.unquoted[a][s]}))),r!==n&&(e.settings.quoteSmart&&(0,tW.D)(n,o)>(0,tW.D)(n,e.alternative)&&(o=e.alternative),r=o+tD(n,Object.assign({},e.settings.characterReferences,{subset:("'"===o?t8.single:t8.double)[a][s],attribute:!0}))+o),l+(r?"="+r:r))}(e,n,t[n]);i&&r.push(i)}}for(;++i<r.length;){let t=e.settings.tightAttributes?r[i].charAt(r[i].length-1):void 0;i!==r.length-1&&'"'!==t&&"'"!==t&&(r[i]+=" ")}return r.join("")}(r,e.properties),u=r.all("html"===a.space&&"template"===e.tagName?e.content:e);return r.schema=a,u&&(o=!1),!c&&s&&t5(e,t,n)||(l.push("<",e.tagName,c?" "+c:""),o&&("svg"===a.space||r.settings.closeSelfClosing)&&(i=c.charAt(c.length-1),(!r.settings.tightSelfClosing||"/"===i||i&&'"'!==i&&"'"!==i)&&l.push(" "),l.push("/")),l.push(">")),l.push(u),o||s&&t0(e,t,n)||l.push("</"+e.tagName+">"),l.join("")},raw:function(e,t,n,r){return r.settings.allowDangerousHtml?e.value:t7(e,t,n,r)},root:function(e,t,n,r){return r.all(e)},text:t7}}),t9={},ne={},nt=[];function nn(e,t,n){return t4(e,t,n,this)}function nr(e){let t=[],n=e&&e.children||nt,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}let ni=/\s+/g;function na(e,t){if(!t)return e;for(let n of(e.properties||={},e.properties.class||=[],"string"==typeof e.properties.class&&(e.properties.class=e.properties.class.split(ni)),Array.isArray(e.properties.class)||(e.properties.class=[]),Array.isArray(t)?t:t.split(ni)))n&&!e.properties.class.includes(n)&&e.properties.class.push(n);return e}let ns=/:?lang=["']([^"']+)["']/g,no=/(?:```|~~~)([\w-]+)/g,nl=/\\begin\{([\w-]+)\}/g,nc=/<script\s+(?:type|lang)=["']([^"']+)["']/gi;function nu(e){let t=e7(e,!0).map(([e])=>e);return{lines:t,indexToPos:function(n){if(n===e.length)return{line:t.length-1,character:t.at(-1).length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}},posToIndex:function(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+n}}}function nd(e,t,n){let r=new Set;for(let t of e.matchAll(ns)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(no)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(nl)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(nc)){let e=t[1].toLowerCase().trim(),n=e.includes("/")?e.split("/").pop():e;n&&r.add(n)}if(!n)return[...r];let i=n.getBundledLanguages();return[...r].filter(e=>e&&i[e])}let nh=["color","background-color"];function np(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function nm(e,t){let n=[...t instanceof Set?t:new Set(t)].sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?np(e,t):e})):e}function ng(e,t,n,r,i="css-vars"){let a={content:e.content,explanation:e.explanation,offset:e.offset},s=t.map(t=>nf(e.variants[t])),o=new Set(s.flatMap(e=>Object.keys(e))),l={},c=(e,r)=>{let i="color"===r?"":"background-color"===r?"-bg":`-${r}`;return n+t[e]+("color"===r?"":i)};return s.forEach((e,n)=>{for(let a of o){let o=e[a]||"inherit";if(0===n&&r&&nh.includes(a))if("light-dark()"===r&&s.length>1){let e=t.findIndex(e=>"light"===e),r=t.findIndex(e=>"dark"===e);if(-1===e||-1===r)throw new D('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');l[a]=`light-dark(${s[e][a]||"inherit"}, ${s[r][a]||"inherit"})`,"css-vars"===i&&(l[c(n,a)]=o)}else l[a]=o;else"css-vars"===i&&(l[c(n,a)]=o)}}),a.htmlStyle=l,a}function nf(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&K.Italic&&(t["font-style"]="italic"),e.fontStyle&K.Bold&&(t["font-weight"]="bold");let n=[];e.fontStyle&K.Underline&&n.push("underline"),e.fontStyle&K.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function nb(e){return"string"==typeof e?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}function ny(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let r=nu(t.source);function n(e){if("number"==typeof e){if(e<0||e>t.source.length)throw new D(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}{let t=r.lines[e.line];if(void 0===t)throw new D(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new D(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:r.posToIndex(e.line,n)}}}let i=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));(function(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new D(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,s=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,o=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||s||o){if(i&&a||s&&o||s&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new D(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}})(i),e.set(t.meta,{decorations:i,converter:r,source:t.source})}return e.get(t.meta)}return{name:"shiki:decorations",tokens(e){if(this.options.decorations?.length)return nm(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=[...e.children].filter(e=>"element"===e.type&&"span"===e.tagName);if(r.length!==n.converter.lines.length)throw new D(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let s=r[e],o="",l=-1,c=-1;if(0===t&&(l=0),0===n&&(c=0),n===1/0&&(c=s.children.length),-1===l||-1===c)for(let e=0;e<s.children.length;e++)o+=function e(t){return"text"===t.type?t.value:"element"===t.type?t.children.map(e).join(""):""}(s.children[e]),-1===l&&o.length===t&&(l=e+1),-1===c&&o.length===n&&(c=e+1);if(-1===l)throw new D(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(-1===c)throw new D(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=s.children.slice(l,c);if(i.alwaysWrap||u.length!==s.children.length)if(i.alwaysWrap||1!==u.length||"element"!==u[0].type){let e={type:"element",tagName:"span",properties:{},children:u};a(e,i,"wrapper"),s.children.splice(l,u.length,e)}else a(u[0],i,"token");else a(s,i,"line")}function a(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||"span",e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&na(e,t.properties.class),e=i(e,n)||e}let s=[];for(let e of n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset)){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let i=t.line+1;i<n.line;i++)s.unshift(()=>{var t;r[t=i]=a(r[t],e,"line")});i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}let nk=[ny()];function n_(e){let t=function(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case"pre":t.push(i);break;case"post":n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...nk]}var nw=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],nC={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function nS(e){let t=e.shift();if("2"===t){let t=e.splice(0,3).map(e=>Number.parseInt(e));if(3!==t.length||t.some(e=>Number.isNaN(e)))return;return{type:"rgb",rgb:t}}if("5"===t){let t=e.shift();if(t)return{type:"table",index:Number(t)}}}var nv={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};let nx=/#([0-9a-f]{3,8})/i,nA=/var\((--[\w-]+-ansi-[\w-]+)\)/,nN={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function nE(e,t,n){let r,i,a,s=eK(e,n),o=e7(t),l=function(e=nv){let t;function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0")).join("")}`}return{value:function(r){switch(r.type){case"named":return e[r.name];case"rgb":return n(r.rgb);case"table":var i;return i=r.index,function(){if(t)return t;t=[];for(let n=0;n<nw.length;n++)t.push(e[nw[n]]);let r=[0,95,135,175,215,255];for(let e=0;e<6;e++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)t.push(n([r[e],r[i],r[a]]));let i=8;for(let e=0;e<24;e++,i+=10)t.push(n([i,i,i]));return t}()[i]}}}}(Object.fromEntries(nw.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||nN[t]]}))),c=(r=null,i=null,a=new Set,{parse(e){let t=[],n=0;do{let s=function(e,t){let n=e.indexOf("\x1b",t);if(-1!==n&&"["===e[n+1]){let t=e.indexOf("m",n);if(-1!==t)return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}(e,n),o=s.sequence?e.substring(n,s.startPosition):e.substring(n);if(o.length>0&&t.push({value:o,foreground:r,background:i,decorations:new Set(a)}),s.sequence){let e=function(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(0===r)t.push({type:"resetAll"});else if(r<=9)nC[r]&&t.push({type:"setDecoration",value:nC[r]});else if(r<=29){let e=nC[r-20];e&&(t.push({type:"resetDecoration",value:e}),"dim"===e&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:nw[r-30]}});else if(38===r){let n=nS(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===r)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:nw[r-40]}});else if(48===r){let n=nS(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===r?t.push({type:"resetBackgroundColor"}):53===r?t.push({type:"setDecoration",value:"overline"}):55===r?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:nw[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:nw[r-100+8]}})}return t}(s.sequence);for(let t of e)"resetAll"===t.type?(r=null,i=null,a.clear()):"resetForegroundColor"===t.type?r=null:"resetBackgroundColor"===t.type?i=null:"resetDecoration"===t.type&&a.delete(t.value);for(let t of e)"setForegroundColor"===t.type?r=t.value:"setBackgroundColor"===t.type?i=t.value:"setDecoration"===t.type&&a.add(t.value)}n=s.position}while(n<e.length);return t}});return o.map(t=>c.parse(t[0]).map(n=>{let r,i;n.decorations.has("reverse")?(r=n.background?l.value(n.background):e.bg,i=n.foreground?l.value(n.foreground):e.fg):(r=n.foreground?l.value(n.foreground):e.fg,i=n.background?l.value(n.background):void 0),r=eY(r,s),i=eY(i,s),n.decorations.has("dim")&&(r=function(e){let t=e.match(nx);if(t){let e=t[1];if(8===e.length){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${e.slice(0,6)}${t}`}if(6===e.length)return`#${e}80`;if(4===e.length){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,"0")}`}else if(3===e.length){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(nA);return n?`var(${n[1]}-dim)`:e}(r));let a=K.None;return n.decorations.has("bold")&&(a|=K.Bold),n.decorations.has("italic")&&(a|=K.Italic),n.decorations.has("underline")&&(a|=K.Underline),n.decorations.has("strikethrough")&&(a|=K.Strikethrough),{content:n.value,offset:t[1],color:r,bgColor:i,fontStyle:a}}))}function nP(e,t,n={}){let r=e.resolveLangAlias(n.lang||"text"),{theme:i=e.getLoadedThemes()[0]}=n;if(!e2(r)&&!e5(i)&&"ansi"===r){let{theme:r}=e.setTheme(i);return nE(r,t,n)}return tf(e,t,n)}function nL(e,t,n){let r,i,a,s,o,l;if("themes"in n){let{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:d="css-vars"}=n,h=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===c?-1:+(t.color===c));if(0===h.length)throw new D("`themes` option must not be empty");let p=tw(e,t,n,nP);if(l=th(p),c&&"light-dark()"!==c&&!h.some(e=>e.color===c))throw new D(`\`themes\` option must contain the defaultColor key \`${c}\``);let m=h.map(t=>e.getTheme(t.theme)),g=h.map(e=>e.color);a=p.map(e=>e.map(e=>ng(e,g,u,c,d))),l&&td(a,l);let f=h.map(e=>eK(e.theme,n));i=nT(h,m,f,u,c,"fg",d),r=nT(h,m,f,u,c,"bg",d),s=`shiki-themes ${m.map(e=>e.name).join(" ")}`,o=c?void 0:[i,r].join(";")}else if("theme"in n){let o=eK(n.theme,n);a=nP(e,t,n);let c=e.getTheme(n.theme);r=eY(c.bg,o),i=eY(c.fg,o),s=c.name,l=th(a)}else throw new D("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:s,rootStyle:o,grammarState:l}}function nT(e,t,n,r,i,a,s){return e.map((o,l)=>{let c=eY(t[l][a],n[l])||"inherit",u=`${r+o.color}${"bg"===a?"-bg":""}:${c}`;if(0===l&&i){if("light-dark()"===i&&e.length>1){let r=e.findIndex(e=>"light"===e.color),i=e.findIndex(e=>"dark"===e.color);if(-1===r||-1===i)throw new D('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${eY(t[r][a],n[r])||"inherit"}, ${eY(t[i][a],n[i])||"inherit"});${u}`}return c}return"css-vars"===s?u:null}).filter(e=>!!e).join(";")}let nI=/^\s+$/,n$=/^(\s*)(.*?)(\s*)$/;function nR(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>nR(e,t,n),codeToTokens:(t,n)=>nL(e,t,n)}){let i=t;for(let e of n_(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:s,bg:o,themeName:l,rootStyle:c,grammarState:u}=nL(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:h=!1}=n;!0===d?a=a.map(e=>{let t,n=[],r="";return e.forEach((i,a)=>{let s=!(i.fontStyle&&(i.fontStyle&K.Underline||i.fontStyle&K.Strikethrough));s&&nI.test(i.content)&&e[a+1]?(void 0===t&&(t=i.offset),r+=i.content):r?(s?n.push({...i,offset:t,content:r+i.content}):n.push({content:r,offset:t},i),t=void 0,r=""):n.push(i)}),n}):"never"===d&&(a=a.map(e=>e.flatMap(e=>{if(nI.test(e.content))return e;let t=e.content.match(n$);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))),h&&(a=a.map(e=>{let t=[];for(let n of e){if(0===t.length){t.push({...n});continue}let e=t.at(-1),r=nb(e.htmlStyle||nf(e)),i=nb(n.htmlStyle||nf(n)),a=e.fontStyle&&(e.fontStyle&K.Underline||e.fontStyle&K.Strikethrough),s=n.fontStyle&&(n.fontStyle&K.Underline||n.fontStyle&K.Strikethrough);a||s||r!==i?t.push({...n}):e.content+=n.content}return t}));let p={...r,get source(){return i}};for(let e of n_(n))a=e.tokens?.call(p,a)||a;return nM(a,{...n,fg:s,bg:o,themeName:l,rootStyle:!1!==n.rootStyle&&(n.rootStyle??c)},p,u)}function nM(e,t,n,r=th(e)){let i=n_(t),a=[],s={type:"root",children:[]},{structure:o="classic",tabindex:l="0"}=t,c={class:`shiki ${t.themeName||""}`};for(let[e,n]of(!1!==t.rootStyle&&(null!=t.rootStyle?c.style=t.rootStyle:c.style=`background-color:${t.bg};color:${t.fg}`),!1!==l&&null!=l&&(c.tabindex=l.toString()),Object.entries(t.meta||{})))e.startsWith("_")||(c[e]=n);let u={type:"element",tagName:"pre",properties:c,children:[],data:t.data},d={type:"element",tagName:"code",properties:{},children:a},h=[],p={...n,structure:o,addClassToHast:na,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return s},get pre(){return u},get code(){return d},get lines(){return h}};if(e.forEach((e,t)=>{t&&("inline"===o?s.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===o&&a.push({type:"text",value:"\n"}));let n={type:"element",tagName:"span",properties:{class:"line"},children:[]},r=0;for(let a of e){let e={type:"element",tagName:"span",properties:{...a.htmlAttrs},children:[{type:"text",value:a.content}]},l=nb(a.htmlStyle||nf(a));for(let s of(l&&(e.properties.style=l),i))e=s?.span?.call(p,e,t+1,r,n,a)||e;"inline"===o?s.children.push(e):"classic"===o&&n.children.push(e),r+=a.content.length}if("classic"===o){for(let e of i)n=e?.line?.call(p,n,t+1)||n;h.push(n),a.push(n)}else"inline"===o&&h.push(n)}),"classic"===o){for(let e of i)d=e?.code?.call(p,d)||d;for(let e of(u.children.push(d),i))u=e?.pre?.call(p,u)||u;s.children.push(u)}else if("inline"===o){let e=[],t={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(let n of s.children)"element"===n.type&&"br"===n.tagName?(e.push(t),t={type:"element",tagName:"span",properties:{class:"line"},children:[]}):("element"===n.type||"text"===n.type)&&t.children.push(n);e.push(t);let n={type:"element",tagName:"code",properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;s.children=[];for(let e=0;e<n.children.length;e++){e>0&&s.children.push({type:"element",tagName:"br",properties:{},children:[]});let t=n.children[e];"element"===t.type&&s.children.push(...t.children)}}let m=s;for(let e of i)m=e?.root?.call(p,m)||m;return r&&td(m,r),m}let nG=function(e,t){let n=t||t9,r=n.quote||'"';if('"'!==r&&"'"!==r)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return({one:nn,all:nr,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||tC.b,characterReferences:n.characterReferences||ne,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:"svg"===n.space?tS.JW:tS.qy,quote:r,alternative:'"'===r?"'":'"'}).one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)};function nO(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>nR(e,t,n),codeToTokens:(t,n)=>nL(e,t,n)},i=nG(nR(e,t,n,r));for(let e of n_(n))i=e.postprocess?.call(r,i,n)||i;return i}async function nB(e){let t=await tl(e);return{getLastGrammarState:(...e)=>tb(t,...e),codeToTokensBase:(e,n)=>nP(t,e,n),codeToTokensWithThemes:(e,n)=>tw(t,e,n),codeToTokens:(e,n)=>nL(t,e,n),codeToHast:(e,n)=>nR(t,e,n),codeToHtml:(e,n)=>nO(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function nD(e){let t=ts(e);return{getLastGrammarState:(...e)=>tb(t,...e),codeToTokensBase:(e,n)=>nP(t,e,n),codeToTokensWithThemes:(e,n)=>tw(t,e,n),codeToTokens:(e,n)=>nL(t,e,n),codeToHast:(e,n)=>nR(t,e,n),codeToHtml:(e,n)=>nO(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function nF(e){let t;return async function(n){if(!t)return t=e({...n,themes:n.themes||[],langs:n.langs||[]});{let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}}}let nU=nF(nB);function nj(e){let t=e.langs,n=e.themes,r=e.engine;return async function(e){function i(n){if("string"==typeof n){if(e3(n=e.langAlias?.[n]||n))return[];let r=t[n];if(!r)throw new D(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(e5(e))return"none";if("string"==typeof e){let t=n[e];if(!t)throw new D(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let s=(e.themes??[]).map(e=>a(e)),o=(e.langs??[]).map(e=>i(e)),l=await nB({engine:e.engine??r(),...e,themes:s,langs:o});return{...l,loadLanguage:(...e)=>l.loadLanguage(...e.map(i)),loadTheme:(...e)=>l.loadTheme(...e.map(a)),getBundledLanguages:()=>t,getBundledThemes:()=>n}}}function nW(e){let t;return async function(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}}function nH(e,t){let n=nW(e);async function r(e,r){let i=await n({langs:[r.lang],themes:"theme"in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter:e=>n(e),codeToHtml:async(e,t)=>(await r(e,t)).codeToHtml(e,t),codeToHast:async(e,t)=>(await r(e,t)).codeToHast(e,t),codeToTokens:async(e,t)=>(await r(e,t)).codeToTokens(e,t),codeToTokensBase:async(e,t)=>(await r(e,t)).codeToTokensBase(e,t),codeToTokensWithThemes:async(e,t)=>(await r(e,t)).codeToTokensWithThemes(e,t),getLastGrammarState:async(e,t)=>(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}function nq(e={}){let{name:t="css-variables",variablePrefix:n="--shiki-",fontStyle:r=!0}=e,i=t=>e.variableDefaults?.[t]?`var(${n}${t}, ${e.variableDefaults[t]})`:`var(${n}${t})`,a={name:t,type:"dark",colors:{"editor.foreground":i("foreground"),"editor.background":i("background"),"terminal.ansiBlack":i("ansi-black"),"terminal.ansiRed":i("ansi-red"),"terminal.ansiGreen":i("ansi-green"),"terminal.ansiYellow":i("ansi-yellow"),"terminal.ansiBlue":i("ansi-blue"),"terminal.ansiMagenta":i("ansi-magenta"),"terminal.ansiCyan":i("ansi-cyan"),"terminal.ansiWhite":i("ansi-white"),"terminal.ansiBrightBlack":i("ansi-bright-black"),"terminal.ansiBrightRed":i("ansi-bright-red"),"terminal.ansiBrightGreen":i("ansi-bright-green"),"terminal.ansiBrightYellow":i("ansi-bright-yellow"),"terminal.ansiBrightBlue":i("ansi-bright-blue"),"terminal.ansiBrightMagenta":i("ansi-bright-magenta"),"terminal.ansiBrightCyan":i("ansi-bright-cyan"),"terminal.ansiBrightWhite":i("ansi-bright-white")},tokenColors:[{scope:["keyword.operator.accessor","meta.group.braces.round.function.arguments","meta.template.expression","markup.fenced_code meta.embedded.block"],settings:{foreground:i("foreground")}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:["strong","markup.heading.markdown","markup.bold.markdown"],settings:{fontStyle:"bold"}},{scope:["markup.italic.markdown"],settings:{fontStyle:"italic"}},{scope:"meta.link.inline.markdown",settings:{fontStyle:"underline",foreground:i("token-link")}},{scope:["string","markup.fenced_code","markup.inline"],settings:{foreground:i("token-string")}},{scope:["comment","string.quoted.docstring.multi"],settings:{foreground:i("token-comment")}},{scope:["constant.numeric","constant.language","constant.other.placeholder","constant.character.format.placeholder","variable.language.this","variable.other.object","variable.other.class","variable.other.constant","meta.property-name","meta.property-value","support"],settings:{foreground:i("token-constant")}},{scope:["keyword","storage.modifier","storage.type","storage.control.clojure","entity.name.function.clojure","entity.name.tag.yaml","support.function.node","support.type.property-name.json","punctuation.separator.key-value","punctuation.definition.template-expression"],settings:{foreground:i("token-keyword")}},{scope:"variable.parameter.function",settings:{foreground:i("token-parameter")}},{scope:["support.function","entity.name.type","entity.other.inherited-class","meta.function-call","meta.instance.constructor","entity.other.attribute-name","entity.name.function","constant.keyword.clojure"],settings:{foreground:i("token-function")}},{scope:["entity.name.tag","string.quoted","string.regexp","string.interpolated","string.template","string.unquoted.plain.out.yaml","keyword.other.template"],settings:{foreground:i("token-string-expression")}},{scope:["punctuation.definition.arguments","punctuation.definition.dict","punctuation.separator","meta.function-call.arguments"],settings:{foreground:i("token-punctuation")}},{scope:["markup.underline.link","punctuation.definition.metadata.markdown"],settings:{foreground:i("token-link")}},{scope:["beginning.punctuation.definition.list.markdown"],settings:{foreground:i("token-string")}},{scope:["punctuation.definition.string.begin.markdown","punctuation.definition.string.end.markdown","string.other.link.title.markdown","string.other.link.description.markdown"],settings:{foreground:i("token-keyword")}},{scope:["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],settings:{foreground:i("token-inserted")}},{scope:["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],settings:{foreground:i("token-deleted")}},{scope:["markup.changed","punctuation.definition.changed"],settings:{foreground:i("token-changed")}}]};return r||(a.tokenColors=a.tokenColors?.map(e=>(e.settings?.fontStyle&&delete e.settings.fontStyle,e))),a}var nz=p({bundledLanguages:()=>k,bundledLanguagesAlias:()=>y,bundledLanguagesBase:()=>b,bundledLanguagesInfo:()=>f,bundledThemes:()=>w,bundledThemesInfo:()=>_,codeToHast:()=>nQ,codeToHtml:()=>nX,codeToTokens:()=>nJ,codeToTokensBase:()=>nZ,codeToTokensWithThemes:()=>nK,createHighlighter:()=>nV,getLastGrammarState:()=>n0,getSingletonHighlighter:()=>nY});let nV=nj({langs:k,themes:w,engine:()=>(0,B.createOnigurumaEngine)(Promise.all([n.e(4814),n.e(9302)]).then(n.bind(n,49302)))}),{codeToHtml:nX,codeToHast:nQ,codeToTokens:nJ,codeToTokensBase:nZ,codeToTokensWithThemes:nK,getSingletonHighlighter:nY,getLastGrammarState:n0}=nH(nV,{guessEmbeddedLanguages:nd});var n1=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;const{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if("string"!=typeof e)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}findNextMatchSync(e,t,n){let r="string"==typeof e?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>null==e?{start:0xffffffff,end:0xffffffff,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let s=n.exec(r);if(!s)continue;if(s.index===t)return a(e,s,0);i.push([e,s,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}};function n2(e){if(1!=[...e].length)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}let n3=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),n5=String.raw;function n8(e,t){if(null==e)throw Error(t??"Value expected");return e}let n6=n5`\[\^?`,n7=`c.? | C(?:-.?)?|${n5`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${n5`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${n5`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${n5`o\{[^\}]*\}?`}|${n5`\d{1,3}`}`,n4=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,n9=RegExp(n5`
2
2
  \\ (?:
3
3
  ${n7}
4
4
  | [gk]<[^>]*>?
@@ -30,7 +30,7 @@
30
30
  | &&
31
31
  | .
32
32
  `.replace(/\s+/g,""),"gsu");function rt(e,{inCharClass:t}){let n=e[1];if("c"===n||"C"===n){var r,i=e;let t="c"===i[1]?i[2]:i[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${i}"`);return ri(n2(t.toUpperCase())-64,i)}if("dDhHsSwW".includes(n)){let t;return rs({d:"digit",h:"hex",s:"space",w:"word"}[t=(r=e)[1].toLowerCase()],r,{negate:r[1]!==t})}if(e.startsWith(n5`\o{`))throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(3===e.length)throw Error(`Incomplete or invalid Unicode property "${e}"`);return function(e){let{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return rs("property",e,{value:r,negate:"P"===t&&!n||"p"===t&&!!n})}(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let t=e.split(/\\x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),r=new TextEncoder;return[...n].map(e=>{let t=[...r.encode(e)].map(e=>`\\x${e.toString(16)}`).join("");return ri(n2(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if("u"===n||"x"===n)return ri(function(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw Error(`Incomplete or invalid escape "${e}"`);return parseInt("{"===e[2]?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2),16)}(e),e);if(ru.has(n))return ri(ru.get(n),e);if(/\d/.test(n))return{type:"EscapedNumber",inCharClass:t,raw:e};if("\\"===e)throw Error(n5`Incomplete escape "\"`);if("M"===n)throw Error(`Unsupported meta "${e}"`);if(2==[...e].length)return ri(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function rn(e,t){return{type:"Assertion",kind:e,raw:t}}function rr(e){return{type:"Backreference",raw:e}}function ri(e,t){return{type:"Character",value:e,raw:t}}function ra(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function rs(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function ro(e,t,n={}){return"keep"===e?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:n8(n.flags),raw:t}}function rl(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}let rc=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),ru=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function rd(e){let t=null,n,r;if("{"===e[0]){let{minStr:i,maxStr:a}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups;if(+i>1e5||a&&+a>1e5)throw Error("Quantifier value unsupported in Oniguruma");if((n=+i)>(r=void 0===a?+i:""===a?1/0:+a)&&(t="possessive",[n,r]=[r,n]),e.endsWith("?")){if("possessive"===t)throw Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=+("+"===e[0]),r="?"===e[0]?1:1/0,t="+"===e[1]?"possessive":"?"===e[1]?"lazy":"greedy";return{type:"Quantifier",kind:t,min:n,max:r,raw:e}}function rh(e){let t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function rp(e,t){if(!Array.isArray(e.body))throw Error("Expected node with body array");if(1!==e.body.length)return!1;let n=e.body[0];return!t||Object.keys(t).every(e=>t[e]===n[e])}let rm=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function rg(e,t={}){var n;let r={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},i=function(e,t={}){let n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if("string"!=typeof e)throw Error("String expected as pattern");let r=function(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){let r=e[n];if(!"imxDPSWy".includes(r))throw Error(`Invalid flag "${r}"`);if("y"===r){if(!/^y{[gw]}/.test(e.slice(n)))throw Error('Invalid or unspecified flag "y" mode');t.textSegmentMode="g"===e[n+2]?"grapheme":"word",n+=3;continue}t[({i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"})[r]]=!0}return t}(n.flags),i=[r.extended],a={captureGroup:n.rules.captureGroup,getCurrentModX:()=>i.at(-1),numOpenGroups:0,popModX(){i.pop()},pushModX(e){i.push(e)},replaceCurrentModX(e){i[i.length-1]=e},singleline:n.rules.singleline},s=[],o;for(n9.lastIndex=0;o=n9.exec(e);){let t=function(e,t,n,r){let[i,a]=n;if("["===n||"[^"===n){let e=function(e,t,n){let r=[ra("^"===t[1],t)],i=1,a;for(re.lastIndex=n;a=re.exec(e);){let e=a[0];if("["===e[0]&&":"!==e[1])i++,r.push(ra("^"===e[1],e));else if("]"===e){if("CharacterClassOpen"===r.at(-1).type)r.push(ri(93,e));else if(i--,r.push({type:"CharacterClassClose",raw:e}),!i)break}else{let t=function(e){if("\\"===e[0])return rt(e,{inCharClass:!0});if("["===e[0]){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!n3.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return rs("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return"-"===e?{type:"CharacterClassHyphen",raw:e}:"&&"===e?{type:"CharacterClassIntersector",raw:e}:ri(n2(e),e)}(e);Array.isArray(t)?r.push(...t):r.push(t)}}return{tokens:r,lastIndex:re.lastIndex||e.length}}(t,n,r);return{tokens:e.tokens,lastIndex:e.lastIndex}}if("\\"===i){if("AbBGyYzZ".includes(a))return{token:rn(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:{type:"Subroutine",raw:n}}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:rr(n)}}if("K"===a)return{token:ro("keep",n)};if("N"===a||"R"===a)return{token:rs("newline",n,{negate:"N"===a})};if("O"===a)return{token:rs("any",n)};if("X"===a)return{token:rs("text_segment",n)};let e=rt(n,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if("("===i){if("*"===a)return{token:function(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout "${e}"`);let{name:n,tag:r,args:i}=t.groups;if(!n)throw Error(`Invalid named callout "${e}"`);if(""===r)throw Error(`Named callout tag with empty value not allowed "${e}"`);let a=i?i.split(",").filter(e=>""!==e).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[s,o,l]=a,c=rc.has(n)?n.toLowerCase():"custom";switch(c){case"fail":case"mismatch":case"skip":if(a.length>0)throw Error(`Named callout arguments not allowed "${a}"`);break;case"error":if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if("string"==typeof s)throw Error(`Named callout argument must be a number "${s}"`);break;case"max":if(!a.length||a.length>2)throw Error(`Named callout must have one or two arguments "${a}"`);if("string"==typeof s&&!/^[A-Za-z_]\w*$/.test(s))throw Error(`Named callout argument one must be a tag or number "${s}"`);if(2===a.length&&("number"==typeof o||!/^[<>X]$/.test(o)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${o}"`);break;case"count":case"total_count":if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(1===a.length&&("number"==typeof s||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${s}"`);break;case"cmp":if(3!==a.length)throw Error(`Named callout must have three arguments "${a}"`);if("string"==typeof s&&!/^[A-Za-z_]\w*$/.test(s))throw Error(`Named callout argument one must be a tag or number "${s}"`);if("number"==typeof o||!/^(?:[<>!=]=|[<>])$/.test(o))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${o}"`);if("string"==typeof l&&!/^[A-Za-z_]\w*$/.test(l))throw Error(`Named callout argument three must be a tag or number "${l}"`);break;case"custom":throw Error(`Undefined callout name "${n}"`);default:throw Error(`Unexpected named callout kind "${c}"`)}return{type:"NamedCallout",kind:c,tag:r??null,arguments:i?.split(",")??null,raw:e}}(n)};if("(?{"===n)throw Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(")"!==t[r])throw Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:function(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??="";let i=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),a=rh(n),s=rh(r),o={};if(a&&(o.enable=a),s&&(o.disable=s),e.endsWith(")"))return t.replaceCurrentModX(i),ro("flags",e,{flags:o});if(e.endsWith(":"))return t.pushModX(i),t.numOpenGroups++,rl("group",e,{...(a||s)&&{flags:o}});throw Error(`Unexpected flag modifier "${e}"`)}(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,"("===n&&!e.captureGroup||"(?:"===n)return{token:rl("group",n)};if("(?>"===n)return{token:rl("atomic",n)};if("(?="===n||"(?!"===n||"(?<="===n||"(?<!"===n)return{token:rl("<"===n[2]?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if("("===n&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:rl("capturing",n,{..."("!==n&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if("(?~|"===n)throw Error(`Unsupported absence function kind "${n}"`);return{token:rl("absence_repeater",n)}}throw"(?("===n?Error(`Unsupported conditional "${n}"`):Error(`Invalid or unsupported group option "${n}"`)}if(")"===n){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error('Unmatched ")"');return{token:{type:"GroupClose",raw:n}}}if(e.getCurrentModX()){if("#"===n){let e=t.indexOf(`
33
- `,r);return{lastIndex:-1===e?t.length:e}}if(/^\s$/.test(n)){let e=/\s+/y;return e.lastIndex=r,{lastIndex:e.exec(t)?e.lastIndex:r}}}return"."===n?{token:rs("dot",n)}:"^"===n||"$"===n?{token:rn(e.singleline?({"^":n5`\A`,$:n5`\Z`})[n]:n,n)}:"|"===n?{token:{type:"Alternator",raw:n}}:n4.test(n)?{tokens:function(e){let t,n=[],r=RegExp(n4,"gy");for(;t=r.exec(e);){let e=t[0];if("{"===e[0]){let t=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(t){let{min:i,max:a}=t.groups;if(+i>+a&&e.endsWith("?")){r.lastIndex--,n.push(rd(e.slice(0,-1)));continue}}}n.push(rd(e))}return n}(n)}:{token:ri(n2(n),n)}}(a,e,o[0],n9.lastIndex);t.tokens?s.push(...t.tokens):t.token&&s.push(t.token),void 0!==t.lastIndex&&(n9.lastIndex=t.lastIndex)}let l=[],c=0;s.filter(e=>"GroupOpen"===e.type).forEach(e=>{"capturing"===e.kind?e.number=++c:"("===e.raw&&l.push(e)}),c||l.forEach((e,t)=>{e.kind="capturing",e.number=t+1});let u=c||l.length;return{tokens:s.map(e=>"EscapedNumber"===e.type?function(e,t){let{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&("0"!==i&&1===i.length||"0"!==i[0]&&+i<=t))return[rr(n)];let a=[],s=i.match(/^[0-7]+|\d/g);for(let e=0;e<s.length;e++){let t,r=s[e];if(0===e&&"8"!==r&&"9"!==r){if((t=parseInt(r,8))>127)throw Error(n5`Octal encoded byte above 177 unsupported "${n}"`)}else t=n2(r);a.push(ri(t,(0===e?"\\":"")+r))}return a}(e,u):e).flat(),flags:r}}(e,{flags:r.flags,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline}}),a=(e,t)=>{let n=i.tokens[s.nextIndex];switch(s.parent=e,s.nextIndex++,n.type){case"Alternator":return rf();case"Assertion":return function({kind:e}){return rb(n8({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===n5`\B`||e===n5`\Y`})}(n);case"Backreference":return function({raw:e},t){let n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(n,r=!1)=>{let i=t.capturingGroups.length,a=!1;if(n>i)if(t.skipBackrefValidation)a=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,ry(r?i+1-n:n,{orphan:a})};if(n){let n=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(n)return i(+n.groups.num,!!n.groups.sign);if(/[-+]/.test(r))throw Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw Error(`Group name not defined to the left "${e}"`);return ry(r)}return i(+r)}(n,s);case"Character":return r_(n.value,{useLastValid:!!t.isCheckingRangeEnd});case"CharacterClassHyphen":return function(e,t){let{tokens:n,walk:r}=e,i=e.parent,a=i.body.at(-1),s=n[e.nextIndex];if(!t.isCheckingRangeEnd&&a&&"CharacterClass"!==a.type&&"CharacterClassRange"!==a.type&&s&&"CharacterClassOpen"!==s.type&&"CharacterClassClose"!==s.type&&"CharacterClassIntersector"!==s.type){let e=r(i,{...t,isCheckingRangeEnd:!0});if("Character"===a.type&&"Character"===e.type)return i.body.pop(),function(e,t){if(t.value<e.value)throw Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}(a,e);throw Error("Invalid character class range")}return r_(n2("-"))}(s,t);case"CharacterClassOpen":return function({negate:e},t,n){let{tokens:r,walk:i}=t,a=[rw()],s=r[t.nextIndex],o=r$(s);for(;"CharacterClassClose"!==o.type;){if("CharacterClassIntersector"===o.type)a.push(rw()),t.nextIndex++;else{let e=a.at(-1);e.body.push(i(e,n))}o=r$(r[t.nextIndex],s)}let l=rw({negate:e});return 1===a.length?l.body=a[0].body:(l.kind="intersection",l.body=a.map(e=>1===e.body.length?e.body[0]:e)),t.nextIndex++,l}(n,s,t);case"CharacterSet":return function({kind:e,negate:t,value:n},r){let{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:s}=r;if("property"===e){let r=rI(n);if(!n3.has(r)||s?.has(r))return rN(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:s});e="posix",n=r}return"posix"===e?function(e,t){let n=!!t?.negate;if(!n3.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}(n,{negate:t}):rC(e,{negate:t})}(n,s);case"Directive":return function(e,t={}){if("keep"===e)return{type:"Directive",kind:e};if("flags"===e)return{type:"Directive",kind:e,flags:n8(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}(n.kind,{flags:n.flags});case"GroupOpen":return function(e,t,n){var r,i;let{tokens:a,capturingGroups:s,namedGroupsByName:o,skipLookbehindValidation:l,walk:c}=t,u=function({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case"absence_repeater":var a="repeater";!1;return{type:"AbsenceFunction",kind:a,body:rE(void 0)};case"atomic":return rS({atomic:!0});case"capturing":return rk(i,{name:n});case"group":return rS({flags:e});case"lookahead":case"lookbehind":return rx({behind:"lookbehind"===t,negate:r});default:throw Error(`Unexpected group kind "${t}"`)}}(e),d="AbsenceFunction"===u.type,h=rT(u),p=h&&u.negate;if("CapturingGroup"===u.type&&(s.push(u),u.name&&(r=u.name,i=[],o.has(r)||o.set(r,i),o.get(r)).push(u)),d&&n.isInAbsenceFunction)throw Error("Nested absence function not supported by Oniguruma");let m=rR(a[t.nextIndex]);for(;"GroupClose"!==m.type;){if("Alternator"===m.type)u.body.push(rf()),t.nextIndex++;else{let e=u.body.at(-1),t=c(e,{...n,isInAbsenceFunction:n.isInAbsenceFunction||d,isInLookbehind:n.isInLookbehind||h,isInNegLookbehind:n.isInNegLookbehind||p});if(e.body.push(t),(h||n.isInLookbehind)&&!l){let e="Lookbehind includes a pattern not allowed by Oniguruma";if(p||n.isInNegLookbehind){if(rL(t)||"CapturingGroup"===t.type)throw Error(e)}else if(rL(t)||rT(t)&&t.negate)throw Error(e)}}m=rR(a[t.nextIndex])}return t.nextIndex++,u}(n,s,t);case"NamedCallout":var r,a;return r=n.kind,a=n.tag,{type:"NamedCallout",kind:r,tag:a,arguments:n.arguments};case"Quantifier":return function({kind:e,min:t,max:n},r){let i=r.parent,a=i.body.at(-1);if(!a||!rm.has(a.type))throw Error("Quantifier requires a repeatable token");let s=rv(e,t,n,a);return i.body.pop(),s}(n,s);case"Subroutine":return function({raw:e},t){let{capturingGroups:n,subroutines:r}=t,i=e.slice(3,-1),a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(a){let e=+a.groups.num,r=n.length;if(t.hasNumberedRef=!0,(i=({"":e,"+":r+e,"-":r+1-e})[a.groups.sign])<1)throw Error("Invalid subroutine number")}else"0"===i&&(i=0);let s=rA(i);return r.push(s),s}(n,s);default:throw Error(`Unexpected token type "${n.type}"`)}},s={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:r.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:r.skipBackrefValidation,skipLookbehindValidation:r.skipLookbehindValidation,skipPropertyNameValidation:r.skipPropertyNameValidation,subroutines:[],tokens:i.tokens,unicodePropertyMap:r.unicodePropertyMap,walk:a},o=(n={type:"Flags",...i.flags},{type:"Regex",body:rE(void 0),flags:n}),l=o.body[0];for(;s.nextIndex<i.tokens.length;){let e=a(l,{});"Alternative"===e.type?(o.body.push(e),l=e):l.body.push(e)}let{capturingGroups:c,hasNumberedRef:u,namedGroupsByName:d,subroutines:h}=s;if(u&&d.size&&!r.rules.captureGroup)throw Error("Numbered backref/subroutine not allowed when using named capture");for(let{ref:e}of h)if("number"==typeof e){if(e>c.length)throw Error("Subroutine uses a group number that's not defined");e&&(c[e-1].isSubroutined=!0)}else if(d.has(e)){if(d.get(e).length>1)throw Error(n5`Subroutine uses a duplicate group name "\g<${e}>"`);d.get(e)[0].isSubroutined=!0}else throw Error(n5`Subroutine uses a group name that's not defined "\g<${e}>"`);return o}function rf(e){return{type:"Alternative",body:rP(e?.body)}}function rb(e,t){let n={type:"Assertion",kind:e};return("word_boundary"===e||"text_segment_boundary"===e)&&(n.negate=!!t?.negate),n}function ry(e,t){let n=!!t?.orphan;return{type:"Backreference",ref:e,...n&&{orphan:n}}}function rk(e,t){var n;let r={name:void 0,isSubroutined:!1,...t};if(void 0!==r.name&&(n=r.name,!/^[\p{Alpha}\p{Pc}][^)]*$/u.test(n)))throw Error(`Group name "${r.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...r.name&&{name:r.name},...r.isSubroutined&&{isSubroutined:r.isSubroutined},body:rE(t?.body)}}function r_(e,t){let n={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?Error(`Invalid code point out of range "\\x{${t}}"`):Error(`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:"Character",value:e}}function rw(e){let t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:rP(e?.body)}}function rC(e,t){let n=!!t?.negate,r={type:"CharacterSet",kind:e};return("digit"===e||"hex"===e||"newline"===e||"space"===e||"word"===e)&&(r.negate=n),"text_segment"!==e&&("newline"!==e||n)||(r.variableLength=!0),r}function rS(e){let t=e?.atomic,n=e?.flags;if(t&&n)throw Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:rE(e?.body)}}function rx(e){let t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:rE(e?.body)}}function rv(e,t,n,r){if(t>n)throw Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function rA(e){return{type:"Subroutine",ref:e}}function rN(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},r=n.unicodePropertyMap?.get(rI(e));if(!r){if(n.normalizeUnknownPropertyNames)r=e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase());else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(n5`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function rE(e){if(void 0===e)e=[rf()];else if(!Array.isArray(e)||!e.length||!e.every(e=>"Alternative"===e.type))throw Error("Invalid body; expected array of one or more Alternative nodes");return e}function rP(e){if(void 0===e)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error("Invalid body; expected array of nodes");return e}function rL(e){return"LookaroundAssertion"===e.type&&"lookahead"===e.kind}function rT(e){return"LookaroundAssertion"===e.type&&"lookbehind"===e.kind}function rI(e){return e.replace(/[- _]+/g,"").toLowerCase()}function r$(e,t){return n8(e,`Unclosed character class${t?.type==="Character"&&93===t.value&&"]"===t.raw?' (started with "]")':""}`)}function rR(e){return n8(e,"Unclosed group")}function rM(e,t,n=null){function r(e,t){for(let n=0;n<e.length;n++){let r=i(e[n],t,n,e);n=Math.max(-1,n+r)}}function i(a,s=null,o=null,l=null){let c=0,u=!1,d={node:a,parent:s,key:o,container:l,root:e,remove(){rG(l).splice(Math.max(0,rB(o)+c),1),c--,u=!0},removeAllNextSiblings:()=>rG(l).splice(rB(o)+1),removeAllPrevSiblings(){let e=rB(o)+c;return c-=e,rG(l).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;l?l[Math.max(0,rB(o)+c)]=e:n8(s,"Can't replace root node")[o]=e,n&&i(e,s,o,l),u=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(rG(l).splice(Math.max(0,rB(o)+c),1,...e),c+=e.length-1,n){let t=0;for(let n=0;n<e.length;n++)t+=i(e[n],s,rB(o)+n+t,l)}u=!0},skip(){u=!0}},{type:h}=a,p=t["*"],m=t[h],g="function"==typeof p?p:p?.enter,f="function"==typeof m?m:m?.enter;if(g?.(d,n),f?.(d,n),!u)switch(h){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":r(a.body,a);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":i(a.min,a,"min"),i(a.max,a,"max");break;case"Quantifier":i(a.body,a,"body");break;case"Regex":r(a.body,a),i(a.flags,a,"flags");break;default:throw Error(`Unexpected node type "${h}"`)}return m?.exit?.(d,n),p?.exit?.(d,n),c}return i(e),e}function rG(e){if(!Array.isArray(e))throw Error("Container expected");return e}function rB(e){if("number"!=typeof e)throw Error("Numeric key expected");return e}let rO=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`,rD=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function rF(e,t,n,r){let i=RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),a=[!1],s=0,o="";for(let t of e.matchAll(i)){let{0:e,groups:{$skip:i}}=t;if(!i&&(!r||r===rD.DEFAULT==!s)){n instanceof Function?o+=n(t,{context:s?rD.CHAR_CLASS:rD.DEFAULT,negated:a[a.length-1]}):o+=n;continue}"["===e[0]?(s++,a.push("^"===e[1])):"]"===e&&s&&(s--,a.pop()),o+=e}return o}function rj(e,t,n){return!!function(e,t,n=0,r){let i;if(!RegExp(t,"su").test(e))return null;let a=RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");a.lastIndex=n;let s=0;for(;i=a.exec(e);){let{0:e,groups:{$skip:t}}=i;if(!t&&(!r||r===rD.DEFAULT==!s))return i;"["===e?s++:"]"===e&&s&&s--,a.lastIndex==i.index&&a.lastIndex++}return null}(e,t,0,n)}let rU=RegExp(String.raw`(?<noncapturingStart>${rO})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu"),rW=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,rH=RegExp(String.raw`
33
+ `,r);return{lastIndex:-1===e?t.length:e}}if(/^\s$/.test(n)){let e=/\s+/y;return e.lastIndex=r,{lastIndex:e.exec(t)?e.lastIndex:r}}}return"."===n?{token:rs("dot",n)}:"^"===n||"$"===n?{token:rn(e.singleline?({"^":n5`\A`,$:n5`\Z`})[n]:n,n)}:"|"===n?{token:{type:"Alternator",raw:n}}:n4.test(n)?{tokens:function(e){let t,n=[],r=RegExp(n4,"gy");for(;t=r.exec(e);){let e=t[0];if("{"===e[0]){let t=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(t){let{min:i,max:a}=t.groups;if(+i>+a&&e.endsWith("?")){r.lastIndex--,n.push(rd(e.slice(0,-1)));continue}}}n.push(rd(e))}return n}(n)}:{token:ri(n2(n),n)}}(a,e,o[0],n9.lastIndex);t.tokens?s.push(...t.tokens):t.token&&s.push(t.token),void 0!==t.lastIndex&&(n9.lastIndex=t.lastIndex)}let l=[],c=0;s.filter(e=>"GroupOpen"===e.type).forEach(e=>{"capturing"===e.kind?e.number=++c:"("===e.raw&&l.push(e)}),c||l.forEach((e,t)=>{e.kind="capturing",e.number=t+1});let u=c||l.length;return{tokens:s.map(e=>"EscapedNumber"===e.type?function(e,t){let{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&("0"!==i&&1===i.length||"0"!==i[0]&&+i<=t))return[rr(n)];let a=[],s=i.match(/^[0-7]+|\d/g);for(let e=0;e<s.length;e++){let t,r=s[e];if(0===e&&"8"!==r&&"9"!==r){if((t=parseInt(r,8))>127)throw Error(n5`Octal encoded byte above 177 unsupported "${n}"`)}else t=n2(r);a.push(ri(t,(0===e?"\\":"")+r))}return a}(e,u):e).flat(),flags:r}}(e,{flags:r.flags,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline}}),a=(e,t)=>{let n=i.tokens[s.nextIndex];switch(s.parent=e,s.nextIndex++,n.type){case"Alternator":return rf();case"Assertion":return function({kind:e}){return rb(n8({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===n5`\B`||e===n5`\Y`})}(n);case"Backreference":return function({raw:e},t){let n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(n,r=!1)=>{let i=t.capturingGroups.length,a=!1;if(n>i)if(t.skipBackrefValidation)a=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,ry(r?i+1-n:n,{orphan:a})};if(n){let n=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(n)return i(+n.groups.num,!!n.groups.sign);if(/[-+]/.test(r))throw Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw Error(`Group name not defined to the left "${e}"`);return ry(r)}return i(+r)}(n,s);case"Character":return r_(n.value,{useLastValid:!!t.isCheckingRangeEnd});case"CharacterClassHyphen":return function(e,t){let{tokens:n,walk:r}=e,i=e.parent,a=i.body.at(-1),s=n[e.nextIndex];if(!t.isCheckingRangeEnd&&a&&"CharacterClass"!==a.type&&"CharacterClassRange"!==a.type&&s&&"CharacterClassOpen"!==s.type&&"CharacterClassClose"!==s.type&&"CharacterClassIntersector"!==s.type){let e=r(i,{...t,isCheckingRangeEnd:!0});if("Character"===a.type&&"Character"===e.type)return i.body.pop(),function(e,t){if(t.value<e.value)throw Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}(a,e);throw Error("Invalid character class range")}return r_(n2("-"))}(s,t);case"CharacterClassOpen":return function({negate:e},t,n){let{tokens:r,walk:i}=t,a=[rw()],s=r[t.nextIndex],o=r$(s);for(;"CharacterClassClose"!==o.type;){if("CharacterClassIntersector"===o.type)a.push(rw()),t.nextIndex++;else{let e=a.at(-1);e.body.push(i(e,n))}o=r$(r[t.nextIndex],s)}let l=rw({negate:e});return 1===a.length?l.body=a[0].body:(l.kind="intersection",l.body=a.map(e=>1===e.body.length?e.body[0]:e)),t.nextIndex++,l}(n,s,t);case"CharacterSet":return function({kind:e,negate:t,value:n},r){let{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:s}=r;if("property"===e){let r=rI(n);if(!n3.has(r)||s?.has(r))return rN(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:s});e="posix",n=r}return"posix"===e?function(e,t){let n=!!t?.negate;if(!n3.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}(n,{negate:t}):rC(e,{negate:t})}(n,s);case"Directive":return function(e,t={}){if("keep"===e)return{type:"Directive",kind:e};if("flags"===e)return{type:"Directive",kind:e,flags:n8(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}(n.kind,{flags:n.flags});case"GroupOpen":return function(e,t,n){var r,i;let{tokens:a,capturingGroups:s,namedGroupsByName:o,skipLookbehindValidation:l,walk:c}=t,u=function({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case"absence_repeater":var a="repeater";!1;return{type:"AbsenceFunction",kind:a,body:rE(void 0)};case"atomic":return rS({atomic:!0});case"capturing":return rk(i,{name:n});case"group":return rS({flags:e});case"lookahead":case"lookbehind":return rv({behind:"lookbehind"===t,negate:r});default:throw Error(`Unexpected group kind "${t}"`)}}(e),d="AbsenceFunction"===u.type,h=rT(u),p=h&&u.negate;if("CapturingGroup"===u.type&&(s.push(u),u.name&&(r=u.name,i=[],o.has(r)||o.set(r,i),o.get(r)).push(u)),d&&n.isInAbsenceFunction)throw Error("Nested absence function not supported by Oniguruma");let m=rR(a[t.nextIndex]);for(;"GroupClose"!==m.type;){if("Alternator"===m.type)u.body.push(rf()),t.nextIndex++;else{let e=u.body.at(-1),t=c(e,{...n,isInAbsenceFunction:n.isInAbsenceFunction||d,isInLookbehind:n.isInLookbehind||h,isInNegLookbehind:n.isInNegLookbehind||p});if(e.body.push(t),(h||n.isInLookbehind)&&!l){let e="Lookbehind includes a pattern not allowed by Oniguruma";if(p||n.isInNegLookbehind){if(rL(t)||"CapturingGroup"===t.type)throw Error(e)}else if(rL(t)||rT(t)&&t.negate)throw Error(e)}}m=rR(a[t.nextIndex])}return t.nextIndex++,u}(n,s,t);case"NamedCallout":var r,a;return r=n.kind,a=n.tag,{type:"NamedCallout",kind:r,tag:a,arguments:n.arguments};case"Quantifier":return function({kind:e,min:t,max:n},r){let i=r.parent,a=i.body.at(-1);if(!a||!rm.has(a.type))throw Error("Quantifier requires a repeatable token");let s=rx(e,t,n,a);return i.body.pop(),s}(n,s);case"Subroutine":return function({raw:e},t){let{capturingGroups:n,subroutines:r}=t,i=e.slice(3,-1),a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(a){let e=+a.groups.num,r=n.length;if(t.hasNumberedRef=!0,(i=({"":e,"+":r+e,"-":r+1-e})[a.groups.sign])<1)throw Error("Invalid subroutine number")}else"0"===i&&(i=0);let s=rA(i);return r.push(s),s}(n,s);default:throw Error(`Unexpected token type "${n.type}"`)}},s={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:r.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:r.skipBackrefValidation,skipLookbehindValidation:r.skipLookbehindValidation,skipPropertyNameValidation:r.skipPropertyNameValidation,subroutines:[],tokens:i.tokens,unicodePropertyMap:r.unicodePropertyMap,walk:a},o=(n={type:"Flags",...i.flags},{type:"Regex",body:rE(void 0),flags:n}),l=o.body[0];for(;s.nextIndex<i.tokens.length;){let e=a(l,{});"Alternative"===e.type?(o.body.push(e),l=e):l.body.push(e)}let{capturingGroups:c,hasNumberedRef:u,namedGroupsByName:d,subroutines:h}=s;if(u&&d.size&&!r.rules.captureGroup)throw Error("Numbered backref/subroutine not allowed when using named capture");for(let{ref:e}of h)if("number"==typeof e){if(e>c.length)throw Error("Subroutine uses a group number that's not defined");e&&(c[e-1].isSubroutined=!0)}else if(d.has(e)){if(d.get(e).length>1)throw Error(n5`Subroutine uses a duplicate group name "\g<${e}>"`);d.get(e)[0].isSubroutined=!0}else throw Error(n5`Subroutine uses a group name that's not defined "\g<${e}>"`);return o}function rf(e){return{type:"Alternative",body:rP(e?.body)}}function rb(e,t){let n={type:"Assertion",kind:e};return("word_boundary"===e||"text_segment_boundary"===e)&&(n.negate=!!t?.negate),n}function ry(e,t){let n=!!t?.orphan;return{type:"Backreference",ref:e,...n&&{orphan:n}}}function rk(e,t){var n;let r={name:void 0,isSubroutined:!1,...t};if(void 0!==r.name&&(n=r.name,!/^[\p{Alpha}\p{Pc}][^)]*$/u.test(n)))throw Error(`Group name "${r.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...r.name&&{name:r.name},...r.isSubroutined&&{isSubroutined:r.isSubroutined},body:rE(t?.body)}}function r_(e,t){let n={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?Error(`Invalid code point out of range "\\x{${t}}"`):Error(`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:"Character",value:e}}function rw(e){let t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:rP(e?.body)}}function rC(e,t){let n=!!t?.negate,r={type:"CharacterSet",kind:e};return("digit"===e||"hex"===e||"newline"===e||"space"===e||"word"===e)&&(r.negate=n),"text_segment"!==e&&("newline"!==e||n)||(r.variableLength=!0),r}function rS(e){let t=e?.atomic,n=e?.flags;if(t&&n)throw Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:rE(e?.body)}}function rv(e){let t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:rE(e?.body)}}function rx(e,t,n,r){if(t>n)throw Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function rA(e){return{type:"Subroutine",ref:e}}function rN(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},r=n.unicodePropertyMap?.get(rI(e));if(!r){if(n.normalizeUnknownPropertyNames)r=e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase());else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(n5`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function rE(e){if(void 0===e)e=[rf()];else if(!Array.isArray(e)||!e.length||!e.every(e=>"Alternative"===e.type))throw Error("Invalid body; expected array of one or more Alternative nodes");return e}function rP(e){if(void 0===e)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error("Invalid body; expected array of nodes");return e}function rL(e){return"LookaroundAssertion"===e.type&&"lookahead"===e.kind}function rT(e){return"LookaroundAssertion"===e.type&&"lookbehind"===e.kind}function rI(e){return e.replace(/[- _]+/g,"").toLowerCase()}function r$(e,t){return n8(e,`Unclosed character class${t?.type==="Character"&&93===t.value&&"]"===t.raw?' (started with "]")':""}`)}function rR(e){return n8(e,"Unclosed group")}function rM(e,t,n=null){function r(e,t){for(let n=0;n<e.length;n++){let r=i(e[n],t,n,e);n=Math.max(-1,n+r)}}function i(a,s=null,o=null,l=null){let c=0,u=!1,d={node:a,parent:s,key:o,container:l,root:e,remove(){rG(l).splice(Math.max(0,rO(o)+c),1),c--,u=!0},removeAllNextSiblings:()=>rG(l).splice(rO(o)+1),removeAllPrevSiblings(){let e=rO(o)+c;return c-=e,rG(l).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;l?l[Math.max(0,rO(o)+c)]=e:n8(s,"Can't replace root node")[o]=e,n&&i(e,s,o,l),u=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(rG(l).splice(Math.max(0,rO(o)+c),1,...e),c+=e.length-1,n){let t=0;for(let n=0;n<e.length;n++)t+=i(e[n],s,rO(o)+n+t,l)}u=!0},skip(){u=!0}},{type:h}=a,p=t["*"],m=t[h],g="function"==typeof p?p:p?.enter,f="function"==typeof m?m:m?.enter;if(g?.(d,n),f?.(d,n),!u)switch(h){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":r(a.body,a);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":i(a.min,a,"min"),i(a.max,a,"max");break;case"Quantifier":i(a.body,a,"body");break;case"Regex":r(a.body,a),i(a.flags,a,"flags");break;default:throw Error(`Unexpected node type "${h}"`)}return m?.exit?.(d,n),p?.exit?.(d,n),c}return i(e),e}function rG(e){if(!Array.isArray(e))throw Error("Container expected");return e}function rO(e){if("number"!=typeof e)throw Error("Numeric key expected");return e}let rB=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`,rD=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function rF(e,t,n,r){let i=RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),a=[!1],s=0,o="";for(let t of e.matchAll(i)){let{0:e,groups:{$skip:i}}=t;if(!i&&(!r||r===rD.DEFAULT==!s)){n instanceof Function?o+=n(t,{context:s?rD.CHAR_CLASS:rD.DEFAULT,negated:a[a.length-1]}):o+=n;continue}"["===e[0]?(s++,a.push("^"===e[1])):"]"===e&&s&&(s--,a.pop()),o+=e}return o}function rU(e,t,n){return!!function(e,t,n=0,r){let i;if(!RegExp(t,"su").test(e))return null;let a=RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");a.lastIndex=n;let s=0;for(;i=a.exec(e);){let{0:e,groups:{$skip:t}}=i;if(!t&&(!r||r===rD.DEFAULT==!s))return i;"["===e?s++:"]"===e&&s&&s--,a.lastIndex==i.index&&a.lastIndex++}return null}(e,t,0,n)}let rj=RegExp(String.raw`(?<noncapturingStart>${rB})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu"),rW=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,rH=RegExp(String.raw`
34
34
  \\(?: \d+
35
35
  | c[A-Za-z]
36
36
  | [gk]<[^>]+>
@@ -135,4 +135,4 @@ Uppercase Upper
135
135
  Variation_Selector VS
136
136
  White_Space space
137
137
  XID_Continue XIDC
138
- XID_Start XIDS`.split(/\s/).map(e=>[rI(e),e])),is=new Map([["s",r2(383)],[r2(383),"s"]]),io=new Map([[r2(223),r2(7838)],[r2(107),r2(8490)],[r2(229),r2(8491)],[r2(969),r2(8486)]]),il=new Map([iu(453),iu(456),iu(459),iu(498),...id(8072,8079),...id(8088,8095),...id(8104,8111),iu(8124),iu(8140),iu(8188)]),ic=new Map([["alnum",r3`[\p{Alpha}\p{Nd}]`],["alpha",r3`\p{Alpha}`],["ascii",r3`\p{ASCII}`],["blank",r3`[\p{Zs}\t]`],["cntrl",r3`\p{Cc}`],["digit",r3`\p{Nd}`],["graph",r3`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",r3`\p{Lower}`],["print",r3`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",r3`[\p{P}\p{S}]`],["space",r3`\p{space}`],["upper",r3`\p{Upper}`],["word",r3`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",r3`\p{AHex}`]]);function iu(e){let t=r2(e);return[t.toLowerCase(),t]}function id(e,t){return(function(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n})(e,t).map(e=>iu(e))}var ih=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]),ip={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:i}=e;if("repeater"===i){let e=rS();e.body[0].body.push(rx({negate:!0,body:r}),rN("Any"));let i=rS();i.body[0].body.push(rv("greedy",0,1/0,e)),n(iA(i,t),{traverse:!0})}else throw Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){let i=e.body.filter(e=>"flags"===e.kind);for(let e=n+1;e<t.body.length;e++)r7(r,t.body[e],[]).push(...i)},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=i_(t.get(e));if(n){let t=rS({flags:n});t.body[0].body=e.body,e.body=[iA(t,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:a,replaceWith:s},o){let{kind:l,negate:c}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:h,wordIsAscii:p}=o;if("text_segment_boundary"===l)throw Error(`Unsupported text segment boundary "\\${c?"Y":"y"}"`);if("line_end"===l)s(iA(rx({body:[rf({body:[rb("string_end")]}),rf({body:[r_(10)]})]}),t));else if("line_start"===l)s(iA(iS(r3`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if("search_start"===l)if(h.has(e))i.flags.sticky=!0,a();else{var m;let e,i=r[n-1];if(i&&((e=["Character","CharacterClass","CharacterSet"]).includes((m=i).type)||"Quantifier"===m.type&&m.min&&e.includes(m.body.type)))s(iA(rx({negate:!0}),t));else if(d)throw Error(r3`Uses "\G" in a way that requires a subclass`);else s(iv(rb("string_start"),t)),o.strategy="clip_search"}else if("string_end"===l||"string_start"===l);else if("string_end_newline"===l)s(iA(iS(r3`(?=\n?\z)`),t));else if("word_boundary"===l){if(!p&&!u){let e=`(?:(?<=${ir})(?!${ir})|(?<!${ir})(?=${ir}))`,n=`(?:(?<=${ir})(?=${ir})|(?<!${ir})(?!${ir}))`;s(iA(iS(c?n:e),t))}}else throw Error(`Unexpected assertion kind "${l}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;"string"!=typeof n||iC(n)||(e.ref=n=ik(n,t))},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!iC(r)&&(e.name=r=ik(r,t)),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){"intersection"===t.kind&&n(iA(rw({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:a,spaceIsAscii:s,wordIsAscii:o}){let{kind:l,negate:c,value:u}=e;if(a&&("digit"===l||"digit"===u))return void n(iv(rC("digit",{negate:c}),t));if(s&&("space"===l||"space"===u))return void n(iA(ix(iS("[ -\r ]"),c),t));if(o&&("word"===l||"word"===u))return void n(iv(rC("word",{negate:c}),t));if("any"===l)n(iv(rN("Any"),t));else if("digit"===l)n(iv(rN("Nd",{negate:c}),t));else if("dot"===l);else if("text_segment"===l){if("strict"===r)throw Error(r3`Use of "\X" requires non-strict accuracy`);let e="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",a=r3`\p{RI}{2}|${e}(?:\u200D${e})*`;n(iA(iS(r3`(?>\r\n|${i?r3`\p{RGI_Emoji}`:a}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if("hex"===l)n(iv(rN("AHex",{negate:c}),t));else if("newline"===l)n(iA(iS(c?"[^\n]":"(?>\r\n?|[\n\v\f\x85\u2028\u2029])"),t));else if("posix"===l)if(i||"graph"!==u&&"print"!==u)n(iA(ix(iS(ic.get(u)),c),t));else{if("strict"===r)throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:"!-~",print:" -~"}[u];c&&(e=`\0-${r2(e.codePointAt(0)-1)}${r2(e.codePointAt(2)+1)}-\u{10FFFF}`),n(iA(iS(`[${e}]`),t))}else if("property"===l)ia.has(rI(u))||(e.key="sc");else if("space"===l)n(iv(rN("space",{negate:c}),t));else if("word"===l)n(iA(ix(iS(ir),c),t));else throw Error(`Unexpected character set kind "${l}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:s}){let{kind:o,flags:l}=e;if("flags"===o)if(l.enable||l.disable){let e=rS({flags:l});e.body[0].body=s(),i(iA(e,t),{traverse:!0})}else r();else if("keep"===o){let e=n.body[0],r=1===n.body.length&&rp(e,{type:"Group"})&&1===e.body[0].body.length?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error(r3`Uses "\K" in a way that's unsupported`);let s=rx({behind:!0});s.body[0].body=a(),i(iA(s,t))}else throw Error(`Unexpected directive kind "${o}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error('Unsupported flag "P"');if("word"===e.textSegmentMode)throw Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,e.flags.enable||e.flags.disable||delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;"lookbehind"===n&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:r}=e;if("fail"===r)n(iA(rx({negate:!0}),t));else throw Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if("Quantifier"===e.body.type){let t=rS();t.body[0].body.push(e.body),e.body=iA(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],r=!1,i=!1;for(let t of e.body)if(1===t.body.length&&"search_start"===t.body[0].kind)t.body.pop();else{let e=function e(t){let n=t.find(e=>"search_start"===e.kind||function(e,t){let n={negate:null,...t};return"LookaroundAssertion"===e.type&&(null===n.negate||e.negate===n.negate)&&1===e.body.length&&rp(e.body[0],{type:"Assertion",kind:"search_start"})}(e,{negate:!1})||!function({type:e}){return"Assertion"===e||"Directive"===e||"LookaroundAssertion"===e}(e));if(!n)return null;if("search_start"===n.kind)return n;if("LookaroundAssertion"===n.type)return n.body[0].body[0];if("CapturingGroup"===n.type||"Group"===n.type){let t=[];for(let r of n.body){let n=e(r.body);if(!n)return null;Array.isArray(n)?t.push(...n):t.push(n)}return t}return null}(t.body);e?(r=!0,Array.isArray(e)?n.push(...e):n.push(e)):i=!0}r&&!i&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if("strict"===t&&n&&r)throw Error(r3`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;"string"!=typeof n||iC(n)||(e.ref=n=ik(n,t))}},im={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:s,openRefs:o,reffedNodesByReferencer:l}){let c=i.get(e);if(c&&o.has(e.number)){let r=iv(iy(e.number),t);l.set(r,o.get(e.number)),n(r);return}o.set(e.number,e),s.set(e.number,[]),e.name&&r7(s,e.name,[]);let u=s.get(e.name??e.number);for(let t=0;t<u.length;t++){let n=u[t];if(c===n.node||c&&c===n.origin||e===n.origin){u.splice(t,1);break}}if(s.get(e.number).push({node:e,origin:c}),e.name&&s.get(e.name).push({node:e,origin:c}),e.name){let t=r7(a,e.name,new Map),n=!1;if(c)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=r6(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){let{isRecursive:i,ref:a}=e;if(i){let n=t;for(;(n=n.parent)&&("CapturingGroup"!==n.type||n.name!==a&&n.number!==a););r.reffedNodesByReferencer.set(e,n);return}let s=r.subroutineRefMap.get(a),o=0===a,l=o?iy(0):function e(t,n,r,i){let a=Array.isArray(t)?[]:{};for(let[s,o]of Object.entries(t))"parent"===s?a.parent=Array.isArray(r)?i:r:o&&"object"==typeof o?a[s]=e(o,n,a,r):("type"===s&&"CapturingGroup"===o&&n.set(a,n.get(t)??t),a[s]=o);return a}(s,r.groupOriginByCopy,null),c=l;if(!o){var u,d;let e=i_(function(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}(s,e=>"Group"===e.type&&!!e.flags)),t=e?r6(r.globalFlags,e):r.globalFlags;u=t,d=r.currentFlags,(u.dotAll!==d.dotAll||u.ignoreCase!==d.ignoreCase)&&(c=rS({flags:function({dotAll:e,ignoreCase:t}){let n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),e&&t||(n.disable={},e||(n.disable.dotAll=!0),t||(n.disable.ignoreCase=!0)),n}(t)})).body[0].body.push(l)}n(iA(c,t),{traverse:!o})}},ig={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}let i=r.reffedNodesByReferencer.get(e).filter(t=>(function(e,t){let n=t;do{if("Regex"===n.type)return!1;if("Alternative"===n.type)continue;if(n===e)return!1;for(let t of iw(n.parent)){if(t===n)break;if(t===e||function e(t,n){for(let r of iw(t)??[])if(r===n||e(r,n))return!0;return!1}(t,e))return!0}}while(n=n.parent);throw Error("Unexpected path")})(t,e));i.length?i.length>1?n(iA(rS({atomic:!0,body:i.reverse().map(e=>rf({body:[ry(e.number)]}))}),t)):e.ref=i[0].number:n(iA(rx({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=rk();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){e.isRecursive&&0!==e.ref&&(e.ref=t.reffedNodesByReferencer.get(e).number)}};function ib(e){rM(e,{"*"({node:e,parent:t}){e.parent=t}})}function iy(e){let t=rA(e);return t.isRecursive=!0,t}function ik(e,t){if(t.has(e))return t.get(e);let n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function i_(e){let t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return(e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete n.disable[t],n.enable[t]=!0),e.disable?.[t]&&(n.disable[t]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable)?n:null}function iw(e){if(!e)throw Error("Node expected");let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function iC(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function iS(e,t){let n=rg(e,{...t,unicodePropertyMap:ia}).body;return n.length>1||n[0].body.length>1?rS({body:n}):n[0].body[0]}function ix(e,t){return e.negate=t,e}function iv(e,t){return e.parent=t,e}function iA(e,t){return ib(e),e.parent=t,e}var iN={"*":{enter({node:e},t){if(iB(e)){let n=t.getCurrentModI();t.pushModI(e.flags?r6({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){iB(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){iR(r2(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),iM(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){"property"===e.kind&&ih.has(e.value)&&t.setHasCasedChar()}},iE={Alternative:({body:e},t,n)=>e.map(n).join(""),Assertion({kind:e,negate:t}){if("string_end"===e)return"$";if("string_start"===e)return"^";if("word_boundary"===e)return t?r3`\B`:r3`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if("number"!=typeof e)throw Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&"strict"===t.accuracy&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){let{body:r,name:i,number:a}=e,s={ignoreCase:t.currentFlags.ignoreCase},o=t.originMap.get(e);return o&&(s.hidden=!0,a>o.number&&(s.transferTo=o.number)),t.captureMap.set(a,s),`(${i?`?<${i}>`:""}${r.map(n).join("|")})`},Character({value:e},t){let n=r2(e),r=iG(e,{escDigit:"Backreference"===t.lastNode.type,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&iR(n)){let e=ii(n);return t.inCharClass?e.join(""):e.length>1?`[${e.join("")}]`:e[0]}return n},CharacterClass(e,t,n){let{kind:r,negate:i,parent:a}=e,{body:s}=e;if("intersection"===r&&!t.useFlagV)throw Error("Use of character class intersection requires min target ES2024");r5.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&s.some(iO)&&(s=[r_(45),...s.filter(e=>!iO(e))]);let o=()=>`[${i?"^":""}${s.map(n).join("intersection"===r?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||r5.bugNestedClassIgnoresNegation)&&!i){let t=s.filter(e=>"CharacterClass"===e.type&&"union"===e.kind&&e.negate);if(t.length){let r=rS(),i=r.body[0];return r.parent=a,i.parent=r,e.body=s=s.filter(e=>!t.includes(e)),s.length?(e.parent=i,i.body.push(e)):r.body.pop(),t.forEach(e=>{let t=rf({body:[e]});e.parent=t,t.parent=r,r.body.push(t)}),n(r)}}t.inCharClass=!0;let r=o();return t.inCharClass=!1,r}let l=s[0];if("union"===r&&!i&&l&&((!t.useFlagV||!t.verbose)&&"union"===a.kind&&!(r5.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&"intersection"===a.kind&&1===s.length&&"CharacterClassRange"!==l.type))return s.map(n).join("");if(!t.useFlagV&&"CharacterClass"===a.type)throw Error("Uses nested character class in a way that requires min target ES2024");return o()},CharacterClassRange(e,t){let n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},a=iG(n,i),s=iG(r,i),o=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&(function(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),n=[],r=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?r??=t[e]:null===r?n.push(t[e]):(n.push([r,t[e]]),r=null);return n})(iM(e)).forEach(e=>{o.add(Array.isArray(e)?`${iG(e[0],i)}-${iG(e[1],i)}`:iG(e,i))}),`${a}-${s}${[...o].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if("dot"===e)return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":r3`[^\n]`;if("digit"===e)return t?r3`\D`:r3`\d`;if("property"===e){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&ih.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?r3`\P`:r3`\p`}{${r?`${r}=`:""}${n}}`}if("word"===e)return t?r3`\W`:r3`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags:(e,t)=>(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":""),Group({atomic:e,body:t,flags:n,parent:r},i,a){let s=i.currentFlags;n&&(i.currentFlags=r6(s,n));let o=t.map(a).join("|"),l=i.verbose||1!==t.length||"Quantifier"===r.type||e||i.useFlagMods&&n?`(?${function(e,t,n){if(e)return">";let r="";if(t&&n){let{enable:e,disable:n}=t;r=(e?.ignoreCase?"i":"")+(e?.dotAll?"s":"")+(n?"-":"")+(n?.ignoreCase?"i":"")+(n?.dotAll?"s":"")}return`${r}:`}(e,n,i.useFlagMods)}${o})`:o;return i.currentFlags=s,l},LookaroundAssertion({body:e,kind:t,negate:n},r,i){let a=`${"lookahead"===t?"":"<"}${n?"!":"="}`;return`(?${a}${e.map(i).join("|")})`},Quantifier:(e,t,n)=>n(e.body)+function({kind:e,max:t,min:n}){return(n||1!==t?n||t!==1/0?1===n&&t===1/0?"+":n===t?`{${n}}`:`{${n},${t===1/0?"":t}}`:"*":"?")+({greedy:"",lazy:"?",possessive:"+"})[e]}(e),Subroutine({isRecursive:e,ref:t},n){if(!e)throw Error("Unexpected non-recursive subroutine in transformed AST");let r=n.recursionLimit;return 0===t?`(?R=${r})`:r3`\g<${t}&R=${r}>`}},iP=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),iL=new Set(["-","\\","]","^","["]),iT=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),iI=new Map([[9,r3`\t`],[10,r3`\n`],[11,r3`\v`],[12,r3`\f`],[13,r3`\r`],[8232,r3`\u2028`],[8233,r3`\u2029`],[65279,r3`\uFEFF`]]),i$=/^\p{Cased}$/u;function iR(e){return i$.test(e)}function iM(e,t){let n=!!t?.firstOnly,r=e.min.value,i=e.max.value,a=[];if(r<65&&(65535===i||i>=131071)||65536===r&&i>=131071)return a;for(let e=r;e<=i;e++){let t=r2(e);if(!iR(t))continue;let s=ii(t).filter(e=>{let t=e.codePointAt(0);return t<r||t>i});if(s.length&&(a.push(...s),n))break}return a}function iG(e,{escDigit:t,inCharClass:n,useFlagV:r}){var i;if(iI.has(e))return iI.get(e);if(e<32||e>126&&e<160||e>262143||t&&(i=e)>47&&i<58)return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;let a=r2(e);return((n?r?iT:iL:iP).has(a)?"\\":"")+a}function iB({type:e}){return"CapturingGroup"===e||"Group"===e||"LookaroundAssertion"===e}function iO({type:e,value:t}){return"Character"===e&&45===t}var iD=class e extends RegExp{#e=new Map;#t=null;#n;#r=null;#i=null;rawOptions={};get source(){return this.#n||"(?:)"}constructor(t,n,r){const i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw Error("Cannot provide options when copying a regexp");super(t,n),this.#n=t.source,t instanceof e&&(this.#e=t.#e,this.#r=t.#r,this.#i=t.#i,this.rawOptions=t.rawOptions)}else{const e={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?"":t,n),this.#n=t,this.#e=function(e,t){let n=new Map;for(let t of e)n.set(t,{hidden:!0});for(let[e,r]of t)for(let t of r)r7(n,t,{}).transferTo=e;return n}(e.hiddenCaptures,e.transfers),this.#i=e.strategy,this.rawOptions=r??{}}i||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...n}=this.rawOptions;this.#t=new e(this.#n,this.flags,n)}let n=this.global||this.sticky,r=this.lastIndex;if("clip_search"===this.#i&&n&&r){this.lastIndex=0;let e=this.#a(t.slice(r));return e&&(function(e,t,n,r){if(e.index+=t,e.input=n,r){let n=e.indices;for(let e=0;e<n.length;e++){let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])}let r=n.groups;r&&Object.keys(r).forEach(e=>{let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])})}}(e,r,t,this.hasIndices),this.lastIndex+=r),e}return this.#a(t)}#a(e){let t;this.#t.lastIndex=this.lastIndex;let n=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!n||!this.#e.size)return n;let r=[...n];n.length=1,this.hasIndices&&(t=[...n.indices],n.indices.length=1);let i=[0];for(let e=1;e<r.length;e++){let{hidden:a,transferTo:s}=this.#e.get(e)??{};if(a?i.push(null):(i.push(n.length),n.push(r[e]),this.hasIndices&&n.indices.push(t[e])),s&&void 0!==r[e]){let a=i[s];if(!a)throw Error(`Invalid capture transfer to "${a}"`);if(n[a]=r[e],this.hasIndices&&(n.indices[a]=t[e]),n.groups){this.#r||(this.#r=function(e){let t,n=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,r=new Map,i=0,a=0;for(;t=n.exec(e);){let{0:e,groups:{capture:n,name:s}}=t;"["===e?i++:i?"]"===e&&i--:n&&(a++,s&&r.set(a,s))}return r}(this.source));let i=this.#r.get(s);i&&(n.groups[i]=r[e],this.hasIndices&&(n.indices.groups[i]=t[e]))}}}return n}};function iF(e,t){let n;return(n=function(e,t){var n;let r,i,a,s,o=ie(t),l=(n=rg(e,{flags:o.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:o.rules.captureGroup,singleline:o.rules.singleline},skipBackrefValidation:o.rules.allowOrphanBackrefs,unicodePropertyMap:ia}),r={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...{accuracy:o.accuracy,asciiWordBoundaries:o.rules.asciiWordBoundaries,avoidSubclass:o.avoidSubclass,bestEffortTarget:o.target}},ib(n),i={accuracy:r.accuracy,asciiWordBoundaries:r.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:r4[r.bestEffortTarget]>=r4.ES2024,passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:n.flags.digitIsAscii,spaceIsAscii:n.flags.spaceIsAscii,wordIsAscii:n.flags.wordIsAscii},rM(n,ip,i),s={currentFlags:a={dotAll:n.flags.dotAll,ignoreCase:n.flags.ignoreCase},prevFlags:null,globalFlags:a,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:i.subroutineRefMap},rM(n,im,s),rM(n,ig,{groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer}),n._originMap=s.groupOriginByCopy,n._strategy=i.strategy,n),c=function(e,t){let n=ie(t),r=r4[n.target]>=r4.ES2024,i=r4[n.target]>=r4.ES2025,a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw Error("Invalid recursionLimit; use 2-20");let s=null,o=null;if(!i){let t=[e.flags.ignoreCase];rM(e,iN,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?s=!0:o=!0}})}let l={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||s)&&!o)},c=e,u={accuracy:n.accuracy,appliedGlobalFlags:l,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:c,originMap:e._originMap,recursionLimit:a,useAppliedIgnoreCase:!!(!i&&s&&o),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(e){return u.lastNode=c,c=e,(function(e,t){if(null==e)throw Error(t??"Value expected");return e})(iE[e.type],`Unexpected node type "${e.type}"`)(e,u,d)}let h={pattern:e.body.map(d).join("|"),flags:d(e.flags),options:{...e.options}};return r||(delete h.options.force.v,h.options.disable.v=!0,h.options.unicodeSetsPlugin=null),h._captureTransfers=new Map,h._hiddenCaptures=[],u.captureMap.forEach((e,t)=>{e.hidden&&h._hiddenCaptures.push(t),e.transferTo&&r7(h._captureTransfers,e.transferTo,[]).push(t)}),h}(l,o),u=function(e,t){let n,{hiddenCaptures:r,mode:i}={hiddenCaptures:[],mode:"plugin",...t},a=t?.captureTransfers??new Map;if(!RegExp(rV,"su").test(e))return{pattern:e,captureTransfers:a,hiddenCaptures:r};if("plugin"===i&&rj(e,rq`\(\?\(DEFINE\)`,rD.DEFAULT))throw Error("DEFINE groups cannot be used with recursion");let s=[],o=rj(e,rq`\\[1-9]`,rD.DEFAULT),l=new Map,c=[],u=!1,d=0,h=0;for(rJ.lastIndex=0;n=rJ.exec(e);){let{0:t,groups:{captureName:p,rDepth:m,gRNameOrNum:g,gRDepth:f}}=n;if("["===t)d++;else if(d)"]"===t&&d--;else if(m){if(rK(m),u)throw Error(rZ);if(o)throw Error(`${"external"===i?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);let t=e.slice(0,n.index),l=e.slice(rJ.lastIndex);if(rj(l,rV,rD.DEFAULT))throw Error(rZ);let c=m-1;e=rY(t,l,c,!1,r,s,h),a=r1(a,t,c,s.length,0,h);break}else if(g){rK(f);let d=!1;for(let e of c)if(e.name===g||e.num===+g){if(d=!0,e.hasRecursedWithin)throw Error(rZ);break}if(!d)throw Error(rq`Recursive \g cannot be used outside the referenced group "${"external"===i?g:rq`\g<${g}&R=${f}>`}"`);let p=l.get(g),m=function(e,t){let n,r=/\\?./gsu;r.lastIndex=t;let i=e.length,a=0,s=1;for(;n=r.exec(e);){let[e]=n;if("["===e)a++;else if(a)"]"===e&&a--;else if("("===e)s++;else if(")"===e&&!--s){i=n.index;break}}return e.slice(t,i)}(e,p);if(o&&rj(m,rq`${rX}|\((?!\?)`,rD.DEFAULT))throw Error(`${"external"===i?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);let b=e.slice(p,n.index),y=m.slice(b.length+t.length),k=s.length,_=f-1,w=rY(b,y,_,!0,r,s,h);a=r1(a,b,_,s.length-k,k,h);let C=e.slice(0,p),S=e.slice(p+m.length);e=`${C}${w}${S}`,rJ.lastIndex+=w.length-t.length-b.length-y.length,c.forEach(e=>e.hasRecursedWithin=!0),u=!0}else if(p)h++,l.set(String(h),rJ.lastIndex),l.set(p,rJ.lastIndex),c.push({num:h,name:p});else if("("===t[0]){let e="("===t;e&&(h++,l.set(String(h),rJ.lastIndex)),c.push(e?{num:h}:{})}else")"===t&&c.pop()}return r.push(...s),{pattern:e,captureTransfers:a,hiddenCaptures:r}}(c.pattern,{captureTransfers:c._captureTransfers,hiddenCaptures:c._hiddenCaptures,mode:"external"}),d=function(e,t){let n,r=t?.hiddenCaptures??[],i=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:r};let a="(?:(?=(",s=[0],o=[],l=0,c=0,u=NaN;do{let t;n=!1;let d=0,h=0,p=!1;for(rU.lastIndex=Number.isNaN(u)?0:u+a.length;t=rU.exec(e);){let{0:m,index:g,groups:{capturingStart:f,noncapturingStart:b}}=t;if("["===m)d++;else if(d)"]"===m&&d--;else if("(?>"!==m||p){if(p&&b)h++;else if(f)p?h++:(l++,s.push(l+c));else if(")"===m&&p){if(!h){let t=l+ ++c;e=`${e.slice(0,u)}${a}${e.slice(u+3,g)}))<$$${t}>)${e.slice(g+1)}`,n=!0,o.push(t);for(let e=0;e<r.length;e++)r[e]>=t&&r[e]++;if(i.size){let e=new Map;i.forEach((n,r)=>{e.set(r>=t?r+1:r,n.map(e=>e>=t?e+1:e))}),i=e}break}h--}}else u=g,p=!0}}while(n);return r.push(...o),{pattern:e=rF(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:n}})=>{if(t){let n=+t;if(n>s.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${s[n]}`}return`\\${n}`},rD.DEFAULT),captureTransfers:i,hiddenCaptures:r}}(function(e){let t;if(!RegExp(`${rW}\\+`).test(e))return{pattern:e};let n=[],r=null,i=null,a="",s=0;for(rH.lastIndex=0;t=rH.exec(e);){let{0:c,index:u,groups:{qBase:d,qMod:h,invalidQ:p}}=t;if("["===c)s||(i=u),s++;else if("]"===c)s?s--:i=null;else if(!s)if("+"===h&&a&&!a.startsWith("(")){if(p)throw Error(`Invalid quantifier "${c}"`);let t=-1;if(/^\{\d+\}$/.test(d)){var o,l;o=e,l=u+d.length,e=o.slice(0,l)+""+o.slice(l+h.length)}else{if(")"===a||"]"===a){let t=")"===a?r:i;if(null===t)throw Error(`Invalid unmatched "${a}"`);e=`${e.slice(0,t)}(?>${e.slice(t,u)}${d})${e.slice(u+c.length)}`}else e=`${e.slice(0,u-a.length)}(?>${a}${d})${e.slice(u+c.length)}`;t+=4}rH.lastIndex+=t}else"("===c[0]?n.push(u):")"===c&&(r=n.length?n.pop():null);a=c}return{pattern:e}}(u.pattern).pattern,{captureTransfers:u.captureTransfers,hiddenCaptures:u.hiddenCaptures}),h={pattern:d.pattern,flags:`${o.hasIndices?"d":""}${o.global?"g":""}${c.flags}${c.options.disable.v?"u":"v"}`};if(o.avoidSubclass){if(o.lazyCompileLength!==1/0)throw Error("Lazy compilation requires subclass")}else{let e=d.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(d.captureTransfers),n=l._strategy,r=h.pattern.length>=o.lazyCompileLength;(e.length||t.length||n||r)&&(h.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...n&&{strategy:n},...r&&{lazyCompile:r}})}return h}(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})).options?new iD(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function ij(e={}){let t={target:"auto",cache:new Map,...e};return t.regexConstructor||=e=>iF(e,{target:t.target}),{createScanner:e=>new n1(e,t),createString:e=>({content:e})}}g(p({bundledLanguages:()=>k,bundledLanguagesAlias:()=>y,bundledLanguagesBase:()=>b,bundledLanguagesInfo:()=>f,bundledThemes:()=>w,bundledThemesInfo:()=>_,codeToHast:()=>nQ,codeToHtml:()=>nX,codeToTokens:()=>nJ,codeToTokensBase:()=>nZ,codeToTokensWithThemes:()=>nK,createHighlighter:()=>nV,createJavaScriptRegexEngine:()=>ij,createOnigurumaEngine:()=>B,defaultJavaScriptRegexConstructor:()=>iF,getLastGrammarState:()=>n0,getSingletonHighlighter:()=>nY,loadWasm:()=>$}),nz)}}]);
138
+ XID_Start XIDS`.split(/\s/).map(e=>[rI(e),e])),is=new Map([["s",r2(383)],[r2(383),"s"]]),io=new Map([[r2(223),r2(7838)],[r2(107),r2(8490)],[r2(229),r2(8491)],[r2(969),r2(8486)]]),il=new Map([iu(453),iu(456),iu(459),iu(498),...id(8072,8079),...id(8088,8095),...id(8104,8111),iu(8124),iu(8140),iu(8188)]),ic=new Map([["alnum",r3`[\p{Alpha}\p{Nd}]`],["alpha",r3`\p{Alpha}`],["ascii",r3`\p{ASCII}`],["blank",r3`[\p{Zs}\t]`],["cntrl",r3`\p{Cc}`],["digit",r3`\p{Nd}`],["graph",r3`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",r3`\p{Lower}`],["print",r3`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",r3`[\p{P}\p{S}]`],["space",r3`\p{space}`],["upper",r3`\p{Upper}`],["word",r3`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",r3`\p{AHex}`]]);function iu(e){let t=r2(e);return[t.toLowerCase(),t]}function id(e,t){return(function(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n})(e,t).map(e=>iu(e))}var ih=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]),ip={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:i}=e;if("repeater"===i){let e=rS();e.body[0].body.push(rv({negate:!0,body:r}),rN("Any"));let i=rS();i.body[0].body.push(rx("greedy",0,1/0,e)),n(iA(i,t),{traverse:!0})}else throw Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){let i=e.body.filter(e=>"flags"===e.kind);for(let e=n+1;e<t.body.length;e++)r7(r,t.body[e],[]).push(...i)},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=i_(t.get(e));if(n){let t=rS({flags:n});t.body[0].body=e.body,e.body=[iA(t,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:a,replaceWith:s},o){let{kind:l,negate:c}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:h,wordIsAscii:p}=o;if("text_segment_boundary"===l)throw Error(`Unsupported text segment boundary "\\${c?"Y":"y"}"`);if("line_end"===l)s(iA(rv({body:[rf({body:[rb("string_end")]}),rf({body:[r_(10)]})]}),t));else if("line_start"===l)s(iA(iS(r3`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if("search_start"===l)if(h.has(e))i.flags.sticky=!0,a();else{var m;let e,i=r[n-1];if(i&&((e=["Character","CharacterClass","CharacterSet"]).includes((m=i).type)||"Quantifier"===m.type&&m.min&&e.includes(m.body.type)))s(iA(rv({negate:!0}),t));else if(d)throw Error(r3`Uses "\G" in a way that requires a subclass`);else s(ix(rb("string_start"),t)),o.strategy="clip_search"}else if("string_end"===l||"string_start"===l);else if("string_end_newline"===l)s(iA(iS(r3`(?=\n?\z)`),t));else if("word_boundary"===l){if(!p&&!u){let e=`(?:(?<=${ir})(?!${ir})|(?<!${ir})(?=${ir}))`,n=`(?:(?<=${ir})(?=${ir})|(?<!${ir})(?!${ir}))`;s(iA(iS(c?n:e),t))}}else throw Error(`Unexpected assertion kind "${l}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;"string"!=typeof n||iC(n)||(e.ref=n=ik(n,t))},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!iC(r)&&(e.name=r=ik(r,t)),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){"intersection"===t.kind&&n(iA(rw({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:a,spaceIsAscii:s,wordIsAscii:o}){let{kind:l,negate:c,value:u}=e;if(a&&("digit"===l||"digit"===u))return void n(ix(rC("digit",{negate:c}),t));if(s&&("space"===l||"space"===u))return void n(iA(iv(iS("[ -\r ]"),c),t));if(o&&("word"===l||"word"===u))return void n(ix(rC("word",{negate:c}),t));if("any"===l)n(ix(rN("Any"),t));else if("digit"===l)n(ix(rN("Nd",{negate:c}),t));else if("dot"===l);else if("text_segment"===l){if("strict"===r)throw Error(r3`Use of "\X" requires non-strict accuracy`);let e="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",a=r3`\p{RI}{2}|${e}(?:\u200D${e})*`;n(iA(iS(r3`(?>\r\n|${i?r3`\p{RGI_Emoji}`:a}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if("hex"===l)n(ix(rN("AHex",{negate:c}),t));else if("newline"===l)n(iA(iS(c?"[^\n]":"(?>\r\n?|[\n\v\f\x85\u2028\u2029])"),t));else if("posix"===l)if(i||"graph"!==u&&"print"!==u)n(iA(iv(iS(ic.get(u)),c),t));else{if("strict"===r)throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:"!-~",print:" -~"}[u];c&&(e=`\0-${r2(e.codePointAt(0)-1)}${r2(e.codePointAt(2)+1)}-\u{10FFFF}`),n(iA(iS(`[${e}]`),t))}else if("property"===l)ia.has(rI(u))||(e.key="sc");else if("space"===l)n(ix(rN("space",{negate:c}),t));else if("word"===l)n(iA(iv(iS(ir),c),t));else throw Error(`Unexpected character set kind "${l}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:s}){let{kind:o,flags:l}=e;if("flags"===o)if(l.enable||l.disable){let e=rS({flags:l});e.body[0].body=s(),i(iA(e,t),{traverse:!0})}else r();else if("keep"===o){let e=n.body[0],r=1===n.body.length&&rp(e,{type:"Group"})&&1===e.body[0].body.length?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error(r3`Uses "\K" in a way that's unsupported`);let s=rv({behind:!0});s.body[0].body=a(),i(iA(s,t))}else throw Error(`Unexpected directive kind "${o}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error('Unsupported flag "P"');if("word"===e.textSegmentMode)throw Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,e.flags.enable||e.flags.disable||delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;"lookbehind"===n&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:r}=e;if("fail"===r)n(iA(rv({negate:!0}),t));else throw Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if("Quantifier"===e.body.type){let t=rS();t.body[0].body.push(e.body),e.body=iA(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],r=!1,i=!1;for(let t of e.body)if(1===t.body.length&&"search_start"===t.body[0].kind)t.body.pop();else{let e=function e(t){let n=t.find(e=>"search_start"===e.kind||function(e,t){let n={negate:null,...t};return"LookaroundAssertion"===e.type&&(null===n.negate||e.negate===n.negate)&&1===e.body.length&&rp(e.body[0],{type:"Assertion",kind:"search_start"})}(e,{negate:!1})||!function({type:e}){return"Assertion"===e||"Directive"===e||"LookaroundAssertion"===e}(e));if(!n)return null;if("search_start"===n.kind)return n;if("LookaroundAssertion"===n.type)return n.body[0].body[0];if("CapturingGroup"===n.type||"Group"===n.type){let t=[];for(let r of n.body){let n=e(r.body);if(!n)return null;Array.isArray(n)?t.push(...n):t.push(n)}return t}return null}(t.body);e?(r=!0,Array.isArray(e)?n.push(...e):n.push(e)):i=!0}r&&!i&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if("strict"===t&&n&&r)throw Error(r3`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;"string"!=typeof n||iC(n)||(e.ref=n=ik(n,t))}},im={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:s,openRefs:o,reffedNodesByReferencer:l}){let c=i.get(e);if(c&&o.has(e.number)){let r=ix(iy(e.number),t);l.set(r,o.get(e.number)),n(r);return}o.set(e.number,e),s.set(e.number,[]),e.name&&r7(s,e.name,[]);let u=s.get(e.name??e.number);for(let t=0;t<u.length;t++){let n=u[t];if(c===n.node||c&&c===n.origin||e===n.origin){u.splice(t,1);break}}if(s.get(e.number).push({node:e,origin:c}),e.name&&s.get(e.name).push({node:e,origin:c}),e.name){let t=r7(a,e.name,new Map),n=!1;if(c)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=r6(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){let{isRecursive:i,ref:a}=e;if(i){let n=t;for(;(n=n.parent)&&("CapturingGroup"!==n.type||n.name!==a&&n.number!==a););r.reffedNodesByReferencer.set(e,n);return}let s=r.subroutineRefMap.get(a),o=0===a,l=o?iy(0):function e(t,n,r,i){let a=Array.isArray(t)?[]:{};for(let[s,o]of Object.entries(t))"parent"===s?a.parent=Array.isArray(r)?i:r:o&&"object"==typeof o?a[s]=e(o,n,a,r):("type"===s&&"CapturingGroup"===o&&n.set(a,n.get(t)??t),a[s]=o);return a}(s,r.groupOriginByCopy,null),c=l;if(!o){var u,d;let e=i_(function(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}(s,e=>"Group"===e.type&&!!e.flags)),t=e?r6(r.globalFlags,e):r.globalFlags;u=t,d=r.currentFlags,(u.dotAll!==d.dotAll||u.ignoreCase!==d.ignoreCase)&&(c=rS({flags:function({dotAll:e,ignoreCase:t}){let n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),e&&t||(n.disable={},e||(n.disable.dotAll=!0),t||(n.disable.ignoreCase=!0)),n}(t)})).body[0].body.push(l)}n(iA(c,t),{traverse:!o})}},ig={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}let i=r.reffedNodesByReferencer.get(e).filter(t=>(function(e,t){let n=t;do{if("Regex"===n.type)return!1;if("Alternative"===n.type)continue;if(n===e)return!1;for(let t of iw(n.parent)){if(t===n)break;if(t===e||function e(t,n){for(let r of iw(t)??[])if(r===n||e(r,n))return!0;return!1}(t,e))return!0}}while(n=n.parent);throw Error("Unexpected path")})(t,e));i.length?i.length>1?n(iA(rS({atomic:!0,body:i.reverse().map(e=>rf({body:[ry(e.number)]}))}),t)):e.ref=i[0].number:n(iA(rv({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=rk();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){e.isRecursive&&0!==e.ref&&(e.ref=t.reffedNodesByReferencer.get(e).number)}};function ib(e){rM(e,{"*"({node:e,parent:t}){e.parent=t}})}function iy(e){let t=rA(e);return t.isRecursive=!0,t}function ik(e,t){if(t.has(e))return t.get(e);let n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function i_(e){let t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return(e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete n.disable[t],n.enable[t]=!0),e.disable?.[t]&&(n.disable[t]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable)?n:null}function iw(e){if(!e)throw Error("Node expected");let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function iC(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function iS(e,t){let n=rg(e,{...t,unicodePropertyMap:ia}).body;return n.length>1||n[0].body.length>1?rS({body:n}):n[0].body[0]}function iv(e,t){return e.negate=t,e}function ix(e,t){return e.parent=t,e}function iA(e,t){return ib(e),e.parent=t,e}var iN={"*":{enter({node:e},t){if(iO(e)){let n=t.getCurrentModI();t.pushModI(e.flags?r6({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){iO(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){iR(r2(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),iM(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){"property"===e.kind&&ih.has(e.value)&&t.setHasCasedChar()}},iE={Alternative:({body:e},t,n)=>e.map(n).join(""),Assertion({kind:e,negate:t}){if("string_end"===e)return"$";if("string_start"===e)return"^";if("word_boundary"===e)return t?r3`\B`:r3`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if("number"!=typeof e)throw Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&"strict"===t.accuracy&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){let{body:r,name:i,number:a}=e,s={ignoreCase:t.currentFlags.ignoreCase},o=t.originMap.get(e);return o&&(s.hidden=!0,a>o.number&&(s.transferTo=o.number)),t.captureMap.set(a,s),`(${i?`?<${i}>`:""}${r.map(n).join("|")})`},Character({value:e},t){let n=r2(e),r=iG(e,{escDigit:"Backreference"===t.lastNode.type,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&iR(n)){let e=ii(n);return t.inCharClass?e.join(""):e.length>1?`[${e.join("")}]`:e[0]}return n},CharacterClass(e,t,n){let{kind:r,negate:i,parent:a}=e,{body:s}=e;if("intersection"===r&&!t.useFlagV)throw Error("Use of character class intersection requires min target ES2024");r5.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&s.some(iB)&&(s=[r_(45),...s.filter(e=>!iB(e))]);let o=()=>`[${i?"^":""}${s.map(n).join("intersection"===r?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||r5.bugNestedClassIgnoresNegation)&&!i){let t=s.filter(e=>"CharacterClass"===e.type&&"union"===e.kind&&e.negate);if(t.length){let r=rS(),i=r.body[0];return r.parent=a,i.parent=r,e.body=s=s.filter(e=>!t.includes(e)),s.length?(e.parent=i,i.body.push(e)):r.body.pop(),t.forEach(e=>{let t=rf({body:[e]});e.parent=t,t.parent=r,r.body.push(t)}),n(r)}}t.inCharClass=!0;let r=o();return t.inCharClass=!1,r}let l=s[0];if("union"===r&&!i&&l&&((!t.useFlagV||!t.verbose)&&"union"===a.kind&&!(r5.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&"intersection"===a.kind&&1===s.length&&"CharacterClassRange"!==l.type))return s.map(n).join("");if(!t.useFlagV&&"CharacterClass"===a.type)throw Error("Uses nested character class in a way that requires min target ES2024");return o()},CharacterClassRange(e,t){let n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},a=iG(n,i),s=iG(r,i),o=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&(function(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),n=[],r=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?r??=t[e]:null===r?n.push(t[e]):(n.push([r,t[e]]),r=null);return n})(iM(e)).forEach(e=>{o.add(Array.isArray(e)?`${iG(e[0],i)}-${iG(e[1],i)}`:iG(e,i))}),`${a}-${s}${[...o].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if("dot"===e)return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":r3`[^\n]`;if("digit"===e)return t?r3`\D`:r3`\d`;if("property"===e){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&ih.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?r3`\P`:r3`\p`}{${r?`${r}=`:""}${n}}`}if("word"===e)return t?r3`\W`:r3`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags:(e,t)=>(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":""),Group({atomic:e,body:t,flags:n,parent:r},i,a){let s=i.currentFlags;n&&(i.currentFlags=r6(s,n));let o=t.map(a).join("|"),l=i.verbose||1!==t.length||"Quantifier"===r.type||e||i.useFlagMods&&n?`(?${function(e,t,n){if(e)return">";let r="";if(t&&n){let{enable:e,disable:n}=t;r=(e?.ignoreCase?"i":"")+(e?.dotAll?"s":"")+(n?"-":"")+(n?.ignoreCase?"i":"")+(n?.dotAll?"s":"")}return`${r}:`}(e,n,i.useFlagMods)}${o})`:o;return i.currentFlags=s,l},LookaroundAssertion({body:e,kind:t,negate:n},r,i){let a=`${"lookahead"===t?"":"<"}${n?"!":"="}`;return`(?${a}${e.map(i).join("|")})`},Quantifier:(e,t,n)=>n(e.body)+function({kind:e,max:t,min:n}){return(n||1!==t?n||t!==1/0?1===n&&t===1/0?"+":n===t?`{${n}}`:`{${n},${t===1/0?"":t}}`:"*":"?")+({greedy:"",lazy:"?",possessive:"+"})[e]}(e),Subroutine({isRecursive:e,ref:t},n){if(!e)throw Error("Unexpected non-recursive subroutine in transformed AST");let r=n.recursionLimit;return 0===t?`(?R=${r})`:r3`\g<${t}&R=${r}>`}},iP=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),iL=new Set(["-","\\","]","^","["]),iT=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),iI=new Map([[9,r3`\t`],[10,r3`\n`],[11,r3`\v`],[12,r3`\f`],[13,r3`\r`],[8232,r3`\u2028`],[8233,r3`\u2029`],[65279,r3`\uFEFF`]]),i$=/^\p{Cased}$/u;function iR(e){return i$.test(e)}function iM(e,t){let n=!!t?.firstOnly,r=e.min.value,i=e.max.value,a=[];if(r<65&&(65535===i||i>=131071)||65536===r&&i>=131071)return a;for(let e=r;e<=i;e++){let t=r2(e);if(!iR(t))continue;let s=ii(t).filter(e=>{let t=e.codePointAt(0);return t<r||t>i});if(s.length&&(a.push(...s),n))break}return a}function iG(e,{escDigit:t,inCharClass:n,useFlagV:r}){var i;if(iI.has(e))return iI.get(e);if(e<32||e>126&&e<160||e>262143||t&&(i=e)>47&&i<58)return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;let a=r2(e);return((n?r?iT:iL:iP).has(a)?"\\":"")+a}function iO({type:e}){return"CapturingGroup"===e||"Group"===e||"LookaroundAssertion"===e}function iB({type:e,value:t}){return"Character"===e&&45===t}var iD=class e extends RegExp{#e=new Map;#t=null;#n;#r=null;#i=null;rawOptions={};get source(){return this.#n||"(?:)"}constructor(t,n,r){const i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw Error("Cannot provide options when copying a regexp");super(t,n),this.#n=t.source,t instanceof e&&(this.#e=t.#e,this.#r=t.#r,this.#i=t.#i,this.rawOptions=t.rawOptions)}else{const e={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?"":t,n),this.#n=t,this.#e=function(e,t){let n=new Map;for(let t of e)n.set(t,{hidden:!0});for(let[e,r]of t)for(let t of r)r7(n,t,{}).transferTo=e;return n}(e.hiddenCaptures,e.transfers),this.#i=e.strategy,this.rawOptions=r??{}}i||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...n}=this.rawOptions;this.#t=new e(this.#n,this.flags,n)}let n=this.global||this.sticky,r=this.lastIndex;if("clip_search"===this.#i&&n&&r){this.lastIndex=0;let e=this.#a(t.slice(r));return e&&(function(e,t,n,r){if(e.index+=t,e.input=n,r){let n=e.indices;for(let e=0;e<n.length;e++){let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])}let r=n.groups;r&&Object.keys(r).forEach(e=>{let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])})}}(e,r,t,this.hasIndices),this.lastIndex+=r),e}return this.#a(t)}#a(e){let t;this.#t.lastIndex=this.lastIndex;let n=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!n||!this.#e.size)return n;let r=[...n];n.length=1,this.hasIndices&&(t=[...n.indices],n.indices.length=1);let i=[0];for(let e=1;e<r.length;e++){let{hidden:a,transferTo:s}=this.#e.get(e)??{};if(a?i.push(null):(i.push(n.length),n.push(r[e]),this.hasIndices&&n.indices.push(t[e])),s&&void 0!==r[e]){let a=i[s];if(!a)throw Error(`Invalid capture transfer to "${a}"`);if(n[a]=r[e],this.hasIndices&&(n.indices[a]=t[e]),n.groups){this.#r||(this.#r=function(e){let t,n=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,r=new Map,i=0,a=0;for(;t=n.exec(e);){let{0:e,groups:{capture:n,name:s}}=t;"["===e?i++:i?"]"===e&&i--:n&&(a++,s&&r.set(a,s))}return r}(this.source));let i=this.#r.get(s);i&&(n.groups[i]=r[e],this.hasIndices&&(n.indices.groups[i]=t[e]))}}}return n}};function iF(e,t){let n;return(n=function(e,t){var n;let r,i,a,s,o=ie(t),l=(n=rg(e,{flags:o.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:o.rules.captureGroup,singleline:o.rules.singleline},skipBackrefValidation:o.rules.allowOrphanBackrefs,unicodePropertyMap:ia}),r={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...{accuracy:o.accuracy,asciiWordBoundaries:o.rules.asciiWordBoundaries,avoidSubclass:o.avoidSubclass,bestEffortTarget:o.target}},ib(n),i={accuracy:r.accuracy,asciiWordBoundaries:r.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:r4[r.bestEffortTarget]>=r4.ES2024,passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:n.flags.digitIsAscii,spaceIsAscii:n.flags.spaceIsAscii,wordIsAscii:n.flags.wordIsAscii},rM(n,ip,i),s={currentFlags:a={dotAll:n.flags.dotAll,ignoreCase:n.flags.ignoreCase},prevFlags:null,globalFlags:a,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:i.subroutineRefMap},rM(n,im,s),rM(n,ig,{groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer}),n._originMap=s.groupOriginByCopy,n._strategy=i.strategy,n),c=function(e,t){let n=ie(t),r=r4[n.target]>=r4.ES2024,i=r4[n.target]>=r4.ES2025,a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw Error("Invalid recursionLimit; use 2-20");let s=null,o=null;if(!i){let t=[e.flags.ignoreCase];rM(e,iN,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?s=!0:o=!0}})}let l={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||s)&&!o)},c=e,u={accuracy:n.accuracy,appliedGlobalFlags:l,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:c,originMap:e._originMap,recursionLimit:a,useAppliedIgnoreCase:!!(!i&&s&&o),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(e){return u.lastNode=c,c=e,(function(e,t){if(null==e)throw Error(t??"Value expected");return e})(iE[e.type],`Unexpected node type "${e.type}"`)(e,u,d)}let h={pattern:e.body.map(d).join("|"),flags:d(e.flags),options:{...e.options}};return r||(delete h.options.force.v,h.options.disable.v=!0,h.options.unicodeSetsPlugin=null),h._captureTransfers=new Map,h._hiddenCaptures=[],u.captureMap.forEach((e,t)=>{e.hidden&&h._hiddenCaptures.push(t),e.transferTo&&r7(h._captureTransfers,e.transferTo,[]).push(t)}),h}(l,o),u=function(e,t){let n,{hiddenCaptures:r,mode:i}={hiddenCaptures:[],mode:"plugin",...t},a=t?.captureTransfers??new Map;if(!RegExp(rV,"su").test(e))return{pattern:e,captureTransfers:a,hiddenCaptures:r};if("plugin"===i&&rU(e,rq`\(\?\(DEFINE\)`,rD.DEFAULT))throw Error("DEFINE groups cannot be used with recursion");let s=[],o=rU(e,rq`\\[1-9]`,rD.DEFAULT),l=new Map,c=[],u=!1,d=0,h=0;for(rJ.lastIndex=0;n=rJ.exec(e);){let{0:t,groups:{captureName:p,rDepth:m,gRNameOrNum:g,gRDepth:f}}=n;if("["===t)d++;else if(d)"]"===t&&d--;else if(m){if(rK(m),u)throw Error(rZ);if(o)throw Error(`${"external"===i?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);let t=e.slice(0,n.index),l=e.slice(rJ.lastIndex);if(rU(l,rV,rD.DEFAULT))throw Error(rZ);let c=m-1;e=rY(t,l,c,!1,r,s,h),a=r1(a,t,c,s.length,0,h);break}else if(g){rK(f);let d=!1;for(let e of c)if(e.name===g||e.num===+g){if(d=!0,e.hasRecursedWithin)throw Error(rZ);break}if(!d)throw Error(rq`Recursive \g cannot be used outside the referenced group "${"external"===i?g:rq`\g<${g}&R=${f}>`}"`);let p=l.get(g),m=function(e,t){let n,r=/\\?./gsu;r.lastIndex=t;let i=e.length,a=0,s=1;for(;n=r.exec(e);){let[e]=n;if("["===e)a++;else if(a)"]"===e&&a--;else if("("===e)s++;else if(")"===e&&!--s){i=n.index;break}}return e.slice(t,i)}(e,p);if(o&&rU(m,rq`${rX}|\((?!\?)`,rD.DEFAULT))throw Error(`${"external"===i?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);let b=e.slice(p,n.index),y=m.slice(b.length+t.length),k=s.length,_=f-1,w=rY(b,y,_,!0,r,s,h);a=r1(a,b,_,s.length-k,k,h);let C=e.slice(0,p),S=e.slice(p+m.length);e=`${C}${w}${S}`,rJ.lastIndex+=w.length-t.length-b.length-y.length,c.forEach(e=>e.hasRecursedWithin=!0),u=!0}else if(p)h++,l.set(String(h),rJ.lastIndex),l.set(p,rJ.lastIndex),c.push({num:h,name:p});else if("("===t[0]){let e="("===t;e&&(h++,l.set(String(h),rJ.lastIndex)),c.push(e?{num:h}:{})}else")"===t&&c.pop()}return r.push(...s),{pattern:e,captureTransfers:a,hiddenCaptures:r}}(c.pattern,{captureTransfers:c._captureTransfers,hiddenCaptures:c._hiddenCaptures,mode:"external"}),d=function(e,t){let n,r=t?.hiddenCaptures??[],i=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:r};let a="(?:(?=(",s=[0],o=[],l=0,c=0,u=NaN;do{let t;n=!1;let d=0,h=0,p=!1;for(rj.lastIndex=Number.isNaN(u)?0:u+a.length;t=rj.exec(e);){let{0:m,index:g,groups:{capturingStart:f,noncapturingStart:b}}=t;if("["===m)d++;else if(d)"]"===m&&d--;else if("(?>"!==m||p){if(p&&b)h++;else if(f)p?h++:(l++,s.push(l+c));else if(")"===m&&p){if(!h){let t=l+ ++c;e=`${e.slice(0,u)}${a}${e.slice(u+3,g)}))<$$${t}>)${e.slice(g+1)}`,n=!0,o.push(t);for(let e=0;e<r.length;e++)r[e]>=t&&r[e]++;if(i.size){let e=new Map;i.forEach((n,r)=>{e.set(r>=t?r+1:r,n.map(e=>e>=t?e+1:e))}),i=e}break}h--}}else u=g,p=!0}}while(n);return r.push(...o),{pattern:e=rF(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:n}})=>{if(t){let n=+t;if(n>s.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${s[n]}`}return`\\${n}`},rD.DEFAULT),captureTransfers:i,hiddenCaptures:r}}(function(e){let t;if(!RegExp(`${rW}\\+`).test(e))return{pattern:e};let n=[],r=null,i=null,a="",s=0;for(rH.lastIndex=0;t=rH.exec(e);){let{0:c,index:u,groups:{qBase:d,qMod:h,invalidQ:p}}=t;if("["===c)s||(i=u),s++;else if("]"===c)s?s--:i=null;else if(!s)if("+"===h&&a&&!a.startsWith("(")){if(p)throw Error(`Invalid quantifier "${c}"`);let t=-1;if(/^\{\d+\}$/.test(d)){var o,l;o=e,l=u+d.length,e=o.slice(0,l)+""+o.slice(l+h.length)}else{if(")"===a||"]"===a){let t=")"===a?r:i;if(null===t)throw Error(`Invalid unmatched "${a}"`);e=`${e.slice(0,t)}(?>${e.slice(t,u)}${d})${e.slice(u+c.length)}`}else e=`${e.slice(0,u-a.length)}(?>${a}${d})${e.slice(u+c.length)}`;t+=4}rH.lastIndex+=t}else"("===c[0]?n.push(u):")"===c&&(r=n.length?n.pop():null);a=c}return{pattern:e}}(u.pattern).pattern,{captureTransfers:u.captureTransfers,hiddenCaptures:u.hiddenCaptures}),h={pattern:d.pattern,flags:`${o.hasIndices?"d":""}${o.global?"g":""}${c.flags}${c.options.disable.v?"u":"v"}`};if(o.avoidSubclass){if(o.lazyCompileLength!==1/0)throw Error("Lazy compilation requires subclass")}else{let e=d.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(d.captureTransfers),n=l._strategy,r=h.pattern.length>=o.lazyCompileLength;(e.length||t.length||n||r)&&(h.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...n&&{strategy:n},...r&&{lazyCompile:r}})}return h}(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})).options?new iD(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function iU(e={}){let t={target:"auto",cache:new Map,...e};return t.regexConstructor||=e=>iF(e,{target:t.target}),{createScanner:e=>new n1(e,t),createString:e=>({content:e})}}g(p({bundledLanguages:()=>k,bundledLanguagesAlias:()=>y,bundledLanguagesBase:()=>b,bundledLanguagesInfo:()=>f,bundledThemes:()=>w,bundledThemesInfo:()=>_,codeToHast:()=>nQ,codeToHtml:()=>nX,codeToTokens:()=>nJ,codeToTokensBase:()=>nZ,codeToTokensWithThemes:()=>nK,createHighlighter:()=>nV,createJavaScriptRegexEngine:()=>iU,createOnigurumaEngine:()=>O,defaultJavaScriptRegexConstructor:()=>iF,getLastGrammarState:()=>n0,getSingletonHighlighter:()=>nY,loadWasm:()=>$}),nz)}}]);