diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index a78447eb..00000000 --- a/.editorconfig +++ /dev/null @@ -1,7 +0,0 @@ -[*] -charset = utf-8 -insert_final_newline = true -end_of_line = lf -indent_style = space -indent_size = 2 -max_line_length = 80 \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json index 9afc83b3..d5f17819 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,19 +1,7 @@ { - "env": { - "browser": true, - "es2021": true - }, - "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"], - "overrides": [], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "plugins": ["@typescript-eslint"], + "extends": ["next/core-web-vitals", "plugin:storybook/recommended"], "rules": { - "semi": ["error", "always"], - "quotes": ["warn", "double"] - }, - "ignorePatterns": ["node_modules", "**/build"] + "react/no-unescaped-entities": "off", + "@next/next/no-img-element": "off" + } } diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 160740ee..ede024c0 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,10 +1,9 @@ --- name: Bug report about: Create a report to help us improve -title: '' +title: "" labels: bug -assignees: '' - +assignees: "" --- **Describe the bug** @@ -12,6 +11,7 @@ A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 11fc491e..d883b8f2 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,10 +1,9 @@ --- name: Feature request about: Suggest an idea for this project -title: '' +title: "" labels: enhancement -assignees: '' - +assignees: "" --- **Is your feature request related to a problem? Please describe.** diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 8a2fdc45..6c5aaea2 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,7 +1,9 @@ ## Description + Please include a summary of the change and which issue is fixed. ## Type of change + Please delete options that are not relevant. - [ ] Bug fix (non-breaking change which fixes an issue) @@ -10,6 +12,7 @@ Please delete options that are not relevant. - [ ] This change requires a documentation update ## Checklist: + - [ ] My code follows the style and structure of this project - [ ] My code follows the principles of clean code - [ ] My changes generate no new warnings, bugs or errors diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 9902accf..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,9 +0,0 @@ -version: 2 -updates: - # Enable version updates for npm - - package-ecosystem: "npm" - directory: "/" - schedule: - interval: "weekly" - time: "12:00" - open-pull-requests-limit: 10 diff --git a/.gitignore b/.gitignore index ce79801e..f74cb832 100644 --- a/.gitignore +++ b/.gitignore @@ -1,31 +1,50 @@ -### VS Code ### -.vscode/ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. -### Dependencies ### +# dependencies /node_modules /.pnp .pnp.js -### Production ### -/dist +# testing +/coverage + +# next.js +/.next/ +/out/ -### Misc ### +# production +/build + +# misc .DS_Store +*.pem .env .env.local .env.development.local .env.test.local .env.production.local -### Log ### +# debug npm-debug.log* yarn-debug.log* yarn-error.log* -### Vite ### -/coverage -/lib-cov -.vite-node +# local env files +.env*.local + +# vercel +.vercel -### Other ### -test.svg +# typescript +*.tsbuildinfo +next-env.d.ts + +# editors +.vscode/ +.vs/ +.idea/ + +# log +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/.husky/pre-commit b/.husky/pre-commit index b0bc6b50..57fd229e 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,5 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -npx lint-staged -q +npm run lint +npm run format diff --git a/.lintstagedrc.json b/.lintstagedrc.json deleted file mode 100644 index 2070daf8..00000000 --- a/.lintstagedrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "*.{ts,tsx}": ["eslint src/** --fix", "prettier --write ."], - "*.{json,md}": "prettier --write ." -} diff --git a/.prettierignore b/.prettierignore index ef4ac963..f1fdd888 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,7 +1,7 @@ -.github build dist node_modules -README.md -coverage -client/build +.next +out +package.json +package-lock.json \ No newline at end of file diff --git a/.prettierrc.json b/.prettierrc.json index 2270a24a..be8baf39 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -3,6 +3,6 @@ "tabWidth": 2, "semi": true, "singleQuote": false, - "endOfLine": "lf", + "endOfLine": "crlf", "printWidth": 80 } diff --git a/.storybook/main.ts b/.storybook/main.ts new file mode 100644 index 00000000..98917b37 --- /dev/null +++ b/.storybook/main.ts @@ -0,0 +1,27 @@ +import type { StorybookConfig } from "@storybook/nextjs"; + +const config: StorybookConfig = { + stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"], + addons: [ + "@storybook/addon-links", + "@storybook/addon-essentials", + "@storybook/addon-interactions", + { + name: "@storybook/addon-styling", + options: { + // Check out https://github.com/storybookjs/addon-styling/blob/main/docs/api.md + // For more details on this addon's options. + postCss: true, + }, + }, + ], + framework: { + name: "@storybook/nextjs", + options: {}, + }, + docs: { + autodocs: "tag", + }, +}; + +export default config; diff --git a/.storybook/preview.ts b/.storybook/preview.ts new file mode 100644 index 00000000..ef154b03 --- /dev/null +++ b/.storybook/preview.ts @@ -0,0 +1,25 @@ +import "../src/app/globals.css"; +import type { Preview } from "@storybook/react"; + +const preview: Preview = { + parameters: { + actions: { argTypesRegex: "^on[A-Z].*" }, + controls: { + matchers: { + color: /(background|color)$/i, + date: /Date$/, + }, + }, + backgrounds: { + default: "github", + values: [ + { + name: "github", + value: "#0d1117", + }, + ], + }, + }, +}; + +export default preview; diff --git a/.vercelignore b/.vercelignore new file mode 100644 index 00000000..5308e498 --- /dev/null +++ b/.vercelignore @@ -0,0 +1,7 @@ +.github +.husky +node_modules +\*\*/.gitkeep +docs +scripts +\*.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 39aa68cc..4eaf6040 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing -First of all, thanks for taking the time to contribute! Every contribution is welcomed. +First of all, thank you for taking the time to contribute! Every contribution is appreciated. Reading and following these guidelines will help us make the contribution process easy and effective for everyone involved. - [Contributing](#contributing) @@ -8,7 +8,7 @@ Reading and following these guidelines will help us make the contribution proces - [Ways of contributing](#ways-of-contributing) - [Issues](#issues) - [Found a bug?](#found-a-bug) - - [Feature request, suggestion](#feature-request-suggestion) + - [Feature Request, Suggestion](#feature-request-suggestion) - [Pull Request](#pull-request) - [Other ways](#other-ways) - [General information](#general-information) @@ -17,43 +17,43 @@ Reading and following these guidelines will help us make the contribution proces ## Code of Conduct -By participating and contributing to this project, you agree to uphold our [Code of Conduct](CODE_OF_CONDUCT.md). +By participating and contributing to this project, you agree to abide by our [Code of Conduct](CODE_OF_CONDUCT.md).
## Ways of contributing -Contributions are made to this repository via **Issues** and **Pull Requests**. +Contributions to this repository are made via **Issues** and **Pull Requests**. ### Issues #### Found a bug? -Open an issue, where you describe the bug and explain how it occurred. -Please, use an issue template, it guides you on how you should write your issue. +Open a new issue describing the bug and how it occurred. +Please use an issue template, it will guide you on how to write your issue. -#### Feature request, suggestion +#### Feature Request, Suggestion -Here, you should use one of our issue templates as well. -If you want to work on your suggestion as well, please, open an issue before you start working, so we know about it. +Again, you should use one of our issue templates. +If you want to work on your suggestion as well, please open an issue before you start working on it, so we know about it. ### Pull Request -If there's an issue you want to fix or develop, or you opened an issue as a feature request and want to work on the solution: +If there's an issue you want to fix or develop, or if you've submitted an issue as a feature request and want to work on the solution: 1. Fork this repository 2. Clone your fork 3. Start working on your changes 4. Commit and push your changes -5. Open a Pull Request with the changes you made +5. Open a Pull Request with your changes ### Other ways -If you currently don't have any ideas in mind but want to support the project: +If you don't have any ideas yet, but want to support the project: 1. Add a GitHub star to this project 2. Tweet about the project -3. Write a review or a blog article about the project +3. Write a review or blog post about the project
diff --git a/LICENSE b/LICENSE index f28b16e2..da0fe8e6 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 OlivΓ©r +Copyright (c) 2023 OlivΓ©r Mrakovics Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/README.md b/README.md index 3dc4e68d..c93d6eef 100644 --- a/README.md +++ b/README.md @@ -1,150 +1,91 @@
-

GitHub Readme Tech Stack

-
- -
- - Request Feature - - - Report Bug - - - Demo Website - - - Tweet - -
- -
- Display your favorite technologies, tools, or the tech stack your project uses with these fully customizable, good-looking cards on your GitHub README! -
- -
- -
- - Stars - - - Contributors - - - Version + + GitHub Readme Tech Stack
-
-
- - - + Show off your favorite technologies and tools by using these cards in your GitHub README.

## ⚑ Quick Start -The easiest way to start using these cards is to visit our website, where you can customize your card with a live preview. -[https://github-readme-tech-stack.vercel.app](https://github-readme-tech-stack.vercel.app) - -

- tutorial -

-
+The easiest way to get started is to visit our website, where you can customize and preview your card live. +[https://github-readme-tech-stack.vercel.app](https://github-readme-tech-stack.vercel.app) -## πŸ”§ Query parameters -None of the fields are required. Every query parameter has a default value displayed below. - -| Parameter | Example | Default value | Description | -|---------- |---------|---------------|------------ | -| **title** | `?title=My%20Title` | My Tech Stack | The title of the card. `%20` can be used as a space. | -| **theme** | `?theme=github_dark` | github | The theme of the card. You can browse between the themes [here](docs/THEMES.md). | -| **align** | `?align=center` | left | The alignment of the badges. (`left`, `center`, `right`) | -| **titleAlign** | `?align=center` | left | The alignment of the title. (`left`, `center`, `right`) | -| **showBorder** | `?showBorder=false` | true | Display the border around the card or not. (`true`, `false`) | -| **hideTitle** | `?hideTitle=true` | false | Display the title of the card or not. (`true`, `false`) | -| **hideBg** | `?hideBg=true` | false | If true, sets the background to transparent. (`true`, `false`) | -| **borderRadius** | `?borderRadius=12.5` | 4.5 | Number between 0 and 50. | -| **fontFamily** | `?fontFamily=consolas` | Segoe UI | The font family of the title. If the specified family doesn't exist, the default is used. | -| **fontSize** | `?fontSize=20` | 18 | The size of the title. Accepts a number between 15 and 30. | -| **fontWeight** | `?fontWeight=normal` | semibold | The thickness of the title. (`thin`, `normal`, `semibold`, `bold`) | -| **width** | `?width=500` | 495 | The width of the card. Accepts a valid number. | -| **gap** | `?gap=15` | 10 | The gap between the badges. Accepts a number between 0 and 30. | -| **lineHeight** | `?lineHeight=10` | 7 | The gap between the lines. Accepts a number between 0 and 30. | -| **lineCount** | `?lineCount=2` | 1 | The number of lines you want to add to your card. | -| **line{n}** | `?line1=html5,html5,auto` | - | The current line of the badge, where {n} is a number. *`(1 <= n <= lineCount)`* | +
-## πŸͺ Themes -These cards come with several built-in themes you can use. You can find all of them by clicking [here](docs/THEMES.md). -If you have a cool new theme in mind, or add one for yourself and others, please check [#45](https://github.com/0l1v3rr/github-readme-tech-stack/issues/45) +## ❓ Why? -### πŸ–Œ Customizing a theme -You can customize a theme using these query parameters. -These parameters accept only valid hexadecimal colors, otherwise, they are not applied. Please use `%23` instead of `#`. +As a developer, it's important to showcase your expertise in different technologies to potential collaborators and employers. With **github-readme-tech-stack**, you can easily create a visual representation of the technologies used in your GitHub repository and include it in your **profile README**. This can help you stand out and attract the attention of others who are looking for developers with specific skill sets. -> **Warning** -> If the `?theme=` parameter is specified, any of these color customizations will override the theme's values. +The images are fully customizable, so you can choose the technologies you want to showcase and even adjust the colors, icons, and the alignment to match your personal brand. -| Parameter | Example | Description | -|-----------|---------|-------------| -| **bg** | `?bg=%2383324c` | The color of the background. | -| **border** | `?border=%232da7c7` | The color of the border. | -| **badge** | `?badge=%2383324c` | The color of the badges. | -| **titleColor** | `?titleColor=%232da7c7` | The color of the title. | +Personally, I've always wanted to show off my skills in a clean and modern way. I could do that with just the badges, but they didn't match the style of [github-readme-streak-stats](https://github.com/DenverCoder1/github-readme-streak-stats) and [github-readme-stats](https://github.com/anuraghazra/github-readme-stats). With **github-readme-tech-stack**, that's no longer a problem, it naturally matches those cards!
-## ❗ Important -- We suggest you not put too many badges inside one card, because the loading time can be too slow, and it can overflow the 15s limit, which results in a card that's not displayed. The maximum amount of badges inside one card should be around 16. If you want to display more, do it in two or three cards. -- If you use our [Demo Website](https://github-readme-tech-stack.vercel.app) to generate and customize your card, and it displays an empty screen, it's because your browser cached the previously deployed names of the JS bundles. In order to resolve this issue, clear your browser's cache or open the site in incognito mode. -- The cards display [shields.io](https://shields.io/) badges. You can browse between the choosable icons [here](https://simpleicons.org/). +## πŸ‘‰ Features + +- **Easy to use:** Creating a Tech Stack image is as simple as adding a markdown tag to your `profile README`. +- **Demo website:** github-readme-tech-stack has a demo website, where you can build your own card with no effort. +- **Customizable:** Choose the technologies you want to showcase and customize the colors and icons to match your personal brand. +- **Custom icons:** You can even upload and use your **own** `svg` icons if they don't already exist. +- **Multiple themes:** These cards come with several pre-made themes that you can use. However, if none of the themes suits your style, you can easily create your **own**! +- **Badges:** github-readme-tech-stack uses [shields.io](https://shields.io/) badges and [simple-icons](https://simpleicons.org/) under the hood. +- **Style:** github-readme-tech-stack is designed to match the style of [github-readme-streak-stats](https://github.com/DenverCoder1/github-readme-streak-stats), [github-readme-stats](https://github.com/anuraghazra/github-readme-stats) and many other cool tools.
-## 🧠 Tips +## πŸ”§ Query parameters -### πŸͺ’ Align the card in the markdown -If you're using markdown, you may want to align your cards. There's an easy way to do it with the align attribute: -```html -My Tech Stack -``` +None of the fields are required. Each query parameter has a default value, which is listed below. + +
+What are the available query params? + +| Parameter | Example | Default value | Description | +| ---------------- | ------------------------ | ------------- | ----------------------------------------------------------------------------------------- | +| **title** | `title=My%20Title` | My Tech Stack | The title of the card. `%20` can be used as a space. | +| **theme** | `theme=github_dark` | github | The theme of the card. You can browse between the themes [here](docs/THEMES.md). | +| **align** | `align=center` | left | The alignment of the badges. (`left`, `center`, `right`) | +| **titleAlign** | `align=center` | left | The alignment of the title. (`left`, `center`, `right`) | +| **showBorder** | `showBorder=false` | true | Display the border around the card or not. (`true`, `false`) | +| **hideTitle** | `hideTitle=true` | false | Display the title of the card or not. (`true`, `false`) | +| **hideBg** | `hideBg=true` | false | If true, sets the background to transparent. (`true`, `false`) | +| **borderRadius** | `borderRadius=12.5` | 4.5 | Number between 0 and 50. | +| **fontFamily** | `fontFamily=consolas` | Segoe UI | The font family of the title. If the specified family doesn't exist, the default is used. | +| **fontSize** | `fontSize=20` | 18 | The size of the title. Accepts a number between 15 and 30. | +| **fontWeight** | `fontWeight=normal` | semibold | The thickness of the title. (`thin`, `normal`, `semibold`, `bold`) | +| **width** | `width=500` | 495 | The width of the card. Accepts a valid number. | +| **gap** | `gap=15` | 10 | The gap between the badges. Accepts a number between 0 and 30. | +| **lineHeight** | `lineHeight=10` | 7 | The gap between the lines. Accepts a number between 0 and 30. | +| **lineCount** | `lineCount=2` | 1 | The number of lines you want to add to your card. | +| **line{n}** | `line1=html5,html5,auto` | - | The current line of the badge, where {n} is a number. _`(1 <= n <= lineCount)`_ | +| **bg** | `bg=%2383324c` | - | The color of the background. | +| **border** | `border=%232da7c7` | - | The color of the border. | +| **badge** | `badge=%2383324c` | - | The color of the badges. | +| **titleColor** | `titleColor=%232da7c7` | - | The color of the title. | + +
-### πŸ“š GitHub's media feature -You can use [GitHub's new feature](https://github.blog/changelog/2022-05-19-specify-theme-context-for-images-in-markdown-beta/) to specify whether to display images for light or dark mode users. - -```html - - - - - -``` +
-### 🎭 Adding custom SVG logo -We support this using [Base64](https://en.wikipedia.org/wiki/Base64) format. -**[\*](https://stackoverflow.com/questions/38985050/how-do-i-use-the-logo-option-in-shields-io-badges) Here's an easy 3-step guide:** -1. Download the SVG and use one of the many online tools, e.g. [http://b64.io/](http://b64.io/), to encode it. -2. Encode the Base64 string in [percent-encoding](https://en.wikipedia.org/wiki/Percent-encoding). Take the Base64 string and use one of the many online tools, e.g. [http://meyerweb.com/eric/tools/dencoder/](http://meyerweb.com/eric/tools/dencoder/), to encode the string. -3. Finally, replace the first element of a badge (the `logoName`) with this string inside the URL. (`,typescript,2D79C7;`) +## πŸͺ Themes + +These cards come with several built-in themes that you can use. You can find them all by clicking [here](docs/THEMES.md). +You can also customize the themes. It's easier to do with the [demo website](#⚑-quick-start).
## βš’οΈ Building from source -If you don't have NodeJS, [download and install it](https://nodejs.org/en/). -Then open a terminal and type these commands: -**Backend:** ```sh # Clone the project: git clone https://github.com/0l1v3rr/github-readme-tech-stack.git @@ -154,31 +95,25 @@ cd github-readme-tech-stack npm i npm run prepare -# Run the application: +# Running the application: npm run dev -``` -**Frontend:** -```sh -cd client - -# Install the dependencies: -npm i - -# Run the application: -npm start +# Running the storybook: +npm run storybook ```
## πŸ§‘β€πŸ€β€πŸ§‘ Contributing -Every contribution is welcomed. + +All contributions are welcome. You can find a contributing guideline [here](CONTRIBUTING.md). -This project is licensed under the [MIT License](LICENSE). +This project is released under the [MIT License](LICENSE).
## πŸ’‘ Inspiration + - [github-readme-streak-stats](https://github.com/DenverCoder1/github-readme-streak-stats) - [github-readme-stats](https://github.com/anuraghazra/github-readme-stats) - [github-profile-summary-cards](https://github.com/vn7n24fzkq/github-profile-summary-cards) diff --git a/SECURITY.md b/SECURITY.md index 4e0c2fb9..8f2c3834 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,10 +4,8 @@ | Version | Supported | | ------- | ------------------ | -| 1.3.x | :white_check_mark: | -| 1.2.x | :white_check_mark: | -| 1.1.x | :white_check_mark: | -| < 1.1.0 | :x: | +| 2.x.x | :white_check_mark: | +| 1.x.x | :x: | ## Reporting a Vulnerability diff --git a/client/.gitignore b/client/.gitignore deleted file mode 100644 index 89967363..00000000 --- a/client/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/client/build/asset-manifest.json b/client/build/asset-manifest.json deleted file mode 100644 index 6d724785..00000000 --- a/client/build/asset-manifest.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "files": { - "main.css": "/static/css/main.92a0c7f7.css", - "main.js": "/static/js/main.dce67da4.js", - "index.html": "/index.html", - "main.92a0c7f7.css.map": "/static/css/main.92a0c7f7.css.map", - "main.dce67da4.js.map": "/static/js/main.dce67da4.js.map" - }, - "entrypoints": [ - "static/css/main.92a0c7f7.css", - "static/js/main.dce67da4.js" - ] -} \ No newline at end of file diff --git a/client/build/favicon.ico b/client/build/favicon.ico deleted file mode 100644 index a11777cc..00000000 Binary files a/client/build/favicon.ico and /dev/null differ diff --git a/client/build/index.html b/client/build/index.html deleted file mode 100644 index eb8ebe24..00000000 --- a/client/build/index.html +++ /dev/null @@ -1,5 +0,0 @@ -GitHub Readme Tech Stack
\ No newline at end of file diff --git a/client/build/robots.txt b/client/build/robots.txt deleted file mode 100644 index e9e57dc4..00000000 --- a/client/build/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * -Disallow: diff --git a/client/build/static/css/main.92a0c7f7.css b/client/build/static/css/main.92a0c7f7.css deleted file mode 100644 index 18ef6024..00000000 --- a/client/build/static/css/main.92a0c7f7.css +++ /dev/null @@ -1,4 +0,0 @@ -/* -! tailwindcss v3.2.4 | MIT License | https://tailwindcss.com -*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;-webkit-font-feature-settings:normal;font-feature-settings:normal;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::-webkit-scrollbar{height:.75rem;width:.75rem}::-webkit-scrollbar-track{--tw-bg-opacity:1;background-color:rgb(33 38 45/var(--tw-bg-opacity))}::-webkit-scrollbar-thumb{--tw-bg-opacity:1;background-clip:content-box;background-color:rgb(54 59 66/var(--tw-bg-opacity));border:3px solid transparent;border-radius:.375rem;transition-duration:.15s;-webkit-transition-property:all;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}body{--tw-bg-opacity:1;background-color:rgb(13 17 23/var(--tw-bg-opacity))}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.left-1\/2{left:50%}.-top-7{top:-1.75rem}.top-16{top:4rem}.left-0{left:0}.top-0{top:0}.top-1\/2{top:50%}.right-5{right:1.25rem}.z-50{z-index:50}.z-20{z-index:20}.z-30{z-index:30}.z-10{z-index:10}.m-4{margin:1rem}.mx-4{margin-left:1rem;margin-right:1rem}.my-4{margin-bottom:1rem;margin-top:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-bottom:.5rem;margin-top:.5rem}.my-3{margin-bottom:.75rem;margin-top:.75rem}.mt-6{margin-top:1.5rem}.mt-5{margin-top:1.25rem}.mt-4{margin-top:1rem}.mt-2{margin-top:.5rem}.ml-auto{margin-left:auto}.mb-1{margin-bottom:.25rem}.mt-1{margin-top:.25rem}.block{display:block}.flex{display:flex}.hidden{display:none}.h-\[\.8px\]{height:.8px}.h-8{height:2rem}.h-4{height:1rem}.h-fit{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.h-screen{height:100vh}.max-h-48{max-height:12rem}.max-h-\[95vh\]{max-height:95vh}.min-h-screen{min-height:100vh}.w-full{width:100%}.w-\[95\%\]{width:95%}.w-fit{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.w-10{width:2.5rem}.w-4{width:1rem}.w-screen{width:100vw}.min-w-\[10rem\]{min-width:10rem}.-translate-x-1\/2{--tw-translate-x:-50%}.-translate-x-1\/2,.translate-y-1\/4{-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1\/4{--tw-translate-y:25%}.-translate-y-1\/2{--tw-translate-y:-50%}.-translate-y-1\/2,.scale-100{-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x:1;--tw-scale-y:1}.scale-0{--tw-scale-x:0;--tw-scale-y:0}.scale-0,.scale-75{-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-75{--tw-scale-x:.75;--tw-scale-y:.75}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.select-none{-webkit-user-select:none;user-select:none}.select-text{-webkit-user-select:text;user-select:text}.list-none{list-style-type:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-evenly{justify-content:space-evenly}.gap-4{gap:1rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-1{gap:.25rem}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.rounded-md{border-radius:.375rem}.rounded-full{border-radius:9999px}.rounded-2xl{border-radius:1rem}.rounded-tl-md{border-top-left-radius:.375rem}.rounded-bl-md{border-bottom-left-radius:.375rem}.rounded-tr-md{border-top-right-radius:.375rem}.rounded-br-md{border-bottom-right-radius:.375rem}.border{border-width:1px}.border-\[\.25em\]{border-width:.25em}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-gh-border{--tw-border-opacity:1;border-color:rgb(48 54 61/var(--tw-border-opacity))}.border-gh-button-border{--tw-border-opacity:1;border-color:rgb(54 59 66/var(--tw-border-opacity))}.border-gh-green-dark{--tw-border-opacity:1;border-color:rgb(29 89 39/var(--tw-border-opacity))}.border-gh-green-active{--tw-border-opacity:1;border-color:rgb(46 160 67/var(--tw-border-opacity))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.border-gh-bg-secondary{--tw-border-opacity:1;border-color:rgb(22 27 34/var(--tw-border-opacity))}.border-gh-button-border-active{--tw-border-opacity:1;border-color:rgb(139 148 158/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-gh-border-dark{--tw-border-opacity:1;border-color:rgb(33 38 45/var(--tw-border-opacity))}.border-t-gh-text-secondary{--tw-border-opacity:1;border-top-color:rgb(139 148 158/var(--tw-border-opacity))}.bg-gh-bg{--tw-bg-opacity:1;background-color:rgb(13 17 23/var(--tw-bg-opacity))}.bg-gh-border{--tw-bg-opacity:1;background-color:rgb(48 54 61/var(--tw-bg-opacity))}.bg-gh-button{--tw-bg-opacity:1;background-color:rgb(33 38 45/var(--tw-bg-opacity))}.bg-gh-button-active{--tw-bg-opacity:1;background-color:rgb(48 54 61/var(--tw-bg-opacity))}.bg-gh-green{--tw-bg-opacity:1;background-color:rgb(35 134 54/var(--tw-bg-opacity))}.bg-gh-green-dark{--tw-bg-opacity:1;background-color:rgb(29 89 39/var(--tw-bg-opacity))}.bg-gh-bg-secondary{--tw-bg-opacity:1;background-color:rgb(22 27 34/var(--tw-bg-opacity))}.fill-gh-text-secondary{fill:#8b949e}.p-2{padding:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-\[\.45rem\]{padding-bottom:.45rem;padding-top:.45rem}.py-\[\.145rem\]{padding-bottom:.145rem;padding-top:.145rem}.py-\[\.417rem\]{padding-bottom:.417rem;padding-top:.417rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.pb-5{padding-bottom:1.25rem}.pb-2{padding-bottom:.5rem}.pb-1{padding-bottom:.25rem}.pt-\[\.16rem\]{padding-top:.16rem}.pl-\[1\.85rem\]{padding-left:1.85rem}.text-center{text-align:center}.font-dejavu{font-family:DejaVu Sans,sans-serif}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-sm{font-size:.875rem;line-height:1.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-\[\.8rem\]{font-size:.8rem}.text-base{font-size:1rem;line-height:1.5rem}.text-\[\.7rem\]{font-size:.7rem}.text-\[\.75rem\]{font-size:.75rem}.text-2xl{font-size:1.5rem;line-height:2rem}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-none{line-height:1}.tracking-wider{letter-spacing:.05em}.text-gh-yellow{--tw-text-opacity:1;color:rgb(227 179 65/var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.text-gh-text{--tw-text-opacity:1;color:rgb(190 209 217/var(--tw-text-opacity))}.text-gh-text-secondary{--tw-text-opacity:1;color:rgb(139 148 158/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-gh-blue{--tw-text-opacity:1;color:rgb(88 166 255/var(--tw-text-opacity))}.text-gh-border{--tw-text-opacity:1;color:rgb(48 54 61/var(--tw-text-opacity))}.text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity))}.text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity))}.text-gh-green-active{--tw-text-opacity:1;color:rgb(46 160 67/var(--tw-text-opacity))}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.shadow-2xl,.shadow-xl{box-shadow:0 0 #0000,0 0 #0000,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.shadow-3xl{--tw-shadow:0 0 14px 0 rgba(0,0,0,.6);--tw-shadow-colored:0 0 14px 0 var(--tw-shadow-color);box-shadow:0 0 #0000,0 0 #0000,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{-webkit-filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,.transition-all{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-75{transition-duration:75ms}.color-input{-webkit-appearance:none;appearance:none}.color-input::-webkit-color-swatch{border-radius:.125rem;border-width:0}.color-input::-moz-color-swatch{border-radius:.125rem;border-width:0}.placeholder\:text-gh-text-secondary::-webkit-input-placeholder{--tw-text-opacity:1;color:rgb(139 148 158/var(--tw-text-opacity))}.placeholder\:text-gh-text-secondary::placeholder{--tw-text-opacity:1;color:rgb(139 148 158/var(--tw-text-opacity))}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:top-full:before{content:var(--tw-content);top:100%}.before\:left-1\/2:before{content:var(--tw-content);left:50%}.before\:h-2:before{content:var(--tw-content);height:.5rem}.before\:w-2:before{content:var(--tw-content);width:.5rem}.before\:-translate-x-1\/2:before{--tw-translate-x:-50%}.before\:-translate-x-1\/2:before,.before\:-translate-y-1\/2:before{content:var(--tw-content);-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.before\:-translate-y-1\/2:before{--tw-translate-y:-50%}.before\:rotate-45:before{--tw-rotate:45deg;content:var(--tw-content);-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.before\:border-b:before{border-bottom-width:1px;content:var(--tw-content)}.before\:border-r:before{border-right-width:1px;content:var(--tw-content)}.before\:border-solid:before{border-style:solid;content:var(--tw-content)}.before\:border-gh-border:before{--tw-border-opacity:1;border-color:rgb(48 54 61/var(--tw-border-opacity));content:var(--tw-content)}.before\:bg-gh-bg-secondary:before{--tw-bg-opacity:1;background-color:rgb(22 27 34/var(--tw-bg-opacity));content:var(--tw-content)}.before\:content-\[\'\'\]:before{--tw-content:"";content:var(--tw-content)}.hover\:border-gh-button-border-active:hover{--tw-border-opacity:1;border-color:rgb(139 148 158/var(--tw-border-opacity))}.hover\:border-gh-red:hover{--tw-border-opacity:1;border-color:rgb(245 97 64/var(--tw-border-opacity))}.hover\:border-gh-green-active:hover{--tw-border-opacity:1;border-color:rgb(46 160 67/var(--tw-border-opacity))}.hover\:bg-gh-button-active:hover{--tw-bg-opacity:1;background-color:rgb(48 54 61/var(--tw-bg-opacity))}.hover\:bg-gh-green-active:hover{--tw-bg-opacity:1;background-color:rgb(46 160 67/var(--tw-bg-opacity))}.hover\:bg-gh-red:hover{--tw-bg-opacity:1;background-color:rgb(245 97 64/var(--tw-bg-opacity))}.hover\:bg-gh-bg-secondary:hover{--tw-bg-opacity:1;background-color:rgb(22 27 34/var(--tw-bg-opacity))}.hover\:bg-gh-button:hover{--tw-bg-opacity:1;background-color:rgb(33 38 45/var(--tw-bg-opacity))}.hover\:text-gh-text:hover{--tw-text-opacity:1;color:rgb(190 209 217/var(--tw-text-opacity))}.hover\:text-gh-blue:hover{--tw-text-opacity:1;color:rgb(88 166 255/var(--tw-text-opacity))}.hover\:text-gh-red-active:hover{--tw-text-opacity:1;color:rgb(247 129 102/var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.hover\:text-green-400:hover{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity))}.hover\:text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.active\:border-gh-blue:active,.focus\:border-gh-blue:focus{--tw-border-opacity:1;border-color:rgb(88 166 255/var(--tw-border-opacity))}.group:hover .group-hover\:scale-100{--tw-scale-x:1;--tw-scale-y:1;-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:opacity-100{opacity:1}@media (min-width:640px){.sm\:w-\[60\%\]{width:60%}}@media (min-width:768px){.md\:mx-32{margin-left:8rem;margin-right:8rem}.md\:block{display:block}.md\:flex{display:flex}.md\:w-\[50\%\]{width:50%}}@media (min-width:1024px){.lg\:mx-36{margin-left:9rem;margin-right:9rem}.lg\:w-1\/2{width:50%}.lg\:w-\[40\%\]{width:40%}.lg\:flex-row{flex-direction:row}} -/*# sourceMappingURL=main.92a0c7f7.css.map*/ \ No newline at end of file diff --git a/client/build/static/css/main.92a0c7f7.css.map b/client/build/static/css/main.92a0c7f7.css.map deleted file mode 100644 index 2d9510f9..00000000 --- a/client/build/static/css/main.92a0c7f7.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static/css/main.92a0c7f7.css","mappings":"AAAA;;CAAc,CAAd,uCAAc,CAAd,qBAAc,CAAd,8BAAc,CAAd,kCAAc,CAAd,oCAAc,CAAd,4BAAc,CAAd,gMAAc,CAAd,eAAc,CAAd,UAAc,CAAd,wBAAc,CAAd,QAAc,CAAd,uBAAc,CAAd,aAAc,CAAd,QAAc,CAAd,4DAAc,CAAd,gCAAc,CAAd,mCAAc,CAAd,mBAAc,CAAd,eAAc,CAAd,uBAAc,CAAd,2BAAc,CAAd,qHAAc,CAAd,aAAc,CAAd,mBAAc,CAAd,qBAAc,CAAd,aAAc,CAAd,iBAAc,CAAd,sBAAc,CAAd,iBAAc,CAAd,aAAc,CAAd,8BAAc,CAAd,oBAAc,CAAd,aAAc,CAAd,mDAAc,CAAd,mBAAc,CAAd,cAAc,CAAd,mBAAc,CAAd,mBAAc,CAAd,QAAc,CAAd,SAAc,CAAd,iCAAc,CAAd,yEAAc,CAAd,wBAAc,CAAd,qBAAc,CAAd,4BAAc,CAAd,gCAAc,CAAd,+BAAc,CAAd,mEAAc,CAAd,0CAAc,CAAd,mBAAc,CAAd,mDAAc,CAAd,sDAAc,CAAd,YAAc,CAAd,yBAAc,CAAd,2DAAc,CAAd,iBAAc,CAAd,yBAAc,CAAd,0BAAc,CAAd,QAAc,CAAd,SAAc,CAAd,wBAAc,CAAd,kFAAc,CAAd,SAAc,CAAd,sDAAc,CAAd,SAAc,CAAd,mCAAc,CAAd,wBAAc,CAAd,4DAAc,CAAd,qBAAc,CAAd,qBAAc,CAAd,cAAc,CAAd,qBAAc,CAAd,iCAAc,CAAd,YAAc,CAAd,2CAAc,CAAd,mDAAc,CAAd,2CAAc,CAAd,2BAAc,CAAd,mDAAc,CAAd,4BAAc,CAAd,qBAAc,CAAd,wDAAc,CAAd,uBAAc,CAAd,kDAAc,CAAd,sBAAc,CAAd,mDAAc,CAAd,wCAAc,CAAd,uBAAc,CAAd,kBAAc,CAAd,kBAAc,CAAd,aAAc,CAAd,aAAc,CAAd,aAAc,CAAd,cAAc,CAAd,cAAc,CAAd,YAAc,CAAd,YAAc,CAAd,iBAAc,CAAd,qCAAc,CAAd,cAAc,CAAd,mBAAc,CAAd,qBAAc,CAAd,sBAAc,CAAd,uBAAc,CAAd,iBAAc,CAAd,0BAAc,CAAd,2BAAc,CAAd,mCAAc,CAAd,iCAAc,CAAd,0BAAc,CAAd,qBAAc,CAAd,6BAAc,CAAd,WAAc,CAAd,iBAAc,CAAd,eAAc,CAAd,gBAAc,CAAd,iBAAc,CAAd,aAAc,CAAd,eAAc,CAAd,YAAc,CAAd,kBAAc,CAAd,oBAAc,CAAd,0BAAc,CAAd,wBAAc,CAAd,yBAAc,CAAd,0BAAc,CAAd,sBAAc,CAAd,uBAAc,CAAd,wBAAc,CAAd,qBAAc,CAAd,0CAAc,CAAd,uBAAc,CAAd,kBAAc,CAAd,kBAAc,CAAd,aAAc,CAAd,aAAc,CAAd,aAAc,CAAd,cAAc,CAAd,cAAc,CAAd,YAAc,CAAd,YAAc,CAAd,iBAAc,CAAd,qCAAc,CAAd,cAAc,CAAd,mBAAc,CAAd,qBAAc,CAAd,sBAAc,CAAd,uBAAc,CAAd,iBAAc,CAAd,0BAAc,CAAd,2BAAc,CAAd,mCAAc,CAAd,iCAAc,CAAd,0BAAc,CAAd,qBAAc,CAAd,6BAAc,CAAd,WAAc,CAAd,iBAAc,CAAd,eAAc,CAAd,gBAAc,CAAd,iBAAc,CAAd,aAAc,CAAd,eAAc,CAAd,YAAc,CAAd,kBAAc,CAAd,oBAAc,CAAd,0BAAc,CAAd,wBAAc,CAAd,yBAAc,CAAd,0BAAc,CAAd,sBAAc,CAAd,uBAAc,CAAd,wBAAc,CAAd,qBAAc,CAAd,kCAAc,CAAd,uBAAc,CAAd,kBAAc,CAAd,kBAAc,CAAd,aAAc,CAAd,aAAc,CAAd,aAAc,CAAd,cAAc,CAAd,cAAc,CAAd,YAAc,CAAd,YAAc,CAAd,iBAAc,CAAd,qCAAc,CAAd,cAAc,CAAd,mBAAc,CAAd,qBAAc,CAAd,sBAAc,CAAd,uBAAc,CAAd,iBAAc,CAAd,0BAAc,CAAd,2BAAc,CAAd,mCAAc,CAAd,iCAAc,CAAd,0BAAc,CAAd,qBAAc,CAAd,6BAAc,CAAd,WAAc,CAAd,iBAAc,CAAd,eAAc,CAAd,gBAAc,CAAd,iBAAc,CAAd,aAAc,CAAd,eAAc,CAAd,YAAc,CAAd,kBAAc,CAAd,oBAAc,CAAd,0BAAc,CAAd,wBAAc,CAAd,yBAAc,CAAd,0BAAc,CAAd,sBAAc,CAAd,uBAAc,CAAd,wBAAc,CAAd,qBAAc,CAEd,wCAAmB,CAAnB,wCAAmB,CAAnB,qBAAmB,CAAnB,2BAAmB,CAAnB,2BAAmB,CAAnB,mBAAmB,CAAnB,oBAAmB,CAAnB,gBAAmB,CAAnB,cAAmB,CAAnB,YAAmB,CAAnB,iBAAmB,CAAnB,sBAAmB,CAAnB,gBAAmB,CAAnB,gBAAmB,CAAnB,gBAAmB,CAAnB,gBAAmB,CAAnB,gBAAmB,CAAnB,sBAAmB,CAAnB,iBAAmB,CAAnB,wCAAmB,CAAnB,yBAAmB,CAAnB,iBAAmB,CAAnB,0CAAmB,CAAnB,4CAAmB,CAAnB,uBAAmB,CAAnB,wBAAmB,CAAnB,qBAAmB,CAAnB,sBAAmB,CAAnB,yBAAmB,CAAnB,0BAAmB,CAAnB,uBAAmB,CAAnB,oBAAmB,CAAnB,kBAAmB,CAAnB,oBAAmB,CAAnB,wBAAmB,CAAnB,gBAAmB,CAAnB,gBAAmB,CAAnB,iCAAmB,CAAnB,uBAAmB,CAAnB,kBAAmB,CAAnB,sBAAmB,CAAnB,0BAAmB,CAAnB,+BAAmB,CAAnB,8BAAmB,CAAnB,kBAAmB,CAAnB,qBAAmB,CAAnB,gCAAmB,CAAnB,sBAAmB,CAAnB,iBAAmB,CAAnB,kBAAmB,CAAnB,eAAmB,CAAnB,qBAAmB,CAAnB,gCAAmB,CAAnB,wCAAmB,CAAnB,0OAAmB,CAAnB,6LAAmB,CAAnB,sCAAmB,CAAnB,wCAAmB,CAAnB,mOAAmB,CAAnB,6LAAmB,CAAnB,yBAAmB,CAAnB,cAAmB,CAAnB,uBAAmB,CAAnB,cAAmB,CAAnB,wNAAmB,CAAnB,6LAAmB,CAAnB,0BAAmB,CAAnB,gBAAmB,CAAnB,8BAAmB,CAAnB,8BAAmB,CAAnB,qCAAmB,CAAnB,gBAAmB,CAAnB,qCAAmB,CAAnB,gBAAmB,CAAnB,+BAAmB,CAAnB,+BAAmB,CAAnB,yBAAmB,CAAnB,mCAAmB,CAAnB,gCAAmB,CAAnB,kCAAmB,CAAnB,sCAAmB,CAAnB,8CAAmB,CAAnB,4CAAmB,CAAnB,eAAmB,CAAnB,gBAAmB,CAAnB,iBAAmB,CAAnB,iBAAmB,CAAnB,4BAAmB,CAAnB,gCAAmB,CAAnB,gCAAmB,CAAnB,gCAAmB,CAAnB,oCAAmB,CAAnB,oCAAmB,CAAnB,qCAAmB,CAAnB,qCAAmB,CAAnB,iCAAmB,CAAnB,kCAAmB,CAAnB,+BAAmB,CAAnB,6CAAmB,CAAnB,gDAAmB,CAAnB,8CAAmB,CAAnB,iDAAmB,CAAnB,wBAAmB,CAAnB,qCAAmB,CAAnB,iCAAmB,CAAnB,8BAAmB,CAAnB,gCAAmB,CAAnB,uCAAmB,CAAnB,mDAAmB,CAAnB,8CAAmB,CAAnB,mDAAmB,CAAnB,2CAAmB,CAAnB,mDAAmB,CAAnB,6CAAmB,CAAnB,oDAAmB,CAAnB,qCAAmB,CAAnB,oDAAmB,CAAnB,6CAAmB,CAAnB,mDAAmB,CAAnB,qDAAmB,CAAnB,sDAAmB,CAAnB,4CAAmB,CAAnB,4CAAmB,CAAnB,mDAAmB,CAAnB,iDAAmB,CAAnB,0DAAmB,CAAnB,2BAAmB,CAAnB,mDAAmB,CAAnB,+BAAmB,CAAnB,mDAAmB,CAAnB,+BAAmB,CAAnB,mDAAmB,CAAnB,sCAAmB,CAAnB,mDAAmB,CAAnB,8BAAmB,CAAnB,oDAAmB,CAAnB,mCAAmB,CAAnB,mDAAmB,CAAnB,qCAAmB,CAAnB,mDAAmB,CAAnB,oCAAmB,CAAnB,kBAAmB,CAAnB,uBAAmB,CAAnB,kBAAmB,CAAnB,8CAAmB,CAAnB,yBAAmB,CAAnB,oBAAmB,CAAnB,wBAAmB,CAAnB,mBAAmB,CAAnB,4CAAmB,CAAnB,wDAAmB,CAAnB,2DAAmB,CAAnB,2DAAmB,CAAnB,yBAAmB,CAAnB,oBAAmB,CAAnB,0CAAmB,CAAnB,8CAAmB,CAAnB,4BAAmB,CAAnB,0BAAmB,CAAnB,2BAAmB,CAAnB,kCAAmB,CAAnB,qCAAmB,CAAnB,8BAAmB,CAAnB,+CAAmB,CAAnB,8GAAmB,CAAnB,0BAAmB,CAAnB,mBAAmB,CAAnB,2BAAmB,CAAnB,mBAAmB,CAAnB,gCAAmB,CAAnB,yBAAmB,CAAnB,kBAAmB,CAAnB,gCAAmB,CAAnB,kCAAmB,CAAnB,0BAAmB,CAAnB,gBAAmB,CAAnB,8BAAmB,CAAnB,yBAAmB,CAAnB,2BAAmB,CAAnB,oCAAmB,CAAnB,mCAAmB,CAAnB,4CAAmB,CAAnB,iCAAmB,CAAnB,2CAAmB,CAAnB,iCAAmB,CAAnB,6CAAmB,CAAnB,2CAAmB,CAAnB,6CAAmB,CAAnB,+BAAmB,CAAnB,6CAAmB,CAAnB,iCAAmB,CAAnB,4CAAmB,CAAnB,mCAAmB,CAAnB,0CAAmB,CAAnB,mCAAmB,CAAnB,4CAAmB,CAAnB,iCAAmB,CAAnB,6CAAmB,CAAnB,yCAAmB,CAAnB,2CAAmB,CAAnB,oBAAmB,CAAnB,sBAAmB,CAAnB,qFAAmB,CAAnB,kGAAmB,CAAnB,sEAAmB,CAAnB,kGAAmB,CAAnB,yDAAmB,CAAnB,4DAAmB,CAAnB,iDAAmB,CAAnB,qDAAmB,CAAnB,+CAAmB,CAAnB,kGAAmB,CAAnB,2CAAmB,CAAnB,kBAAmB,CAAnB,gMAAmB,CAAnB,gLAAmB,CAAnB,8CAAmB,CAAnB,8QAAmB,CAAnB,sQAAmB,CAAnB,uCAAmB,CAAnB,kDAAmB,CAAnB,sDAAmB,CAAnB,qCAAmB,CAAnB,qCAAmB,CAAnB,qCAAmB,CAsBjB,aACE,uBAAwB,CAExB,eACF,CAEE,wDAA0B,CAA1B,cAA0B,CAG1B,qDAA0B,CAA1B,cAA0B,CAjC9B,iI,CAAA,mH,CAAA,oE,CAAA,2D,CAAA,4D,CAAA,0D,CAAA,yD,CAAA,uD,CAAA,ie,CAAA,uD,CAAA,yc,CAAA,0E,CAAA,yE,CAAA,yE,CAAA,oI,CAAA,kI,CAAA,0E,CAAA,yH,CAAA,sG,CAAA,+G,CAAA,uG,CAAA,uG,CAAA,8F,CAAA,sG,CAAA,gG,CAAA,4F,CAAA,2F,CAAA,kG,CAAA,0F,CAAA,6F,CAAA,4F,CAAA,sD,CAAA,uI,CAAA,sc,CAAA,gD,CAAA,kD,EAAA,sE,CAAA,wB,CAAA,sB,CAAA,yB,EAAA,uE,CAAA,qB,CAAA,yB,CAAA,gC","sources":["index.css"],"sourcesContent":["@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n@layer base {\n *::-webkit-scrollbar {\n @apply w-[.75rem] h-[.75rem];\n }\n\n *::-webkit-scrollbar-track {\n @apply bg-gh-button;\n }\n\n *::-webkit-scrollbar-thumb {\n @apply bg-gh-button-border rounded-md transition-all border-[3px] \n border-solid border-transparent bg-clip-content;\n }\n\n body {\n @apply bg-gh-bg;\n }\n}\n\n@layer utilities {\n .color-input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n }\n .color-input::-webkit-color-swatch {\n @apply border-0 rounded-sm;\n }\n .color-input::-moz-color-swatch {\n @apply border-0 rounded-sm;\n }\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/client/build/static/js/main.dce67da4.js b/client/build/static/js/main.dce67da4.js deleted file mode 100644 index a36947c3..00000000 --- a/client/build/static/js/main.dce67da4.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see main.dce67da4.js.LICENSE.txt */ -!function(){var e={472:function(e){e.exports="object"==typeof self?self.FormData:window.FormData},867:function(e,t,n){"use strict";var r=n(707),a=o(Error);function o(e){return t.displayName=e.displayName||e.name,t;function t(t){return t&&(t=r.apply(null,arguments)),new e(t)}}e.exports=a,a.eval=o(EvalError),a.range=o(RangeError),a.reference=o(ReferenceError),a.syntax=o(SyntaxError),a.type=o(TypeError),a.uri=o(URIError),a.create=o},707:function(e){!function(){var t;function n(e){for(var t,n,r,a,o=1,l=[].slice.call(arguments),i=0,u=e.length,s="",c=!1,d=!1,f=function(){return l[o++]},p=function(){for(var n="";/\d/.test(e[i]);)n+=e[i++],t=e[i];return n.length>0?parseInt(n):null};i/g,">").replace(/"/g,""").replace(/'/g,"'")}function h(e){var t=Object.create(null);for(var n in e)t[n]=e[n];for(var r=arguments.length,a=new Array(r>1?r-1:0),o=1;o")}},{key:"value",value:function(){return this.buffer}},{key:"span",value:function(e){this.buffer+='')}}]),e}(),v=function(e){"use strict";o(n,e);var t=l(n);function n(e){var r;return i(this,n),(r=t.call(this)).options=e,r}return u(n,[{key:"addKeyword",value:function(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}},{key:"addText",value:function(e){""!==e&&this.add(e)}},{key:"addSublanguage",value:function(e,t){var n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}},{key:"toHTML",value:function(){return new m(this,this.options).value()}},{key:"finalize",value:function(){return!0}}]),n}(function(){"use strict";function e(){i(this,e),this.rootNode={children:[]},this.stack=[this.rootNode]}return u(e,[{key:"top",get:function(){return this.stack[this.stack.length-1]}},{key:"root",get:function(){return this.rootNode}},{key:"add",value:function(e){this.top.children.push(e)}},{key:"openNode",value:function(e){var t={kind:e,children:[]};this.add(t),this.stack.push(t)}},{key:"closeNode",value:function(){if(this.stack.length>1)return this.stack.pop()}},{key:"closeAllNodes",value:function(){for(;this.closeNode(););}},{key:"toJSON",value:function(){return JSON.stringify(this.rootNode,null,4)}},{key:"walk",value:function(e){return this.constructor._walk(e,this.rootNode)}}],[{key:"_walk",value:function(e,t){var n=this;return"string"===typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((function(t){return n._walk(e,t)})),e.closeNode(t)),e}},{key:"_collapse",value:function(t){"string"!==typeof t&&t.children&&(t.children.every((function(e){return"string"===typeof e}))?t.children=[t.children.join("")]:t.children.forEach((function(t){e._collapse(t)})))}}]),e}());function b(e){return e?"string"===typeof e?e:e.source:null}function y(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:{},r=h({className:"comment",begin:e,end:t,contains:[]},n);return r.contains.push(P),r.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),r},L=R("//","$"),T=R("/\\*","\\*/"),z=R("#","$"),M={className:"number",begin:E,relevance:0},A={className:"number",begin:N,relevance:0},D={className:"number",begin:C,relevance:0},I={className:"number",begin:E+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},B={begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[j,{begin:/\[/,end:/\]/,relevance:0,contains:[j]}]}]},F={className:"title",begin:k,relevance:0},U={className:"title",begin:S,relevance:0},V={begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},H=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:k,UNDERSCORE_IDENT_RE:S,NUMBER_RE:E,C_NUMBER_RE:N,BINARY_NUMBER_RE:C,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=/^#![ ]*\//;return e.binary&&(e.begin=y(t,/.*\b/,e.binary,/\b.*/)),h({className:"meta",begin:t,end:/$/,relevance:0,"on:begin":function(e,t){0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:j,APOS_STRING_MODE:_,QUOTE_STRING_MODE:O,PHRASAL_WORDS_MODE:P,COMMENT:R,C_LINE_COMMENT_MODE:L,C_BLOCK_COMMENT_MODE:T,HASH_COMMENT_MODE:z,NUMBER_MODE:M,C_NUMBER_MODE:A,BINARY_NUMBER_MODE:D,CSS_NUMBER_MODE:I,REGEXP_MODE:B,TITLE_MODE:F,UNDERSCORE_TITLE_MODE:U,METHOD_GUARD:V,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":function(e,t){t.data._beginMatch=e[1]},"on:end":function(e,t){t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function W(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function $(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=W,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function Q(e,t){Array.isArray(e.illegal)&&(e.illegal=x.apply(void 0,a(e.illegal)))}function q(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function K(e,t){void 0===e.relevance&&(e.relevance=1)}var G=["of","and","for","in","not","or","if","then","parent","list","value"],X="keyword";function J(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:X,r={};return"string"===typeof e?a(n,e.split(" ")):Array.isArray(e)?a(n,e):Object.keys(e).forEach((function(n){Object.assign(r,J(e[n],t,n))})),r;function a(e,n){t&&(n=n.map((function(e){return e.toLowerCase()}))),n.forEach((function(t){var n=t.split("|");r[n[0]]=[e,Y(n[0],n[1])]}))}}function Y(e,t){return t?Number(t):function(e){return G.includes(e.toLowerCase())}(e)?0:1}function Z(e,t){t.plugins;function n(t,n){return new RegExp(b(t),"m"+(e.case_insensitive?"i":"")+(n?"g":""))}var o=function(){"use strict";function e(){i(this,e),this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}return u(e,[{key:"addRule",value:function(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=function(e){return new RegExp(e.toString()+"|").exec("").length-1}(e)+1}},{key:"compile",value:function(){0===this.regexes.length&&(this.exec=function(){return null});var e=this.regexes.map((function(e){return e[1]}));this.matcherRe=n(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"|",n=0;return e.map((function(e){for(var t=n+=1,r=b(e),a="";r.length>0;){var o=w.exec(r);if(!o){a+=r;break}a+=r.substring(0,o.index),r=r.substring(o.index+o[0].length),"\\"===o[0][0]&&o[1]?a+="\\"+String(Number(o[1])+t):(a+=o[0],"("===o[0]&&n++)}return a})).map((function(e){return"(".concat(e,")")})).join(t)}(e),!0),this.lastIndex=0}},{key:"exec",value:function(e){this.matcherRe.lastIndex=this.lastIndex;var t=this.matcherRe.exec(e);if(!t)return null;var n=t.findIndex((function(e,t){return t>0&&void 0!==e})),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}]),e}(),l=function(){"use strict";function e(){i(this,e),this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}return u(e,[{key:"getMatcher",value:function(e){if(this.multiRegexes[e])return this.multiRegexes[e];var t=new o;return this.rules.slice(e).forEach((function(e){var n=r(e,2),a=n[0],o=n[1];return t.addRule(a,o)})),t.compile(),this.multiRegexes[e]=t,t}},{key:"resumingScanAtSamePosition",value:function(){return 0!==this.regexIndex}},{key:"considerAll",value:function(){this.regexIndex=0}},{key:"addRule",value:function(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}},{key:"exec",value:function(e){var t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;var n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{var r=this.getMatcher(0);r.lastIndex=this.lastIndex+1,n=r.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}]),e}();if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=h(e.classNameAliases||{}),function t(r,o){var i,u=r;if(r.isCompiled)return u;[q].forEach((function(e){return e(r,o)})),e.compilerExtensions.forEach((function(e){return e(r,o)})),r.__beforeBegin=null,[$,Q,K].forEach((function(e){return e(r,o)})),r.isCompiled=!0;var s=null;if("object"===typeof r.keywords&&(s=r.keywords.$pattern,delete r.keywords.$pattern),r.keywords&&(r.keywords=J(r.keywords,e.case_insensitive)),r.lexemes&&s)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return s=s||r.lexemes||/\w+/,u.keywordPatternRe=n(s,!0),o&&(r.begin||(r.begin=/\B|\b/),u.beginRe=n(r.begin),r.endSameAsBegin&&(r.end=r.begin),r.end||r.endsWithParent||(r.end=/\B|\b/),r.end&&(u.endRe=n(r.end)),u.terminatorEnd=b(r.end)||"",r.endsWithParent&&o.terminatorEnd&&(u.terminatorEnd+=(r.end?"|":"")+o.terminatorEnd)),r.illegal&&(u.illegalRe=n(r.illegal)),r.contains||(r.contains=[]),r.contains=(i=[]).concat.apply(i,a(r.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return h(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(ee(e))return h(e,{starts:e.starts?h(e.starts):null});if(Object.isFrozen(e))return h(e);return e}("self"===e?r:e)})))),r.contains.forEach((function(e){t(e,u)})),r.starts&&t(r.starts,o),u.matcher=function(e){var t=new l;return e.contains.forEach((function(e){return t.addRule(e.begin,{rule:e,type:"begin"})})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(u),u}(e)}function ee(e){return!!e&&(e.endsWithParent||ee(e.starts))}function te(e){var t={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className:function(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted:function(){if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn('The language "'.concat(this.language,'" you specified could not be found.')),this.unknownLanguage=!0,p(this.code);var t={};return this.autoDetect?(t=e.highlightAuto(this.code),this.detectedLanguage=t.language):(t=e.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),t.value},autoDetect:function(){return!this.language||(e=this.autodetect,Boolean(e||""===e));var e},ignoreIllegals:function(){return!0}},render:function(e){return e("pre",{},[e("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:t,VuePlugin:{install:function(e){e.component("highlightjs",t)}}}}var ne={"after:highlightElement":function(e){var t=e.el,n=e.result,r=e.text,a=ae(t);if(a.length){var o=document.createElement("div");o.innerHTML=n.value,n.value=function(e,t,n){var r=0,a="",o=[];function l(){return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset"}function u(e){a+=""}function s(e){("start"===e.event?i:u)(e.node)}for(;e.length||t.length;){var c=l();if(a+=p(n.substring(r,c[0].offset)),r=c[0].offset,c===e){o.reverse().forEach(u);do{s(c.splice(0,1)[0]),c=l()}while(c===e&&c.length&&c[0].offset===r);o.reverse().forEach(i)}else"start"===c[0].event?o.push(c[0].node):o.pop(),s(c.splice(0,1)[0])}return a+p(n.substr(r))}(a,ae(o),r)}}};function re(e){return e.nodeName.toLowerCase()}function ae(e){var t=[];return function e(n,r){for(var a=n.firstChild;a;a=a.nextSibling)3===a.nodeType?r+=a.nodeValue.length:1===a.nodeType&&(t.push({event:"start",offset:r,node:a}),r=e(a,r),re(a).match(/br|hr|img|input/)||t.push({event:"stop",offset:r,node:a}));return r}(e,0),t}var oe={},le=function(e){console.error(e)},ie=function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),a=1;a]+>|\t|)+|\n)/gm,i="Could not find the language '{}', did you forget to load/include a language module?",u={disableAutodetect:!0,name:"Plain text",contains:[]},s={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:v};function d(e){return s.noHighlightRe.test(e)}function p(e,t,n,r){var a="",o="";"object"===typeof t?(a=e,n=t.ignoreIllegals,o=t.language,r=void 0):(ue("10.7.0","highlight(lang, code, ...args) has been deprecated."),ue("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),o=e,a=t);var l={code:a,language:o};C("before:highlight",l);var i=l.result?l.result:h(l.language,l.code,n,r);return i.code=l.code,C("after:highlight",i),i}function h(e,n,l,u){function c(e,t){var n=k.case_insensitive?t[0].toLowerCase():t[0];return Object.prototype.hasOwnProperty.call(e.keywords,n)&&e.keywords[n]}function d(){null!=C.subLanguage?function(){if(""!==O){var e=null;if("string"===typeof C.subLanguage){if(!t[C.subLanguage])return void _.addText(O);e=h(C.subLanguage,O,!0,j[C.subLanguage]),j[C.subLanguage]=e.top}else e=g(O,C.subLanguage.length?C.subLanguage:null);C.relevance>0&&(P+=e.relevance),_.addSublanguage(e.emitter,e.language)}}():function(){if(C.keywords){var e=0;C.keywordPatternRe.lastIndex=0;for(var t=C.keywordPatternRe.exec(O),n="";t;){n+=O.substring(e,t.index);var a=c(C,t);if(a){var o=r(a,2),l=o[0],i=o[1];if(_.addText(n),n="",P+=i,l.startsWith("_"))n+=t[0];else{var u=k.classNameAliases[l]||l;_.addKeyword(t[0],u)}}else n+=t[0];e=C.keywordPatternRe.lastIndex,t=C.keywordPatternRe.exec(O)}n+=O.substr(e),_.addText(n)}else _.addText(O)}(),O=""}function p(e){return e.className&&_.openNode(k.classNameAliases[e.className]||e.className),C=Object.create(e,{parent:{value:C}})}function m(e,t,n){var r=function(e,t){var n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(r){if(e["on:end"]){var a=new f(e);e["on:end"](t,a),a.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return m(e.parent,t,n)}function v(e){return 0===C.matcher.regexIndex?(O+=e[0],1):(T=!0,0)}function b(e){for(var t=e[0],n=e.rule,r=new f(n),a=0,o=[n.__beforeBegin,n["on:begin"]];a")+'"');throw u.mode=C,u}if("end"===r.type){var s=y(r);if(s!==de)return s}if("illegal"===r.type&&""===a)return 1;if(L>1e5&&L>3*r.index)throw new Error("potential infinite loop, way more iterations than matches");return O+=a,a.length}var k=S(e);if(!k)throw le(i.replace("{}",e)),new Error('Unknown language: "'+e+'"');var E=Z(k,{plugins:a}),N="",C=u||E,j={},_=new s.__emitter(s);!function(){for(var e=[],t=C;t!==k;t=t.parent)t.className&&e.unshift(t.className);e.forEach((function(e){return _.openNode(e)}))}();var O="",P=0,R=0,L=0,T=!1;try{for(C.matcher.considerAll();;){L++,T?T=!1:C.matcher.considerAll(),C.matcher.lastIndex=R;var z=C.matcher.exec(n);if(!z)break;var M=w(n.substring(R,z.index),z);R=z.index+M}return w(n.substr(R)),_.closeAllNodes(),_.finalize(),N=_.toHTML(),{relevance:Math.floor(P),value:N,language:e,illegal:!1,emitter:_,top:C}}catch(A){if(A.message&&A.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:A.message,context:n.slice(R-100,R+100),mode:A.mode},sofar:N,relevance:0,value:se(n),emitter:_};if(o)return{illegal:!1,relevance:0,value:se(n),emitter:_,language:e,top:C,errorRaised:A};throw A}}function g(e,n){n=n||s.languages||Object.keys(t);var a=function(e){var t={relevance:0,emitter:new s.__emitter(s),value:se(e),illegal:!1,top:u};return t.emitter.addText(e),t}(e),o=n.filter(S).filter(N).map((function(t){return h(t,e,!1)}));o.unshift(a);var l=o.sort((function(e,t){if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(S(e.language).supersetOf===t.language)return 1;if(S(t.language).supersetOf===e.language)return-1}return 0})),i=r(l,2),c=i[0],d=i[1],f=c;return f.second_best=d,f}var m={"before:highlightElement":function(e){var t=e.el;s.useBR&&(t.innerHTML=t.innerHTML.replace(/\n/g,"").replace(//g,"\n"))},"after:highlightElement":function(e){var t=e.result;s.useBR&&(t.value=t.value.replace(/\n/g,"
"))}},b=/^(<[^>]+>|\t)+/gm,y={"after:highlightElement":function(e){var t=e.result;s.tabReplace&&(t.value=t.value.replace(b,(function(e){return e.replace(/\t/g,s.tabReplace)})))}};function x(e){var t=function(e){var t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";var n=s.languageDetectRe.exec(t);if(n){var r=S(n[1]);return r||(ie(i.replace("{}",n[1])),ie("Falling back to no-highlight mode for this block.",e)),r?n[1]:"no-highlight"}return t.split(/\s+/).find((function(e){return d(e)||S(e)}))}(e);if(!d(t)){C("before:highlightElement",{el:e,language:t});var r=e.textContent,a=t?p(r,{language:t,ignoreIllegals:!0}):g(r);C("after:highlightElement",{el:e,result:a,text:r}),e.innerHTML=a.value,function(e,t,r){var a=t?n[t]:r;e.classList.add("hljs"),a&&e.classList.add(a)}(e,t,a.language),e.result={language:a.language,re:a.relevance,relavance:a.relevance},a.second_best&&(e.second_best={language:a.second_best.language,re:a.second_best.relevance,relavance:a.second_best.relevance})}}var w=!1;function k(){"loading"!==document.readyState?document.querySelectorAll("pre code").forEach(x):w=!0}function S(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function E(e,t){var r=t.languageName;"string"===typeof e&&(e=[e]),e.forEach((function(e){n[e.toLowerCase()]=r}))}function N(e){var t=S(e);return t&&!t.disableAutodetect}function C(e,t){var n=e;a.forEach((function(e){e[n]&&e[n](t)}))}for(var j in"undefined"!==typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){w&&k()}),!1),Object.assign(e,{highlight:p,highlightAuto:g,highlightAll:k,fixMarkup:function(e){return ue("10.2.0","fixMarkup will be removed entirely in v11.0"),ue("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),t=e,s.tabReplace||s.useBR?t.replace(l,(function(e){return"\n"===e?s.useBR?"
":e:s.tabReplace?e.replace(/\t/g,s.tabReplace):e})):t;var t},highlightElement:x,highlightBlock:function(e){return ue("10.7.0","highlightBlock will be removed entirely in v12.0"),ue("10.7.0","Please use highlightElement now."),x(e)},configure:function(e){e.useBR&&(ue("10.3.0","'useBR' will be removed entirely in v11.0"),ue("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),s=ce(s,e)},initHighlighting:function e(){e.called||(e.called=!0,ue("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead."),document.querySelectorAll("pre code").forEach(x))},initHighlightingOnLoad:function(){ue("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),w=!0},registerLanguage:function(n,r){var a=null;try{a=r(e)}catch(l){if(le("Language definition for '{}' could not be registered.".replace("{}",n)),!o)throw l;le(l),a=u}a.name||(a.name=n),t[n]=a,a.rawDefinition=r.bind(null,e),a.aliases&&E(a.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(var r=0,a=Object.keys(n);r`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,contains:[{className:"meta",begin://,relevance:10,contains:[l,s,u,i,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[l,i,s,u]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},o,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:r(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:t,relevance:0,starts:c}]},{className:"tag",begin:r(/<\//,n(r(t,/>/))),contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}},905:function(e,t,n){"use strict";var r=n(478),a=n(867);t.highlight=l,t.highlightAuto=function(e,t){var n,i,u,s,c=t||{},d=c.subset||r.listLanguages(),f=c.prefix,p=d.length,h=-1;null!==f&&void 0!==f||(f=o);if("string"!==typeof e)throw a("Expected `string` for value, got `%s`",e);i={relevance:0,language:null,value:[]},n={relevance:0,language:null,value:[]};for(;++hi.relevance&&(i=u),u.relevance>n.relevance&&(i=n,n=u));i.language&&(n.secondBest=i);return n},t.registerLanguage=function(e,t){r.registerLanguage(e,t)},t.listLanguages=function(){return r.listLanguages()},t.registerAlias=function(e,t){var n,a=e;t&&((a={})[e]=t);for(n in a)r.registerAliases(a[n],{languageName:n})},i.prototype.addText=function(e){var t,n,r=this.stack;if(""===e)return;t=r[r.length-1],(n=t.children[t.children.length-1])&&"text"===n.type?n.value+=e:t.children.push({type:"text",value:e})},i.prototype.addKeyword=function(e,t){this.openNode(t),this.addText(e),this.closeNode()},i.prototype.addSublanguage=function(e,t){var n=this.stack,r=n[n.length-1],a=e.rootNode.children,o=t?{type:"element",tagName:"span",properties:{className:[t]},children:a}:a;r.children=r.children.concat(o)},i.prototype.openNode=function(e){var t=this.stack,n=this.options.classPrefix+e,r=t[t.length-1],a={type:"element",tagName:"span",properties:{className:[n]},children:[]};r.children.push(a),t.push(a)},i.prototype.closeNode=function(){this.stack.pop()},i.prototype.closeAllNodes=u,i.prototype.finalize=u,i.prototype.toHTML=function(){return""};var o="hljs-";function l(e,t,n){var l,u=r.configure({}),s=(n||{}).prefix;if("string"!==typeof e)throw a("Expected `string` for name, got `%s`",e);if(!r.getLanguage(e))throw a("Unknown language: `%s` is not registered",e);if("string"!==typeof t)throw a("Expected `string` for value, got `%s`",t);if(null!==s&&void 0!==s||(s=o),r.configure({__emitter:i,classPrefix:s}),l=r.highlight(t,{language:e,ignoreIllegals:!0}),r.configure(u||{}),l.errorRaised)throw l.errorRaised;return{relevance:l.relevance,language:l.language,value:l.emitter.rootNode.children}}function i(e){this.options=e,this.rootNode={children:[]},this.stack=[this.rootNode]}function u(){}},463:function(e,t,n){"use strict";var r=n(791),a=n(296);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n
';\n\n/**\n * Determines if a node needs to be wrapped in \n *\n * @param {Node} node */\nconst emitsWrappingTags = (node) => {\n return !!node.kind;\n};\n\n/** @type {Renderer} */\nclass HTMLRenderer {\n /**\n * Creates a new HTMLRenderer\n *\n * @param {Tree} parseTree - the parse tree (must support `walk` API)\n * @param {{classPrefix: string}} options\n */\n constructor(parseTree, options) {\n this.buffer = \"\";\n this.classPrefix = options.classPrefix;\n parseTree.walk(this);\n }\n\n /**\n * Adds texts to the output stream\n *\n * @param {string} text */\n addText(text) {\n this.buffer += escapeHTML(text);\n }\n\n /**\n * Adds a node open to the output stream (if needed)\n *\n * @param {Node} node */\n openNode(node) {\n if (!emitsWrappingTags(node)) return;\n\n let className = node.kind;\n if (!node.sublanguage) {\n className = `${this.classPrefix}${className}`;\n }\n this.span(className);\n }\n\n /**\n * Adds a node close to the output stream (if needed)\n *\n * @param {Node} node */\n closeNode(node) {\n if (!emitsWrappingTags(node)) return;\n\n this.buffer += SPAN_CLOSE;\n }\n\n /**\n * returns the accumulated buffer\n */\n value() {\n return this.buffer;\n }\n\n // helpers\n\n /**\n * Builds a span element\n *\n * @param {string} className */\n span(className) {\n this.buffer += ``;\n }\n}\n\n/** @typedef {{kind?: string, sublanguage?: boolean, children: Node[]} | string} Node */\n/** @typedef {{kind?: string, sublanguage?: boolean, children: Node[]} } DataNode */\n/** */\n\nclass TokenTree {\n constructor() {\n /** @type DataNode */\n this.rootNode = { children: [] };\n this.stack = [this.rootNode];\n }\n\n get top() {\n return this.stack[this.stack.length - 1];\n }\n\n get root() { return this.rootNode; }\n\n /** @param {Node} node */\n add(node) {\n this.top.children.push(node);\n }\n\n /** @param {string} kind */\n openNode(kind) {\n /** @type Node */\n const node = { kind, children: [] };\n this.add(node);\n this.stack.push(node);\n }\n\n closeNode() {\n if (this.stack.length > 1) {\n return this.stack.pop();\n }\n // eslint-disable-next-line no-undefined\n return undefined;\n }\n\n closeAllNodes() {\n while (this.closeNode());\n }\n\n toJSON() {\n return JSON.stringify(this.rootNode, null, 4);\n }\n\n /**\n * @typedef { import(\"./html_renderer\").Renderer } Renderer\n * @param {Renderer} builder\n */\n walk(builder) {\n // this does not\n return this.constructor._walk(builder, this.rootNode);\n // this works\n // return TokenTree._walk(builder, this.rootNode);\n }\n\n /**\n * @param {Renderer} builder\n * @param {Node} node\n */\n static _walk(builder, node) {\n if (typeof node === \"string\") {\n builder.addText(node);\n } else if (node.children) {\n builder.openNode(node);\n node.children.forEach((child) => this._walk(builder, child));\n builder.closeNode(node);\n }\n return builder;\n }\n\n /**\n * @param {Node} node\n */\n static _collapse(node) {\n if (typeof node === \"string\") return;\n if (!node.children) return;\n\n if (node.children.every(el => typeof el === \"string\")) {\n // node.text = node.children.join(\"\");\n // delete node.children;\n node.children = [node.children.join(\"\")];\n } else {\n node.children.forEach((child) => {\n TokenTree._collapse(child);\n });\n }\n }\n}\n\n/**\n Currently this is all private API, but this is the minimal API necessary\n that an Emitter must implement to fully support the parser.\n\n Minimal interface:\n\n - addKeyword(text, kind)\n - addText(text)\n - addSublanguage(emitter, subLanguageName)\n - finalize()\n - openNode(kind)\n - closeNode()\n - closeAllNodes()\n - toHTML()\n\n*/\n\n/**\n * @implements {Emitter}\n */\nclass TokenTreeEmitter extends TokenTree {\n /**\n * @param {*} options\n */\n constructor(options) {\n super();\n this.options = options;\n }\n\n /**\n * @param {string} text\n * @param {string} kind\n */\n addKeyword(text, kind) {\n if (text === \"\") { return; }\n\n this.openNode(kind);\n this.addText(text);\n this.closeNode();\n }\n\n /**\n * @param {string} text\n */\n addText(text) {\n if (text === \"\") { return; }\n\n this.add(text);\n }\n\n /**\n * @param {Emitter & {root: DataNode}} emitter\n * @param {string} name\n */\n addSublanguage(emitter, name) {\n /** @type DataNode */\n const node = emitter.root;\n node.kind = name;\n node.sublanguage = true;\n this.add(node);\n }\n\n toHTML() {\n const renderer = new HTMLRenderer(this, this.options);\n return renderer.value();\n }\n\n finalize() {\n return true;\n }\n}\n\n/**\n * @param {string} value\n * @returns {RegExp}\n * */\nfunction escape(value) {\n return new RegExp(value.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&'), 'm');\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n if (!re) return null;\n if (typeof re === \"string\") return re;\n\n return re.source;\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n const joined = args.map((x) => source(x)).join(\"\");\n return joined;\n}\n\n/**\n * Any of the passed expresssions may match\n *\n * Creates a huge this | this | that | that match\n * @param {(RegExp | string)[] } args\n * @returns {string}\n */\nfunction either(...args) {\n const joined = '(' + args.map((x) => source(x)).join(\"|\") + \")\";\n return joined;\n}\n\n/**\n * @param {RegExp} re\n * @returns {number}\n */\nfunction countMatchGroups(re) {\n return (new RegExp(re.toString() + '|')).exec('').length - 1;\n}\n\n/**\n * Does lexeme start with a regular expression match at the beginning\n * @param {RegExp} re\n * @param {string} lexeme\n */\nfunction startsWith(re, lexeme) {\n const match = re && re.exec(lexeme);\n return match && match.index === 0;\n}\n\n// BACKREF_RE matches an open parenthesis or backreference. To avoid\n// an incorrect parse, it additionally matches the following:\n// - [...] elements, where the meaning of parentheses and escapes change\n// - other escape sequences, so we do not misparse escape sequences as\n// interesting elements\n// - non-matching or lookahead parentheses, which do not capture. These\n// follow the '(' with a '?'.\nconst BACKREF_RE = /\\[(?:[^\\\\\\]]|\\\\.)*\\]|\\(\\??|\\\\([1-9][0-9]*)|\\\\./;\n\n// join logically computes regexps.join(separator), but fixes the\n// backreferences so they continue to match.\n// it also places each individual regular expression into it's own\n// match group, keeping track of the sequencing of those match groups\n// is currently an exercise for the caller. :-)\n/**\n * @param {(string | RegExp)[]} regexps\n * @param {string} separator\n * @returns {string}\n */\nfunction join(regexps, separator = \"|\") {\n let numCaptures = 0;\n\n return regexps.map((regex) => {\n numCaptures += 1;\n const offset = numCaptures;\n let re = source(regex);\n let out = '';\n\n while (re.length > 0) {\n const match = BACKREF_RE.exec(re);\n if (!match) {\n out += re;\n break;\n }\n out += re.substring(0, match.index);\n re = re.substring(match.index + match[0].length);\n if (match[0][0] === '\\\\' && match[1]) {\n // Adjust the backreference.\n out += '\\\\' + String(Number(match[1]) + offset);\n } else {\n out += match[0];\n if (match[0] === '(') {\n numCaptures++;\n }\n }\n }\n return out;\n }).map(re => `(${re})`).join(separator);\n}\n\n// Common regexps\nconst MATCH_NOTHING_RE = /\\b\\B/;\nconst IDENT_RE = '[a-zA-Z]\\\\w*';\nconst UNDERSCORE_IDENT_RE = '[a-zA-Z_]\\\\w*';\nconst NUMBER_RE = '\\\\b\\\\d+(\\\\.\\\\d+)?';\nconst C_NUMBER_RE = '(-?)(\\\\b0[xX][a-fA-F0-9]+|(\\\\b\\\\d+(\\\\.\\\\d*)?|\\\\.\\\\d+)([eE][-+]?\\\\d+)?)'; // 0x..., 0..., decimal, float\nconst BINARY_NUMBER_RE = '\\\\b(0b[01]+)'; // 0b...\nconst RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\\\*|\\\\*=|\\\\+|\\\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\\\?|\\\\[|\\\\{|\\\\(|\\\\^|\\\\^=|\\\\||\\\\|=|\\\\|\\\\||~';\n\n/**\n* @param { Partial & {binary?: string | RegExp} } opts\n*/\nconst SHEBANG = (opts = {}) => {\n const beginShebang = /^#![ ]*\\//;\n if (opts.binary) {\n opts.begin = concat(\n beginShebang,\n /.*\\b/,\n opts.binary,\n /\\b.*/);\n }\n return inherit({\n className: 'meta',\n begin: beginShebang,\n end: /$/,\n relevance: 0,\n /** @type {ModeCallback} */\n \"on:begin\": (m, resp) => {\n if (m.index !== 0) resp.ignoreMatch();\n }\n }, opts);\n};\n\n// Common modes\nconst BACKSLASH_ESCAPE = {\n begin: '\\\\\\\\[\\\\s\\\\S]', relevance: 0\n};\nconst APOS_STRING_MODE = {\n className: 'string',\n begin: '\\'',\n end: '\\'',\n illegal: '\\\\n',\n contains: [BACKSLASH_ESCAPE]\n};\nconst QUOTE_STRING_MODE = {\n className: 'string',\n begin: '\"',\n end: '\"',\n illegal: '\\\\n',\n contains: [BACKSLASH_ESCAPE]\n};\nconst PHRASAL_WORDS_MODE = {\n begin: /\\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\\b/\n};\n/**\n * Creates a comment mode\n *\n * @param {string | RegExp} begin\n * @param {string | RegExp} end\n * @param {Mode | {}} [modeOptions]\n * @returns {Partial}\n */\nconst COMMENT = function(begin, end, modeOptions = {}) {\n const mode = inherit(\n {\n className: 'comment',\n begin,\n end,\n contains: []\n },\n modeOptions\n );\n mode.contains.push(PHRASAL_WORDS_MODE);\n mode.contains.push({\n className: 'doctag',\n begin: '(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):',\n relevance: 0\n });\n return mode;\n};\nconst C_LINE_COMMENT_MODE = COMMENT('//', '$');\nconst C_BLOCK_COMMENT_MODE = COMMENT('/\\\\*', '\\\\*/');\nconst HASH_COMMENT_MODE = COMMENT('#', '$');\nconst NUMBER_MODE = {\n className: 'number',\n begin: NUMBER_RE,\n relevance: 0\n};\nconst C_NUMBER_MODE = {\n className: 'number',\n begin: C_NUMBER_RE,\n relevance: 0\n};\nconst BINARY_NUMBER_MODE = {\n className: 'number',\n begin: BINARY_NUMBER_RE,\n relevance: 0\n};\nconst CSS_NUMBER_MODE = {\n className: 'number',\n begin: NUMBER_RE + '(' +\n '%|em|ex|ch|rem' +\n '|vw|vh|vmin|vmax' +\n '|cm|mm|in|pt|pc|px' +\n '|deg|grad|rad|turn' +\n '|s|ms' +\n '|Hz|kHz' +\n '|dpi|dpcm|dppx' +\n ')?',\n relevance: 0\n};\nconst REGEXP_MODE = {\n // this outer rule makes sure we actually have a WHOLE regex and not simply\n // an expression such as:\n //\n // 3 / something\n //\n // (which will then blow up when regex's `illegal` sees the newline)\n begin: /(?=\\/[^/\\n]*\\/)/,\n contains: [{\n className: 'regexp',\n begin: /\\//,\n end: /\\/[gimuy]*/,\n illegal: /\\n/,\n contains: [\n BACKSLASH_ESCAPE,\n {\n begin: /\\[/,\n end: /\\]/,\n relevance: 0,\n contains: [BACKSLASH_ESCAPE]\n }\n ]\n }]\n};\nconst TITLE_MODE = {\n className: 'title',\n begin: IDENT_RE,\n relevance: 0\n};\nconst UNDERSCORE_TITLE_MODE = {\n className: 'title',\n begin: UNDERSCORE_IDENT_RE,\n relevance: 0\n};\nconst METHOD_GUARD = {\n // excludes method names from keyword processing\n begin: '\\\\.\\\\s*' + UNDERSCORE_IDENT_RE,\n relevance: 0\n};\n\n/**\n * Adds end same as begin mechanics to a mode\n *\n * Your mode must include at least a single () match group as that first match\n * group is what is used for comparison\n * @param {Partial} mode\n */\nconst END_SAME_AS_BEGIN = function(mode) {\n return Object.assign(mode,\n {\n /** @type {ModeCallback} */\n 'on:begin': (m, resp) => { resp.data._beginMatch = m[1]; },\n /** @type {ModeCallback} */\n 'on:end': (m, resp) => { if (resp.data._beginMatch !== m[1]) resp.ignoreMatch(); }\n });\n};\n\nvar MODES = /*#__PURE__*/Object.freeze({\n __proto__: null,\n MATCH_NOTHING_RE: MATCH_NOTHING_RE,\n IDENT_RE: IDENT_RE,\n UNDERSCORE_IDENT_RE: UNDERSCORE_IDENT_RE,\n NUMBER_RE: NUMBER_RE,\n C_NUMBER_RE: C_NUMBER_RE,\n BINARY_NUMBER_RE: BINARY_NUMBER_RE,\n RE_STARTERS_RE: RE_STARTERS_RE,\n SHEBANG: SHEBANG,\n BACKSLASH_ESCAPE: BACKSLASH_ESCAPE,\n APOS_STRING_MODE: APOS_STRING_MODE,\n QUOTE_STRING_MODE: QUOTE_STRING_MODE,\n PHRASAL_WORDS_MODE: PHRASAL_WORDS_MODE,\n COMMENT: COMMENT,\n C_LINE_COMMENT_MODE: C_LINE_COMMENT_MODE,\n C_BLOCK_COMMENT_MODE: C_BLOCK_COMMENT_MODE,\n HASH_COMMENT_MODE: HASH_COMMENT_MODE,\n NUMBER_MODE: NUMBER_MODE,\n C_NUMBER_MODE: C_NUMBER_MODE,\n BINARY_NUMBER_MODE: BINARY_NUMBER_MODE,\n CSS_NUMBER_MODE: CSS_NUMBER_MODE,\n REGEXP_MODE: REGEXP_MODE,\n TITLE_MODE: TITLE_MODE,\n UNDERSCORE_TITLE_MODE: UNDERSCORE_TITLE_MODE,\n METHOD_GUARD: METHOD_GUARD,\n END_SAME_AS_BEGIN: END_SAME_AS_BEGIN\n});\n\n// Grammar extensions / plugins\n// See: https://github.com/highlightjs/highlight.js/issues/2833\n\n// Grammar extensions allow \"syntactic sugar\" to be added to the grammar modes\n// without requiring any underlying changes to the compiler internals.\n\n// `compileMatch` being the perfect small example of now allowing a grammar\n// author to write `match` when they desire to match a single expression rather\n// than being forced to use `begin`. The extension then just moves `match` into\n// `begin` when it runs. Ie, no features have been added, but we've just made\n// the experience of writing (and reading grammars) a little bit nicer.\n\n// ------\n\n// TODO: We need negative look-behind support to do this properly\n/**\n * Skip a match if it has a preceding dot\n *\n * This is used for `beginKeywords` to prevent matching expressions such as\n * `bob.keyword.do()`. The mode compiler automatically wires this up as a\n * special _internal_ 'on:begin' callback for modes with `beginKeywords`\n * @param {RegExpMatchArray} match\n * @param {CallbackResponse} response\n */\nfunction skipIfhasPrecedingDot(match, response) {\n const before = match.input[match.index - 1];\n if (before === \".\") {\n response.ignoreMatch();\n }\n}\n\n\n/**\n * `beginKeywords` syntactic sugar\n * @type {CompilerExt}\n */\nfunction beginKeywords(mode, parent) {\n if (!parent) return;\n if (!mode.beginKeywords) return;\n\n // for languages with keywords that include non-word characters checking for\n // a word boundary is not sufficient, so instead we check for a word boundary\n // or whitespace - this does no harm in any case since our keyword engine\n // doesn't allow spaces in keywords anyways and we still check for the boundary\n // first\n mode.begin = '\\\\b(' + mode.beginKeywords.split(' ').join('|') + ')(?!\\\\.)(?=\\\\b|\\\\s)';\n mode.__beforeBegin = skipIfhasPrecedingDot;\n mode.keywords = mode.keywords || mode.beginKeywords;\n delete mode.beginKeywords;\n\n // prevents double relevance, the keywords themselves provide\n // relevance, the mode doesn't need to double it\n // eslint-disable-next-line no-undefined\n if (mode.relevance === undefined) mode.relevance = 0;\n}\n\n/**\n * Allow `illegal` to contain an array of illegal values\n * @type {CompilerExt}\n */\nfunction compileIllegal(mode, _parent) {\n if (!Array.isArray(mode.illegal)) return;\n\n mode.illegal = either(...mode.illegal);\n}\n\n/**\n * `match` to match a single expression for readability\n * @type {CompilerExt}\n */\nfunction compileMatch(mode, _parent) {\n if (!mode.match) return;\n if (mode.begin || mode.end) throw new Error(\"begin & end are not supported with match\");\n\n mode.begin = mode.match;\n delete mode.match;\n}\n\n/**\n * provides the default 1 relevance to all modes\n * @type {CompilerExt}\n */\nfunction compileRelevance(mode, _parent) {\n // eslint-disable-next-line no-undefined\n if (mode.relevance === undefined) mode.relevance = 1;\n}\n\n// keywords that should have no default relevance value\nconst COMMON_KEYWORDS = [\n 'of',\n 'and',\n 'for',\n 'in',\n 'not',\n 'or',\n 'if',\n 'then',\n 'parent', // common variable name\n 'list', // common variable name\n 'value' // common variable name\n];\n\nconst DEFAULT_KEYWORD_CLASSNAME = \"keyword\";\n\n/**\n * Given raw keywords from a language definition, compile them.\n *\n * @param {string | Record | Array} rawKeywords\n * @param {boolean} caseInsensitive\n */\nfunction compileKeywords(rawKeywords, caseInsensitive, className = DEFAULT_KEYWORD_CLASSNAME) {\n /** @type KeywordDict */\n const compiledKeywords = {};\n\n // input can be a string of keywords, an array of keywords, or a object with\n // named keys representing className (which can then point to a string or array)\n if (typeof rawKeywords === 'string') {\n compileList(className, rawKeywords.split(\" \"));\n } else if (Array.isArray(rawKeywords)) {\n compileList(className, rawKeywords);\n } else {\n Object.keys(rawKeywords).forEach(function(className) {\n // collapse all our objects back into the parent object\n Object.assign(\n compiledKeywords,\n compileKeywords(rawKeywords[className], caseInsensitive, className)\n );\n });\n }\n return compiledKeywords;\n\n // ---\n\n /**\n * Compiles an individual list of keywords\n *\n * Ex: \"for if when while|5\"\n *\n * @param {string} className\n * @param {Array} keywordList\n */\n function compileList(className, keywordList) {\n if (caseInsensitive) {\n keywordList = keywordList.map(x => x.toLowerCase());\n }\n keywordList.forEach(function(keyword) {\n const pair = keyword.split('|');\n compiledKeywords[pair[0]] = [className, scoreForKeyword(pair[0], pair[1])];\n });\n }\n}\n\n/**\n * Returns the proper score for a given keyword\n *\n * Also takes into account comment keywords, which will be scored 0 UNLESS\n * another score has been manually assigned.\n * @param {string} keyword\n * @param {string} [providedScore]\n */\nfunction scoreForKeyword(keyword, providedScore) {\n // manual scores always win over common keywords\n // so you can force a score of 1 if you really insist\n if (providedScore) {\n return Number(providedScore);\n }\n\n return commonKeyword(keyword) ? 0 : 1;\n}\n\n/**\n * Determines if a given keyword is common or not\n *\n * @param {string} keyword */\nfunction commonKeyword(keyword) {\n return COMMON_KEYWORDS.includes(keyword.toLowerCase());\n}\n\n// compilation\n\n/**\n * Compiles a language definition result\n *\n * Given the raw result of a language definition (Language), compiles this so\n * that it is ready for highlighting code.\n * @param {Language} language\n * @param {{plugins: HLJSPlugin[]}} opts\n * @returns {CompiledLanguage}\n */\nfunction compileLanguage(language, { plugins }) {\n /**\n * Builds a regex with the case sensativility of the current language\n *\n * @param {RegExp | string} value\n * @param {boolean} [global]\n */\n function langRe(value, global) {\n return new RegExp(\n source(value),\n 'm' + (language.case_insensitive ? 'i' : '') + (global ? 'g' : '')\n );\n }\n\n /**\n Stores multiple regular expressions and allows you to quickly search for\n them all in a string simultaneously - returning the first match. It does\n this by creating a huge (a|b|c) regex - each individual item wrapped with ()\n and joined by `|` - using match groups to track position. When a match is\n found checking which position in the array has content allows us to figure\n out which of the original regexes / match groups triggered the match.\n\n The match object itself (the result of `Regex.exec`) is returned but also\n enhanced by merging in any meta-data that was registered with the regex.\n This is how we keep track of which mode matched, and what type of rule\n (`illegal`, `begin`, end, etc).\n */\n class MultiRegex {\n constructor() {\n this.matchIndexes = {};\n // @ts-ignore\n this.regexes = [];\n this.matchAt = 1;\n this.position = 0;\n }\n\n // @ts-ignore\n addRule(re, opts) {\n opts.position = this.position++;\n // @ts-ignore\n this.matchIndexes[this.matchAt] = opts;\n this.regexes.push([opts, re]);\n this.matchAt += countMatchGroups(re) + 1;\n }\n\n compile() {\n if (this.regexes.length === 0) {\n // avoids the need to check length every time exec is called\n // @ts-ignore\n this.exec = () => null;\n }\n const terminators = this.regexes.map(el => el[1]);\n this.matcherRe = langRe(join(terminators), true);\n this.lastIndex = 0;\n }\n\n /** @param {string} s */\n exec(s) {\n this.matcherRe.lastIndex = this.lastIndex;\n const match = this.matcherRe.exec(s);\n if (!match) { return null; }\n\n // eslint-disable-next-line no-undefined\n const i = match.findIndex((el, i) => i > 0 && el !== undefined);\n // @ts-ignore\n const matchData = this.matchIndexes[i];\n // trim off any earlier non-relevant match groups (ie, the other regex\n // match groups that make up the multi-matcher)\n match.splice(0, i);\n\n return Object.assign(match, matchData);\n }\n }\n\n /*\n Created to solve the key deficiently with MultiRegex - there is no way to\n test for multiple matches at a single location. Why would we need to do\n that? In the future a more dynamic engine will allow certain matches to be\n ignored. An example: if we matched say the 3rd regex in a large group but\n decided to ignore it - we'd need to started testing again at the 4th\n regex... but MultiRegex itself gives us no real way to do that.\n\n So what this class creates MultiRegexs on the fly for whatever search\n position they are needed.\n\n NOTE: These additional MultiRegex objects are created dynamically. For most\n grammars most of the time we will never actually need anything more than the\n first MultiRegex - so this shouldn't have too much overhead.\n\n Say this is our search group, and we match regex3, but wish to ignore it.\n\n regex1 | regex2 | regex3 | regex4 | regex5 ' ie, startAt = 0\n\n What we need is a new MultiRegex that only includes the remaining\n possibilities:\n\n regex4 | regex5 ' ie, startAt = 3\n\n This class wraps all that complexity up in a simple API... `startAt` decides\n where in the array of expressions to start doing the matching. It\n auto-increments, so if a match is found at position 2, then startAt will be\n set to 3. If the end is reached startAt will return to 0.\n\n MOST of the time the parser will be setting startAt manually to 0.\n */\n class ResumableMultiRegex {\n constructor() {\n // @ts-ignore\n this.rules = [];\n // @ts-ignore\n this.multiRegexes = [];\n this.count = 0;\n\n this.lastIndex = 0;\n this.regexIndex = 0;\n }\n\n // @ts-ignore\n getMatcher(index) {\n if (this.multiRegexes[index]) return this.multiRegexes[index];\n\n const matcher = new MultiRegex();\n this.rules.slice(index).forEach(([re, opts]) => matcher.addRule(re, opts));\n matcher.compile();\n this.multiRegexes[index] = matcher;\n return matcher;\n }\n\n resumingScanAtSamePosition() {\n return this.regexIndex !== 0;\n }\n\n considerAll() {\n this.regexIndex = 0;\n }\n\n // @ts-ignore\n addRule(re, opts) {\n this.rules.push([re, opts]);\n if (opts.type === \"begin\") this.count++;\n }\n\n /** @param {string} s */\n exec(s) {\n const m = this.getMatcher(this.regexIndex);\n m.lastIndex = this.lastIndex;\n let result = m.exec(s);\n\n // The following is because we have no easy way to say \"resume scanning at the\n // existing position but also skip the current rule ONLY\". What happens is\n // all prior rules are also skipped which can result in matching the wrong\n // thing. Example of matching \"booger\":\n\n // our matcher is [string, \"booger\", number]\n //\n // ....booger....\n\n // if \"booger\" is ignored then we'd really need a regex to scan from the\n // SAME position for only: [string, number] but ignoring \"booger\" (if it\n // was the first match), a simple resume would scan ahead who knows how\n // far looking only for \"number\", ignoring potential string matches (or\n // future \"booger\" matches that might be valid.)\n\n // So what we do: We execute two matchers, one resuming at the same\n // position, but the second full matcher starting at the position after:\n\n // /--- resume first regex match here (for [number])\n // |/---- full match here for [string, \"booger\", number]\n // vv\n // ....booger....\n\n // Which ever results in a match first is then used. So this 3-4 step\n // process essentially allows us to say \"match at this position, excluding\n // a prior rule that was ignored\".\n //\n // 1. Match \"booger\" first, ignore. Also proves that [string] does non match.\n // 2. Resume matching for [number]\n // 3. Match at index + 1 for [string, \"booger\", number]\n // 4. If #2 and #3 result in matches, which came first?\n if (this.resumingScanAtSamePosition()) {\n if (result && result.index === this.lastIndex) ; else { // use the second matcher result\n const m2 = this.getMatcher(0);\n m2.lastIndex = this.lastIndex + 1;\n result = m2.exec(s);\n }\n }\n\n if (result) {\n this.regexIndex += result.position + 1;\n if (this.regexIndex === this.count) {\n // wrap-around to considering all matches again\n this.considerAll();\n }\n }\n\n return result;\n }\n }\n\n /**\n * Given a mode, builds a huge ResumableMultiRegex that can be used to walk\n * the content and find matches.\n *\n * @param {CompiledMode} mode\n * @returns {ResumableMultiRegex}\n */\n function buildModeRegex(mode) {\n const mm = new ResumableMultiRegex();\n\n mode.contains.forEach(term => mm.addRule(term.begin, { rule: term, type: \"begin\" }));\n\n if (mode.terminatorEnd) {\n mm.addRule(mode.terminatorEnd, { type: \"end\" });\n }\n if (mode.illegal) {\n mm.addRule(mode.illegal, { type: \"illegal\" });\n }\n\n return mm;\n }\n\n /** skip vs abort vs ignore\n *\n * @skip - The mode is still entered and exited normally (and contains rules apply),\n * but all content is held and added to the parent buffer rather than being\n * output when the mode ends. Mostly used with `sublanguage` to build up\n * a single large buffer than can be parsed by sublanguage.\n *\n * - The mode begin ands ends normally.\n * - Content matched is added to the parent mode buffer.\n * - The parser cursor is moved forward normally.\n *\n * @abort - A hack placeholder until we have ignore. Aborts the mode (as if it\n * never matched) but DOES NOT continue to match subsequent `contains`\n * modes. Abort is bad/suboptimal because it can result in modes\n * farther down not getting applied because an earlier rule eats the\n * content but then aborts.\n *\n * - The mode does not begin.\n * - Content matched by `begin` is added to the mode buffer.\n * - The parser cursor is moved forward accordingly.\n *\n * @ignore - Ignores the mode (as if it never matched) and continues to match any\n * subsequent `contains` modes. Ignore isn't technically possible with\n * the current parser implementation.\n *\n * - The mode does not begin.\n * - Content matched by `begin` is ignored.\n * - The parser cursor is not moved forward.\n */\n\n /**\n * Compiles an individual mode\n *\n * This can raise an error if the mode contains certain detectable known logic\n * issues.\n * @param {Mode} mode\n * @param {CompiledMode | null} [parent]\n * @returns {CompiledMode | never}\n */\n function compileMode(mode, parent) {\n const cmode = /** @type CompiledMode */ (mode);\n if (mode.isCompiled) return cmode;\n\n [\n // do this early so compiler extensions generally don't have to worry about\n // the distinction between match/begin\n compileMatch\n ].forEach(ext => ext(mode, parent));\n\n language.compilerExtensions.forEach(ext => ext(mode, parent));\n\n // __beforeBegin is considered private API, internal use only\n mode.__beforeBegin = null;\n\n [\n beginKeywords,\n // do this later so compiler extensions that come earlier have access to the\n // raw array if they wanted to perhaps manipulate it, etc.\n compileIllegal,\n // default to 1 relevance if not specified\n compileRelevance\n ].forEach(ext => ext(mode, parent));\n\n mode.isCompiled = true;\n\n let keywordPattern = null;\n if (typeof mode.keywords === \"object\") {\n keywordPattern = mode.keywords.$pattern;\n delete mode.keywords.$pattern;\n }\n\n if (mode.keywords) {\n mode.keywords = compileKeywords(mode.keywords, language.case_insensitive);\n }\n\n // both are not allowed\n if (mode.lexemes && keywordPattern) {\n throw new Error(\"ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) \");\n }\n\n // `mode.lexemes` was the old standard before we added and now recommend\n // using `keywords.$pattern` to pass the keyword pattern\n keywordPattern = keywordPattern || mode.lexemes || /\\w+/;\n cmode.keywordPatternRe = langRe(keywordPattern, true);\n\n if (parent) {\n if (!mode.begin) mode.begin = /\\B|\\b/;\n cmode.beginRe = langRe(mode.begin);\n if (mode.endSameAsBegin) mode.end = mode.begin;\n if (!mode.end && !mode.endsWithParent) mode.end = /\\B|\\b/;\n if (mode.end) cmode.endRe = langRe(mode.end);\n cmode.terminatorEnd = source(mode.end) || '';\n if (mode.endsWithParent && parent.terminatorEnd) {\n cmode.terminatorEnd += (mode.end ? '|' : '') + parent.terminatorEnd;\n }\n }\n if (mode.illegal) cmode.illegalRe = langRe(/** @type {RegExp | string} */ (mode.illegal));\n if (!mode.contains) mode.contains = [];\n\n mode.contains = [].concat(...mode.contains.map(function(c) {\n return expandOrCloneMode(c === 'self' ? mode : c);\n }));\n mode.contains.forEach(function(c) { compileMode(/** @type Mode */ (c), cmode); });\n\n if (mode.starts) {\n compileMode(mode.starts, parent);\n }\n\n cmode.matcher = buildModeRegex(cmode);\n return cmode;\n }\n\n if (!language.compilerExtensions) language.compilerExtensions = [];\n\n // self is not valid at the top-level\n if (language.contains && language.contains.includes('self')) {\n throw new Error(\"ERR: contains `self` is not supported at the top-level of a language. See documentation.\");\n }\n\n // we need a null object, which inherit will guarantee\n language.classNameAliases = inherit(language.classNameAliases || {});\n\n return compileMode(/** @type Mode */ (language));\n}\n\n/**\n * Determines if a mode has a dependency on it's parent or not\n *\n * If a mode does have a parent dependency then often we need to clone it if\n * it's used in multiple places so that each copy points to the correct parent,\n * where-as modes without a parent can often safely be re-used at the bottom of\n * a mode chain.\n *\n * @param {Mode | null} mode\n * @returns {boolean} - is there a dependency on the parent?\n * */\nfunction dependencyOnParent(mode) {\n if (!mode) return false;\n\n return mode.endsWithParent || dependencyOnParent(mode.starts);\n}\n\n/**\n * Expands a mode or clones it if necessary\n *\n * This is necessary for modes with parental dependenceis (see notes on\n * `dependencyOnParent`) and for nodes that have `variants` - which must then be\n * exploded into their own individual modes at compile time.\n *\n * @param {Mode} mode\n * @returns {Mode | Mode[]}\n * */\nfunction expandOrCloneMode(mode) {\n if (mode.variants && !mode.cachedVariants) {\n mode.cachedVariants = mode.variants.map(function(variant) {\n return inherit(mode, { variants: null }, variant);\n });\n }\n\n // EXPAND\n // if we have variants then essentially \"replace\" the mode with the variants\n // this happens in compileMode, where this function is called from\n if (mode.cachedVariants) {\n return mode.cachedVariants;\n }\n\n // CLONE\n // if we have dependencies on parents then we need a unique\n // instance of ourselves, so we can be reused with many\n // different parents without issue\n if (dependencyOnParent(mode)) {\n return inherit(mode, { starts: mode.starts ? inherit(mode.starts) : null });\n }\n\n if (Object.isFrozen(mode)) {\n return inherit(mode);\n }\n\n // no special dependency issues, just return ourselves\n return mode;\n}\n\nvar version = \"10.7.3\";\n\n// @ts-nocheck\n\nfunction hasValueOrEmptyAttribute(value) {\n return Boolean(value || value === \"\");\n}\n\nfunction BuildVuePlugin(hljs) {\n const Component = {\n props: [\"language\", \"code\", \"autodetect\"],\n data: function() {\n return {\n detectedLanguage: \"\",\n unknownLanguage: false\n };\n },\n computed: {\n className() {\n if (this.unknownLanguage) return \"\";\n\n return \"hljs \" + this.detectedLanguage;\n },\n highlighted() {\n // no idea what language to use, return raw code\n if (!this.autoDetect && !hljs.getLanguage(this.language)) {\n console.warn(`The language \"${this.language}\" you specified could not be found.`);\n this.unknownLanguage = true;\n return escapeHTML(this.code);\n }\n\n let result = {};\n if (this.autoDetect) {\n result = hljs.highlightAuto(this.code);\n this.detectedLanguage = result.language;\n } else {\n result = hljs.highlight(this.language, this.code, this.ignoreIllegals);\n this.detectedLanguage = this.language;\n }\n return result.value;\n },\n autoDetect() {\n return !this.language || hasValueOrEmptyAttribute(this.autodetect);\n },\n ignoreIllegals() {\n return true;\n }\n },\n // this avoids needing to use a whole Vue compilation pipeline just\n // to build Highlight.js\n render(createElement) {\n return createElement(\"pre\", {}, [\n createElement(\"code\", {\n class: this.className,\n domProps: { innerHTML: this.highlighted }\n })\n ]);\n }\n // template: `
`\n };\n\n const VuePlugin = {\n install(Vue) {\n Vue.component('highlightjs', Component);\n }\n };\n\n return { Component, VuePlugin };\n}\n\n/* plugin itself */\n\n/** @type {HLJSPlugin} */\nconst mergeHTMLPlugin = {\n \"after:highlightElement\": ({ el, result, text }) => {\n const originalStream = nodeStream(el);\n if (!originalStream.length) return;\n\n const resultNode = document.createElement('div');\n resultNode.innerHTML = result.value;\n result.value = mergeStreams(originalStream, nodeStream(resultNode), text);\n }\n};\n\n/* Stream merging support functions */\n\n/**\n * @typedef Event\n * @property {'start'|'stop'} event\n * @property {number} offset\n * @property {Node} node\n */\n\n/**\n * @param {Node} node\n */\nfunction tag(node) {\n return node.nodeName.toLowerCase();\n}\n\n/**\n * @param {Node} node\n */\nfunction nodeStream(node) {\n /** @type Event[] */\n const result = [];\n (function _nodeStream(node, offset) {\n for (let child = node.firstChild; child; child = child.nextSibling) {\n if (child.nodeType === 3) {\n offset += child.nodeValue.length;\n } else if (child.nodeType === 1) {\n result.push({\n event: 'start',\n offset: offset,\n node: child\n });\n offset = _nodeStream(child, offset);\n // Prevent void elements from having an end tag that would actually\n // double them in the output. There are more void elements in HTML\n // but we list only those realistically expected in code display.\n if (!tag(child).match(/br|hr|img|input/)) {\n result.push({\n event: 'stop',\n offset: offset,\n node: child\n });\n }\n }\n }\n return offset;\n })(node, 0);\n return result;\n}\n\n/**\n * @param {any} original - the original stream\n * @param {any} highlighted - stream of the highlighted source\n * @param {string} value - the original source itself\n */\nfunction mergeStreams(original, highlighted, value) {\n let processed = 0;\n let result = '';\n const nodeStack = [];\n\n function selectStream() {\n if (!original.length || !highlighted.length) {\n return original.length ? original : highlighted;\n }\n if (original[0].offset !== highlighted[0].offset) {\n return (original[0].offset < highlighted[0].offset) ? original : highlighted;\n }\n\n /*\n To avoid starting the stream just before it should stop the order is\n ensured that original always starts first and closes last:\n\n if (event1 == 'start' && event2 == 'start')\n return original;\n if (event1 == 'start' && event2 == 'stop')\n return highlighted;\n if (event1 == 'stop' && event2 == 'start')\n return original;\n if (event1 == 'stop' && event2 == 'stop')\n return highlighted;\n\n ... which is collapsed to:\n */\n return highlighted[0].event === 'start' ? original : highlighted;\n }\n\n /**\n * @param {Node} node\n */\n function open(node) {\n /** @param {Attr} attr */\n function attributeString(attr) {\n return ' ' + attr.nodeName + '=\"' + escapeHTML(attr.value) + '\"';\n }\n // @ts-ignore\n result += '<' + tag(node) + [].map.call(node.attributes, attributeString).join('') + '>';\n }\n\n /**\n * @param {Node} node\n */\n function close(node) {\n result += '';\n }\n\n /**\n * @param {Event} event\n */\n function render(event) {\n (event.event === 'start' ? open : close)(event.node);\n }\n\n while (original.length || highlighted.length) {\n let stream = selectStream();\n result += escapeHTML(value.substring(processed, stream[0].offset));\n processed = stream[0].offset;\n if (stream === original) {\n /*\n On any opening or closing tag of the original markup we first close\n the entire highlighted node stack, then render the original tag along\n with all the following original tags at the same offset and then\n reopen all the tags on the highlighted stack.\n */\n nodeStack.reverse().forEach(close);\n do {\n render(stream.splice(0, 1)[0]);\n stream = selectStream();\n } while (stream === original && stream.length && stream[0].offset === processed);\n nodeStack.reverse().forEach(open);\n } else {\n if (stream[0].event === 'start') {\n nodeStack.push(stream[0].node);\n } else {\n nodeStack.pop();\n }\n render(stream.splice(0, 1)[0]);\n }\n }\n return result + escapeHTML(value.substr(processed));\n}\n\n/*\n\nFor the reasoning behind this please see:\nhttps://github.com/highlightjs/highlight.js/issues/2880#issuecomment-747275419\n\n*/\n\n/**\n * @type {Record}\n */\nconst seenDeprecations = {};\n\n/**\n * @param {string} message\n */\nconst error = (message) => {\n console.error(message);\n};\n\n/**\n * @param {string} message\n * @param {any} args\n */\nconst warn = (message, ...args) => {\n console.log(`WARN: ${message}`, ...args);\n};\n\n/**\n * @param {string} version\n * @param {string} message\n */\nconst deprecated = (version, message) => {\n if (seenDeprecations[`${version}/${message}`]) return;\n\n console.log(`Deprecated as of ${version}. ${message}`);\n seenDeprecations[`${version}/${message}`] = true;\n};\n\n/*\nSyntax highlighting with language autodetection.\nhttps://highlightjs.org/\n*/\n\nconst escape$1 = escapeHTML;\nconst inherit$1 = inherit;\nconst NO_MATCH = Symbol(\"nomatch\");\n\n/**\n * @param {any} hljs - object that is extended (legacy)\n * @returns {HLJSApi}\n */\nconst HLJS = function(hljs) {\n // Global internal variables used within the highlight.js library.\n /** @type {Record} */\n const languages = Object.create(null);\n /** @type {Record} */\n const aliases = Object.create(null);\n /** @type {HLJSPlugin[]} */\n const plugins = [];\n\n // safe/production mode - swallows more errors, tries to keep running\n // even if a single syntax or parse hits a fatal error\n let SAFE_MODE = true;\n const fixMarkupRe = /(^(<[^>]+>|\\t|)+|\\n)/gm;\n const LANGUAGE_NOT_FOUND = \"Could not find the language '{}', did you forget to load/include a language module?\";\n /** @type {Language} */\n const PLAINTEXT_LANGUAGE = { disableAutodetect: true, name: 'Plain text', contains: [] };\n\n // Global options used when within external APIs. This is modified when\n // calling the `hljs.configure` function.\n /** @type HLJSOptions */\n let options = {\n noHighlightRe: /^(no-?highlight)$/i,\n languageDetectRe: /\\blang(?:uage)?-([\\w-]+)\\b/i,\n classPrefix: 'hljs-',\n tabReplace: null,\n useBR: false,\n languages: null,\n // beta configuration options, subject to change, welcome to discuss\n // https://github.com/highlightjs/highlight.js/issues/1086\n __emitter: TokenTreeEmitter\n };\n\n /* Utility functions */\n\n /**\n * Tests a language name to see if highlighting should be skipped\n * @param {string} languageName\n */\n function shouldNotHighlight(languageName) {\n return options.noHighlightRe.test(languageName);\n }\n\n /**\n * @param {HighlightedHTMLElement} block - the HTML element to determine language for\n */\n function blockLanguage(block) {\n let classes = block.className + ' ';\n\n classes += block.parentNode ? block.parentNode.className : '';\n\n // language-* takes precedence over non-prefixed class names.\n const match = options.languageDetectRe.exec(classes);\n if (match) {\n const language = getLanguage(match[1]);\n if (!language) {\n warn(LANGUAGE_NOT_FOUND.replace(\"{}\", match[1]));\n warn(\"Falling back to no-highlight mode for this block.\", block);\n }\n return language ? match[1] : 'no-highlight';\n }\n\n return classes\n .split(/\\s+/)\n .find((_class) => shouldNotHighlight(_class) || getLanguage(_class));\n }\n\n /**\n * Core highlighting function.\n *\n * OLD API\n * highlight(lang, code, ignoreIllegals, continuation)\n *\n * NEW API\n * highlight(code, {lang, ignoreIllegals})\n *\n * @param {string} codeOrlanguageName - the language to use for highlighting\n * @param {string | HighlightOptions} optionsOrCode - the code to highlight\n * @param {boolean} [ignoreIllegals] - whether to ignore illegal matches, default is to bail\n * @param {CompiledMode} [continuation] - current continuation mode, if any\n *\n * @returns {HighlightResult} Result - an object that represents the result\n * @property {string} language - the language name\n * @property {number} relevance - the relevance score\n * @property {string} value - the highlighted HTML code\n * @property {string} code - the original raw code\n * @property {CompiledMode} top - top of the current mode stack\n * @property {boolean} illegal - indicates whether any illegal matches were found\n */\n function highlight(codeOrlanguageName, optionsOrCode, ignoreIllegals, continuation) {\n let code = \"\";\n let languageName = \"\";\n if (typeof optionsOrCode === \"object\") {\n code = codeOrlanguageName;\n ignoreIllegals = optionsOrCode.ignoreIllegals;\n languageName = optionsOrCode.language;\n // continuation not supported at all via the new API\n // eslint-disable-next-line no-undefined\n continuation = undefined;\n } else {\n // old API\n deprecated(\"10.7.0\", \"highlight(lang, code, ...args) has been deprecated.\");\n deprecated(\"10.7.0\", \"Please use highlight(code, options) instead.\\nhttps://github.com/highlightjs/highlight.js/issues/2277\");\n languageName = codeOrlanguageName;\n code = optionsOrCode;\n }\n\n /** @type {BeforeHighlightContext} */\n const context = {\n code,\n language: languageName\n };\n // the plugin can change the desired language or the code to be highlighted\n // just be changing the object it was passed\n fire(\"before:highlight\", context);\n\n // a before plugin can usurp the result completely by providing it's own\n // in which case we don't even need to call highlight\n const result = context.result\n ? context.result\n : _highlight(context.language, context.code, ignoreIllegals, continuation);\n\n result.code = context.code;\n // the plugin can change anything in result to suite it\n fire(\"after:highlight\", result);\n\n return result;\n }\n\n /**\n * private highlight that's used internally and does not fire callbacks\n *\n * @param {string} languageName - the language to use for highlighting\n * @param {string} codeToHighlight - the code to highlight\n * @param {boolean?} [ignoreIllegals] - whether to ignore illegal matches, default is to bail\n * @param {CompiledMode?} [continuation] - current continuation mode, if any\n * @returns {HighlightResult} - result of the highlight operation\n */\n function _highlight(languageName, codeToHighlight, ignoreIllegals, continuation) {\n /**\n * Return keyword data if a match is a keyword\n * @param {CompiledMode} mode - current mode\n * @param {RegExpMatchArray} match - regexp match data\n * @returns {KeywordData | false}\n */\n function keywordData(mode, match) {\n const matchText = language.case_insensitive ? match[0].toLowerCase() : match[0];\n return Object.prototype.hasOwnProperty.call(mode.keywords, matchText) && mode.keywords[matchText];\n }\n\n function processKeywords() {\n if (!top.keywords) {\n emitter.addText(modeBuffer);\n return;\n }\n\n let lastIndex = 0;\n top.keywordPatternRe.lastIndex = 0;\n let match = top.keywordPatternRe.exec(modeBuffer);\n let buf = \"\";\n\n while (match) {\n buf += modeBuffer.substring(lastIndex, match.index);\n const data = keywordData(top, match);\n if (data) {\n const [kind, keywordRelevance] = data;\n emitter.addText(buf);\n buf = \"\";\n\n relevance += keywordRelevance;\n if (kind.startsWith(\"_\")) {\n // _ implied for relevance only, do not highlight\n // by applying a class name\n buf += match[0];\n } else {\n const cssClass = language.classNameAliases[kind] || kind;\n emitter.addKeyword(match[0], cssClass);\n }\n } else {\n buf += match[0];\n }\n lastIndex = top.keywordPatternRe.lastIndex;\n match = top.keywordPatternRe.exec(modeBuffer);\n }\n buf += modeBuffer.substr(lastIndex);\n emitter.addText(buf);\n }\n\n function processSubLanguage() {\n if (modeBuffer === \"\") return;\n /** @type HighlightResult */\n let result = null;\n\n if (typeof top.subLanguage === 'string') {\n if (!languages[top.subLanguage]) {\n emitter.addText(modeBuffer);\n return;\n }\n result = _highlight(top.subLanguage, modeBuffer, true, continuations[top.subLanguage]);\n continuations[top.subLanguage] = /** @type {CompiledMode} */ (result.top);\n } else {\n result = highlightAuto(modeBuffer, top.subLanguage.length ? top.subLanguage : null);\n }\n\n // Counting embedded language score towards the host language may be disabled\n // with zeroing the containing mode relevance. Use case in point is Markdown that\n // allows XML everywhere and makes every XML snippet to have a much larger Markdown\n // score.\n if (top.relevance > 0) {\n relevance += result.relevance;\n }\n emitter.addSublanguage(result.emitter, result.language);\n }\n\n function processBuffer() {\n if (top.subLanguage != null) {\n processSubLanguage();\n } else {\n processKeywords();\n }\n modeBuffer = '';\n }\n\n /**\n * @param {Mode} mode - new mode to start\n */\n function startNewMode(mode) {\n if (mode.className) {\n emitter.openNode(language.classNameAliases[mode.className] || mode.className);\n }\n top = Object.create(mode, { parent: { value: top } });\n return top;\n }\n\n /**\n * @param {CompiledMode } mode - the mode to potentially end\n * @param {RegExpMatchArray} match - the latest match\n * @param {string} matchPlusRemainder - match plus remainder of content\n * @returns {CompiledMode | void} - the next mode, or if void continue on in current mode\n */\n function endOfMode(mode, match, matchPlusRemainder) {\n let matched = startsWith(mode.endRe, matchPlusRemainder);\n\n if (matched) {\n if (mode[\"on:end\"]) {\n const resp = new Response(mode);\n mode[\"on:end\"](match, resp);\n if (resp.isMatchIgnored) matched = false;\n }\n\n if (matched) {\n while (mode.endsParent && mode.parent) {\n mode = mode.parent;\n }\n return mode;\n }\n }\n // even if on:end fires an `ignore` it's still possible\n // that we might trigger the end node because of a parent mode\n if (mode.endsWithParent) {\n return endOfMode(mode.parent, match, matchPlusRemainder);\n }\n }\n\n /**\n * Handle matching but then ignoring a sequence of text\n *\n * @param {string} lexeme - string containing full match text\n */\n function doIgnore(lexeme) {\n if (top.matcher.regexIndex === 0) {\n // no more regexs to potentially match here, so we move the cursor forward one\n // space\n modeBuffer += lexeme[0];\n return 1;\n } else {\n // no need to move the cursor, we still have additional regexes to try and\n // match at this very spot\n resumeScanAtSamePosition = true;\n return 0;\n }\n }\n\n /**\n * Handle the start of a new potential mode match\n *\n * @param {EnhancedMatch} match - the current match\n * @returns {number} how far to advance the parse cursor\n */\n function doBeginMatch(match) {\n const lexeme = match[0];\n const newMode = match.rule;\n\n const resp = new Response(newMode);\n // first internal before callbacks, then the public ones\n const beforeCallbacks = [newMode.__beforeBegin, newMode[\"on:begin\"]];\n for (const cb of beforeCallbacks) {\n if (!cb) continue;\n cb(match, resp);\n if (resp.isMatchIgnored) return doIgnore(lexeme);\n }\n\n if (newMode && newMode.endSameAsBegin) {\n newMode.endRe = escape(lexeme);\n }\n\n if (newMode.skip) {\n modeBuffer += lexeme;\n } else {\n if (newMode.excludeBegin) {\n modeBuffer += lexeme;\n }\n processBuffer();\n if (!newMode.returnBegin && !newMode.excludeBegin) {\n modeBuffer = lexeme;\n }\n }\n startNewMode(newMode);\n // if (mode[\"after:begin\"]) {\n // let resp = new Response(mode);\n // mode[\"after:begin\"](match, resp);\n // }\n return newMode.returnBegin ? 0 : lexeme.length;\n }\n\n /**\n * Handle the potential end of mode\n *\n * @param {RegExpMatchArray} match - the current match\n */\n function doEndMatch(match) {\n const lexeme = match[0];\n const matchPlusRemainder = codeToHighlight.substr(match.index);\n\n const endMode = endOfMode(top, match, matchPlusRemainder);\n if (!endMode) { return NO_MATCH; }\n\n const origin = top;\n if (origin.skip) {\n modeBuffer += lexeme;\n } else {\n if (!(origin.returnEnd || origin.excludeEnd)) {\n modeBuffer += lexeme;\n }\n processBuffer();\n if (origin.excludeEnd) {\n modeBuffer = lexeme;\n }\n }\n do {\n if (top.className) {\n emitter.closeNode();\n }\n if (!top.skip && !top.subLanguage) {\n relevance += top.relevance;\n }\n top = top.parent;\n } while (top !== endMode.parent);\n if (endMode.starts) {\n if (endMode.endSameAsBegin) {\n endMode.starts.endRe = endMode.endRe;\n }\n startNewMode(endMode.starts);\n }\n return origin.returnEnd ? 0 : lexeme.length;\n }\n\n function processContinuations() {\n const list = [];\n for (let current = top; current !== language; current = current.parent) {\n if (current.className) {\n list.unshift(current.className);\n }\n }\n list.forEach(item => emitter.openNode(item));\n }\n\n /** @type {{type?: MatchType, index?: number, rule?: Mode}}} */\n let lastMatch = {};\n\n /**\n * Process an individual match\n *\n * @param {string} textBeforeMatch - text preceeding the match (since the last match)\n * @param {EnhancedMatch} [match] - the match itself\n */\n function processLexeme(textBeforeMatch, match) {\n const lexeme = match && match[0];\n\n // add non-matched text to the current mode buffer\n modeBuffer += textBeforeMatch;\n\n if (lexeme == null) {\n processBuffer();\n return 0;\n }\n\n // we've found a 0 width match and we're stuck, so we need to advance\n // this happens when we have badly behaved rules that have optional matchers to the degree that\n // sometimes they can end up matching nothing at all\n // Ref: https://github.com/highlightjs/highlight.js/issues/2140\n if (lastMatch.type === \"begin\" && match.type === \"end\" && lastMatch.index === match.index && lexeme === \"\") {\n // spit the \"skipped\" character that our regex choked on back into the output sequence\n modeBuffer += codeToHighlight.slice(match.index, match.index + 1);\n if (!SAFE_MODE) {\n /** @type {AnnotatedError} */\n const err = new Error('0 width match regex');\n err.languageName = languageName;\n err.badRule = lastMatch.rule;\n throw err;\n }\n return 1;\n }\n lastMatch = match;\n\n if (match.type === \"begin\") {\n return doBeginMatch(match);\n } else if (match.type === \"illegal\" && !ignoreIllegals) {\n // illegal match, we do not continue processing\n /** @type {AnnotatedError} */\n const err = new Error('Illegal lexeme \"' + lexeme + '\" for mode \"' + (top.className || '') + '\"');\n err.mode = top;\n throw err;\n } else if (match.type === \"end\") {\n const processed = doEndMatch(match);\n if (processed !== NO_MATCH) {\n return processed;\n }\n }\n\n // edge case for when illegal matches $ (end of line) which is technically\n // a 0 width match but not a begin/end match so it's not caught by the\n // first handler (when ignoreIllegals is true)\n if (match.type === \"illegal\" && lexeme === \"\") {\n // advance so we aren't stuck in an infinite loop\n return 1;\n }\n\n // infinite loops are BAD, this is a last ditch catch all. if we have a\n // decent number of iterations yet our index (cursor position in our\n // parsing) still 3x behind our index then something is very wrong\n // so we bail\n if (iterations > 100000 && iterations > match.index * 3) {\n const err = new Error('potential infinite loop, way more iterations than matches');\n throw err;\n }\n\n /*\n Why might be find ourselves here? Only one occasion now. An end match that was\n triggered but could not be completed. When might this happen? When an `endSameasBegin`\n rule sets the end rule to a specific match. Since the overall mode termination rule that's\n being used to scan the text isn't recompiled that means that any match that LOOKS like\n the end (but is not, because it is not an exact match to the beginning) will\n end up here. A definite end match, but when `doEndMatch` tries to \"reapply\"\n the end rule and fails to match, we wind up here, and just silently ignore the end.\n\n This causes no real harm other than stopping a few times too many.\n */\n\n modeBuffer += lexeme;\n return lexeme.length;\n }\n\n const language = getLanguage(languageName);\n if (!language) {\n error(LANGUAGE_NOT_FOUND.replace(\"{}\", languageName));\n throw new Error('Unknown language: \"' + languageName + '\"');\n }\n\n const md = compileLanguage(language, { plugins });\n let result = '';\n /** @type {CompiledMode} */\n let top = continuation || md;\n /** @type Record */\n const continuations = {}; // keep continuations for sub-languages\n const emitter = new options.__emitter(options);\n processContinuations();\n let modeBuffer = '';\n let relevance = 0;\n let index = 0;\n let iterations = 0;\n let resumeScanAtSamePosition = false;\n\n try {\n top.matcher.considerAll();\n\n for (;;) {\n iterations++;\n if (resumeScanAtSamePosition) {\n // only regexes not matched previously will now be\n // considered for a potential match\n resumeScanAtSamePosition = false;\n } else {\n top.matcher.considerAll();\n }\n top.matcher.lastIndex = index;\n\n const match = top.matcher.exec(codeToHighlight);\n // console.log(\"match\", match[0], match.rule && match.rule.begin)\n\n if (!match) break;\n\n const beforeMatch = codeToHighlight.substring(index, match.index);\n const processedCount = processLexeme(beforeMatch, match);\n index = match.index + processedCount;\n }\n processLexeme(codeToHighlight.substr(index));\n emitter.closeAllNodes();\n emitter.finalize();\n result = emitter.toHTML();\n\n return {\n // avoid possible breakage with v10 clients expecting\n // this to always be an integer\n relevance: Math.floor(relevance),\n value: result,\n language: languageName,\n illegal: false,\n emitter: emitter,\n top: top\n };\n } catch (err) {\n if (err.message && err.message.includes('Illegal')) {\n return {\n illegal: true,\n illegalBy: {\n msg: err.message,\n context: codeToHighlight.slice(index - 100, index + 100),\n mode: err.mode\n },\n sofar: result,\n relevance: 0,\n value: escape$1(codeToHighlight),\n emitter: emitter\n };\n } else if (SAFE_MODE) {\n return {\n illegal: false,\n relevance: 0,\n value: escape$1(codeToHighlight),\n emitter: emitter,\n language: languageName,\n top: top,\n errorRaised: err\n };\n } else {\n throw err;\n }\n }\n }\n\n /**\n * returns a valid highlight result, without actually doing any actual work,\n * auto highlight starts with this and it's possible for small snippets that\n * auto-detection may not find a better match\n * @param {string} code\n * @returns {HighlightResult}\n */\n function justTextHighlightResult(code) {\n const result = {\n relevance: 0,\n emitter: new options.__emitter(options),\n value: escape$1(code),\n illegal: false,\n top: PLAINTEXT_LANGUAGE\n };\n result.emitter.addText(code);\n return result;\n }\n\n /**\n Highlighting with language detection. Accepts a string with the code to\n highlight. Returns an object with the following properties:\n\n - language (detected language)\n - relevance (int)\n - value (an HTML string with highlighting markup)\n - second_best (object with the same structure for second-best heuristically\n detected language, may be absent)\n\n @param {string} code\n @param {Array} [languageSubset]\n @returns {AutoHighlightResult}\n */\n function highlightAuto(code, languageSubset) {\n languageSubset = languageSubset || options.languages || Object.keys(languages);\n const plaintext = justTextHighlightResult(code);\n\n const results = languageSubset.filter(getLanguage).filter(autoDetection).map(name =>\n _highlight(name, code, false)\n );\n results.unshift(plaintext); // plaintext is always an option\n\n const sorted = results.sort((a, b) => {\n // sort base on relevance\n if (a.relevance !== b.relevance) return b.relevance - a.relevance;\n\n // always award the tie to the base language\n // ie if C++ and Arduino are tied, it's more likely to be C++\n if (a.language && b.language) {\n if (getLanguage(a.language).supersetOf === b.language) {\n return 1;\n } else if (getLanguage(b.language).supersetOf === a.language) {\n return -1;\n }\n }\n\n // otherwise say they are equal, which has the effect of sorting on\n // relevance while preserving the original ordering - which is how ties\n // have historically been settled, ie the language that comes first always\n // wins in the case of a tie\n return 0;\n });\n\n const [best, secondBest] = sorted;\n\n /** @type {AutoHighlightResult} */\n const result = best;\n result.second_best = secondBest;\n\n return result;\n }\n\n /**\n Post-processing of the highlighted markup:\n\n - replace TABs with something more useful\n - replace real line-breaks with '
' for non-pre containers\n\n @param {string} html\n @returns {string}\n */\n function fixMarkup(html) {\n if (!(options.tabReplace || options.useBR)) {\n return html;\n }\n\n return html.replace(fixMarkupRe, match => {\n if (match === '\\n') {\n return options.useBR ? '
' : match;\n } else if (options.tabReplace) {\n return match.replace(/\\t/g, options.tabReplace);\n }\n return match;\n });\n }\n\n /**\n * Builds new class name for block given the language name\n *\n * @param {HTMLElement} element\n * @param {string} [currentLang]\n * @param {string} [resultLang]\n */\n function updateClassName(element, currentLang, resultLang) {\n const language = currentLang ? aliases[currentLang] : resultLang;\n\n element.classList.add(\"hljs\");\n if (language) element.classList.add(language);\n }\n\n /** @type {HLJSPlugin} */\n const brPlugin = {\n \"before:highlightElement\": ({ el }) => {\n if (options.useBR) {\n el.innerHTML = el.innerHTML.replace(/\\n/g, '').replace(//g, '\\n');\n }\n },\n \"after:highlightElement\": ({ result }) => {\n if (options.useBR) {\n result.value = result.value.replace(/\\n/g, \"
\");\n }\n }\n };\n\n const TAB_REPLACE_RE = /^(<[^>]+>|\\t)+/gm;\n /** @type {HLJSPlugin} */\n const tabReplacePlugin = {\n \"after:highlightElement\": ({ result }) => {\n if (options.tabReplace) {\n result.value = result.value.replace(TAB_REPLACE_RE, (m) =>\n m.replace(/\\t/g, options.tabReplace)\n );\n }\n }\n };\n\n /**\n * Applies highlighting to a DOM node containing code. Accepts a DOM node and\n * two optional parameters for fixMarkup.\n *\n * @param {HighlightedHTMLElement} element - the HTML element to highlight\n */\n function highlightElement(element) {\n /** @type HTMLElement */\n let node = null;\n const language = blockLanguage(element);\n\n if (shouldNotHighlight(language)) return;\n\n // support for v10 API\n fire(\"before:highlightElement\",\n { el: element, language: language });\n\n node = element;\n const text = node.textContent;\n const result = language ? highlight(text, { language, ignoreIllegals: true }) : highlightAuto(text);\n\n // support for v10 API\n fire(\"after:highlightElement\", { el: element, result, text });\n\n element.innerHTML = result.value;\n updateClassName(element, language, result.language);\n element.result = {\n language: result.language,\n // TODO: remove with version 11.0\n re: result.relevance,\n relavance: result.relevance\n };\n if (result.second_best) {\n element.second_best = {\n language: result.second_best.language,\n // TODO: remove with version 11.0\n re: result.second_best.relevance,\n relavance: result.second_best.relevance\n };\n }\n }\n\n /**\n * Updates highlight.js global options with the passed options\n *\n * @param {Partial} userOptions\n */\n function configure(userOptions) {\n if (userOptions.useBR) {\n deprecated(\"10.3.0\", \"'useBR' will be removed entirely in v11.0\");\n deprecated(\"10.3.0\", \"Please see https://github.com/highlightjs/highlight.js/issues/2559\");\n }\n options = inherit$1(options, userOptions);\n }\n\n /**\n * Highlights to all
 blocks on a page\n   *\n   * @type {Function & {called?: boolean}}\n   */\n  // TODO: remove v12, deprecated\n  const initHighlighting = () => {\n    if (initHighlighting.called) return;\n    initHighlighting.called = true;\n\n    deprecated(\"10.6.0\", \"initHighlighting() is deprecated.  Use highlightAll() instead.\");\n\n    const blocks = document.querySelectorAll('pre code');\n    blocks.forEach(highlightElement);\n  };\n\n  // Higlights all when DOMContentLoaded fires\n  // TODO: remove v12, deprecated\n  function initHighlightingOnLoad() {\n    deprecated(\"10.6.0\", \"initHighlightingOnLoad() is deprecated.  Use highlightAll() instead.\");\n    wantsHighlight = true;\n  }\n\n  let wantsHighlight = false;\n\n  /**\n   * auto-highlights all pre>code elements on the page\n   */\n  function highlightAll() {\n    // if we are called too early in the loading process\n    if (document.readyState === \"loading\") {\n      wantsHighlight = true;\n      return;\n    }\n\n    const blocks = document.querySelectorAll('pre code');\n    blocks.forEach(highlightElement);\n  }\n\n  function boot() {\n    // if a highlight was requested before DOM was loaded, do now\n    if (wantsHighlight) highlightAll();\n  }\n\n  // make sure we are in the browser environment\n  if (typeof window !== 'undefined' && window.addEventListener) {\n    window.addEventListener('DOMContentLoaded', boot, false);\n  }\n\n  /**\n   * Register a language grammar module\n   *\n   * @param {string} languageName\n   * @param {LanguageFn} languageDefinition\n   */\n  function registerLanguage(languageName, languageDefinition) {\n    let lang = null;\n    try {\n      lang = languageDefinition(hljs);\n    } catch (error$1) {\n      error(\"Language definition for '{}' could not be registered.\".replace(\"{}\", languageName));\n      // hard or soft error\n      if (!SAFE_MODE) { throw error$1; } else { error(error$1); }\n      // languages that have serious errors are replaced with essentially a\n      // \"plaintext\" stand-in so that the code blocks will still get normal\n      // css classes applied to them - and one bad language won't break the\n      // entire highlighter\n      lang = PLAINTEXT_LANGUAGE;\n    }\n    // give it a temporary name if it doesn't have one in the meta-data\n    if (!lang.name) lang.name = languageName;\n    languages[languageName] = lang;\n    lang.rawDefinition = languageDefinition.bind(null, hljs);\n\n    if (lang.aliases) {\n      registerAliases(lang.aliases, { languageName });\n    }\n  }\n\n  /**\n   * Remove a language grammar module\n   *\n   * @param {string} languageName\n   */\n  function unregisterLanguage(languageName) {\n    delete languages[languageName];\n    for (const alias of Object.keys(aliases)) {\n      if (aliases[alias] === languageName) {\n        delete aliases[alias];\n      }\n    }\n  }\n\n  /**\n   * @returns {string[]} List of language internal names\n   */\n  function listLanguages() {\n    return Object.keys(languages);\n  }\n\n  /**\n    intended usage: When one language truly requires another\n\n    Unlike `getLanguage`, this will throw when the requested language\n    is not available.\n\n    @param {string} name - name of the language to fetch/require\n    @returns {Language | never}\n  */\n  function requireLanguage(name) {\n    deprecated(\"10.4.0\", \"requireLanguage will be removed entirely in v11.\");\n    deprecated(\"10.4.0\", \"Please see https://github.com/highlightjs/highlight.js/pull/2844\");\n\n    const lang = getLanguage(name);\n    if (lang) { return lang; }\n\n    const err = new Error('The \\'{}\\' language is required, but not loaded.'.replace('{}', name));\n    throw err;\n  }\n\n  /**\n   * @param {string} name - name of the language to retrieve\n   * @returns {Language | undefined}\n   */\n  function getLanguage(name) {\n    name = (name || '').toLowerCase();\n    return languages[name] || languages[aliases[name]];\n  }\n\n  /**\n   *\n   * @param {string|string[]} aliasList - single alias or list of aliases\n   * @param {{languageName: string}} opts\n   */\n  function registerAliases(aliasList, { languageName }) {\n    if (typeof aliasList === 'string') {\n      aliasList = [aliasList];\n    }\n    aliasList.forEach(alias => { aliases[alias.toLowerCase()] = languageName; });\n  }\n\n  /**\n   * Determines if a given language has auto-detection enabled\n   * @param {string} name - name of the language\n   */\n  function autoDetection(name) {\n    const lang = getLanguage(name);\n    return lang && !lang.disableAutodetect;\n  }\n\n  /**\n   * Upgrades the old highlightBlock plugins to the new\n   * highlightElement API\n   * @param {HLJSPlugin} plugin\n   */\n  function upgradePluginAPI(plugin) {\n    // TODO: remove with v12\n    if (plugin[\"before:highlightBlock\"] && !plugin[\"before:highlightElement\"]) {\n      plugin[\"before:highlightElement\"] = (data) => {\n        plugin[\"before:highlightBlock\"](\n          Object.assign({ block: data.el }, data)\n        );\n      };\n    }\n    if (plugin[\"after:highlightBlock\"] && !plugin[\"after:highlightElement\"]) {\n      plugin[\"after:highlightElement\"] = (data) => {\n        plugin[\"after:highlightBlock\"](\n          Object.assign({ block: data.el }, data)\n        );\n      };\n    }\n  }\n\n  /**\n   * @param {HLJSPlugin} plugin\n   */\n  function addPlugin(plugin) {\n    upgradePluginAPI(plugin);\n    plugins.push(plugin);\n  }\n\n  /**\n   *\n   * @param {PluginEvent} event\n   * @param {any} args\n   */\n  function fire(event, args) {\n    const cb = event;\n    plugins.forEach(function(plugin) {\n      if (plugin[cb]) {\n        plugin[cb](args);\n      }\n    });\n  }\n\n  /**\n  Note: fixMarkup is deprecated and will be removed entirely in v11\n\n  @param {string} arg\n  @returns {string}\n  */\n  function deprecateFixMarkup(arg) {\n    deprecated(\"10.2.0\", \"fixMarkup will be removed entirely in v11.0\");\n    deprecated(\"10.2.0\", \"Please see https://github.com/highlightjs/highlight.js/issues/2534\");\n\n    return fixMarkup(arg);\n  }\n\n  /**\n   *\n   * @param {HighlightedHTMLElement} el\n   */\n  function deprecateHighlightBlock(el) {\n    deprecated(\"10.7.0\", \"highlightBlock will be removed entirely in v12.0\");\n    deprecated(\"10.7.0\", \"Please use highlightElement now.\");\n\n    return highlightElement(el);\n  }\n\n  /* Interface definition */\n  Object.assign(hljs, {\n    highlight,\n    highlightAuto,\n    highlightAll,\n    fixMarkup: deprecateFixMarkup,\n    highlightElement,\n    // TODO: Remove with v12 API\n    highlightBlock: deprecateHighlightBlock,\n    configure,\n    initHighlighting,\n    initHighlightingOnLoad,\n    registerLanguage,\n    unregisterLanguage,\n    listLanguages,\n    getLanguage,\n    registerAliases,\n    requireLanguage,\n    autoDetection,\n    inherit: inherit$1,\n    addPlugin,\n    // plugins for frameworks\n    vuePlugin: BuildVuePlugin(hljs).VuePlugin\n  });\n\n  hljs.debugMode = function() { SAFE_MODE = false; };\n  hljs.safeMode = function() { SAFE_MODE = true; };\n  hljs.versionString = version;\n\n  for (const key in MODES) {\n    // @ts-ignore\n    if (typeof MODES[key] === \"object\") {\n      // @ts-ignore\n      deepFreezeEs6(MODES[key]);\n    }\n  }\n\n  // merge all the modes/regexs into our main object\n  Object.assign(hljs, MODES);\n\n  // built-in plugins, likely to be moved out of core in the future\n  hljs.addPlugin(brPlugin); // slated to be removed in v11\n  hljs.addPlugin(mergeHTMLPlugin);\n  hljs.addPlugin(tabReplacePlugin);\n  return hljs;\n};\n\n// export an \"instance\" of the highlighter\nvar highlight = HLJS({});\n\nmodule.exports = highlight;\n","/**\n * @param {string} value\n * @returns {RegExp}\n * */\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n  if (!re) return null;\n  if (typeof re === \"string\") return re;\n\n  return re.source;\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction lookahead(re) {\n  return concat('(?=', re, ')');\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction optional(re) {\n  return concat('(', re, ')?');\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n  const joined = args.map((x) => source(x)).join(\"\");\n  return joined;\n}\n\n/**\n * Any of the passed expresssions may match\n *\n * Creates a huge this | this | that | that match\n * @param {(RegExp | string)[] } args\n * @returns {string}\n */\nfunction either(...args) {\n  const joined = '(' + args.map((x) => source(x)).join(\"|\") + \")\";\n  return joined;\n}\n\n/*\nLanguage: HTML, XML\nWebsite: https://www.w3.org/XML/\nCategory: common\nAudit: 2020\n*/\n\n/** @type LanguageFn */\nfunction xml(hljs) {\n  // Element names can contain letters, digits, hyphens, underscores, and periods\n  const TAG_NAME_RE = concat(/[A-Z_]/, optional(/[A-Z0-9_.-]*:/), /[A-Z0-9_.-]*/);\n  const XML_IDENT_RE = /[A-Za-z0-9._:-]+/;\n  const XML_ENTITIES = {\n    className: 'symbol',\n    begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/\n  };\n  const XML_META_KEYWORDS = {\n    begin: /\\s/,\n    contains: [\n      {\n        className: 'meta-keyword',\n        begin: /#?[a-z_][a-z1-9_-]+/,\n        illegal: /\\n/\n      }\n    ]\n  };\n  const XML_META_PAR_KEYWORDS = hljs.inherit(XML_META_KEYWORDS, {\n    begin: /\\(/,\n    end: /\\)/\n  });\n  const APOS_META_STRING_MODE = hljs.inherit(hljs.APOS_STRING_MODE, {\n    className: 'meta-string'\n  });\n  const QUOTE_META_STRING_MODE = hljs.inherit(hljs.QUOTE_STRING_MODE, {\n    className: 'meta-string'\n  });\n  const TAG_INTERNALS = {\n    endsWithParent: true,\n    illegal: /`]+/\n              }\n            ]\n          }\n        ]\n      }\n    ]\n  };\n  return {\n    name: 'HTML, XML',\n    aliases: [\n      'html',\n      'xhtml',\n      'rss',\n      'atom',\n      'xjb',\n      'xsd',\n      'xsl',\n      'plist',\n      'wsf',\n      'svg'\n    ],\n    case_insensitive: true,\n    contains: [\n      {\n        className: 'meta',\n        begin: //,\n        relevance: 10,\n        contains: [\n          XML_META_KEYWORDS,\n          QUOTE_META_STRING_MODE,\n          APOS_META_STRING_MODE,\n          XML_META_PAR_KEYWORDS,\n          {\n            begin: /\\[/,\n            end: /\\]/,\n            contains: [\n              {\n                className: 'meta',\n                begin: //,\n                contains: [\n                  XML_META_KEYWORDS,\n                  XML_META_PAR_KEYWORDS,\n                  QUOTE_META_STRING_MODE,\n                  APOS_META_STRING_MODE\n                ]\n              }\n            ]\n          }\n        ]\n      },\n      hljs.COMMENT(\n        //,\n        {\n          relevance: 10\n        }\n      ),\n      {\n        begin: //,\n        relevance: 10\n      },\n      XML_ENTITIES,\n      {\n        className: 'meta',\n        begin: /<\\?xml/,\n        end: /\\?>/,\n        relevance: 10\n      },\n      {\n        className: 'tag',\n        /*\n        The lookahead pattern (?=...) ensures that 'begin' only matches\n        ')/,\n        end: />/,\n        keywords: {\n          name: 'style'\n        },\n        contains: [ TAG_INTERNALS ],\n        starts: {\n          end: /<\\/style>/,\n          returnEnd: true,\n          subLanguage: [\n            'css',\n            'xml'\n          ]\n        }\n      },\n      {\n        className: 'tag',\n        // See the comment in the