@aquera/nile-elements 0.1.24 → 0.1.26
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.
- package/README.md +13 -0
- package/demo/filenames.txt +1 -1
- package/demo/index.html +0 -2
- package/demo/variables.css +1 -0
- package/demo/variables_v2.css +1 -0
- package/dist/{angular-ts-a62c12b7.cjs.js → angular-ts-5f927069.cjs.js} +2 -2
- package/dist/{angular-ts-a62c12b7.cjs.js.map → angular-ts-5f927069.cjs.js.map} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/lit-element-9e4e16c6.cjs.js +18 -0
- package/dist/lit-element-9e4e16c6.cjs.js.map +1 -0
- package/dist/lit-element-a5a64515.esm.js +23 -0
- package/dist/nile-auto-complete/index.cjs.js +1 -1
- package/dist/nile-auto-complete/index.esm.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js +5 -13
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.css.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.css.cjs.js.map +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.css.esm.js +6 -4
- package/dist/nile-auto-complete/nile-auto-complete.esm.js +9 -22
- package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js.map +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
- package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
- package/dist/nile-avatar/nile-avatar.test.cjs.js.map +1 -1
- package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
- package/dist/nile-badge/index.cjs.js +1 -1
- package/dist/nile-badge/index.esm.js +1 -1
- package/dist/nile-badge/nile-badge.cjs.js +1 -1
- package/dist/nile-badge/nile-badge.cjs.js.map +1 -1
- package/dist/nile-badge/nile-badge.esm.js +1 -1
- package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
- package/dist/nile-badge/nile-badge.test.cjs.js.map +1 -1
- package/dist/nile-badge/nile-badge.test.esm.js +1 -1
- package/dist/nile-button/index.cjs.js +1 -1
- package/dist/nile-button/index.esm.js +1 -1
- package/dist/nile-button/nile-button.cjs.js +1 -1
- package/dist/nile-button/nile-button.cjs.js.map +1 -1
- package/dist/nile-button/nile-button.esm.js +1 -1
- package/dist/nile-button/nile-button.test.cjs.js +1 -1
- package/dist/nile-button/nile-button.test.cjs.js.map +1 -1
- package/dist/nile-button/nile-button.test.esm.js +1 -1
- package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.test.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
- package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
- package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.test.cjs.js.map +1 -1
- package/dist/nile-chip/nile-chip.test.esm.js +1 -1
- package/dist/nile-dialog/index.cjs.js +1 -1
- package/dist/nile-dialog/index.esm.js +1 -1
- package/dist/nile-dialog/nile-dialog.cjs.js +1 -1
- package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -1
- package/dist/nile-dialog/nile-dialog.esm.js +1 -1
- package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
- package/dist/nile-dialog/nile-dialog.test.cjs.js.map +1 -1
- package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
- package/dist/nile-drawer/index.cjs.js +1 -1
- package/dist/nile-drawer/index.esm.js +1 -1
- package/dist/nile-drawer/nile-drawer.cjs.js +1 -1
- package/dist/nile-drawer/nile-drawer.cjs.js.map +1 -1
- package/dist/nile-drawer/nile-drawer.esm.js +1 -1
- package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
- package/dist/nile-drawer/nile-drawer.test.cjs.js.map +1 -1
- package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
- package/dist/nile-highlighter/index.cjs.js +1 -1
- package/dist/nile-highlighter/index.esm.js +1 -1
- package/dist/nile-highlighter/nile-highlighter.cjs.js +1 -1
- package/dist/nile-highlighter/nile-highlighter.esm.js +1 -1
- package/dist/nile-icon/icons/svg/comment.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/comment.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/comment.esm.js +1 -0
- package/dist/nile-icon/icons/svg/index.cjs.js +1 -1
- package/dist/nile-icon/icons/svg/index.esm.js +1 -1
- package/dist/nile-icon/icons/svg/returnvalue.cjs.js +1 -1
- package/dist/nile-icon/icons/svg/returnvalue.cjs.js.map +1 -1
- package/dist/nile-icon/icons/svg/returnvalue.esm.js +1 -1
- package/dist/nile-icon/index.cjs.js +1 -1
- package/dist/nile-icon/index.cjs.js.map +1 -1
- package/dist/nile-icon/index.esm.js +1 -1
- package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
- package/dist/nile-icon/nile-icon.test.cjs.js.map +1 -1
- package/dist/nile-icon/nile-icon.test.esm.js +1 -1
- package/dist/nile-icon-button/index.cjs.js +1 -1
- package/dist/nile-icon-button/index.esm.js +1 -1
- package/dist/nile-icon-button/nile-icon-button.cjs.js +1 -1
- package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
- package/dist/nile-icon-button/nile-icon-button.esm.js +1 -1
- package/dist/nile-input/index.cjs.js +1 -1
- package/dist/nile-input/index.esm.js +1 -1
- package/dist/nile-input/nile-input.cjs.js +1 -1
- package/dist/nile-input/nile-input.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.esm.js +1 -1
- package/dist/nile-input/nile-input.test.cjs.js +1 -1
- package/dist/nile-input/nile-input.test.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.test.esm.js +1 -1
- package/dist/nile-menu-item/index.cjs.js +1 -1
- package/dist/nile-menu-item/index.esm.js +1 -1
- package/dist/nile-menu-item/nile-menu-item.cjs.js +1 -1
- package/dist/nile-menu-item/nile-menu-item.cjs.js.map +1 -1
- package/dist/nile-menu-item/nile-menu-item.esm.js +1 -1
- package/dist/nile-option/index.cjs.js +1 -1
- package/dist/nile-option/index.esm.js +1 -1
- package/dist/nile-option/nile-option.cjs.js +1 -1
- package/dist/nile-option/nile-option.cjs.js.map +1 -1
- package/dist/nile-option/nile-option.esm.js +1 -1
- package/dist/nile-popover/index.cjs.js +1 -1
- package/dist/nile-popover/index.esm.js +1 -1
- package/dist/nile-popover/nile-popover.cjs.js +1 -1
- package/dist/nile-popover/nile-popover.esm.js +1 -1
- package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
- package/dist/nile-popover/nile-popover.test.esm.js +1 -1
- package/dist/nile-select/index.cjs.js +1 -1
- package/dist/nile-select/index.esm.js +1 -1
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.esm.js +1 -1
- package/dist/nile-select/nile-select.test.cjs.js +1 -1
- package/dist/nile-select/nile-select.test.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.test.esm.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js.map +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.esm.js +2 -2
- package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js.map +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -1
- package/dist/nile-tab/index.cjs.js +1 -1
- package/dist/nile-tab/index.esm.js +1 -1
- package/dist/nile-tab/nile-tab.cjs.js +1 -1
- package/dist/nile-tab/nile-tab.cjs.js.map +1 -1
- package/dist/nile-tab/nile-tab.esm.js +1 -1
- package/dist/nile-tab-group/index.cjs.js +1 -1
- package/dist/nile-tab-group/index.esm.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.cjs.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.cjs.js.map +1 -1
- package/dist/nile-tab-group/nile-tab-group.css.cjs.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.css.cjs.js.map +1 -1
- package/dist/nile-tab-group/nile-tab-group.css.esm.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.esm.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.test.cjs.js.map +1 -1
- package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
- package/dist/nile-tag/index.cjs.js +1 -1
- package/dist/nile-tag/index.esm.js +1 -1
- package/dist/nile-tag/nile-tag.cjs.js +1 -1
- package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
- package/dist/nile-tag/nile-tag.esm.js +1 -1
- package/dist/nile-toast/index.cjs.js +1 -1
- package/dist/nile-toast/index.esm.js +1 -1
- package/dist/nile-toast/nile-toast.cjs.js +1 -1
- package/dist/nile-toast/nile-toast.cjs.js.map +1 -1
- package/dist/nile-toast/nile-toast.esm.js +2 -2
- package/dist/nile-tree/index.cjs.js +1 -1
- package/dist/nile-tree/index.esm.js +1 -1
- package/dist/nile-tree/nile-tree.cjs.js +1 -1
- package/dist/nile-tree/nile-tree.cjs.js.map +1 -1
- package/dist/nile-tree/nile-tree.esm.js +1 -1
- package/dist/nile-tree-item/index.cjs.js +1 -1
- package/dist/nile-tree-item/index.esm.js +1 -1
- package/dist/nile-tree-item/nile-tree-item.cjs.js +1 -1
- package/dist/nile-tree-item/nile-tree-item.cjs.js.map +1 -1
- package/dist/nile-tree-item/nile-tree-item.esm.js +1 -1
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.js +0 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.css.js +6 -4
- package/dist/src/nile-auto-complete/nile-auto-complete.css.js.map +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.d.ts +4 -3
- package/dist/src/nile-auto-complete/nile-auto-complete.js +35 -11
- package/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
- package/dist/src/nile-chip/nile-chip.d.ts +2 -2
- package/dist/src/nile-chip/nile-chip.js.map +1 -1
- package/dist/src/nile-icon/icons/svg/comment.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/comment.js +5 -0
- package/dist/src/nile-icon/icons/svg/comment.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/index.d.ts +1 -1
- package/dist/src/nile-icon/icons/svg/index.js +1 -1
- package/dist/src/nile-icon/icons/svg/index.js.map +1 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.js +2 -2
- package/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.test.js +2 -2
- package/dist/src/nile-slide-toggle/nile-slide-toggle.test.js.map +1 -1
- package/dist/src/nile-tab-group/nile-tab-group.css.js +1 -1
- package/dist/src/nile-tab-group/nile-tab-group.css.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -4
- package/src/index.ts +1 -2
- package/src/nile-auto-complete/nile-auto-complete.css.ts +6 -4
- package/src/nile-auto-complete/nile-auto-complete.ts +37 -13
- package/src/nile-chip/nile-chip.ts +2 -2
- package/src/nile-icon/icons/svg/comment.ts +5 -0
- package/src/nile-icon/icons/svg/index.ts +1 -1
- package/src/nile-slide-toggle/nile-slide-toggle.test.ts +2 -2
- package/src/nile-slide-toggle/nile-slide-toggle.ts +2 -2
- package/src/nile-tab-group/nile-tab-group.css.ts +1 -1
- package/vscode-html-custom-data.json +6 -21
- package/dist/lit-element-3b4aa6c6.esm.js +0 -23
- package/dist/lit-element-b510b02d.cjs.js +0 -14
- package/dist/lit-element-b510b02d.cjs.js.map +0 -1
- package/dist/nile-tour/index.cjs.js +0 -2
- package/dist/nile-tour/index.cjs.js.map +0 -1
- package/dist/nile-tour/index.esm.js +0 -1
- package/dist/nile-tour/nile-tour.cjs.js +0 -10
- package/dist/nile-tour/nile-tour.cjs.js.map +0 -1
- package/dist/nile-tour/nile-tour.css.cjs.js +0 -2
- package/dist/nile-tour/nile-tour.css.cjs.js.map +0 -1
- package/dist/nile-tour/nile-tour.css.esm.js +0 -233
- package/dist/nile-tour/nile-tour.esm.js +0 -24
- package/dist/src/nile-tour/index.d.ts +0 -1
- package/dist/src/nile-tour/index.js +0 -2
- package/dist/src/nile-tour/index.js.map +0 -1
- package/dist/src/nile-tour/nile-tour.css.d.ts +0 -12
- package/dist/src/nile-tour/nile-tour.css.js +0 -245
- package/dist/src/nile-tour/nile-tour.css.js.map +0 -1
- package/dist/src/nile-tour/nile-tour.d.ts +0 -36
- package/dist/src/nile-tour/nile-tour.js +0 -180
- package/dist/src/nile-tour/nile-tour.js.map +0 -1
- package/src/nile-tour/index.ts +0 -1
- package/src/nile-tour/nile-tour.css.ts +0 -247
- package/src/nile-tour/nile-tour.ts +0 -199
@@ -1,3 +1,3 @@
|
|
1
|
-
import{__decorate as t}from"tslib";import{x as e}from"../lit-element-3b4aa6c6.esm.js";import{property as n,state as i,customElement as r}from"lit/decorators.js";import{s}from"./nile-highlighter.css.esm.js";import{N as o}from"../internal/nile-element.esm.js";import"lit";const l=[{id:"abap",name:"ABAP",import:()=>import("../abap-a52c4b71.esm.js")},{id:"actionscript-3",name:"ActionScript",import:()=>import("../actionscript-3-adc1bba2.esm.js")},{id:"ada",name:"Ada",import:()=>import("../ada-92aadaaa.esm.js")},{id:"angular-html",name:"Angular HTML",import:()=>import("../angular-html-e82e9f01.esm.js").then((function(t){return t.f}))},{id:"angular-ts",name:"Angular TypeScript",import:()=>import("../angular-ts-824b29c5.esm.js")},{id:"apache",name:"Apache Conf",import:()=>import("../apache-857a7028.esm.js")},{id:"apex",name:"Apex",import:()=>import("../apex-4e889f73.esm.js")},{id:"apl",name:"APL",import:()=>import("../apl-e284e4b7.esm.js")},{id:"applescript",name:"AppleScript",import:()=>import("../applescript-4cfa5810.esm.js")},{id:"ara",name:"Ara",import:()=>import("../ara-fab92058.esm.js")},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>import("../asciidoc-31fbf65d.esm.js")},{id:"asm",name:"Assembly",import:()=>import("../asm-3ea8b9b1.esm.js")},{id:"astro",name:"Astro",import:()=>import("../astro-70bbac9c.esm.js")},{id:"awk",name:"AWK",import:()=>import("../awk-471d7499.esm.js")},{id:"ballerina",name:"Ballerina",import:()=>import("../ballerina-dadf5219.esm.js")},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>import("../bat-3b0abeea.esm.js")},{id:"beancount",name:"Beancount",import:()=>import("../beancount-c807f5d0.esm.js")},{id:"berry",name:"Berry",aliases:["be"],import:()=>import("../berry-84baf561.esm.js")},{id:"bibtex",name:"BibTeX",import:()=>import("../bibtex-f0b3341f.esm.js")},{id:"bicep",name:"Bicep",import:()=>import("../bicep-611b70e3.esm.js")},{id:"blade",name:"Blade",import:()=>import("../blade-1d22f7d6.esm.js")},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>import("../bsl-19f4ad7d.esm.js")},{id:"c",name:"C",import:()=>import("../c-6b4aca18.esm.js")},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>import("../cadence-f8e85170.esm.js")},{id:"cairo",name:"Cairo",import:()=>import("../cairo-2208cdeb.esm.js")},{id:"clarity",name:"Clarity",import:()=>import("../clarity-0de6324e.esm.js")},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>import("../clojure-2c772530.esm.js")},{id:"cmake",name:"CMake",import:()=>import("../cmake-6f336b57.esm.js")},{id:"cobol",name:"COBOL",import:()=>import("../cobol-863c3d30.esm.js")},{id:"codeowners",name:"CODEOWNERS",import:()=>import("../codeowners-ce7dc7f9.esm.js")},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>import("../codeql-7a8e07a3.esm.js")},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>import("../coffee-8891a9a6.esm.js")},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>import("../common-lisp-a2e4bf8b.esm.js")},{id:"coq",name:"Coq",import:()=>import("../coq-0842d07e.esm.js")},{id:"cpp",name:"C++",aliases:["c++"],import:()=>import("../cpp-5caa08a7.esm.js")},{id:"crystal",name:"Crystal",import:()=>import("../crystal-d55c65aa.esm.js")},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>import("../csharp-05111ad0.esm.js")},{id:"css",name:"CSS",import:()=>import("../css-b82f2dc0.esm.js")},{id:"csv",name:"CSV",import:()=>import("../csv-1300859c.esm.js")},{id:"cue",name:"CUE",import:()=>import("../cue-984224b1.esm.js")},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>import("../cypher-2a549c24.esm.js")},{id:"d",name:"D",import:()=>import("../d-2e6aa0f7.esm.js")},{id:"dart",name:"Dart",import:()=>import("../dart-74aa8857.esm.js")},{id:"dax",name:"DAX",import:()=>import("../dax-8769ef81.esm.js")},{id:"desktop",name:"Desktop",import:()=>import("../desktop-f6ccfe02.esm.js")},{id:"diff",name:"Diff",import:()=>import("../diff-172f767c.esm.js")},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>import("../docker-5931bdc6.esm.js")},{id:"dotenv",name:"dotEnv",import:()=>import("../dotenv-b6a19045.esm.js")},{id:"dream-maker",name:"Dream Maker",import:()=>import("../dream-maker-ea79fdad.esm.js")},{id:"edge",name:"Edge",import:()=>import("../edge-6eae35e7.esm.js")},{id:"elixir",name:"Elixir",import:()=>import("../elixir-dae8d9ee.esm.js")},{id:"elm",name:"Elm",import:()=>import("../elm-0fb64966.esm.js")},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>import("../emacs-lisp-a7b4e1e4.esm.js")},{id:"erb",name:"ERB",import:()=>import("../erb-aea4a632.esm.js")},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>import("../erlang-c157aacb.esm.js")},{id:"fennel",name:"Fennel",import:()=>import("../fennel-ab39fe42.esm.js")},{id:"fish",name:"Fish",import:()=>import("../fish-b53e939c.esm.js")},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>import("../fluent-0c518860.esm.js")},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>import("../fortran-fixed-form-ad2e139c.esm.js")},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>import("../fortran-free-form-0afe84cd.esm.js")},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>import("../fsharp-eaa1acef.esm.js")},{id:"gdresource",name:"GDResource",import:()=>import("../gdresource-ee3a0b57.esm.js")},{id:"gdscript",name:"GDScript",import:()=>import("../gdscript-5e1b7e11.esm.js")},{id:"gdshader",name:"GDShader",import:()=>import("../gdshader-b715be05.esm.js")},{id:"genie",name:"Genie",import:()=>import("../genie-d6a62a2e.esm.js")},{id:"gherkin",name:"Gherkin",import:()=>import("../gherkin-3631f620.esm.js")},{id:"git-commit",name:"Git Commit Message",import:()=>import("../git-commit-46abbed3.esm.js")},{id:"git-rebase",name:"Git Rebase Message",import:()=>import("../git-rebase-3d539b87.esm.js")},{id:"gleam",name:"Gleam",import:()=>import("../gleam-162aeb84.esm.js")},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>import("../glimmer-js-9ebbc015.esm.js")},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>import("../glimmer-ts-f1784d70.esm.js")},{id:"glsl",name:"GLSL",import:()=>import("../glsl-8684555b.esm.js")},{id:"gnuplot",name:"Gnuplot",import:()=>import("../gnuplot-8d5f619d.esm.js")},{id:"go",name:"Go",import:()=>import("../go-fa0c6e0c.esm.js")},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>import("../graphql-1e52af59.esm.js")},{id:"groovy",name:"Groovy",import:()=>import("../groovy-97eb5874.esm.js")},{id:"hack",name:"Hack",import:()=>import("../hack-ac35d4cc.esm.js")},{id:"haml",name:"Ruby Haml",import:()=>import("../haml-164b4081.esm.js")},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>import("../handlebars-be38660d.esm.js")},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>import("../haskell-a0d0428f.esm.js")},{id:"haxe",name:"Haxe",import:()=>import("../haxe-5d697709.esm.js")},{id:"hcl",name:"HashiCorp HCL",import:()=>import("../hcl-230c758c.esm.js")},{id:"hjson",name:"Hjson",import:()=>import("../hjson-ac457752.esm.js")},{id:"hlsl",name:"HLSL",import:()=>import("../hlsl-68d51405.esm.js")},{id:"html",name:"HTML",import:()=>import("../html-ea46646c.esm.js")},{id:"html-derivative",name:"HTML (Derivative)",import:()=>import("../html-derivative-95ae6f79.esm.js")},{id:"http",name:"HTTP",import:()=>import("../http-40b27fa7.esm.js")},{id:"hxml",name:"HXML",import:()=>import("../hxml-3b89fd2d.esm.js")},{id:"hy",name:"Hy",import:()=>import("../hy-6fd2368a.esm.js")},{id:"imba",name:"Imba",import:()=>import("../imba-1f2e01a9.esm.js")},{id:"ini",name:"INI",aliases:["properties"],import:()=>import("../ini-fd9fe701.esm.js")},{id:"java",name:"Java",import:()=>import("../java-3e75e5da.esm.js")},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>import("../javascript-5e530c3b.esm.js")},{id:"jinja",name:"Jinja",import:()=>import("../jinja-5f33b154.esm.js")},{id:"jison",name:"Jison",import:()=>import("../jison-298d6c83.esm.js")},{id:"json",name:"JSON",import:()=>import("../json-a38df6b1.esm.js")},{id:"json5",name:"JSON5",import:()=>import("../json5-c15e7f45.esm.js")},{id:"jsonc",name:"JSON with Comments",import:()=>import("../jsonc-091d782e.esm.js")},{id:"jsonl",name:"JSON Lines",import:()=>import("../jsonl-af69b138.esm.js")},{id:"jsonnet",name:"Jsonnet",import:()=>import("../jsonnet-d0000932.esm.js")},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>import("../jssm-8b61a1de.esm.js")},{id:"jsx",name:"JSX",import:()=>import("../jsx-0c1baf54.esm.js")},{id:"julia",name:"Julia",aliases:["jl"],import:()=>import("../julia-405950a4.esm.js")},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>import("../kotlin-fd455d5b.esm.js")},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>import("../kusto-e862270b.esm.js")},{id:"latex",name:"LaTeX",import:()=>import("../latex-2721b8c9.esm.js")},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>import("../lean-a206dc06.esm.js")},{id:"less",name:"Less",import:()=>import("../less-48e06373.esm.js")},{id:"liquid",name:"Liquid",import:()=>import("../liquid-80f330ca.esm.js")},{id:"log",name:"Log file",import:()=>import("../log-bd6ed56c.esm.js")},{id:"logo",name:"Logo",import:()=>import("../logo-63c5bcba.esm.js")},{id:"lua",name:"Lua",import:()=>import("../lua-ec443be9.esm.js")},{id:"luau",name:"Luau",import:()=>import("../luau-a7ca0913.esm.js")},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>import("../make-722ffd00.esm.js")},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>import("../markdown-f934feeb.esm.js")},{id:"marko",name:"Marko",import:()=>import("../marko-25c2bb0f.esm.js")},{id:"matlab",name:"MATLAB",import:()=>import("../matlab-0f47d95d.esm.js")},{id:"mdc",name:"MDC",import:()=>import("../mdc-55fb23bc.esm.js")},{id:"mdx",name:"MDX",import:()=>import("../mdx-3c6b605b.esm.js")},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>import("../mermaid-a2157e2a.esm.js")},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>import("../mipsasm-718e91fe.esm.js")},{id:"mojo",name:"Mojo",import:()=>import("../mojo-0420911d.esm.js")},{id:"move",name:"Move",import:()=>import("../move-e5ed5182.esm.js")},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>import("../narrat-f31c25de.esm.js")},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>import("../nextflow-8c655003.esm.js")},{id:"nginx",name:"Nginx",import:()=>import("../nginx-2d776aa5.esm.js")},{id:"nim",name:"Nim",import:()=>import("../nim-2381a8b6.esm.js")},{id:"nix",name:"Nix",import:()=>import("../nix-cfc19319.esm.js")},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>import("../nushell-5ec7a31d.esm.js")},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>import("../objective-c-03c8ac8f.esm.js")},{id:"objective-cpp",name:"Objective-C++",import:()=>import("../objective-cpp-da94db78.esm.js")},{id:"ocaml",name:"OCaml",import:()=>import("../ocaml-13c7ad4b.esm.js")},{id:"pascal",name:"Pascal",import:()=>import("../pascal-2376554e.esm.js")},{id:"perl",name:"Perl",import:()=>import("../perl-d2bc40cf.esm.js")},{id:"php",name:"PHP",import:()=>import("../php-2e8c1036.esm.js")},{id:"plsql",name:"PL/SQL",import:()=>import("../plsql-e699c6dd.esm.js")},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>import("../po-354e37c9.esm.js")},{id:"polar",name:"Polar",import:()=>import("../polar-84bbcfa3.esm.js")},{id:"postcss",name:"PostCSS",import:()=>import("../postcss-7e84f837.esm.js")},{id:"powerquery",name:"PowerQuery",import:()=>import("../powerquery-de7b86c1.esm.js")},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>import("../powershell-a53e9e2c.esm.js")},{id:"prisma",name:"Prisma",import:()=>import("../prisma-31de5d7f.esm.js")},{id:"prolog",name:"Prolog",import:()=>import("../prolog-b0af9977.esm.js")},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>import("../proto-95a2be6e.esm.js")},{id:"pug",name:"Pug",aliases:["jade"],import:()=>import("../pug-70e27f3d.esm.js")},{id:"puppet",name:"Puppet",import:()=>import("../puppet-c03e96b0.esm.js")},{id:"purescript",name:"PureScript",import:()=>import("../purescript-faae396e.esm.js")},{id:"python",name:"Python",aliases:["py"],import:()=>import("../python-2d8cef64.esm.js")},{id:"qml",name:"QML",import:()=>import("../qml-5f211c50.esm.js")},{id:"qmldir",name:"QML Directory",import:()=>import("../qmldir-9ab6a9ea.esm.js")},{id:"qss",name:"Qt Style Sheets",import:()=>import("../qss-6a1828ff.esm.js")},{id:"r",name:"R",import:()=>import("../r-ef1e5dda.esm.js")},{id:"racket",name:"Racket",import:()=>import("../racket-93d1631f.esm.js")},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>import("../raku-74f5288e.esm.js")},{id:"razor",name:"ASP.NET Razor",import:()=>import("../razor-7ef8c917.esm.js")},{id:"reg",name:"Windows Registry Script",import:()=>import("../reg-17ae4c4d.esm.js")},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>import("../regexp-d21a11f9.esm.js")},{id:"rel",name:"Rel",import:()=>import("../rel-df432d69.esm.js")},{id:"riscv",name:"RISC-V",import:()=>import("../riscv-eb3c5e4f.esm.js")},{id:"rst",name:"reStructuredText",import:()=>import("../rst-1b688e61.esm.js")},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>import("../ruby-2272bb6d.esm.js")},{id:"rust",name:"Rust",aliases:["rs"],import:()=>import("../rust-914ecd9c.esm.js")},{id:"sas",name:"SAS",import:()=>import("../sas-1bb1c1b4.esm.js")},{id:"sass",name:"Sass",import:()=>import("../sass-c961f8e0.esm.js")},{id:"scala",name:"Scala",import:()=>import("../scala-d0d2fc32.esm.js")},{id:"scheme",name:"Scheme",import:()=>import("../scheme-8c950a12.esm.js")},{id:"scss",name:"SCSS",import:()=>import("../scss-68be6395.esm.js")},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>import("../sdbl-0d98dffb.esm.js")},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>import("../shaderlab-b0c1d53f.esm.js")},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>import("../shellscript-4cb50526.esm.js")},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>import("../shellsession-5c81b4d2.esm.js")},{id:"smalltalk",name:"Smalltalk",import:()=>import("../smalltalk-ec51be94.esm.js")},{id:"solidity",name:"Solidity",import:()=>import("../solidity-52a21bca.esm.js")},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>import("../soy-3cf0ff08.esm.js")},{id:"sparql",name:"SPARQL",import:()=>import("../sparql-cf6895f3.esm.js")},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>import("../splunk-a1e38817.esm.js")},{id:"sql",name:"SQL",import:()=>import("../sql-cf121937.esm.js")},{id:"ssh-config",name:"SSH Config",import:()=>import("../ssh-config-127352da.esm.js")},{id:"stata",name:"Stata",import:()=>import("../stata-7385dce1.esm.js")},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>import("../stylus-7ce0aec7.esm.js")},{id:"svelte",name:"Svelte",import:()=>import("../svelte-80a7d4f3.esm.js")},{id:"swift",name:"Swift",import:()=>import("../swift-f19226b8.esm.js")},{id:"system-verilog",name:"SystemVerilog",import:()=>import("../system-verilog-5dcd9523.esm.js")},{id:"systemd",name:"Systemd Units",import:()=>import("../systemd-32ad4c93.esm.js")},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>import("../talonscript-75a1ba5c.esm.js")},{id:"tasl",name:"Tasl",import:()=>import("../tasl-dfdb6de6.esm.js")},{id:"tcl",name:"Tcl",import:()=>import("../tcl-05f52fa5.esm.js")},{id:"templ",name:"Templ",import:()=>import("../templ-47f34330.esm.js")},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>import("../terraform-206cd204.esm.js")},{id:"tex",name:"TeX",import:()=>import("../tex-66732f14.esm.js")},{id:"toml",name:"TOML",import:()=>import("../toml-114aeb86.esm.js")},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>import("../ts-tags-910a48ce.esm.js")},{id:"tsv",name:"TSV",import:()=>import("../tsv-a6b321fa.esm.js")},{id:"tsx",name:"TSX",import:()=>import("../tsx-d06cbecf.esm.js")},{id:"turtle",name:"Turtle",import:()=>import("../turtle-19569c1c.esm.js")},{id:"twig",name:"Twig",import:()=>import("../twig-984c9a8d.esm.js")},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>import("../typescript-df07c6cc.esm.js")},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>import("../typespec-cadb1029.esm.js")},{id:"typst",name:"Typst",aliases:["typ"],import:()=>import("../typst-a4980388.esm.js")},{id:"v",name:"V",import:()=>import("../v-e548e622.esm.js")},{id:"vala",name:"Vala",import:()=>import("../vala-d4463de8.esm.js")},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>import("../vb-d0b2b4c1.esm.js")},{id:"verilog",name:"Verilog",import:()=>import("../verilog-8a1772b8.esm.js")},{id:"vhdl",name:"VHDL",import:()=>import("../vhdl-766a6dfb.esm.js")},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>import("../viml-7998dc58.esm.js")},{id:"vue",name:"Vue",import:()=>import("../vue-7321fa45.esm.js")},{id:"vue-html",name:"Vue HTML",import:()=>import("../vue-html-9b0ae5ef.esm.js")},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>import("../vyper-5b7f5a01.esm.js")},{id:"wasm",name:"WebAssembly",import:()=>import("../wasm-93d2320c.esm.js")},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>import("../wenyan-af3c07c1.esm.js")},{id:"wgsl",name:"WGSL",import:()=>import("../wgsl-6ba2347e.esm.js")},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>import("../wikitext-5e16d1d5.esm.js")},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>import("../wolfram-a83ceedd.esm.js")},{id:"xml",name:"XML",import:()=>import("../xml-3fc04f78.esm.js")},{id:"xsl",name:"XSL",import:()=>import("../xsl-845c4123.esm.js")},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>import("../yaml-c4073e3a.esm.js")},{id:"zenscript",name:"ZenScript",import:()=>import("../zenscript-c955d94d.esm.js")},{id:"zig",name:"Zig",import:()=>import("../zig-0a7e2bd8.esm.js")}],a={...Object.fromEntries(l.map((t=>[t.id,t.import]))),...Object.fromEntries(l.flatMap((t=>t.aliases?.map((e=>[e,t.import]))||[])))},u=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>import("../andromeeda-2e6b30b7.esm.js")},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>import("../aurora-x-0296fca2.esm.js")},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>import("../ayu-dark-fa442bb2.esm.js")},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>import("../catppuccin-frappe-dbc3161e.esm.js")},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>import("../catppuccin-latte-e7591143.esm.js")},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>import("../catppuccin-macchiato-283b424a.esm.js")},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>import("../catppuccin-mocha-165e830c.esm.js")},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>import("../dark-plus-113df9d2.esm.js")},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>import("../dracula-0cdb0910.esm.js")},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>import("../dracula-soft-6bc125ac.esm.js")},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>import("../everforest-dark-8e919373.esm.js")},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>import("../everforest-light-7b95c0f3.esm.js")},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>import("../github-dark-13bcc6db.esm.js")},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>import("../github-dark-default-c8549d91.esm.js")},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>import("../github-dark-dimmed-2d99017f.esm.js")},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>import("../github-dark-high-contrast-eb093cb4.esm.js")},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>import("../github-light-b19ecfdf.esm.js")},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>import("../github-light-default-97194ef6.esm.js")},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>import("../github-light-high-contrast-0ddc875a.esm.js")},{id:"houston",displayName:"Houston",type:"dark",import:()=>import("../houston-550ba16e.esm.js")},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>import("../kanagawa-dragon-9520d418.esm.js")},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>import("../kanagawa-lotus-0bac7d76.esm.js")},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>import("../kanagawa-wave-0dc8b839.esm.js")},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>import("../laserwave-bc83c1e2.esm.js")},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>import("../light-plus-980eb5f5.esm.js")},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>import("../material-theme-c02759d0.esm.js")},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>import("../material-theme-darker-e85c15fb.esm.js")},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>import("../material-theme-lighter-24d1699f.esm.js")},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>import("../material-theme-ocean-026f14fa.esm.js")},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>import("../material-theme-palenight-ea3a71a0.esm.js")},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>import("../min-dark-0a9bb11e.esm.js")},{id:"min-light",displayName:"Min Light",type:"light",import:()=>import("../min-light-39b26431.esm.js")},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>import("../monokai-cd7377cd.esm.js")},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>import("../night-owl-8da1f52a.esm.js")},{id:"nord",displayName:"Nord",type:"dark",import:()=>import("../nord-9752f990.esm.js")},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>import("../one-dark-pro-4fce25f8.esm.js")},{id:"one-light",displayName:"One Light",type:"light",import:()=>import("../one-light-cf9703c5.esm.js")},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>import("../plastic-50cdd7d8.esm.js")},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>import("../poimandres-f9d8c725.esm.js")},{id:"red",displayName:"Red",type:"dark",import:()=>import("../red-085ae454.esm.js")},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>import("../rose-pine-affa5008.esm.js")},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>import("../rose-pine-dawn-e8ec1676.esm.js")},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>import("../rose-pine-moon-938ca56d.esm.js")},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>import("../slack-dark-55dbd76e.esm.js")},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>import("../slack-ochin-e1ceac31.esm.js")},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>import("../snazzy-light-f653fb68.esm.js")},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>import("../solarized-dark-3ff28084.esm.js")},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>import("../solarized-light-8267c5c8.esm.js")},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>import("../synthwave-84-f32727db.esm.js")},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>import("../tokyo-night-46a31a2d.esm.js")},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>import("../vesper-3a90d84c.esm.js")},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>import("../vitesse-black-efbfcbd8.esm.js")},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>import("../vitesse-dark-2d62fbf6.esm.js")},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>import("../vitesse-light-c63bbf46.esm.js")}],c=Object.fromEntries(u.map((t=>[t.id,t.import])));let m=class extends Error{constructor(t){super(t),this.name="ShikiError"}},p=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function h(){return"undefined"!=typeof performance?performance.now():Date.now()}const d=(t,e)=>t+(e-t%e)%e;async function f(t){let e,n;const i={};function r(t){n=t,i.HEAPU8=new Uint8Array(t),i.HEAPU32=new Uint32Array(t)}function s(t){try{return e.grow(t-n.byteLength+65535>>>16),r(e.buffer),1}catch{}}const o="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function l(t,e){return t?function(t,e,n=1024){const i=e+n;let r=e;for(;t[r]&&!(r>=i);)++r;if(r-e>16&&t.buffer&&o)return o.decode(t.subarray(e,r));let s="";for(;e<r;){let n=t[e++];if(!(128&n)){s+=String.fromCharCode(n);continue}const i=63&t[e++];if(192==(224&n)){s+=String.fromCharCode((31&n)<<6|i);continue}const r=63&t[e++];if(n=224==(240&n)?(15&n)<<12|i<<6|r:(7&n)<<18|i<<12|r<<6|63&t[e++],n<65536)s+=String.fromCharCode(n);else{const t=n-65536;s+=String.fromCharCode(55296|t>>10,56320|1023&t)}}return s}(i.HEAPU8,t,e):""}const a={emscripten_get_now:h,emscripten_memcpy_big:function(t,e,n){i.HEAPU8.copyWithin(t,e,e+n)},emscripten_resize_heap:function(t){const e=i.HEAPU8.length,n=2147483648;if((t>>>=0)>n)return!1;for(let i=1;i<=4;i*=2){let r=e*(1+.2/i);r=Math.min(r,t+100663296);if(s(Math.min(n,d(Math.max(t,r),65536))))return!0}return!1},fd_write:()=>0};return await async function(){const n={env:a,wasi_snapshot_preview1:a},s=await t(n);e=s.memory,r(e.buffer),Object.assign(i,s),i.UTF8ToString=l}(),i}var g=Object.defineProperty,y=(t,e,n)=>(((t,e,n)=>{e in t?g(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(t,"symbol"!=typeof e?e+"":e,n),n);let b=null;class w{constructor(t){y(this,"utf16Length"),y(this,"utf8Length"),y(this,"utf16Value"),y(this,"utf8Value"),y(this,"utf16OffsetToUtf8"),y(this,"utf8OffsetToUtf16");const e=t.length,n=w._utf8ByteLength(t),i=n!==e,r=i?new Uint32Array(e+1):null;i&&(r[e]=n);const s=i?new Uint32Array(n+1):null;i&&(s[n]=e);const o=new Uint8Array(n);let l=0;for(let n=0;n<e;n++){const a=t.charCodeAt(n);let u=a,c=!1;if(a>=55296&&a<=56319&&n+1<e){const e=t.charCodeAt(n+1);e>=56320&&e<=57343&&(u=65536+(a-55296<<10)|e-56320,c=!0)}i&&(r[n]=l,c&&(r[n+1]=l),u<=127?s[l+0]=n:u<=2047?(s[l+0]=n,s[l+1]=n):u<=65535?(s[l+0]=n,s[l+1]=n,s[l+2]=n):(s[l+0]=n,s[l+1]=n,s[l+2]=n,s[l+3]=n)),u<=127?o[l++]=u:u<=2047?(o[l++]=192|(1984&u)>>>6,o[l++]=128|(63&u)>>>0):u<=65535?(o[l++]=224|(61440&u)>>>12,o[l++]=128|(4032&u)>>>6,o[l++]=128|(63&u)>>>0):(o[l++]=240|(1835008&u)>>>18,o[l++]=128|(258048&u)>>>12,o[l++]=128|(4032&u)>>>6,o[l++]=128|(63&u)>>>0),c&&n++}this.utf16Length=e,this.utf8Length=n,this.utf16Value=t,this.utf8Value=o,this.utf16OffsetToUtf8=r,this.utf8OffsetToUtf16=s}static _utf8ByteLength(t){let e=0;for(let n=0,i=t.length;n<i;n++){const r=t.charCodeAt(n);let s=r,o=!1;if(r>=55296&&r<=56319&&n+1<i){const e=t.charCodeAt(n+1);e>=56320&&e<=57343&&(s=65536+(r-55296<<10)|e-56320,o=!0)}e+=s<=127?1:s<=2047?2:s<=65535?3:4,o&&n++}return e}createString(t){const e=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,e),e}}const k=class{constructor(t){if(y(this,"id",++k.LAST_ID),y(this,"_onigBinding"),y(this,"content"),y(this,"utf16Length"),y(this,"utf8Length"),y(this,"utf16OffsetToUtf8"),y(this,"utf8OffsetToUtf16"),y(this,"ptr"),!b)throw new p("Must invoke loadWasm first.");this._onigBinding=b,this.content=t;const e=new w(t);this.utf16Length=e.utf16Length,this.utf8Length=e.utf8Length,this.utf16OffsetToUtf8=e.utf16OffsetToUtf8,this.utf8OffsetToUtf16=e.utf8OffsetToUtf16,this.utf8Length<1e4&&!k._sharedPtrInUse?(k._sharedPtr||(k._sharedPtr=b.omalloc(1e4)),k._sharedPtrInUse=!0,b.HEAPU8.set(e.utf8Value,k._sharedPtr),this.ptr=k._sharedPtr):this.ptr=e.createString(b)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===k._sharedPtr?k._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};let v,j=k;y(j,"LAST_ID",0),y(j,"_sharedPtr",0),y(j,"_sharedPtrInUse",!1);class S{constructor(t){if(y(this,"_onigBinding"),y(this,"_ptr"),!b)throw new p("Must invoke loadWasm first.");const e=[],n=[];for(let i=0,r=t.length;i<r;i++){const r=new w(t[i]);e[i]=r.createString(b),n[i]=r.utf8Length}const i=b.omalloc(4*t.length);b.HEAPU32.set(e,i/4);const r=b.omalloc(4*t.length);b.HEAPU32.set(n,r/4);const s=b.createOnigScanner(i,r,t.length);for(let n=0,i=t.length;n<i;n++)b.ofree(e[n]);b.ofree(r),b.ofree(i),0===s&&function(t){throw new p(t.UTF8ToString(t.getLastOnigError()))}(b),this._onigBinding=b,this._ptr=s}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,e,n){let i=0;if("number"==typeof n&&(i=n),"string"==typeof t){t=new j(t);const n=this._findNextMatchSync(t,e,!1,i);return t.dispose(),n}return this._findNextMatchSync(t,e,!1,i)}_findNextMatchSync(t,e,n,i){const r=this._onigBinding,s=r.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(e),i);if(0===s)return null;const o=r.HEAPU32;let l=s/4;const a=o[l++],u=o[l++],c=[];for(let e=0;e<u;e++){const n=t.convertUtf8OffsetToUtf16(o[l++]),i=t.convertUtf8OffsetToUtf16(o[l++]);c[e]={start:n,end:i,length:i-n}}return{index:a,captureIndices:c}}}function x(t){if(v)return v;return v=async function(){b=await f((async e=>{let n=t;var i;return n=await n,"function"==typeof n&&(n=await n(e)),"function"==typeof n&&(n=await n(e)),"function"==typeof n.instantiator?n=await n.instantiator(e):!function(t){return"function"==typeof t.default}(n)?(function(t){return void 0!==t.data}(n)&&(n=n.data),!function(t){return"undefined"!=typeof Response&&t instanceof Response}(n)?!function(t){return"undefined"!=typeof ArrayBuffer&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||"undefined"!=typeof Buffer&&Buffer.isBuffer?.(t)||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer||"undefined"!=typeof Uint32Array&&t instanceof Uint32Array}(n)?n instanceof WebAssembly.Module?n=await C(n)(e):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await C(n.default)(e)):n=await C(n)(e):n="function"==typeof WebAssembly.instantiateStreaming?await(i=n,t=>WebAssembly.instantiateStreaming(i,t))(e):await function(t){return async e=>{const n=await t.arrayBuffer();return WebAssembly.instantiate(n,e)}}(n)(e)):n=await n.default(e),"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n}))}(),v}function C(t){return e=>WebAssembly.instantiate(t,e)}async function A(t){return t&&await x(t),{createScanner:t=>new S(t.map((t=>"string"==typeof t?t:t.source))),createString:t=>new j(t)}}function L(t){return Array.isArray(t)?function(t){let e=[];for(let n=0,i=t.length;n<i;n++)e[n]=L(t[n]);return e}(t):t instanceof RegExp?t:"object"==typeof t?function(t){let e={};for(let n in t)e[n]=L(t[n]);return e}(t):t}function T(t,...e){return e.forEach((e=>{for(let n in e)t[n]=e[n]})),t}function M(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===e?t:~e==t.length-1?M(t.substring(0,t.length-1)):t.substr(1+~e)}var O=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,P=class{static hasCaptures(t){return null!==t&&(O.lastIndex=0,O.test(t))}static replaceCaptures(t,e,n){return t.replace(O,((t,i,r,s)=>{let o=n[parseInt(i||r,10)];if(!o)return t;{let t=e.substring(o.start,o.end);for(;"."===t[0];)t=t.substring(1);switch(s){case"downcase":return t.toLowerCase();case"upcase":return t.toUpperCase();default:return t}}}))}};function N(t,e){return t<e?-1:t>e?1:0}function D(t,e){if(null===t&&null===e)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,i=e.length;if(n===i){for(let i=0;i<n;i++){let n=N(t[i],e[i]);if(0!==n)return n}return 0}return n-i}function E(t){return!!/^#[0-9a-f]{6}$/i.test(t)||(!!/^#[0-9a-f]{8}$/i.test(t)||(!!/^#[0-9a-f]{3}$/i.test(t)||!!/^#[0-9a-f]{4}$/i.test(t)))}function _(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var R=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},$=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(function(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],i=0;for(let t=0,r=e.length;t<r;t++){let r,s=e[t];if(!s.settings)continue;if("string"==typeof s.scope){let t=s.scope;t=t.replace(/^[,]+/,""),t=t.replace(/[,]+$/,""),r=t.split(",")}else r=Array.isArray(s.scope)?s.scope:[""];let o=-1;if("string"==typeof s.settings.fontStyle){o=0;let t=s.settings.fontStyle.split(" ");for(let e=0,n=t.length;e<n;e++){switch(t[e]){case"italic":o|=1;break;case"bold":o|=2;break;case"underline":o|=4;break;case"strikethrough":o|=8}}}let l=null;"string"==typeof s.settings.foreground&&E(s.settings.foreground)&&(l=s.settings.foreground);let a=null;"string"==typeof s.settings.background&&E(s.settings.background)&&(a=s.settings.background);for(let e=0,s=r.length;e<s;e++){let s=r[e].trim().split(" "),u=s[s.length-1],c=null;s.length>1&&(c=s.slice(0,s.length-1),c.reverse()),n[i++]=new q(u,c,t,o,l,a)}}return n}(t),e)}static createFromParsedTheme(t,e){return function(t,e){t.sort(((t,e)=>{let n=N(t.scope,e.scope);return 0!==n?n:(n=D(t.parentScopes,e.parentScopes),0!==n?n:t.index-e.index)}));let n=0,i="#000000",r="#ffffff";for(;t.length>=1&&""===t[0].scope;){let e=t.shift();-1!==e.fontStyle&&(n=e.fontStyle),null!==e.foreground&&(i=e.foreground),null!==e.background&&(r=e.background)}let s=new F(e),o=new G(n,s.getId(i),s.getId(r)),l=new W(new U(0,null,-1,0,0),[]);for(let e=0,n=t.length;e<n;e++){let n=t[e];l.insert(0,n.scope,n.parentScopes,n.fontStyle,s.getId(n.foreground),s.getId(n.background))}return new $(s,o,l)}(t,e)}_cachedMatchRoot=new R((t=>this._root.match(t)));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(null===t)return this._defaults;const e=t.scopeName,n=this._cachedMatchRoot.get(e).find((e=>function(t,e){if(0===e.length)return!0;for(let n=0;n<e.length;n++){let i=e[n],r=!1;if(">"===i){if(n===e.length-1)return!1;i=e[++n],r=!0}for(;t&&!I(t.scopeName,i);){if(r)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}(t.parent,e.parentScopes)));return n?new G(n.fontStyle,n.foreground,n.background):null}},B=class t{constructor(t,e){this.parent=t,this.scopeName=e}static push(e,n){for(const i of n)e=new t(e,i);return e}static from(...e){let n=null;for(let i=0;i<e.length;i++)n=new t(n,e[i]);return n}push(e){return new t(this,e)}getSegments(){let t=this;const e=[];for(;t;)e.push(t.scopeName),t=t.parent;return e.reverse(),e}toString(){return this.getSegments().join(" ")}extends(t){return this===t||null!==this.parent&&this.parent.extends(t)}getExtensionIfDefined(t){const e=[];let n=this;for(;n&&n!==t;)e.push(n.scopeName),n=n.parent;return n===t?e.reverse():void 0}};function I(t,e){return e===t||t.startsWith(e)&&"."===t[e.length]}var G=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};var q=class{constructor(t,e,n,i,r,s){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=i,this.foreground=r,this.background=s}},z=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(z||{});var F=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(null===t)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},H=Object.freeze([]),U=class t{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,e,n,i,r){this.scopeDepth=t,this.parentScopes=e||H,this.fontStyle=n,this.foreground=i,this.background=r}clone(){return new t(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let e=[];for(let n=0,i=t.length;n<i;n++)e[n]=t[n].clone();return e}acceptOverwrite(t,e,n,i){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,-1!==e&&(this.fontStyle=e),0!==n&&(this.foreground=n),0!==i&&(this.background=i)}},W=class t{constructor(t,e=[],n={}){this._mainRule=t,this._children=n,this._rulesWithParentScopes=e}_rulesWithParentScopes;static _cmpBySpecificity(t,e){if(t.scopeDepth!==e.scopeDepth)return e.scopeDepth-t.scopeDepth;let n=0,i=0;for(;">"===t.parentScopes[n]&&n++,">"===e.parentScopes[i]&&i++,!(n>=t.parentScopes.length||i>=e.parentScopes.length);){const r=e.parentScopes[i].length-t.parentScopes[n].length;if(0!==r)return r;n++,i++}return e.parentScopes.length-t.parentScopes.length}match(e){if(""!==e){let t,n,i=e.indexOf(".");if(-1===i?(t=e,n=""):(t=e.substring(0,i),n=e.substring(i+1)),this._children.hasOwnProperty(t))return this._children[t].match(n)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(t._cmpBySpecificity),n}insert(e,n,i,r,s,o){if(""===n)return void this._doInsertHere(e,i,r,s,o);let l,a,u,c=n.indexOf(".");-1===c?(l=n,a=""):(l=n.substring(0,c),a=n.substring(c+1)),this._children.hasOwnProperty(l)?u=this._children[l]:(u=new t(this._mainRule.clone(),U.cloneArr(this._rulesWithParentScopes)),this._children[l]=u),u.insert(e+1,a,i,r,s,o)}_doInsertHere(t,e,n,i,r){if(null!==e){for(let s=0,o=this._rulesWithParentScopes.length;s<o;s++){let o=this._rulesWithParentScopes[s];if(0===D(o.parentScopes,e))return void o.acceptOverwrite(t,n,i,r)}-1===n&&(n=this._mainRule.fontStyle),0===i&&(i=this._mainRule.foreground),0===r&&(r=this._mainRule.background),this._rulesWithParentScopes.push(new U(t,e,n,i,r))}else this._mainRule.acceptOverwrite(t,n,i,r)}},V=class t{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(e){const n=t.getLanguageId(e),i=t.getTokenType(e),r=t.getFontStyle(e),s=t.getForeground(e),o=t.getBackground(e);console.log({languageId:n,tokenType:i,fontStyle:r,foreground:s,background:o})}static getLanguageId(t){return(255&t)>>>0}static getTokenType(t){return(768&t)>>>8}static containsBalancedBrackets(t){return!!(1024&t)}static getFontStyle(t){return(30720&t)>>>11}static getForeground(t){return(16744448&t)>>>15}static getBackground(t){return(4278190080&t)>>>24}static set(e,n,i,r,s,o,l){let a=t.getLanguageId(e),u=t.getTokenType(e),c=t.containsBalancedBrackets(e)?1:0,m=t.getFontStyle(e),p=t.getForeground(e),h=t.getBackground(e);return 0!==n&&(a=n),8!==i&&(u=i),null!==r&&(c=r?1:0),-1!==s&&(m=s),0!==o&&(p=o),0!==l&&(h=l),(a|u<<8|c<<10|m<<11|p<<15|h<<24)>>>0}};function J(t,e){const n=[],i=function(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const i=n[0];return n=e.exec(t),i}}}(t);let r=i.next();for(;null!==r;){let t=0;if(2===r.length&&":"===r.charAt(1)){switch(r.charAt(0)){case"R":t=1;break;case"L":t=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=i.next()}let e=o();if(n.push({matcher:e,priority:t}),","!==r)break;r=i.next()}return n;function s(){if("-"===r){r=i.next();const t=s();return e=>!!t&&!t(e)}if("("===r){r=i.next();const t=function(){const t=[];let e=o();for(;e&&(t.push(e),"|"===r||","===r);){do{r=i.next()}while("|"===r||","===r);e=o()}return e=>t.some((t=>t(e)))}();return")"===r&&(r=i.next()),t}if(K(r)){const t=[];do{t.push(r),r=i.next()}while(K(r));return n=>e(t,n)}return null}function o(){const t=[];let e=s();for(;e;)t.push(e),e=s();return e=>t.every((t=>t(e)))}}function K(t){return!!t&&!!t.match(/[\w\.:]+/)}function X(t){"function"==typeof t.dispose&&t.dispose()}var Y=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},Q=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Z=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},tt=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Y(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new Z;for(const n of t)et(n,this.initialScopeName,this.repo,e);for(const t of e.references)if(t instanceof Y){if(this.seenFullScopeRequests.has(t.scopeName))continue;this.seenFullScopeRequests.add(t.scopeName),this.Q.push(t)}else{if(this.seenFullScopeRequests.has(t.scopeName))continue;if(this.seenPartialScopeRequests.has(t.toKey()))continue;this.seenPartialScopeRequests.add(t.toKey()),this.Q.push(t)}}};function et(t,e,n,i){const r=n.lookup(t.scopeName);if(!r){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const s=n.lookup(e);t instanceof Y?it({baseGrammar:s,selfGrammar:r},i):nt(t.ruleName,{baseGrammar:s,selfGrammar:r,repository:r.repository},i);const o=n.injections(t.scopeName);if(o)for(const t of o)i.add(new Y(t))}function nt(t,e,n){if(e.repository&&e.repository[t]){rt([e.repository[t]],e,n)}}function it(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&rt(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&rt(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function rt(t,e,n){for(const i of t){if(n.visitedRule.has(i))continue;n.visitedRule.add(i);const t=i.repository?T({},e.repository,i.repository):e.repository;Array.isArray(i.patterns)&&rt(i.patterns,{...e,repository:t},n);const r=i.include;if(!r)continue;const s=ct(r);switch(s.kind){case 0:it({...e,selfGrammar:e.baseGrammar},n);break;case 1:it(e,n);break;case 2:nt(s.ruleName,{...e,repository:t},n);break;case 3:case 4:const i=s.scopeName===e.selfGrammar.scopeName?e.selfGrammar:s.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(i){const r={baseGrammar:e.baseGrammar,selfGrammar:i,repository:t};4===s.kind?nt(s.ruleName,r,n):it(r,n)}else 4===s.kind?n.add(new Q(s.scopeName,s.ruleName)):n.add(new Y(s.scopeName))}}}var st=class{kind=0},ot=class{kind=1},lt=class{constructor(t){this.ruleName=t}kind=2},at=class{constructor(t){this.scopeName=t}kind=3},ut=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function ct(t){if("$base"===t)return new st;if("$self"===t)return new ot;const e=t.indexOf("#");if(-1===e)return new at(t);if(0===e)return new lt(t.substring(1));{const n=t.substring(0,e),i=t.substring(e+1);return new ut(n,i)}}var mt=/\\(\d+)/,pt=/\\(\d+)/g;var ht=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,i){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=P.hasCaptures(this._name),this._contentName=i||null,this._contentNameIsCapturing=P.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${M(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return this._nameIsCapturing&&null!==this._name&&null!==t&&null!==e?P.replaceCaptures(this._name,t,e):this._name}getContentName(t,e){return this._contentNameIsCapturing&&null!==this._contentName?P.replaceCaptures(this._contentName,t,e):this._contentName}},dt=class extends ht{retokenizeCapturedWithRuleId;constructor(t,e,n,i,r){super(t,e,n,i),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,i){throw new Error("Not supported!")}},ft=class extends ht{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,i,r){super(t,e,n,null),this._match=new kt(i,this.id),this.captures=r,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,i){return this._getCachedCompiledPatterns(t).compileAG(t,n,i)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new vt,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},gt=class extends ht{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,i,r){super(t,e,n,i),this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const n of this.patterns){t.getRule(n).collectPatterns(t,e)}}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,i){return this._getCachedCompiledPatterns(t).compileAG(t,n,i)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new vt,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},yt=class extends ht{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,i,r,s,o,l,a,u){super(t,e,n,i),this._begin=new kt(r,this.id),this.beginCaptures=s,this._end=new kt(o||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=a||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,i){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,i)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new vt;for(const e of this.patterns){t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},bt=class extends ht{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,i,r,s,o,l,a){super(t,e,n,i),this._begin=new kt(r,this.id),this.beginCaptures=s,this.whileCaptures=l,this._while=new kt(o,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,i){return this._getCachedCompiledPatterns(t).compileAG(t,n,i)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new vt;for(const e of this.patterns){t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,i){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,i)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new vt,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||""),this._cachedCompiledWhilePatterns}},wt=class t{static createCaptureRule(t,e,n,i,r){return t.registerRule((t=>new dt(e,t,n,i,r)))}static getCompiledRuleId(e,n,i){return e.id||n.registerRule((r=>{if(e.id=r,e.match)return new ft(e.$vscodeTextmateLocation,e.id,e.name,e.match,t._compileCaptures(e.captures,n,i));if(void 0===e.begin){e.repository&&(i=T({},i,e.repository));let r=e.patterns;return void 0===r&&e.include&&(r=[{include:e.include}]),new gt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,t._compilePatterns(r,n,i))}return e.while?new bt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,i),e.while,t._compileCaptures(e.whileCaptures||e.captures,n,i),t._compilePatterns(e.patterns,n,i)):new yt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,i),e.end,t._compileCaptures(e.endCaptures||e.captures,n,i),e.applyEndPatternLast,t._compilePatterns(e.patterns,n,i))})),e.id}static _compileCaptures(e,n,i){let r=[];if(e){let s=0;for(const t in e){if("$vscodeTextmateLocation"===t)continue;const e=parseInt(t,10);e>s&&(s=e)}for(let t=0;t<=s;t++)r[t]=null;for(const s in e){if("$vscodeTextmateLocation"===s)continue;const o=parseInt(s,10);let l=0;e[s].patterns&&(l=t.getCompiledRuleId(e[s],n,i)),r[o]=t.createCaptureRule(n,e[s].$vscodeTextmateLocation,e[s].name,e[s].contentName,l)}}return r}static _compilePatterns(e,n,i){let r=[];if(e)for(let s=0,o=e.length;s<o;s++){const o=e[s];let l=-1;if(o.include){const e=ct(o.include);switch(e.kind){case 0:case 1:l=t.getCompiledRuleId(i[o.include],n,i);break;case 2:let r=i[e.ruleName];r&&(l=t.getCompiledRuleId(r,n,i));break;case 3:case 4:const s=e.scopeName,a=4===e.kind?e.ruleName:null,u=n.getExternalGrammar(s,i);if(u)if(a){let e=u.repository[a];e&&(l=t.getCompiledRuleId(e,n,u.repository))}else l=t.getCompiledRuleId(u.repository.$self,n,u.repository)}}else l=t.getCompiledRuleId(o,n,i);if(-1!==l){const t=n.getRule(l);let e=!1;if((t instanceof gt||t instanceof yt||t instanceof bt)&&t.hasMissingPatterns&&0===t.patterns.length&&(e=!0),e)continue;r.push(l)}}return{patterns:r,hasMissingPatterns:(e?e.length:0)!==r.length}}},kt=class t{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,e){if(t&&"string"==typeof t){const e=t.length;let n=0,i=[],r=!1;for(let s=0;s<e;s++){if("\\"===t.charAt(s)&&s+1<e){const e=t.charAt(s+1);"z"===e?(i.push(t.substring(n,s)),i.push("$(?!\\n)(?<!\\n)"),n=s+2):"A"!==e&&"G"!==e||(r=!0),s++}}this.hasAnchor=r,0===n?this.source=t:(i.push(t.substring(n,e)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=e,"string"==typeof this.source?this.hasBackReferences=mt.test(this.source):this.hasBackReferences=!1}clone(){return new t(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,e){if("string"!=typeof this.source)throw new Error("This method should only be called if the source is a string");let n=e.map((e=>t.substring(e.start,e.end)));return pt.lastIndex=0,this.source.replace(pt,((t,e)=>_(n[parseInt(e,10)]||"")))}_buildAnchorCache(){if("string"!=typeof this.source)throw new Error("This method should only be called if the source is a string");let t,e,n,i,r=[],s=[],o=[],l=[];for(t=0,e=this.source.length;t<e;t++)n=this.source.charAt(t),r[t]=n,s[t]=n,o[t]=n,l[t]=n,"\\"===n&&t+1<e&&(i=this.source.charAt(t+1),"A"===i?(r[t+1]="",s[t+1]="",o[t+1]="A",l[t+1]="A"):"G"===i?(r[t+1]="",s[t+1]="G",o[t+1]="",l[t+1]="G"):(r[t+1]=i,s[t+1]=i,o[t+1]=i,l[t+1]=i),t++);return{A0_G0:r.join(""),A0_G1:s.join(""),A1_G0:o.join(""),A1_G1:l.join("")}}resolveAnchors(t,e){return this.hasAnchor&&this._anchorCache&&"string"==typeof this.source?t?e?this._anchorCache.A1_G1:this._anchorCache.A1_G0:e?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}},vt=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map((t=>t.source));this._cached=new jt(t,e,this._items.map((t=>t.ruleId)))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let i=this._items.map((t=>t.resolveAnchors(e,n)));return new jt(t,i,this._items.map((t=>t.ruleId)))}},jt=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join("\n")}findNextMatchSync(t,e,n){const i=this.scanner.findNextMatchSync(t,e,n);return i?{ruleId:this.rules[i.index],captureIndices:i.captureIndices}:null}},St=class{constructor(t,e){this.languageId=t,this.tokenType=e}},xt=class t{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,e){this._defaultAttributes=new St(t,8),this._embeddedLanguagesMatcher=new Ct(Object.entries(e||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return null===e?t._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new St(0,0);_getBasicScopeAttributes=new R((t=>{const e=this._scopeToLanguage(t),n=this._toStandardTokenType(t);return new St(e,n)}));_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(e){const n=e.match(t.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Ct=class{values;scopesRegExp;constructor(t){if(0===t.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map((([t,e])=>_(t)));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);return e?this.values.get(e[1]):void 0}};"undefined"!=typeof process&&process.env.VSCODE_TEXTMATE_DEBUG;var At=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function Lt(t,e,n,i,r,s,o,l){const a=e.content.length;let u=!1,c=-1;if(o){const o=function(t,e,n,i,r,s){let o=r.beginRuleCapturedEOL?0:-1;const l=[];for(let e=r;e;e=e.pop()){const n=e.getRule(t);n instanceof bt&&l.push({rule:n,stack:e})}for(let a=l.pop();a;a=l.pop()){const{ruleScanner:l,findOptions:u}=Mt(a.rule,t,a.stack.endRule,n,i===o),c=l.findNextMatchSync(e,i,u);if(!c){r=a.stack.pop();break}if(-2!==c.ruleId){r=a.stack.pop();break}c.captureIndices&&c.captureIndices.length&&(s.produce(a.stack,c.captureIndices[0].start),Ot(t,e,n,a.stack,s,a.rule.whileCaptures,c.captureIndices),s.produce(a.stack,c.captureIndices[0].end),o=c.captureIndices[0].end,c.captureIndices[0].end>i&&(i=c.captureIndices[0].end,n=!1))}return{stack:r,linePos:i,anchorPosition:o,isFirstLine:n}}(t,e,n,i,r,s);r=o.stack,i=o.linePos,n=o.isFirstLine,c=o.anchorPosition}const m=Date.now();for(;!u;){if(0!==l){if(Date.now()-m>l)return new At(r,!0)}p()}return new At(r,!1);function p(){const o=function(t,e,n,i,r,s){const o=function(t,e,n,i,r,s){const o=r.getRule(t),{ruleScanner:l,findOptions:a}=Tt(o,t,r.endRule,n,i===s),u=l.findNextMatchSync(e,i,a);if(u)return{captureIndices:u.captureIndices,matchedRuleId:u.ruleId};return null}(t,e,n,i,r,s),l=t.getInjections();if(0===l.length)return o;const a=function(t,e,n,i,r,s,o){let l,a=Number.MAX_VALUE,u=null,c=0;const m=s.contentNameScopesList.getScopeNames();for(let s=0,p=t.length;s<p;s++){const p=t[s];if(!p.matcher(m))continue;const h=e.getRule(p.ruleId),{ruleScanner:d,findOptions:f}=Tt(h,e,null,i,r===o),g=d.findNextMatchSync(n,r,f);if(!g)continue;const y=g.captureIndices[0].start;if(!(y>=a)&&(a=y,u=g.captureIndices,l=g.ruleId,c=p.priority,a===r))break}if(u)return{priorityMatch:-1===c,captureIndices:u,matchedRuleId:l};return null}(l,t,e,n,i,r,s);if(!a)return o;if(!o)return a;const u=o.captureIndices[0].start,c=a.captureIndices[0].start;if(c<u||a.priorityMatch&&c===u)return a;return o}(t,e,n,i,r,c);if(!o)return s.produce(r,a),void(u=!0);const l=o.captureIndices,m=o.matchedRuleId,p=!!(l&&l.length>0)&&l[0].end>i;if(-1===m){const o=r.getRule(t);s.produce(r,l[0].start),r=r.withContentNameScopesList(r.nameScopesList),Ot(t,e,n,r,s,o.endCaptures,l),s.produce(r,l[0].end);const m=r;if(r=r.parent,c=m.getAnchorPos(),!p&&m.getEnterPos()===i)return r=m,s.produce(r,a),void(u=!0)}else{const o=t.getRule(m);s.produce(r,l[0].start);const h=r,d=o.getName(e.content,l),f=r.contentNameScopesList.pushAttributed(d,t);if(r=r.push(m,i,c,l[0].end===a,null,f,f),o instanceof yt){const i=o;Ot(t,e,n,r,s,i.beginCaptures,l),s.produce(r,l[0].end),c=l[0].end;const m=i.getContentName(e.content,l),d=f.pushAttributed(m,t);if(r=r.withContentNameScopesList(d),i.endHasBackReferences&&(r=r.withEndRule(i.getEndWithResolvedBackReferences(e.content,l))),!p&&h.hasSameRuleAs(r))return r=r.pop(),s.produce(r,a),void(u=!0)}else if(o instanceof bt){const i=o;Ot(t,e,n,r,s,i.beginCaptures,l),s.produce(r,l[0].end),c=l[0].end;const m=i.getContentName(e.content,l),d=f.pushAttributed(m,t);if(r=r.withContentNameScopesList(d),i.whileHasBackReferences&&(r=r.withEndRule(i.getWhileWithResolvedBackReferences(e.content,l))),!p&&h.hasSameRuleAs(r))return r=r.pop(),s.produce(r,a),void(u=!0)}else{if(Ot(t,e,n,r,s,o.captures,l),s.produce(r,l[0].end),r=r.pop(),!p)return r=r.safePop(),s.produce(r,a),void(u=!0)}}l[0].end>i&&(i=l[0].end,n=!1)}}function Tt(t,e,n,i,r){return{ruleScanner:t.compileAG(e,n,i,r),findOptions:0}}function Mt(t,e,n,i,r){return{ruleScanner:t.compileWhileAG(e,n,i,r),findOptions:0}}function Ot(t,e,n,i,r,s,o){if(0===s.length)return;const l=e.content,a=Math.min(s.length,o.length),u=[],c=o[0].end;for(let e=0;e<a;e++){const a=s[e];if(null===a)continue;const m=o[e];if(0===m.length)continue;if(m.start>c)break;for(;u.length>0&&u[u.length-1].endPos<=m.start;)r.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?r.produceFromScopes(u[u.length-1].scopes,m.start):r.produce(i,m.start),a.retokenizeCapturedWithRuleId){const e=a.getName(l,o),s=i.contentNameScopesList.pushAttributed(e,t),u=a.getContentName(l,o),c=s.pushAttributed(u,t),p=i.push(a.retokenizeCapturedWithRuleId,m.start,-1,!1,null,s,c),h=t.createOnigString(l.substring(0,m.end));Lt(t,h,n&&0===m.start,m.start,p,r,!1,0),X(h);continue}const p=a.getName(l,o);if(null!==p){const e=(u.length>0?u[u.length-1].scopes:i.contentNameScopesList).pushAttributed(p,t);u.push(new Pt(e,m.end))}}for(;u.length>0;)r.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var Pt=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function Nt(t,e,n,i,r){const s=J(e,Dt),o=wt.getCompiledRuleId(n,i,r.repository);for(const n of s)t.push({debugSelector:e,matcher:n.matcher,ruleId:o,grammar:r,priority:n.priority})}function Dt(t,e){if(e.length<t.length)return!1;let n=0;return t.every((t=>{for(let i=n;i<e.length;i++)if(Et(e[i],t))return n=i+1,!0;return!1}))}function Et(t,e){if(!t)return!1;if(t===e)return!0;const n=e.length;return t.length>n&&t.substr(0,n)===e&&"."===t[n]}var _t=class{constructor(t,e,n,i,r,s,o,l){if(this._rootScopeName=t,this.balancedBracketSelectors=s,this._onigLib=l,this._basicScopeAttributesProvider=new xt(n,i),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Rt(e,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const t of Object.keys(r)){const e=J(t,Dt);for(const n of e)this._tokenTypeMatchers.push({matcher:n.matcher,type:r[t]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t=t=>t===this._rootScopeName?this._grammar:this.getExternalGrammar(t),e=[],n=this._rootScopeName,i=t(n);if(i){const t=i.injections;if(t)for(let n in t)Nt(e,n,t[n],this,i);const r=this._grammarRepository.injections(n);r&&r.forEach((t=>{const n=this.getExternalGrammar(t);if(n){const t=n.injectionSelector;t&&Nt(e,t,n,this,n)}}))}return e.sort(((t,e)=>t.priority-e.priority)),e}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,n=t(e);return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=Rt(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){const i=this._tokenize(t,e,!1,n);return{tokens:i.lineTokens.getResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}tokenizeLine2(t,e,n=0){const i=this._tokenize(t,e,!0,n);return{tokens:i.lineTokens.getBinaryResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}_tokenize(t,e,n,i){let r;if(-1===this._rootId&&(this._rootId=wt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),e&&e!==Bt.NULL)r=!1,e.reset();else{r=!0;const t=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),i=V.set(0,t.languageId,t.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),s=this.getRule(this._rootId).getName(null,null);let o;o=s?$t.createRootAndLookUpScopeName(s,i,this):$t.createRoot("unknown",i),e=new Bt(null,this._rootId,-1,-1,!1,null,o,o)}t+="\n";const s=this.createOnigString(t),o=s.content.length,l=new Gt(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),a=Lt(this,s,r,0,e,l,!0,i);return X(s),{lineLength:o,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function Rt(t,e){return(t=L(t)).repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var $t=class t{constructor(t,e,n){this.parent=t,this.scopePath=e,this.tokenAttributes=n}static fromExtension(e,n){let i=e,r=e?.scopePath??null;for(const e of n)r=B.push(r,e.scopeNames),i=new t(i,r,e.encodedTokenAttributes);return i}static createRoot(e,n){return new t(null,new B(null,e),n)}static createRootAndLookUpScopeName(e,n,i){const r=i.getMetadataForScope(e),s=new B(null,e),o=i.themeProvider.themeMatch(s),l=t.mergeAttributes(n,r,o);return new t(null,s,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return t.equals(this,e)}static equals(t,e){for(;;){if(t===e)return!0;if(!t&&!e)return!0;if(!t||!e)return!1;if(t.scopeName!==e.scopeName||t.tokenAttributes!==e.tokenAttributes)return!1;t=t.parent,e=e.parent}}static mergeAttributes(t,e,n){let i=-1,r=0,s=0;return null!==n&&(i=n.fontStyle,r=n.foregroundId,s=n.backgroundId),V.set(t,e.languageId,e.tokenType,null,i,r,s)}pushAttributed(e,n){if(null===e)return this;if(-1===e.indexOf(" "))return t._pushAttributed(this,e,n);const i=e.split(/ /g);let r=this;for(const e of i)r=t._pushAttributed(r,e,n);return r}static _pushAttributed(e,n,i){const r=i.getMetadataForScope(n),s=e.scopePath.push(n),o=i.themeProvider.themeMatch(s),l=t.mergeAttributes(e.tokenAttributes,r,o);return new t(e,s,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const e=[];let n=this;for(;n&&n!==t;)e.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===t?e.reverse():void 0}},Bt=class t{constructor(t,e,n,i,r,s,o,l){this.parent=t,this.ruleId=e,this.beginRuleCapturedEOL=r,this.endRule=s,this.nameScopesList=o,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new t(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return null!==e&&t._equals(this,e)}static _equals(t,e){return t===e||!!this._structuralEquals(t,e)&&$t.equals(t.contentNameScopesList,e.contentNameScopesList)}static _structuralEquals(t,e){for(;;){if(t===e)return!0;if(!t&&!e)return!0;if(!t||!e)return!1;if(t.depth!==e.depth||t.ruleId!==e.ruleId||t.endRule!==e.endRule)return!1;t=t.parent,e=e.parent}}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){t._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,i,r,s,o,l){return new t(this,e,n,i,r,s,o,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,e){return this.parent&&(e=this.parent._writeString(t,e)),t[e++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,e}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(e){return this.endRule===e?this:new t(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let e=this;for(;e&&e._enterPos===t._enterPos;){if(e.ruleId===t.ruleId)return!0;e=e.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,n){const i=$t.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new t(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,i,$t.fromExtension(i,n.contentNameScopesList))}},It=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap((t=>"*"===t?(this.allowAny=!0,[]):J(t,Dt).map((t=>t.matcher)))),this.unbalancedBracketScopes=e.flatMap((t=>J(t,Dt).map((t=>t.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},Gt=class{constructor(t,e,n,i){this.balancedBracketSelectors=i,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let n=t?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const e=t?.getScopeNames()??[];for(const t of this._tokenTypeOverrides)t.matcher(e)&&(n=V.set(n,0,t.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(e))}return i&&(n=V.set(n,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n?void(this._lastTokenEndIndex=e):(this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),void(this._lastTokenEndIndex=e))}const n=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let t=0,e=this._binaryTokens.length;t<e;t++)n[t]=this._binaryTokens[t];return n}},qt=class{constructor(t,e){this._onigLib=e,this._theme=t}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,i,r){if(!this._grammars.has(t)){let s=this._rawGrammars.get(t);if(!s)return null;this._grammars.set(t,function(t,e,n,i,r,s,o,l){return new _t(t,e,n,i,r,s,o,l)}(t,s,e,n,i,r,this,this._onigLib))}return this._grammars.get(t)}},zt=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new qt($.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,e){this._syncRegistry.setTheme($.createFromRawTheme(t,e))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,e,n){return this.loadGrammarWithConfiguration(t,e,{embeddedLanguages:n})}loadGrammarWithConfiguration(t,e,n){return this._loadGrammar(t,e,n.embeddedLanguages,n.tokenTypes,new It(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,e,n,i,r){const s=new tt(this._syncRegistry,t);for(;s.Q.length>0;)s.Q.map((t=>this._loadSingleGrammar(t.scopeName))),s.processQueue();return this._grammarForScopeName(t,e,n,i,r)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const e=this._options.loadGrammar(t);if(e){const n="function"==typeof this._options.getInjections?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(e,n)}}addGrammar(t,e=[],n=0,i=null){return this._syncRegistry.addGrammar(t,e),this._grammarForScopeName(t.scopeName,n,i)}_grammarForScopeName(t,e=0,n=null,i=null,r=null){return this._syncRegistry.grammarForScopeName(t,e,n,i,r)}},Ft=Bt.NULL;const Ht=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Ut{constructor(t,e,n){this.property=t,this.normal=e,n&&(this.space=n)}}function Wt(t,e){const n={},i={};let r=-1;for(;++r<t.length;)Object.assign(n,t[r].property),Object.assign(i,t[r].normal);return new Ut(n,i,e)}function Vt(t){return t.toLowerCase()}Ut.prototype.property={},Ut.prototype.normal={},Ut.prototype.space=null;class Jt{constructor(t,e){this.property=t,this.attribute=e}}Jt.prototype.space=null,Jt.prototype.boolean=!1,Jt.prototype.booleanish=!1,Jt.prototype.overloadedBoolean=!1,Jt.prototype.number=!1,Jt.prototype.commaSeparated=!1,Jt.prototype.spaceSeparated=!1,Jt.prototype.commaOrSpaceSeparated=!1,Jt.prototype.mustUseProperty=!1,Jt.prototype.defined=!1;let Kt=0;const Xt=ie(),Yt=ie(),Qt=ie(),Zt=ie(),te=ie(),ee=ie(),ne=ie();function ie(){return 2**++Kt}var re=Object.freeze({__proto__:null,boolean:Xt,booleanish:Yt,commaOrSpaceSeparated:ne,commaSeparated:ee,number:Zt,overloadedBoolean:Qt,spaceSeparated:te});const se=Object.keys(re);class oe extends Jt{constructor(t,e,n,i){let r=-1;if(super(t,e),le(this,"space",i),"number"==typeof n)for(;++r<se.length;){const t=se[r];le(this,se[r],(n&re[t])===re[t])}}}function le(t,e,n){n&&(t[e]=n)}oe.prototype.defined=!0;const ae={}.hasOwnProperty;function ue(t){const e={},n={};let i;for(i in t.properties)if(ae.call(t.properties,i)){const r=t.properties[i],s=new oe(i,t.transform(t.attributes||{},i),r,t.space);t.mustUseProperty&&t.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),e[i]=s,n[Vt(i)]=i,n[Vt(s.attribute)]=i}return new Ut(e,n,t.space)}const ce=ue({space:"xlink",transform:(t,e)=>"xlink:"+e.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),me=ue({space:"xml",transform:(t,e)=>"xml:"+e.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function pe(t,e){return e in t?t[e]:e}function he(t,e){return pe(t,e.toLowerCase())}const de=ue({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:he,properties:{xmlns:null,xmlnsXLink:null}}),fe=ue({transform:(t,e)=>"role"===e?e:"aria-"+e.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Yt,ariaAutoComplete:null,ariaBusy:Yt,ariaChecked:Yt,ariaColCount:Zt,ariaColIndex:Zt,ariaColSpan:Zt,ariaControls:te,ariaCurrent:null,ariaDescribedBy:te,ariaDetails:null,ariaDisabled:Yt,ariaDropEffect:te,ariaErrorMessage:null,ariaExpanded:Yt,ariaFlowTo:te,ariaGrabbed:Yt,ariaHasPopup:null,ariaHidden:Yt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:te,ariaLevel:Zt,ariaLive:null,ariaModal:Yt,ariaMultiLine:Yt,ariaMultiSelectable:Yt,ariaOrientation:null,ariaOwns:te,ariaPlaceholder:null,ariaPosInSet:Zt,ariaPressed:Yt,ariaReadOnly:Yt,ariaRelevant:null,ariaRequired:Yt,ariaRoleDescription:te,ariaRowCount:Zt,ariaRowIndex:Zt,ariaRowSpan:Zt,ariaSelected:Yt,ariaSetSize:Zt,ariaSort:null,ariaValueMax:Zt,ariaValueMin:Zt,ariaValueNow:Zt,ariaValueText:null,role:null}}),ge=ue({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:he,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ee,acceptCharset:te,accessKey:te,action:null,allow:null,allowFullScreen:Xt,allowPaymentRequest:Xt,allowUserMedia:Xt,alt:null,as:null,async:Xt,autoCapitalize:null,autoComplete:te,autoFocus:Xt,autoPlay:Xt,blocking:te,capture:null,charSet:null,checked:Xt,cite:null,className:te,cols:Zt,colSpan:null,content:null,contentEditable:Yt,controls:Xt,controlsList:te,coords:Zt|ee,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Xt,defer:Xt,dir:null,dirName:null,disabled:Xt,download:Qt,draggable:Yt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Xt,formTarget:null,headers:te,height:Zt,hidden:Xt,high:Zt,href:null,hrefLang:null,htmlFor:te,httpEquiv:te,id:null,imageSizes:null,imageSrcSet:null,inert:Xt,inputMode:null,integrity:null,is:null,isMap:Xt,itemId:null,itemProp:te,itemRef:te,itemScope:Xt,itemType:te,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Xt,low:Zt,manifest:null,max:null,maxLength:Zt,media:null,method:null,min:null,minLength:Zt,multiple:Xt,muted:Xt,name:null,nonce:null,noModule:Xt,noValidate:Xt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Xt,optimum:Zt,pattern:null,ping:te,placeholder:null,playsInline:Xt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Xt,referrerPolicy:null,rel:te,required:Xt,reversed:Xt,rows:Zt,rowSpan:Zt,sandbox:te,scope:null,scoped:Xt,seamless:Xt,selected:Xt,shadowRootClonable:Xt,shadowRootDelegatesFocus:Xt,shadowRootMode:null,shape:null,size:Zt,sizes:null,slot:null,span:Zt,spellCheck:Yt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Zt,step:null,style:null,tabIndex:Zt,target:null,title:null,translate:null,type:null,typeMustMatch:Xt,useMap:null,value:Yt,width:Zt,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:te,axis:null,background:null,bgColor:null,border:Zt,borderColor:null,bottomMargin:Zt,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Xt,declare:Xt,event:null,face:null,frame:null,frameBorder:null,hSpace:Zt,leftMargin:Zt,link:null,longDesc:null,lowSrc:null,marginHeight:Zt,marginWidth:Zt,noResize:Xt,noHref:Xt,noShade:Xt,noWrap:Xt,object:null,profile:null,prompt:null,rev:null,rightMargin:Zt,rules:null,scheme:null,scrolling:Yt,standby:null,summary:null,text:null,topMargin:Zt,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Zt,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Xt,disableRemotePlayback:Xt,prefix:null,property:null,results:Zt,security:null,unselectable:null}}),ye=ue({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:pe,properties:{about:ne,accentHeight:Zt,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Zt,amplitude:Zt,arabicForm:null,ascent:Zt,attributeName:null,attributeType:null,azimuth:Zt,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Zt,by:null,calcMode:null,capHeight:Zt,className:te,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Zt,diffuseConstant:Zt,direction:null,display:null,dur:null,divisor:Zt,dominantBaseline:null,download:Xt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Zt,enableBackground:null,end:null,event:null,exponent:Zt,externalResourcesRequired:null,fill:null,fillOpacity:Zt,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ee,g2:ee,glyphName:ee,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Zt,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Zt,horizOriginX:Zt,horizOriginY:Zt,id:null,ideographic:Zt,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Zt,k:Zt,k1:Zt,k2:Zt,k3:Zt,k4:Zt,kernelMatrix:ne,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Zt,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Zt,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Zt,overlineThickness:Zt,paintOrder:null,panose1:null,path:null,pathLength:Zt,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:te,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Zt,pointsAtY:Zt,pointsAtZ:Zt,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ne,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ne,rev:ne,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ne,requiredFeatures:ne,requiredFonts:ne,requiredFormats:ne,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Zt,specularExponent:Zt,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Zt,strikethroughThickness:Zt,string:null,stroke:null,strokeDashArray:ne,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Zt,strokeOpacity:Zt,strokeWidth:null,style:null,surfaceScale:Zt,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ne,tabIndex:Zt,tableValues:null,target:null,targetX:Zt,targetY:Zt,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ne,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Zt,underlineThickness:Zt,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Zt,values:null,vAlphabetic:Zt,vMathematical:Zt,vectorEffect:null,vHanging:Zt,vIdeographic:Zt,version:null,vertAdvY:Zt,vertOriginX:Zt,vertOriginY:Zt,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Zt,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),be=/^data[-\w.:]+$/i,we=/-[a-z]/g,ke=/[A-Z]/g;function ve(t){return"-"+t.toLowerCase()}function je(t){return t.charAt(1).toUpperCase()}const Se=Wt([me,ce,de,fe,ge],"html"),xe=Wt([me,ce,de,fe,ye],"svg"),Ce={}.hasOwnProperty;const Ae=/["&'<>`]/g,Le=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Te=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Me=/[|\\{}()[\]^$+*?.]/g,Oe=new WeakMap;function Pe(t,e){return t=t.replace(e.subset?function(t){let e=Oe.get(t);e||(e=function(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(Me,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}(t),Oe.set(t,e));return e}(e.subset):Ae,n),e.subset||e.escapeOnly?t:t.replace(Le,(function(t,n,i){return e.format(1024*(t.charCodeAt(0)-55296)+t.charCodeAt(1)-56320+65536,i.charCodeAt(n+2),e)})).replace(Te,n);function n(t,n,i){return e.format(t.charCodeAt(0),i.charCodeAt(n+1),e)}}const Ne=/[\dA-Fa-f]/;const De=/\d/;const Ee=["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"],_e={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Re=["cent","copy","divide","gt","lt","not","para","times"],$e={}.hasOwnProperty,Be={};let Ie;for(Ie in _e)$e.call(_e,Ie)&&(Be[_e[Ie]]=Ie);const Ge=/[^\dA-Za-z]/;function qe(t,e,n){let i,r=function(t,e,n){const i="&#x"+t.toString(16).toUpperCase();return n&&e&&!Ne.test(String.fromCharCode(e))?i:i+";"}(t,e,n.omitOptionalSemicolons);if((n.useNamedReferences||n.useShortestReferences)&&(i=function(t,e,n,i){const r=String.fromCharCode(t);if($e.call(Be,r)){const t=Be[r],s="&"+t;return n&&Ee.includes(t)&&!Re.includes(t)&&(!i||e&&61!==e&&Ge.test(String.fromCharCode(e)))?s:s+";"}return""}(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const i=function(t,e,n){const i="&#"+String(t);return n&&e&&!De.test(String.fromCharCode(e))?i:i+";"}(t,e,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function ze(t,e){return Pe(t,Object.assign({format:qe},e))}const Fe=/^>|^->|<!--|-->|--!>|<!-$/g,He=[">"],Ue=["<",">"];function We(t,e){const n=String(t);if("string"!=typeof e)throw new TypeError("Expected character");let i=0,r=n.indexOf(e);for(;-1!==r;)i++,r=n.indexOf(e,r+e.length);return i}function Ve(t,e){const n=e||{};return(""===t[t.length-1]?[...t,""]:t).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}function Je(t){return t.join(" ").trim()}const Ke=/[ \t\n\f\r]/g;function Xe(t){return"object"==typeof t?"text"===t.type&&Ye(t.value):Ye(t)}function Ye(t){return""===t.replace(Ke,"")}const Qe=en(1),Ze=en(-1),tn=[];function en(t){return function(e,n,i){const r=e?e.children:tn;let s=(n||0)+t,o=r[s];if(!i)for(;o&&Xe(o);)s+=t,o=r[s];return o}}const nn={}.hasOwnProperty;function rn(t){return function(e,n,i){return nn.call(t,e.tagName)&&t[e.tagName](e,n,i)}}const sn=rn({body:function(t,e,n){const i=Qe(n,e);return!i||"comment"!==i.type},caption:on,colgroup:on,dd:function(t,e,n){const i=Qe(n,e);return!i||"element"===i.type&&("dt"===i.tagName||"dd"===i.tagName)},dt:function(t,e,n){const i=Qe(n,e);return Boolean(i&&"element"===i.type&&("dt"===i.tagName||"dd"===i.tagName))},head:on,html:function(t,e,n){const i=Qe(n,e);return!i||"comment"!==i.type},li:function(t,e,n){const i=Qe(n,e);return!i||"element"===i.type&&"li"===i.tagName},optgroup:function(t,e,n){const i=Qe(n,e);return!i||"element"===i.type&&"optgroup"===i.tagName},option:function(t,e,n){const i=Qe(n,e);return!i||"element"===i.type&&("option"===i.tagName||"optgroup"===i.tagName)},p:function(t,e,n){const i=Qe(n,e);return i?"element"===i.type&&("address"===i.tagName||"article"===i.tagName||"aside"===i.tagName||"blockquote"===i.tagName||"details"===i.tagName||"div"===i.tagName||"dl"===i.tagName||"fieldset"===i.tagName||"figcaption"===i.tagName||"figure"===i.tagName||"footer"===i.tagName||"form"===i.tagName||"h1"===i.tagName||"h2"===i.tagName||"h3"===i.tagName||"h4"===i.tagName||"h5"===i.tagName||"h6"===i.tagName||"header"===i.tagName||"hgroup"===i.tagName||"hr"===i.tagName||"main"===i.tagName||"menu"===i.tagName||"nav"===i.tagName||"ol"===i.tagName||"p"===i.tagName||"pre"===i.tagName||"section"===i.tagName||"table"===i.tagName||"ul"===i.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:ln,rt:ln,tbody:function(t,e,n){const i=Qe(n,e);return!i||"element"===i.type&&("tbody"===i.tagName||"tfoot"===i.tagName)},td:an,tfoot:function(t,e,n){return!Qe(n,e)},th:an,thead:function(t,e,n){const i=Qe(n,e);return Boolean(i&&"element"===i.type&&("tbody"===i.tagName||"tfoot"===i.tagName))},tr:function(t,e,n){const i=Qe(n,e);return!i||"element"===i.type&&"tr"===i.tagName}});function on(t,e,n){const i=Qe(n,e,!0);return!i||"comment"!==i.type&&!("text"===i.type&&Xe(i.value.charAt(0)))}function ln(t,e,n){const i=Qe(n,e);return!i||"element"===i.type&&("rp"===i.tagName||"rt"===i.tagName)}function an(t,e,n){const i=Qe(n,e);return!i||"element"===i.type&&("td"===i.tagName||"th"===i.tagName)}const un=rn({body:function(t){const e=Qe(t,-1,!0);return!(e&&("comment"===e.type||"text"===e.type&&Xe(e.value.charAt(0))||"element"===e.type&&("meta"===e.tagName||"link"===e.tagName||"script"===e.tagName||"style"===e.tagName||"template"===e.tagName)))},colgroup:function(t,e,n){const i=Ze(n,e),r=Qe(t,-1,!0);if(n&&i&&"element"===i.type&&"colgroup"===i.tagName&&sn(i,n.children.indexOf(i),n))return!1;return Boolean(r&&"element"===r.type&&"col"===r.tagName)},head:function(t){const e=new Set;for(const n of t.children)if("element"===n.type&&("base"===n.tagName||"title"===n.tagName)){if(e.has(n.tagName))return!1;e.add(n.tagName)}const n=t.children[0];return!n||"element"===n.type},html:function(t){const e=Qe(t,-1);return!e||"comment"!==e.type},tbody:function(t,e,n){const i=Ze(n,e),r=Qe(t,-1);if(n&&i&&"element"===i.type&&("thead"===i.tagName||"tbody"===i.tagName)&&sn(i,n.children.indexOf(i),n))return!1;return Boolean(r&&"element"===r.type&&"tr"===r.tagName)}});const cn={name:[["\t\n\f\r &/=>".split(""),"\t\n\f\r \"&'/=>`".split("")],["\0\t\n\f\r \"&'/<=>".split(""),"\0\t\n\f\r \"&'/<=>`".split("")]],unquoted:[["\t\n\f\r &>".split(""),"\0\t\n\f\r \"&'<=>`".split("")],["\0\t\n\f\r \"&'<=>`".split(""),"\0\t\n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function mn(t,e,n){const i=function(t,e){const n=Vt(e);let i=e,r=Jt;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&be.test(e)){if("-"===e.charAt(4)){const t=e.slice(5).replace(we,je);i="data"+t.charAt(0).toUpperCase()+t.slice(1)}else{const t=e.slice(4);if(!we.test(t)){let n=t.replace(ke,ve);"-"!==n.charAt(0)&&(n="-"+n),e="data"+n}}r=oe}return new r(i,e)}(t.schema,e),r=t.settings.allowParseErrors&&"html"===t.schema.space?0:1,s=t.settings.allowDangerousCharacters?0:1;let o,l=t.quote;if(!i.overloadedBoolean||n!==i.attribute&&""!==n?!i.boolean&&!i.overloadedBoolean||"string"==typeof n&&n!==i.attribute&&""!==n||(n=Boolean(n)):n=!0,null==n||!1===n||"number"==typeof n&&Number.isNaN(n))return"";const a=ze(i.attribute,Object.assign({},t.settings.characterReferences,{subset:cn.name[r][s]}));return!0===n?a:(n=Array.isArray(n)?(i.commaSeparated?Ve:Je)(n,{padLeft:!t.settings.tightCommaSeparatedLists}):String(n),t.settings.collapseEmptyAttributes&&!n?a:(t.settings.preferUnquoted&&(o=ze(n,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:cn.unquoted[r][s]}))),o!==n&&(t.settings.quoteSmart&&We(n,l)>We(n,t.alternative)&&(l=t.alternative),o=l+ze(n,Object.assign({},t.settings.characterReferences,{subset:("'"===l?cn.single:cn.double)[r][s],attribute:!0}))+l),a+(o?"="+o:o)))}const pn=["<","&"];function hn(t,e,n,i){return!n||"element"!==n.type||"script"!==n.tagName&&"style"!==n.tagName?ze(t.value,Object.assign({},i.settings.characterReferences,{subset:pn})):t.value}const dn=function(t,e){const n=e||{};function i(e,...n){let r=i.invalid;const s=i.handlers;if(e&&Ce.call(e,t)){const n=String(e[t]);r=Ce.call(s,n)?s[n]:i.unknown}if(r)return r.call(this,e,...n)}return i.handlers=n.handlers||{},i.invalid=n.invalid,i.unknown=n.unknown,i}("type",{invalid:function(t){throw new Error("Expected node, not `"+t+"`")},unknown:function(t){throw new Error("Cannot compile unknown node `"+t.type+"`")},handlers:{comment:function(t,e,n,i){return i.settings.bogusComments?"<?"+ze(t.value,Object.assign({},i.settings.characterReferences,{subset:He}))+">":"\x3c!--"+t.value.replace(Fe,(function(t){return ze(t,Object.assign({},i.settings.characterReferences,{subset:Ue}))}))+"--\x3e"},doctype:function(t,e,n,i){return"<!"+(i.settings.upperDoctype?"DOCTYPE":"doctype")+(i.settings.tightDoctype?"":" ")+"html>"},element:function(t,e,n,i){const r=i.schema,s="svg"!==r.space&&i.settings.omitOptionalTags;let o="svg"===r.space?i.settings.closeEmptyElements:i.settings.voids.includes(t.tagName.toLowerCase());const l=[];let a;"html"===r.space&&"svg"===t.tagName&&(i.schema=xe);const u=function(t,e){const n=[];let i,r=-1;if(e)for(i in e)if(null!==e[i]&&void 0!==e[i]){const r=mn(t,i,e[i]);r&&n.push(r)}for(;++r<n.length;){const e=t.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&'"'!==e&&"'"!==e&&(n[r]+=" ")}return n.join("")}(i,t.properties),c=i.all("html"===r.space&&"template"===t.tagName?t.content:t);return i.schema=r,c&&(o=!1),!u&&s&&un(t,e,n)||(l.push("<",t.tagName,u?" "+u:""),o&&("svg"===r.space||i.settings.closeSelfClosing)&&(a=u.charAt(u.length-1),(!i.settings.tightSelfClosing||"/"===a||a&&'"'!==a&&"'"!==a)&&l.push(" "),l.push("/")),l.push(">")),l.push(c),o||s&&sn(t,e,n)||l.push("</"+t.tagName+">"),l.join("")},raw:function(t,e,n,i){return i.settings.allowDangerousHtml?t.value:hn(t,0,n,i)},root:function(t,e,n,i){return i.all(t)},text:hn}});const fn={},gn={},yn=[];function bn(t,e,n){return dn(t,e,n,this)}function wn(t){const e=[],n=t&&t.children||yn;let i=-1;for(;++i<n.length;)e[i]=this.one(n[i],i,t);return e.join("")}function kn(t,e=!1){const n=t.split(/(\r?\n)/g);let i=0;const r=[];for(let t=0;t<n.length;t+=2){const s=e?n[t]+(n[t+1]||""):n[t];r.push([s,i]),i+=n[t].length,i+=n[t+1]?.length||0}return r}function vn(t){return!t||["plaintext","txt","text","plain"].includes(t)}function jn(t){return"ansi"===t||vn(t)}function Sn(t){return"none"===t}function xn(t){return Sn(t)}function Cn(t,e){if(!e)return t;t.properties||={},t.properties.class||=[],"string"==typeof t.properties.class&&(t.properties.class=t.properties.class.split(/\s+/g)),Array.isArray(t.properties.class)||(t.properties.class=[]);const n=Array.isArray(e)?e:e.split(/\s+/g);for(const e of n)e&&!t.properties.class.includes(e)&&t.properties.class.push(e);return t}async function An(t){return Promise.resolve("function"==typeof t?t():t).then((t=>t.default||t))}function Ln(t,e){const n="string"==typeof t?{}:{...t.colorReplacements},i="string"==typeof t?t:t.name;for(const[t,r]of Object.entries(e?.colorReplacements||{}))"string"==typeof r?n[t]=r:t===i&&Object.assign(n,r);return n}function Tn(t,e){return t&&e?.[t?.toLowerCase()]||t}function Mn(t){const e={};return t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle&&(t.fontStyle&z.Italic&&(e["font-style"]="italic"),t.fontStyle&z.Bold&&(e["font-weight"]="bold"),t.fontStyle&z.Underline&&(e["text-decoration"]="underline")),e}function On(t){return"string"==typeof t?t:Object.entries(t).map((([t,e])=>`${t}:${e}`)).join(";")}class Pn extends Error{constructor(t){super(t),this.name="ShikiError"}}const Nn=new WeakMap;function Dn(t,e){Nn.set(t,e)}function En(t){return Nn.get(t)}class _n{_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,e){return new _n(Object.fromEntries(function(t){return Array.isArray(t)?t:[t]}(e).map((t=>[t,Ft]))),t)}constructor(...t){if(2===t.length){const[e,n]=t;this.lang=n,this._stacks=e}else{const[e,n,i]=t;this.lang=n,this._stacks={[i]:e}}}getInternalStack(t=this.theme){return this._stacks[t]}get scopes(){return Rn(this._stacks[this.theme])}getScopes(t=this.theme){return Rn(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.scopes}}}function Rn(t){const e=[],n=new Set;return function t(i){if(n.has(i))return;n.add(i);const r=i?.nameScopesList?.scopeName;r&&e.push(r),i.parent&&t(i.parent)}(t),e}function $n(){const t=new WeakMap;function e(e){if(!t.has(e.meta)){let n=function(t){if("number"==typeof t){if(t<0||t>e.source.length)throw new Pn(`Invalid decoration offset: ${t}. Code length: ${e.source.length}`);return{...i.indexToPos(t),offset:t}}{const e=i.lines[t.line];if(void 0===e)throw new Pn(`Invalid decoration position ${JSON.stringify(t)}. Lines length: ${i.lines.length}`);if(t.character<0||t.character>e.length)throw new Pn(`Invalid decoration position ${JSON.stringify(t)}. Line ${t.line} length: ${e.length}`);return{...t,offset:i.posToIndex(t.line,t.character)}}};const i=function(t){const e=kn(t,!0).map((([t])=>t));return{lines:e,indexToPos:function(n){if(n===t.length)return{line:e.length-1,character:e[e.length-1].length};let i=n,r=0;for(const t of e){if(i<t.length)break;i-=t.length,r++}return{line:r,character:i}},posToIndex:function(t,n){let i=0;for(let n=0;n<t;n++)i+=e[n].length;return i+=n,i}}}(e.source),r=(e.options.decorations||[]).map((t=>({...t,start:n(t.start),end:n(t.end)})));!function(t){for(let e=0;e<t.length;e++){const n=t[e];if(n.start.offset>n.end.offset)throw new Pn(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let i=e+1;i<t.length;i++){const e=t[i],r=n.start.offset<e.start.offset&&e.start.offset<n.end.offset,s=n.start.offset<e.end.offset&&e.end.offset<n.end.offset,o=e.start.offset<n.start.offset&&n.start.offset<e.end.offset,l=e.start.offset<n.end.offset&&n.end.offset<e.end.offset;if(r||s||o||l){if(s&&s)continue;if(o&&l)continue;throw new Pn(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(e.start)} intersect.`)}}}}(r),t.set(e.meta,{decorations:r,converter:i,source:e.source})}return t.get(e.meta)}return{name:"shiki:decorations",tokens(t){if(!this.options.decorations?.length)return;const n=function(t,e){const n=Array.from(e instanceof Set?e:new Set(e)).sort(((t,e)=>t-e));return n.length?t.map((t=>t.flatMap((t=>{const e=n.filter((e=>t.offset<e&&e<t.offset+t.content.length)).map((e=>e-t.offset)).sort(((t,e)=>t-e));return e.length?function(t,e){let n=0;const i=[];for(const r of e)r>n&&i.push({...t,content:t.content.slice(n,r),offset:t.offset+n}),n=r;return n<t.content.length&&i.push({...t,content:t.content.slice(n),offset:t.offset+n}),i}(t,e):t})))):t}(t,e(this).decorations.flatMap((t=>[t.start.offset,t.end.offset])));return n},code(t){if(!this.options.decorations?.length)return;const n=e(this),i=Array.from(t.children).filter((t=>"element"===t.type&&"span"===t.tagName));if(i.length!==n.converter.lines.length)throw new Pn(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function r(t,e,n,r){const s=i[t];let l="",a=-1,u=-1;if(0===e&&(a=0),0===n&&(u=0),n===Number.POSITIVE_INFINITY&&(u=s.children.length),-1===a||-1===u)for(let t=0;t<s.children.length;t++)l+=Bn(s.children[t]),-1===a&&l.length===e&&(a=t+1),-1===u&&l.length===n&&(u=t+1);if(-1===a)throw new Pn(`Failed to find start index for decoration ${JSON.stringify(r.start)}`);if(-1===u)throw new Pn(`Failed to find end index for decoration ${JSON.stringify(r.end)}`);const c=s.children.slice(a,u);if(r.alwaysWrap||c.length!==s.children.length)if(r.alwaysWrap||1!==c.length||"element"!==c[0].type){const t={type:"element",tagName:"span",properties:{},children:c};o(t,r,"wrapper"),s.children.splice(a,c.length,t)}else o(c[0],r,"token");else o(s,r,"line")}function s(t,e){i[t]=o(i[t],e,"line")}function o(t,e,n){const i=e.properties||{},r=e.transform||(t=>t);return t.tagName=e.tagName||"span",t.properties={...t.properties,...i,class:t.properties.class},e.properties?.class&&Cn(t,e.properties.class),t=r(t,n)||t}const l=[],a=n.decorations.sort(((t,e)=>e.start.offset-t.start.offset));for(const t of a){const{start:e,end:n}=t;if(e.line===n.line)r(e.line,e.character,n.character,t);else if(e.line<n.line){r(e.line,e.character,Number.POSITIVE_INFINITY,t);for(let i=e.line+1;i<n.line;i++)l.unshift((()=>s(i,t)));r(n.line,0,n.character,t)}}l.forEach((t=>t()))}}}function Bn(t){return"text"===t.type?t.value:"element"===t.type?t.children.map(Bn).join(""):""}const In=[$n()];function Gn(t){return[...t.transformers||[],...In]}var qn=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],zn={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function Fn(t,e){const n=t.indexOf("[",e);if(-1!==n){const e=t.indexOf("m",n);return{sequence:t.substring(n+2,e).split(";"),startPosition:n,position:e+1}}return{position:t.length}}function Hn(t,e){let n=1;const i=t[e+n++];let r;if("2"===i){const i=[t[e+n++],t[e+n++],t[e+n]].map((t=>Number.parseInt(t)));3!==i.length||i.some((t=>Number.isNaN(t)))||(r={type:"rgb",rgb:i})}else if("5"===i){const i=Number.parseInt(t[e+n]);Number.isNaN(i)||(r={type:"table",index:Number(i)})}return[n,r]}function Un(t){const e=[];for(let n=0;n<t.length;n++){const i=t[n],r=Number.parseInt(i);if(!Number.isNaN(r))if(0===r)e.push({type:"resetAll"});else if(r<=9){zn[r]&&e.push({type:"setDecoration",value:zn[r]})}else if(r<=29){const t=zn[r-20];t&&e.push({type:"resetDecoration",value:t})}else if(r<=37)e.push({type:"setForegroundColor",value:{type:"named",name:qn[r-30]}});else if(38===r){const[i,r]=Hn(t,n);r&&e.push({type:"setForegroundColor",value:r}),n+=i}else if(39===r)e.push({type:"resetForegroundColor"});else if(r<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:qn[r-40]}});else if(48===r){const[i,r]=Hn(t,n);r&&e.push({type:"setBackgroundColor",value:r}),n+=i}else 49===r?e.push({type:"resetBackgroundColor"}):r>=90&&r<=97?e.push({type:"setForegroundColor",value:{type:"named",name:qn[r-90+8]}}):r>=100&&r<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:qn[r-100+8]}})}return e}var Wn={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function Vn(t=Wn){function e(e){return t[e]}function n(t){return`#${t.map((t=>Math.max(0,Math.min(t,255)).toString(16).padStart(2,"0"))).join("")}`}let i;function r(t){return function(){if(i)return i;i=[];for(let t=0;t<qn.length;t++)i.push(e(qn[t]));let t=[0,95,135,175,215,255];for(let e=0;e<6;e++)for(let r=0;r<6;r++)for(let s=0;s<6;s++)i.push(n([t[e],t[r],t[s]]));let r=8;for(let t=0;t<24;t++,r+=10)i.push(n([r,r,r]));return i}()[t]}return{value:function(t){switch(t.type){case"named":return e(t.name);case"rgb":return n(t.rgb);case"table":return r(t.index)}}}}function Jn(t,e,n){const i=Ln(t,n),r=kn(e),s=Vn(Object.fromEntries(qn.map((e=>[e,t.colors?.[`terminal.ansi${e[0].toUpperCase()}${e.substring(1)}`]])))),o=function(){let t=null,e=null,n=new Set;return{parse(i){const r=[];let s=0;do{const o=Fn(i,s),l=o.sequence?i.substring(s,o.startPosition):i.substring(s);if(l.length>0&&r.push({value:l,foreground:t,background:e,decorations:new Set(n)}),o.sequence){const i=Un(o.sequence);for(const r of i)"resetAll"===r.type?(t=null,e=null,n.clear()):"resetForegroundColor"===r.type?t=null:"resetBackgroundColor"===r.type?e=null:"resetDecoration"===r.type&&n.delete(r.value);for(const r of i)"setForegroundColor"===r.type?t=r.value:"setBackgroundColor"===r.type?e=r.value:"setDecoration"===r.type&&n.add(r.value)}s=o.position}while(s<i.length);return r}}}();return r.map((e=>o.parse(e[0]).map((n=>{let r,o;n.decorations.has("reverse")?(r=n.background?s.value(n.background):t.bg,o=n.foreground?s.value(n.foreground):t.fg):(r=n.foreground?s.value(n.foreground):t.fg,o=n.background?s.value(n.background):void 0),r=Tn(r,i),o=Tn(o,i),n.decorations.has("dim")&&(r=function(t){const e=t.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(e){if(e[3]){const t=Math.round(Number.parseInt(e[3],16)/2).toString(16).padStart(2,"0");return`#${e[1]}${e[2]}${t}`}return e[2]?`#${e[1]}${e[2]}80`:`#${Array.from(e[1]).map((t=>`${t}${t}`)).join("")}80`}const n=t.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:t}(r));let l=z.None;return n.decorations.has("bold")&&(l|=z.Bold),n.decorations.has("italic")&&(l|=z.Italic),n.decorations.has("underline")&&(l|=z.Underline),{content:n.value,offset:e[1],color:r,bgColor:o,fontStyle:l}}))))}function Kn(t,e,n={}){const{lang:i="text",theme:r=t.getLoadedThemes()[0]}=n;if(vn(i)||Sn(r))return kn(e).map((t=>[{content:t[0],offset:t[1]}]));const{theme:s,colorMap:o}=t.setTheme(r);if("ansi"===i)return Jn(s,e,n);const l=t.getLanguage(i);if(n.grammarState){if(n.grammarState.lang!==l.name)throw new m(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(s.name))throw new m(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return function(t,e,n,i,r){const s=Xn(t,e,n,i,r),o=new _n(Xn(t,e,n,i,r).stateStack,e.name,n.name);return Dn(s.tokens,o),s.tokens}(e,l,s,o,n)}function Xn(t,e,n,i,r){const s=Ln(n,r),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:l=500}=r,a=kn(t);let u=r.grammarState?function(t,e){if(!(t instanceof _n))throw new Pn("Invalid grammar state");return t.getInternalStack(e)}(r.grammarState,n.name)??Ft:null!=r.grammarContextCode?Xn(r.grammarContextCode,e,n,i,{...r,grammarState:void 0,grammarContextCode:void 0}).stateStack:Ft,c=[];const m=[];for(let t=0,h=a.length;t<h;t++){const[h,d]=a[t];if(""===h){c=[],m.push([]);continue}if(o>0&&h.length>=o){c=[],m.push([{content:h,offset:d,color:"",fontStyle:0}]);continue}let f,g,y;r.includeExplanation&&(f=e.tokenizeLine(h,u),g=f.tokens,y=0);const b=e.tokenizeLine2(h,u,l),w=b.tokens.length/2;for(let t=0;t<w;t++){const e=b.tokens[2*t],o=t+1<w?b.tokens[2*t+2]:h.length;if(e===o)continue;const l=b.tokens[2*t+1],a=Tn(i[V.getForeground(l)],s),u=V.getFontStyle(l),m={content:h.substring(e,o),offset:d+e,color:a,fontStyle:u};if(r.includeExplanation){const t=[];if("scopeName"!==r.includeExplanation)for(const e of n.settings){let n;switch(typeof e.scope){case"string":n=e.scope.split(/,/).map((t=>t.trim()));break;case"object":n=e.scope;break;default:continue}t.push({settings:e,selectors:n.map((t=>t.split(/ /)))})}m.explanation=[];let i=0;for(;e+i<o;){const e=g[y],n=h.substring(e.startIndex,e.endIndex);i+=n.length,m.explanation.push({content:n,scopes:"scopeName"===r.includeExplanation?(p=e.scopes,p.map((t=>({scopeName:t})))):Yn(t,e.scopes)}),y+=1}}c.push(m)}m.push(c),c=[],u=b.ruleStack}var p;return{tokens:m,stateStack:u}}function Yn(t,e){const n=[];for(let i=0,r=e.length;i<r;i++){const r=e[i];n[i]={scopeName:r,themeMatches:ti(t,r,e.slice(0,i))}}return n}function Qn(t,e){return t===e||e.substring(0,t.length)===t&&"."===e[t.length]}function Zn(t,e,n){if(!Qn(t[t.length-1],e))return!1;let i=t.length-2,r=n.length-1;for(;i>=0&&r>=0;)Qn(t[i],n[r])&&(i-=1),r-=1;return-1===i}function ti(t,e,n){const i=[];for(const{selectors:r,settings:s}of t)for(const t of r)if(Zn(t,e,n)){i.push(s);break}return i}function ei(t,e,n){const i=Object.entries(n.themes).filter((t=>t[1])).map((t=>({color:t[0],theme:t[1]}))),r=i.map((i=>{const r=Kn(t,e,{...n,theme:i.theme});return{tokens:r,state:En(r),theme:"string"==typeof i.theme?i.theme:i.theme.name}})),s=function(...t){const e=t.map((()=>[])),n=t.length;for(let i=0;i<t[0].length;i++){const r=t.map((t=>t[i])),s=e.map((()=>[]));e.forEach(((t,e)=>t.push(s[e])));const o=r.map((()=>0)),l=r.map((t=>t[0]));for(;l.every((t=>t));){const t=Math.min(...l.map((t=>t.content.length)));for(let e=0;e<n;e++){const n=l[e];n.content.length===t?(s[e].push(n),o[e]+=1,l[e]=r[e][o[e]]):(s[e].push({...n,content:n.content.slice(0,t)}),l[e]={...n,content:n.content.slice(t),offset:n.offset+t})}}}return e}(...r.map((t=>t.tokens))),o=s[0].map(((t,e)=>t.map(((t,r)=>{const o={content:t.content,variants:{},offset:t.offset};return"includeExplanation"in n&&n.includeExplanation&&(o.explanation=t.explanation),s.forEach(((t,n)=>{const{content:s,explanation:l,offset:a,...u}=t[e][r];o.variants[i[n].color]=u})),o})))),l=r[0].state?new _n(Object.fromEntries(r.map((t=>[t.theme,t.state?.getInternalStack(t.theme)]))),r[0].state.lang):void 0;return l&&Dn(o,l),o}function ni(t,e,n){let i,r,s,o,l,a;if("themes"in n){const{defaultColor:u="light",cssVariablePrefix:c="--shiki-"}=n,p=Object.entries(n.themes).filter((t=>t[1])).map((t=>({color:t[0],theme:t[1]}))).sort(((t,e)=>t.color===u?-1:e.color===u?1:0));if(0===p.length)throw new m("`themes` option must not be empty");const h=ei(t,e,n);if(a=En(h),u&&!p.find((t=>t.color===u)))throw new m(`\`themes\` option must contain the defaultColor key \`${u}\``);const d=p.map((e=>t.getTheme(e.theme))),f=p.map((t=>t.color));s=h.map((t=>t.map((t=>function(t,e,n,i){const r={content:t.content,explanation:t.explanation,offset:t.offset},s=e.map((e=>Mn(t.variants[e]))),o=new Set(s.flatMap((t=>Object.keys(t)))),l={};return s.forEach(((t,r)=>{for(const s of o){const o=t[s]||"inherit";if(0===r&&i)l[s]=o;else{const t="color"===s?"":"background-color"===s?"-bg":`-${s}`,i=n+e[r]+("color"===s?"":t);l[i]=o}}})),r.htmlStyle=l,r}(t,f,c,u))))),a&&Dn(s,a);const g=p.map((t=>Ln(t.theme,n)));r=p.map(((t,e)=>(0===e&&u?"":`${c+t.color}:`)+(Tn(d[e].fg,g[e])||"inherit"))).join(";"),i=p.map(((t,e)=>(0===e&&u?"":`${c+t.color}-bg:`)+(Tn(d[e].bg,g[e])||"inherit"))).join(";"),o=`shiki-themes ${d.map((t=>t.name)).join(" ")}`,l=u?void 0:[r,i].join(";")}else{if(!("theme"in n))throw new m("Invalid options, either `theme` or `themes` must be provided");{const l=Ln(n.theme,n);s=Kn(t,e,n);const u=t.getTheme(n.theme);i=Tn(u.bg,l),r=Tn(u.fg,l),o=u.name,a=En(s)}}return{tokens:s,fg:r,bg:i,themeName:o,rootStyle:l,grammarState:a}}function ii(t,e,n,i={meta:{},options:n,codeToHast:(e,n)=>ii(t,e,n),codeToTokens:(e,n)=>ni(t,e,n)}){let r=e;for(const t of Gn(n))r=t.preprocess?.call(i,r,n)||r;let{tokens:s,fg:o,bg:l,themeName:a,rootStyle:u,grammarState:c}=ni(t,r,n);const{mergeWhitespaces:m=!0}=n;!0===m?s=function(t){return t.map((t=>{const e=[];let n="",i=0;return t.forEach(((r,s)=>{const o=!(r.fontStyle&&r.fontStyle&z.Underline);o&&r.content.match(/^\s+$/)&&t[s+1]?(i||(i=r.offset),n+=r.content):n?(o?e.push({...r,offset:i,content:n+r.content}):e.push({content:n,offset:i},r),i=0,n=""):e.push(r)})),e}))}(s):"never"===m&&(s=function(t){return t.map((t=>t.flatMap((t=>{if(t.content.match(/^\s+$/))return t;const e=t.content.match(/^(\s*)(.*?)(\s*)$/);if(!e)return t;const[,n,i,r]=e;if(!n&&!r)return t;const s=[{...t,offset:t.offset+n.length,content:i}];return n&&s.unshift({content:n,offset:t.offset}),r&&s.push({content:r,offset:t.offset+n.length+i.length}),s}))))}(s));const p={...i,get source(){return r}};for(const t of Gn(n))s=t.tokens?.call(p,s)||s;return function(t,e,n,i=En(t)){const r=Gn(e),s=[],o={type:"root",children:[]},{structure:l="classic",tabindex:a="0"}=e;let u={type:"element",tagName:"pre",properties:{class:`shiki ${e.themeName||""}`,style:e.rootStyle||`background-color:${e.bg};color:${e.fg}`,...!1!==a&&null!=a?{tabindex:a.toString()}:{},...Object.fromEntries(Array.from(Object.entries(e.meta||{})).filter((([t])=>!t.startsWith("_"))))},children:[]},c={type:"element",tagName:"code",properties:{},children:s};const m=[],p={...n,structure:l,addClassToHast:Cn,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return o},get pre(){return u},get code(){return c},get lines(){return m}};if(t.forEach(((t,e)=>{e&&("inline"===l?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===l&&s.push({type:"text",value:"\n"}));let n={type:"element",tagName:"span",properties:{class:"line"},children:[]},i=0;for(const s of t){let t={type:"element",tagName:"span",properties:{...s.htmlAttrs},children:[{type:"text",value:s.content}]};s.htmlStyle;const a=On(s.htmlStyle||Mn(s));a&&(t.properties.style=a);for(const o of r)t=o?.span?.call(p,t,e+1,i,n,s)||t;"inline"===l?o.children.push(t):"classic"===l&&n.children.push(t),i+=s.content.length}if("classic"===l){for(const t of r)n=t?.line?.call(p,n,e+1)||n;m.push(n),s.push(n)}})),"classic"===l){for(const t of r)c=t?.code?.call(p,c)||c;u.children.push(c);for(const t of r)u=t?.pre?.call(p,u)||u;o.children.push(u)}let h=o;for(const t of r)h=t?.root?.call(p,h)||h;i&&Dn(h,i);return h}(s,{...n,fg:o,bg:l,themeName:a,rootStyle:u},p,c)}function ri(t,e,n){const i={meta:{},options:n,codeToHast:(e,n)=>ii(t,e,n),codeToTokens:(e,n)=>ni(t,e,n)};let r=function(t,e){const n=e||fn,i=n.quote||'"',r='"'===i?"'":'"';if('"'!==i&&"'"!==i)throw new Error("Invalid quote `"+i+"`, expected `'` or `\"`");return{one:bn,all:wn,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||Ht,characterReferences:n.characterReferences||gn,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:"svg"===n.space?xe:Se,quote:i,alternative:r}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}(ii(t,e,n,i));for(const t of Gn(n))r=t.postprocess?.call(i,r,n)||r;return r}const si="#333333",oi="#bbbbbb",li="#fffffe",ai="#1e1e1e",ui="__shiki_resolved";function ci(t){if(t?.[ui])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:i}=e;if(!n||!i){const t=e.settings?e.settings.find((t=>!t.name&&!t.scope)):void 0;t?.settings?.foreground&&(i=t.settings.foreground),t?.settings?.background&&(n=t.settings.background),!i&&e?.colors?.["editor.foreground"]&&(i=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),i||(i="light"===e.type?si:oi),n||(n="light"===e.type?li:ai),e.fg=i,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let r=0;const s=new Map;function o(t){if(s.has(t))return s.get(t);r+=1;const n=`#${r.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${n}`]?o(t):(s.set(t,n),n)}e.settings=e.settings.map((t=>{const n=t.settings?.foreground&&!t.settings.foreground.startsWith("#"),i=t.settings?.background&&!t.settings.background.startsWith("#");if(!n&&!i)return t;const r={...t,settings:{...t.settings}};if(n){const n=o(t.settings.foreground);e.colorReplacements[n]=t.settings.foreground,r.settings.foreground=n}if(i){const n=o(t.settings.background);e.colorReplacements[n]=t.settings.background,r.settings.background=n}return r}));for(const t of Object.keys(e.colors||{}))if(("editor.foreground"===t||"editor.background"===t||t.startsWith("terminal.ansi"))&&!e.colors[t]?.startsWith("#")){const n=o(e.colors[t]);e.colorReplacements[n]=e.colors[t],e.colors[t]=n}return Object.defineProperty(e,ui,{enumerable:!1,writable:!1,value:!0}),e}async function mi(t){return Array.from(new Set((await Promise.all(t.filter((t=>!jn(t))).map((async t=>await An(t).then((t=>Array.isArray(t)?t:[t])))))).flat()))}async function pi(t){return(await Promise.all(t.map((async t=>xn(t)?null:ci(await An(t)))))).filter((t=>!!t))}class hi extends zt{constructor(t,e,n,i={}){super(t),this._resolver=t,this._themes=e,this._langs=n,this._alias=i,this._themes.map((t=>this.loadTheme(t))),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(t){return"string"==typeof t?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const e=ci(t);return e.name&&(this._resolvedThemes.set(e.name,e),this._loadedThemesCache=null),e}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let e=this._textmateThemeCache.get(t);e||(e=$.createFromRawTheme(t),this._textmateThemeCache.set(t,e)),this._syncRegistry.setTheme(e)}getGrammar(t){if(this._alias[t]){const e=new Set([t]);for(;this._alias[t];){if(t=this._alias[t],e.has(t))throw new Pn(`Circular alias \`${Array.from(e).join(" -> ")} -> ${t}\``);e.add(t)}}return this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const e=new Set([...this._langMap.values()].filter((e=>e.embeddedLangsLazy?.includes(t.name))));this._resolver.addLanguage(t);const n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const i=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(i.name=t.name,this._resolvedGrammars.set(t.name,i),t.aliases&&t.aliases.forEach((e=>{this._alias[e]=t.name})),this._loadedLanguagesCache=null,e.size)for(const t of e)this._resolvedGrammars.delete(t.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(t.scopeName),this._syncRegistry?._grammars?.delete(t.scopeName),this.loadLanguage(this._langMap.get(t.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const e of t)this.resolveEmbeddedLanguages(e);const e=Array.from(this._langGraph.entries()),n=e.filter((([t,e])=>!e));if(n.length){const t=e.filter((([t,e])=>e&&e.embeddedLangs?.some((t=>n.map((([t])=>t)).includes(t))))).filter((t=>!n.includes(t)));throw new Pn(`Missing languages ${n.map((([t])=>`\`${t}\``)).join(", ")}, required by ${t.map((([t])=>`\`${t}\``)).join(", ")}`)}for(const[t,n]of e)this._resolver.addLanguage(n);for(const[t,n]of e)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){if(this._langMap.set(t.name,t),this._langGraph.set(t.name,t),t.embeddedLangs)for(const e of t.embeddedLangs)this._langGraph.set(e,this._langMap.get(e))}}class di{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,e){this._onigLib={createOnigScanner:e=>t.createScanner(e),createOnigString:e=>t.createString(e)},e.forEach((t=>this.addLanguage(t)))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach((e=>{this._langs.set(e,t)})),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach((e=>{this._injections.get(e)||this._injections.set(e,[]),this._injections.get(e).push(t.scopeName)}))}getInjections(t){const e=t.split(".");let n=[];for(let t=1;t<=e.length;t++){const i=e.slice(0,t).join(".");n=[...n,...this._injections.get(i)||[]]}return n}}let fi=0;async function gi(t={}){t.loadWasm;const[e,n,i]=await Promise.all([pi(t.themes||[]),mi(t.langs||[]),t.engine||A(t.loadWasm||void 0)]);return function(t){fi+=1,!1!==t.warnings&&fi>=10&&fi%10==0&&console.warn(`[Shiki] ${fi} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new Pn("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),i=(t.themes||[]).flat(1).map(ci),r=new di(t.engine,n),s=new hi(r,i,n,t.langAlias);let o;function l(t){if("none"===t)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};c();const e=s.getTheme(t);if(!e)throw new Pn(`Theme \`${t}\` not found, you may need to load it first`);return e}function a(...t){c(),s.loadLanguages(t.flat(1))}function u(...t){c();for(const e of t.flat(1))s.loadTheme(e)}function c(){if(e)throw new Pn("Shiki instance has been disposed")}function m(){e||(e=!0,s.dispose(),fi-=1)}return{setTheme:function(t){c();const e=l(t);return o!==t&&(s.setTheme(e),o=t),{theme:e,colorMap:s.getColorMap()}},getTheme:l,getLanguage:function(t){c();const e=s.getGrammar("string"==typeof t?t:t.name);if(!e)throw new Pn(`Language \`${t}\` not found, you may need to load it first`);return e},getLoadedThemes:function(){return c(),s.getLoadedThemes()},getLoadedLanguages:function(){return c(),s.getLoadedLanguages()},loadLanguage:async function(...t){return a(await mi(t))},loadLanguageSync:a,loadTheme:async function(...t){return c(),u(await pi(t))},loadThemeSync:u,dispose:m,[Symbol.dispose]:m}}({...t,loadWasm:void 0,themes:e,langs:n,engine:i})}async function yi(t={}){const e=await gi(t);return{getLastGrammarState:(...t)=>function(...t){if(2===t.length)return En(t[1]);const[e,n,i={}]=t,{lang:r="text",theme:s=e.getLoadedThemes()[0]}=i;if(vn(r)||Sn(s))throw new m("Plain language does not have grammar state");if("ansi"===r)throw new m("ANSI language does not have grammar state");const{theme:o,colorMap:l}=e.setTheme(s),a=e.getLanguage(r);return new _n(Xn(n,a,o,l,i).stateStack,a.name,o.name)}(e,...t),codeToTokensBase:(t,n)=>Kn(e,t,n),codeToTokensWithThemes:(t,n)=>ei(e,t,n),codeToTokens:(t,n)=>ni(e,t,n),codeToHast:(t,n)=>ii(e,t,n),codeToHtml:(t,n)=>ri(e,t,n),...e,getInternalContext:()=>e}}function bi(t,e,n){let i,r,s;if(e)i=t,r=e,s=()=>A(n);else{const e=t;i=e.langs,r=e.themes,s=e.engine}return async function(t){function e(t){if("string"==typeof t){if(jn(t))return[];const e=i[t];if(!e)throw new m(`Language \`${t}\` is not included in this bundle. You may want to load it from external source.`);return e}return t}function n(t){if(xn(t))return"none";if("string"==typeof t){const e=r[t];if(!e)throw new m(`Theme \`${t}\` is not included in this bundle. You may want to load it from external source.`);return e}return t}const o=(t.themes??[]).map((t=>n(t))),l=(t.langs??[]).map((t=>e(t))),a=await yi({engine:t.engine??s(),...t,themes:o,langs:l});return{...a,loadLanguage:(...t)=>a.loadLanguage(...t.map(e)),loadTheme:(...t)=>a.loadTheme(...t.map(n))}}}const wi=bi({langs:a,themes:c,engine:()=>A(import("../wasm-aabb0cac.esm.js"))});let ki=class extends o{constructor(){super(...arguments),this.code="",this.language="javascript",this.theme="min-light",this.highlightedCode=""}static get styles(){return[s]}async updated(t){(t.has("language")||t.has("theme"))&&await this.updateHighlighter(),(t.has("code")||t.has("language")||t.has("theme"))&&await this.updateHighlightedCode()}render(){return e`
|
1
|
+
import{__decorate as t}from"tslib";import{x as e}from"../lit-element-a5a64515.esm.js";import{property as n,state as i,customElement as r}from"lit/decorators.js";import{s}from"./nile-highlighter.css.esm.js";import{N as o}from"../internal/nile-element.esm.js";import"lit";const l=[{id:"abap",name:"ABAP",import:()=>import("../abap-a52c4b71.esm.js")},{id:"actionscript-3",name:"ActionScript",import:()=>import("../actionscript-3-adc1bba2.esm.js")},{id:"ada",name:"Ada",import:()=>import("../ada-92aadaaa.esm.js")},{id:"angular-html",name:"Angular HTML",import:()=>import("../angular-html-e82e9f01.esm.js").then((function(t){return t.f}))},{id:"angular-ts",name:"Angular TypeScript",import:()=>import("../angular-ts-824b29c5.esm.js")},{id:"apache",name:"Apache Conf",import:()=>import("../apache-857a7028.esm.js")},{id:"apex",name:"Apex",import:()=>import("../apex-4e889f73.esm.js")},{id:"apl",name:"APL",import:()=>import("../apl-e284e4b7.esm.js")},{id:"applescript",name:"AppleScript",import:()=>import("../applescript-4cfa5810.esm.js")},{id:"ara",name:"Ara",import:()=>import("../ara-fab92058.esm.js")},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>import("../asciidoc-31fbf65d.esm.js")},{id:"asm",name:"Assembly",import:()=>import("../asm-3ea8b9b1.esm.js")},{id:"astro",name:"Astro",import:()=>import("../astro-70bbac9c.esm.js")},{id:"awk",name:"AWK",import:()=>import("../awk-471d7499.esm.js")},{id:"ballerina",name:"Ballerina",import:()=>import("../ballerina-dadf5219.esm.js")},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>import("../bat-3b0abeea.esm.js")},{id:"beancount",name:"Beancount",import:()=>import("../beancount-c807f5d0.esm.js")},{id:"berry",name:"Berry",aliases:["be"],import:()=>import("../berry-84baf561.esm.js")},{id:"bibtex",name:"BibTeX",import:()=>import("../bibtex-f0b3341f.esm.js")},{id:"bicep",name:"Bicep",import:()=>import("../bicep-611b70e3.esm.js")},{id:"blade",name:"Blade",import:()=>import("../blade-1d22f7d6.esm.js")},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>import("../bsl-19f4ad7d.esm.js")},{id:"c",name:"C",import:()=>import("../c-6b4aca18.esm.js")},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>import("../cadence-f8e85170.esm.js")},{id:"cairo",name:"Cairo",import:()=>import("../cairo-2208cdeb.esm.js")},{id:"clarity",name:"Clarity",import:()=>import("../clarity-0de6324e.esm.js")},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>import("../clojure-2c772530.esm.js")},{id:"cmake",name:"CMake",import:()=>import("../cmake-6f336b57.esm.js")},{id:"cobol",name:"COBOL",import:()=>import("../cobol-863c3d30.esm.js")},{id:"codeowners",name:"CODEOWNERS",import:()=>import("../codeowners-ce7dc7f9.esm.js")},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>import("../codeql-7a8e07a3.esm.js")},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>import("../coffee-8891a9a6.esm.js")},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>import("../common-lisp-a2e4bf8b.esm.js")},{id:"coq",name:"Coq",import:()=>import("../coq-0842d07e.esm.js")},{id:"cpp",name:"C++",aliases:["c++"],import:()=>import("../cpp-5caa08a7.esm.js")},{id:"crystal",name:"Crystal",import:()=>import("../crystal-d55c65aa.esm.js")},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>import("../csharp-05111ad0.esm.js")},{id:"css",name:"CSS",import:()=>import("../css-b82f2dc0.esm.js")},{id:"csv",name:"CSV",import:()=>import("../csv-1300859c.esm.js")},{id:"cue",name:"CUE",import:()=>import("../cue-984224b1.esm.js")},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>import("../cypher-2a549c24.esm.js")},{id:"d",name:"D",import:()=>import("../d-2e6aa0f7.esm.js")},{id:"dart",name:"Dart",import:()=>import("../dart-74aa8857.esm.js")},{id:"dax",name:"DAX",import:()=>import("../dax-8769ef81.esm.js")},{id:"desktop",name:"Desktop",import:()=>import("../desktop-f6ccfe02.esm.js")},{id:"diff",name:"Diff",import:()=>import("../diff-172f767c.esm.js")},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>import("../docker-5931bdc6.esm.js")},{id:"dotenv",name:"dotEnv",import:()=>import("../dotenv-b6a19045.esm.js")},{id:"dream-maker",name:"Dream Maker",import:()=>import("../dream-maker-ea79fdad.esm.js")},{id:"edge",name:"Edge",import:()=>import("../edge-6eae35e7.esm.js")},{id:"elixir",name:"Elixir",import:()=>import("../elixir-dae8d9ee.esm.js")},{id:"elm",name:"Elm",import:()=>import("../elm-0fb64966.esm.js")},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>import("../emacs-lisp-a7b4e1e4.esm.js")},{id:"erb",name:"ERB",import:()=>import("../erb-aea4a632.esm.js")},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>import("../erlang-c157aacb.esm.js")},{id:"fennel",name:"Fennel",import:()=>import("../fennel-ab39fe42.esm.js")},{id:"fish",name:"Fish",import:()=>import("../fish-b53e939c.esm.js")},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>import("../fluent-0c518860.esm.js")},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>import("../fortran-fixed-form-ad2e139c.esm.js")},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>import("../fortran-free-form-0afe84cd.esm.js")},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>import("../fsharp-eaa1acef.esm.js")},{id:"gdresource",name:"GDResource",import:()=>import("../gdresource-ee3a0b57.esm.js")},{id:"gdscript",name:"GDScript",import:()=>import("../gdscript-5e1b7e11.esm.js")},{id:"gdshader",name:"GDShader",import:()=>import("../gdshader-b715be05.esm.js")},{id:"genie",name:"Genie",import:()=>import("../genie-d6a62a2e.esm.js")},{id:"gherkin",name:"Gherkin",import:()=>import("../gherkin-3631f620.esm.js")},{id:"git-commit",name:"Git Commit Message",import:()=>import("../git-commit-46abbed3.esm.js")},{id:"git-rebase",name:"Git Rebase Message",import:()=>import("../git-rebase-3d539b87.esm.js")},{id:"gleam",name:"Gleam",import:()=>import("../gleam-162aeb84.esm.js")},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>import("../glimmer-js-9ebbc015.esm.js")},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>import("../glimmer-ts-f1784d70.esm.js")},{id:"glsl",name:"GLSL",import:()=>import("../glsl-8684555b.esm.js")},{id:"gnuplot",name:"Gnuplot",import:()=>import("../gnuplot-8d5f619d.esm.js")},{id:"go",name:"Go",import:()=>import("../go-fa0c6e0c.esm.js")},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>import("../graphql-1e52af59.esm.js")},{id:"groovy",name:"Groovy",import:()=>import("../groovy-97eb5874.esm.js")},{id:"hack",name:"Hack",import:()=>import("../hack-ac35d4cc.esm.js")},{id:"haml",name:"Ruby Haml",import:()=>import("../haml-164b4081.esm.js")},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>import("../handlebars-be38660d.esm.js")},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>import("../haskell-a0d0428f.esm.js")},{id:"haxe",name:"Haxe",import:()=>import("../haxe-5d697709.esm.js")},{id:"hcl",name:"HashiCorp HCL",import:()=>import("../hcl-230c758c.esm.js")},{id:"hjson",name:"Hjson",import:()=>import("../hjson-ac457752.esm.js")},{id:"hlsl",name:"HLSL",import:()=>import("../hlsl-68d51405.esm.js")},{id:"html",name:"HTML",import:()=>import("../html-ea46646c.esm.js")},{id:"html-derivative",name:"HTML (Derivative)",import:()=>import("../html-derivative-95ae6f79.esm.js")},{id:"http",name:"HTTP",import:()=>import("../http-40b27fa7.esm.js")},{id:"hxml",name:"HXML",import:()=>import("../hxml-3b89fd2d.esm.js")},{id:"hy",name:"Hy",import:()=>import("../hy-6fd2368a.esm.js")},{id:"imba",name:"Imba",import:()=>import("../imba-1f2e01a9.esm.js")},{id:"ini",name:"INI",aliases:["properties"],import:()=>import("../ini-fd9fe701.esm.js")},{id:"java",name:"Java",import:()=>import("../java-3e75e5da.esm.js")},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>import("../javascript-5e530c3b.esm.js")},{id:"jinja",name:"Jinja",import:()=>import("../jinja-5f33b154.esm.js")},{id:"jison",name:"Jison",import:()=>import("../jison-298d6c83.esm.js")},{id:"json",name:"JSON",import:()=>import("../json-a38df6b1.esm.js")},{id:"json5",name:"JSON5",import:()=>import("../json5-c15e7f45.esm.js")},{id:"jsonc",name:"JSON with Comments",import:()=>import("../jsonc-091d782e.esm.js")},{id:"jsonl",name:"JSON Lines",import:()=>import("../jsonl-af69b138.esm.js")},{id:"jsonnet",name:"Jsonnet",import:()=>import("../jsonnet-d0000932.esm.js")},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>import("../jssm-8b61a1de.esm.js")},{id:"jsx",name:"JSX",import:()=>import("../jsx-0c1baf54.esm.js")},{id:"julia",name:"Julia",aliases:["jl"],import:()=>import("../julia-405950a4.esm.js")},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>import("../kotlin-fd455d5b.esm.js")},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>import("../kusto-e862270b.esm.js")},{id:"latex",name:"LaTeX",import:()=>import("../latex-2721b8c9.esm.js")},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>import("../lean-a206dc06.esm.js")},{id:"less",name:"Less",import:()=>import("../less-48e06373.esm.js")},{id:"liquid",name:"Liquid",import:()=>import("../liquid-80f330ca.esm.js")},{id:"log",name:"Log file",import:()=>import("../log-bd6ed56c.esm.js")},{id:"logo",name:"Logo",import:()=>import("../logo-63c5bcba.esm.js")},{id:"lua",name:"Lua",import:()=>import("../lua-ec443be9.esm.js")},{id:"luau",name:"Luau",import:()=>import("../luau-a7ca0913.esm.js")},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>import("../make-722ffd00.esm.js")},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>import("../markdown-f934feeb.esm.js")},{id:"marko",name:"Marko",import:()=>import("../marko-25c2bb0f.esm.js")},{id:"matlab",name:"MATLAB",import:()=>import("../matlab-0f47d95d.esm.js")},{id:"mdc",name:"MDC",import:()=>import("../mdc-55fb23bc.esm.js")},{id:"mdx",name:"MDX",import:()=>import("../mdx-3c6b605b.esm.js")},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>import("../mermaid-a2157e2a.esm.js")},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>import("../mipsasm-718e91fe.esm.js")},{id:"mojo",name:"Mojo",import:()=>import("../mojo-0420911d.esm.js")},{id:"move",name:"Move",import:()=>import("../move-e5ed5182.esm.js")},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>import("../narrat-f31c25de.esm.js")},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>import("../nextflow-8c655003.esm.js")},{id:"nginx",name:"Nginx",import:()=>import("../nginx-2d776aa5.esm.js")},{id:"nim",name:"Nim",import:()=>import("../nim-2381a8b6.esm.js")},{id:"nix",name:"Nix",import:()=>import("../nix-cfc19319.esm.js")},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>import("../nushell-5ec7a31d.esm.js")},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>import("../objective-c-03c8ac8f.esm.js")},{id:"objective-cpp",name:"Objective-C++",import:()=>import("../objective-cpp-da94db78.esm.js")},{id:"ocaml",name:"OCaml",import:()=>import("../ocaml-13c7ad4b.esm.js")},{id:"pascal",name:"Pascal",import:()=>import("../pascal-2376554e.esm.js")},{id:"perl",name:"Perl",import:()=>import("../perl-d2bc40cf.esm.js")},{id:"php",name:"PHP",import:()=>import("../php-2e8c1036.esm.js")},{id:"plsql",name:"PL/SQL",import:()=>import("../plsql-e699c6dd.esm.js")},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>import("../po-354e37c9.esm.js")},{id:"polar",name:"Polar",import:()=>import("../polar-84bbcfa3.esm.js")},{id:"postcss",name:"PostCSS",import:()=>import("../postcss-7e84f837.esm.js")},{id:"powerquery",name:"PowerQuery",import:()=>import("../powerquery-de7b86c1.esm.js")},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>import("../powershell-a53e9e2c.esm.js")},{id:"prisma",name:"Prisma",import:()=>import("../prisma-31de5d7f.esm.js")},{id:"prolog",name:"Prolog",import:()=>import("../prolog-b0af9977.esm.js")},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>import("../proto-95a2be6e.esm.js")},{id:"pug",name:"Pug",aliases:["jade"],import:()=>import("../pug-70e27f3d.esm.js")},{id:"puppet",name:"Puppet",import:()=>import("../puppet-c03e96b0.esm.js")},{id:"purescript",name:"PureScript",import:()=>import("../purescript-faae396e.esm.js")},{id:"python",name:"Python",aliases:["py"],import:()=>import("../python-2d8cef64.esm.js")},{id:"qml",name:"QML",import:()=>import("../qml-5f211c50.esm.js")},{id:"qmldir",name:"QML Directory",import:()=>import("../qmldir-9ab6a9ea.esm.js")},{id:"qss",name:"Qt Style Sheets",import:()=>import("../qss-6a1828ff.esm.js")},{id:"r",name:"R",import:()=>import("../r-ef1e5dda.esm.js")},{id:"racket",name:"Racket",import:()=>import("../racket-93d1631f.esm.js")},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>import("../raku-74f5288e.esm.js")},{id:"razor",name:"ASP.NET Razor",import:()=>import("../razor-7ef8c917.esm.js")},{id:"reg",name:"Windows Registry Script",import:()=>import("../reg-17ae4c4d.esm.js")},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>import("../regexp-d21a11f9.esm.js")},{id:"rel",name:"Rel",import:()=>import("../rel-df432d69.esm.js")},{id:"riscv",name:"RISC-V",import:()=>import("../riscv-eb3c5e4f.esm.js")},{id:"rst",name:"reStructuredText",import:()=>import("../rst-1b688e61.esm.js")},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>import("../ruby-2272bb6d.esm.js")},{id:"rust",name:"Rust",aliases:["rs"],import:()=>import("../rust-914ecd9c.esm.js")},{id:"sas",name:"SAS",import:()=>import("../sas-1bb1c1b4.esm.js")},{id:"sass",name:"Sass",import:()=>import("../sass-c961f8e0.esm.js")},{id:"scala",name:"Scala",import:()=>import("../scala-d0d2fc32.esm.js")},{id:"scheme",name:"Scheme",import:()=>import("../scheme-8c950a12.esm.js")},{id:"scss",name:"SCSS",import:()=>import("../scss-68be6395.esm.js")},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>import("../sdbl-0d98dffb.esm.js")},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>import("../shaderlab-b0c1d53f.esm.js")},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>import("../shellscript-4cb50526.esm.js")},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>import("../shellsession-5c81b4d2.esm.js")},{id:"smalltalk",name:"Smalltalk",import:()=>import("../smalltalk-ec51be94.esm.js")},{id:"solidity",name:"Solidity",import:()=>import("../solidity-52a21bca.esm.js")},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>import("../soy-3cf0ff08.esm.js")},{id:"sparql",name:"SPARQL",import:()=>import("../sparql-cf6895f3.esm.js")},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>import("../splunk-a1e38817.esm.js")},{id:"sql",name:"SQL",import:()=>import("../sql-cf121937.esm.js")},{id:"ssh-config",name:"SSH Config",import:()=>import("../ssh-config-127352da.esm.js")},{id:"stata",name:"Stata",import:()=>import("../stata-7385dce1.esm.js")},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>import("../stylus-7ce0aec7.esm.js")},{id:"svelte",name:"Svelte",import:()=>import("../svelte-80a7d4f3.esm.js")},{id:"swift",name:"Swift",import:()=>import("../swift-f19226b8.esm.js")},{id:"system-verilog",name:"SystemVerilog",import:()=>import("../system-verilog-5dcd9523.esm.js")},{id:"systemd",name:"Systemd Units",import:()=>import("../systemd-32ad4c93.esm.js")},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>import("../talonscript-75a1ba5c.esm.js")},{id:"tasl",name:"Tasl",import:()=>import("../tasl-dfdb6de6.esm.js")},{id:"tcl",name:"Tcl",import:()=>import("../tcl-05f52fa5.esm.js")},{id:"templ",name:"Templ",import:()=>import("../templ-47f34330.esm.js")},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>import("../terraform-206cd204.esm.js")},{id:"tex",name:"TeX",import:()=>import("../tex-66732f14.esm.js")},{id:"toml",name:"TOML",import:()=>import("../toml-114aeb86.esm.js")},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>import("../ts-tags-910a48ce.esm.js")},{id:"tsv",name:"TSV",import:()=>import("../tsv-a6b321fa.esm.js")},{id:"tsx",name:"TSX",import:()=>import("../tsx-d06cbecf.esm.js")},{id:"turtle",name:"Turtle",import:()=>import("../turtle-19569c1c.esm.js")},{id:"twig",name:"Twig",import:()=>import("../twig-984c9a8d.esm.js")},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>import("../typescript-df07c6cc.esm.js")},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>import("../typespec-cadb1029.esm.js")},{id:"typst",name:"Typst",aliases:["typ"],import:()=>import("../typst-a4980388.esm.js")},{id:"v",name:"V",import:()=>import("../v-e548e622.esm.js")},{id:"vala",name:"Vala",import:()=>import("../vala-d4463de8.esm.js")},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>import("../vb-d0b2b4c1.esm.js")},{id:"verilog",name:"Verilog",import:()=>import("../verilog-8a1772b8.esm.js")},{id:"vhdl",name:"VHDL",import:()=>import("../vhdl-766a6dfb.esm.js")},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>import("../viml-7998dc58.esm.js")},{id:"vue",name:"Vue",import:()=>import("../vue-7321fa45.esm.js")},{id:"vue-html",name:"Vue HTML",import:()=>import("../vue-html-9b0ae5ef.esm.js")},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>import("../vyper-5b7f5a01.esm.js")},{id:"wasm",name:"WebAssembly",import:()=>import("../wasm-93d2320c.esm.js")},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>import("../wenyan-af3c07c1.esm.js")},{id:"wgsl",name:"WGSL",import:()=>import("../wgsl-6ba2347e.esm.js")},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>import("../wikitext-5e16d1d5.esm.js")},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>import("../wolfram-a83ceedd.esm.js")},{id:"xml",name:"XML",import:()=>import("../xml-3fc04f78.esm.js")},{id:"xsl",name:"XSL",import:()=>import("../xsl-845c4123.esm.js")},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>import("../yaml-c4073e3a.esm.js")},{id:"zenscript",name:"ZenScript",import:()=>import("../zenscript-c955d94d.esm.js")},{id:"zig",name:"Zig",import:()=>import("../zig-0a7e2bd8.esm.js")}],a={...Object.fromEntries(l.map((t=>[t.id,t.import]))),...Object.fromEntries(l.flatMap((t=>t.aliases?.map((e=>[e,t.import]))||[])))},u=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>import("../andromeeda-2e6b30b7.esm.js")},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>import("../aurora-x-0296fca2.esm.js")},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>import("../ayu-dark-fa442bb2.esm.js")},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>import("../catppuccin-frappe-dbc3161e.esm.js")},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>import("../catppuccin-latte-e7591143.esm.js")},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>import("../catppuccin-macchiato-283b424a.esm.js")},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>import("../catppuccin-mocha-165e830c.esm.js")},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>import("../dark-plus-113df9d2.esm.js")},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>import("../dracula-0cdb0910.esm.js")},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>import("../dracula-soft-6bc125ac.esm.js")},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>import("../everforest-dark-8e919373.esm.js")},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>import("../everforest-light-7b95c0f3.esm.js")},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>import("../github-dark-13bcc6db.esm.js")},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>import("../github-dark-default-c8549d91.esm.js")},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>import("../github-dark-dimmed-2d99017f.esm.js")},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>import("../github-dark-high-contrast-eb093cb4.esm.js")},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>import("../github-light-b19ecfdf.esm.js")},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>import("../github-light-default-97194ef6.esm.js")},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>import("../github-light-high-contrast-0ddc875a.esm.js")},{id:"houston",displayName:"Houston",type:"dark",import:()=>import("../houston-550ba16e.esm.js")},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>import("../kanagawa-dragon-9520d418.esm.js")},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>import("../kanagawa-lotus-0bac7d76.esm.js")},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>import("../kanagawa-wave-0dc8b839.esm.js")},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>import("../laserwave-bc83c1e2.esm.js")},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>import("../light-plus-980eb5f5.esm.js")},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>import("../material-theme-c02759d0.esm.js")},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>import("../material-theme-darker-e85c15fb.esm.js")},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>import("../material-theme-lighter-24d1699f.esm.js")},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>import("../material-theme-ocean-026f14fa.esm.js")},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>import("../material-theme-palenight-ea3a71a0.esm.js")},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>import("../min-dark-0a9bb11e.esm.js")},{id:"min-light",displayName:"Min Light",type:"light",import:()=>import("../min-light-39b26431.esm.js")},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>import("../monokai-cd7377cd.esm.js")},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>import("../night-owl-8da1f52a.esm.js")},{id:"nord",displayName:"Nord",type:"dark",import:()=>import("../nord-9752f990.esm.js")},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>import("../one-dark-pro-4fce25f8.esm.js")},{id:"one-light",displayName:"One Light",type:"light",import:()=>import("../one-light-cf9703c5.esm.js")},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>import("../plastic-50cdd7d8.esm.js")},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>import("../poimandres-f9d8c725.esm.js")},{id:"red",displayName:"Red",type:"dark",import:()=>import("../red-085ae454.esm.js")},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>import("../rose-pine-affa5008.esm.js")},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>import("../rose-pine-dawn-e8ec1676.esm.js")},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>import("../rose-pine-moon-938ca56d.esm.js")},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>import("../slack-dark-55dbd76e.esm.js")},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>import("../slack-ochin-e1ceac31.esm.js")},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>import("../snazzy-light-f653fb68.esm.js")},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>import("../solarized-dark-3ff28084.esm.js")},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>import("../solarized-light-8267c5c8.esm.js")},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>import("../synthwave-84-f32727db.esm.js")},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>import("../tokyo-night-46a31a2d.esm.js")},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>import("../vesper-3a90d84c.esm.js")},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>import("../vitesse-black-efbfcbd8.esm.js")},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>import("../vitesse-dark-2d62fbf6.esm.js")},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>import("../vitesse-light-c63bbf46.esm.js")}],c=Object.fromEntries(u.map((t=>[t.id,t.import])));let m=class extends Error{constructor(t){super(t),this.name="ShikiError"}},p=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function h(){return"undefined"!=typeof performance?performance.now():Date.now()}const d=(t,e)=>t+(e-t%e)%e;async function f(t){let e,n;const i={};function r(t){n=t,i.HEAPU8=new Uint8Array(t),i.HEAPU32=new Uint32Array(t)}function s(t){try{return e.grow(t-n.byteLength+65535>>>16),r(e.buffer),1}catch{}}const o="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function l(t,e){return t?function(t,e,n=1024){const i=e+n;let r=e;for(;t[r]&&!(r>=i);)++r;if(r-e>16&&t.buffer&&o)return o.decode(t.subarray(e,r));let s="";for(;e<r;){let n=t[e++];if(!(128&n)){s+=String.fromCharCode(n);continue}const i=63&t[e++];if(192==(224&n)){s+=String.fromCharCode((31&n)<<6|i);continue}const r=63&t[e++];if(n=224==(240&n)?(15&n)<<12|i<<6|r:(7&n)<<18|i<<12|r<<6|63&t[e++],n<65536)s+=String.fromCharCode(n);else{const t=n-65536;s+=String.fromCharCode(55296|t>>10,56320|1023&t)}}return s}(i.HEAPU8,t,e):""}const a={emscripten_get_now:h,emscripten_memcpy_big:function(t,e,n){i.HEAPU8.copyWithin(t,e,e+n)},emscripten_resize_heap:function(t){const e=i.HEAPU8.length,n=2147483648;if((t>>>=0)>n)return!1;for(let i=1;i<=4;i*=2){let r=e*(1+.2/i);r=Math.min(r,t+100663296);if(s(Math.min(n,d(Math.max(t,r),65536))))return!0}return!1},fd_write:()=>0};return await async function(){const n={env:a,wasi_snapshot_preview1:a},s=await t(n);e=s.memory,r(e.buffer),Object.assign(i,s),i.UTF8ToString=l}(),i}var g=Object.defineProperty,y=(t,e,n)=>(((t,e,n)=>{e in t?g(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(t,"symbol"!=typeof e?e+"":e,n),n);let b=null;class w{constructor(t){y(this,"utf16Length"),y(this,"utf8Length"),y(this,"utf16Value"),y(this,"utf8Value"),y(this,"utf16OffsetToUtf8"),y(this,"utf8OffsetToUtf16");const e=t.length,n=w._utf8ByteLength(t),i=n!==e,r=i?new Uint32Array(e+1):null;i&&(r[e]=n);const s=i?new Uint32Array(n+1):null;i&&(s[n]=e);const o=new Uint8Array(n);let l=0;for(let n=0;n<e;n++){const a=t.charCodeAt(n);let u=a,c=!1;if(a>=55296&&a<=56319&&n+1<e){const e=t.charCodeAt(n+1);e>=56320&&e<=57343&&(u=65536+(a-55296<<10)|e-56320,c=!0)}i&&(r[n]=l,c&&(r[n+1]=l),u<=127?s[l+0]=n:u<=2047?(s[l+0]=n,s[l+1]=n):u<=65535?(s[l+0]=n,s[l+1]=n,s[l+2]=n):(s[l+0]=n,s[l+1]=n,s[l+2]=n,s[l+3]=n)),u<=127?o[l++]=u:u<=2047?(o[l++]=192|(1984&u)>>>6,o[l++]=128|(63&u)>>>0):u<=65535?(o[l++]=224|(61440&u)>>>12,o[l++]=128|(4032&u)>>>6,o[l++]=128|(63&u)>>>0):(o[l++]=240|(1835008&u)>>>18,o[l++]=128|(258048&u)>>>12,o[l++]=128|(4032&u)>>>6,o[l++]=128|(63&u)>>>0),c&&n++}this.utf16Length=e,this.utf8Length=n,this.utf16Value=t,this.utf8Value=o,this.utf16OffsetToUtf8=r,this.utf8OffsetToUtf16=s}static _utf8ByteLength(t){let e=0;for(let n=0,i=t.length;n<i;n++){const r=t.charCodeAt(n);let s=r,o=!1;if(r>=55296&&r<=56319&&n+1<i){const e=t.charCodeAt(n+1);e>=56320&&e<=57343&&(s=65536+(r-55296<<10)|e-56320,o=!0)}e+=s<=127?1:s<=2047?2:s<=65535?3:4,o&&n++}return e}createString(t){const e=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,e),e}}const k=class{constructor(t){if(y(this,"id",++k.LAST_ID),y(this,"_onigBinding"),y(this,"content"),y(this,"utf16Length"),y(this,"utf8Length"),y(this,"utf16OffsetToUtf8"),y(this,"utf8OffsetToUtf16"),y(this,"ptr"),!b)throw new p("Must invoke loadWasm first.");this._onigBinding=b,this.content=t;const e=new w(t);this.utf16Length=e.utf16Length,this.utf8Length=e.utf8Length,this.utf16OffsetToUtf8=e.utf16OffsetToUtf8,this.utf8OffsetToUtf16=e.utf8OffsetToUtf16,this.utf8Length<1e4&&!k._sharedPtrInUse?(k._sharedPtr||(k._sharedPtr=b.omalloc(1e4)),k._sharedPtrInUse=!0,b.HEAPU8.set(e.utf8Value,k._sharedPtr),this.ptr=k._sharedPtr):this.ptr=e.createString(b)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===k._sharedPtr?k._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};let v,j=k;y(j,"LAST_ID",0),y(j,"_sharedPtr",0),y(j,"_sharedPtrInUse",!1);class S{constructor(t){if(y(this,"_onigBinding"),y(this,"_ptr"),!b)throw new p("Must invoke loadWasm first.");const e=[],n=[];for(let i=0,r=t.length;i<r;i++){const r=new w(t[i]);e[i]=r.createString(b),n[i]=r.utf8Length}const i=b.omalloc(4*t.length);b.HEAPU32.set(e,i/4);const r=b.omalloc(4*t.length);b.HEAPU32.set(n,r/4);const s=b.createOnigScanner(i,r,t.length);for(let n=0,i=t.length;n<i;n++)b.ofree(e[n]);b.ofree(r),b.ofree(i),0===s&&function(t){throw new p(t.UTF8ToString(t.getLastOnigError()))}(b),this._onigBinding=b,this._ptr=s}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,e,n){let i=0;if("number"==typeof n&&(i=n),"string"==typeof t){t=new j(t);const n=this._findNextMatchSync(t,e,!1,i);return t.dispose(),n}return this._findNextMatchSync(t,e,!1,i)}_findNextMatchSync(t,e,n,i){const r=this._onigBinding,s=r.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(e),i);if(0===s)return null;const o=r.HEAPU32;let l=s/4;const a=o[l++],u=o[l++],c=[];for(let e=0;e<u;e++){const n=t.convertUtf8OffsetToUtf16(o[l++]),i=t.convertUtf8OffsetToUtf16(o[l++]);c[e]={start:n,end:i,length:i-n}}return{index:a,captureIndices:c}}}function x(t){if(v)return v;return v=async function(){b=await f((async e=>{let n=t;var i;return n=await n,"function"==typeof n&&(n=await n(e)),"function"==typeof n&&(n=await n(e)),"function"==typeof n.instantiator?n=await n.instantiator(e):!function(t){return"function"==typeof t.default}(n)?(function(t){return void 0!==t.data}(n)&&(n=n.data),!function(t){return"undefined"!=typeof Response&&t instanceof Response}(n)?!function(t){return"undefined"!=typeof ArrayBuffer&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||"undefined"!=typeof Buffer&&Buffer.isBuffer?.(t)||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer||"undefined"!=typeof Uint32Array&&t instanceof Uint32Array}(n)?n instanceof WebAssembly.Module?n=await C(n)(e):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await C(n.default)(e)):n=await C(n)(e):n="function"==typeof WebAssembly.instantiateStreaming?await(i=n,t=>WebAssembly.instantiateStreaming(i,t))(e):await function(t){return async e=>{const n=await t.arrayBuffer();return WebAssembly.instantiate(n,e)}}(n)(e)):n=await n.default(e),"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n}))}(),v}function C(t){return e=>WebAssembly.instantiate(t,e)}async function A(t){return t&&await x(t),{createScanner:t=>new S(t.map((t=>"string"==typeof t?t:t.source))),createString:t=>new j(t)}}function L(t){return Array.isArray(t)?function(t){let e=[];for(let n=0,i=t.length;n<i;n++)e[n]=L(t[n]);return e}(t):t instanceof RegExp?t:"object"==typeof t?function(t){let e={};for(let n in t)e[n]=L(t[n]);return e}(t):t}function T(t,...e){return e.forEach((e=>{for(let n in e)t[n]=e[n]})),t}function M(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===e?t:~e==t.length-1?M(t.substring(0,t.length-1)):t.substr(1+~e)}var O=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,P=class{static hasCaptures(t){return null!==t&&(O.lastIndex=0,O.test(t))}static replaceCaptures(t,e,n){return t.replace(O,((t,i,r,s)=>{let o=n[parseInt(i||r,10)];if(!o)return t;{let t=e.substring(o.start,o.end);for(;"."===t[0];)t=t.substring(1);switch(s){case"downcase":return t.toLowerCase();case"upcase":return t.toUpperCase();default:return t}}}))}};function N(t,e){return t<e?-1:t>e?1:0}function D(t,e){if(null===t&&null===e)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,i=e.length;if(n===i){for(let i=0;i<n;i++){let n=N(t[i],e[i]);if(0!==n)return n}return 0}return n-i}function E(t){return!!/^#[0-9a-f]{6}$/i.test(t)||(!!/^#[0-9a-f]{8}$/i.test(t)||(!!/^#[0-9a-f]{3}$/i.test(t)||!!/^#[0-9a-f]{4}$/i.test(t)))}function _(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var R=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},$=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(function(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],i=0;for(let t=0,r=e.length;t<r;t++){let r,s=e[t];if(!s.settings)continue;if("string"==typeof s.scope){let t=s.scope;t=t.replace(/^[,]+/,""),t=t.replace(/[,]+$/,""),r=t.split(",")}else r=Array.isArray(s.scope)?s.scope:[""];let o=-1;if("string"==typeof s.settings.fontStyle){o=0;let t=s.settings.fontStyle.split(" ");for(let e=0,n=t.length;e<n;e++){switch(t[e]){case"italic":o|=1;break;case"bold":o|=2;break;case"underline":o|=4;break;case"strikethrough":o|=8}}}let l=null;"string"==typeof s.settings.foreground&&E(s.settings.foreground)&&(l=s.settings.foreground);let a=null;"string"==typeof s.settings.background&&E(s.settings.background)&&(a=s.settings.background);for(let e=0,s=r.length;e<s;e++){let s=r[e].trim().split(" "),u=s[s.length-1],c=null;s.length>1&&(c=s.slice(0,s.length-1),c.reverse()),n[i++]=new q(u,c,t,o,l,a)}}return n}(t),e)}static createFromParsedTheme(t,e){return function(t,e){t.sort(((t,e)=>{let n=N(t.scope,e.scope);return 0!==n?n:(n=D(t.parentScopes,e.parentScopes),0!==n?n:t.index-e.index)}));let n=0,i="#000000",r="#ffffff";for(;t.length>=1&&""===t[0].scope;){let e=t.shift();-1!==e.fontStyle&&(n=e.fontStyle),null!==e.foreground&&(i=e.foreground),null!==e.background&&(r=e.background)}let s=new F(e),o=new G(n,s.getId(i),s.getId(r)),l=new W(new U(0,null,-1,0,0),[]);for(let e=0,n=t.length;e<n;e++){let n=t[e];l.insert(0,n.scope,n.parentScopes,n.fontStyle,s.getId(n.foreground),s.getId(n.background))}return new $(s,o,l)}(t,e)}_cachedMatchRoot=new R((t=>this._root.match(t)));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(null===t)return this._defaults;const e=t.scopeName,n=this._cachedMatchRoot.get(e).find((e=>function(t,e){if(0===e.length)return!0;for(let n=0;n<e.length;n++){let i=e[n],r=!1;if(">"===i){if(n===e.length-1)return!1;i=e[++n],r=!0}for(;t&&!I(t.scopeName,i);){if(r)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}(t.parent,e.parentScopes)));return n?new G(n.fontStyle,n.foreground,n.background):null}},B=class t{constructor(t,e){this.parent=t,this.scopeName=e}static push(e,n){for(const i of n)e=new t(e,i);return e}static from(...e){let n=null;for(let i=0;i<e.length;i++)n=new t(n,e[i]);return n}push(e){return new t(this,e)}getSegments(){let t=this;const e=[];for(;t;)e.push(t.scopeName),t=t.parent;return e.reverse(),e}toString(){return this.getSegments().join(" ")}extends(t){return this===t||null!==this.parent&&this.parent.extends(t)}getExtensionIfDefined(t){const e=[];let n=this;for(;n&&n!==t;)e.push(n.scopeName),n=n.parent;return n===t?e.reverse():void 0}};function I(t,e){return e===t||t.startsWith(e)&&"."===t[e.length]}var G=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};var q=class{constructor(t,e,n,i,r,s){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=i,this.foreground=r,this.background=s}},z=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(z||{});var F=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(null===t)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},H=Object.freeze([]),U=class t{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,e,n,i,r){this.scopeDepth=t,this.parentScopes=e||H,this.fontStyle=n,this.foreground=i,this.background=r}clone(){return new t(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let e=[];for(let n=0,i=t.length;n<i;n++)e[n]=t[n].clone();return e}acceptOverwrite(t,e,n,i){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,-1!==e&&(this.fontStyle=e),0!==n&&(this.foreground=n),0!==i&&(this.background=i)}},W=class t{constructor(t,e=[],n={}){this._mainRule=t,this._children=n,this._rulesWithParentScopes=e}_rulesWithParentScopes;static _cmpBySpecificity(t,e){if(t.scopeDepth!==e.scopeDepth)return e.scopeDepth-t.scopeDepth;let n=0,i=0;for(;">"===t.parentScopes[n]&&n++,">"===e.parentScopes[i]&&i++,!(n>=t.parentScopes.length||i>=e.parentScopes.length);){const r=e.parentScopes[i].length-t.parentScopes[n].length;if(0!==r)return r;n++,i++}return e.parentScopes.length-t.parentScopes.length}match(e){if(""!==e){let t,n,i=e.indexOf(".");if(-1===i?(t=e,n=""):(t=e.substring(0,i),n=e.substring(i+1)),this._children.hasOwnProperty(t))return this._children[t].match(n)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(t._cmpBySpecificity),n}insert(e,n,i,r,s,o){if(""===n)return void this._doInsertHere(e,i,r,s,o);let l,a,u,c=n.indexOf(".");-1===c?(l=n,a=""):(l=n.substring(0,c),a=n.substring(c+1)),this._children.hasOwnProperty(l)?u=this._children[l]:(u=new t(this._mainRule.clone(),U.cloneArr(this._rulesWithParentScopes)),this._children[l]=u),u.insert(e+1,a,i,r,s,o)}_doInsertHere(t,e,n,i,r){if(null!==e){for(let s=0,o=this._rulesWithParentScopes.length;s<o;s++){let o=this._rulesWithParentScopes[s];if(0===D(o.parentScopes,e))return void o.acceptOverwrite(t,n,i,r)}-1===n&&(n=this._mainRule.fontStyle),0===i&&(i=this._mainRule.foreground),0===r&&(r=this._mainRule.background),this._rulesWithParentScopes.push(new U(t,e,n,i,r))}else this._mainRule.acceptOverwrite(t,n,i,r)}},V=class t{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(e){const n=t.getLanguageId(e),i=t.getTokenType(e),r=t.getFontStyle(e),s=t.getForeground(e),o=t.getBackground(e);console.log({languageId:n,tokenType:i,fontStyle:r,foreground:s,background:o})}static getLanguageId(t){return(255&t)>>>0}static getTokenType(t){return(768&t)>>>8}static containsBalancedBrackets(t){return!!(1024&t)}static getFontStyle(t){return(30720&t)>>>11}static getForeground(t){return(16744448&t)>>>15}static getBackground(t){return(4278190080&t)>>>24}static set(e,n,i,r,s,o,l){let a=t.getLanguageId(e),u=t.getTokenType(e),c=t.containsBalancedBrackets(e)?1:0,m=t.getFontStyle(e),p=t.getForeground(e),h=t.getBackground(e);return 0!==n&&(a=n),8!==i&&(u=i),null!==r&&(c=r?1:0),-1!==s&&(m=s),0!==o&&(p=o),0!==l&&(h=l),(a|u<<8|c<<10|m<<11|p<<15|h<<24)>>>0}};function J(t,e){const n=[],i=function(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const i=n[0];return n=e.exec(t),i}}}(t);let r=i.next();for(;null!==r;){let t=0;if(2===r.length&&":"===r.charAt(1)){switch(r.charAt(0)){case"R":t=1;break;case"L":t=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=i.next()}let e=o();if(n.push({matcher:e,priority:t}),","!==r)break;r=i.next()}return n;function s(){if("-"===r){r=i.next();const t=s();return e=>!!t&&!t(e)}if("("===r){r=i.next();const t=function(){const t=[];let e=o();for(;e&&(t.push(e),"|"===r||","===r);){do{r=i.next()}while("|"===r||","===r);e=o()}return e=>t.some((t=>t(e)))}();return")"===r&&(r=i.next()),t}if(K(r)){const t=[];do{t.push(r),r=i.next()}while(K(r));return n=>e(t,n)}return null}function o(){const t=[];let e=s();for(;e;)t.push(e),e=s();return e=>t.every((t=>t(e)))}}function K(t){return!!t&&!!t.match(/[\w\.:]+/)}function X(t){"function"==typeof t.dispose&&t.dispose()}var Y=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},Q=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Z=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},tt=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Y(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new Z;for(const n of t)et(n,this.initialScopeName,this.repo,e);for(const t of e.references)if(t instanceof Y){if(this.seenFullScopeRequests.has(t.scopeName))continue;this.seenFullScopeRequests.add(t.scopeName),this.Q.push(t)}else{if(this.seenFullScopeRequests.has(t.scopeName))continue;if(this.seenPartialScopeRequests.has(t.toKey()))continue;this.seenPartialScopeRequests.add(t.toKey()),this.Q.push(t)}}};function et(t,e,n,i){const r=n.lookup(t.scopeName);if(!r){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const s=n.lookup(e);t instanceof Y?it({baseGrammar:s,selfGrammar:r},i):nt(t.ruleName,{baseGrammar:s,selfGrammar:r,repository:r.repository},i);const o=n.injections(t.scopeName);if(o)for(const t of o)i.add(new Y(t))}function nt(t,e,n){if(e.repository&&e.repository[t]){rt([e.repository[t]],e,n)}}function it(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&rt(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&rt(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function rt(t,e,n){for(const i of t){if(n.visitedRule.has(i))continue;n.visitedRule.add(i);const t=i.repository?T({},e.repository,i.repository):e.repository;Array.isArray(i.patterns)&&rt(i.patterns,{...e,repository:t},n);const r=i.include;if(!r)continue;const s=ct(r);switch(s.kind){case 0:it({...e,selfGrammar:e.baseGrammar},n);break;case 1:it(e,n);break;case 2:nt(s.ruleName,{...e,repository:t},n);break;case 3:case 4:const i=s.scopeName===e.selfGrammar.scopeName?e.selfGrammar:s.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(i){const r={baseGrammar:e.baseGrammar,selfGrammar:i,repository:t};4===s.kind?nt(s.ruleName,r,n):it(r,n)}else 4===s.kind?n.add(new Q(s.scopeName,s.ruleName)):n.add(new Y(s.scopeName))}}}var st=class{kind=0},ot=class{kind=1},lt=class{constructor(t){this.ruleName=t}kind=2},at=class{constructor(t){this.scopeName=t}kind=3},ut=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function ct(t){if("$base"===t)return new st;if("$self"===t)return new ot;const e=t.indexOf("#");if(-1===e)return new at(t);if(0===e)return new lt(t.substring(1));{const n=t.substring(0,e),i=t.substring(e+1);return new ut(n,i)}}var mt=/\\(\d+)/,pt=/\\(\d+)/g;var ht=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,i){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=P.hasCaptures(this._name),this._contentName=i||null,this._contentNameIsCapturing=P.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${M(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return this._nameIsCapturing&&null!==this._name&&null!==t&&null!==e?P.replaceCaptures(this._name,t,e):this._name}getContentName(t,e){return this._contentNameIsCapturing&&null!==this._contentName?P.replaceCaptures(this._contentName,t,e):this._contentName}},dt=class extends ht{retokenizeCapturedWithRuleId;constructor(t,e,n,i,r){super(t,e,n,i),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,i){throw new Error("Not supported!")}},ft=class extends ht{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,i,r){super(t,e,n,null),this._match=new kt(i,this.id),this.captures=r,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,i){return this._getCachedCompiledPatterns(t).compileAG(t,n,i)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new vt,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},gt=class extends ht{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,i,r){super(t,e,n,i),this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const n of this.patterns){t.getRule(n).collectPatterns(t,e)}}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,i){return this._getCachedCompiledPatterns(t).compileAG(t,n,i)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new vt,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},yt=class extends ht{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,i,r,s,o,l,a,u){super(t,e,n,i),this._begin=new kt(r,this.id),this.beginCaptures=s,this._end=new kt(o||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=a||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,i){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,i)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new vt;for(const e of this.patterns){t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},bt=class extends ht{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,i,r,s,o,l,a){super(t,e,n,i),this._begin=new kt(r,this.id),this.beginCaptures=s,this.whileCaptures=l,this._while=new kt(o,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,i){return this._getCachedCompiledPatterns(t).compileAG(t,n,i)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new vt;for(const e of this.patterns){t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,i){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,i)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new vt,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||""),this._cachedCompiledWhilePatterns}},wt=class t{static createCaptureRule(t,e,n,i,r){return t.registerRule((t=>new dt(e,t,n,i,r)))}static getCompiledRuleId(e,n,i){return e.id||n.registerRule((r=>{if(e.id=r,e.match)return new ft(e.$vscodeTextmateLocation,e.id,e.name,e.match,t._compileCaptures(e.captures,n,i));if(void 0===e.begin){e.repository&&(i=T({},i,e.repository));let r=e.patterns;return void 0===r&&e.include&&(r=[{include:e.include}]),new gt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,t._compilePatterns(r,n,i))}return e.while?new bt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,i),e.while,t._compileCaptures(e.whileCaptures||e.captures,n,i),t._compilePatterns(e.patterns,n,i)):new yt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,i),e.end,t._compileCaptures(e.endCaptures||e.captures,n,i),e.applyEndPatternLast,t._compilePatterns(e.patterns,n,i))})),e.id}static _compileCaptures(e,n,i){let r=[];if(e){let s=0;for(const t in e){if("$vscodeTextmateLocation"===t)continue;const e=parseInt(t,10);e>s&&(s=e)}for(let t=0;t<=s;t++)r[t]=null;for(const s in e){if("$vscodeTextmateLocation"===s)continue;const o=parseInt(s,10);let l=0;e[s].patterns&&(l=t.getCompiledRuleId(e[s],n,i)),r[o]=t.createCaptureRule(n,e[s].$vscodeTextmateLocation,e[s].name,e[s].contentName,l)}}return r}static _compilePatterns(e,n,i){let r=[];if(e)for(let s=0,o=e.length;s<o;s++){const o=e[s];let l=-1;if(o.include){const e=ct(o.include);switch(e.kind){case 0:case 1:l=t.getCompiledRuleId(i[o.include],n,i);break;case 2:let r=i[e.ruleName];r&&(l=t.getCompiledRuleId(r,n,i));break;case 3:case 4:const s=e.scopeName,a=4===e.kind?e.ruleName:null,u=n.getExternalGrammar(s,i);if(u)if(a){let e=u.repository[a];e&&(l=t.getCompiledRuleId(e,n,u.repository))}else l=t.getCompiledRuleId(u.repository.$self,n,u.repository)}}else l=t.getCompiledRuleId(o,n,i);if(-1!==l){const t=n.getRule(l);let e=!1;if((t instanceof gt||t instanceof yt||t instanceof bt)&&t.hasMissingPatterns&&0===t.patterns.length&&(e=!0),e)continue;r.push(l)}}return{patterns:r,hasMissingPatterns:(e?e.length:0)!==r.length}}},kt=class t{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,e){if(t&&"string"==typeof t){const e=t.length;let n=0,i=[],r=!1;for(let s=0;s<e;s++){if("\\"===t.charAt(s)&&s+1<e){const e=t.charAt(s+1);"z"===e?(i.push(t.substring(n,s)),i.push("$(?!\\n)(?<!\\n)"),n=s+2):"A"!==e&&"G"!==e||(r=!0),s++}}this.hasAnchor=r,0===n?this.source=t:(i.push(t.substring(n,e)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=e,"string"==typeof this.source?this.hasBackReferences=mt.test(this.source):this.hasBackReferences=!1}clone(){return new t(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,e){if("string"!=typeof this.source)throw new Error("This method should only be called if the source is a string");let n=e.map((e=>t.substring(e.start,e.end)));return pt.lastIndex=0,this.source.replace(pt,((t,e)=>_(n[parseInt(e,10)]||"")))}_buildAnchorCache(){if("string"!=typeof this.source)throw new Error("This method should only be called if the source is a string");let t,e,n,i,r=[],s=[],o=[],l=[];for(t=0,e=this.source.length;t<e;t++)n=this.source.charAt(t),r[t]=n,s[t]=n,o[t]=n,l[t]=n,"\\"===n&&t+1<e&&(i=this.source.charAt(t+1),"A"===i?(r[t+1]="",s[t+1]="",o[t+1]="A",l[t+1]="A"):"G"===i?(r[t+1]="",s[t+1]="G",o[t+1]="",l[t+1]="G"):(r[t+1]=i,s[t+1]=i,o[t+1]=i,l[t+1]=i),t++);return{A0_G0:r.join(""),A0_G1:s.join(""),A1_G0:o.join(""),A1_G1:l.join("")}}resolveAnchors(t,e){return this.hasAnchor&&this._anchorCache&&"string"==typeof this.source?t?e?this._anchorCache.A1_G1:this._anchorCache.A1_G0:e?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}},vt=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map((t=>t.source));this._cached=new jt(t,e,this._items.map((t=>t.ruleId)))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let i=this._items.map((t=>t.resolveAnchors(e,n)));return new jt(t,i,this._items.map((t=>t.ruleId)))}},jt=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join("\n")}findNextMatchSync(t,e,n){const i=this.scanner.findNextMatchSync(t,e,n);return i?{ruleId:this.rules[i.index],captureIndices:i.captureIndices}:null}},St=class{constructor(t,e){this.languageId=t,this.tokenType=e}},xt=class t{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,e){this._defaultAttributes=new St(t,8),this._embeddedLanguagesMatcher=new Ct(Object.entries(e||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return null===e?t._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new St(0,0);_getBasicScopeAttributes=new R((t=>{const e=this._scopeToLanguage(t),n=this._toStandardTokenType(t);return new St(e,n)}));_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(e){const n=e.match(t.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Ct=class{values;scopesRegExp;constructor(t){if(0===t.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map((([t,e])=>_(t)));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);return e?this.values.get(e[1]):void 0}};"undefined"!=typeof process&&process.env.VSCODE_TEXTMATE_DEBUG;var At=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function Lt(t,e,n,i,r,s,o,l){const a=e.content.length;let u=!1,c=-1;if(o){const o=function(t,e,n,i,r,s){let o=r.beginRuleCapturedEOL?0:-1;const l=[];for(let e=r;e;e=e.pop()){const n=e.getRule(t);n instanceof bt&&l.push({rule:n,stack:e})}for(let a=l.pop();a;a=l.pop()){const{ruleScanner:l,findOptions:u}=Mt(a.rule,t,a.stack.endRule,n,i===o),c=l.findNextMatchSync(e,i,u);if(!c){r=a.stack.pop();break}if(-2!==c.ruleId){r=a.stack.pop();break}c.captureIndices&&c.captureIndices.length&&(s.produce(a.stack,c.captureIndices[0].start),Ot(t,e,n,a.stack,s,a.rule.whileCaptures,c.captureIndices),s.produce(a.stack,c.captureIndices[0].end),o=c.captureIndices[0].end,c.captureIndices[0].end>i&&(i=c.captureIndices[0].end,n=!1))}return{stack:r,linePos:i,anchorPosition:o,isFirstLine:n}}(t,e,n,i,r,s);r=o.stack,i=o.linePos,n=o.isFirstLine,c=o.anchorPosition}const m=Date.now();for(;!u;){if(0!==l){if(Date.now()-m>l)return new At(r,!0)}p()}return new At(r,!1);function p(){const o=function(t,e,n,i,r,s){const o=function(t,e,n,i,r,s){const o=r.getRule(t),{ruleScanner:l,findOptions:a}=Tt(o,t,r.endRule,n,i===s),u=l.findNextMatchSync(e,i,a);if(u)return{captureIndices:u.captureIndices,matchedRuleId:u.ruleId};return null}(t,e,n,i,r,s),l=t.getInjections();if(0===l.length)return o;const a=function(t,e,n,i,r,s,o){let l,a=Number.MAX_VALUE,u=null,c=0;const m=s.contentNameScopesList.getScopeNames();for(let s=0,p=t.length;s<p;s++){const p=t[s];if(!p.matcher(m))continue;const h=e.getRule(p.ruleId),{ruleScanner:d,findOptions:f}=Tt(h,e,null,i,r===o),g=d.findNextMatchSync(n,r,f);if(!g)continue;const y=g.captureIndices[0].start;if(!(y>=a)&&(a=y,u=g.captureIndices,l=g.ruleId,c=p.priority,a===r))break}if(u)return{priorityMatch:-1===c,captureIndices:u,matchedRuleId:l};return null}(l,t,e,n,i,r,s);if(!a)return o;if(!o)return a;const u=o.captureIndices[0].start,c=a.captureIndices[0].start;if(c<u||a.priorityMatch&&c===u)return a;return o}(t,e,n,i,r,c);if(!o)return s.produce(r,a),void(u=!0);const l=o.captureIndices,m=o.matchedRuleId,p=!!(l&&l.length>0)&&l[0].end>i;if(-1===m){const o=r.getRule(t);s.produce(r,l[0].start),r=r.withContentNameScopesList(r.nameScopesList),Ot(t,e,n,r,s,o.endCaptures,l),s.produce(r,l[0].end);const m=r;if(r=r.parent,c=m.getAnchorPos(),!p&&m.getEnterPos()===i)return r=m,s.produce(r,a),void(u=!0)}else{const o=t.getRule(m);s.produce(r,l[0].start);const h=r,d=o.getName(e.content,l),f=r.contentNameScopesList.pushAttributed(d,t);if(r=r.push(m,i,c,l[0].end===a,null,f,f),o instanceof yt){const i=o;Ot(t,e,n,r,s,i.beginCaptures,l),s.produce(r,l[0].end),c=l[0].end;const m=i.getContentName(e.content,l),d=f.pushAttributed(m,t);if(r=r.withContentNameScopesList(d),i.endHasBackReferences&&(r=r.withEndRule(i.getEndWithResolvedBackReferences(e.content,l))),!p&&h.hasSameRuleAs(r))return r=r.pop(),s.produce(r,a),void(u=!0)}else if(o instanceof bt){const i=o;Ot(t,e,n,r,s,i.beginCaptures,l),s.produce(r,l[0].end),c=l[0].end;const m=i.getContentName(e.content,l),d=f.pushAttributed(m,t);if(r=r.withContentNameScopesList(d),i.whileHasBackReferences&&(r=r.withEndRule(i.getWhileWithResolvedBackReferences(e.content,l))),!p&&h.hasSameRuleAs(r))return r=r.pop(),s.produce(r,a),void(u=!0)}else{if(Ot(t,e,n,r,s,o.captures,l),s.produce(r,l[0].end),r=r.pop(),!p)return r=r.safePop(),s.produce(r,a),void(u=!0)}}l[0].end>i&&(i=l[0].end,n=!1)}}function Tt(t,e,n,i,r){return{ruleScanner:t.compileAG(e,n,i,r),findOptions:0}}function Mt(t,e,n,i,r){return{ruleScanner:t.compileWhileAG(e,n,i,r),findOptions:0}}function Ot(t,e,n,i,r,s,o){if(0===s.length)return;const l=e.content,a=Math.min(s.length,o.length),u=[],c=o[0].end;for(let e=0;e<a;e++){const a=s[e];if(null===a)continue;const m=o[e];if(0===m.length)continue;if(m.start>c)break;for(;u.length>0&&u[u.length-1].endPos<=m.start;)r.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?r.produceFromScopes(u[u.length-1].scopes,m.start):r.produce(i,m.start),a.retokenizeCapturedWithRuleId){const e=a.getName(l,o),s=i.contentNameScopesList.pushAttributed(e,t),u=a.getContentName(l,o),c=s.pushAttributed(u,t),p=i.push(a.retokenizeCapturedWithRuleId,m.start,-1,!1,null,s,c),h=t.createOnigString(l.substring(0,m.end));Lt(t,h,n&&0===m.start,m.start,p,r,!1,0),X(h);continue}const p=a.getName(l,o);if(null!==p){const e=(u.length>0?u[u.length-1].scopes:i.contentNameScopesList).pushAttributed(p,t);u.push(new Pt(e,m.end))}}for(;u.length>0;)r.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var Pt=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function Nt(t,e,n,i,r){const s=J(e,Dt),o=wt.getCompiledRuleId(n,i,r.repository);for(const n of s)t.push({debugSelector:e,matcher:n.matcher,ruleId:o,grammar:r,priority:n.priority})}function Dt(t,e){if(e.length<t.length)return!1;let n=0;return t.every((t=>{for(let i=n;i<e.length;i++)if(Et(e[i],t))return n=i+1,!0;return!1}))}function Et(t,e){if(!t)return!1;if(t===e)return!0;const n=e.length;return t.length>n&&t.substr(0,n)===e&&"."===t[n]}var _t=class{constructor(t,e,n,i,r,s,o,l){if(this._rootScopeName=t,this.balancedBracketSelectors=s,this._onigLib=l,this._basicScopeAttributesProvider=new xt(n,i),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Rt(e,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const t of Object.keys(r)){const e=J(t,Dt);for(const n of e)this._tokenTypeMatchers.push({matcher:n.matcher,type:r[t]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t=t=>t===this._rootScopeName?this._grammar:this.getExternalGrammar(t),e=[],n=this._rootScopeName,i=t(n);if(i){const t=i.injections;if(t)for(let n in t)Nt(e,n,t[n],this,i);const r=this._grammarRepository.injections(n);r&&r.forEach((t=>{const n=this.getExternalGrammar(t);if(n){const t=n.injectionSelector;t&&Nt(e,t,n,this,n)}}))}return e.sort(((t,e)=>t.priority-e.priority)),e}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,n=t(e);return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=Rt(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){const i=this._tokenize(t,e,!1,n);return{tokens:i.lineTokens.getResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}tokenizeLine2(t,e,n=0){const i=this._tokenize(t,e,!0,n);return{tokens:i.lineTokens.getBinaryResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}_tokenize(t,e,n,i){let r;if(-1===this._rootId&&(this._rootId=wt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),e&&e!==Bt.NULL)r=!1,e.reset();else{r=!0;const t=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),i=V.set(0,t.languageId,t.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),s=this.getRule(this._rootId).getName(null,null);let o;o=s?$t.createRootAndLookUpScopeName(s,i,this):$t.createRoot("unknown",i),e=new Bt(null,this._rootId,-1,-1,!1,null,o,o)}t+="\n";const s=this.createOnigString(t),o=s.content.length,l=new Gt(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),a=Lt(this,s,r,0,e,l,!0,i);return X(s),{lineLength:o,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function Rt(t,e){return(t=L(t)).repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var $t=class t{constructor(t,e,n){this.parent=t,this.scopePath=e,this.tokenAttributes=n}static fromExtension(e,n){let i=e,r=e?.scopePath??null;for(const e of n)r=B.push(r,e.scopeNames),i=new t(i,r,e.encodedTokenAttributes);return i}static createRoot(e,n){return new t(null,new B(null,e),n)}static createRootAndLookUpScopeName(e,n,i){const r=i.getMetadataForScope(e),s=new B(null,e),o=i.themeProvider.themeMatch(s),l=t.mergeAttributes(n,r,o);return new t(null,s,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return t.equals(this,e)}static equals(t,e){for(;;){if(t===e)return!0;if(!t&&!e)return!0;if(!t||!e)return!1;if(t.scopeName!==e.scopeName||t.tokenAttributes!==e.tokenAttributes)return!1;t=t.parent,e=e.parent}}static mergeAttributes(t,e,n){let i=-1,r=0,s=0;return null!==n&&(i=n.fontStyle,r=n.foregroundId,s=n.backgroundId),V.set(t,e.languageId,e.tokenType,null,i,r,s)}pushAttributed(e,n){if(null===e)return this;if(-1===e.indexOf(" "))return t._pushAttributed(this,e,n);const i=e.split(/ /g);let r=this;for(const e of i)r=t._pushAttributed(r,e,n);return r}static _pushAttributed(e,n,i){const r=i.getMetadataForScope(n),s=e.scopePath.push(n),o=i.themeProvider.themeMatch(s),l=t.mergeAttributes(e.tokenAttributes,r,o);return new t(e,s,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const e=[];let n=this;for(;n&&n!==t;)e.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===t?e.reverse():void 0}},Bt=class t{constructor(t,e,n,i,r,s,o,l){this.parent=t,this.ruleId=e,this.beginRuleCapturedEOL=r,this.endRule=s,this.nameScopesList=o,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new t(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return null!==e&&t._equals(this,e)}static _equals(t,e){return t===e||!!this._structuralEquals(t,e)&&$t.equals(t.contentNameScopesList,e.contentNameScopesList)}static _structuralEquals(t,e){for(;;){if(t===e)return!0;if(!t&&!e)return!0;if(!t||!e)return!1;if(t.depth!==e.depth||t.ruleId!==e.ruleId||t.endRule!==e.endRule)return!1;t=t.parent,e=e.parent}}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){t._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,i,r,s,o,l){return new t(this,e,n,i,r,s,o,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,e){return this.parent&&(e=this.parent._writeString(t,e)),t[e++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,e}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(e){return this.endRule===e?this:new t(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let e=this;for(;e&&e._enterPos===t._enterPos;){if(e.ruleId===t.ruleId)return!0;e=e.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,n){const i=$t.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new t(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,i,$t.fromExtension(i,n.contentNameScopesList))}},It=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap((t=>"*"===t?(this.allowAny=!0,[]):J(t,Dt).map((t=>t.matcher)))),this.unbalancedBracketScopes=e.flatMap((t=>J(t,Dt).map((t=>t.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},Gt=class{constructor(t,e,n,i){this.balancedBracketSelectors=i,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let n=t?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const e=t?.getScopeNames()??[];for(const t of this._tokenTypeOverrides)t.matcher(e)&&(n=V.set(n,0,t.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(e))}return i&&(n=V.set(n,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n?void(this._lastTokenEndIndex=e):(this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),void(this._lastTokenEndIndex=e))}const n=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let t=0,e=this._binaryTokens.length;t<e;t++)n[t]=this._binaryTokens[t];return n}},qt=class{constructor(t,e){this._onigLib=e,this._theme=t}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,i,r){if(!this._grammars.has(t)){let s=this._rawGrammars.get(t);if(!s)return null;this._grammars.set(t,function(t,e,n,i,r,s,o,l){return new _t(t,e,n,i,r,s,o,l)}(t,s,e,n,i,r,this,this._onigLib))}return this._grammars.get(t)}},zt=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new qt($.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,e){this._syncRegistry.setTheme($.createFromRawTheme(t,e))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,e,n){return this.loadGrammarWithConfiguration(t,e,{embeddedLanguages:n})}loadGrammarWithConfiguration(t,e,n){return this._loadGrammar(t,e,n.embeddedLanguages,n.tokenTypes,new It(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,e,n,i,r){const s=new tt(this._syncRegistry,t);for(;s.Q.length>0;)s.Q.map((t=>this._loadSingleGrammar(t.scopeName))),s.processQueue();return this._grammarForScopeName(t,e,n,i,r)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const e=this._options.loadGrammar(t);if(e){const n="function"==typeof this._options.getInjections?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(e,n)}}addGrammar(t,e=[],n=0,i=null){return this._syncRegistry.addGrammar(t,e),this._grammarForScopeName(t.scopeName,n,i)}_grammarForScopeName(t,e=0,n=null,i=null,r=null){return this._syncRegistry.grammarForScopeName(t,e,n,i,r)}},Ft=Bt.NULL;const Ht=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Ut{constructor(t,e,n){this.property=t,this.normal=e,n&&(this.space=n)}}function Wt(t,e){const n={},i={};let r=-1;for(;++r<t.length;)Object.assign(n,t[r].property),Object.assign(i,t[r].normal);return new Ut(n,i,e)}function Vt(t){return t.toLowerCase()}Ut.prototype.property={},Ut.prototype.normal={},Ut.prototype.space=null;class Jt{constructor(t,e){this.property=t,this.attribute=e}}Jt.prototype.space=null,Jt.prototype.boolean=!1,Jt.prototype.booleanish=!1,Jt.prototype.overloadedBoolean=!1,Jt.prototype.number=!1,Jt.prototype.commaSeparated=!1,Jt.prototype.spaceSeparated=!1,Jt.prototype.commaOrSpaceSeparated=!1,Jt.prototype.mustUseProperty=!1,Jt.prototype.defined=!1;let Kt=0;const Xt=ie(),Yt=ie(),Qt=ie(),Zt=ie(),te=ie(),ee=ie(),ne=ie();function ie(){return 2**++Kt}var re=Object.freeze({__proto__:null,boolean:Xt,booleanish:Yt,commaOrSpaceSeparated:ne,commaSeparated:ee,number:Zt,overloadedBoolean:Qt,spaceSeparated:te});const se=Object.keys(re);class oe extends Jt{constructor(t,e,n,i){let r=-1;if(super(t,e),le(this,"space",i),"number"==typeof n)for(;++r<se.length;){const t=se[r];le(this,se[r],(n&re[t])===re[t])}}}function le(t,e,n){n&&(t[e]=n)}oe.prototype.defined=!0;const ae={}.hasOwnProperty;function ue(t){const e={},n={};let i;for(i in t.properties)if(ae.call(t.properties,i)){const r=t.properties[i],s=new oe(i,t.transform(t.attributes||{},i),r,t.space);t.mustUseProperty&&t.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),e[i]=s,n[Vt(i)]=i,n[Vt(s.attribute)]=i}return new Ut(e,n,t.space)}const ce=ue({space:"xlink",transform:(t,e)=>"xlink:"+e.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),me=ue({space:"xml",transform:(t,e)=>"xml:"+e.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function pe(t,e){return e in t?t[e]:e}function he(t,e){return pe(t,e.toLowerCase())}const de=ue({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:he,properties:{xmlns:null,xmlnsXLink:null}}),fe=ue({transform:(t,e)=>"role"===e?e:"aria-"+e.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Yt,ariaAutoComplete:null,ariaBusy:Yt,ariaChecked:Yt,ariaColCount:Zt,ariaColIndex:Zt,ariaColSpan:Zt,ariaControls:te,ariaCurrent:null,ariaDescribedBy:te,ariaDetails:null,ariaDisabled:Yt,ariaDropEffect:te,ariaErrorMessage:null,ariaExpanded:Yt,ariaFlowTo:te,ariaGrabbed:Yt,ariaHasPopup:null,ariaHidden:Yt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:te,ariaLevel:Zt,ariaLive:null,ariaModal:Yt,ariaMultiLine:Yt,ariaMultiSelectable:Yt,ariaOrientation:null,ariaOwns:te,ariaPlaceholder:null,ariaPosInSet:Zt,ariaPressed:Yt,ariaReadOnly:Yt,ariaRelevant:null,ariaRequired:Yt,ariaRoleDescription:te,ariaRowCount:Zt,ariaRowIndex:Zt,ariaRowSpan:Zt,ariaSelected:Yt,ariaSetSize:Zt,ariaSort:null,ariaValueMax:Zt,ariaValueMin:Zt,ariaValueNow:Zt,ariaValueText:null,role:null}}),ge=ue({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:he,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ee,acceptCharset:te,accessKey:te,action:null,allow:null,allowFullScreen:Xt,allowPaymentRequest:Xt,allowUserMedia:Xt,alt:null,as:null,async:Xt,autoCapitalize:null,autoComplete:te,autoFocus:Xt,autoPlay:Xt,blocking:te,capture:null,charSet:null,checked:Xt,cite:null,className:te,cols:Zt,colSpan:null,content:null,contentEditable:Yt,controls:Xt,controlsList:te,coords:Zt|ee,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Xt,defer:Xt,dir:null,dirName:null,disabled:Xt,download:Qt,draggable:Yt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Xt,formTarget:null,headers:te,height:Zt,hidden:Xt,high:Zt,href:null,hrefLang:null,htmlFor:te,httpEquiv:te,id:null,imageSizes:null,imageSrcSet:null,inert:Xt,inputMode:null,integrity:null,is:null,isMap:Xt,itemId:null,itemProp:te,itemRef:te,itemScope:Xt,itemType:te,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Xt,low:Zt,manifest:null,max:null,maxLength:Zt,media:null,method:null,min:null,minLength:Zt,multiple:Xt,muted:Xt,name:null,nonce:null,noModule:Xt,noValidate:Xt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Xt,optimum:Zt,pattern:null,ping:te,placeholder:null,playsInline:Xt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Xt,referrerPolicy:null,rel:te,required:Xt,reversed:Xt,rows:Zt,rowSpan:Zt,sandbox:te,scope:null,scoped:Xt,seamless:Xt,selected:Xt,shadowRootClonable:Xt,shadowRootDelegatesFocus:Xt,shadowRootMode:null,shape:null,size:Zt,sizes:null,slot:null,span:Zt,spellCheck:Yt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Zt,step:null,style:null,tabIndex:Zt,target:null,title:null,translate:null,type:null,typeMustMatch:Xt,useMap:null,value:Yt,width:Zt,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:te,axis:null,background:null,bgColor:null,border:Zt,borderColor:null,bottomMargin:Zt,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Xt,declare:Xt,event:null,face:null,frame:null,frameBorder:null,hSpace:Zt,leftMargin:Zt,link:null,longDesc:null,lowSrc:null,marginHeight:Zt,marginWidth:Zt,noResize:Xt,noHref:Xt,noShade:Xt,noWrap:Xt,object:null,profile:null,prompt:null,rev:null,rightMargin:Zt,rules:null,scheme:null,scrolling:Yt,standby:null,summary:null,text:null,topMargin:Zt,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Zt,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Xt,disableRemotePlayback:Xt,prefix:null,property:null,results:Zt,security:null,unselectable:null}}),ye=ue({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:pe,properties:{about:ne,accentHeight:Zt,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Zt,amplitude:Zt,arabicForm:null,ascent:Zt,attributeName:null,attributeType:null,azimuth:Zt,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Zt,by:null,calcMode:null,capHeight:Zt,className:te,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Zt,diffuseConstant:Zt,direction:null,display:null,dur:null,divisor:Zt,dominantBaseline:null,download:Xt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Zt,enableBackground:null,end:null,event:null,exponent:Zt,externalResourcesRequired:null,fill:null,fillOpacity:Zt,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ee,g2:ee,glyphName:ee,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Zt,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Zt,horizOriginX:Zt,horizOriginY:Zt,id:null,ideographic:Zt,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Zt,k:Zt,k1:Zt,k2:Zt,k3:Zt,k4:Zt,kernelMatrix:ne,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Zt,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Zt,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Zt,overlineThickness:Zt,paintOrder:null,panose1:null,path:null,pathLength:Zt,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:te,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Zt,pointsAtY:Zt,pointsAtZ:Zt,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ne,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ne,rev:ne,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ne,requiredFeatures:ne,requiredFonts:ne,requiredFormats:ne,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Zt,specularExponent:Zt,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Zt,strikethroughThickness:Zt,string:null,stroke:null,strokeDashArray:ne,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Zt,strokeOpacity:Zt,strokeWidth:null,style:null,surfaceScale:Zt,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ne,tabIndex:Zt,tableValues:null,target:null,targetX:Zt,targetY:Zt,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ne,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Zt,underlineThickness:Zt,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Zt,values:null,vAlphabetic:Zt,vMathematical:Zt,vectorEffect:null,vHanging:Zt,vIdeographic:Zt,version:null,vertAdvY:Zt,vertOriginX:Zt,vertOriginY:Zt,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Zt,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),be=/^data[-\w.:]+$/i,we=/-[a-z]/g,ke=/[A-Z]/g;function ve(t){return"-"+t.toLowerCase()}function je(t){return t.charAt(1).toUpperCase()}const Se=Wt([me,ce,de,fe,ge],"html"),xe=Wt([me,ce,de,fe,ye],"svg"),Ce={}.hasOwnProperty;const Ae=/["&'<>`]/g,Le=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Te=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Me=/[|\\{}()[\]^$+*?.]/g,Oe=new WeakMap;function Pe(t,e){return t=t.replace(e.subset?function(t){let e=Oe.get(t);e||(e=function(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(Me,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}(t),Oe.set(t,e));return e}(e.subset):Ae,n),e.subset||e.escapeOnly?t:t.replace(Le,(function(t,n,i){return e.format(1024*(t.charCodeAt(0)-55296)+t.charCodeAt(1)-56320+65536,i.charCodeAt(n+2),e)})).replace(Te,n);function n(t,n,i){return e.format(t.charCodeAt(0),i.charCodeAt(n+1),e)}}const Ne=/[\dA-Fa-f]/;const De=/\d/;const Ee=["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"],_e={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Re=["cent","copy","divide","gt","lt","not","para","times"],$e={}.hasOwnProperty,Be={};let Ie;for(Ie in _e)$e.call(_e,Ie)&&(Be[_e[Ie]]=Ie);const Ge=/[^\dA-Za-z]/;function qe(t,e,n){let i,r=function(t,e,n){const i="&#x"+t.toString(16).toUpperCase();return n&&e&&!Ne.test(String.fromCharCode(e))?i:i+";"}(t,e,n.omitOptionalSemicolons);if((n.useNamedReferences||n.useShortestReferences)&&(i=function(t,e,n,i){const r=String.fromCharCode(t);if($e.call(Be,r)){const t=Be[r],s="&"+t;return n&&Ee.includes(t)&&!Re.includes(t)&&(!i||e&&61!==e&&Ge.test(String.fromCharCode(e)))?s:s+";"}return""}(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const i=function(t,e,n){const i="&#"+String(t);return n&&e&&!De.test(String.fromCharCode(e))?i:i+";"}(t,e,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function ze(t,e){return Pe(t,Object.assign({format:qe},e))}const Fe=/^>|^->|<!--|-->|--!>|<!-$/g,He=[">"],Ue=["<",">"];function We(t,e){const n=String(t);if("string"!=typeof e)throw new TypeError("Expected character");let i=0,r=n.indexOf(e);for(;-1!==r;)i++,r=n.indexOf(e,r+e.length);return i}function Ve(t,e){const n=e||{};return(""===t[t.length-1]?[...t,""]:t).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}function Je(t){return t.join(" ").trim()}const Ke=/[ \t\n\f\r]/g;function Xe(t){return"object"==typeof t?"text"===t.type&&Ye(t.value):Ye(t)}function Ye(t){return""===t.replace(Ke,"")}const Qe=en(1),Ze=en(-1),tn=[];function en(t){return function(e,n,i){const r=e?e.children:tn;let s=(n||0)+t,o=r[s];if(!i)for(;o&&Xe(o);)s+=t,o=r[s];return o}}const nn={}.hasOwnProperty;function rn(t){return function(e,n,i){return nn.call(t,e.tagName)&&t[e.tagName](e,n,i)}}const sn=rn({body:function(t,e,n){const i=Qe(n,e);return!i||"comment"!==i.type},caption:on,colgroup:on,dd:function(t,e,n){const i=Qe(n,e);return!i||"element"===i.type&&("dt"===i.tagName||"dd"===i.tagName)},dt:function(t,e,n){const i=Qe(n,e);return Boolean(i&&"element"===i.type&&("dt"===i.tagName||"dd"===i.tagName))},head:on,html:function(t,e,n){const i=Qe(n,e);return!i||"comment"!==i.type},li:function(t,e,n){const i=Qe(n,e);return!i||"element"===i.type&&"li"===i.tagName},optgroup:function(t,e,n){const i=Qe(n,e);return!i||"element"===i.type&&"optgroup"===i.tagName},option:function(t,e,n){const i=Qe(n,e);return!i||"element"===i.type&&("option"===i.tagName||"optgroup"===i.tagName)},p:function(t,e,n){const i=Qe(n,e);return i?"element"===i.type&&("address"===i.tagName||"article"===i.tagName||"aside"===i.tagName||"blockquote"===i.tagName||"details"===i.tagName||"div"===i.tagName||"dl"===i.tagName||"fieldset"===i.tagName||"figcaption"===i.tagName||"figure"===i.tagName||"footer"===i.tagName||"form"===i.tagName||"h1"===i.tagName||"h2"===i.tagName||"h3"===i.tagName||"h4"===i.tagName||"h5"===i.tagName||"h6"===i.tagName||"header"===i.tagName||"hgroup"===i.tagName||"hr"===i.tagName||"main"===i.tagName||"menu"===i.tagName||"nav"===i.tagName||"ol"===i.tagName||"p"===i.tagName||"pre"===i.tagName||"section"===i.tagName||"table"===i.tagName||"ul"===i.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:ln,rt:ln,tbody:function(t,e,n){const i=Qe(n,e);return!i||"element"===i.type&&("tbody"===i.tagName||"tfoot"===i.tagName)},td:an,tfoot:function(t,e,n){return!Qe(n,e)},th:an,thead:function(t,e,n){const i=Qe(n,e);return Boolean(i&&"element"===i.type&&("tbody"===i.tagName||"tfoot"===i.tagName))},tr:function(t,e,n){const i=Qe(n,e);return!i||"element"===i.type&&"tr"===i.tagName}});function on(t,e,n){const i=Qe(n,e,!0);return!i||"comment"!==i.type&&!("text"===i.type&&Xe(i.value.charAt(0)))}function ln(t,e,n){const i=Qe(n,e);return!i||"element"===i.type&&("rp"===i.tagName||"rt"===i.tagName)}function an(t,e,n){const i=Qe(n,e);return!i||"element"===i.type&&("td"===i.tagName||"th"===i.tagName)}const un=rn({body:function(t){const e=Qe(t,-1,!0);return!(e&&("comment"===e.type||"text"===e.type&&Xe(e.value.charAt(0))||"element"===e.type&&("meta"===e.tagName||"link"===e.tagName||"script"===e.tagName||"style"===e.tagName||"template"===e.tagName)))},colgroup:function(t,e,n){const i=Ze(n,e),r=Qe(t,-1,!0);if(n&&i&&"element"===i.type&&"colgroup"===i.tagName&&sn(i,n.children.indexOf(i),n))return!1;return Boolean(r&&"element"===r.type&&"col"===r.tagName)},head:function(t){const e=new Set;for(const n of t.children)if("element"===n.type&&("base"===n.tagName||"title"===n.tagName)){if(e.has(n.tagName))return!1;e.add(n.tagName)}const n=t.children[0];return!n||"element"===n.type},html:function(t){const e=Qe(t,-1);return!e||"comment"!==e.type},tbody:function(t,e,n){const i=Ze(n,e),r=Qe(t,-1);if(n&&i&&"element"===i.type&&("thead"===i.tagName||"tbody"===i.tagName)&&sn(i,n.children.indexOf(i),n))return!1;return Boolean(r&&"element"===r.type&&"tr"===r.tagName)}});const cn={name:[["\t\n\f\r &/=>".split(""),"\t\n\f\r \"&'/=>`".split("")],["\0\t\n\f\r \"&'/<=>".split(""),"\0\t\n\f\r \"&'/<=>`".split("")]],unquoted:[["\t\n\f\r &>".split(""),"\0\t\n\f\r \"&'<=>`".split("")],["\0\t\n\f\r \"&'<=>`".split(""),"\0\t\n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function mn(t,e,n){const i=function(t,e){const n=Vt(e);let i=e,r=Jt;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&be.test(e)){if("-"===e.charAt(4)){const t=e.slice(5).replace(we,je);i="data"+t.charAt(0).toUpperCase()+t.slice(1)}else{const t=e.slice(4);if(!we.test(t)){let n=t.replace(ke,ve);"-"!==n.charAt(0)&&(n="-"+n),e="data"+n}}r=oe}return new r(i,e)}(t.schema,e),r=t.settings.allowParseErrors&&"html"===t.schema.space?0:1,s=t.settings.allowDangerousCharacters?0:1;let o,l=t.quote;if(!i.overloadedBoolean||n!==i.attribute&&""!==n?!i.boolean&&!i.overloadedBoolean||"string"==typeof n&&n!==i.attribute&&""!==n||(n=Boolean(n)):n=!0,null==n||!1===n||"number"==typeof n&&Number.isNaN(n))return"";const a=ze(i.attribute,Object.assign({},t.settings.characterReferences,{subset:cn.name[r][s]}));return!0===n?a:(n=Array.isArray(n)?(i.commaSeparated?Ve:Je)(n,{padLeft:!t.settings.tightCommaSeparatedLists}):String(n),t.settings.collapseEmptyAttributes&&!n?a:(t.settings.preferUnquoted&&(o=ze(n,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:cn.unquoted[r][s]}))),o!==n&&(t.settings.quoteSmart&&We(n,l)>We(n,t.alternative)&&(l=t.alternative),o=l+ze(n,Object.assign({},t.settings.characterReferences,{subset:("'"===l?cn.single:cn.double)[r][s],attribute:!0}))+l),a+(o?"="+o:o)))}const pn=["<","&"];function hn(t,e,n,i){return!n||"element"!==n.type||"script"!==n.tagName&&"style"!==n.tagName?ze(t.value,Object.assign({},i.settings.characterReferences,{subset:pn})):t.value}const dn=function(t,e){const n=e||{};function i(e,...n){let r=i.invalid;const s=i.handlers;if(e&&Ce.call(e,t)){const n=String(e[t]);r=Ce.call(s,n)?s[n]:i.unknown}if(r)return r.call(this,e,...n)}return i.handlers=n.handlers||{},i.invalid=n.invalid,i.unknown=n.unknown,i}("type",{invalid:function(t){throw new Error("Expected node, not `"+t+"`")},unknown:function(t){throw new Error("Cannot compile unknown node `"+t.type+"`")},handlers:{comment:function(t,e,n,i){return i.settings.bogusComments?"<?"+ze(t.value,Object.assign({},i.settings.characterReferences,{subset:He}))+">":"\x3c!--"+t.value.replace(Fe,(function(t){return ze(t,Object.assign({},i.settings.characterReferences,{subset:Ue}))}))+"--\x3e"},doctype:function(t,e,n,i){return"<!"+(i.settings.upperDoctype?"DOCTYPE":"doctype")+(i.settings.tightDoctype?"":" ")+"html>"},element:function(t,e,n,i){const r=i.schema,s="svg"!==r.space&&i.settings.omitOptionalTags;let o="svg"===r.space?i.settings.closeEmptyElements:i.settings.voids.includes(t.tagName.toLowerCase());const l=[];let a;"html"===r.space&&"svg"===t.tagName&&(i.schema=xe);const u=function(t,e){const n=[];let i,r=-1;if(e)for(i in e)if(null!==e[i]&&void 0!==e[i]){const r=mn(t,i,e[i]);r&&n.push(r)}for(;++r<n.length;){const e=t.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&'"'!==e&&"'"!==e&&(n[r]+=" ")}return n.join("")}(i,t.properties),c=i.all("html"===r.space&&"template"===t.tagName?t.content:t);return i.schema=r,c&&(o=!1),!u&&s&&un(t,e,n)||(l.push("<",t.tagName,u?" "+u:""),o&&("svg"===r.space||i.settings.closeSelfClosing)&&(a=u.charAt(u.length-1),(!i.settings.tightSelfClosing||"/"===a||a&&'"'!==a&&"'"!==a)&&l.push(" "),l.push("/")),l.push(">")),l.push(c),o||s&&sn(t,e,n)||l.push("</"+t.tagName+">"),l.join("")},raw:function(t,e,n,i){return i.settings.allowDangerousHtml?t.value:hn(t,0,n,i)},root:function(t,e,n,i){return i.all(t)},text:hn}});const fn={},gn={},yn=[];function bn(t,e,n){return dn(t,e,n,this)}function wn(t){const e=[],n=t&&t.children||yn;let i=-1;for(;++i<n.length;)e[i]=this.one(n[i],i,t);return e.join("")}function kn(t,e=!1){const n=t.split(/(\r?\n)/g);let i=0;const r=[];for(let t=0;t<n.length;t+=2){const s=e?n[t]+(n[t+1]||""):n[t];r.push([s,i]),i+=n[t].length,i+=n[t+1]?.length||0}return r}function vn(t){return!t||["plaintext","txt","text","plain"].includes(t)}function jn(t){return"ansi"===t||vn(t)}function Sn(t){return"none"===t}function xn(t){return Sn(t)}function Cn(t,e){if(!e)return t;t.properties||={},t.properties.class||=[],"string"==typeof t.properties.class&&(t.properties.class=t.properties.class.split(/\s+/g)),Array.isArray(t.properties.class)||(t.properties.class=[]);const n=Array.isArray(e)?e:e.split(/\s+/g);for(const e of n)e&&!t.properties.class.includes(e)&&t.properties.class.push(e);return t}async function An(t){return Promise.resolve("function"==typeof t?t():t).then((t=>t.default||t))}function Ln(t,e){const n="string"==typeof t?{}:{...t.colorReplacements},i="string"==typeof t?t:t.name;for(const[t,r]of Object.entries(e?.colorReplacements||{}))"string"==typeof r?n[t]=r:t===i&&Object.assign(n,r);return n}function Tn(t,e){return t&&e?.[t?.toLowerCase()]||t}function Mn(t){const e={};return t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle&&(t.fontStyle&z.Italic&&(e["font-style"]="italic"),t.fontStyle&z.Bold&&(e["font-weight"]="bold"),t.fontStyle&z.Underline&&(e["text-decoration"]="underline")),e}function On(t){return"string"==typeof t?t:Object.entries(t).map((([t,e])=>`${t}:${e}`)).join(";")}class Pn extends Error{constructor(t){super(t),this.name="ShikiError"}}const Nn=new WeakMap;function Dn(t,e){Nn.set(t,e)}function En(t){return Nn.get(t)}class _n{_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,e){return new _n(Object.fromEntries(function(t){return Array.isArray(t)?t:[t]}(e).map((t=>[t,Ft]))),t)}constructor(...t){if(2===t.length){const[e,n]=t;this.lang=n,this._stacks=e}else{const[e,n,i]=t;this.lang=n,this._stacks={[i]:e}}}getInternalStack(t=this.theme){return this._stacks[t]}get scopes(){return Rn(this._stacks[this.theme])}getScopes(t=this.theme){return Rn(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.scopes}}}function Rn(t){const e=[],n=new Set;return function t(i){if(n.has(i))return;n.add(i);const r=i?.nameScopesList?.scopeName;r&&e.push(r),i.parent&&t(i.parent)}(t),e}function $n(){const t=new WeakMap;function e(e){if(!t.has(e.meta)){let n=function(t){if("number"==typeof t){if(t<0||t>e.source.length)throw new Pn(`Invalid decoration offset: ${t}. Code length: ${e.source.length}`);return{...i.indexToPos(t),offset:t}}{const e=i.lines[t.line];if(void 0===e)throw new Pn(`Invalid decoration position ${JSON.stringify(t)}. Lines length: ${i.lines.length}`);if(t.character<0||t.character>e.length)throw new Pn(`Invalid decoration position ${JSON.stringify(t)}. Line ${t.line} length: ${e.length}`);return{...t,offset:i.posToIndex(t.line,t.character)}}};const i=function(t){const e=kn(t,!0).map((([t])=>t));return{lines:e,indexToPos:function(n){if(n===t.length)return{line:e.length-1,character:e[e.length-1].length};let i=n,r=0;for(const t of e){if(i<t.length)break;i-=t.length,r++}return{line:r,character:i}},posToIndex:function(t,n){let i=0;for(let n=0;n<t;n++)i+=e[n].length;return i+=n,i}}}(e.source),r=(e.options.decorations||[]).map((t=>({...t,start:n(t.start),end:n(t.end)})));!function(t){for(let e=0;e<t.length;e++){const n=t[e];if(n.start.offset>n.end.offset)throw new Pn(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let i=e+1;i<t.length;i++){const e=t[i],r=n.start.offset<e.start.offset&&e.start.offset<n.end.offset,s=n.start.offset<e.end.offset&&e.end.offset<n.end.offset,o=e.start.offset<n.start.offset&&n.start.offset<e.end.offset,l=e.start.offset<n.end.offset&&n.end.offset<e.end.offset;if(r||s||o||l){if(s&&s)continue;if(o&&l)continue;throw new Pn(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(e.start)} intersect.`)}}}}(r),t.set(e.meta,{decorations:r,converter:i,source:e.source})}return t.get(e.meta)}return{name:"shiki:decorations",tokens(t){if(!this.options.decorations?.length)return;const n=function(t,e){const n=Array.from(e instanceof Set?e:new Set(e)).sort(((t,e)=>t-e));return n.length?t.map((t=>t.flatMap((t=>{const e=n.filter((e=>t.offset<e&&e<t.offset+t.content.length)).map((e=>e-t.offset)).sort(((t,e)=>t-e));return e.length?function(t,e){let n=0;const i=[];for(const r of e)r>n&&i.push({...t,content:t.content.slice(n,r),offset:t.offset+n}),n=r;return n<t.content.length&&i.push({...t,content:t.content.slice(n),offset:t.offset+n}),i}(t,e):t})))):t}(t,e(this).decorations.flatMap((t=>[t.start.offset,t.end.offset])));return n},code(t){if(!this.options.decorations?.length)return;const n=e(this),i=Array.from(t.children).filter((t=>"element"===t.type&&"span"===t.tagName));if(i.length!==n.converter.lines.length)throw new Pn(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function r(t,e,n,r){const s=i[t];let l="",a=-1,u=-1;if(0===e&&(a=0),0===n&&(u=0),n===Number.POSITIVE_INFINITY&&(u=s.children.length),-1===a||-1===u)for(let t=0;t<s.children.length;t++)l+=Bn(s.children[t]),-1===a&&l.length===e&&(a=t+1),-1===u&&l.length===n&&(u=t+1);if(-1===a)throw new Pn(`Failed to find start index for decoration ${JSON.stringify(r.start)}`);if(-1===u)throw new Pn(`Failed to find end index for decoration ${JSON.stringify(r.end)}`);const c=s.children.slice(a,u);if(r.alwaysWrap||c.length!==s.children.length)if(r.alwaysWrap||1!==c.length||"element"!==c[0].type){const t={type:"element",tagName:"span",properties:{},children:c};o(t,r,"wrapper"),s.children.splice(a,c.length,t)}else o(c[0],r,"token");else o(s,r,"line")}function s(t,e){i[t]=o(i[t],e,"line")}function o(t,e,n){const i=e.properties||{},r=e.transform||(t=>t);return t.tagName=e.tagName||"span",t.properties={...t.properties,...i,class:t.properties.class},e.properties?.class&&Cn(t,e.properties.class),t=r(t,n)||t}const l=[],a=n.decorations.sort(((t,e)=>e.start.offset-t.start.offset));for(const t of a){const{start:e,end:n}=t;if(e.line===n.line)r(e.line,e.character,n.character,t);else if(e.line<n.line){r(e.line,e.character,Number.POSITIVE_INFINITY,t);for(let i=e.line+1;i<n.line;i++)l.unshift((()=>s(i,t)));r(n.line,0,n.character,t)}}l.forEach((t=>t()))}}}function Bn(t){return"text"===t.type?t.value:"element"===t.type?t.children.map(Bn).join(""):""}const In=[$n()];function Gn(t){return[...t.transformers||[],...In]}var qn=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],zn={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function Fn(t,e){const n=t.indexOf("[",e);if(-1!==n){const e=t.indexOf("m",n);return{sequence:t.substring(n+2,e).split(";"),startPosition:n,position:e+1}}return{position:t.length}}function Hn(t,e){let n=1;const i=t[e+n++];let r;if("2"===i){const i=[t[e+n++],t[e+n++],t[e+n]].map((t=>Number.parseInt(t)));3!==i.length||i.some((t=>Number.isNaN(t)))||(r={type:"rgb",rgb:i})}else if("5"===i){const i=Number.parseInt(t[e+n]);Number.isNaN(i)||(r={type:"table",index:Number(i)})}return[n,r]}function Un(t){const e=[];for(let n=0;n<t.length;n++){const i=t[n],r=Number.parseInt(i);if(!Number.isNaN(r))if(0===r)e.push({type:"resetAll"});else if(r<=9){zn[r]&&e.push({type:"setDecoration",value:zn[r]})}else if(r<=29){const t=zn[r-20];t&&e.push({type:"resetDecoration",value:t})}else if(r<=37)e.push({type:"setForegroundColor",value:{type:"named",name:qn[r-30]}});else if(38===r){const[i,r]=Hn(t,n);r&&e.push({type:"setForegroundColor",value:r}),n+=i}else if(39===r)e.push({type:"resetForegroundColor"});else if(r<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:qn[r-40]}});else if(48===r){const[i,r]=Hn(t,n);r&&e.push({type:"setBackgroundColor",value:r}),n+=i}else 49===r?e.push({type:"resetBackgroundColor"}):r>=90&&r<=97?e.push({type:"setForegroundColor",value:{type:"named",name:qn[r-90+8]}}):r>=100&&r<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:qn[r-100+8]}})}return e}var Wn={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function Vn(t=Wn){function e(e){return t[e]}function n(t){return`#${t.map((t=>Math.max(0,Math.min(t,255)).toString(16).padStart(2,"0"))).join("")}`}let i;function r(t){return function(){if(i)return i;i=[];for(let t=0;t<qn.length;t++)i.push(e(qn[t]));let t=[0,95,135,175,215,255];for(let e=0;e<6;e++)for(let r=0;r<6;r++)for(let s=0;s<6;s++)i.push(n([t[e],t[r],t[s]]));let r=8;for(let t=0;t<24;t++,r+=10)i.push(n([r,r,r]));return i}()[t]}return{value:function(t){switch(t.type){case"named":return e(t.name);case"rgb":return n(t.rgb);case"table":return r(t.index)}}}}function Jn(t,e,n){const i=Ln(t,n),r=kn(e),s=Vn(Object.fromEntries(qn.map((e=>[e,t.colors?.[`terminal.ansi${e[0].toUpperCase()}${e.substring(1)}`]])))),o=function(){let t=null,e=null,n=new Set;return{parse(i){const r=[];let s=0;do{const o=Fn(i,s),l=o.sequence?i.substring(s,o.startPosition):i.substring(s);if(l.length>0&&r.push({value:l,foreground:t,background:e,decorations:new Set(n)}),o.sequence){const i=Un(o.sequence);for(const r of i)"resetAll"===r.type?(t=null,e=null,n.clear()):"resetForegroundColor"===r.type?t=null:"resetBackgroundColor"===r.type?e=null:"resetDecoration"===r.type&&n.delete(r.value);for(const r of i)"setForegroundColor"===r.type?t=r.value:"setBackgroundColor"===r.type?e=r.value:"setDecoration"===r.type&&n.add(r.value)}s=o.position}while(s<i.length);return r}}}();return r.map((e=>o.parse(e[0]).map((n=>{let r,o;n.decorations.has("reverse")?(r=n.background?s.value(n.background):t.bg,o=n.foreground?s.value(n.foreground):t.fg):(r=n.foreground?s.value(n.foreground):t.fg,o=n.background?s.value(n.background):void 0),r=Tn(r,i),o=Tn(o,i),n.decorations.has("dim")&&(r=function(t){const e=t.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(e){if(e[3]){const t=Math.round(Number.parseInt(e[3],16)/2).toString(16).padStart(2,"0");return`#${e[1]}${e[2]}${t}`}return e[2]?`#${e[1]}${e[2]}80`:`#${Array.from(e[1]).map((t=>`${t}${t}`)).join("")}80`}const n=t.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:t}(r));let l=z.None;return n.decorations.has("bold")&&(l|=z.Bold),n.decorations.has("italic")&&(l|=z.Italic),n.decorations.has("underline")&&(l|=z.Underline),{content:n.value,offset:e[1],color:r,bgColor:o,fontStyle:l}}))))}function Kn(t,e,n={}){const{lang:i="text",theme:r=t.getLoadedThemes()[0]}=n;if(vn(i)||Sn(r))return kn(e).map((t=>[{content:t[0],offset:t[1]}]));const{theme:s,colorMap:o}=t.setTheme(r);if("ansi"===i)return Jn(s,e,n);const l=t.getLanguage(i);if(n.grammarState){if(n.grammarState.lang!==l.name)throw new m(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(s.name))throw new m(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return function(t,e,n,i,r){const s=Xn(t,e,n,i,r),o=new _n(Xn(t,e,n,i,r).stateStack,e.name,n.name);return Dn(s.tokens,o),s.tokens}(e,l,s,o,n)}function Xn(t,e,n,i,r){const s=Ln(n,r),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:l=500}=r,a=kn(t);let u=r.grammarState?function(t,e){if(!(t instanceof _n))throw new Pn("Invalid grammar state");return t.getInternalStack(e)}(r.grammarState,n.name)??Ft:null!=r.grammarContextCode?Xn(r.grammarContextCode,e,n,i,{...r,grammarState:void 0,grammarContextCode:void 0}).stateStack:Ft,c=[];const m=[];for(let t=0,h=a.length;t<h;t++){const[h,d]=a[t];if(""===h){c=[],m.push([]);continue}if(o>0&&h.length>=o){c=[],m.push([{content:h,offset:d,color:"",fontStyle:0}]);continue}let f,g,y;r.includeExplanation&&(f=e.tokenizeLine(h,u),g=f.tokens,y=0);const b=e.tokenizeLine2(h,u,l),w=b.tokens.length/2;for(let t=0;t<w;t++){const e=b.tokens[2*t],o=t+1<w?b.tokens[2*t+2]:h.length;if(e===o)continue;const l=b.tokens[2*t+1],a=Tn(i[V.getForeground(l)],s),u=V.getFontStyle(l),m={content:h.substring(e,o),offset:d+e,color:a,fontStyle:u};if(r.includeExplanation){const t=[];if("scopeName"!==r.includeExplanation)for(const e of n.settings){let n;switch(typeof e.scope){case"string":n=e.scope.split(/,/).map((t=>t.trim()));break;case"object":n=e.scope;break;default:continue}t.push({settings:e,selectors:n.map((t=>t.split(/ /)))})}m.explanation=[];let i=0;for(;e+i<o;){const e=g[y],n=h.substring(e.startIndex,e.endIndex);i+=n.length,m.explanation.push({content:n,scopes:"scopeName"===r.includeExplanation?(p=e.scopes,p.map((t=>({scopeName:t})))):Yn(t,e.scopes)}),y+=1}}c.push(m)}m.push(c),c=[],u=b.ruleStack}var p;return{tokens:m,stateStack:u}}function Yn(t,e){const n=[];for(let i=0,r=e.length;i<r;i++){const r=e[i];n[i]={scopeName:r,themeMatches:ti(t,r,e.slice(0,i))}}return n}function Qn(t,e){return t===e||e.substring(0,t.length)===t&&"."===e[t.length]}function Zn(t,e,n){if(!Qn(t[t.length-1],e))return!1;let i=t.length-2,r=n.length-1;for(;i>=0&&r>=0;)Qn(t[i],n[r])&&(i-=1),r-=1;return-1===i}function ti(t,e,n){const i=[];for(const{selectors:r,settings:s}of t)for(const t of r)if(Zn(t,e,n)){i.push(s);break}return i}function ei(t,e,n){const i=Object.entries(n.themes).filter((t=>t[1])).map((t=>({color:t[0],theme:t[1]}))),r=i.map((i=>{const r=Kn(t,e,{...n,theme:i.theme});return{tokens:r,state:En(r),theme:"string"==typeof i.theme?i.theme:i.theme.name}})),s=function(...t){const e=t.map((()=>[])),n=t.length;for(let i=0;i<t[0].length;i++){const r=t.map((t=>t[i])),s=e.map((()=>[]));e.forEach(((t,e)=>t.push(s[e])));const o=r.map((()=>0)),l=r.map((t=>t[0]));for(;l.every((t=>t));){const t=Math.min(...l.map((t=>t.content.length)));for(let e=0;e<n;e++){const n=l[e];n.content.length===t?(s[e].push(n),o[e]+=1,l[e]=r[e][o[e]]):(s[e].push({...n,content:n.content.slice(0,t)}),l[e]={...n,content:n.content.slice(t),offset:n.offset+t})}}}return e}(...r.map((t=>t.tokens))),o=s[0].map(((t,e)=>t.map(((t,r)=>{const o={content:t.content,variants:{},offset:t.offset};return"includeExplanation"in n&&n.includeExplanation&&(o.explanation=t.explanation),s.forEach(((t,n)=>{const{content:s,explanation:l,offset:a,...u}=t[e][r];o.variants[i[n].color]=u})),o})))),l=r[0].state?new _n(Object.fromEntries(r.map((t=>[t.theme,t.state?.getInternalStack(t.theme)]))),r[0].state.lang):void 0;return l&&Dn(o,l),o}function ni(t,e,n){let i,r,s,o,l,a;if("themes"in n){const{defaultColor:u="light",cssVariablePrefix:c="--shiki-"}=n,p=Object.entries(n.themes).filter((t=>t[1])).map((t=>({color:t[0],theme:t[1]}))).sort(((t,e)=>t.color===u?-1:e.color===u?1:0));if(0===p.length)throw new m("`themes` option must not be empty");const h=ei(t,e,n);if(a=En(h),u&&!p.find((t=>t.color===u)))throw new m(`\`themes\` option must contain the defaultColor key \`${u}\``);const d=p.map((e=>t.getTheme(e.theme))),f=p.map((t=>t.color));s=h.map((t=>t.map((t=>function(t,e,n,i){const r={content:t.content,explanation:t.explanation,offset:t.offset},s=e.map((e=>Mn(t.variants[e]))),o=new Set(s.flatMap((t=>Object.keys(t)))),l={};return s.forEach(((t,r)=>{for(const s of o){const o=t[s]||"inherit";if(0===r&&i)l[s]=o;else{const t="color"===s?"":"background-color"===s?"-bg":`-${s}`,i=n+e[r]+("color"===s?"":t);l[i]=o}}})),r.htmlStyle=l,r}(t,f,c,u))))),a&&Dn(s,a);const g=p.map((t=>Ln(t.theme,n)));r=p.map(((t,e)=>(0===e&&u?"":`${c+t.color}:`)+(Tn(d[e].fg,g[e])||"inherit"))).join(";"),i=p.map(((t,e)=>(0===e&&u?"":`${c+t.color}-bg:`)+(Tn(d[e].bg,g[e])||"inherit"))).join(";"),o=`shiki-themes ${d.map((t=>t.name)).join(" ")}`,l=u?void 0:[r,i].join(";")}else{if(!("theme"in n))throw new m("Invalid options, either `theme` or `themes` must be provided");{const l=Ln(n.theme,n);s=Kn(t,e,n);const u=t.getTheme(n.theme);i=Tn(u.bg,l),r=Tn(u.fg,l),o=u.name,a=En(s)}}return{tokens:s,fg:r,bg:i,themeName:o,rootStyle:l,grammarState:a}}function ii(t,e,n,i={meta:{},options:n,codeToHast:(e,n)=>ii(t,e,n),codeToTokens:(e,n)=>ni(t,e,n)}){let r=e;for(const t of Gn(n))r=t.preprocess?.call(i,r,n)||r;let{tokens:s,fg:o,bg:l,themeName:a,rootStyle:u,grammarState:c}=ni(t,r,n);const{mergeWhitespaces:m=!0}=n;!0===m?s=function(t){return t.map((t=>{const e=[];let n="",i=0;return t.forEach(((r,s)=>{const o=!(r.fontStyle&&r.fontStyle&z.Underline);o&&r.content.match(/^\s+$/)&&t[s+1]?(i||(i=r.offset),n+=r.content):n?(o?e.push({...r,offset:i,content:n+r.content}):e.push({content:n,offset:i},r),i=0,n=""):e.push(r)})),e}))}(s):"never"===m&&(s=function(t){return t.map((t=>t.flatMap((t=>{if(t.content.match(/^\s+$/))return t;const e=t.content.match(/^(\s*)(.*?)(\s*)$/);if(!e)return t;const[,n,i,r]=e;if(!n&&!r)return t;const s=[{...t,offset:t.offset+n.length,content:i}];return n&&s.unshift({content:n,offset:t.offset}),r&&s.push({content:r,offset:t.offset+n.length+i.length}),s}))))}(s));const p={...i,get source(){return r}};for(const t of Gn(n))s=t.tokens?.call(p,s)||s;return function(t,e,n,i=En(t)){const r=Gn(e),s=[],o={type:"root",children:[]},{structure:l="classic",tabindex:a="0"}=e;let u={type:"element",tagName:"pre",properties:{class:`shiki ${e.themeName||""}`,style:e.rootStyle||`background-color:${e.bg};color:${e.fg}`,...!1!==a&&null!=a?{tabindex:a.toString()}:{},...Object.fromEntries(Array.from(Object.entries(e.meta||{})).filter((([t])=>!t.startsWith("_"))))},children:[]},c={type:"element",tagName:"code",properties:{},children:s};const m=[],p={...n,structure:l,addClassToHast:Cn,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return o},get pre(){return u},get code(){return c},get lines(){return m}};if(t.forEach(((t,e)=>{e&&("inline"===l?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===l&&s.push({type:"text",value:"\n"}));let n={type:"element",tagName:"span",properties:{class:"line"},children:[]},i=0;for(const s of t){let t={type:"element",tagName:"span",properties:{...s.htmlAttrs},children:[{type:"text",value:s.content}]};s.htmlStyle;const a=On(s.htmlStyle||Mn(s));a&&(t.properties.style=a);for(const o of r)t=o?.span?.call(p,t,e+1,i,n,s)||t;"inline"===l?o.children.push(t):"classic"===l&&n.children.push(t),i+=s.content.length}if("classic"===l){for(const t of r)n=t?.line?.call(p,n,e+1)||n;m.push(n),s.push(n)}})),"classic"===l){for(const t of r)c=t?.code?.call(p,c)||c;u.children.push(c);for(const t of r)u=t?.pre?.call(p,u)||u;o.children.push(u)}let h=o;for(const t of r)h=t?.root?.call(p,h)||h;i&&Dn(h,i);return h}(s,{...n,fg:o,bg:l,themeName:a,rootStyle:u},p,c)}function ri(t,e,n){const i={meta:{},options:n,codeToHast:(e,n)=>ii(t,e,n),codeToTokens:(e,n)=>ni(t,e,n)};let r=function(t,e){const n=e||fn,i=n.quote||'"',r='"'===i?"'":'"';if('"'!==i&&"'"!==i)throw new Error("Invalid quote `"+i+"`, expected `'` or `\"`");return{one:bn,all:wn,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||Ht,characterReferences:n.characterReferences||gn,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:"svg"===n.space?xe:Se,quote:i,alternative:r}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}(ii(t,e,n,i));for(const t of Gn(n))r=t.postprocess?.call(i,r,n)||r;return r}const si="#333333",oi="#bbbbbb",li="#fffffe",ai="#1e1e1e",ui="__shiki_resolved";function ci(t){if(t?.[ui])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:i}=e;if(!n||!i){const t=e.settings?e.settings.find((t=>!t.name&&!t.scope)):void 0;t?.settings?.foreground&&(i=t.settings.foreground),t?.settings?.background&&(n=t.settings.background),!i&&e?.colors?.["editor.foreground"]&&(i=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),i||(i="light"===e.type?si:oi),n||(n="light"===e.type?li:ai),e.fg=i,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let r=0;const s=new Map;function o(t){if(s.has(t))return s.get(t);r+=1;const n=`#${r.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${n}`]?o(t):(s.set(t,n),n)}e.settings=e.settings.map((t=>{const n=t.settings?.foreground&&!t.settings.foreground.startsWith("#"),i=t.settings?.background&&!t.settings.background.startsWith("#");if(!n&&!i)return t;const r={...t,settings:{...t.settings}};if(n){const n=o(t.settings.foreground);e.colorReplacements[n]=t.settings.foreground,r.settings.foreground=n}if(i){const n=o(t.settings.background);e.colorReplacements[n]=t.settings.background,r.settings.background=n}return r}));for(const t of Object.keys(e.colors||{}))if(("editor.foreground"===t||"editor.background"===t||t.startsWith("terminal.ansi"))&&!e.colors[t]?.startsWith("#")){const n=o(e.colors[t]);e.colorReplacements[n]=e.colors[t],e.colors[t]=n}return Object.defineProperty(e,ui,{enumerable:!1,writable:!1,value:!0}),e}async function mi(t){return Array.from(new Set((await Promise.all(t.filter((t=>!jn(t))).map((async t=>await An(t).then((t=>Array.isArray(t)?t:[t])))))).flat()))}async function pi(t){return(await Promise.all(t.map((async t=>xn(t)?null:ci(await An(t)))))).filter((t=>!!t))}class hi extends zt{constructor(t,e,n,i={}){super(t),this._resolver=t,this._themes=e,this._langs=n,this._alias=i,this._themes.map((t=>this.loadTheme(t))),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(t){return"string"==typeof t?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const e=ci(t);return e.name&&(this._resolvedThemes.set(e.name,e),this._loadedThemesCache=null),e}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let e=this._textmateThemeCache.get(t);e||(e=$.createFromRawTheme(t),this._textmateThemeCache.set(t,e)),this._syncRegistry.setTheme(e)}getGrammar(t){if(this._alias[t]){const e=new Set([t]);for(;this._alias[t];){if(t=this._alias[t],e.has(t))throw new Pn(`Circular alias \`${Array.from(e).join(" -> ")} -> ${t}\``);e.add(t)}}return this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const e=new Set([...this._langMap.values()].filter((e=>e.embeddedLangsLazy?.includes(t.name))));this._resolver.addLanguage(t);const n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const i=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(i.name=t.name,this._resolvedGrammars.set(t.name,i),t.aliases&&t.aliases.forEach((e=>{this._alias[e]=t.name})),this._loadedLanguagesCache=null,e.size)for(const t of e)this._resolvedGrammars.delete(t.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(t.scopeName),this._syncRegistry?._grammars?.delete(t.scopeName),this.loadLanguage(this._langMap.get(t.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const e of t)this.resolveEmbeddedLanguages(e);const e=Array.from(this._langGraph.entries()),n=e.filter((([t,e])=>!e));if(n.length){const t=e.filter((([t,e])=>e&&e.embeddedLangs?.some((t=>n.map((([t])=>t)).includes(t))))).filter((t=>!n.includes(t)));throw new Pn(`Missing languages ${n.map((([t])=>`\`${t}\``)).join(", ")}, required by ${t.map((([t])=>`\`${t}\``)).join(", ")}`)}for(const[t,n]of e)this._resolver.addLanguage(n);for(const[t,n]of e)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){if(this._langMap.set(t.name,t),this._langGraph.set(t.name,t),t.embeddedLangs)for(const e of t.embeddedLangs)this._langGraph.set(e,this._langMap.get(e))}}class di{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,e){this._onigLib={createOnigScanner:e=>t.createScanner(e),createOnigString:e=>t.createString(e)},e.forEach((t=>this.addLanguage(t)))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach((e=>{this._langs.set(e,t)})),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach((e=>{this._injections.get(e)||this._injections.set(e,[]),this._injections.get(e).push(t.scopeName)}))}getInjections(t){const e=t.split(".");let n=[];for(let t=1;t<=e.length;t++){const i=e.slice(0,t).join(".");n=[...n,...this._injections.get(i)||[]]}return n}}let fi=0;async function gi(t={}){t.loadWasm;const[e,n,i]=await Promise.all([pi(t.themes||[]),mi(t.langs||[]),t.engine||A(t.loadWasm||void 0)]);return function(t){fi+=1,!1!==t.warnings&&fi>=10&&fi%10==0&&console.warn(`[Shiki] ${fi} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new Pn("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),i=(t.themes||[]).flat(1).map(ci),r=new di(t.engine,n),s=new hi(r,i,n,t.langAlias);let o;function l(t){if("none"===t)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};c();const e=s.getTheme(t);if(!e)throw new Pn(`Theme \`${t}\` not found, you may need to load it first`);return e}function a(...t){c(),s.loadLanguages(t.flat(1))}function u(...t){c();for(const e of t.flat(1))s.loadTheme(e)}function c(){if(e)throw new Pn("Shiki instance has been disposed")}function m(){e||(e=!0,s.dispose(),fi-=1)}return{setTheme:function(t){c();const e=l(t);return o!==t&&(s.setTheme(e),o=t),{theme:e,colorMap:s.getColorMap()}},getTheme:l,getLanguage:function(t){c();const e=s.getGrammar("string"==typeof t?t:t.name);if(!e)throw new Pn(`Language \`${t}\` not found, you may need to load it first`);return e},getLoadedThemes:function(){return c(),s.getLoadedThemes()},getLoadedLanguages:function(){return c(),s.getLoadedLanguages()},loadLanguage:async function(...t){return a(await mi(t))},loadLanguageSync:a,loadTheme:async function(...t){return c(),u(await pi(t))},loadThemeSync:u,dispose:m,[Symbol.dispose]:m}}({...t,loadWasm:void 0,themes:e,langs:n,engine:i})}async function yi(t={}){const e=await gi(t);return{getLastGrammarState:(...t)=>function(...t){if(2===t.length)return En(t[1]);const[e,n,i={}]=t,{lang:r="text",theme:s=e.getLoadedThemes()[0]}=i;if(vn(r)||Sn(s))throw new m("Plain language does not have grammar state");if("ansi"===r)throw new m("ANSI language does not have grammar state");const{theme:o,colorMap:l}=e.setTheme(s),a=e.getLanguage(r);return new _n(Xn(n,a,o,l,i).stateStack,a.name,o.name)}(e,...t),codeToTokensBase:(t,n)=>Kn(e,t,n),codeToTokensWithThemes:(t,n)=>ei(e,t,n),codeToTokens:(t,n)=>ni(e,t,n),codeToHast:(t,n)=>ii(e,t,n),codeToHtml:(t,n)=>ri(e,t,n),...e,getInternalContext:()=>e}}function bi(t,e,n){let i,r,s;if(e)i=t,r=e,s=()=>A(n);else{const e=t;i=e.langs,r=e.themes,s=e.engine}return async function(t){function e(t){if("string"==typeof t){if(jn(t))return[];const e=i[t];if(!e)throw new m(`Language \`${t}\` is not included in this bundle. You may want to load it from external source.`);return e}return t}function n(t){if(xn(t))return"none";if("string"==typeof t){const e=r[t];if(!e)throw new m(`Theme \`${t}\` is not included in this bundle. You may want to load it from external source.`);return e}return t}const o=(t.themes??[]).map((t=>n(t))),l=(t.langs??[]).map((t=>e(t))),a=await yi({engine:t.engine??s(),...t,themes:o,langs:l});return{...a,loadLanguage:(...t)=>a.loadLanguage(...t.map(e)),loadTheme:(...t)=>a.loadTheme(...t.map(n))}}}const wi=bi({langs:a,themes:c,engine:()=>A(import("../wasm-aabb0cac.esm.js"))});let ki=class extends o{constructor(){super(...arguments),this.code="",this.language="javascript",this.theme="min-light",this.highlightedCode=""}static get styles(){return[s]}async updated(t){(t.has("language")||t.has("theme"))&&await this.updateHighlighter(),(t.has("code")||t.has("language")||t.has("theme"))&&await this.updateHighlightedCode()}render(){return e`
|
2
2
|
<div class="code-container" .innerHTML=${this.highlightedCode}></div>
|
3
3
|
`}async updateHighlighter(){this.highlighter=await wi({themes:[this.theme],langs:[this.language]})}async updateHighlightedCode(){this.highlightedCode=await this.highlighter.codeToHtml(this.code,{lang:this.language,theme:this.theme})}};t([n({type:String})],ki.prototype,"code",void 0),t([n({type:String,reflect:!0})],ki.prototype,"language",void 0),t([n({type:String,reflect:!0})],ki.prototype,"theme",void 0),t([i()],ki.prototype,"highlightedCode",void 0),ki=t([r("nile-highlighter")],ki);export{ki as N};
|