wiki

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 4a1cb2500209adc493e601e5e3ee1efc4f83f3ad
Author: al1-ce <al1-ce@null.net>
Date:   Thu, 10 Jul 2025 00:47:36 +0300

initial commit

Diffstat:
A.gitignore | 2++
Aindex-pages.sh | 16++++++++++++++++
Aindex.js | 37+++++++++++++++++++++++++++++++++++++
Apackage.json | 17+++++++++++++++++
Apublic/404.html | 39+++++++++++++++++++++++++++++++++++++++
Apublic/_404.md | 3+++
Apublic/all_pages.md | 4++++
Apublic/css/dark.css | 190+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/css/defaults.css | 2146+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/css/gruvbox-prism.css | 143+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/css/gruvbox.css | 143+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/css/index.css | 526+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/css/reset.css | 48++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/fonts/Caskaydia-Nerd-Mono-Regular.otf | 0
Apublic/fonts/Caskaydia-Nerd-Regular.otf | 0
Apublic/fonts/clear-sans/ClearSans-Bold.ttf | 0
Apublic/fonts/clear-sans/ClearSans-BoldItalic.ttf | 0
Apublic/fonts/clear-sans/ClearSans-Italic.ttf | 0
Apublic/fonts/clear-sans/ClearSans-Light.ttf | 0
Apublic/fonts/clear-sans/ClearSans-Medium.ttf | 0
Apublic/fonts/clear-sans/ClearSans-MediumItalic.ttf | 0
Apublic/fonts/clear-sans/ClearSans-Regular.ttf | 0
Apublic/fonts/clear-sans/ClearSans-Thin.ttf | 0
Apublic/fonts/clear-sans/LICENSE-2.0.txt | 202+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/index.html | 235+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/index.md | 51+++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/docsify.min.js | 1+
Apublic/js/front-matter.min.js | 1+
Apublic/js/index.js | 20++++++++++++++++++++
Apublic/js/plugins/accordify.css | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/accordify.js | 254+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/accordify.md | 140+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/accordion.css | 95+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/accordion.js | 77+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/accordion.md | 35+++++++++++++++++++++++++++++++++++
Apublic/js/plugins/breadcrumb.css | 25+++++++++++++++++++++++++
Apublic/js/plugins/breadcrumb.js | 47+++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/breadcrumb.md | 78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/charity.css | 420+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/charity.js | 1428+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/charity.md | 174+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/chat.js | 582++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/chat.md | 239+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/copy-code.js | 8++++++++
Apublic/js/plugins/copy-code.md | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/dark-mode.css | 78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/dark-mode.js | 78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/dark-mode.md | 128+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/dark-switcher.js | 0
Apublic/js/plugins/dark-switcher.md | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/edit-on-github.js | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/edit-on-github.md | 44++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/fontsize-darkmode.css | 51+++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/fontsize.js | 164+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/fontsize.md | 29+++++++++++++++++++++++++++++
Apublic/js/plugins/footer-enh.js | 24++++++++++++++++++++++++
Apublic/js/plugins/footer-enh.md | 49+++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/footer.css | 38++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/footer.js | 145+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/footer.md | 131+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/footnote.js | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/footnote.md | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/hide-code.js | 68++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/hide-code.md | 30++++++++++++++++++++++++++++++
Apublic/js/plugins/image-slider.css | 192+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/image-slider.js | 160+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/image-slider.md | 148+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/inline-code.js | 45+++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/inline-code.md | 17+++++++++++++++++
Apublic/js/plugins/navbar-fixed.css | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/navbar-fixed.md | 72++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/page-history.js | 4271+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/page-history.md | 75+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/pagination.js | 392+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/pagination.md | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/rename-header.js | 77+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/rename-header.md | 8++++++++
Apublic/js/plugins/search.js | 543+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/search.md | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/sidebar-collapse-folder.css | 1+
Apublic/js/plugins/sidebar-collapse.css | 1+
Apublic/js/plugins/sidebar-collapse.js | 256+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/sidebar-collapse.md | 71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/tabs.js | 248+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/tabs.md | 714+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/terminal-block.js | 126+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/terminal-block.md | 71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/themable.css | 2255+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/themable.md | 772+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/time-updater.js | 40++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/time-updater.md | 193+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/title.js | 71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/title.md | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/top-banner.css | 19+++++++++++++++++++
Apublic/js/plugins/top-banner.js | 42++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/top-banner.md | 140+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/wikilink.js | 58++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/plugins/wikilink.md | 11+++++++++++
Apublic/js/prism/bash.js | 238+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/prism/d.js | 87+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic/js/prism/json.js | 30++++++++++++++++++++++++++++++
Apublic/wiki/A_Topic.md | 0
Apublic/wiki/BJapan.md | 0
Apublic/wiki/CNameless_Rumia.md | 0
Apublic/wiki/Fsome.md | 0
Apublic/wiki/wiki.md | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
106 files changed, 20650 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +package-lock.json diff --git a/index-pages.sh b/index-pages.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +WIKI_PAGES="$(ls public/wiki --color=never -1 | grep ".md")" +WIKI_PAGES="$(echo "$WIKI_PAGES" | sed -r 's|(.*)\.md$|[\1](wiki/\0)|')" + +PAGES="$(echo -e "[index](/)\n$WIKI_PAGES")" + +PAGES="$(echo "$PAGES" | sort)" + +echo "||||" > public/all_pages.md +echo "|:-|:-|:-|" >> public/all_pages.md + +echo "$PAGES" | pr -s"|" -T -3 | sed "s/^/|/" | sed "s/$/|/" >> public/all_pages.md +# echo "$PAGES" | pr -s"|" -T -3 | sed "s/^/|/" | sed "s/$/|/" + + diff --git a/index.js b/index.js @@ -0,0 +1,37 @@ +const express = require("express"); +const path = require("path"); +const fs = require("fs"); + +const app = express(); + +app.use(express.json()); +app.use(express.json({limit: '50mb'})); +app.use(express.static( path.join(__dirname, "public"), { extensions: ["html", "htm"] })); + +// app.get("/", (req, res) => serve_html(res, "../pages/main", "index.html")) + +// app.get("/test", (req, res) => res.send("Express test")); + +app.all("*", (req, res) => { + // console.log("url: ", req.baseUrl); + // console.log("path: ", req.path); + if (fs.existsSync(path.join(__dirname, "public", req.path + ".md"))) { + res.sendFile(path.join(__dirname, "public/index.html")); + } else { + res.status(404).sendFile(path.join(__dirname, "public/404.html")); + } +}) + +const port = process.env.PORT || 3000; + +app.listen(port, (err, res) => { + if (err) { + console.log(err); + return res.status(500).send(err.message); + } else { + console.log('[INFO] Server Running on port:', port); + } +}) + +module.exports = app; + diff --git a/package.json b/package.json @@ -0,0 +1,17 @@ +{ + "dependencies": { + "express": "^4.21.1" + }, + "name": "al1-ce.dev", + "version": "1.0.0", + "description": "personal website", + "main": "index.js", + "scripts": { + "start": "node ./index.js", + "test": "nodemon ./index.js", + "build": "echo 'nobuild'" + }, + "keywords": [], + "author": "", + "license": "ISC" +} diff --git a/public/404.html b/public/404.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<html> + +<head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="author" content="al1-ce"> + + <link rel="preconnect" href="https://fonts.googleapis.com"> + <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> + <link href="https://fonts.googleapis.com/css2?family=Red+Hat+Text:ital,wght@0,300..700;1,300..700&display=swap" + rel="stylesheet"> + <link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap" rel="stylesheet"> + <link href="https://fonts.googleapis.com/css2?family=Lexend+Deca:wght@100..900&display=swap" rel="stylesheet"> + <link href="https://fonts.googleapis.com/css2?family=Afacad+Flux:wght@100..1000&display=swap" rel="stylesheet"> + + <title> al1-ce.dev - 404 </title> + + <!-- <link rel="icon" href="/assets/images/favicon.png"> --> + + <link rel="stylesheet" href="/css/index.css" /> +</head> + +<body> + <div id="scanlines"></div> + + <div class="block heavy wide"> + <br> + <h1 class="upper glitch">Error: 404</h1><br> + <h2 class="glitch">You've strayed from a set path.</h2> + <a href="/">Back?</a> + </div> + + <script src="/js/index.js"></script> +</body> + +</html> + + diff --git a/public/_404.md b/public/_404.md @@ -0,0 +1,3 @@ +<h2><center>404 - Page not found</center></h2> + +<center>Return to <a href="/">home</a>?</center> diff --git a/public/all_pages.md b/public/all_pages.md @@ -0,0 +1,4 @@ +|||| +|:-|:-|:-| +|[A_Topic](wiki/A_Topic.md)|[CNameless_Rumia](wiki/CNameless_Rumia.md)|[index](/)| +|[BJapan](wiki/BJapan.md)|[Fsome](wiki/Fsome.md)|[wiki](wiki/wiki.md)| diff --git a/public/css/dark.css b/public/css/dark.css @@ -0,0 +1,190 @@ +@font-face{ + font-family: 'Clear Sans'; + src: url("/fonts/clear-sans/ClearSans-Bold.ttf") format('truetype'); + font-weight: bold; + font-style: normal; +} +@font-face{ + font-family: 'Clear Sans'; + src: url("/fonts/clear-sans/ClearSans-BoldItalic.ttf") format('truetype'); + font-weight: bold; + font-style: italic; +} +@font-face{ + font-family: 'Clear Sans'; + src: url("/fonts/clear-sans/ClearSans-Italic.ttf") format('truetype'); + font-weight: normal; + font-style: italic; +} +@font-face{ + font-family: 'Clear Sans'; + src: url("/fonts/clear-sans/ClearSans-Light.ttf") format('truetype'); + font-weight: light; + font-style: normal; +} +@font-face{ + font-family: 'Clear Sans'; + src: url("/fonts/clear-sans/ClearSans-Medium.ttf") format('truetype'); + font-weight: 500; + font-style: normal; +} +@font-face{ + font-family: 'Clear Sans'; + src: url("/fonts/clear-sans/ClearSans-MediumItalic.ttf") format('truetype'); + font-weight: 500; + font-style: italic; +} +@font-face{ + font-family: 'Clear Sans'; + src: url("/fonts/clear-sans/ClearSans-Regular.ttf") format('truetype'); + font-weight: normal; + font-style: normal; +} +@font-face{ + font-family: 'Clear Sans'; + src: url("/fonts/clear-sans/ClearSans-Thin.ttf") format('truetype'); + font-weight: lighter; + font-style: normal; +} + +:root { + font-variant-ligatures: none; + --black : #101010; + --dark-gray : #8e8e8e; + --gray : #b8b8b8; + --white : #f7f7f7; + --dark-red : #903a3a; + --red : #ce5252; + --dark-green : #6d7144; + --green : #9ca54e; + --dark-yellow: #af8431; + --yellow : #f0c674; + --dark-blue : #50616f; + --blue : #5f819d; + --dark-purple: #92729f; + --purple : #b48ac4; + --dark-aqua : #61837e; + --aqua : #73b8af; +/* --bg0_h: #1d2021; /* bg0 hard */ */ +/* --bg0: #282828; */ +/* --bg0_s: #32302f; /* bg0 soft */ */ +/* --bg1: #3c3836; */ +/* --bg2: #504945; */ +/* --bg3: #665c54; */ +/* --bg4: #7c6f64; */ +/* --bg5: #928374; */ +/* --fg4: #a89984; */ +/* --fg3: #bdae93; */ +/* --fg2: #d5c4a1; */ +/* --fg1: #ebdbb2; */ +/* --fg0: #fbf1c7; */ + +/* --mono-hue : 113; */ +/* --mono-saturation : 0%; */ + +/* /* Monochrome shades (darker) and tints (lighter) */ */ +/* --mono-shade3 : var(--fg1); /* #333333 */ */ +/* --mono-shade2 : var(--fg2); /* #4d4d4d */ */ +/* --mono-shade1 : var(--fg4); /* #666666 */ */ +/* --mono-base : var(--bg4); /* #808080 */ */ +/* --mono-tint1 : var(--bg2); /* #b3b3b3 */ */ +/* --mono-tint2 : var(--bg0_s); /* #e3e3e3 */ */ +/* --mono-tint3 : var(--bg0); /* #f7f7f7 */ */ + +/* /* Theme */ */ +/* --theme-hue : 204; */ +/* --theme-saturation: 90%; */ +/* --theme-lightness : 45%; */ +/* --theme-color : hsl(var(--theme-hue), var(--theme-saturation), var(--theme-lightness)); */ + +/* --base-background-color: var(--bg0); */ +/* --base-color : var(--fg1); */ + --base-font-family : "Clear Sans", BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; +/* --base-font-size : 15px; */ + /* --base-font-weight : normal; */ +/* --base-letter-spacing : ; */ +/* --base-line-height : 1.7; */ + +/* --code-font-family : Inconsolata, Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; */ +/* --code-font-size : calc(var(--font-size-m) * 0.95); */ +/* --code-font-weight : normal; */ +/* --code-theme-background : var(--bg0_s); */ +/* --code-theme-text : var(--fg1); */ + +/* --mark-color: var(--fg1); */ +/* --mark-background: var(--bg3); */ + +/* --blockquote-border-color: var(--bblue); */ + +/* --link-color: var(--bblue); */ + +/* --notice-background: var(--bg1); */ +/* --notice-important-background: #2e2222ff; */ +/* --notice-important-border-color: var(--red); */ +/* --notice-tip-background: #222e2eff; */ +/* --notice-tip-border-color: var(--blue); */ + +/* --sidebar-nav-link-color--active: var(--bblue); */ +/* --sidebar-nav-link-border-color--active: var(--bblue); */ +/* --sidebar-name-color: var(--bblue); */ +/* --theme-color: var(--bblue); */ + +/* --copycode-background: var(--bg0_s); */ +/* --copycode-color: var(--fg2); */ + +/* --search-input-background-color: var(--bg0); */ +/* --search-background: var(--bg0); */ +/* --search-input-border-color: var(--bg0_s); */ +/* --search-input-color: var(--fg1); */ +/* --search-input-placeholder-color: var(--fg3); */ +/* --search-clear-icon-color1: var(--bg2); */ +/* --search-clear-icon-color2: var(--fg3); */ +/* --search-result-keyword-background: var(--bg0); */ +/* --search-result-keyword-color: var(--baqua); */ +/* --search-result-keyword-margin: 0; */ +/* --search-result-keyword-padding: 0; */ + +/* --search-input-background-image: url("data:image/svg+xml,%3Csvg height='20px' width='20px' viewBox='0 0 24 24' fill='none' stroke='rgb(80, 73, 69)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' preserveAspectRatio='xMidYMid meet' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10.5' cy='10.5' r='7.5' vector-effect='non-scaling-stroke'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='15.8' y2='15.8' vector-effect='non-scaling-stroke'%3E%3C/line%3E%3C/svg%3E"); */ + +/* --heading-h2-margin: 1.5rem 0 1.0rem; */ +/* --heading-h2-padding: auto; */ +/* /* --heading-h2-border-style: none; */ */ + +/* --table-cell-border-width: thin; */ +/* --table-cell-border-color: var(--bg1); */ +/* --table-cell-padding: 0.25em 0.5em; */ +} + +/* .sidebar .search .clear-button svg { */ +/* transform: scale(1) translateY(35%); */ +/* } */ + +/* .markdown-section table { */ +/* min-width: 80%; */ +/* table-layout: auto; */ +/* display: table; */ +/* } */ + +/* .markdown-section figure, .markdown-section p, .markdown-section ol, .markdown-section ul { */ +/* margin: 0.5em 0; */ +/* } */ + +/* thead th:empty { */ +/* border: thin solid red !important; */ +/* display: none; */ +/* } */ + +/* thead th { */ +/* border: var(--table-cell-border-width) solid var(--table-cell-border-color); */ +/* } */ + +/* .sidebar-nav hr { */ +/* margin: 0.25em 0; */ +/* } */ + +/* .material-icons { */ +/* transform: translateY(0.3em); */ +/* line-height: 0.25em; */ +/* font-size: 1.5em; */ +/* } */ + diff --git a/public/css/defaults.css b/public/css/defaults.css @@ -0,0 +1,2146 @@ +.github-corner { + position: absolute; + z-index: 40; + top: 0; + right: 0; + border-bottom: 0; + text-decoration: none +} + +.github-corner svg { + height: 70px; + width: 70px; + fill: var(--theme-color); + color: var(--base-background-color) +} + +.github-corner:hover .octo-arm { + -webkit-animation: octocat-wave 560ms ease-in-out; + animation: octocat-wave 560ms ease-in-out +} + +@-webkit-keyframes octocat-wave { + 0%, + 100% { + transform: rotate(0) + } + 20%, + 60% { + transform: rotate(-25deg) + } + 40%, + 80% { + transform: rotate(10deg) + } +} + +@keyframes octocat-wave { + 0%, + 100% { + transform: rotate(0) + } + 20%, + 60% { + transform: rotate(-25deg) + } + 40%, + 80% { + transform: rotate(10deg) + } +} + +.progress { + position: fixed; + z-index: 2147483647; + top: 0; + left: 0; + right: 0; + height: 3px; + width: 0; + background-color: var(--theme-color); + transition: width var(--duration-fast), opacity calc(var(--duration-fast)*2) +} + +body.ready-transition:after, +body.ready-transition>*:not(.progress) { + opacity: 0; + transition: opacity var(--spinner-transition-duration) +} + +body.ready-transition:after { + content: ""; + position: absolute; + z-index: 1000; + top: calc(50% - var(--spinner-size)/2); + left: calc(50% - var(--spinner-size)/2); + height: var(--spinner-size); + width: var(--spinner-size); + border: var(--spinner-track-width, 0) solid var(--spinner-track-color); + border-left-color: var(--theme-color); + border-left-color: var(--theme-color); + border-radius: 50%; + -webkit-animation: spinner var(--duration-slow) infinite linear; + animation: spinner var(--duration-slow) infinite linear +} + +body.ready-transition.ready-spinner:after { + opacity: 1 +} + +body.ready-transition.ready-fix:after { + opacity: 0 +} + +body.ready-transition.ready-fix>*:not(.progress) { + opacity: 1; + transition-delay: var(--spinner-transition-duration) +} + +@-webkit-keyframes spinner { + 0% { + transform: rotate(0deg) + } + 100% { + transform: rotate(360deg) + } +} + +@keyframes spinner { + 0% { + transform: rotate(0deg) + } + 100% { + transform: rotate(360deg) + } +} + +*, +*:before, +*:after { + box-sizing: inherit; + font-size: inherit; + -webkit-overflow-scrolling: touch; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-text-size-adjust: none; + -webkit-touch-callout: none +} + +:root { + box-sizing: border-box; + background-color: var(--base-background-color); + font-size: var(--base-font-size); + font-weight: var(--base-font-weight); + line-height: var(--base-line-height); + letter-spacing: var(--base-letter-spacing); + color: var(--base-color); + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-smoothing: antialiased +} + +html, +button, +input, +optgroup, +select, +textarea { + font-family: var(--base-font-family) +} + +button, +input, +optgroup, +select, +textarea { + font-size: 100%; + margin: 0 +} + +a { + text-decoration: none; + -webkit-text-decoration-skip: ink; + text-decoration-skip-ink: auto +} + +body { + margin: 0 +} + +hr { + height: 0; + margin: 2em 0; + border: none; + border-bottom: var(--hr-border, 0) +} + +img { + max-width: 100%; + border: 0 +} + +main { + display: block +} + +main.hidden { + display: none +} + +mark { + background: var(--mark-background); + color: var(--mark-color) +} + +pre { + font-family: var(--pre-font-family); + font-size: var(--pre-font-size); + font-weight: var(--pre-font-weight); + line-height: var(--pre-line-height) +} + +small { + display: inline-block; + font-size: var(--small-font-size) +} + +strong { + font-weight: var(--strong-font-weight); + color: var(--strong-color, currentColor) +} + +sub, +sup { + font-size: var(--subsup-font-size); + line-height: 0; + position: relative; + vertical-align: baseline +} + +sub { + bottom: -0.25em +} + +sup { + top: -0.5em +} + +body:not([data-platform^=Mac]) * { + scrollbar-color: hsla(var(--mono-hue), var(--mono-saturation), 50%, 0.3) hsla(var(--mono-hue), var(--mono-saturation), 50%, 0.1); + scrollbar-width: thin +} + +body:not([data-platform^=Mac]) * ::-webkit-scrollbar { + width: 5px; + height: 5px +} + +body:not([data-platform^=Mac]) * ::-webkit-scrollbar-thumb { + background: hsla(var(--mono-hue), var(--mono-saturation), 50%, 0.3) +} + +body:not([data-platform^=Mac]) * ::-webkit-scrollbar-track { + background: hsla(var(--mono-hue), var(--mono-saturation), 50%, 0.1) +} + +::-moz-selection { + background: var(--selection-color) +} + +::selection { + background: var(--selection-color) +} + +.emoji { + height: var(--emoji-size); + vertical-align: middle +} + +.task-list-item { + list-style: none +} + +.task-list-item input { + margin-right: .5em; + margin-left: 0; + vertical-align: .075em +} + +.markdown-section code[class*=lang-], +.markdown-section pre[data-lang] { + font-family: var(--code-font-family); + font-size: var(--code-font-size); + font-weight: var(--code-font-weight); + letter-spacing: normal; + line-height: var(--code-block-line-height); + -moz-tab-size: var(--code-tab-size); + -o-tab-size: var(--code-tab-size); + tab-size: var(--code-tab-size); + text-align: left; + white-space: pre; + word-spacing: normal; + word-wrap: normal; + word-break: normal; + -webkit-hyphens: none; + hyphens: none +} + +.markdown-section pre[data-lang] { + position: relative; + overflow: hidden; + margin: var(--code-block-margin); + padding: 0; + border-radius: var(--code-block-border-radius) +} + +.markdown-section pre[data-lang]::after { + content: attr(data-lang); + position: absolute; + top: .75em; + right: .75em; + opacity: .6; + color: inherit; + font-size: var(--font-size-s); + line-height: 1 +} + +.markdown-section pre[data-lang] code { + display: block; + overflow: auto; + padding: var(--code-block-padding) +} + +code[class*=lang-], +pre[data-lang] { + color: var(--code-theme-text) +} + +pre[data-lang]::-moz-selection, +pre[data-lang] ::-moz-selection, +code[class*=lang-]::-moz-selection, +code[class*=lang-] ::-moz-selection { + background: var(--code-theme-selection, var(--selection-color)) +} + +pre[data-lang]::-moz-selection, +pre[data-lang] ::-moz-selection, +code[class*=lang-]::-moz-selection, +code[class*=lang-] ::-moz-selection { + background: var(--code-theme-selection, var(--selection-color)) +} + +pre[data-lang]::selection, +pre[data-lang] ::selection, +code[class*=lang-]::selection, +code[class*=lang-] ::selection { + background: var(--code-theme-selection, var(--selection-color)) +} + +:not(pre)>code[class*=lang-], +pre[data-lang] { + background: var(--code-theme-background) +} + +.namespace { + opacity: .7 +} + +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: var(--code-theme-comment) +} + +.token.punctuation { + color: var(--code-theme-punctuation) +} + +.token.property, +.token.tag, +.token.boolean, +.token.number, +.token.constant, +.token.symbol, +.token.deleted { + color: var(--code-theme-tag) +} + +.token.selector, +.token.attr-name, +.token.string, +.token.char, +.token.builtin, +.token.inserted { + color: var(--code-theme-selector) +} + +.token.operator, +.token.entity, +.token.url, +.language-css .token.string, +.style .token.string { + color: var(--code-theme-operator) +} + +.token.atrule, +.token.attr-value, +.token.keyword { + color: var(--code-theme-keyword) +} + +.token.function { + color: var(--code-theme-function) +} + +.token.regex, +.token.important, +.token.variable { + color: var(--code-theme-variable) +} + +.token.important, +.token.bold { + font-weight: bold +} + +.token.italic { + font-style: italic +} + +.token.entity { + cursor: help +} + +.markdown-section { + position: relative; + max-width: var(--content-max-width); + margin: 0 auto; + padding: 2rem 45px +} + +.app-nav:not(:empty)~main .markdown-section { + padding-top: 3.5rem +} + +.markdown-section figure, +.markdown-section p, +.markdown-section ol, +.markdown-section ul { + margin: 1em 0 +} + +.markdown-section ol, +.markdown-section ul { + padding-left: 1.5rem +} + +.markdown-section ol ol, +.markdown-section ol ul, +.markdown-section ul ol, +.markdown-section ul ul { + margin-top: .15rem; + margin-bottom: .15rem +} + +.markdown-section a { + border-bottom: var(--link-border-bottom); + color: var(--link-color); + -webkit-text-decoration: var(--link-text-decoration); + text-decoration: var(--link-text-decoration); + -webkit-text-decoration-color: var(--link-text-decoration-color); + text-decoration-color: var(--link-text-decoration-color) +} + +.markdown-section a:hover { + border-bottom: var(--link-border-bottom--hover, var(--link-border-bottom, 0)); + color: var(--link-color--hover, var(--link-color)); + -webkit-text-decoration: var(--link-text-decoration--hover, var(--link-text-decoration)); + text-decoration: var(--link-text-decoration--hover, var(--link-text-decoration)); + -webkit-text-decoration-color: var(--link-text-decoration-color--hover, var(--link-text-decoration-color)); + text-decoration-color: var(--link-text-decoration-color--hover, var(--link-text-decoration-color)) +} + +.markdown-section a.anchor { + border-bottom: 0; + color: inherit; + text-decoration: none +} + +.markdown-section a.anchor:hover { + text-decoration: underline +} + +.markdown-section blockquote { + overflow: visible; + margin: 2em 0; + padding: var(--blockquote-padding); + border-width: var(--blockquote-border-width, 0); + border-style: var(--blockquote-border-style); + border-color: var(--blockquote-border-color); + border-radius: var(--blockquote-border-radius); + background: var(--blockquote-background); + color: var(--blockquote-color); + font-family: var(--blockquote-font-family); + font-size: var(--blockquote-font-size); + font-style: var(--blockquote-font-style); + font-weight: var(--blockquote-font-weight); + quotes: "“" "”" "‘" "’" +} + +.markdown-section blockquote em { + font-family: var(--blockquote-em-font-family); + font-size: var(--blockquote-em-font-size); + font-style: var(--blockquote-em-font-style); + font-weight: var(--blockquote-em-font-weight) +} + +.markdown-section blockquote p:first-child { + margin-top: 0 +} + +.markdown-section blockquote p:first-child:before, +.markdown-section blockquote p:first-child:after { + color: var(--blockquote-quotes-color); + font-family: var(--blockquote-quotes-font-family); + font-size: var(--blockquote-quotes-font-size); + line-height: 0 +} + +.markdown-section blockquote p:first-child:before { + content: var(--blockquote-quotes-open); + margin-right: .15em; + vertical-align: -0.45em +} + +.markdown-section blockquote p:first-child:after { + content: var(--blockquote-quotes-close); + margin-left: .15em; + vertical-align: -0.55em +} + +.markdown-section blockquote p:last-child { + margin-bottom: 0 +} + +.markdown-section code { + font-family: var(--code-font-family); + font-size: var(--code-font-size); + font-weight: var(--code-font-weight); + line-height: inherit +} + +.markdown-section code:not([class*=lang-]):not([class*=language-]) { + margin: var(--code-inline-margin); + padding: var(--code-inline-padding); + border-radius: var(--code-inline-border-radius); + background: var(--code-inline-background); + color: var(--code-inline-color, currentColor); + white-space: nowrap +} + +.markdown-section h1:first-child, +.markdown-section h2:first-child, +.markdown-section h3:first-child, +.markdown-section h4:first-child, +.markdown-section h5:first-child, +.markdown-section h6:first-child { + margin-top: 0 +} + +.markdown-section h1 a[data-id], +.markdown-section h2 a[data-id], +.markdown-section h3 a[data-id], +.markdown-section h4 a[data-id], +.markdown-section h5 a[data-id], +.markdown-section h6 a[data-id] { + display: inline-block +} + +.markdown-section h1 code, +.markdown-section h2 code, +.markdown-section h3 code, +.markdown-section h4 code, +.markdown-section h5 code, +.markdown-section h6 code { + font-size: .875em +} + +.markdown-section h1+h2, +.markdown-section h1+h3, +.markdown-section h1+h4, +.markdown-section h1+h5, +.markdown-section h1+h6, +.markdown-section h2+h3, +.markdown-section h2+h4, +.markdown-section h2+h5, +.markdown-section h2+h6, +.markdown-section h3+h4, +.markdown-section h3+h5, +.markdown-section h3+h6, +.markdown-section h4+h5, +.markdown-section h4+h6, +.markdown-section h5+h6 { + margin-top: 1rem +} + +.markdown-section h1 { + margin: var(--heading-h1-margin, var(--heading-margin)); + padding: var(--heading-h1-padding, var(--heading-padding)); + border-width: var(--heading-h1-border-width, 0); + border-style: var(--heading-h1-border-style); + border-color: var(--heading-h1-border-color); + font-family: var(--heading-h1-font-family, var(--heading-font-family)); + font-size: var(--heading-h1-font-size); + font-weight: var(--heading-h1-font-weight, var(--heading-font-weight)); + line-height: var(--base-line-height); + color: var(--heading-h1-color, var(--heading-color)) +} + +.markdown-section h2 { + margin: var(--heading-h2-margin, var(--heading-margin)); + padding: var(--heading-h2-padding, var(--heading-padding)); + border-width: var(--heading-h2-border-width, 0); + border-style: var(--heading-h2-border-style); + border-color: var(--heading-h2-border-color); + font-family: var(--heading-h2-font-family, var(--heading-font-family)); + font-size: var(--heading-h2-font-size); + font-weight: var(--heading-h2-font-weight, var(--heading-font-weight)); + line-height: var(--base-line-height); + color: var(--heading-h2-color, var(--heading-color)) +} + +.markdown-section h3 { + margin: var(--heading-h3-margin, var(--heading-margin)); + padding: var(--heading-h3-padding, var(--heading-padding)); + border-width: var(--heading-h3-border-width, 0); + border-style: var(--heading-h3-border-style); + border-color: var(--heading-h3-border-color); + font-family: var(--heading-h3-font-family, var(--heading-font-family)); + font-size: var(--heading-h3-font-size); + font-weight: var(--heading-h3-font-weight, var(--heading-font-weight)); + color: var(--heading-h3-color, var(--heading-color)) +} + +.markdown-section h4 { + margin: var(--heading-h4-margin, var(--heading-margin)); + padding: var(--heading-h4-padding, var(--heading-padding)); + border-width: var(--heading-h4-border-width, 0); + border-style: var(--heading-h4-border-style); + border-color: var(--heading-h4-border-color); + font-family: var(--heading-h4-font-family, var(--heading-font-family)); + font-size: var(--heading-h4-font-size); + font-weight: var(--heading-h4-font-weight, var(--heading-font-weight)); + color: var(--heading-h4-color, var(--heading-color)) +} + +.markdown-section h5 { + margin: var(--heading-h5-margin, var(--heading-margin)); + padding: var(--heading-h5-padding, var(--heading-padding)); + border-width: var(--heading-h5-border-width, 0); + border-style: var(--heading-h5-border-style); + border-color: var(--heading-h5-border-color); + font-family: var(--heading-h5-font-family, var(--heading-font-family)); + font-size: var(--heading-h5-font-size); + font-weight: var(--heading-h5-font-weight, var(--heading-font-weight)); + color: var(--heading-h5-color, var(--heading-color)) +} + +.markdown-section h6 { + margin: var(--heading-h6-margin, var(--heading-margin)); + padding: var(--heading-h6-padding, var(--heading-padding)); + border-width: var(--heading-h6-border-width, 0); + border-style: var(--heading-h6-border-style); + border-color: var(--heading-h6-border-color); + font-family: var(--heading-h6-font-family, var(--heading-font-family)); + font-size: var(--heading-h6-font-size); + font-weight: var(--heading-h6-font-weight, var(--heading-font-weight)); + color: var(--heading-h6-color, var(--heading-color)) +} + +.markdown-section iframe { + margin: 1em 0 +} + +.markdown-section img { + max-width: 100% +} + +.markdown-section kbd { + display: inline-block; + min-width: var(--kbd-min-width); + margin: var(--kbd-margin); + padding: var(--kbd-padding); + border: var(--kbd-border); + border-radius: var(--kbd-border-radius); + background: var(--kbd-background); + font-family: inherit; + font-size: var(--kbd-font-size); + text-align: center; + letter-spacing: 0; + line-height: 1; + color: var(--kbd-color) +} + +.markdown-section kbd+kbd { + margin-left: -0.15em +} + +.markdown-section table { + display: block; + overflow: auto; + margin: 1rem 0; + border-spacing: 0; + border-collapse: collapse +} + +.markdown-section th, +.markdown-section td { + padding: var(--table-cell-padding) +} + +.markdown-section th:not([align]) { + text-align: left +} + +.markdown-section thead { + border-color: var(--table-head-border-color); + border-style: solid; + border-width: var(--table-head-border-width, 0); + background: var(--table-head-background) +} + +.markdown-section th { + font-weight: var(--table-head-font-weight); + color: var(--strong-color) +} + +.markdown-section td { + border-color: var(--table-cell-border-color); + border-style: solid; + border-width: var(--table-cell-border-width, 0) +} + +.markdown-section tbody { + border-color: var(--table-body-border-color); + border-style: solid; + border-width: var(--table-body-border-width, 0) +} + +.markdown-section tbody tr:nth-child(odd) { + background: var(--table-row-odd-background) +} + +.markdown-section tbody tr:nth-child(even) { + background: var(--table-row-even-background) +} + +.markdown-section>ul .task-list-item { + margin-left: -1.25em +} + +.markdown-section>ul .task-list-item .task-list-item { + margin-left: 0 +} + +.markdown-section .table-wrapper { + overflow-x: auto +} + +.markdown-section .table-wrapper table { + display: table; + width: 100% +} + +.markdown-section .table-wrapper td::before { + display: none +} + +@media(max-width: 30em) { + .markdown-section .table-wrapper tbody, + .markdown-section .table-wrapper tr, + .markdown-section .table-wrapper td { + display: block + } + .markdown-section .table-wrapper th, + .markdown-section .table-wrapper td { + border: none + } + .markdown-section .table-wrapper thead { + display: none + } + .markdown-section .table-wrapper tr { + border-color: var(--table-cell-border-color); + border-style: solid; + border-width: var(--table-cell-border-width, 0); + padding: var(--table-cell-padding) + } + .markdown-section .table-wrapper tr:not(:last-child) { + border-bottom: 0 + } + .markdown-section .table-wrapper td { + padding: .15em 0 .15em 8em + } + .markdown-section .table-wrapper td::before { + display: inline-block; + float: left; + width: 8em; + margin-left: -8em; + font-weight: bold; + text-align: left + } +} + +.markdown-section .tip, +.markdown-section .warn { + position: relative; + margin: 2em 0; + padding: var(--notice-padding); + border-width: var(--notice-border-width, 0); + border-style: var(--notice-border-style); + border-color: var(--notice-border-color); + border-radius: var(--notice-border-radius); + background: var(--notice-background); + font-family: var(--notice-font-family); + font-weight: var(--notice-font-weight); + color: var(--notice-color) +} + +.markdown-section .tip:before, +.markdown-section .warn:before { + display: inline-block; + position: var(--notice-before-position, relative); + top: var(--notice-before-top); + left: var(--notice-before-left); + height: var(--notice-before-height); + width: var(--notice-before-width); + margin: var(--notice-before-margin); + padding: var(--notice-before-padding); + border-radius: var(--notice-before-border-radius); + line-height: var(--notice-before-line-height); + font-family: var(--notice-before-font-family); + font-size: var(--notice-before-font-size); + font-weight: var(--notice-before-font-weight); + text-align: center +} + +.markdown-section .tip { + border-width: var(--notice-important-border-width, var(--notice-border-width, 0)); + border-style: var(--notice-important-border-style, var(--notice-border-style)); + border-color: var(--notice-important-border-color, var(--notice-border-color)); + background: var(--notice-important-background, var(--notice-background)); + color: var(--notice-important-color, var(--notice-color)) +} + +.markdown-section .tip:before { + content: var(--notice-important-before-content, var(--notice-before-content)); + background: var(--notice-important-before-background, var(--notice-before-background)); + color: var(--notice-important-before-color, var(--notice-before-color)) +} + +.markdown-section .warn { + border-width: var(--notice-tip-border-width, var(--notice-border-width, 0)); + border-style: var(--notice-tip-border-style, var(--notice-border-style)); + border-color: var(--notice-tip-border-color, var(--notice-border-color)); + background: var(--notice-tip-background, var(--notice-background)); + color: var(--notice-tip-color, var(--notice-color)) +} + +.markdown-section .warn:before { + content: var(--notice-tip-before-content, var(--notice-before-content)); + background: var(--notice-tip-before-background, var(--notice-before-background)); + color: var(--notice-tip-before-color, var(--notice-before-color)) +} + +.cover { + display: none; + position: relative; + z-index: 20; + min-height: 100vh; + flex-direction: column; + align-items: center; + justify-content: center; + padding: calc(var(--cover-border-inset, 0px) + var(--cover-border-width, 0px)); + color: var(--cover-color); + text-align: var(--cover-text-align) +} + +@media screen and (-ms-high-contrast: active), +screen and (-ms-high-contrast: none) { + .cover { + height: 100vh + } +} + +.cover:before, +.cover:after { + content: ""; + position: absolute +} + +.cover:before { + top: 0; + bottom: 0; + left: 0; + right: 0; + background-blend-mode: var(--cover-background-blend-mode); + background-color: var(--cover-background-color); + background-image: var(--cover-background-image); + background-position: var(--cover-background-position); + background-repeat: var(--cover-background-repeat); + background-size: var(--cover-background-size) +} + +.cover:after { + top: var(--cover-border-inset, 0); + bottom: var(--cover-border-inset, 0); + left: var(--cover-border-inset, 0); + right: var(--cover-border-inset, 0); + border-width: var(--cover-border-width, 0); + border-style: solid; + border-color: var(--cover-border-color) +} + +.cover a { + border-bottom: var(--cover-link-border-bottom); + color: var(--cover-link-color); + -webkit-text-decoration: var(--cover-link-text-decoration); + text-decoration: var(--cover-link-text-decoration); + -webkit-text-decoration-color: var(--cover-link-text-decoration-color); + text-decoration-color: var(--cover-link-text-decoration-color) +} + +.cover a:hover { + border-bottom: var(--cover-link-border-bottom--hover, var(--cover-link-border-bottom)); + color: var(--cover-link-color--hover, var(--cover-link-color)); + -webkit-text-decoration: var(--cover-link-text-decoration--hover, var(--cover-link-text-decoration)); + text-decoration: var(--cover-link-text-decoration--hover, var(--cover-link-text-decoration)); + -webkit-text-decoration-color: var(--cover-link-text-decoration-color--hover, var(--cover-link-text-decoration-color)); + text-decoration-color: var(--cover-link-text-decoration-color--hover, var(--cover-link-text-decoration-color)) +} + +.cover h1 { + color: var(--cover-heading-color); + position: relative; + margin: 0; + font-size: var(--cover-heading-font-size); + font-weight: var(--cover-heading-font-weight); + line-height: 1.2 +} + +.cover h1 a, +.cover h1 a:hover { + display: block; + border-bottom: none; + color: inherit; + text-decoration: none +} + +.cover h1 small { + position: absolute; + bottom: 0; + margin-left: .5em +} + +.cover h1 span { + font-size: calc(var(--cover-heading-font-size-min)*1px) +} + +@media(min-width: 26em) { + .cover h1 span { + font-size: calc(var(--cover-heading-font-size-min)*1px + (var(--cover-heading-font-size-max) - var(--cover-heading-font-size-min))*(100vw - 420px)/604) + } +} + +@media(min-width: 64em) { + .cover h1 span { + font-size: calc(var(--cover-heading-font-size-max)*1px) + } +} + +.cover blockquote { + margin: 0; + color: var(--cover-blockquote-color); + font-size: var(--cover-blockquote-font-size) +} + +.cover blockquote a { + color: inherit +} + +.cover ul { + padding: 0; + list-style-type: none +} + +.cover .cover-main { + position: relative; + z-index: 1; + max-width: var(--cover-max-width); + margin: var(--cover-margin); + padding: 0 45px +} + +.cover .cover-main>p:last-child { + margin: 1.25em -0.25em +} + +.cover .cover-main>p:last-child a { + display: block; + margin: .375em .25em; + padding: var(--cover-button-padding); + border: var(--cover-button-border); + border-radius: var(--cover-button-border-radius); + box-shadow: var(--cover-button-box-shadow); + background: var(--cover-button-background); + text-align: center; + -webkit-text-decoration: var(--cover-button-text-decoration); + text-decoration: var(--cover-button-text-decoration); + -webkit-text-decoration-color: var(--cover-button-text-decoration-color); + text-decoration-color: var(--cover-button-text-decoration-color); + color: var(--cover-button-color); + white-space: nowrap; + transition: var(--cover-button-transition) +} + +.cover .cover-main>p:last-child a:hover { + border: var(--cover-button-border--hover, var(--cover-button-border)); + box-shadow: var(--cover-button-box-shadow--hover, var(--cover-button-box-shadow)); + background: var(--cover-button-background--hover, var(--cover-button-background)); + -webkit-text-decoration: var(--cover-button-text-decoration--hover, var(--cover-button-text-decoration)); + text-decoration: var(--cover-button-text-decoration--hover, var(--cover-button-text-decoration)); + -webkit-text-decoration-color: var(--cover-button-text-decoration-color--hover, var(--cover-button-text-decoration-color)); + text-decoration-color: var(--cover-button-text-decoration-color--hover, var(--cover-button-text-decoration-color)); + color: var(--cover-button-color--hover, var(--cover-button-color)) +} + +.cover .cover-main>p:last-child a:first-child { + border: var(--cover-button-primary-border, var(--cover-button-border)); + box-shadow: var(--cover-button-primary-box-shadow, var(--cover-button-box-shadow)); + background: var(--cover-button-primary-background, var(--cover-button-background)); + -webkit-text-decoration: var(--cover-button-primary-text-decoration, var(--cover-button-text-decoration)); + text-decoration: var(--cover-button-primary-text-decoration, var(--cover-button-text-decoration)); + -webkit-text-decoration-color: var(--cover-button-primary-text-decoration-color, var(--cover-button-text-decoration-color)); + text-decoration-color: var(--cover-button-primary-text-decoration-color, var(--cover-button-text-decoration-color)); + color: var(--cover-button-primary-color, var(--cover-button-color)) +} + +.cover .cover-main>p:last-child a:first-child:hover { + border: var(--cover-button-primary-border--hover, var(--cover-button-border--hover, var(--cover-button-primary-border, var(--cover-button-border)))); + box-shadow: var(--cover-button-primary-box-shadow--hover, var(--cover-button-box-shadow--hover, var(--cover-button-primary-box-shadow, var(--cover-button-box-shadow)))); + background: var(--cover-button-primary-background--hover, var(--cover-button-background--hover, var(--cover-button-primary-background, var(--cover-button-background)))); + -webkit-text-decoration: var(--cover-button-primary-text-decoration--hover, var(--cover-button-text-decoration--hover, var(--cover-button-primary-text-decoration, var(--cover-button-text-decoration)))); + text-decoration: var(--cover-button-primary-text-decoration--hover, var(--cover-button-text-decoration--hover, var(--cover-button-primary-text-decoration, var(--cover-button-text-decoration)))); + -webkit-text-decoration-color: var(--cover-button-primary-text-decoration-color--hover, var(--cover-button-text-decoration-color--hover, var(--cover-button-primary-text-decoration-color, var(--cover-button-text-decoration-color)))); + text-decoration-color: var(--cover-button-primary-text-decoration-color--hover, var(--cover-button-text-decoration-color--hover, var(--cover-button-primary-text-decoration-color, var(--cover-button-text-decoration-color)))); + color: var(--cover-button-primary-color--hover, var(--cover-button-color--hover, var(--cover-button-primary-color, var(--cover-button-color)))) +} + +@media(min-width: 30.01em) { + .cover .cover-main>p:last-child a { + display: inline-block + } +} + +.cover .mask { + visibility: var(--cover-background-mask-visibility, hidden); + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + background-color: var(--cover-background-mask-color); + opacity: var(--cover-background-mask-opacity) +} + +.cover.has-mask .mask { + visibility: visible +} + +.cover.show { + display: flex +} + +.app-nav { + position: absolute; + z-index: 30; + top: calc(35px - .5em*var(--base-line-height)); + left: 45px; + right: 80px; + text-align: right +} + +.app-nav.no-badge { + right: 45px +} + +.app-nav li>img, +.app-nav li>a>img { + margin-top: -0.25em; + vertical-align: middle +} + +.app-nav li>img:first-child, +.app-nav li>a>img:first-child { + margin-right: .5em +} + +.app-nav ul, +.app-nav li { + margin: 0; + padding: 0; + list-style: none +} + +.app-nav li { + position: relative +} + +.app-nav li a { + display: block; + line-height: 1; + transition: var(--navbar-root-transition) +} + +.app-nav>ul>li { + display: inline-block; + margin: var(--navbar-root-margin) +} + +.app-nav>ul>li:first-child { + margin-left: 0 +} + +.app-nav>ul>li:last-child { + margin-right: 0 +} + +.app-nav>ul>li>a, +.app-nav>ul>li>span { + padding: var(--navbar-root-padding); + border-width: var(--navbar-root-border-width, 0); + border-style: var(--navbar-root-border-style); + border-color: var(--navbar-root-border-color); + border-radius: var(--navbar-root-border-radius); + background: var(--navbar-root-background); + color: var(--navbar-root-color); + -webkit-text-decoration: var(--navbar-root-text-decoration); + text-decoration: var(--navbar-root-text-decoration); + -webkit-text-decoration-color: var(--navbar-root-text-decoration-color); + text-decoration-color: var(--navbar-root-text-decoration-color) +} + +.app-nav>ul>li>a:hover, +.app-nav>ul>li>span:hover { + background: var(--navbar-root-background--hover, var(--navbar-root-background)); + border-style: var(--navbar-root-border-style--hover, var(--navbar-root-border-style)); + border-color: var(--navbar-root-border-color--hover, var(--navbar-root-border-color)); + color: var(--navbar-root-color--hover, var(--navbar-root-color)); + -webkit-text-decoration: var(--navbar-root-text-decoration--hover, var(--navbar-root-text-decoration)); + text-decoration: var(--navbar-root-text-decoration--hover, var(--navbar-root-text-decoration)); + -webkit-text-decoration-color: var(--navbar-root-text-decoration-color--hover, var(--navbar-root-text-decoration-color)); + text-decoration-color: var(--navbar-root-text-decoration-color--hover, var(--navbar-root-text-decoration-color)) +} + +.app-nav>ul>li>a:not(:last-child), +.app-nav>ul>li>span:not(:last-child) { + padding: var(--navbar-menu-root-padding, var(--navbar-root-padding)); + background: var(--navbar-menu-root-background, var(--navbar-root-background)) +} + +.app-nav>ul>li>a:not(:last-child):hover, +.app-nav>ul>li>span:not(:last-child):hover { + background: var(--navbar-menu-root-background--hover, var(--navbar-menu-root-background, var(--navbar-root-background--hover, var(--navbar-root-background)))) +} + +.app-nav>ul>li>a.active { + background: var(--navbar-root-background--active, var(--navbar-root-background)); + border-style: var(--navbar-root-border-style--active, var(--navbar-root-border-style)); + border-color: var(--navbar-root-border-color--active, var(--navbar-root-border-color)); + color: var(--navbar-root-color--active, var(--navbar-root-color)); + -webkit-text-decoration: var(--navbar-root-text-decoration--active, var(--navbar-root-text-decoration)); + text-decoration: var(--navbar-root-text-decoration--active, var(--navbar-root-text-decoration)); + -webkit-text-decoration-color: var(--navbar-root-text-decoration-color--active, var(--navbar-root-text-decoration-color)); + text-decoration-color: var(--navbar-root-text-decoration-color--active, var(--navbar-root-text-decoration-color)) +} + +.app-nav>ul>li>a.active:not(:last-child):hover { + background: var(--navbar-menu-root-background--active, var(--navbar-menu-root-background, var(--navbar-root-background--active, var(--navbar-root-background)))) +} + +.app-nav>ul>li ul { + visibility: hidden; + position: absolute; + top: 100%; + right: 50%; + overflow-y: auto; + box-sizing: border-box; + max-height: 50vh; + padding: var(--navbar-menu-padding); + border-width: var(--navbar-menu-border-width, 0); + border-style: solid; + border-color: var(--navbar-menu-border-color); + border-radius: var(--navbar-menu-border-radius); + background: var(--navbar-menu-background); + box-shadow: var(--navbar-menu-box-shadow); + text-align: left; + white-space: nowrap; + opacity: 0; + transform: translate(50%, -0.35em); + transition: var(--navbar-menu-transition) +} + +.app-nav>ul>li ul li { + white-space: nowrap +} + +.app-nav>ul>li ul a { + margin: var(--navbar-menu-link-margin); + padding: var(--navbar-menu-link-padding); + border-width: var(--navbar-menu-link-border-width, 0); + border-style: var(--navbar-menu-link-border-style); + border-color: var(--navbar-menu-link-border-color); + border-radius: var(--navbar-menu-link-border-radius); + background: var(--navbar-menu-link-background); + color: var(--navbar-menu-link-color); + -webkit-text-decoration: var(--navbar-menu-link-text-decoration); + text-decoration: var(--navbar-menu-link-text-decoration); + -webkit-text-decoration-color: var(--navbar-menu-link-text-decoration-color); + text-decoration-color: var(--navbar-menu-link-text-decoration-color) +} + +.app-nav>ul>li ul a:hover { + background: var(--navbar-menu-link-background--hover, var(--navbar-menu-link-background)); + border-style: var(--navbar-menu-link-border-style--hover, var(--navbar-menu-link-border-style)); + border-color: var(--navbar-menu-link-border-color--hover, var(--navbar-menu-link-border-color)); + color: var(--navbar-menu-link-color--hover, var(--navbar-menu-link-color)); + -webkit-text-decoration: var(--navbar-menu-link-text-decoration--hover, var(--navbar-menu-link-text-decoration)); + text-decoration: var(--navbar-menu-link-text-decoration--hover, var(--navbar-menu-link-text-decoration)); + -webkit-text-decoration-color: var(--navbar-menu-link-text-decoration-color--hover, var(--navbar-menu-link-text-decoration-color)); + text-decoration-color: var(--navbar-menu-link-text-decoration-color--hover, var(--navbar-menu-link-text-decoration-color)) +} + +.app-nav>ul>li ul a.active { + background: var(--navbar-menu-link-background--active, var(--navbar-menu-link-background)); + border-style: var(--navbar-menu-link-border-style--active, var(--navbar-menu-link-border-style)); + border-color: var(--navbar-menu-link-border-color--active, var(--navbar-menu-link-border-color)); + color: var(--navbar-menu-link-color--active, var(--navbar-menu-link-color)); + -webkit-text-decoration: var(--navbar-menu-link-text-decoration--active, var(--navbar-menu-link-text-decoration)); + text-decoration: var(--navbar-menu-link-text-decoration--active, var(--navbar-menu-link-text-decoration)); + -webkit-text-decoration-color: var(--navbar-menu-link-text-decoration-color--active, var(--navbar-menu-link-text-decoration-color)); + text-decoration-color: var(--navbar-menu-link-text-decoration-color--active, var(--navbar-menu-link-text-decoration-color)) +} + +.app-nav>ul>li:hover ul, +.app-nav>ul>li:focus ul, +.app-nav>ul>li.focus-within ul { + visibility: visible; + opacity: 1; + transform: translate(50%, 0) +} + +@media(min-width: 48em) { + nav.app-nav { + margin-left: var(--sidebar-width) + } +} + +main { + position: relative; + overflow-x: hidden; + min-height: 100vh +} + +.sidebar, +.sidebar-toggle, +.sidebar+.content { + transition: all var(--sidebar-transition-duration) ease-out +} + +@media(min-width: 48em) { + .sidebar+.content { + margin-left: var(--sidebar-width) + } +} + +.sidebar { + display: flex; + flex-direction: column; + position: fixed; + z-index: 10; + top: 0; + right: 100%; + overflow-x: hidden; + overflow-y: auto; + height: 100vh; + width: var(--sidebar-width); + padding: var(--sidebar-padding); + border-width: var(--sidebar-border-width); + border-style: solid; + border-color: var(--sidebar-border-color); + background: var(--sidebar-background) +} + +.sidebar>h1 { + margin: 0; + margin: var(--sidebar-name-margin); + padding: var(--sidebar-name-padding); + background: var(--sidebar-name-background); + color: var(--sidebar-name-color); + font-family: var(--sidebar-name-font-family); + font-size: var(--sidebar-name-font-size); + font-weight: var(--sidebar-name-font-weight); + text-align: var(--sidebar-name-text-align) +} + +.sidebar>h1 img { + max-width: 100% +} + +.sidebar>h1 .app-name-link { + color: var(--sidebar-name-color) +} + +body:not([data-platform^=Mac]) .sidebar::-webkit-scrollbar { + width: 5px +} + +body:not([data-platform^=Mac]) .sidebar::-webkit-scrollbar-thumb { + border-radius: 50vw +} + +@media(min-width: 48em) { + .sidebar { + position: absolute; + transform: translateX(var(--sidebar-width)) + } +} + +@media print { + .sidebar { + display: none + } +} + +.sidebar-nav, +.sidebar nav { + order: 1; + margin: var(--sidebar-nav-margin); + padding: var(--sidebar-nav-padding); + background: var(--sidebar-nav-background) +} + +.sidebar-nav ul, +.sidebar nav ul { + margin: 0; + padding: 0; + list-style: none +} + +.sidebar-nav ul ul, +.sidebar nav ul ul { + margin-left: var(--sidebar-nav-indent) +} + +.sidebar-nav a, +.sidebar nav a { + display: block; + overflow: hidden; + margin: var(--sidebar-nav-link-margin); + padding: var(--sidebar-nav-link-padding); + border-width: var(--sidebar-nav-link-border-width, 0); + border-style: var(--sidebar-nav-link-border-style); + border-color: var(--sidebar-nav-link-border-color); + border-radius: var(--sidebar-nav-link-border-radius); + background: var(--sidebar-nav-link-background); + color: var(--sidebar-nav-link-color); + font-weight: var(--sidebar-nav-link-font-weight); + white-space: nowrap; + -webkit-text-decoration: var(--sidebar-nav-link-text-decoration); + text-decoration: var(--sidebar-nav-link-text-decoration); + -webkit-text-decoration-color: var(--sidebar-nav-link-text-decoration-color); + text-decoration-color: var(--sidebar-nav-link-text-decoration-color); + text-overflow: ellipsis; + transition: var(--sidebar-nav-link-transition) +} + +.sidebar-nav a img, +.sidebar nav a img { + margin-top: -0.25em; + vertical-align: middle +} + +.sidebar-nav a img:first-child, +.sidebar nav a img:first-child { + margin-right: .5em +} + +.sidebar-nav a:hover, +.sidebar nav a:hover { + border-width: var(--sidebar-nav-link-border-width--hover, var(--sidebar-nav-link-border-width, 0)); + border-style: var(--sidebar-nav-link-border-style--hover, var(--sidebar-nav-link-border-style)); + border-color: var(--sidebar-nav-link-border-color--hover, var(--sidebar-nav-link-border-color)); + background: var(--sidebar-nav-link-background--hover, var(--sidebar-nav-link-background)); + color: var(--sidebar-nav-link-color--hover, var(--sidebar-nav-link-color)); + font-weight: var(--sidebar-nav-link-font-weight--hover, var(--sidebar-nav-link-font-weight)); + -webkit-text-decoration: var(--sidebar-nav-link-text-decoration--hover, var(--sidebar-nav-link-text-decoration)); + text-decoration: var(--sidebar-nav-link-text-decoration--hover, var(--sidebar-nav-link-text-decoration)); + -webkit-text-decoration-color: var(--sidebar-nav-link-text-decoration-color); + text-decoration-color: var(--sidebar-nav-link-text-decoration-color) +} + +.sidebar-nav ul>li>span, +.sidebar-nav ul>li>strong, +.sidebar nav ul>li>span, +.sidebar nav ul>li>strong { + display: block; + margin: var(--sidebar-nav-strong-margin); + padding: var(--sidebar-nav-strong-padding); + border-width: var(--sidebar-nav-strong-border-width, 0); + border-style: solid; + border-color: var(--sidebar-nav-strong-border-color); + color: var(--sidebar-nav-strong-color); + font-size: var(--sidebar-nav-strong-font-size); + font-weight: var(--sidebar-nav-strong-font-weight); + text-transform: var(--sidebar-nav-strong-text-transform) +} + +.sidebar-nav ul>li>span+ul, +.sidebar-nav ul>li>strong+ul, +.sidebar nav ul>li>span+ul, +.sidebar nav ul>li>strong+ul { + margin-left: 0 +} + +.sidebar-nav ul>li:first-child>span, +.sidebar-nav ul>li:first-child>strong, +.sidebar nav ul>li:first-child>span, +.sidebar nav ul>li:first-child>strong { + margin-top: 0 +} + +.sidebar-nav::-webkit-scrollbar, +.sidebar nav::-webkit-scrollbar { + width: 0 +} + +@supports(width: env(safe-area-inset)) { + @media only screen and (orientation: landscape) { + .sidebar-nav, .sidebar nav { + margin-left:calc(env(safe-area-inset-left)/2) + } + } +} + +.sidebar-nav li>a:before, +.sidebar-nav li>strong:before { + display: inline-block +} + +.sidebar-nav li>a { + background-repeat: var(--sidebar-nav-pagelink-background-repeat); + background-size: var(--sidebar-nav-pagelink-background-size) +} + +.sidebar-nav li>a[href^="/"]:not([href*="?id="]), +.sidebar-nav li>a[href^="#/"]:not([href*="?id="]) { + transition: var(--sidebar-nav-pagelink-transition) +} + +.sidebar-nav li>a[href^="/"]:not([href*="?id="]), +.sidebar-nav li>a[href^="/"]:not([href*="?id="])~ul a, +.sidebar-nav li>a[href^="#/"]:not([href*="?id="]), +.sidebar-nav li>a[href^="#/"]:not([href*="?id="])~ul a { + padding: var(--sidebar-nav-pagelink-padding, var(--sidebar-nav-link-padding)) +} + +.sidebar-nav li>a[href^="/"]:not([href*="?id="]):only-child, +.sidebar-nav li>a[href^="#/"]:not([href*="?id="]):only-child { + background: var(--sidebar-nav-pagelink-background) +} + +.sidebar-nav li>a[href^="/"]:not([href*="?id="]):not(:only-child), +.sidebar-nav li>a[href^="#/"]:not([href*="?id="]):not(:only-child) { + background: var(--sidebar-nav-pagelink-background--loaded, var(--sidebar-nav-pagelink-background)) +} + +.sidebar-nav li.active>a, +.sidebar-nav li.collapse>a { + border-width: var(--sidebar-nav-link-border-width--active, var(--sidebar-nav-link-border-width)); + border-style: var(--sidebar-nav-link-border-style--active, var(--sidebar-nav-link-border-style)); + border-color: var(--sidebar-nav-link-border-color--active, var(--sidebar-nav-link-border-color)); + background: var(--sidebar-nav-link-background--active, var(--sidebar-nav-link-background)); + color: var(--sidebar-nav-link-color--active, var(--sidebar-nav-link-color)); + font-weight: var(--sidebar-nav-link-font-weight--active, var(--sidebar-nav-link-font-weight)); + -webkit-text-decoration: var(--sidebar-nav-link-text-decoration--active, var(--sidebar-nav-link-text-decoration)); + text-decoration: var(--sidebar-nav-link-text-decoration--active, var(--sidebar-nav-link-text-decoration)); + -webkit-text-decoration-color: var(--sidebar-nav-link-text-decoration-color); + text-decoration-color: var(--sidebar-nav-link-text-decoration-color) +} + +.sidebar-nav li.active>a[href^="/"]:not([href*="?id="]):not(:only-child), +.sidebar-nav li.active>a[href^="#/"]:not([href*="?id="]):not(:only-child) { + background: var(--sidebar-nav-pagelink-background--active, var(--sidebar-nav-pagelink-background--loaded, var(--sidebar-nav-pagelink-background))) +} + +.sidebar-nav li.collapse>a[href^="/"]:not([href*="?id="]):not(:only-child), +.sidebar-nav li.collapse>a[href^="#/"]:not([href*="?id="]):not(:only-child) { + background: var(--sidebar-nav-pagelink-background--collapse, var(--sidebar-nav-pagelink-background--loaded, var(--sidebar-nav-pagelink-background))) +} + +.sidebar-nav li.collapse .app-sub-sidebar { + display: none +} + +.sidebar-nav>ul>li>a:before { + content: var(--sidebar-nav-link-before-content-l1, var(--sidebar-nav-link-before-content)); + margin: var(--sidebar-nav-link-before-margin-l1, var(--sidebar-nav-link-before-margin)); + color: var(--sidebar-nav-link-before-color-l1, var(--sidebar-nav-link-before-color)) +} + +.sidebar-nav>ul>li.active>a:before { + content: var(--sidebar-nav-link-before-content-l1--active, var(--sidebar-nav-link-before-content--active, var(--sidebar-nav-link-before-content-l1, var(--sidebar-nav-link-before-content)))); + color: var(--sidebar-nav-link-before-color-l1--active, var(--sidebar-nav-link-before-color--active, var(--sidebar-nav-link-before-color-l1, var(--sidebar-nav-link-before-color)))) +} + +.sidebar-nav>ul>li>ul>li>a:before { + content: var(--sidebar-nav-link-before-content-l2, var(--sidebar-nav-link-before-content)); + margin: var(--sidebar-nav-link-before-margin-l2, var(--sidebar-nav-link-before-margin)); + color: var(--sidebar-nav-link-before-color-l2, var(--sidebar-nav-link-before-color)) +} + +.sidebar-nav>ul>li>ul>li.active>a:before { + content: var(--sidebar-nav-link-before-content-l2--active, var(--sidebar-nav-link-before-content--active, var(--sidebar-nav-link-before-content-l2, var(--sidebar-nav-link-before-content)))); + color: var(--sidebar-nav-link-before-color-l2--active, var(--sidebar-nav-link-before-color--active, var(--sidebar-nav-link-before-color-l2, var(--sidebar-nav-link-before-color)))) +} + +.sidebar-nav>ul>li>ul>li>ul>li>a:before { + content: var(--sidebar-nav-link-before-content-l3, var(--sidebar-nav-link-before-content)); + margin: var(--sidebar-nav-link-before-margin-l3, var(--sidebar-nav-link-before-margin)); + color: var(--sidebar-nav-link-before-color-l3, var(--sidebar-nav-link-before-color)) +} + +.sidebar-nav>ul>li>ul>li>ul>li.active>a:before { + content: var(--sidebar-nav-link-before-content-l3--active, var(--sidebar-nav-link-before-content--active, var(--sidebar-nav-link-before-content-l3, var(--sidebar-nav-link-before-content)))); + color: var(--sidebar-nav-link-before-color-l3--active, var(--sidebar-nav-link-before-color--active, var(--sidebar-nav-link-before-color-l3, var(--sidebar-nav-link-before-color)))) +} + +.sidebar-nav>ul>li>ul>li>ul>li>ul>li>a:before { + content: var(--sidebar-nav-link-before-content-l4, var(--sidebar-nav-link-before-content)); + margin: var(--sidebar-nav-link-before-margin-l4, var(--sidebar-nav-link-before-margin)); + color: var(--sidebar-nav-link-before-color-l4, var(--sidebar-nav-link-before-color)) +} + +.sidebar-nav>ul>li>ul>li>ul>li>ul>li.active>a:before { + content: var(--sidebar-nav-link-before-content-l4--active, var(--sidebar-nav-link-before-content--active, var(--sidebar-nav-link-before-content-l4, var(--sidebar-nav-link-before-content)))); + color: var(--sidebar-nav-link-before-color-l4--active, var(--sidebar-nav-link-before-color--active, var(--sidebar-nav-link-before-color-l4, var(--sidebar-nav-link-before-color)))) +} + +.sidebar-nav>:last-child { + margin-bottom: 2rem +} + +.sidebar-toggle, +.sidebar-toggle-button { + width: var(--sidebar-toggle-width); + outline: none +} + +.sidebar-toggle { + position: fixed; + z-index: 11; + top: 0; + bottom: 0; + left: 0; + max-width: 40px; + margin: 0; + padding: 0; + border: 0; + background: rgba(0, 0, 0, 0); + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + cursor: pointer +} + +.sidebar-toggle .sidebar-toggle-button { + position: absolute; + top: var(--sidebar-toggle-offset-top); + left: var(--sidebar-toggle-offset-left); + height: var(--sidebar-toggle-height); + border-radius: var(--sidebar-toggle-border-radius); + border-width: var(--sidebar-toggle-border-width); + border-style: var(--sidebar-toggle-border-style); + border-color: var(--sidebar-toggle-border-color); + background: var(--sidebar-toggle-background, transparent); + color: var(--sidebar-toggle-icon-color) +} + +.sidebar-toggle span { + position: absolute; + top: calc(50% - var(--sidebar-toggle-icon-stroke-width)/2); + left: calc(50% - var(--sidebar-toggle-icon-width)/2); + height: var(--sidebar-toggle-icon-stroke-width); + width: var(--sidebar-toggle-icon-width); + background-color: currentColor +} + +.sidebar-toggle span:nth-child(1) { + margin-top: calc(0px - var(--sidebar-toggle-icon-height)/2) +} + +.sidebar-toggle span:nth-child(3) { + margin-top: calc(var(--sidebar-toggle-icon-height)/2) +} + +@media(min-width: 48em) { + .sidebar-toggle { + position: absolute; + overflow: visible; + top: var(--sidebar-toggle-offset-top); + bottom: auto; + left: 0; + height: var(--sidebar-toggle-height); + transform: translateX(var(--sidebar-width)) + } + .sidebar-toggle .sidebar-toggle-button { + top: 0 + } +} + +@media print { + .sidebar-toggle { + display: none + } +} + +@media(max-width: 47.99em) { + body.close .sidebar, + body.close .sidebar-toggle, + body.close .sidebar+.content { + transform: translateX(var(--sidebar-width)) + } +} + +@media(min-width: 48em) { + body.close .sidebar+.content { + transform: translateX(0) + } +} + +@media(max-width: 47.99em) { + body.close nav.app-nav, + body.close .github-corner { + display: none + } +} + +@media(min-width: 48em) { + body.close .sidebar, + body.close .sidebar-toggle { + transform: translateX(0) + } +} + +@media(min-width: 48em) { + body.close nav.app-nav { + margin-left: 0 + } +} + +@media(max-width: 47.99em) { + body.close .sidebar-toggle { + width: 100%; + max-width: none + } + body.close .sidebar-toggle span { + margin-top: 0 + } + body.close .sidebar-toggle span:nth-child(1) { + transform: rotate(45deg) + } + body.close .sidebar-toggle span:nth-child(2) { + display: none + } + body.close .sidebar-toggle span:nth-child(3) { + transform: rotate(-45deg) + } +} + +@media(min-width: 48em) { + body.close .sidebar+.content { + margin-left: 0 + } +} + +@media(min-width: 48em) { + body.sticky .sidebar, + body.sticky .sidebar-toggle { + position: fixed + } +} + +body .docsify-copy-code-button, +body .docsify-copy-code-button:after { + border-radius: var(--border-radius-m, 0); + border-top-left-radius: 0; + border-bottom-right-radius: 0; + background: var(--copycode-background); + color: var(--copycode-color) +} + +body .docsify-copy-code-button span { + border-radius: var(--border-radius-s, 0) +} + +body .docsify-pagination-container { + border-top: var(--pagination-border-top); + color: var(--pagination-color) +} + +body .pagination-item-label { + font-size: var(--pagination-label-font-size) +} + +body .pagination-item-label svg { + color: var(--pagination-label-color); + height: var(--pagination-chevron-height); + stroke: var(--pagination-chevron-stroke); + stroke-linecap: var(--pagination-chevron-stroke-linecap); + stroke-linejoin: var(--pagination-chevron-stroke-linecap); + stroke-width: var(--pagination-chevron-stroke-width) +} + +body .pagination-item-title { + color: var(--pagination-title-color); + font-size: var(--pagination-title-font-size) +} + +body .app-name.hide { + display: block +} + +body .sidebar { + padding: var(--sidebar-padding) +} + +.sidebar .search { + margin: 0; + padding: 0; + border: 0 +} + +.sidebar .search input { + padding: 0; + line-height: 1; + font-size: inherit +} + +.sidebar .search .clear-button { + width: auto +} + +.sidebar .search .clear-button svg { + transform: scale(1) +} + +.sidebar .search .matching-post { + border: none +} + +.sidebar .search p { + font-size: inherit +} + +.sidebar .search { + order: var(--search-flex-order); + margin: var(--search-margin); + padding: var(--search-padding); + background: var(--search-background) +} + +.sidebar .search a { + color: inherit +} + +.sidebar .search h2 { + margin: var(--search-result-heading-margin); + font-size: var(--search-result-heading-font-size); + font-weight: var(--search-result-heading-font-weight); + color: var(--search-result-heading-color) +} + +.sidebar .search .input-wrap { + align-items: stretch; + margin: var(--search-input-margin); + background-color: var(--search-input-background-color); + border-width: var(--search-input-border-width, 0); + border-style: solid; + border-color: var(--search-input-border-color); + border-radius: var(--search-input-border-radius) +} + +.sidebar .search input[type=search] { + min-width: 0; + padding: var(--search-input-padding); + border: none; + background-color: rgba(0, 0, 0, 0); + background-image: var(--search-input-background-image); + background-position: var(--search-input-background-position); + background-repeat: var(--search-input-background-repeat); + background-size: var(--search-input-background-size); + font-size: var(--search-input-font-size); + color: var(--search-input-color); + transition: var(--search-input-transition) +} + +.sidebar .search input[type=search]::-ms-clear { + display: none +} + +.sidebar .search input[type=search]::-moz-placeholder { + color: var(--search-input-placeholder-color, #808080) +} + +.sidebar .search input[type=search]::placeholder { + color: var(--search-input-placeholder-color, #808080) +} + +.sidebar .search input[type=search]::-webkit-input-placeholder { + line-height: normal +} + +.sidebar .search input[type=search]:focus { + background-color: var(--search-input-background-color--focus, var(--search-input-background-color)); + background-image: var(--search-input-background-image--focus, var(--search-input-background-image)); + background-position: var(--search-input-background-position--focus, var(--search-input-background-position)); + background-size: var(--search-input-background-size--focus, var(--search-input-background-size)) +} + +@supports(width: env(safe-area-inset)) { + @media only screen and (orientation: landscape) { + .sidebar .search input[type=search] { + margin-left:calc(env(safe-area-inset-left)/2) + } + } +} + +.sidebar .search p { + overflow: hidden; + text-overflow: ellipsis; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2 +} + +.sidebar .search p:empty { + text-align: center +} + +.sidebar .search .clear-button { + margin: 0; + padding: 0 10px; + border: none; + line-height: 1; + background: rgba(0, 0, 0, 0); + cursor: pointer +} + +.sidebar .search .clear-button svg circle { + fill: var(--search-clear-icon-color1, #808080) +} + +.sidebar .search .clear-button svg path { + stroke: var(--search-clear-icon-color2, #fff) +} + +.sidebar .search.show~*:not(h1) { + display: none +} + +.sidebar .search .results-panel { + display: none; + color: var(--search-result-item-color); + font-size: var(--search-result-item-font-size); + font-weight: var(--search-result-item-font-weight) +} + +.sidebar .search .results-panel.show { + display: block +} + +.sidebar .search .matching-post { + margin: var(--search-result-item-margin); + padding: var(--search-result-item-padding) +} + +.sidebar .search .matching-post, +.sidebar .search .matching-post:last-child { + border-width: var(--search-result-item-border-width, 0) !important; + border-style: var(--search-result-item-border-style); + border-color: var(--search-result-item-border-color) +} + +.sidebar .search .matching-post p { + margin: 0 +} + +.sidebar .search .search-keyword { + margin: var(--search-result-keyword-margin); + padding: var(--search-result-keyword-padding); + border-radius: var(--search-result-keyword-border-radius); + background-color: var(--search-result-keyword-background); + color: var(--search-result-keyword-color, currentColor); + font-style: normal; + font-weight: var(--search-result-keyword-font-weight) +} + +.medium-zoom-overlay, +.medium-zoom-image--open, +.medium-zoom-image--opened { + z-index: 2147483646 !important +} + +.medium-zoom-overlay { + background: var(--zoomimage-overlay-background) !important +} + +:root { + --mono-hue: 113; + --mono-saturation: 0%; + --mono-shade3: hsl(var(--mono-hue), var(--mono-saturation), 20%); + --mono-shade2: hsl(var(--mono-hue), var(--mono-saturation), 30%); + --mono-shade1: hsl(var(--mono-hue), var(--mono-saturation), 40%); + --mono-base: hsl(var(--mono-hue), var(--mono-saturation), 50%); + --mono-tint1: hsl(var(--mono-hue), var(--mono-saturation), 70%); + --mono-tint2: hsl(var(--mono-hue), var(--mono-saturation), 89%); + --mono-tint3: hsl(var(--mono-hue), var(--mono-saturation), 97%); + --theme-hue: 204; + --theme-saturation: 90%; + --theme-lightness: 45%; + --theme-color: hsl(var(--theme-hue), var(--theme-saturation), var(--theme-lightness)); + --modular-scale: 1.333; + --modular-scale--2: calc(var(--modular-scale--1) / var(--modular-scale)); + --modular-scale--1: calc(var(--modular-scale-1) / var(--modular-scale)); + --modular-scale-1: 1rem; + --modular-scale-2: calc(var(--modular-scale-1) * var(--modular-scale)); + --modular-scale-3: calc(var(--modular-scale-2) * var(--modular-scale)); + --modular-scale-4: calc(var(--modular-scale-3) * var(--modular-scale)); + --modular-scale-5: calc(var(--modular-scale-4) * var(--modular-scale)); + --font-size-xxxl: var(--modular-scale-5); + --font-size-xxl: var(--modular-scale-4); + --font-size-xl: var(--modular-scale-3); + --font-size-l: var(--modular-scale-2); + --font-size-m: var(--modular-scale-1); + --font-size-s: var(--modular-scale--1); + --font-size-xs: var(--modular-scale--2); + --duration-slow: 1s; + --duration-medium: 0.5s; + --duration-fast: 0.25s; + --spinner-size: 60px; + --spinner-track-width: 4px; + --spinner-track-color: rgba(0, 0, 0, 0.15); + --spinner-transition-duration: var(--duration-medium) +} + +:root { + --base-background-color: #fff; + --base-color: var(--mono-shade2); + --base-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + --base-font-size: 16px; + --base-font-weight: normal; + --base-line-height: 1.7; + --emoji-size: calc(var(--base-line-height) * 1em); + --hr-border: 1px solid var(--mono-tint2); + --mark-background: #ffecb3; + --pre-font-family: var(--code-font-family); + --pre-font-size: var(--code-font-size); + --pre-font-weight: normal; + --selection-color: #b4d5fe; + --small-font-size: var(--font-size-s); + --strong-color: var(--heading-color); + --strong-font-weight: 600; + --subsup-font-size: var(--font-size-s) +} + +:root { + --content-max-width: 55em; + --blockquote-background: var(--mono-tint3); + --blockquote-border-style: solid; + --blockquote-border-radius: var(--border-radius-m); + --blockquote-em-font-weight: normal; + --blockquote-font-weight: normal; + --blockquote-padding: 1.5em; + --code-font-family: Inconsolata, Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; + --code-font-size: calc(var(--font-size-m) * 0.95); + --code-font-weight: normal; + --code-tab-size: 4; + --code-block-border-radius: var(--border-radius-m); + --code-block-line-height: var(--base-line-height); + --code-block-margin: 1em 0; + --code-block-padding: 1.75em 1.5em 1.5em 1.5em; + --code-inline-background: var(--code-theme-background); + --code-inline-border-radius: var(--border-radius-s); + --code-inline-color: var(--code-theme-text); + --code-inline-margin: 0 0.15em; + --code-inline-padding: 0.125em 0.4em; + --code-theme-background: var(--mono-tint3); + --heading-color: var(--mono-shade3); + --heading-margin: 2.5rem 0 0; + --heading-h1-border-style: solid; + --heading-h1-font-size: var(--font-size-xxl); + --heading-h2-border-style: solid; + --heading-h2-font-size: var(--font-size-xl); + --heading-h3-border-style: solid; + --heading-h3-font-size: var(--font-size-l); + --heading-h4-border-style: solid; + --heading-h4-font-size: var(--font-size-m); + --heading-h5-border-style: solid; + --heading-h5-font-size: var(--font-size-s); + --heading-h6-border-style: solid; + --heading-h6-font-size: var(--font-size-xs); + --kbd-background: var(--mono-tint3); + --kbd-border-radius: var(--border-radius-m); + --kbd-margin: 0 0.3em; + --kbd-min-width: 2.5em; + --kbd-padding: 0.65em 0.5em; + --link-text-decoration: underline; + --notice-background: var(--mono-tint3); + --notice-border-radius: var(--border-radius-m); + --notice-border-style: solid; + --notice-font-weight: normal; + --notice-padding: 1em 1.5em; + --notice-before-font-weight: normal; + --table-cell-padding: 0.75em 0.5em; + --table-head-border-color: var(--table-cell-border-color); + --table-head-font-weight: var(--strong-font-weight); + --table-row-odd-background: var(--mono-tint3) +} + +:root { + --cover-margin: 0 auto; + --cover-max-width: 40em; + --cover-text-align: center; + --cover-background-color: var(--base-background-color); + --cover-background-mask-color: var(--base-background-color); + --cover-background-mask-opacity: 0.8; + --cover-background-position: center center; + --cover-background-repeat: no-repeat; + --cover-background-size: cover; + --cover-blockquote-font-size: var(--font-size-l); + --cover-border-color: var(--theme-color); + --cover-button-border: 1px solid var(--theme-color); + --cover-button-border-radius: var(--border-radius-m); + --cover-button-color: var(--theme-color); + --cover-button-padding: 0.5em 2rem; + --cover-button-text-decoration: none; + --cover-button-transition: all var(--duration-fast) ease-in-out; + --cover-button-primary-background: var(--theme-color); + --cover-button-primary-border: 1px solid var(--theme-color); + --cover-button-primary-color: #fff; + --cover-heading-color: var(--theme-color); + --cover-heading-font-size: var(--font-size-xxl); + --cover-heading-font-weight: normal; + --cover-link-text-decoration: underline +} + +:root { + --navbar-root-border-style: solid; + --navbar-root-margin: 0 0 0 1.5em; + --navbar-root-transition: all var(--duration-fast); + --navbar-menu-background: var(--base-background-color); + --navbar-menu-border-radius: var(--border-radius-m); + --navbar-menu-box-shadow: rgba(45, 45, 45, 0.05) 0px 0px 1px, rgba(49, 49, 49, 0.05) 0px 1px 2px, rgba(42, 42, 42, 0.05) 0px 2px 4px, rgba(32, 32, 32, 0.05) 0px 4px 8px, rgba(49, 49, 49, 0.05) 0px 8px 16px, rgba(35, 35, 35, 0.05) 0px 16px 32px; + --navbar-menu-padding: 0.5em; + --navbar-menu-transition: all var(--duration-fast); + --navbar-menu-link-border-style: solid; + --navbar-menu-link-margin: 0.75em 0.5em; + --navbar-menu-link-padding: 0.2em 0 +} + +:root { + --copycode-background: #808080; + --copycode-color: #fff +} + +:root { + --docsifytabs-border-color: var(--mono-tint2); + --docsifytabs-border-radius-px: var(--border-radius-s); + --docsifytabs-tab-background: var(--mono-tint3); + --docsifytabs-tab-color: var(--mono-tint1) +} + +:root { + --pagination-border-top: 1px solid var(--mono-tint2); + --pagination-chevron-height: 0.8em; + --pagination-chevron-stroke: currentColor; + --pagination-chevron-stroke-linecap: round; + --pagination-chevron-stroke-width: 1px; + --pagination-label-font-size: var(--font-size-s); + --pagination-title-font-size: var(--font-size-l) +} + +:root { + --search-margin: 1.5rem 0 0; + --search-input-background-repeat: no-repeat; + --search-input-border-color: var(--mono-tint1); + --search-input-border-width: 1px; + --search-input-padding: 0.5em; + --search-flex-order: 1; + --search-result-heading-color: var(--heading-color); + --search-result-heading-font-size: var(--base-font-size); + --search-result-heading-font-weight: normal; + --search-result-heading-margin: 0 0 0.25em; + --search-result-item-border-color: var(--mono-tint2); + --search-result-item-border-style: solid; + --search-result-item-border-width: 0 0 1px 0; + --search-result-item-font-weight: normal; + --search-result-item-padding: 1em 0; + --search-result-keyword-background: var(--mark-background); + --search-result-keyword-border-radius: var(--border-radius-s); + --search-result-keyword-color: var(--mark-color); + --search-result-keyword-font-weight: normal; + --search-result-keyword-margin: 0 0.1em; + --search-result-keyword-padding: 0.2em 0 +} + +:root { + --zoomimage-overlay-background: rgba(0, 0, 0, 0.875) +} + +:root { + --sidebar-background: var(--base-background-color); + --sidebar-border-width: 0; + --sidebar-padding: 0 25px; + --sidebar-transition-duration: var(--duration-fast); + --sidebar-width: 17rem; + --sidebar-name-font-size: var(--font-size-l); + --sidebar-name-font-weight: normal; + --sidebar-name-margin: 1.5rem 0 0; + --sidebar-name-text-align: center; + --sidebar-nav-strong-border-color: var(--sidebar-border-color); + --sidebar-nav-strong-color: var(--heading-color); + --sidebar-nav-strong-font-weight: var(--strong-font-weight); + --sidebar-nav-strong-margin: 1.5em 0 0.5em; + --sidebar-nav-strong-padding: 0.25em 0; + --sidebar-nav-indent: 1em; + --sidebar-nav-margin: 1.5rem 0 0; + --sidebar-nav-link-border-style: solid; + --sidebar-nav-link-border-width: 0; + --sidebar-nav-link-color: var(--base-color); + --sidebar-nav-link-font-weight: normal; + --sidebar-nav-link-padding: 0.25em 0; + --sidebar-nav-link-text-decoration--active: underline; + --sidebar-nav-link-text-decoration--hover: underline; + --sidebar-nav-link-before-margin: 0 0.35em 0 0; + --sidebar-nav-pagelink-transition: var(--sidebar-nav-link-transition); + --sidebar-toggle-border-radius: var(--border-radius-s); + --sidebar-toggle-border-style: solid; + --sidebar-toggle-border-width: 0; + --sidebar-toggle-height: 36px; + --sidebar-toggle-icon-color: var(--base-color); + --sidebar-toggle-icon-height: 10px; + --sidebar-toggle-icon-stroke-width: 1px; + --sidebar-toggle-icon-width: 16px; + --sidebar-toggle-offset-left: 0; + --sidebar-toggle-offset-top: calc(35px - (var(--sidebar-toggle-height) / 2)); + --sidebar-toggle-width: 44px +} diff --git a/public/css/gruvbox-prism.css b/public/css/gruvbox-prism.css @@ -0,0 +1,143 @@ +/** + * Gruvbox dark theme + * + * Adapted from a theme based on: + * Vim Gruvbox dark Theme (https://github.com/morhetz/gruvbox) + * + * @author Azat S. <to@azat.io> + * @version 1.0 + */ + +code[class*="language-"], +pre[class*="language-"] { + color: #ebdbb2; /* fg1 / fg */ + font-family: Consolas, Monaco, "Andale Mono", monospace; + direction: ltr; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + line-height: 1.5; + + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +pre[class*="language-"]::-moz-selection, +pre[class*="language-"] ::-moz-selection, +code[class*="language-"]::-moz-selection, +code[class*="language-"] ::-moz-selection { + color: #fbf1c7; /* fg0 */ + background: #7c6f64; /* bg4 */ +} + +pre[class*="language-"]::selection, +pre[class*="language-"] ::selection, +code[class*="language-"]::selection, +code[class*="language-"] ::selection { + color: #fbf1c7; /* fg0 */ + background: #7c6f64; /* bg4 */ +} + +/* Code blocks */ +pre[class*="language-"] { + padding: 1em; + margin: 0.5em 0; + overflow: auto; +} + +:not(pre) > code[class*="language-"], +pre[class*="language-"] { + background: #1d2021; /* bg0_h */ +} + +/* Inline code */ +:not(pre) > code[class*="language-"] { + padding: 0.1em; + border-radius: 0.3em; +} + +.token.comment, +.token.prolog, +.token.cdata { + color: #a89984; /* fg4 / gray1 */ +} + +.token.delimiter, +.token.boolean, +.token.keyword, +.token.selector, +.token.important, +.token.atrule { + color: #fb4934; /* red2 */ +} + +.token.operator, +.token.punctuation, +.token.attr-name { + color: #a89984; /* fg4 / gray1 */ +} + +.token.tag, +.token.tag .punctuation, +.token.doctype, +.token.builtin { + color: #8ec07c; /* bright aqua */ +} + +.token.entity, +.token.number, +.token.symbol { + color: #d3869b; /* purple2 */ +} + +.token.property, +.token.constant, +.token.variable { + color: #fb4934; /* red2 */ +} + +.token.string, +.token.char { + color: #b8bb26; /* green2 */ +} + +.token.attr-value, +.token.attr-value .punctuation { + color: #a89984; /* fg4 / gray1 */ +} + +.token.url { + color: #b8bb26; /* green2 */ + text-decoration: underline; +} + +.token.function { + color: #83a598; /* bright blue */ +} + +.token.regex { + background: #b8bb26; /* green2 */ +} + +.token.bold { + font-weight: bold; +} + +.token.italic { + font-style: italic; +} + +.token.inserted { + background: #a89984; /* fg4 / gray1 */ +} + +.token.deleted { + background: #fb4934; /* red2 */ +} diff --git a/public/css/gruvbox.css b/public/css/gruvbox.css @@ -0,0 +1,143 @@ +@font-face{font-family: 'Caskaydia'; src: url("/fonts/Caskaydia-Nerd-Regular.otf") format('truetype');} +@font-face{font-family: 'Caskaydia-Mono'; src: url("/fonts/Caskaydia-Nerd-Mono-Regular.otf") format('truetype');} + +:root { + font-variant-ligatures: none; + --bg: #282828; + --gray: #928374; + --brgray: #a89984; + --fg: #ebdbb2; + --red: #cc231d; + --bred: #fb4934; + --green: #98971a; + --bgreen: #b8bb26; + --yellow: #d79921; + --byellow: #fabd2f; + --blue: #458588; + --bblue: #83a598; + --purple: #b16286; + --bpurple: #d3869b; + --aqua: #689d6a; + --baqua: #8ec07c; + --orange: #d65d0e; + --borange: #fe8019; + --bg0_h: #1d2021; /* bg0 hard */ + --bg0: #282828; + --bg0_s: #32302f; /* bg0 soft */ + --bg1: #3c3836; + --bg2: #504945; + --bg3: #665c54; + --bg4: #7c6f64; + --bg5: #928374; + --fg4: #a89984; + --fg3: #bdae93; + --fg2: #d5c4a1; + --fg1: #ebdbb2; + --fg0: #fbf1c7; + + --mono-hue : 113; + --mono-saturation : 0%; + + /* Monochrome shades (darker) and tints (lighter) */ + --mono-shade3 : var(--fg1); /* #333333 */ + --mono-shade2 : var(--fg2); /* #4d4d4d */ + --mono-shade1 : var(--fg4); /* #666666 */ + --mono-base : var(--bg4); /* #808080 */ + --mono-tint1 : var(--bg2); /* #b3b3b3 */ + --mono-tint2 : var(--bg0_s); /* #e3e3e3 */ + --mono-tint3 : var(--bg0); /* #f7f7f7 */ + + /* Theme */ + --theme-hue : 204; + --theme-saturation: 90%; + --theme-lightness : 45%; + --theme-color : hsl(var(--theme-hue), var(--theme-saturation), var(--theme-lightness)); + + --base-background-color: var(--bg0); + --base-color : var(--fg1); + --base-font-family : "Caskaydia", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + --base-font-size : 15px; + --base-font-weight : normal; + --base-letter-spacing : ; + --base-line-height : 1.7; + + --code-theme-background : var(--bg0_s); + --code-theme-text : var(--fg1); + + --mark-color: var(--fg1); + --mark-background: var(--bg3); + + --blockquote-border-color: var(--bblue); + + --link-color: var(--bblue); + + --notice-background: var(--bg1); + --notice-important-background: #2e2222ff; + --notice-important-border-color: var(--red); + --notice-tip-background: #222e2eff; + --notice-tip-border-color: var(--blue); + + --sidebar-nav-link-color--active: var(--bblue); + --sidebar-nav-link-border-color--active: var(--bblue); + --sidebar-name-color: var(--bblue); + --theme-color: var(--bblue); + + --copycode-background: var(--bg0_s); + --copycode-color: var(--fg2); + + --search-input-background-color: var(--bg0); + --search-background: var(--bg0); + --search-input-border-color: var(--bg0_s); + --search-input-color: var(--fg1); + --search-input-placeholder-color: var(--fg3); + --search-clear-icon-color1: var(--bg2); + --search-clear-icon-color2: var(--fg3); + --search-result-keyword-background: var(--bg0); + --search-result-keyword-color: var(--baqua); + --search-result-keyword-margin: 0; + --search-result-keyword-padding: 0; + + --search-input-background-image: url("data:image/svg+xml,%3Csvg height='20px' width='20px' viewBox='0 0 24 24' fill='none' stroke='rgb(80, 73, 69)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' preserveAspectRatio='xMidYMid meet' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10.5' cy='10.5' r='7.5' vector-effect='non-scaling-stroke'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='15.8' y2='15.8' vector-effect='non-scaling-stroke'%3E%3C/line%3E%3C/svg%3E"); + + --heading-h2-margin: 1.5rem 0 1.0rem; + --heading-h2-padding: auto; + /* --heading-h2-border-style: none; */ + + --table-cell-border-width: thin; + --table-cell-border-color: var(--bg1); + --table-cell-padding: 0.25em 0.5em; +} + +.sidebar .search .clear-button svg { + transform: scale(1) translateY(35%); +} + +.markdown-section table { + min-width: 80%; + table-layout: auto; + display: table; +} + +.markdown-section figure, .markdown-section p, .markdown-section ol, .markdown-section ul { + margin: 0.5em 0; +} + +thead th:empty { + border: thin solid red !important; + display: none; +} + +thead th { + border: var(--table-cell-border-width) solid var(--table-cell-border-color); +} + +.sidebar-nav hr { + margin: 0.25em 0; +} + +.material-icons { + transform: translateY(0.3em); + line-height: 0.25em; + font-size: 1.5em; +} + diff --git a/public/css/index.css b/public/css/index.css @@ -0,0 +1,526 @@ +* { + -webkit-user-select: none; + /* Chrome all / Safari all */ + -moz-user-select: none; + /* Firefox all */ + -ms-user-select: none; + /* IE 10+ */ + user-select: none; + /* Likely future */ + + --color-black : #101010; + --color-darkgrey : #252525; + --color-lightgray : #6e6e6e; + --color-darkstone : #7c7c7c; + --color-almostwhite : #b9b9b9; + --color-grey : #8e8e8e; + --color-white : #f7f7f7; + --color-beige : #e3e3e3; + --color-red : #ce5252; + --color-green : #9ca54e; + --color-blue : #5f819d; + --color-yellow : #f0c674; + + --color-magenta: #ce73ce; + --color-pink: #edcbed; + --color-blue: #9fced6; + --color-aqua: #65c4b2; + --color-old-white: #f4f1e8; + --color-old-black: #070707; + + --font-redhat: "Red Hat Text"; + --font-quicksand: "Quicksand"; + --font-lexend: "Lexend Deca"; + --font-afacad: "Afacad Flux"; +} + +body { + background-position: center; + background-attachment: fixed; + background-size: cover; + background-color: var(--color-black); + font-weight: normal; + text-align: center; + /* line-height: 1; */ + color: var(--color-almostwhite); + letter-spacing: 3px; + margin: 0 auto; + font-family: var(--font-quicksand); + font-size: 1.25rem; +} + +a { + text-decoration: none; + color: var(--color-pink); +} + +a.underline { + text-decoration: none; + border-bottom: 1px solid var(--color-pink); +} + +a.underline:hover { + text-decoration: none; + border-bottom: 1px solid var(--color-almostwhite); +} + +a:hover { + text-decoration: none; + /* color: var(--color-magenta); */ + color: var(--color-almostwhite); + text-shadow: 1px 1px rgba(246, 0, 153, 0.8), + -1px -1px rgba(15, 210, 255, 0.8), + -1px 0px rgba(255, 210, 0, 1); +} + +a:visited { + text-decoration: none; + /* color: var(--color-pink); */ +} + +/* Text decoration */ + +h2, +h3, +h4, +h5 { + font-family: var(--font-redhat); + font-weight: normal; + /* margin-left: 10px; */ + /* margin-right: 10px; */ +} + +h1 { + /* font-size: 20px; */ + letter-spacing: 9px; + font-weight: normal; +} + +/* h2 { */ +/* font-size: 18px; */ +/* } */ +/**/ +/* h3 { */ +/* font-size: 16px; */ +/* } */ +/**/ +/* h4 { */ +/* font-size: 12px; */ +/* } */ +/**/ +/* h5 { */ +/* font-size: 10px; */ +/* } */ + +/* Scrollbar */ + +::-webkit-scrollbar { + width: 2px; + height: 2px; +} + +::-webkit-scrollbar-track { + background: var(--color-black); +} + +::-webkit-scrollbar-thumb { + background: var(--color-darkstone); +} + +::-webkit-scrollbar-thumb:hover { + background: var(--color-almostwhite); +} + +::-webkit-scrollbar-corner { + background: var(--color-black); +} + +/* Utils */ + +.block { + background-color: var(--color-black); + width: 55%; + height: auto; + margin: 35px auto 10px auto; + padding: 1px; +} + +.margin-children > * { + margin: 1rem; +} + +.flex { + display: flex; +} + +.flex-row { + flex-direction: row; +} + +.flex-column { + flex-direction: column; +} + +.flex-left { + justify-content: left; +} + +.flex-right { + justify-content: right; +} + +.flex-middle { + justify-content: center; +} + +.flex-stretch { + justify-content: space-around; +} + +.flex-top { + align-items: flex-start; +} + +.flex-bottom { + align-items: flex-end; +} + +.flex-center { + align-items: center; +} + +.flex-base { + align-items: baseline; +} + +.block { + display: block; +} + +.inline { + display: inline; +} + +.pad { + padding: 1em; + box-sizing: border-box; +} + +.wide { + width: 100%; +} + +.bold { + font-weight: bold; +} + +.italic { + font-style: italic; +} + +.underline { + text-decoration: underline; +} + +.strikethrough { + text-decoration: line-through; +} + +.expanded { + text-align: justify; +} + +.heavy { + font-weight: 600; +} + +.upper { + text-transform: uppercase; +} + +.lower { + text-transform: lowercase; +} + +.left { + text-align: left; +} + +.right { + text-align: right; +} + +.center { + text-align: center; +} + +.blue { + color: var(--color-blue); +} + +.magenta { + color: var(--color-magenta); +} + +.pink { + color: var(--color-pink); +} + +.abberate { + text-shadow: 1px 1px rgba(246, 0, 153, 0.8), + -1px -1px rgba(15, 210, 255, 0.8), + -1px 0px rgba(255, 210, 0, 1); +} + +/* Class controls */ + +.hide { + display: none; +} + +button { + padding: 0; + border: none; + outline: none; + background: none; +} + +button:active { + border: none; + box-shadow: none; +} + +/* Custom elements */ +#link-container a { + margin: auto 0.5em; +} + +/* Animations */ + + +.glitch-animate { + position: relative; + /* margin: 0 auto; */ + /* letter-spacing: 0.01em; */ + transform: scale3d(1, 1, 1); +} + +.glitch-animate::before, +.glitch-animate::after { + content: attr(data-text); + position: absolute; + top: 0; + left: 0; + right: 0; + overflow: hidden; + clip: rect(0, 900px, 0, 0); +} + +.glitch-animate::before { + left: 7px; + text-shadow: 1px 0 green; + animation: glitch-effect 3s infinite linear alternate-reverse; +} + +.glitch-animate::after { + left: 3px; + text-shadow: -1px 0 red; + animation: glitch-effect 2s infinite linear alternate-reverse; +} + +@-webkit-keyframes glitch-effect { + 0% { + clip: rect(51px, 9999px, 98px, 0); + } + + 5% { + clip: rect(64px, 9999px, 94px, 0); + } + + 10% { + clip: rect(89px, 9999px, 7px, 0); + } + + 15% { + clip: rect(34px, 9999px, 99px, 0); + } + + 20% { + clip: rect(84px, 9999px, 43px, 0); + } + + 25% { + clip: rect(57px, 9999px, 29px, 0); + } + + 30% { + clip: rect(30px, 9999px, 84px, 0); + } + + 35% { + clip: rect(12px, 9999px, 7px, 0); + } + + 40% { + clip: rect(36px, 9999px, 87px, 0); + } + + 45% { + clip: rect(78px, 9999px, 52px, 0); + } + + 50% { + clip: rect(67px, 9999px, 19px, 0); + } + + 55% { + clip: rect(20px, 9999px, 4px, 0); + } + + 60% { + clip: rect(72px, 9999px, 37px, 0); + } + + 65% { + clip: rect(22px, 9999px, 63px, 0); + } + + 70% { + clip: rect(9px, 9999px, 71px, 0); + } + + 75% { + clip: rect(10px, 9999px, 81px, 0); + } + + 80% { + clip: rect(20px, 9999px, 62px, 0); + } + + 85% { + clip: rect(78px, 9999px, 83px, 0); + } + + 90% { + clip: rect(1px, 9999px, 34px, 0); + } + + 95% { + clip: rect(41px, 9999px, 11px, 0); + } + + 100% { + clip: rect(19px, 9999px, 73px, 0); + } +} + +@keyframes glitch-effect { + 0% { + clip: rect(51px, 9999px, 98px, 0); + } + + 5% { + clip: rect(64px, 9999px, 94px, 0); + } + + 10% { + clip: rect(89px, 9999px, 7px, 0); + } + + 15% { + clip: rect(34px, 9999px, 99px, 0); + } + + 20% { + clip: rect(84px, 9999px, 43px, 0); + } + + 25% { + clip: rect(57px, 9999px, 29px, 0); + } + + 30% { + clip: rect(30px, 9999px, 84px, 0); + } + + 35% { + clip: rect(12px, 9999px, 7px, 0); + } + + 40% { + clip: rect(36px, 9999px, 87px, 0); + } + + 45% { + clip: rect(78px, 9999px, 52px, 0); + } + + 50% { + clip: rect(67px, 9999px, 19px, 0); + } + + 55% { + clip: rect(20px, 9999px, 4px, 0); + } + + 60% { + clip: rect(72px, 9999px, 37px, 0); + } + + 65% { + clip: rect(22px, 9999px, 63px, 0); + } + + 70% { + clip: rect(9px, 9999px, 71px, 0); + } + + 75% { + clip: rect(10px, 9999px, 81px, 0); + } + + 80% { + clip: rect(20px, 9999px, 62px, 0); + } + + 85% { + clip: rect(78px, 9999px, 83px, 0); + } + + 90% { + clip: rect(1px, 9999px, 34px, 0); + } + + 95% { + clip: rect(41px, 9999px, 11px, 0); + } + + 100% { + clip: rect(19px, 9999px, 73px, 0); + } +} + +#scanlines { + background-image: url("/assets/images/scanlines.png"); + background-repeat: repeat; + position: fixed; + top: 0px; + left: 0px; + width: 100%; + height: 100%; + z-index: 9999; + animation: scanAnim 0.7s infinite; + animation-timing-function: linear; + pointer-events: none; + opacity: 1; +} + +@keyframes scanAnim { + 0% { + background-position: 0px 0px; + } + + 100% { + background-position: 0px 8px; + } +} diff --git a/public/css/reset.css b/public/css/reset.css @@ -0,0 +1,48 @@ +/* http://meyerweb.com/eric/tools/css/reset/ + v2.0 | 20110126 + License: none (public domain) +*/ + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +/* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, +footer, header, hgroup, menu, nav, section { + display: block; +} +body { + line-height: 1; +} +ol, ul { + list-style: none; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} diff --git a/public/fonts/Caskaydia-Nerd-Mono-Regular.otf b/public/fonts/Caskaydia-Nerd-Mono-Regular.otf Binary files differ. diff --git a/public/fonts/Caskaydia-Nerd-Regular.otf b/public/fonts/Caskaydia-Nerd-Regular.otf Binary files differ. diff --git a/public/fonts/clear-sans/ClearSans-Bold.ttf b/public/fonts/clear-sans/ClearSans-Bold.ttf Binary files differ. diff --git a/public/fonts/clear-sans/ClearSans-BoldItalic.ttf b/public/fonts/clear-sans/ClearSans-BoldItalic.ttf Binary files differ. diff --git a/public/fonts/clear-sans/ClearSans-Italic.ttf b/public/fonts/clear-sans/ClearSans-Italic.ttf Binary files differ. diff --git a/public/fonts/clear-sans/ClearSans-Light.ttf b/public/fonts/clear-sans/ClearSans-Light.ttf Binary files differ. diff --git a/public/fonts/clear-sans/ClearSans-Medium.ttf b/public/fonts/clear-sans/ClearSans-Medium.ttf Binary files differ. diff --git a/public/fonts/clear-sans/ClearSans-MediumItalic.ttf b/public/fonts/clear-sans/ClearSans-MediumItalic.ttf Binary files differ. diff --git a/public/fonts/clear-sans/ClearSans-Regular.ttf b/public/fonts/clear-sans/ClearSans-Regular.ttf Binary files differ. diff --git a/public/fonts/clear-sans/ClearSans-Thin.ttf b/public/fonts/clear-sans/ClearSans-Thin.ttf Binary files differ. diff --git a/public/fonts/clear-sans/LICENSE-2.0.txt b/public/fonts/clear-sans/LICENSE-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/public/index.html b/public/index.html @@ -0,0 +1,235 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <meta charset="UTF-8"> + <title>wiki@al1-ce</title> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> + <meta name="description" content="Description"> + <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0"> + <link rel="stylesheet" href="/css/reset.css"> + <link rel="stylesheet" href="/js/plugins/themable.css"> + <link rel="stylesheet" href="/css/dark.css"> +</head> + +<body> + <style> + .app-name, .sidebar-nav, .sidebar-toggle-button { + display: none !important; + } + + .sidebar { + position: fixed !important; + } + + .sidebar+.content { + margin-left: 0 !important; + } + + .sidebar, .sidebar-toggle, .sidebar+.content { + transition: none !important; + } + + .app-nav.no-badge { + right: 80px; + } + + .app-nav { + /* background: red; */ + /* height: calc(35px + .5em*var(--base-line-height)); */ + height: 3.5rem; + top: 0; + text-align: center; + display: flex; + align-items: flex-end; + justify-content: flex-end; + margin-left: auto !important; + } + + .app-nav > a { + background: var(--gray); + padding: 0.5rem 1rem; + /* font-family: var(--code-font-family); */ + height: 2rem; + } + .app-nav > a:hover { + color: var(--aqua); + background: var(--white); + } + + .app-nav a { color: var(--blue); } + .app-nav a:hover { color: var(--aqua); } + .app-nav a:active { color: var(--dark-aqua); } + .app-nav a:visited { + /* color: var(--blue); */ + } + + .search { + margin-bottom: 0; + border-bottom: none; + height: 2rem; + margin-left: 1rem; + padding: 0; + } + + .search > .input-wrap { + /* height: 2rem; */ + } + + .search > .input-wrap > input { + padding: 0.5rem 1rem; + height: 2rem; + background: var(--gray); + } + + .search > .input-wrap > input:focus { + background: var(--white); + box-shadow: none; + border: none; + } + + .search > .results-panel { + position: absolute; + background: var(--white); + border: 1px solid var(--black); + } + + .search .clear-button { + display: none !important; + /* display: initial !important; */ + /* position: relative; */ + /* right: 100%; */ + /* background: var(--gray); */ + /* border-radius: 100%; */ + } + + .search .matching-post p { + color: var(--black); + } + + .search .search-keyword { + font-weight: bold; + color: var(--red); + } + + #nav-home { + margin-right: auto; + } + + #nav-edit, #nav-hist { + margin-left: 1rem; + } + + body { + background: var(--dark-gray); + } + + #main { + color: var(--black); + background: var(--white); + padding-top: 1rem; + padding-bottom: 1rem; + margin-top: 3.5rem; + margin-bottom: 3.5rem; + } + </style> + <nav id="app-nav"> + <a id="nav-home" href="/">Home</a> + <!-- <a id="nav-find" href="">find</a> --> + <a id="nav-edit" href="">Edit</a> + <a id="nav-hist" href="">History</a> + </nav> + <div id="app">Please wait...</div> + <script> + window.$docsify = { + // https://docsify.js.org/#/configuration + name: 'wiki@al1-ce', + // repo: 'https://github.com/al1-ce/wiki.al1-ce.dev', + loadSidebar: true, + // logo: "https://avatars.githubusercontent.com/u/60989682?s=48&v=4", + hideSidebar: false, + routerMode: 'history', + homepage: 'index.md', + loadNavbar: false, // !!!!!!! + mergeNavbar: true, + auto2top: true, + // coverpage: "README.md", + executeScript: true, + subMaxLevel: 2, + // sidebarrDisplayLevel: 1, + alias: { + '/.*/_sidebar.md': '/all_pages.md', + '/_sidebar.md': '/all_pages.md' + }, + tabs: { + persist: true, + sync: true, + theme: 'material', + tabComments: true, + tabHeadings: true, + }, + copyCode: { + buttonText: '📋', + errorText: 'x', + successText: '✓', + }, + search: { + paths: 'auto', + hideOtherSidebarContent: true, + }, + plugins: [ + function(hook, vm) { + hook.mounted(function() { + // document.getElementById("nav-find").addEventListener("click", function() { + // document.body.classList.toggle("close"); + // }); + + let sbar = document.querySelector(".sidebar > .search"); + document.getElementById("app-nav").insertBefore(sbar, document.getElementById("nav-edit")); + document.querySelector(".sidebar").remove(); + let result = document.querySelector(".search > .results-panel"); + let input = document.querySelector(".search input"); + result.addEventListener("click", function() { + result.classList.remove("show"); + input.value = ""; + }); + }); + hook.doneEach(function() { + document.title += ' - wiki@al1-ce'; + }); + hook.afterEach(function (html) { + var urlEdit = 'https://github.com/al1-ce/wiki.al1-ce.dev/blob/master' + vm.route.file; + var urlHist = 'https://github.com/al1-ce/wiki.al1-ce.dev/commits/master' + vm.route.file; + + document.getElementById("nav-edit").href = urlEdit; + document.getElementById("nav-hist").href = urlHist; + return html; + }); + }, + ] + } + </script> + <!-- - -------------------------------- Docsify v4 -------------------------------- - --> + <script src="/js/docsify.min.js"></script> + <script src="/js/front-matter.min.js"></script> + <!-- - -------------------------------- MY Plugins -------------------------------- - --> + <script src="/js/plugins/wikilink.js"></script> + <script src="/js/plugins/inline-code.js"></script> + <script src="/js/plugins/rename-header.js"></script> + <!-- - ----------------------------- Official Plugins ----------------------------- - --> + <script src="/js/plugins/search.js"></script> + <!-- - --------------------------------- Plugins ---------------------------------- - --> + <script src="/js/plugins/tabs.js"></script> + <script src="/js/plugins/copy-code.js"></script> + <!-- - ----------------------------- Prism languages ------------------------------ - --> + <script src="/js/prism/d.js"></script> + <script src="/js/prism/json.js"></script> + <script src="/js/prism/bash.js"></script> + <!-- wget https://cdn.jsdelivr.net/npm/prismjs@1/components/prism-LANG.js --> + + <script> + Prism.languages['sdl'] = Prism.languages.extend('clike'); + </script> +</body> + +</html> diff --git a/public/index.md b/public/index.md @@ -0,0 +1,51 @@ +# Welcome to wiki@al1-ce + +This is some website and I need to fill it with some text right now so we all know where this is going now. + +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Proin tortor purus platea sit eu id nisi litora libero. Neque vulputate consequat ac amet augue blandit maximus aliquet congue. Pharetra vestibulum posuere ornare faucibus fusce dictumst orci aenean eu facilisis ut volutpat commodo senectus purus himenaeos fames primis convallis nisi. + +Phasellus fermentum malesuada phasellus netus dictum aenean placerat egestas amet. Ornare taciti semper dolor tristique morbi. Sem leo tincidunt aliquet semper eu lectus scelerisque quis. Sagittis vivamus mollis nisi mollis enim fermentum laoreet. + +Curabitur semper venenatis lectus viverra ex dictumst nulla maximus. Primis iaculis elementum conubia feugiat venenatis dolor augue ac blandit nullam ac phasellus turpis feugiat mollis. Duis lectus porta mattis imperdiet vivamus augue litora lectus arcu. Justo torquent pharetra volutpat ad blandit bibendum accumsan nec elit cras luctus primis ipsum gravida class congue. + +Vehicula etiam elementum finibus enim duis feugiat commodo adipiscing tortor tempor elit. Et mollis consectetur habitant turpis tortor consectetur adipiscing vulputate dolor lectus iaculis convallis adipiscing. Nam hendrerit dignissim condimentum ullamcorper diam morbi eget consectetur odio in sagittis. + +- [[A link 1]] - Link 1 +- [[A link 2]] - Link 2 obviously +- [[A link 3]] - Link 3 apparently +- [[A link 5]] - Actually a link 4 in disguise + +[[all pages|TODO: think how to make easy list of all pages]] + +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Proin tortor purus platea sit eu id nisi litora libero. Neque vulputate consequat ac amet augue blandit maximus aliquet congue. Pharetra vestibulum posuere ornare faucibus fusce dictumst orci aenean eu facilisis ut volutpat commodo senectus purus himenaeos fames primis convallis nisi. + +Phasellus fermentum malesuada phasellus netus dictum aenean placerat egestas amet. Ornare taciti semper dolor tristique morbi. Sem leo tincidunt aliquet semper eu lectus scelerisque quis. Sagittis vivamus mollis nisi mollis enim fermentum laoreet. + +Curabitur semper venenatis lectus viverra ex dictumst nulla maximus. Primis iaculis elementum conubia feugiat venenatis dolor augue ac blandit nullam ac phasellus turpis feugiat mollis. Duis lectus porta mattis imperdiet vivamus augue litora lectus arcu. Justo torquent pharetra volutpat ad blandit bibendum accumsan nec elit cras luctus primis ipsum gravida class congue. + +Vehicula etiam elementum finibus enim duis feugiat commodo adipiscing tortor tempor elit. Et mollis consectetur habitant turpis tortor consectetur adipiscing vulputate dolor lectus iaculis convallis adipiscing. Nam hendrerit dignissim condimentum ullamcorper diam morbi eget consectetur odio in sagittis. + +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Proin tortor purus platea sit eu id nisi litora libero. Neque vulputate consequat ac amet augue blandit maximus aliquet congue. Pharetra vestibulum posuere ornare faucibus fusce dictumst orci aenean eu facilisis ut volutpat commodo senectus purus himenaeos fames primis convallis nisi. + +Phasellus fermentum malesuada phasellus netus dictum aenean placerat egestas amet. Ornare taciti semper dolor tristique morbi. Sem leo tincidunt aliquet semper eu lectus scelerisque quis. Sagittis vivamus mollis nisi mollis enim fermentum laoreet. + +Curabitur semper venenatis lectus viverra ex dictumst nulla maximus. Primis iaculis elementum conubia feugiat venenatis dolor augue ac blandit nullam ac phasellus turpis feugiat mollis. Duis lectus porta mattis imperdiet vivamus augue litora lectus arcu. Justo torquent pharetra volutpat ad blandit bibendum accumsan nec elit cras luctus primis ipsum gravida class congue. + +Vehicula etiam elementum finibus enim duis feugiat commodo adipiscing tortor tempor elit. Et mollis consectetur habitant turpis tortor consectetur adipiscing vulputate dolor lectus iaculis convallis adipiscing. Nam hendrerit dignissim condimentum ullamcorper diam morbi eget consectetur odio in sagittis. + +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Proin tortor purus platea sit eu id nisi litora libero. Neque vulputate consequat ac amet augue blandit maximus aliquet congue. Pharetra vestibulum posuere ornare faucibus fusce dictumst orci aenean eu facilisis ut volutpat commodo senectus purus himenaeos fames primis convallis nisi. + +Phasellus fermentum malesuada phasellus netus dictum aenean placerat egestas amet. Ornare taciti semper dolor tristique morbi. Sem leo tincidunt aliquet semper eu lectus scelerisque quis. Sagittis vivamus mollis nisi mollis enim fermentum laoreet. + +Curabitur semper venenatis lectus viverra ex dictumst nulla maximus. Primis iaculis elementum conubia feugiat venenatis dolor augue ac blandit nullam ac phasellus turpis feugiat mollis. Duis lectus porta mattis imperdiet vivamus augue litora lectus arcu. Justo torquent pharetra volutpat ad blandit bibendum accumsan nec elit cras luctus primis ipsum gravida class congue. + +Vehicula etiam elementum finibus enim duis feugiat commodo adipiscing tortor tempor elit. Et mollis consectetur habitant turpis tortor consectetur adipiscing vulputate dolor lectus iaculis convallis adipiscing. Nam hendrerit dignissim condimentum ullamcorper diam morbi eget consectetur odio in sagittis. + +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Proin tortor purus platea sit eu id nisi litora libero. Neque vulputate consequat ac amet augue blandit maximus aliquet congue. Pharetra vestibulum posuere ornare faucibus fusce dictumst orci aenean eu facilisis ut volutpat commodo senectus purus himenaeos fames primis convallis nisi. + +Phasellus fermentum malesuada phasellus netus dictum aenean placerat egestas amet. Ornare taciti semper dolor tristique morbi. Sem leo tincidunt aliquet semper eu lectus scelerisque quis. Sagittis vivamus mollis nisi mollis enim fermentum laoreet. + +Curabitur semper venenatis lectus viverra ex dictumst nulla maximus. Primis iaculis elementum conubia feugiat venenatis dolor augue ac blandit nullam ac phasellus turpis feugiat mollis. Duis lectus porta mattis imperdiet vivamus augue litora lectus arcu. Justo torquent pharetra volutpat ad blandit bibendum accumsan nec elit cras luctus primis ipsum gravida class congue. + +Vehicula etiam elementum finibus enim duis feugiat commodo adipiscing tortor tempor elit. Et mollis consectetur habitant turpis tortor consectetur adipiscing vulputate dolor lectus iaculis convallis adipiscing. Nam hendrerit dignissim condimentum ullamcorper diam morbi eget consectetur odio in sagittis. + diff --git a/public/js/docsify.min.js b/public/js/docsify.min.js @@ -0,0 +1 @@ +!function(){function c(i){var o=Object.create(null);return function(e){var n=f(e)?e:JSON.stringify(e);return o[n]||(o[n]=i(e))}}var a=c(function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),u=Object.prototype.hasOwnProperty,m=Object.assign||function(e){for(var n=arguments,i=1;i<arguments.length;i++){var o,t=Object(n[i]);for(o in t)u.call(t,o)&&(e[o]=t[o])}return e};function f(e){return"string"==typeof e||"number"==typeof e}function d(){}function o(e){return"function"==typeof e}function g(e){var n=e.match(/^([^:/?#]+:)?(?:\/{2,}([^/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/);return"string"==typeof n[1]&&0<n[1].length&&n[1].toLowerCase()!==location.protocol||("string"==typeof n[2]&&0<n[2].length&&n[2].replace(new RegExp(":("+{"http:":80,"https:":443}[location.protocol]+")?$"),"")!==location.host||!!/^\/\\/.test(e))}var s=document.body.clientWidth<=600,t=window.history&&window.history.pushState&&window.history.replaceState&&!navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]\D|WebApps\/.+CFNetwork)/),i={};function l(e,n){if(void 0===n&&(n=!1),"string"==typeof e){if(void 0!==window.Vue)return b(e);e=n?b(e):i[e]||(i[e]=b(e))}return e}var v=document,h=v.body,_=v.head;function b(e,n){return n?e.querySelector(n):v.querySelector(e)}function k(e,n){return[].slice.call(n?e.querySelectorAll(n):v.querySelectorAll(e))}function w(e,n){return e=v.createElement(e),n&&(e.innerHTML=n),e}function r(e,n){return e.appendChild(n)}function y(e,n){return e.insertBefore(n,e.children[0])}function p(e,n,i){o(n)?window.addEventListener(e,n):e.addEventListener(n,i)}function x(e,n,i){o(n)?window.removeEventListener(e,n):e.removeEventListener(n,i)}function S(e,n,i){e&&e.classList[i?n:"toggle"](i||n)}function e(e,n){var i=(n=void 0===n?document:n).readyState;if("complete"===i||"interactive"===i)return setTimeout(e,0);n.addEventListener("DOMContentLoaded",e)}var n=Object.freeze({__proto__:null,getNode:l,$:v,body:h,head:_,find:b,findAll:k,create:w,appendTo:r,before:y,on:p,off:x,toggleClass:S,style:function(e){r(_,w("style",e))},documentReady:e});function A(e,n){return-1!==e.indexOf(n,e.length-n.length)}var $=decodeURIComponent,z=encodeURIComponent;function F(e){var n={};return(e=e.trim().replace(/^(\?|#|&)/,""))&&e.split("&").forEach(function(e){e=e.replace(/\+/g," ").split("=");n[e[0]]=e[1]&&$(e[1])}),n}function E(e,n){void 0===n&&(n=[]);var i,o=[];for(i in e)-1<n.indexOf(i)||o.push(e[i]?(z(i)+"="+z(e[i])).toLowerCase():z(i));return o.length?"?"+o.join("&"):""}var R=c(function(e){return/(:|(\/{2}))/g.test(e)}),T=c(function(e){return e.split(/[?#]/)[0]}),C=c(function(e){if(/\/$/g.test(e))return e;e=e.match(/(\S*\/)[^/]+$/);return e?e[1]:""}),j=c(function(e){return e.replace(/^\/+/,"/").replace(/([^:])\/{2,}/g,"$1/")}),L=c(function(e){for(var n=e.replace(/^\//,"").split("/"),i=[],o=0,t=n.length;o<t;o++){var a=n[o];".."===a?i.pop():"."!==a&&i.push(a)}return"/"+i.join("/")});function O(e){return e.split("/").filter(function(e){return-1===e.indexOf("#")}).join("/")}function q(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return j(e.map(O).join("/"))}var P=c(function(e){return e.replace("#","?id=")}),M={};function I(e){this.config=e}function N(e){var n=location.href.indexOf("#");location.replace(location.href.slice(0,0<=n?n:0)+"#"+e)}I.prototype.getBasePath=function(){return this.config.basePath},I.prototype.getFile=function(e,n){void 0===e&&(e=this.getCurrentPath());var i,o,t=this.config,a=this.getBasePath(),r="string"==typeof t.ext?t.ext:".md";return e=t.alias?function e(n,i,o){var t=Object.keys(i).filter(function(e){return(M[e]||(M[e]=new RegExp("^"+e+"$"))).test(n)&&n!==o})[0];return t?e(n.replace(M[t],i[t]),i,n):n}(e,t.alias):e,i=e,o=r,e=(e=new RegExp("\\.("+o.replace(/^\./,"")+"|html)$","g").test(i)?i:/\/$/g.test(i)?i+"README"+o:""+i+o)==="/README"+r&&t.homepage||e,e=R(e)?e:q(a,e),e=n?e.replace(new RegExp("^"+a),""):e},I.prototype.onchange=function(e){(e=void 0===e?d:e)()},I.prototype.getCurrentPath=function(){},I.prototype.normalize=function(){},I.prototype.parse=function(){},I.prototype.toURL=function(e,n,i){var o=i&&"#"===e[0],t=this.parse(P(e));if(t.query=m({},t.query,n),e=(e=t.path+E(t.query)).replace(/\.md(\?)|\.md$/,"$1"),o&&(e=(0<(o=i.indexOf("?"))?i.substring(0,o):i)+e),this.config.relativePath&&0!==e.indexOf("/")){i=i.substring(0,i.lastIndexOf("/")+1);return j(L(i+e))}return j("/"+e)};var H=function(o){function e(e){o.call(this,e),this.mode="hash"}return o&&(e.__proto__=o),((e.prototype=Object.create(o&&o.prototype)).constructor=e).prototype.getBasePath=function(){var e=window.location.pathname||"",n=this.config.basePath,e=A(e,".html")?e+"#/"+n:e+"/"+n;return/^(\/|https?:)/g.test(n)?n:j(e)},e.prototype.getCurrentPath=function(){var e=location.href,n=e.indexOf("#");return-1===n?"":e.slice(n+1)},e.prototype.onchange=function(i){void 0===i&&(i=d);var o=!1;p("click",function(e){e="A"===e.target.tagName?e.target:e.target.parentNode;e&&"A"===e.tagName&&!g(e.href)&&(o=!0)}),p("hashchange",function(e){var n=o?"navigate":"history";o=!1,i({event:e,source:n})})},e.prototype.normalize=function(){var e=this.getCurrentPath();if("/"===(e=P(e)).charAt(0))return N(e);N("/"+e)},e.prototype.parse=function(e){var n="",i=(e=void 0===e?location.href:e).indexOf("#"),i=(e=0<=i?e.slice(i+1):e).indexOf("?");return 0<=i&&(n=e.slice(i+1),e=e.slice(0,i)),{path:e,file:this.getFile(e,!0),query:F(n)}},e.prototype.toURL=function(e,n,i){return"#"+o.prototype.toURL.call(this,e,n,i)},e}(I),D=function(n){function e(e){n.call(this,e),this.mode="history"}return n&&(e.__proto__=n),((e.prototype=Object.create(n&&n.prototype)).constructor=e).prototype.getCurrentPath=function(){var e=this.getBasePath(),n=window.location.pathname;return((n=e&&0===n.indexOf(e)?n.slice(e.length):n)||"/")+window.location.search+window.location.hash},e.prototype.onchange=function(i){void 0===i&&(i=d),p("click",function(e){var n="A"===e.target.tagName?e.target:e.target.parentNode;n&&"A"===n.tagName&&!g(n.href)&&(e.preventDefault(),n=n.href,window.history.pushState({key:n},"",n),i({event:e,source:"navigate"}))}),p("popstate",function(e){i({event:e,source:"history"})})},e.prototype.parse=function(e){var n="",i=(e=void 0===e?location.href:e).indexOf("?");0<=i&&(n=e.slice(i+1),e=e.slice(0,i));var o=q(location.origin),i=e.indexOf(o);return{path:e=-1<i?e.slice(i+o.length):e,file:this.getFile(e),query:F(n)}},e}(I),U={};var Z,B,V=/([^{]*?)\w(?=\})/g,Y={YYYY:"getFullYear",YY:"getYear",MM:function(e){return e.getMonth()+1},DD:"getDate",HH:"getHours",mm:"getMinutes",ss:"getSeconds",fff:"getMilliseconds"};function G(e){var n,i=e.loaded,o=e.total,t=e.step;Z||((e=w("div")).classList.add("progress"),r(h,e),Z=e),n=t?80<(n=parseInt(Z.style.width||0,10)+t)?80:n:Math.floor(i/o*100),Z.style.opacity=1,Z.style.width=95<=n?"100%":n+"%",95<=n&&(clearTimeout(B),B=setTimeout(function(e){Z.style.opacity=0,Z.style.width="0%"},200))}var W={};function X(t,e,n){void 0===e&&(e=!1),void 0===n&&(n={});function a(){r.addEventListener.apply(r,arguments)}var i,r=new XMLHttpRequest,o=W[t];if(o)return{then:function(e){return e(o.content,o.opt)},abort:d};for(i in r.open("GET",t),n)u.call(n,i)&&r.setRequestHeader(i,n[i]);return r.send(),{then:function(n,i){var o;void 0===i&&(i=d),e&&(o=setInterval(function(e){return G({step:Math.floor(5*Math.random()+1)})},500),a("progress",G),a("loadend",function(e){G(e),clearInterval(o)})),a("error",i),a("load",function(e){var e=e.target;400<=e.status?i(e):(e=W[t]={content:e.response,opt:{updatedAt:r.getResponseHeader("last-modified")}},n(e.content,e.opt))})},abort:function(e){return 4!==r.readyState&&r.abort()}}}function Q(e,n){e.innerHTML=e.innerHTML.replace(/var\(\s*--theme-color.*?\)/g,n)}var J=v.title;function K(){var e,n=l("section.cover");n&&(e=n.getBoundingClientRect().height,window.pageYOffset>=e||n.classList.contains("hidden")?S(h,"add","sticky"):S(h,"remove","sticky"))}function ee(e,n,o,i){var t=[];null!=(n=l(n))&&(t=k(n,"a"));var a,r=decodeURI(e.toURL(e.getCurrentPath()));return t.sort(function(e,n){return n.href.length-e.href.length}).forEach(function(e){var n=decodeURI(e.getAttribute("href")),i=o?e.parentNode:e;e.title=e.title||e.innerText,0!==r.indexOf(n)||a?S(i,"remove","active"):(a=e,S(i,"add","active"))}),i&&(v.title=a?a.title||a.innerText+" - "+J:J),a}function ne(e,n){for(var i=0;i<n.length;i++){var o=n[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var ie=(function(e,n,i){return n&&ne(e.prototype,n),i&&ne(e,i),e}(oe,[{key:"getIntermediateValue",value:function(e){return this.decimal?e:Math.round(e)}},{key:"getFinalValue",value:function(){return this.end}}]),oe);function oe(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,oe),this.start=e.start,this.end=e.end,this.decimal=e.decimal}function te(e,n){for(var i=0;i<n.length;i++){var o=n[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var ae=(function(e,n,i){return n&&te(e.prototype,n),i&&te(e,i),e}(re,[{key:"begin",value:function(){return this.isRunning||this.next===this.end||(this.frame=window.requestAnimationFrame(this._tick.bind(this))),this}},{key:"stop",value:function(){return window.cancelAnimationFrame(this.frame),this.isRunning=!1,this.frame=null,this.timeStart=null,this.next=null,this}},{key:"on",value:function(e,n){return this.events[e]=this.events[e]||[],this.events[e].push(n),this}},{key:"_emit",value:function(e,n){var i=this,e=this.events[e];e&&e.forEach(function(e){return e.call(i,n)})}},{key:"_tick",value:function(e){this.isRunning=!0;var n=this.next||this.start;this.timeStart||(this.timeStart=e),this.timeElapsed=e-this.timeStart,this.next=this.ease(this.timeElapsed,this.start,this.end-this.start,this.duration),this._shouldTick(n)?(this._emit("tick",this.tweener.getIntermediateValue(this.next)),this.frame=window.requestAnimationFrame(this._tick.bind(this))):(this._emit("tick",this.tweener.getFinalValue()),this._emit("done",null))}},{key:"_shouldTick",value:function(e){return{up:this.next<this.end&&e<=this.next,down:this.next>this.end&&e>=this.next}[this.direction]}},{key:"_defaultEase",value:function(e,n,i,o){return(e/=o/2)<1?i/2*e*e+n:-i/2*(--e*(e-2)-1)+n}}]),re);function re(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,re),this.duration=e.duration||1e3,this.ease=e.easing||this._defaultEase,this.tweener=e.tweener||new ie(e),this.start=this.tweener.start,this.end=this.tweener.end,this.frame=null,this.next=null,this.isRunning=!1,this.events={},this.direction=this.start<this.end?"up":"down"}var ce=document.currentScript;function ue(e){var n,i=m({auto2top:!1,autoHeader:!1,basePath:"",catchPluginErrors:!0,cornerExternalLinkTarget:"_blank",coverpage:"",el:"#app",executeScript:null,ext:".md",externalLinkRel:"noopener",externalLinkTarget:"_blank",formatUpdated:"",ga:"",homepage:"README.md",loadNavbar:null,loadSidebar:null,maxLevel:6,mergeNavbar:!1,name:"",nameLink:window.location.pathname,nativeEmoji:!1,noCompileLinks:[],noEmoji:!1,notFoundPage:!0,relativePath:!1,repo:"",routes:{},routerMode:"hash",subMaxLevel:0,themeColor:"",topMargin:0},"function"==typeof window.$docsify?window.$docsify(e):window.$docsify),o=ce||[].slice.call(document.getElementsByTagName("script")).filter(function(e){return/docsify\./.test(e.src)})[0];if(o)for(var t in i)!u.call(i,t)||f(n=o.getAttribute("data-"+a(t)))&&(i[t]=""===n||n);return!0===i.loadSidebar&&(i.loadSidebar="_sidebar"+i.ext),!0===i.loadNavbar&&(i.loadNavbar="_navbar"+i.ext),!0===i.coverpage&&(i.coverpage="_coverpage"+i.ext),!0===i.repo&&(i.repo=""),!0===i.name&&(i.name=""),window.$docsify=i}var fe={},pe=!1,de=null,ge=!0,se=0;function le(e){if(ge){for(var n,i=l(".sidebar"),o=k(".anchor"),t=b(i,".sidebar-nav"),a=b(i,"li.active"),r=document.documentElement,c=(r&&r.scrollTop||document.body.scrollTop)-se,u=0,f=o.length;u<f;u+=1){var p=o[u];if(p.offsetTop>c){n=n||p;break}n=p}!n||(r=fe[ve(e,n.getAttribute("data-id"))])&&r!==a&&(a&&a.classList.remove("active"),r.classList.add("active"),a=r,!pe&&h.classList.contains("sticky")&&(e=i.clientHeight,r=a.offsetTop+a.clientHeight+40,a=a.offsetTop>=t.scrollTop&&r<=t.scrollTop+e,i.scrollTop=a?t.scrollTop:+r<e?0:r-e))}}function ve(e,n){return decodeURIComponent(e)+"?id="+decodeURIComponent(n)}function he(e,n){var i,o;n&&(o=ue().topMargin,(i=b("#"+n))&&(i=i,void 0===(o=o)&&(o=0),de&&de.stop(),ge=!1,de=new ae({start:window.pageYOffset,end:Math.round(i.getBoundingClientRect().top)+window.pageYOffset-o,duration:500}).on("tick",function(e){return window.scrollTo(0,e)}).on("done",function(){ge=!0,de=null}).begin()),e=fe[ve(e,n)],(n=b(l(".sidebar"),"li.active"))&&n.classList.remove("active"),e&&e.classList.add("active"))}var _e=v.scrollingElement||v.documentElement;var me="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function be(e,n){return e(n={exports:{}},n.exports),n.exports}function ke(e){return $e[e]}var we=be(function(n){function e(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}n.exports={defaults:e(),getDefaults:e,changeDefaults:function(e){n.exports.defaults=e}}}),ye=(we.defaults,we.getDefaults,we.changeDefaults,/[&<>"']/),xe=/[&<>"']/g,Se=/[<>"']|&(?!#?\w+;)/,Ae=/[<>"']|&(?!#?\w+;)/g,$e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};var ze=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Fe(e){return e.replace(ze,function(e,n){return"colon"===(n=n.toLowerCase())?":":"#"===n.charAt(0)?"x"===n.charAt(1)?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""})}var Ee=/(^|[^\[])\^/g;var Re=/[^\w:]/g,Te=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;var Ce={},je=/^[^:]+:\/*[^/]*$/,Le=/^([^:]+:)[\s\S]*$/,Oe=/^([^:]+:\/*[^/]*)[\s\S]*$/;function qe(e,n){Ce[" "+e]||(je.test(e)?Ce[" "+e]=e+"/":Ce[" "+e]=Pe(e,"/",!0));var i=-1===(e=Ce[" "+e]).indexOf(":");return"//"===n.substring(0,2)?i?n:e.replace(Le,"$1")+n:"/"===n.charAt(0)?i?n:e.replace(Oe,"$1")+n:e+n}function Pe(e,n,i){var o=e.length;if(0===o)return"";for(var t=0;t<o;){var a=e.charAt(o-t-1);if(a!==n||i){if(a===n||!i)break;t++}else t++}return e.substr(0,o-t)}var Me=function(e,n){if(n){if(ye.test(e))return e.replace(xe,ke)}else if(Se.test(e))return e.replace(Ae,ke);return e},Ie=Fe,Ne=function(i,e){i=i.source||i,e=e||"";var o={replace:function(e,n){return n=(n=n.source||n).replace(Ee,"$1"),i=i.replace(e,n),o},getRegex:function(){return new RegExp(i,e)}};return o},He=function(e,n,i){if(e){var o;try{o=decodeURIComponent(Fe(i)).replace(Re,"").toLowerCase()}catch(e){return null}if(0===o.indexOf("javascript:")||0===o.indexOf("vbscript:")||0===o.indexOf("data:"))return null}n&&!Te.test(i)&&(i=qe(n,i));try{i=encodeURI(i).replace(/%25/g,"%")}catch(e){return null}return i},De={exec:function(){}},Ue=function(e){for(var n,i,o=arguments,t=1;t<arguments.length;t++)for(i in n=o[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},Ze=function(e,n){var i=e.replace(/\|/g,function(e,n,i){for(var o=!1,t=n;0<=--t&&"\\"===i[t];)o=!o;return o?"|":" |"}).split(/ \|/),o=0;if(i.length>n)i.splice(n);else for(;i.length<n;)i.push("");for(;o<i.length;o++)i[o]=i[o].trim().replace(/\\\|/g,"|");return i},Be=Pe,Ve=function(e,n){if(-1===e.indexOf(n[1]))return-1;for(var i=e.length,o=0,t=0;t<i;t++)if("\\"===e[t])t++;else if(e[t]===n[0])o++;else if(e[t]===n[1]&&--o<0)return t;return-1},Ye=function(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")},Ge=function(e,n){if(n<1)return"";for(var i="";1<n;)1&n&&(i+=e),n>>=1,e+=e;return i+e},We=we.defaults,Xe=Be,Qe=Ze,Je=Me,Ke=Ve;function en(e,n,i){var o=n.href,t=n.title?Je(n.title):null,n=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:i,href:o,title:t,text:n}:{type:"image",raw:i,href:o,title:t,text:Je(n)}}var nn=function(){function e(e){this.options=e||We}return e.prototype.space=function(e){e=this.rules.block.newline.exec(e);if(e)return 1<e[0].length?{type:"space",raw:e[0]}:{raw:"\n"}},e.prototype.code=function(e,n){e=this.rules.block.code.exec(e);if(e){n=n[n.length-1];if(n&&"paragraph"===n.type)return{raw:e[0],text:e[0].trimRight()};n=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Xe(n,"\n")}}},e.prototype.fences=function(e){var n=this.rules.block.fences.exec(e);if(n){var i=n[0],e=function(e,n){if(null===(e=e.match(/^(\s+)(?:```)/)))return n;var i=e[1];return n.split("\n").map(function(e){var n=e.match(/^\s+/);return null!==n&&n[0].length>=i.length?e.slice(i.length):e}).join("\n")}(i,n[3]||"");return{type:"code",raw:i,lang:n[2]&&n[2].trim(),text:e}}},e.prototype.heading=function(e){var n=this.rules.block.heading.exec(e);if(n){var i=n[2].trim();return/#$/.test(i)&&(e=Xe(i,"#"),!this.options.pedantic&&e&&!/ $/.test(e)||(i=e.trim())),{type:"heading",raw:n[0],depth:n[1].length,text:i}}},e.prototype.nptable=function(e){e=this.rules.block.nptable.exec(e);if(e){var n={type:"table",header:Qe(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[],raw:e[0]};if(n.header.length===n.align.length){for(var i=n.align.length,o=0;o<i;o++)/^ *-+: *$/.test(n.align[o])?n.align[o]="right":/^ *:-+: *$/.test(n.align[o])?n.align[o]="center":/^ *:-+ *$/.test(n.align[o])?n.align[o]="left":n.align[o]=null;for(i=n.cells.length,o=0;o<i;o++)n.cells[o]=Qe(n.cells[o],n.header.length);return n}}},e.prototype.hr=function(e){e=this.rules.block.hr.exec(e);if(e)return{type:"hr",raw:e[0]}},e.prototype.blockquote=function(e){var n=this.rules.block.blockquote.exec(e);if(n){e=n[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:n[0],text:e}}},e.prototype.list=function(e){e=this.rules.block.list.exec(e);if(e){for(var n,i,o,t,a,r=e[0],c=e[2],u=1<c.length,f={type:"list",raw:r,ordered:u,start:u?+c.slice(0,-1):"",loose:!1,items:[]},p=e[0].match(this.rules.block.item),d=!1,g=p.length,s=this.rules.block.listItemStart.exec(p[0]),l=0;l<g;l++){if(r=n=p[l],l!==g-1){if(o=this.rules.block.listItemStart.exec(p[l+1]),this.options.pedantic?o[1].length>s[1].length:o[1].length>s[0].length||3<o[1].length){p.splice(l,2,p[l]+"\n"+p[l+1]),l--,g--;continue}(!this.options.pedantic||this.options.smartLists?o[2][o[2].length-1]!==c[c.length-1]:u==(1===o[2].length))&&(i=p.slice(l+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-i.length),l=g-1),s=o}o=n.length,~(n=n.replace(/^ *([*+-]|\d+[.)]) ?/,"")).indexOf("\n ")&&(o-=n.length,n=this.options.pedantic?n.replace(/^ {1,4}/gm,""):n.replace(new RegExp("^ {1,"+o+"}","gm"),"")),o=d||/\n\n(?!\s*$)/.test(n),l!==g-1&&(d="\n"===n.charAt(n.length-1),o=o||d),o&&(f.loose=!0),this.options.gfm&&(a=void 0,(t=/^\[[ xX]\] /.test(n))&&(a=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,""))),f.items.push({type:"list_item",raw:r,task:t,checked:a,loose:o,text:n})}return f}},e.prototype.html=function(e){e=this.rules.block.html.exec(e);if(e)return{type:this.options.sanitize?"paragraph":"html",raw:e[0],pre:!this.options.sanitizer&&("pre"===e[1]||"script"===e[1]||"style"===e[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):Je(e[0]):e[0]}},e.prototype.def=function(e){e=this.rules.block.def.exec(e);if(e)return e[3]&&(e[3]=e[3].substring(1,e[3].length-1)),{tag:e[1].toLowerCase().replace(/\s+/g," "),raw:e[0],href:e[2],title:e[3]}},e.prototype.table=function(e){e=this.rules.block.table.exec(e);if(e){var n={type:"table",header:Qe(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=e[0];for(var i=n.align.length,o=0;o<i;o++)/^ *-+: *$/.test(n.align[o])?n.align[o]="right":/^ *:-+: *$/.test(n.align[o])?n.align[o]="center":/^ *:-+ *$/.test(n.align[o])?n.align[o]="left":n.align[o]=null;for(i=n.cells.length,o=0;o<i;o++)n.cells[o]=Qe(n.cells[o].replace(/^ *\| *| *\| *$/g,""),n.header.length);return n}}},e.prototype.lheading=function(e){e=this.rules.block.lheading.exec(e);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1]}},e.prototype.paragraph=function(e){e=this.rules.block.paragraph.exec(e);if(e)return{type:"paragraph",raw:e[0],text:"\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1]}},e.prototype.text=function(e,n){e=this.rules.block.text.exec(e);if(e){n=n[n.length-1];return n&&"text"===n.type?{raw:e[0],text:e[0]}:{type:"text",raw:e[0],text:e[0]}}},e.prototype.escape=function(e){e=this.rules.inline.escape.exec(e);if(e)return{type:"escape",raw:e[0],text:Je(e[1])}},e.prototype.tag=function(e,n,i){e=this.rules.inline.tag.exec(e);if(e)return!n&&/^<a /i.test(e[0])?n=!0:n&&/^<\/a>/i.test(e[0])&&(n=!1),!i&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?i=!0:i&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(i=!1),{type:this.options.sanitize?"text":"html",raw:e[0],inLink:n,inRawBlock:i,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):Je(e[0]):e[0]}},e.prototype.link=function(e){var n=this.rules.inline.link.exec(e);if(n){e=n[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;var i=Xe(e.slice(0,-1),"\\");if((e.length-i.length)%2==0)return}else{var o=Ke(n[2],"()");-1<o&&(t=(0===n[0].indexOf("!")?5:4)+n[1].length+o,n[2]=n[2].substring(0,o),n[0]=n[0].substring(0,t).trim(),n[3]="")}var t,i=n[2],o="";return this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i))&&(i=t[1],o=t[3]):o=n[3]?n[3].slice(1,-1):"",i=i.trim(),en(n,{href:(i=/^</.test(i)?this.options.pedantic&&!/>$/.test(e)?i.slice(1):i.slice(1,-1):i)&&i.replace(this.rules.inline._escapes,"$1"),title:o&&o.replace(this.rules.inline._escapes,"$1")},n[0])}},e.prototype.reflink=function(e,n){if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){var e=(i[2]||i[1]).replace(/\s+/g," ");if((e=n[e.toLowerCase()])&&e.href)return en(i,e,i[0]);var i=i[0].charAt(0);return{type:"text",raw:i,text:i}}},e.prototype.strong=function(e,n,i){void 0===i&&(i="");var o=this.rules.inline.strong.start.exec(e);if(o&&(!o[1]||o[1]&&(""===i||this.rules.inline.punctuation.exec(i)))){n=n.slice(-1*e.length);var t,a="**"===o[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(a.lastIndex=0;null!=(o=a.exec(n));)if(t=this.rules.inline.strong.middle.exec(n.slice(0,o.index+3)))return{type:"strong",raw:e.slice(0,t[0].length),text:e.slice(2,t[0].length-2)}}},e.prototype.em=function(e,n,i){void 0===i&&(i="");var o=this.rules.inline.em.start.exec(e);if(o&&(!o[1]||o[1]&&(""===i||this.rules.inline.punctuation.exec(i)))){n=n.slice(-1*e.length);var t,a="*"===o[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(a.lastIndex=0;null!=(o=a.exec(n));)if(t=this.rules.inline.em.middle.exec(n.slice(0,o.index+2)))return{type:"em",raw:e.slice(0,t[0].length),text:e.slice(1,t[0].length-1)}}},e.prototype.codespan=function(e){var n=this.rules.inline.code.exec(e);if(n){var i=n[2].replace(/\n/g," "),o=/[^ ]/.test(i),e=/^ /.test(i)&&/ $/.test(i);return o&&e&&(i=i.substring(1,i.length-1)),i=Je(i,!0),{type:"codespan",raw:n[0],text:i}}},e.prototype.br=function(e){e=this.rules.inline.br.exec(e);if(e)return{type:"br",raw:e[0]}},e.prototype.del=function(e){e=this.rules.inline.del.exec(e);if(e)return{type:"del",raw:e[0],text:e[2]}},e.prototype.autolink=function(e,n){e=this.rules.inline.autolink.exec(e);if(e){var i,n="@"===e[2]?"mailto:"+(i=Je(this.options.mangle?n(e[1]):e[1])):i=Je(e[1]);return{type:"link",raw:e[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}},e.prototype.url=function(e,n){var i,o,t,a;if(i=this.rules.inline.url.exec(e)){if("@"===i[2])t="mailto:"+(o=Je(this.options.mangle?n(i[0]):i[0]));else{for(;a=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0],a!==i[0];);o=Je(i[0]),t="www."===i[1]?"http://"+o:o}return{type:"link",raw:i[0],text:o,href:t,tokens:[{type:"text",raw:o,text:o}]}}},e.prototype.inlineText=function(e,n,i){e=this.rules.inline.text.exec(e);if(e){i=n?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):Je(e[0]):e[0]:Je(this.options.smartypants?i(e[0]):e[0]);return{type:"text",raw:e[0],text:i}}},e}(),Ze=De,Ve=Ne,De=Ue,Ne={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:Ze,table:Ze,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};Ne.def=Ve(Ne.def).replace("label",Ne._label).replace("title",Ne._title).getRegex(),Ne.bullet=/(?:[*+-]|\d{1,9}[.)])/,Ne.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,Ne.item=Ve(Ne.item,"gm").replace(/bull/g,Ne.bullet).getRegex(),Ne.listItemStart=Ve(/^( *)(bull)/).replace("bull",Ne.bullet).getRegex(),Ne.list=Ve(Ne.list).replace(/bull/g,Ne.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ne.def.source+")").getRegex(),Ne._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ne._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Ne.html=Ve(Ne.html,"i").replace("comment",Ne._comment).replace("tag",Ne._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ne.paragraph=Ve(Ne._paragraph).replace("hr",Ne.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Ne._tag).getRegex(),Ne.blockquote=Ve(Ne.blockquote).replace("paragraph",Ne.paragraph).getRegex(),Ne.normal=De({},Ne),Ne.gfm=De({},Ne.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Ne.gfm.nptable=Ve(Ne.gfm.nptable).replace("hr",Ne.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Ne._tag).getRegex(),Ne.gfm.table=Ve(Ne.gfm.table).replace("hr",Ne.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Ne._tag).getRegex(),Ne.pedantic=De({},Ne.normal,{html:Ve("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Ne._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ze,paragraph:Ve(Ne.normal._paragraph).replace("hr",Ne.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Ne.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});Ze={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ze,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation*\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation*\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Ze,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\s*punctuation])/,_punctuation:"!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~"};Ze.punctuation=Ve(Ze.punctuation).replace(/punctuation/g,Ze._punctuation).getRegex(),Ze._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",Ze._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",Ze._comment=Ve(Ne._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),Ze.em.start=Ve(Ze.em.start).replace(/punctuation/g,Ze._punctuation).getRegex(),Ze.em.middle=Ve(Ze.em.middle).replace(/punctuation/g,Ze._punctuation).replace(/overlapSkip/g,Ze._overlapSkip).getRegex(),Ze.em.endAst=Ve(Ze.em.endAst,"g").replace(/punctuation/g,Ze._punctuation).getRegex(),Ze.em.endUnd=Ve(Ze.em.endUnd,"g").replace(/punctuation/g,Ze._punctuation).getRegex(),Ze.strong.start=Ve(Ze.strong.start).replace(/punctuation/g,Ze._punctuation).getRegex(),Ze.strong.middle=Ve(Ze.strong.middle).replace(/punctuation/g,Ze._punctuation).replace(/overlapSkip/g,Ze._overlapSkip).getRegex(),Ze.strong.endAst=Ve(Ze.strong.endAst,"g").replace(/punctuation/g,Ze._punctuation).getRegex(),Ze.strong.endUnd=Ve(Ze.strong.endUnd,"g").replace(/punctuation/g,Ze._punctuation).getRegex(),Ze.blockSkip=Ve(Ze._blockSkip,"g").getRegex(),Ze.overlapSkip=Ve(Ze._overlapSkip,"g").getRegex(),Ze._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Ze._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Ze._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Ze.autolink=Ve(Ze.autolink).replace("scheme",Ze._scheme).replace("email",Ze._email).getRegex(),Ze._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Ze.tag=Ve(Ze.tag).replace("comment",Ze._comment).replace("attribute",Ze._attribute).getRegex(),Ze._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ze._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Ze._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Ze.link=Ve(Ze.link).replace("label",Ze._label).replace("href",Ze._href).replace("title",Ze._title).getRegex(),Ze.reflink=Ve(Ze.reflink).replace("label",Ze._label).getRegex(),Ze.reflinkSearch=Ve(Ze.reflinkSearch,"g").replace("reflink",Ze.reflink).replace("nolink",Ze.nolink).getRegex(),Ze.normal=De({},Ze),Ze.pedantic=De({},Ze.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Ve(/^!?\[(label)\]\((.*?)\)/).replace("label",Ze._label).getRegex(),reflink:Ve(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ze._label).getRegex()}),Ze.gfm=De({},Ze.normal,{escape:Ve(Ze.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),Ze.gfm.url=Ve(Ze.gfm.url,"i").replace("email",Ze.gfm._extended_email).getRegex(),Ze.breaks=De({},Ze.gfm,{br:Ve(Ze.br).replace("{2,}","*").getRegex(),text:Ve(Ze.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Ze={block:Ne,inline:Ze},on=we.defaults,tn=Ze.block,an=Ze.inline,rn=Ge;function cn(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function un(e){for(var n,i="",o=e.length,t=0;t<o;t++)n=e.charCodeAt(t),i+="&#"+(n=.5<Math.random()?"x"+n.toString(16):n)+";";return i}var fn=function(){function i(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||on,this.options.tokenizer=this.options.tokenizer||new nn,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;e={block:tn.normal,inline:an.normal};this.options.pedantic?(e.block=tn.pedantic,e.inline=an.pedantic):this.options.gfm&&(e.block=tn.gfm,this.options.breaks?e.inline=an.breaks:e.inline=an.gfm),this.tokenizer.rules=e}var e={rules:{configurable:!0}};return e.rules.get=function(){return{block:tn,inline:an}},i.lex=function(e,n){return new i(n).lex(e)},i.lexInline=function(e,n){return new i(n).inlineTokens(e)},i.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},i.prototype.blockTokens=function(e,n,i){var o,t,a,r;for(void 0===n&&(n=[]),void 0===i&&(i=!0),this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(o=this.tokenizer.space(e))e=e.substring(o.raw.length),o.type&&n.push(o);else if(o=this.tokenizer.code(e,n))e=e.substring(o.raw.length),o.type?n.push(o):((r=n[n.length-1]).raw+="\n"+o.raw,r.text+="\n"+o.text);else if(o=this.tokenizer.fences(e))e=e.substring(o.raw.length),n.push(o);else if(o=this.tokenizer.heading(e))e=e.substring(o.raw.length),n.push(o);else if(o=this.tokenizer.nptable(e))e=e.substring(o.raw.length),n.push(o);else if(o=this.tokenizer.hr(e))e=e.substring(o.raw.length),n.push(o);else if(o=this.tokenizer.blockquote(e))e=e.substring(o.raw.length),o.tokens=this.blockTokens(o.text,[],i),n.push(o);else if(o=this.tokenizer.list(e)){for(e=e.substring(o.raw.length),a=o.items.length,t=0;t<a;t++)o.items[t].tokens=this.blockTokens(o.items[t].text,[],!1);n.push(o)}else if(o=this.tokenizer.html(e))e=e.substring(o.raw.length),n.push(o);else if(i&&(o=this.tokenizer.def(e)))e=e.substring(o.raw.length),this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title});else if(o=this.tokenizer.table(e))e=e.substring(o.raw.length),n.push(o);else if(o=this.tokenizer.lheading(e))e=e.substring(o.raw.length),n.push(o);else if(i&&(o=this.tokenizer.paragraph(e)))e=e.substring(o.raw.length),n.push(o);else if(o=this.tokenizer.text(e,n))e=e.substring(o.raw.length),o.type?n.push(o):((r=n[n.length-1]).raw+="\n"+o.raw,r.text+="\n"+o.text);else if(e){var c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}return n},i.prototype.inline=function(e){for(var n,i,o,t,a,r=e.length,c=0;c<r;c++)switch((a=e[c]).type){case"paragraph":case"text":case"heading":a.tokens=[],this.inlineTokens(a.text,a.tokens);break;case"table":for(a.tokens={header:[],cells:[]},o=a.header.length,n=0;n<o;n++)a.tokens.header[n]=[],this.inlineTokens(a.header[n],a.tokens.header[n]);for(o=a.cells.length,n=0;n<o;n++)for(t=a.cells[n],a.tokens.cells[n]=[],i=0;i<t.length;i++)a.tokens.cells[n][i]=[],this.inlineTokens(t[i],a.tokens.cells[n][i]);break;case"blockquote":this.inline(a.tokens);break;case"list":for(o=a.items.length,n=0;n<o;n++)this.inline(a.items[n].tokens)}return e},i.prototype.inlineTokens=function(e,n,i,o){var t;void 0===n&&(n=[]),void 0===i&&(i=!1),void 0===o&&(o=!1);var a,r,c,u=e;if(this.tokens.links){var f=Object.keys(this.tokens.links);if(0<f.length)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(u));)f.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(u=u.slice(0,a.index)+"["+rn("a",a[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(u));)u=u.slice(0,a.index)+"["+rn("a",a[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(r||(c=""),r=!1,t=this.tokenizer.escape(e))e=e.substring(t.raw.length),n.push(t);else if(t=this.tokenizer.tag(e,i,o))e=e.substring(t.raw.length),i=t.inLink,o=t.inRawBlock,n.push(t);else if(t=this.tokenizer.link(e))e=e.substring(t.raw.length),"link"===t.type&&(t.tokens=this.inlineTokens(t.text,[],!0,o)),n.push(t);else if(t=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(t.raw.length),"link"===t.type&&(t.tokens=this.inlineTokens(t.text,[],!0,o)),n.push(t);else if(t=this.tokenizer.strong(e,u,c))e=e.substring(t.raw.length),t.tokens=this.inlineTokens(t.text,[],i,o),n.push(t);else if(t=this.tokenizer.em(e,u,c))e=e.substring(t.raw.length),t.tokens=this.inlineTokens(t.text,[],i,o),n.push(t);else if(t=this.tokenizer.codespan(e))e=e.substring(t.raw.length),n.push(t);else if(t=this.tokenizer.br(e))e=e.substring(t.raw.length),n.push(t);else if(t=this.tokenizer.del(e))e=e.substring(t.raw.length),t.tokens=this.inlineTokens(t.text,[],i,o),n.push(t);else if(t=this.tokenizer.autolink(e,un))e=e.substring(t.raw.length),n.push(t);else if(i||!(t=this.tokenizer.url(e,un))){if(t=this.tokenizer.inlineText(e,o,cn))e=e.substring(t.raw.length),c=t.raw.slice(-1),r=!0,n.push(t);else if(e){var p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}throw new Error(p)}}else e=e.substring(t.raw.length),n.push(t);return n},Object.defineProperties(i,e),i}(),pn=we.defaults,dn=He,gn=Me,sn=function(){function e(e){this.options=e||pn}return e.prototype.code=function(e,n,i){var o=(n||"").match(/\S*/)[0];return!this.options.highlight||null!=(n=this.options.highlight(e,o))&&n!==e&&(i=!0,e=n),e=e.replace(/\n$/,"")+"\n",o?'<pre><code class="'+this.options.langPrefix+gn(o,!0)+'">'+(i?e:gn(e,!0))+"</code></pre>\n":"<pre><code>"+(i?e:gn(e,!0))+"</code></pre>\n"},e.prototype.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},e.prototype.html=function(e){return e},e.prototype.heading=function(e,n,i,o){return this.options.headerIds?"<h"+n+' id="'+this.options.headerPrefix+o.slug(i)+'">'+e+"</h"+n+">\n":"<h"+n+">"+e+"</h"+n+">\n"},e.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},e.prototype.list=function(e,n,i){var o=n?"ol":"ul";return"<"+o+(n&&1!==i?' start="'+i+'"':"")+">\n"+e+"</"+o+">\n"},e.prototype.listitem=function(e){return"<li>"+e+"</li>\n"},e.prototype.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},e.prototype.paragraph=function(e){return"<p>"+e+"</p>\n"},e.prototype.table=function(e,n){return"<table>\n<thead>\n"+e+"</thead>\n"+(n=n&&"<tbody>"+n+"</tbody>")+"</table>\n"},e.prototype.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},e.prototype.tablecell=function(e,n){var i=n.header?"th":"td";return(n.align?"<"+i+' align="'+n.align+'">':"<"+i+">")+e+"</"+i+">\n"},e.prototype.strong=function(e){return"<strong>"+e+"</strong>"},e.prototype.em=function(e){return"<em>"+e+"</em>"},e.prototype.codespan=function(e){return"<code>"+e+"</code>"},e.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},e.prototype.del=function(e){return"<del>"+e+"</del>"},e.prototype.link=function(e,n,i){if(null===(e=dn(this.options.sanitize,this.options.baseUrl,e)))return i;e='<a href="'+gn(e)+'"';return n&&(e+=' title="'+n+'"'),e+=">"+i+"</a>"},e.prototype.image=function(e,n,i){if(null===(e=dn(this.options.sanitize,this.options.baseUrl,e)))return i;i='<img src="'+e+'" alt="'+i+'"';return n&&(i+=' title="'+n+'"'),i+=this.options.xhtml?"/>":">"},e.prototype.text=function(e){return e},e}(),ln=function(){function e(){}return e.prototype.strong=function(e){return e},e.prototype.em=function(e){return e},e.prototype.codespan=function(e){return e},e.prototype.del=function(e){return e},e.prototype.html=function(e){return e},e.prototype.text=function(e){return e},e.prototype.link=function(e,n,i){return""+i},e.prototype.image=function(e,n,i){return""+i},e.prototype.br=function(){return""},e}(),vn=function(){function e(){this.seen={}}return e.prototype.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},e.prototype.getNextSafeSlug=function(e,n){var i=e,o=0;if(this.seen.hasOwnProperty(i))for(o=this.seen[e];i=e+"-"+ ++o,this.seen.hasOwnProperty(i););return n||(this.seen[e]=o,this.seen[i]=0),i},e.prototype.slug=function(e,n){void 0===n&&(n={});e=this.serialize(e);return this.getNextSafeSlug(e,n.dryrun)},e}(),hn=we.defaults,_n=Ie,mn=function(){function i(e){this.options=e||hn,this.options.renderer=this.options.renderer||new sn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ln,this.slugger=new vn}return i.parse=function(e,n){return new i(n).parse(e)},i.parseInline=function(e,n){return new i(n).parseInline(e)},i.prototype.parse=function(e,n){void 0===n&&(n=!0);for(var i,o,t,a,r,c,u,f,p,d,g,s,l,v,h,_="",m=e.length,b=0;b<m;b++)switch((f=e[b]).type){case"space":continue;case"hr":_+=this.renderer.hr();continue;case"heading":_+=this.renderer.heading(this.parseInline(f.tokens),f.depth,_n(this.parseInline(f.tokens,this.textRenderer)),this.slugger);continue;case"code":_+=this.renderer.code(f.text,f.lang,f.escaped);continue;case"table":for(c=p="",t=f.header.length,i=0;i<t;i++)c+=this.renderer.tablecell(this.parseInline(f.tokens.header[i]),{header:!0,align:f.align[i]});for(p+=this.renderer.tablerow(c),u="",t=f.cells.length,i=0;i<t;i++){for(c="",a=(r=f.tokens.cells[i]).length,o=0;o<a;o++)c+=this.renderer.tablecell(this.parseInline(r[o]),{header:!1,align:f.align[o]});u+=this.renderer.tablerow(c)}_+=this.renderer.table(p,u);continue;case"blockquote":u=this.parse(f.tokens),_+=this.renderer.blockquote(u);continue;case"list":for(p=f.ordered,k=f.start,d=f.loose,t=f.items.length,u="",i=0;i<t;i++)l=(s=f.items[i]).checked,v=s.task,g="",s.task&&(h=this.renderer.checkbox(l),d?0<s.tokens.length&&"text"===s.tokens[0].type?(s.tokens[0].text=h+" "+s.tokens[0].text,s.tokens[0].tokens&&0<s.tokens[0].tokens.length&&"text"===s.tokens[0].tokens[0].type&&(s.tokens[0].tokens[0].text=h+" "+s.tokens[0].tokens[0].text)):s.tokens.unshift({type:"text",text:h}):g+=h),g+=this.parse(s.tokens,d),u+=this.renderer.listitem(g,v,l);_+=this.renderer.list(u,p,k);continue;case"html":_+=this.renderer.html(f.text);continue;case"paragraph":_+=this.renderer.paragraph(this.parseInline(f.tokens));continue;case"text":for(u=f.tokens?this.parseInline(f.tokens):f.text;b+1<m&&"text"===e[b+1].type;)u+="\n"+((f=e[++b]).tokens?this.parseInline(f.tokens):f.text);_+=n?this.renderer.paragraph(u):u;continue;default:var k='Token with "'+f.type+'" type was not found.';if(this.options.silent)return void console.error(k);throw new Error(k)}return _},i.prototype.parseInline=function(e,n){n=n||this.renderer;for(var i,o="",t=e.length,a=0;a<t;a++)switch((i=e[a]).type){case"escape":o+=n.text(i.text);break;case"html":o+=n.html(i.text);break;case"link":o+=n.link(i.href,i.title,this.parseInline(i.tokens,n));break;case"image":o+=n.image(i.href,i.title,i.text);break;case"strong":o+=n.strong(this.parseInline(i.tokens,n));break;case"em":o+=n.em(this.parseInline(i.tokens,n));break;case"codespan":o+=n.codespan(i.text);break;case"br":o+=n.br();break;case"del":o+=n.del(this.parseInline(i.tokens,n));break;case"text":o+=n.text(i.text);break;default:var r='Token with "'+i.type+'" type was not found.';if(this.options.silent)return void console.error(r);throw new Error(r)}return o},i}(),bn=Ue,kn=Ye,wn=Me,Me=we.getDefaults,yn=we.changeDefaults,we=we.defaults;function xn(e,i,o){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof i&&(o=i,i=null),i=bn({},xn.defaults,i||{}),kn(i),o){var t,a=i.highlight;try{t=fn.lex(e,i)}catch(e){return o(e)}function r(n){var e;if(!n)try{e=mn.parse(t,i)}catch(e){n=e}return i.highlight=a,n?o(n):o(null,e)}if(!a||a.length<3)return r();if(delete i.highlight,!t.length)return r();var c=0;return xn.walkTokens(t,function(i){"code"===i.type&&(c++,setTimeout(function(){a(i.text,i.lang,function(e,n){return e?r(e):(null!=n&&n!==i.text&&(i.text=n,i.escaped=!0),void(0===--c&&r()))})},0))}),void(0===c&&r())}try{var n=fn.lex(e,i);return i.walkTokens&&xn.walkTokens(n,i.walkTokens),mn.parse(n,i)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",i.silent)return"<p>An error occurred:</p><pre>"+wn(e.message+"",!0)+"</pre>";throw e}}xn.options=xn.setOptions=function(e){return bn(xn.defaults,e),yn(xn.defaults),xn},xn.getDefaults=Me,xn.defaults=we,xn.use=function(a){var n,e=bn({},a);if(a.renderer){var i,r=xn.defaults.renderer||new sn;for(i in a.renderer)!function(o){var t=r[o];r[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var i=a.renderer[o].apply(r,e);return i=!1===i?t.apply(r,e):i}}(i);e.renderer=r}if(a.tokenizer){var t,c=xn.defaults.tokenizer||new nn;for(t in a.tokenizer)!function(){var o=c[t];c[t]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var i=a.tokenizer[t].apply(c,e);return i=!1===i?o.apply(c,e):i}}();e.tokenizer=c}a.walkTokens&&(n=xn.defaults.walkTokens,e.walkTokens=function(e){a.walkTokens(e),n&&n(e)}),xn.setOptions(e)},xn.walkTokens=function(e,n){for(var i=0,o=e;i<o.length;i+=1){var t=o[i];switch(n(t),t.type){case"table":for(var a=0,r=t.tokens.header;a<r.length;a+=1){var c=r[a];xn.walkTokens(c,n)}for(var u=0,f=t.tokens.cells;u<f.length;u+=1)for(var p=0,d=f[u];p<d.length;p+=1){var g=d[p];xn.walkTokens(g,n)}break;case"list":xn.walkTokens(t.items,n);break;default:t.tokens&&xn.walkTokens(t.tokens,n)}}},xn.parseInline=function(e,n){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");n=bn({},xn.defaults,n||{}),kn(n);try{var i=fn.lexInline(e,n);return n.walkTokens&&xn.walkTokens(i,n.walkTokens),mn.parseInline(i,n)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",n.silent)return"<p>An error occurred:</p><pre>"+wn(e.message+"",!0)+"</pre>";throw e}},xn.Parser=mn,xn.parser=mn.parse,xn.Renderer=sn,xn.TextRenderer=ln,xn.Lexer=fn,xn.lexer=fn.lex,xn.Tokenizer=nn,xn.Slugger=vn;var Sn=xn.parse=xn;function An(e,i){if(void 0===i&&(i='<ul class="app-sub-sidebar">{inner}</ul>'),!e||!e.length)return"";var o="";return e.forEach(function(e){var n=e.title.replace(/(<([^>]+)>)/g,"");o+='<li><a class="section-link" href="'+e.slug+'" title="'+n+'">'+e.title+"</a></li>",e.children&&(o+=An(e.children,i))}),i.replace("{inner}",o)}function $n(e,n){return'<p class="'+e+'">'+n.slice(5).trim()+"</p>"}function zn(e,o){var t=[],a={};return e.forEach(function(e){var n=e.level||1,i=n-1;o<n||(a[i]?a[i].children=(a[i].children||[]).concat(e):t.push(e),a[n]=e)}),t}var Fn={},En=/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g;function Rn(e){return e.toLowerCase()}function Tn(e){if("string"!=typeof e)return"";var n=e.trim().replace(/[A-Z]+/g,Rn).replace(/<[^>]+>/g,"").replace(En,"").replace(/\s/g,"-").replace(/-+/g,"-").replace(/^(\d)/,"_$1"),e=Fn[n],e=u.call(Fn,n)?e+1:0;return n=(Fn[n]=e)?n+"-"+e:n}Tn.clear=function(){Fn={}};var Cn={baseURL:"https://github.githubassets.com/images/icons/emoji/",data:{100:"unicode/1f4af.png?v8",1234:"unicode/1f522.png?v8","+1":"unicode/1f44d.png?v8","-1":"unicode/1f44e.png?v8","1st_place_medal":"unicode/1f947.png?v8","2nd_place_medal":"unicode/1f948.png?v8","3rd_place_medal":"unicode/1f949.png?v8","8ball":"unicode/1f3b1.png?v8",a:"unicode/1f170.png?v8",ab:"unicode/1f18e.png?v8",abacus:"unicode/1f9ee.png?v8",abc:"unicode/1f524.png?v8",abcd:"unicode/1f521.png?v8",accept:"unicode/1f251.png?v8",accessibility:"accessibility.png?v8",accordion:"unicode/1fa97.png?v8",adhesive_bandage:"unicode/1fa79.png?v8",adult:"unicode/1f9d1.png?v8",aerial_tramway:"unicode/1f6a1.png?v8",afghanistan:"unicode/1f1e6-1f1eb.png?v8",airplane:"unicode/2708.png?v8",aland_islands:"unicode/1f1e6-1f1fd.png?v8",alarm_clock:"unicode/23f0.png?v8",albania:"unicode/1f1e6-1f1f1.png?v8",alembic:"unicode/2697.png?v8",algeria:"unicode/1f1e9-1f1ff.png?v8",alien:"unicode/1f47d.png?v8",ambulance:"unicode/1f691.png?v8",american_samoa:"unicode/1f1e6-1f1f8.png?v8",amphora:"unicode/1f3fa.png?v8",anatomical_heart:"unicode/1fac0.png?v8",anchor:"unicode/2693.png?v8",andorra:"unicode/1f1e6-1f1e9.png?v8",angel:"unicode/1f47c.png?v8",anger:"unicode/1f4a2.png?v8",angola:"unicode/1f1e6-1f1f4.png?v8",angry:"unicode/1f620.png?v8",anguilla:"unicode/1f1e6-1f1ee.png?v8",anguished:"unicode/1f627.png?v8",ant:"unicode/1f41c.png?v8",antarctica:"unicode/1f1e6-1f1f6.png?v8",antigua_barbuda:"unicode/1f1e6-1f1ec.png?v8",apple:"unicode/1f34e.png?v8",aquarius:"unicode/2652.png?v8",argentina:"unicode/1f1e6-1f1f7.png?v8",aries:"unicode/2648.png?v8",armenia:"unicode/1f1e6-1f1f2.png?v8",arrow_backward:"unicode/25c0.png?v8",arrow_double_down:"unicode/23ec.png?v8",arrow_double_up:"unicode/23eb.png?v8",arrow_down:"unicode/2b07.png?v8",arrow_down_small:"unicode/1f53d.png?v8",arrow_forward:"unicode/25b6.png?v8",arrow_heading_down:"unicode/2935.png?v8",arrow_heading_up:"unicode/2934.png?v8",arrow_left:"unicode/2b05.png?v8",arrow_lower_left:"unicode/2199.png?v8",arrow_lower_right:"unicode/2198.png?v8",arrow_right:"unicode/27a1.png?v8",arrow_right_hook:"unicode/21aa.png?v8",arrow_up:"unicode/2b06.png?v8",arrow_up_down:"unicode/2195.png?v8",arrow_up_small:"unicode/1f53c.png?v8",arrow_upper_left:"unicode/2196.png?v8",arrow_upper_right:"unicode/2197.png?v8",arrows_clockwise:"unicode/1f503.png?v8",arrows_counterclockwise:"unicode/1f504.png?v8",art:"unicode/1f3a8.png?v8",articulated_lorry:"unicode/1f69b.png?v8",artificial_satellite:"unicode/1f6f0.png?v8",artist:"unicode/1f9d1-1f3a8.png?v8",aruba:"unicode/1f1e6-1f1fc.png?v8",ascension_island:"unicode/1f1e6-1f1e8.png?v8",asterisk:"unicode/002a-20e3.png?v8",astonished:"unicode/1f632.png?v8",astronaut:"unicode/1f9d1-1f680.png?v8",athletic_shoe:"unicode/1f45f.png?v8",atm:"unicode/1f3e7.png?v8",atom:"atom.png?v8",atom_symbol:"unicode/269b.png?v8",australia:"unicode/1f1e6-1f1fa.png?v8",austria:"unicode/1f1e6-1f1f9.png?v8",auto_rickshaw:"unicode/1f6fa.png?v8",avocado:"unicode/1f951.png?v8",axe:"unicode/1fa93.png?v8",azerbaijan:"unicode/1f1e6-1f1ff.png?v8",b:"unicode/1f171.png?v8",baby:"unicode/1f476.png?v8",baby_bottle:"unicode/1f37c.png?v8",baby_chick:"unicode/1f424.png?v8",baby_symbol:"unicode/1f6bc.png?v8",back:"unicode/1f519.png?v8",bacon:"unicode/1f953.png?v8",badger:"unicode/1f9a1.png?v8",badminton:"unicode/1f3f8.png?v8",bagel:"unicode/1f96f.png?v8",baggage_claim:"unicode/1f6c4.png?v8",baguette_bread:"unicode/1f956.png?v8",bahamas:"unicode/1f1e7-1f1f8.png?v8",bahrain:"unicode/1f1e7-1f1ed.png?v8",balance_scale:"unicode/2696.png?v8",bald_man:"unicode/1f468-1f9b2.png?v8",bald_woman:"unicode/1f469-1f9b2.png?v8",ballet_shoes:"unicode/1fa70.png?v8",balloon:"unicode/1f388.png?v8",ballot_box:"unicode/1f5f3.png?v8",ballot_box_with_check:"unicode/2611.png?v8",bamboo:"unicode/1f38d.png?v8",banana:"unicode/1f34c.png?v8",bangbang:"unicode/203c.png?v8",bangladesh:"unicode/1f1e7-1f1e9.png?v8",banjo:"unicode/1fa95.png?v8",bank:"unicode/1f3e6.png?v8",bar_chart:"unicode/1f4ca.png?v8",barbados:"unicode/1f1e7-1f1e7.png?v8",barber:"unicode/1f488.png?v8",baseball:"unicode/26be.png?v8",basecamp:"basecamp.png?v8",basecampy:"basecampy.png?v8",basket:"unicode/1f9fa.png?v8",basketball:"unicode/1f3c0.png?v8",basketball_man:"unicode/26f9-2642.png?v8",basketball_woman:"unicode/26f9-2640.png?v8",bat:"unicode/1f987.png?v8",bath:"unicode/1f6c0.png?v8",bathtub:"unicode/1f6c1.png?v8",battery:"unicode/1f50b.png?v8",beach_umbrella:"unicode/1f3d6.png?v8",bear:"unicode/1f43b.png?v8",bearded_person:"unicode/1f9d4.png?v8",beaver:"unicode/1f9ab.png?v8",bed:"unicode/1f6cf.png?v8",bee:"unicode/1f41d.png?v8",beer:"unicode/1f37a.png?v8",beers:"unicode/1f37b.png?v8",beetle:"unicode/1fab2.png?v8",beginner:"unicode/1f530.png?v8",belarus:"unicode/1f1e7-1f1fe.png?v8",belgium:"unicode/1f1e7-1f1ea.png?v8",belize:"unicode/1f1e7-1f1ff.png?v8",bell:"unicode/1f514.png?v8",bell_pepper:"unicode/1fad1.png?v8",bellhop_bell:"unicode/1f6ce.png?v8",benin:"unicode/1f1e7-1f1ef.png?v8",bento:"unicode/1f371.png?v8",bermuda:"unicode/1f1e7-1f1f2.png?v8",beverage_box:"unicode/1f9c3.png?v8",bhutan:"unicode/1f1e7-1f1f9.png?v8",bicyclist:"unicode/1f6b4.png?v8",bike:"unicode/1f6b2.png?v8",biking_man:"unicode/1f6b4-2642.png?v8",biking_woman:"unicode/1f6b4-2640.png?v8",bikini:"unicode/1f459.png?v8",billed_cap:"unicode/1f9e2.png?v8",biohazard:"unicode/2623.png?v8",bird:"unicode/1f426.png?v8",birthday:"unicode/1f382.png?v8",bison:"unicode/1f9ac.png?v8",black_cat:"unicode/1f408-2b1b.png?v8",black_circle:"unicode/26ab.png?v8",black_flag:"unicode/1f3f4.png?v8",black_heart:"unicode/1f5a4.png?v8",black_joker:"unicode/1f0cf.png?v8",black_large_square:"unicode/2b1b.png?v8",black_medium_small_square:"unicode/25fe.png?v8",black_medium_square:"unicode/25fc.png?v8",black_nib:"unicode/2712.png?v8",black_small_square:"unicode/25aa.png?v8",black_square_button:"unicode/1f532.png?v8",blond_haired_man:"unicode/1f471-2642.png?v8",blond_haired_person:"unicode/1f471.png?v8",blond_haired_woman:"unicode/1f471-2640.png?v8",blonde_woman:"unicode/1f471-2640.png?v8",blossom:"unicode/1f33c.png?v8",blowfish:"unicode/1f421.png?v8",blue_book:"unicode/1f4d8.png?v8",blue_car:"unicode/1f699.png?v8",blue_heart:"unicode/1f499.png?v8",blue_square:"unicode/1f7e6.png?v8",blueberries:"unicode/1fad0.png?v8",blush:"unicode/1f60a.png?v8",boar:"unicode/1f417.png?v8",boat:"unicode/26f5.png?v8",bolivia:"unicode/1f1e7-1f1f4.png?v8",bomb:"unicode/1f4a3.png?v8",bone:"unicode/1f9b4.png?v8",book:"unicode/1f4d6.png?v8",bookmark:"unicode/1f516.png?v8",bookmark_tabs:"unicode/1f4d1.png?v8",books:"unicode/1f4da.png?v8",boom:"unicode/1f4a5.png?v8",boomerang:"unicode/1fa83.png?v8",boot:"unicode/1f462.png?v8",bosnia_herzegovina:"unicode/1f1e7-1f1e6.png?v8",botswana:"unicode/1f1e7-1f1fc.png?v8",bouncing_ball_man:"unicode/26f9-2642.png?v8",bouncing_ball_person:"unicode/26f9.png?v8",bouncing_ball_woman:"unicode/26f9-2640.png?v8",bouquet:"unicode/1f490.png?v8",bouvet_island:"unicode/1f1e7-1f1fb.png?v8",bow:"unicode/1f647.png?v8",bow_and_arrow:"unicode/1f3f9.png?v8",bowing_man:"unicode/1f647-2642.png?v8",bowing_woman:"unicode/1f647-2640.png?v8",bowl_with_spoon:"unicode/1f963.png?v8",bowling:"unicode/1f3b3.png?v8",bowtie:"bowtie.png?v8",boxing_glove:"unicode/1f94a.png?v8",boy:"unicode/1f466.png?v8",brain:"unicode/1f9e0.png?v8",brazil:"unicode/1f1e7-1f1f7.png?v8",bread:"unicode/1f35e.png?v8",breast_feeding:"unicode/1f931.png?v8",bricks:"unicode/1f9f1.png?v8",bride_with_veil:"unicode/1f470-2640.png?v8",bridge_at_night:"unicode/1f309.png?v8",briefcase:"unicode/1f4bc.png?v8",british_indian_ocean_territory:"unicode/1f1ee-1f1f4.png?v8",british_virgin_islands:"unicode/1f1fb-1f1ec.png?v8",broccoli:"unicode/1f966.png?v8",broken_heart:"unicode/1f494.png?v8",broom:"unicode/1f9f9.png?v8",brown_circle:"unicode/1f7e4.png?v8",brown_heart:"unicode/1f90e.png?v8",brown_square:"unicode/1f7eb.png?v8",brunei:"unicode/1f1e7-1f1f3.png?v8",bubble_tea:"unicode/1f9cb.png?v8",bucket:"unicode/1faa3.png?v8",bug:"unicode/1f41b.png?v8",building_construction:"unicode/1f3d7.png?v8",bulb:"unicode/1f4a1.png?v8",bulgaria:"unicode/1f1e7-1f1ec.png?v8",bullettrain_front:"unicode/1f685.png?v8",bullettrain_side:"unicode/1f684.png?v8",burkina_faso:"unicode/1f1e7-1f1eb.png?v8",burrito:"unicode/1f32f.png?v8",burundi:"unicode/1f1e7-1f1ee.png?v8",bus:"unicode/1f68c.png?v8",business_suit_levitating:"unicode/1f574.png?v8",busstop:"unicode/1f68f.png?v8",bust_in_silhouette:"unicode/1f464.png?v8",busts_in_silhouette:"unicode/1f465.png?v8",butter:"unicode/1f9c8.png?v8",butterfly:"unicode/1f98b.png?v8",cactus:"unicode/1f335.png?v8",cake:"unicode/1f370.png?v8",calendar:"unicode/1f4c6.png?v8",call_me_hand:"unicode/1f919.png?v8",calling:"unicode/1f4f2.png?v8",cambodia:"unicode/1f1f0-1f1ed.png?v8",camel:"unicode/1f42b.png?v8",camera:"unicode/1f4f7.png?v8",camera_flash:"unicode/1f4f8.png?v8",cameroon:"unicode/1f1e8-1f1f2.png?v8",camping:"unicode/1f3d5.png?v8",canada:"unicode/1f1e8-1f1e6.png?v8",canary_islands:"unicode/1f1ee-1f1e8.png?v8",cancer:"unicode/264b.png?v8",candle:"unicode/1f56f.png?v8",candy:"unicode/1f36c.png?v8",canned_food:"unicode/1f96b.png?v8",canoe:"unicode/1f6f6.png?v8",cape_verde:"unicode/1f1e8-1f1fb.png?v8",capital_abcd:"unicode/1f520.png?v8",capricorn:"unicode/2651.png?v8",car:"unicode/1f697.png?v8",card_file_box:"unicode/1f5c3.png?v8",card_index:"unicode/1f4c7.png?v8",card_index_dividers:"unicode/1f5c2.png?v8",caribbean_netherlands:"unicode/1f1e7-1f1f6.png?v8",carousel_horse:"unicode/1f3a0.png?v8",carpentry_saw:"unicode/1fa9a.png?v8",carrot:"unicode/1f955.png?v8",cartwheeling:"unicode/1f938.png?v8",cat:"unicode/1f431.png?v8",cat2:"unicode/1f408.png?v8",cayman_islands:"unicode/1f1f0-1f1fe.png?v8",cd:"unicode/1f4bf.png?v8",central_african_republic:"unicode/1f1e8-1f1eb.png?v8",ceuta_melilla:"unicode/1f1ea-1f1e6.png?v8",chad:"unicode/1f1f9-1f1e9.png?v8",chains:"unicode/26d3.png?v8",chair:"unicode/1fa91.png?v8",champagne:"unicode/1f37e.png?v8",chart:"unicode/1f4b9.png?v8",chart_with_downwards_trend:"unicode/1f4c9.png?v8",chart_with_upwards_trend:"unicode/1f4c8.png?v8",checkered_flag:"unicode/1f3c1.png?v8",cheese:"unicode/1f9c0.png?v8",cherries:"unicode/1f352.png?v8",cherry_blossom:"unicode/1f338.png?v8",chess_pawn:"unicode/265f.png?v8",chestnut:"unicode/1f330.png?v8",chicken:"unicode/1f414.png?v8",child:"unicode/1f9d2.png?v8",children_crossing:"unicode/1f6b8.png?v8",chile:"unicode/1f1e8-1f1f1.png?v8",chipmunk:"unicode/1f43f.png?v8",chocolate_bar:"unicode/1f36b.png?v8",chopsticks:"unicode/1f962.png?v8",christmas_island:"unicode/1f1e8-1f1fd.png?v8",christmas_tree:"unicode/1f384.png?v8",church:"unicode/26ea.png?v8",cinema:"unicode/1f3a6.png?v8",circus_tent:"unicode/1f3aa.png?v8",city_sunrise:"unicode/1f307.png?v8",city_sunset:"unicode/1f306.png?v8",cityscape:"unicode/1f3d9.png?v8",cl:"unicode/1f191.png?v8",clamp:"unicode/1f5dc.png?v8",clap:"unicode/1f44f.png?v8",clapper:"unicode/1f3ac.png?v8",classical_building:"unicode/1f3db.png?v8",climbing:"unicode/1f9d7.png?v8",climbing_man:"unicode/1f9d7-2642.png?v8",climbing_woman:"unicode/1f9d7-2640.png?v8",clinking_glasses:"unicode/1f942.png?v8",clipboard:"unicode/1f4cb.png?v8",clipperton_island:"unicode/1f1e8-1f1f5.png?v8",clock1:"unicode/1f550.png?v8",clock10:"unicode/1f559.png?v8",clock1030:"unicode/1f565.png?v8",clock11:"unicode/1f55a.png?v8",clock1130:"unicode/1f566.png?v8",clock12:"unicode/1f55b.png?v8",clock1230:"unicode/1f567.png?v8",clock130:"unicode/1f55c.png?v8",clock2:"unicode/1f551.png?v8",clock230:"unicode/1f55d.png?v8",clock3:"unicode/1f552.png?v8",clock330:"unicode/1f55e.png?v8",clock4:"unicode/1f553.png?v8",clock430:"unicode/1f55f.png?v8",clock5:"unicode/1f554.png?v8",clock530:"unicode/1f560.png?v8",clock6:"unicode/1f555.png?v8",clock630:"unicode/1f561.png?v8",clock7:"unicode/1f556.png?v8",clock730:"unicode/1f562.png?v8",clock8:"unicode/1f557.png?v8",clock830:"unicode/1f563.png?v8",clock9:"unicode/1f558.png?v8",clock930:"unicode/1f564.png?v8",closed_book:"unicode/1f4d5.png?v8",closed_lock_with_key:"unicode/1f510.png?v8",closed_umbrella:"unicode/1f302.png?v8",cloud:"unicode/2601.png?v8",cloud_with_lightning:"unicode/1f329.png?v8",cloud_with_lightning_and_rain:"unicode/26c8.png?v8",cloud_with_rain:"unicode/1f327.png?v8",cloud_with_snow:"unicode/1f328.png?v8",clown_face:"unicode/1f921.png?v8",clubs:"unicode/2663.png?v8",cn:"unicode/1f1e8-1f1f3.png?v8",coat:"unicode/1f9e5.png?v8",cockroach:"unicode/1fab3.png?v8",cocktail:"unicode/1f378.png?v8",coconut:"unicode/1f965.png?v8",cocos_islands:"unicode/1f1e8-1f1e8.png?v8",coffee:"unicode/2615.png?v8",coffin:"unicode/26b0.png?v8",coin:"unicode/1fa99.png?v8",cold_face:"unicode/1f976.png?v8",cold_sweat:"unicode/1f630.png?v8",collision:"unicode/1f4a5.png?v8",colombia:"unicode/1f1e8-1f1f4.png?v8",comet:"unicode/2604.png?v8",comoros:"unicode/1f1f0-1f1f2.png?v8",compass:"unicode/1f9ed.png?v8",computer:"unicode/1f4bb.png?v8",computer_mouse:"unicode/1f5b1.png?v8",confetti_ball:"unicode/1f38a.png?v8",confounded:"unicode/1f616.png?v8",confused:"unicode/1f615.png?v8",congo_brazzaville:"unicode/1f1e8-1f1ec.png?v8",congo_kinshasa:"unicode/1f1e8-1f1e9.png?v8",congratulations:"unicode/3297.png?v8",construction:"unicode/1f6a7.png?v8",construction_worker:"unicode/1f477.png?v8",construction_worker_man:"unicode/1f477-2642.png?v8",construction_worker_woman:"unicode/1f477-2640.png?v8",control_knobs:"unicode/1f39b.png?v8",convenience_store:"unicode/1f3ea.png?v8",cook:"unicode/1f9d1-1f373.png?v8",cook_islands:"unicode/1f1e8-1f1f0.png?v8",cookie:"unicode/1f36a.png?v8",cool:"unicode/1f192.png?v8",cop:"unicode/1f46e.png?v8",copyright:"unicode/00a9.png?v8",corn:"unicode/1f33d.png?v8",costa_rica:"unicode/1f1e8-1f1f7.png?v8",cote_divoire:"unicode/1f1e8-1f1ee.png?v8",couch_and_lamp:"unicode/1f6cb.png?v8",couple:"unicode/1f46b.png?v8",couple_with_heart:"unicode/1f491.png?v8",couple_with_heart_man_man:"unicode/1f468-2764-1f468.png?v8",couple_with_heart_woman_man:"unicode/1f469-2764-1f468.png?v8",couple_with_heart_woman_woman:"unicode/1f469-2764-1f469.png?v8",couplekiss:"unicode/1f48f.png?v8",couplekiss_man_man:"unicode/1f468-2764-1f48b-1f468.png?v8",couplekiss_man_woman:"unicode/1f469-2764-1f48b-1f468.png?v8",couplekiss_woman_woman:"unicode/1f469-2764-1f48b-1f469.png?v8",cow:"unicode/1f42e.png?v8",cow2:"unicode/1f404.png?v8",cowboy_hat_face:"unicode/1f920.png?v8",crab:"unicode/1f980.png?v8",crayon:"unicode/1f58d.png?v8",credit_card:"unicode/1f4b3.png?v8",crescent_moon:"unicode/1f319.png?v8",cricket:"unicode/1f997.png?v8",cricket_game:"unicode/1f3cf.png?v8",croatia:"unicode/1f1ed-1f1f7.png?v8",crocodile:"unicode/1f40a.png?v8",croissant:"unicode/1f950.png?v8",crossed_fingers:"unicode/1f91e.png?v8",crossed_flags:"unicode/1f38c.png?v8",crossed_swords:"unicode/2694.png?v8",crown:"unicode/1f451.png?v8",cry:"unicode/1f622.png?v8",crying_cat_face:"unicode/1f63f.png?v8",crystal_ball:"unicode/1f52e.png?v8",cuba:"unicode/1f1e8-1f1fa.png?v8",cucumber:"unicode/1f952.png?v8",cup_with_straw:"unicode/1f964.png?v8",cupcake:"unicode/1f9c1.png?v8",cupid:"unicode/1f498.png?v8",curacao:"unicode/1f1e8-1f1fc.png?v8",curling_stone:"unicode/1f94c.png?v8",curly_haired_man:"unicode/1f468-1f9b1.png?v8",curly_haired_woman:"unicode/1f469-1f9b1.png?v8",curly_loop:"unicode/27b0.png?v8",currency_exchange:"unicode/1f4b1.png?v8",curry:"unicode/1f35b.png?v8",cursing_face:"unicode/1f92c.png?v8",custard:"unicode/1f36e.png?v8",customs:"unicode/1f6c3.png?v8",cut_of_meat:"unicode/1f969.png?v8",cyclone:"unicode/1f300.png?v8",cyprus:"unicode/1f1e8-1f1fe.png?v8",czech_republic:"unicode/1f1e8-1f1ff.png?v8",dagger:"unicode/1f5e1.png?v8",dancer:"unicode/1f483.png?v8",dancers:"unicode/1f46f.png?v8",dancing_men:"unicode/1f46f-2642.png?v8",dancing_women:"unicode/1f46f-2640.png?v8",dango:"unicode/1f361.png?v8",dark_sunglasses:"unicode/1f576.png?v8",dart:"unicode/1f3af.png?v8",dash:"unicode/1f4a8.png?v8",date:"unicode/1f4c5.png?v8",de:"unicode/1f1e9-1f1ea.png?v8",deaf_man:"unicode/1f9cf-2642.png?v8",deaf_person:"unicode/1f9cf.png?v8",deaf_woman:"unicode/1f9cf-2640.png?v8",deciduous_tree:"unicode/1f333.png?v8",deer:"unicode/1f98c.png?v8",denmark:"unicode/1f1e9-1f1f0.png?v8",department_store:"unicode/1f3ec.png?v8",dependabot:"dependabot.png?v8",derelict_house:"unicode/1f3da.png?v8",desert:"unicode/1f3dc.png?v8",desert_island:"unicode/1f3dd.png?v8",desktop_computer:"unicode/1f5a5.png?v8",detective:"unicode/1f575.png?v8",diamond_shape_with_a_dot_inside:"unicode/1f4a0.png?v8",diamonds:"unicode/2666.png?v8",diego_garcia:"unicode/1f1e9-1f1ec.png?v8",disappointed:"unicode/1f61e.png?v8",disappointed_relieved:"unicode/1f625.png?v8",disguised_face:"unicode/1f978.png?v8",diving_mask:"unicode/1f93f.png?v8",diya_lamp:"unicode/1fa94.png?v8",dizzy:"unicode/1f4ab.png?v8",dizzy_face:"unicode/1f635.png?v8",djibouti:"unicode/1f1e9-1f1ef.png?v8",dna:"unicode/1f9ec.png?v8",do_not_litter:"unicode/1f6af.png?v8",dodo:"unicode/1f9a4.png?v8",dog:"unicode/1f436.png?v8",dog2:"unicode/1f415.png?v8",dollar:"unicode/1f4b5.png?v8",dolls:"unicode/1f38e.png?v8",dolphin:"unicode/1f42c.png?v8",dominica:"unicode/1f1e9-1f1f2.png?v8",dominican_republic:"unicode/1f1e9-1f1f4.png?v8",door:"unicode/1f6aa.png?v8",doughnut:"unicode/1f369.png?v8",dove:"unicode/1f54a.png?v8",dragon:"unicode/1f409.png?v8",dragon_face:"unicode/1f432.png?v8",dress:"unicode/1f457.png?v8",dromedary_camel:"unicode/1f42a.png?v8",drooling_face:"unicode/1f924.png?v8",drop_of_blood:"unicode/1fa78.png?v8",droplet:"unicode/1f4a7.png?v8",drum:"unicode/1f941.png?v8",duck:"unicode/1f986.png?v8",dumpling:"unicode/1f95f.png?v8",dvd:"unicode/1f4c0.png?v8","e-mail":"unicode/1f4e7.png?v8",eagle:"unicode/1f985.png?v8",ear:"unicode/1f442.png?v8",ear_of_rice:"unicode/1f33e.png?v8",ear_with_hearing_aid:"unicode/1f9bb.png?v8",earth_africa:"unicode/1f30d.png?v8",earth_americas:"unicode/1f30e.png?v8",earth_asia:"unicode/1f30f.png?v8",ecuador:"unicode/1f1ea-1f1e8.png?v8",egg:"unicode/1f95a.png?v8",eggplant:"unicode/1f346.png?v8",egypt:"unicode/1f1ea-1f1ec.png?v8",eight:"unicode/0038-20e3.png?v8",eight_pointed_black_star:"unicode/2734.png?v8",eight_spoked_asterisk:"unicode/2733.png?v8",eject_button:"unicode/23cf.png?v8",el_salvador:"unicode/1f1f8-1f1fb.png?v8",electric_plug:"unicode/1f50c.png?v8",electron:"electron.png?v8",elephant:"unicode/1f418.png?v8",elevator:"unicode/1f6d7.png?v8",elf:"unicode/1f9dd.png?v8",elf_man:"unicode/1f9dd-2642.png?v8",elf_woman:"unicode/1f9dd-2640.png?v8",email:"unicode/1f4e7.png?v8",end:"unicode/1f51a.png?v8",england:"unicode/1f3f4-e0067-e0062-e0065-e006e-e0067-e007f.png?v8",envelope:"unicode/2709.png?v8",envelope_with_arrow:"unicode/1f4e9.png?v8",equatorial_guinea:"unicode/1f1ec-1f1f6.png?v8",eritrea:"unicode/1f1ea-1f1f7.png?v8",es:"unicode/1f1ea-1f1f8.png?v8",estonia:"unicode/1f1ea-1f1ea.png?v8",ethiopia:"unicode/1f1ea-1f1f9.png?v8",eu:"unicode/1f1ea-1f1fa.png?v8",euro:"unicode/1f4b6.png?v8",european_castle:"unicode/1f3f0.png?v8",european_post_office:"unicode/1f3e4.png?v8",european_union:"unicode/1f1ea-1f1fa.png?v8",evergreen_tree:"unicode/1f332.png?v8",exclamation:"unicode/2757.png?v8",exploding_head:"unicode/1f92f.png?v8",expressionless:"unicode/1f611.png?v8",eye:"unicode/1f441.png?v8",eye_speech_bubble:"unicode/1f441-1f5e8.png?v8",eyeglasses:"unicode/1f453.png?v8",eyes:"unicode/1f440.png?v8",face_exhaling:"unicode/1f62e-1f4a8.png?v8",face_in_clouds:"unicode/1f636-1f32b.png?v8",face_with_head_bandage:"unicode/1f915.png?v8",face_with_spiral_eyes:"unicode/1f635-1f4ab.png?v8",face_with_thermometer:"unicode/1f912.png?v8",facepalm:"unicode/1f926.png?v8",facepunch:"unicode/1f44a.png?v8",factory:"unicode/1f3ed.png?v8",factory_worker:"unicode/1f9d1-1f3ed.png?v8",fairy:"unicode/1f9da.png?v8",fairy_man:"unicode/1f9da-2642.png?v8",fairy_woman:"unicode/1f9da-2640.png?v8",falafel:"unicode/1f9c6.png?v8",falkland_islands:"unicode/1f1eb-1f1f0.png?v8",fallen_leaf:"unicode/1f342.png?v8",family:"unicode/1f46a.png?v8",family_man_boy:"unicode/1f468-1f466.png?v8",family_man_boy_boy:"unicode/1f468-1f466-1f466.png?v8",family_man_girl:"unicode/1f468-1f467.png?v8",family_man_girl_boy:"unicode/1f468-1f467-1f466.png?v8",family_man_girl_girl:"unicode/1f468-1f467-1f467.png?v8",family_man_man_boy:"unicode/1f468-1f468-1f466.png?v8",family_man_man_boy_boy:"unicode/1f468-1f468-1f466-1f466.png?v8",family_man_man_girl:"unicode/1f468-1f468-1f467.png?v8",family_man_man_girl_boy:"unicode/1f468-1f468-1f467-1f466.png?v8",family_man_man_girl_girl:"unicode/1f468-1f468-1f467-1f467.png?v8",family_man_woman_boy:"unicode/1f468-1f469-1f466.png?v8",family_man_woman_boy_boy:"unicode/1f468-1f469-1f466-1f466.png?v8",family_man_woman_girl:"unicode/1f468-1f469-1f467.png?v8",family_man_woman_girl_boy:"unicode/1f468-1f469-1f467-1f466.png?v8",family_man_woman_girl_girl:"unicode/1f468-1f469-1f467-1f467.png?v8",family_woman_boy:"unicode/1f469-1f466.png?v8",family_woman_boy_boy:"unicode/1f469-1f466-1f466.png?v8",family_woman_girl:"unicode/1f469-1f467.png?v8",family_woman_girl_boy:"unicode/1f469-1f467-1f466.png?v8",family_woman_girl_girl:"unicode/1f469-1f467-1f467.png?v8",family_woman_woman_boy:"unicode/1f469-1f469-1f466.png?v8",family_woman_woman_boy_boy:"unicode/1f469-1f469-1f466-1f466.png?v8",family_woman_woman_girl:"unicode/1f469-1f469-1f467.png?v8",family_woman_woman_girl_boy:"unicode/1f469-1f469-1f467-1f466.png?v8",family_woman_woman_girl_girl:"unicode/1f469-1f469-1f467-1f467.png?v8",farmer:"unicode/1f9d1-1f33e.png?v8",faroe_islands:"unicode/1f1eb-1f1f4.png?v8",fast_forward:"unicode/23e9.png?v8",fax:"unicode/1f4e0.png?v8",fearful:"unicode/1f628.png?v8",feather:"unicode/1fab6.png?v8",feelsgood:"feelsgood.png?v8",feet:"unicode/1f43e.png?v8",female_detective:"unicode/1f575-2640.png?v8",female_sign:"unicode/2640.png?v8",ferris_wheel:"unicode/1f3a1.png?v8",ferry:"unicode/26f4.png?v8",field_hockey:"unicode/1f3d1.png?v8",fiji:"unicode/1f1eb-1f1ef.png?v8",file_cabinet:"unicode/1f5c4.png?v8",file_folder:"unicode/1f4c1.png?v8",film_projector:"unicode/1f4fd.png?v8",film_strip:"unicode/1f39e.png?v8",finland:"unicode/1f1eb-1f1ee.png?v8",finnadie:"finnadie.png?v8",fire:"unicode/1f525.png?v8",fire_engine:"unicode/1f692.png?v8",fire_extinguisher:"unicode/1f9ef.png?v8",firecracker:"unicode/1f9e8.png?v8",firefighter:"unicode/1f9d1-1f692.png?v8",fireworks:"unicode/1f386.png?v8",first_quarter_moon:"unicode/1f313.png?v8",first_quarter_moon_with_face:"unicode/1f31b.png?v8",fish:"unicode/1f41f.png?v8",fish_cake:"unicode/1f365.png?v8",fishing_pole_and_fish:"unicode/1f3a3.png?v8",fishsticks:"fishsticks.png?v8",fist:"unicode/270a.png?v8",fist_left:"unicode/1f91b.png?v8",fist_oncoming:"unicode/1f44a.png?v8",fist_raised:"unicode/270a.png?v8",fist_right:"unicode/1f91c.png?v8",five:"unicode/0035-20e3.png?v8",flags:"unicode/1f38f.png?v8",flamingo:"unicode/1f9a9.png?v8",flashlight:"unicode/1f526.png?v8",flat_shoe:"unicode/1f97f.png?v8",flatbread:"unicode/1fad3.png?v8",fleur_de_lis:"unicode/269c.png?v8",flight_arrival:"unicode/1f6ec.png?v8",flight_departure:"unicode/1f6eb.png?v8",flipper:"unicode/1f42c.png?v8",floppy_disk:"unicode/1f4be.png?v8",flower_playing_cards:"unicode/1f3b4.png?v8",flushed:"unicode/1f633.png?v8",fly:"unicode/1fab0.png?v8",flying_disc:"unicode/1f94f.png?v8",flying_saucer:"unicode/1f6f8.png?v8",fog:"unicode/1f32b.png?v8",foggy:"unicode/1f301.png?v8",fondue:"unicode/1fad5.png?v8",foot:"unicode/1f9b6.png?v8",football:"unicode/1f3c8.png?v8",footprints:"unicode/1f463.png?v8",fork_and_knife:"unicode/1f374.png?v8",fortune_cookie:"unicode/1f960.png?v8",fountain:"unicode/26f2.png?v8",fountain_pen:"unicode/1f58b.png?v8",four:"unicode/0034-20e3.png?v8",four_leaf_clover:"unicode/1f340.png?v8",fox_face:"unicode/1f98a.png?v8",fr:"unicode/1f1eb-1f1f7.png?v8",framed_picture:"unicode/1f5bc.png?v8",free:"unicode/1f193.png?v8",french_guiana:"unicode/1f1ec-1f1eb.png?v8",french_polynesia:"unicode/1f1f5-1f1eb.png?v8",french_southern_territories:"unicode/1f1f9-1f1eb.png?v8",fried_egg:"unicode/1f373.png?v8",fried_shrimp:"unicode/1f364.png?v8",fries:"unicode/1f35f.png?v8",frog:"unicode/1f438.png?v8",frowning:"unicode/1f626.png?v8",frowning_face:"unicode/2639.png?v8",frowning_man:"unicode/1f64d-2642.png?v8",frowning_person:"unicode/1f64d.png?v8",frowning_woman:"unicode/1f64d-2640.png?v8",fu:"unicode/1f595.png?v8",fuelpump:"unicode/26fd.png?v8",full_moon:"unicode/1f315.png?v8",full_moon_with_face:"unicode/1f31d.png?v8",funeral_urn:"unicode/26b1.png?v8",gabon:"unicode/1f1ec-1f1e6.png?v8",gambia:"unicode/1f1ec-1f1f2.png?v8",game_die:"unicode/1f3b2.png?v8",garlic:"unicode/1f9c4.png?v8",gb:"unicode/1f1ec-1f1e7.png?v8",gear:"unicode/2699.png?v8",gem:"unicode/1f48e.png?v8",gemini:"unicode/264a.png?v8",genie:"unicode/1f9de.png?v8",genie_man:"unicode/1f9de-2642.png?v8",genie_woman:"unicode/1f9de-2640.png?v8",georgia:"unicode/1f1ec-1f1ea.png?v8",ghana:"unicode/1f1ec-1f1ed.png?v8",ghost:"unicode/1f47b.png?v8",gibraltar:"unicode/1f1ec-1f1ee.png?v8",gift:"unicode/1f381.png?v8",gift_heart:"unicode/1f49d.png?v8",giraffe:"unicode/1f992.png?v8",girl:"unicode/1f467.png?v8",globe_with_meridians:"unicode/1f310.png?v8",gloves:"unicode/1f9e4.png?v8",goal_net:"unicode/1f945.png?v8",goat:"unicode/1f410.png?v8",goberserk:"goberserk.png?v8",godmode:"godmode.png?v8",goggles:"unicode/1f97d.png?v8",golf:"unicode/26f3.png?v8",golfing:"unicode/1f3cc.png?v8",golfing_man:"unicode/1f3cc-2642.png?v8",golfing_woman:"unicode/1f3cc-2640.png?v8",gorilla:"unicode/1f98d.png?v8",grapes:"unicode/1f347.png?v8",greece:"unicode/1f1ec-1f1f7.png?v8",green_apple:"unicode/1f34f.png?v8",green_book:"unicode/1f4d7.png?v8",green_circle:"unicode/1f7e2.png?v8",green_heart:"unicode/1f49a.png?v8",green_salad:"unicode/1f957.png?v8",green_square:"unicode/1f7e9.png?v8",greenland:"unicode/1f1ec-1f1f1.png?v8",grenada:"unicode/1f1ec-1f1e9.png?v8",grey_exclamation:"unicode/2755.png?v8",grey_question:"unicode/2754.png?v8",grimacing:"unicode/1f62c.png?v8",grin:"unicode/1f601.png?v8",grinning:"unicode/1f600.png?v8",guadeloupe:"unicode/1f1ec-1f1f5.png?v8",guam:"unicode/1f1ec-1f1fa.png?v8",guard:"unicode/1f482.png?v8",guardsman:"unicode/1f482-2642.png?v8",guardswoman:"unicode/1f482-2640.png?v8",guatemala:"unicode/1f1ec-1f1f9.png?v8",guernsey:"unicode/1f1ec-1f1ec.png?v8",guide_dog:"unicode/1f9ae.png?v8",guinea:"unicode/1f1ec-1f1f3.png?v8",guinea_bissau:"unicode/1f1ec-1f1fc.png?v8",guitar:"unicode/1f3b8.png?v8",gun:"unicode/1f52b.png?v8",guyana:"unicode/1f1ec-1f1fe.png?v8",haircut:"unicode/1f487.png?v8",haircut_man:"unicode/1f487-2642.png?v8",haircut_woman:"unicode/1f487-2640.png?v8",haiti:"unicode/1f1ed-1f1f9.png?v8",hamburger:"unicode/1f354.png?v8",hammer:"unicode/1f528.png?v8",hammer_and_pick:"unicode/2692.png?v8",hammer_and_wrench:"unicode/1f6e0.png?v8",hamster:"unicode/1f439.png?v8",hand:"unicode/270b.png?v8",hand_over_mouth:"unicode/1f92d.png?v8",handbag:"unicode/1f45c.png?v8",handball_person:"unicode/1f93e.png?v8",handshake:"unicode/1f91d.png?v8",hankey:"unicode/1f4a9.png?v8",hash:"unicode/0023-20e3.png?v8",hatched_chick:"unicode/1f425.png?v8",hatching_chick:"unicode/1f423.png?v8",headphones:"unicode/1f3a7.png?v8",headstone:"unicode/1faa6.png?v8",health_worker:"unicode/1f9d1-2695.png?v8",hear_no_evil:"unicode/1f649.png?v8",heard_mcdonald_islands:"unicode/1f1ed-1f1f2.png?v8",heart:"unicode/2764.png?v8",heart_decoration:"unicode/1f49f.png?v8",heart_eyes:"unicode/1f60d.png?v8",heart_eyes_cat:"unicode/1f63b.png?v8",heart_on_fire:"unicode/2764-1f525.png?v8",heartbeat:"unicode/1f493.png?v8",heartpulse:"unicode/1f497.png?v8",hearts:"unicode/2665.png?v8",heavy_check_mark:"unicode/2714.png?v8",heavy_division_sign:"unicode/2797.png?v8",heavy_dollar_sign:"unicode/1f4b2.png?v8",heavy_exclamation_mark:"unicode/2757.png?v8",heavy_heart_exclamation:"unicode/2763.png?v8",heavy_minus_sign:"unicode/2796.png?v8",heavy_multiplication_x:"unicode/2716.png?v8",heavy_plus_sign:"unicode/2795.png?v8",hedgehog:"unicode/1f994.png?v8",helicopter:"unicode/1f681.png?v8",herb:"unicode/1f33f.png?v8",hibiscus:"unicode/1f33a.png?v8",high_brightness:"unicode/1f506.png?v8",high_heel:"unicode/1f460.png?v8",hiking_boot:"unicode/1f97e.png?v8",hindu_temple:"unicode/1f6d5.png?v8",hippopotamus:"unicode/1f99b.png?v8",hocho:"unicode/1f52a.png?v8",hole:"unicode/1f573.png?v8",honduras:"unicode/1f1ed-1f1f3.png?v8",honey_pot:"unicode/1f36f.png?v8",honeybee:"unicode/1f41d.png?v8",hong_kong:"unicode/1f1ed-1f1f0.png?v8",hook:"unicode/1fa9d.png?v8",horse:"unicode/1f434.png?v8",horse_racing:"unicode/1f3c7.png?v8",hospital:"unicode/1f3e5.png?v8",hot_face:"unicode/1f975.png?v8",hot_pepper:"unicode/1f336.png?v8",hotdog:"unicode/1f32d.png?v8",hotel:"unicode/1f3e8.png?v8",hotsprings:"unicode/2668.png?v8",hourglass:"unicode/231b.png?v8",hourglass_flowing_sand:"unicode/23f3.png?v8",house:"unicode/1f3e0.png?v8",house_with_garden:"unicode/1f3e1.png?v8",houses:"unicode/1f3d8.png?v8",hugs:"unicode/1f917.png?v8",hungary:"unicode/1f1ed-1f1fa.png?v8",hurtrealbad:"hurtrealbad.png?v8",hushed:"unicode/1f62f.png?v8",hut:"unicode/1f6d6.png?v8",ice_cream:"unicode/1f368.png?v8",ice_cube:"unicode/1f9ca.png?v8",ice_hockey:"unicode/1f3d2.png?v8",ice_skate:"unicode/26f8.png?v8",icecream:"unicode/1f366.png?v8",iceland:"unicode/1f1ee-1f1f8.png?v8",id:"unicode/1f194.png?v8",ideograph_advantage:"unicode/1f250.png?v8",imp:"unicode/1f47f.png?v8",inbox_tray:"unicode/1f4e5.png?v8",incoming_envelope:"unicode/1f4e8.png?v8",india:"unicode/1f1ee-1f1f3.png?v8",indonesia:"unicode/1f1ee-1f1e9.png?v8",infinity:"unicode/267e.png?v8",information_desk_person:"unicode/1f481.png?v8",information_source:"unicode/2139.png?v8",innocent:"unicode/1f607.png?v8",interrobang:"unicode/2049.png?v8",iphone:"unicode/1f4f1.png?v8",iran:"unicode/1f1ee-1f1f7.png?v8",iraq:"unicode/1f1ee-1f1f6.png?v8",ireland:"unicode/1f1ee-1f1ea.png?v8",isle_of_man:"unicode/1f1ee-1f1f2.png?v8",israel:"unicode/1f1ee-1f1f1.png?v8",it:"unicode/1f1ee-1f1f9.png?v8",izakaya_lantern:"unicode/1f3ee.png?v8",jack_o_lantern:"unicode/1f383.png?v8",jamaica:"unicode/1f1ef-1f1f2.png?v8",japan:"unicode/1f5fe.png?v8",japanese_castle:"unicode/1f3ef.png?v8",japanese_goblin:"unicode/1f47a.png?v8",japanese_ogre:"unicode/1f479.png?v8",jeans:"unicode/1f456.png?v8",jersey:"unicode/1f1ef-1f1ea.png?v8",jigsaw:"unicode/1f9e9.png?v8",jordan:"unicode/1f1ef-1f1f4.png?v8",joy:"unicode/1f602.png?v8",joy_cat:"unicode/1f639.png?v8",joystick:"unicode/1f579.png?v8",jp:"unicode/1f1ef-1f1f5.png?v8",judge:"unicode/1f9d1-2696.png?v8",juggling_person:"unicode/1f939.png?v8",kaaba:"unicode/1f54b.png?v8",kangaroo:"unicode/1f998.png?v8",kazakhstan:"unicode/1f1f0-1f1ff.png?v8",kenya:"unicode/1f1f0-1f1ea.png?v8",key:"unicode/1f511.png?v8",keyboard:"unicode/2328.png?v8",keycap_ten:"unicode/1f51f.png?v8",kick_scooter:"unicode/1f6f4.png?v8",kimono:"unicode/1f458.png?v8",kiribati:"unicode/1f1f0-1f1ee.png?v8",kiss:"unicode/1f48b.png?v8",kissing:"unicode/1f617.png?v8",kissing_cat:"unicode/1f63d.png?v8",kissing_closed_eyes:"unicode/1f61a.png?v8",kissing_heart:"unicode/1f618.png?v8",kissing_smiling_eyes:"unicode/1f619.png?v8",kite:"unicode/1fa81.png?v8",kiwi_fruit:"unicode/1f95d.png?v8",kneeling_man:"unicode/1f9ce-2642.png?v8",kneeling_person:"unicode/1f9ce.png?v8",kneeling_woman:"unicode/1f9ce-2640.png?v8",knife:"unicode/1f52a.png?v8",knot:"unicode/1faa2.png?v8",koala:"unicode/1f428.png?v8",koko:"unicode/1f201.png?v8",kosovo:"unicode/1f1fd-1f1f0.png?v8",kr:"unicode/1f1f0-1f1f7.png?v8",kuwait:"unicode/1f1f0-1f1fc.png?v8",kyrgyzstan:"unicode/1f1f0-1f1ec.png?v8",lab_coat:"unicode/1f97c.png?v8",label:"unicode/1f3f7.png?v8",lacrosse:"unicode/1f94d.png?v8",ladder:"unicode/1fa9c.png?v8",lady_beetle:"unicode/1f41e.png?v8",lantern:"unicode/1f3ee.png?v8",laos:"unicode/1f1f1-1f1e6.png?v8",large_blue_circle:"unicode/1f535.png?v8",large_blue_diamond:"unicode/1f537.png?v8",large_orange_diamond:"unicode/1f536.png?v8",last_quarter_moon:"unicode/1f317.png?v8",last_quarter_moon_with_face:"unicode/1f31c.png?v8",latin_cross:"unicode/271d.png?v8",latvia:"unicode/1f1f1-1f1fb.png?v8",laughing:"unicode/1f606.png?v8",leafy_green:"unicode/1f96c.png?v8",leaves:"unicode/1f343.png?v8",lebanon:"unicode/1f1f1-1f1e7.png?v8",ledger:"unicode/1f4d2.png?v8",left_luggage:"unicode/1f6c5.png?v8",left_right_arrow:"unicode/2194.png?v8",left_speech_bubble:"unicode/1f5e8.png?v8",leftwards_arrow_with_hook:"unicode/21a9.png?v8",leg:"unicode/1f9b5.png?v8",lemon:"unicode/1f34b.png?v8",leo:"unicode/264c.png?v8",leopard:"unicode/1f406.png?v8",lesotho:"unicode/1f1f1-1f1f8.png?v8",level_slider:"unicode/1f39a.png?v8",liberia:"unicode/1f1f1-1f1f7.png?v8",libra:"unicode/264e.png?v8",libya:"unicode/1f1f1-1f1fe.png?v8",liechtenstein:"unicode/1f1f1-1f1ee.png?v8",light_rail:"unicode/1f688.png?v8",link:"unicode/1f517.png?v8",lion:"unicode/1f981.png?v8",lips:"unicode/1f444.png?v8",lipstick:"unicode/1f484.png?v8",lithuania:"unicode/1f1f1-1f1f9.png?v8",lizard:"unicode/1f98e.png?v8",llama:"unicode/1f999.png?v8",lobster:"unicode/1f99e.png?v8",lock:"unicode/1f512.png?v8",lock_with_ink_pen:"unicode/1f50f.png?v8",lollipop:"unicode/1f36d.png?v8",long_drum:"unicode/1fa98.png?v8",loop:"unicode/27bf.png?v8",lotion_bottle:"unicode/1f9f4.png?v8",lotus_position:"unicode/1f9d8.png?v8",lotus_position_man:"unicode/1f9d8-2642.png?v8",lotus_position_woman:"unicode/1f9d8-2640.png?v8",loud_sound:"unicode/1f50a.png?v8",loudspeaker:"unicode/1f4e2.png?v8",love_hotel:"unicode/1f3e9.png?v8",love_letter:"unicode/1f48c.png?v8",love_you_gesture:"unicode/1f91f.png?v8",low_brightness:"unicode/1f505.png?v8",luggage:"unicode/1f9f3.png?v8",lungs:"unicode/1fac1.png?v8",luxembourg:"unicode/1f1f1-1f1fa.png?v8",lying_face:"unicode/1f925.png?v8",m:"unicode/24c2.png?v8",macau:"unicode/1f1f2-1f1f4.png?v8",macedonia:"unicode/1f1f2-1f1f0.png?v8",madagascar:"unicode/1f1f2-1f1ec.png?v8",mag:"unicode/1f50d.png?v8",mag_right:"unicode/1f50e.png?v8",mage:"unicode/1f9d9.png?v8",mage_man:"unicode/1f9d9-2642.png?v8",mage_woman:"unicode/1f9d9-2640.png?v8",magic_wand:"unicode/1fa84.png?v8",magnet:"unicode/1f9f2.png?v8",mahjong:"unicode/1f004.png?v8",mailbox:"unicode/1f4eb.png?v8",mailbox_closed:"unicode/1f4ea.png?v8",mailbox_with_mail:"unicode/1f4ec.png?v8",mailbox_with_no_mail:"unicode/1f4ed.png?v8",malawi:"unicode/1f1f2-1f1fc.png?v8",malaysia:"unicode/1f1f2-1f1fe.png?v8",maldives:"unicode/1f1f2-1f1fb.png?v8",male_detective:"unicode/1f575-2642.png?v8",male_sign:"unicode/2642.png?v8",mali:"unicode/1f1f2-1f1f1.png?v8",malta:"unicode/1f1f2-1f1f9.png?v8",mammoth:"unicode/1f9a3.png?v8",man:"unicode/1f468.png?v8",man_artist:"unicode/1f468-1f3a8.png?v8",man_astronaut:"unicode/1f468-1f680.png?v8",man_beard:"unicode/1f9d4-2642.png?v8",man_cartwheeling:"unicode/1f938-2642.png?v8",man_cook:"unicode/1f468-1f373.png?v8",man_dancing:"unicode/1f57a.png?v8",man_facepalming:"unicode/1f926-2642.png?v8",man_factory_worker:"unicode/1f468-1f3ed.png?v8",man_farmer:"unicode/1f468-1f33e.png?v8",man_feeding_baby:"unicode/1f468-1f37c.png?v8",man_firefighter:"unicode/1f468-1f692.png?v8",man_health_worker:"unicode/1f468-2695.png?v8",man_in_manual_wheelchair:"unicode/1f468-1f9bd.png?v8",man_in_motorized_wheelchair:"unicode/1f468-1f9bc.png?v8",man_in_tuxedo:"unicode/1f935-2642.png?v8",man_judge:"unicode/1f468-2696.png?v8",man_juggling:"unicode/1f939-2642.png?v8",man_mechanic:"unicode/1f468-1f527.png?v8",man_office_worker:"unicode/1f468-1f4bc.png?v8",man_pilot:"unicode/1f468-2708.png?v8",man_playing_handball:"unicode/1f93e-2642.png?v8",man_playing_water_polo:"unicode/1f93d-2642.png?v8",man_scientist:"unicode/1f468-1f52c.png?v8",man_shrugging:"unicode/1f937-2642.png?v8",man_singer:"unicode/1f468-1f3a4.png?v8",man_student:"unicode/1f468-1f393.png?v8",man_teacher:"unicode/1f468-1f3eb.png?v8",man_technologist:"unicode/1f468-1f4bb.png?v8",man_with_gua_pi_mao:"unicode/1f472.png?v8",man_with_probing_cane:"unicode/1f468-1f9af.png?v8",man_with_turban:"unicode/1f473-2642.png?v8",man_with_veil:"unicode/1f470-2642.png?v8",mandarin:"unicode/1f34a.png?v8",mango:"unicode/1f96d.png?v8",mans_shoe:"unicode/1f45e.png?v8",mantelpiece_clock:"unicode/1f570.png?v8",manual_wheelchair:"unicode/1f9bd.png?v8",maple_leaf:"unicode/1f341.png?v8",marshall_islands:"unicode/1f1f2-1f1ed.png?v8",martial_arts_uniform:"unicode/1f94b.png?v8",martinique:"unicode/1f1f2-1f1f6.png?v8",mask:"unicode/1f637.png?v8",massage:"unicode/1f486.png?v8",massage_man:"unicode/1f486-2642.png?v8",massage_woman:"unicode/1f486-2640.png?v8",mate:"unicode/1f9c9.png?v8",mauritania:"unicode/1f1f2-1f1f7.png?v8",mauritius:"unicode/1f1f2-1f1fa.png?v8",mayotte:"unicode/1f1fe-1f1f9.png?v8",meat_on_bone:"unicode/1f356.png?v8",mechanic:"unicode/1f9d1-1f527.png?v8",mechanical_arm:"unicode/1f9be.png?v8",mechanical_leg:"unicode/1f9bf.png?v8",medal_military:"unicode/1f396.png?v8",medal_sports:"unicode/1f3c5.png?v8",medical_symbol:"unicode/2695.png?v8",mega:"unicode/1f4e3.png?v8",melon:"unicode/1f348.png?v8",memo:"unicode/1f4dd.png?v8",men_wrestling:"unicode/1f93c-2642.png?v8",mending_heart:"unicode/2764-1fa79.png?v8",menorah:"unicode/1f54e.png?v8",mens:"unicode/1f6b9.png?v8",mermaid:"unicode/1f9dc-2640.png?v8",merman:"unicode/1f9dc-2642.png?v8",merperson:"unicode/1f9dc.png?v8",metal:"unicode/1f918.png?v8",metro:"unicode/1f687.png?v8",mexico:"unicode/1f1f2-1f1fd.png?v8",microbe:"unicode/1f9a0.png?v8",micronesia:"unicode/1f1eb-1f1f2.png?v8",microphone:"unicode/1f3a4.png?v8",microscope:"unicode/1f52c.png?v8",middle_finger:"unicode/1f595.png?v8",military_helmet:"unicode/1fa96.png?v8",milk_glass:"unicode/1f95b.png?v8",milky_way:"unicode/1f30c.png?v8",minibus:"unicode/1f690.png?v8",minidisc:"unicode/1f4bd.png?v8",mirror:"unicode/1fa9e.png?v8",mobile_phone_off:"unicode/1f4f4.png?v8",moldova:"unicode/1f1f2-1f1e9.png?v8",monaco:"unicode/1f1f2-1f1e8.png?v8",money_mouth_face:"unicode/1f911.png?v8",money_with_wings:"unicode/1f4b8.png?v8",moneybag:"unicode/1f4b0.png?v8",mongolia:"unicode/1f1f2-1f1f3.png?v8",monkey:"unicode/1f412.png?v8",monkey_face:"unicode/1f435.png?v8",monocle_face:"unicode/1f9d0.png?v8",monorail:"unicode/1f69d.png?v8",montenegro:"unicode/1f1f2-1f1ea.png?v8",montserrat:"unicode/1f1f2-1f1f8.png?v8",moon:"unicode/1f314.png?v8",moon_cake:"unicode/1f96e.png?v8",morocco:"unicode/1f1f2-1f1e6.png?v8",mortar_board:"unicode/1f393.png?v8",mosque:"unicode/1f54c.png?v8",mosquito:"unicode/1f99f.png?v8",motor_boat:"unicode/1f6e5.png?v8",motor_scooter:"unicode/1f6f5.png?v8",motorcycle:"unicode/1f3cd.png?v8",motorized_wheelchair:"unicode/1f9bc.png?v8",motorway:"unicode/1f6e3.png?v8",mount_fuji:"unicode/1f5fb.png?v8",mountain:"unicode/26f0.png?v8",mountain_bicyclist:"unicode/1f6b5.png?v8",mountain_biking_man:"unicode/1f6b5-2642.png?v8",mountain_biking_woman:"unicode/1f6b5-2640.png?v8",mountain_cableway:"unicode/1f6a0.png?v8",mountain_railway:"unicode/1f69e.png?v8",mountain_snow:"unicode/1f3d4.png?v8",mouse:"unicode/1f42d.png?v8",mouse2:"unicode/1f401.png?v8",mouse_trap:"unicode/1faa4.png?v8",movie_camera:"unicode/1f3a5.png?v8",moyai:"unicode/1f5ff.png?v8",mozambique:"unicode/1f1f2-1f1ff.png?v8",mrs_claus:"unicode/1f936.png?v8",muscle:"unicode/1f4aa.png?v8",mushroom:"unicode/1f344.png?v8",musical_keyboard:"unicode/1f3b9.png?v8",musical_note:"unicode/1f3b5.png?v8",musical_score:"unicode/1f3bc.png?v8",mute:"unicode/1f507.png?v8",mx_claus:"unicode/1f9d1-1f384.png?v8",myanmar:"unicode/1f1f2-1f1f2.png?v8",nail_care:"unicode/1f485.png?v8",name_badge:"unicode/1f4db.png?v8",namibia:"unicode/1f1f3-1f1e6.png?v8",national_park:"unicode/1f3de.png?v8",nauru:"unicode/1f1f3-1f1f7.png?v8",nauseated_face:"unicode/1f922.png?v8",nazar_amulet:"unicode/1f9ff.png?v8",neckbeard:"neckbeard.png?v8",necktie:"unicode/1f454.png?v8",negative_squared_cross_mark:"unicode/274e.png?v8",nepal:"unicode/1f1f3-1f1f5.png?v8",nerd_face:"unicode/1f913.png?v8",nesting_dolls:"unicode/1fa86.png?v8",netherlands:"unicode/1f1f3-1f1f1.png?v8",neutral_face:"unicode/1f610.png?v8",new:"unicode/1f195.png?v8",new_caledonia:"unicode/1f1f3-1f1e8.png?v8",new_moon:"unicode/1f311.png?v8",new_moon_with_face:"unicode/1f31a.png?v8",new_zealand:"unicode/1f1f3-1f1ff.png?v8",newspaper:"unicode/1f4f0.png?v8",newspaper_roll:"unicode/1f5de.png?v8",next_track_button:"unicode/23ed.png?v8",ng:"unicode/1f196.png?v8",ng_man:"unicode/1f645-2642.png?v8",ng_woman:"unicode/1f645-2640.png?v8",nicaragua:"unicode/1f1f3-1f1ee.png?v8",niger:"unicode/1f1f3-1f1ea.png?v8",nigeria:"unicode/1f1f3-1f1ec.png?v8",night_with_stars:"unicode/1f303.png?v8",nine:"unicode/0039-20e3.png?v8",ninja:"unicode/1f977.png?v8",niue:"unicode/1f1f3-1f1fa.png?v8",no_bell:"unicode/1f515.png?v8",no_bicycles:"unicode/1f6b3.png?v8",no_entry:"unicode/26d4.png?v8",no_entry_sign:"unicode/1f6ab.png?v8",no_good:"unicode/1f645.png?v8",no_good_man:"unicode/1f645-2642.png?v8",no_good_woman:"unicode/1f645-2640.png?v8",no_mobile_phones:"unicode/1f4f5.png?v8",no_mouth:"unicode/1f636.png?v8",no_pedestrians:"unicode/1f6b7.png?v8",no_smoking:"unicode/1f6ad.png?v8","non-potable_water":"unicode/1f6b1.png?v8",norfolk_island:"unicode/1f1f3-1f1eb.png?v8",north_korea:"unicode/1f1f0-1f1f5.png?v8",northern_mariana_islands:"unicode/1f1f2-1f1f5.png?v8",norway:"unicode/1f1f3-1f1f4.png?v8",nose:"unicode/1f443.png?v8",notebook:"unicode/1f4d3.png?v8",notebook_with_decorative_cover:"unicode/1f4d4.png?v8",notes:"unicode/1f3b6.png?v8",nut_and_bolt:"unicode/1f529.png?v8",o:"unicode/2b55.png?v8",o2:"unicode/1f17e.png?v8",ocean:"unicode/1f30a.png?v8",octocat:"octocat.png?v8",octopus:"unicode/1f419.png?v8",oden:"unicode/1f362.png?v8",office:"unicode/1f3e2.png?v8",office_worker:"unicode/1f9d1-1f4bc.png?v8",oil_drum:"unicode/1f6e2.png?v8",ok:"unicode/1f197.png?v8",ok_hand:"unicode/1f44c.png?v8",ok_man:"unicode/1f646-2642.png?v8",ok_person:"unicode/1f646.png?v8",ok_woman:"unicode/1f646-2640.png?v8",old_key:"unicode/1f5dd.png?v8",older_adult:"unicode/1f9d3.png?v8",older_man:"unicode/1f474.png?v8",older_woman:"unicode/1f475.png?v8",olive:"unicode/1fad2.png?v8",om:"unicode/1f549.png?v8",oman:"unicode/1f1f4-1f1f2.png?v8",on:"unicode/1f51b.png?v8",oncoming_automobile:"unicode/1f698.png?v8",oncoming_bus:"unicode/1f68d.png?v8",oncoming_police_car:"unicode/1f694.png?v8",oncoming_taxi:"unicode/1f696.png?v8",one:"unicode/0031-20e3.png?v8",one_piece_swimsuit:"unicode/1fa71.png?v8",onion:"unicode/1f9c5.png?v8",open_book:"unicode/1f4d6.png?v8",open_file_folder:"unicode/1f4c2.png?v8",open_hands:"unicode/1f450.png?v8",open_mouth:"unicode/1f62e.png?v8",open_umbrella:"unicode/2602.png?v8",ophiuchus:"unicode/26ce.png?v8",orange:"unicode/1f34a.png?v8",orange_book:"unicode/1f4d9.png?v8",orange_circle:"unicode/1f7e0.png?v8",orange_heart:"unicode/1f9e1.png?v8",orange_square:"unicode/1f7e7.png?v8",orangutan:"unicode/1f9a7.png?v8",orthodox_cross:"unicode/2626.png?v8",otter:"unicode/1f9a6.png?v8",outbox_tray:"unicode/1f4e4.png?v8",owl:"unicode/1f989.png?v8",ox:"unicode/1f402.png?v8",oyster:"unicode/1f9aa.png?v8",package:"unicode/1f4e6.png?v8",page_facing_up:"unicode/1f4c4.png?v8",page_with_curl:"unicode/1f4c3.png?v8",pager:"unicode/1f4df.png?v8",paintbrush:"unicode/1f58c.png?v8",pakistan:"unicode/1f1f5-1f1f0.png?v8",palau:"unicode/1f1f5-1f1fc.png?v8",palestinian_territories:"unicode/1f1f5-1f1f8.png?v8",palm_tree:"unicode/1f334.png?v8",palms_up_together:"unicode/1f932.png?v8",panama:"unicode/1f1f5-1f1e6.png?v8",pancakes:"unicode/1f95e.png?v8",panda_face:"unicode/1f43c.png?v8",paperclip:"unicode/1f4ce.png?v8",paperclips:"unicode/1f587.png?v8",papua_new_guinea:"unicode/1f1f5-1f1ec.png?v8",parachute:"unicode/1fa82.png?v8",paraguay:"unicode/1f1f5-1f1fe.png?v8",parasol_on_ground:"unicode/26f1.png?v8",parking:"unicode/1f17f.png?v8",parrot:"unicode/1f99c.png?v8",part_alternation_mark:"unicode/303d.png?v8",partly_sunny:"unicode/26c5.png?v8",partying_face:"unicode/1f973.png?v8",passenger_ship:"unicode/1f6f3.png?v8",passport_control:"unicode/1f6c2.png?v8",pause_button:"unicode/23f8.png?v8",paw_prints:"unicode/1f43e.png?v8",peace_symbol:"unicode/262e.png?v8",peach:"unicode/1f351.png?v8",peacock:"unicode/1f99a.png?v8",peanuts:"unicode/1f95c.png?v8",pear:"unicode/1f350.png?v8",pen:"unicode/1f58a.png?v8",pencil:"unicode/1f4dd.png?v8",pencil2:"unicode/270f.png?v8",penguin:"unicode/1f427.png?v8",pensive:"unicode/1f614.png?v8",people_holding_hands:"unicode/1f9d1-1f91d-1f9d1.png?v8",people_hugging:"unicode/1fac2.png?v8",performing_arts:"unicode/1f3ad.png?v8",persevere:"unicode/1f623.png?v8",person_bald:"unicode/1f9d1-1f9b2.png?v8",person_curly_hair:"unicode/1f9d1-1f9b1.png?v8",person_feeding_baby:"unicode/1f9d1-1f37c.png?v8",person_fencing:"unicode/1f93a.png?v8",person_in_manual_wheelchair:"unicode/1f9d1-1f9bd.png?v8",person_in_motorized_wheelchair:"unicode/1f9d1-1f9bc.png?v8",person_in_tuxedo:"unicode/1f935.png?v8",person_red_hair:"unicode/1f9d1-1f9b0.png?v8",person_white_hair:"unicode/1f9d1-1f9b3.png?v8",person_with_probing_cane:"unicode/1f9d1-1f9af.png?v8",person_with_turban:"unicode/1f473.png?v8",person_with_veil:"unicode/1f470.png?v8",peru:"unicode/1f1f5-1f1ea.png?v8",petri_dish:"unicode/1f9eb.png?v8",philippines:"unicode/1f1f5-1f1ed.png?v8",phone:"unicode/260e.png?v8",pick:"unicode/26cf.png?v8",pickup_truck:"unicode/1f6fb.png?v8",pie:"unicode/1f967.png?v8",pig:"unicode/1f437.png?v8",pig2:"unicode/1f416.png?v8",pig_nose:"unicode/1f43d.png?v8",pill:"unicode/1f48a.png?v8",pilot:"unicode/1f9d1-2708.png?v8",pinata:"unicode/1fa85.png?v8",pinched_fingers:"unicode/1f90c.png?v8",pinching_hand:"unicode/1f90f.png?v8",pineapple:"unicode/1f34d.png?v8",ping_pong:"unicode/1f3d3.png?v8",pirate_flag:"unicode/1f3f4-2620.png?v8",pisces:"unicode/2653.png?v8",pitcairn_islands:"unicode/1f1f5-1f1f3.png?v8",pizza:"unicode/1f355.png?v8",placard:"unicode/1faa7.png?v8",place_of_worship:"unicode/1f6d0.png?v8",plate_with_cutlery:"unicode/1f37d.png?v8",play_or_pause_button:"unicode/23ef.png?v8",pleading_face:"unicode/1f97a.png?v8",plunger:"unicode/1faa0.png?v8",point_down:"unicode/1f447.png?v8",point_left:"unicode/1f448.png?v8",point_right:"unicode/1f449.png?v8",point_up:"unicode/261d.png?v8",point_up_2:"unicode/1f446.png?v8",poland:"unicode/1f1f5-1f1f1.png?v8",polar_bear:"unicode/1f43b-2744.png?v8",police_car:"unicode/1f693.png?v8",police_officer:"unicode/1f46e.png?v8",policeman:"unicode/1f46e-2642.png?v8",policewoman:"unicode/1f46e-2640.png?v8",poodle:"unicode/1f429.png?v8",poop:"unicode/1f4a9.png?v8",popcorn:"unicode/1f37f.png?v8",portugal:"unicode/1f1f5-1f1f9.png?v8",post_office:"unicode/1f3e3.png?v8",postal_horn:"unicode/1f4ef.png?v8",postbox:"unicode/1f4ee.png?v8",potable_water:"unicode/1f6b0.png?v8",potato:"unicode/1f954.png?v8",potted_plant:"unicode/1fab4.png?v8",pouch:"unicode/1f45d.png?v8",poultry_leg:"unicode/1f357.png?v8",pound:"unicode/1f4b7.png?v8",pout:"unicode/1f621.png?v8",pouting_cat:"unicode/1f63e.png?v8",pouting_face:"unicode/1f64e.png?v8",pouting_man:"unicode/1f64e-2642.png?v8",pouting_woman:"unicode/1f64e-2640.png?v8",pray:"unicode/1f64f.png?v8",prayer_beads:"unicode/1f4ff.png?v8",pregnant_woman:"unicode/1f930.png?v8",pretzel:"unicode/1f968.png?v8",previous_track_button:"unicode/23ee.png?v8",prince:"unicode/1f934.png?v8",princess:"unicode/1f478.png?v8",printer:"unicode/1f5a8.png?v8",probing_cane:"unicode/1f9af.png?v8",puerto_rico:"unicode/1f1f5-1f1f7.png?v8",punch:"unicode/1f44a.png?v8",purple_circle:"unicode/1f7e3.png?v8",purple_heart:"unicode/1f49c.png?v8",purple_square:"unicode/1f7ea.png?v8",purse:"unicode/1f45b.png?v8",pushpin:"unicode/1f4cc.png?v8",put_litter_in_its_place:"unicode/1f6ae.png?v8",qatar:"unicode/1f1f6-1f1e6.png?v8",question:"unicode/2753.png?v8",rabbit:"unicode/1f430.png?v8",rabbit2:"unicode/1f407.png?v8",raccoon:"unicode/1f99d.png?v8",racehorse:"unicode/1f40e.png?v8",racing_car:"unicode/1f3ce.png?v8",radio:"unicode/1f4fb.png?v8",radio_button:"unicode/1f518.png?v8",radioactive:"unicode/2622.png?v8",rage:"unicode/1f621.png?v8",rage1:"rage1.png?v8",rage2:"rage2.png?v8",rage3:"rage3.png?v8",rage4:"rage4.png?v8",railway_car:"unicode/1f683.png?v8",railway_track:"unicode/1f6e4.png?v8",rainbow:"unicode/1f308.png?v8",rainbow_flag:"unicode/1f3f3-1f308.png?v8",raised_back_of_hand:"unicode/1f91a.png?v8",raised_eyebrow:"unicode/1f928.png?v8",raised_hand:"unicode/270b.png?v8",raised_hand_with_fingers_splayed:"unicode/1f590.png?v8",raised_hands:"unicode/1f64c.png?v8",raising_hand:"unicode/1f64b.png?v8",raising_hand_man:"unicode/1f64b-2642.png?v8",raising_hand_woman:"unicode/1f64b-2640.png?v8",ram:"unicode/1f40f.png?v8",ramen:"unicode/1f35c.png?v8",rat:"unicode/1f400.png?v8",razor:"unicode/1fa92.png?v8",receipt:"unicode/1f9fe.png?v8",record_button:"unicode/23fa.png?v8",recycle:"unicode/267b.png?v8",red_car:"unicode/1f697.png?v8",red_circle:"unicode/1f534.png?v8",red_envelope:"unicode/1f9e7.png?v8",red_haired_man:"unicode/1f468-1f9b0.png?v8",red_haired_woman:"unicode/1f469-1f9b0.png?v8",red_square:"unicode/1f7e5.png?v8",registered:"unicode/00ae.png?v8",relaxed:"unicode/263a.png?v8",relieved:"unicode/1f60c.png?v8",reminder_ribbon:"unicode/1f397.png?v8",repeat:"unicode/1f501.png?v8",repeat_one:"unicode/1f502.png?v8",rescue_worker_helmet:"unicode/26d1.png?v8",restroom:"unicode/1f6bb.png?v8",reunion:"unicode/1f1f7-1f1ea.png?v8",revolving_hearts:"unicode/1f49e.png?v8",rewind:"unicode/23ea.png?v8",rhinoceros:"unicode/1f98f.png?v8",ribbon:"unicode/1f380.png?v8",rice:"unicode/1f35a.png?v8",rice_ball:"unicode/1f359.png?v8",rice_cracker:"unicode/1f358.png?v8",rice_scene:"unicode/1f391.png?v8",right_anger_bubble:"unicode/1f5ef.png?v8",ring:"unicode/1f48d.png?v8",ringed_planet:"unicode/1fa90.png?v8",robot:"unicode/1f916.png?v8",rock:"unicode/1faa8.png?v8",rocket:"unicode/1f680.png?v8",rofl:"unicode/1f923.png?v8",roll_eyes:"unicode/1f644.png?v8",roll_of_paper:"unicode/1f9fb.png?v8",roller_coaster:"unicode/1f3a2.png?v8",roller_skate:"unicode/1f6fc.png?v8",romania:"unicode/1f1f7-1f1f4.png?v8",rooster:"unicode/1f413.png?v8",rose:"unicode/1f339.png?v8",rosette:"unicode/1f3f5.png?v8",rotating_light:"unicode/1f6a8.png?v8",round_pushpin:"unicode/1f4cd.png?v8",rowboat:"unicode/1f6a3.png?v8",rowing_man:"unicode/1f6a3-2642.png?v8",rowing_woman:"unicode/1f6a3-2640.png?v8",ru:"unicode/1f1f7-1f1fa.png?v8",rugby_football:"unicode/1f3c9.png?v8",runner:"unicode/1f3c3.png?v8",running:"unicode/1f3c3.png?v8",running_man:"unicode/1f3c3-2642.png?v8",running_shirt_with_sash:"unicode/1f3bd.png?v8",running_woman:"unicode/1f3c3-2640.png?v8",rwanda:"unicode/1f1f7-1f1fc.png?v8",sa:"unicode/1f202.png?v8",safety_pin:"unicode/1f9f7.png?v8",safety_vest:"unicode/1f9ba.png?v8",sagittarius:"unicode/2650.png?v8",sailboat:"unicode/26f5.png?v8",sake:"unicode/1f376.png?v8",salt:"unicode/1f9c2.png?v8",samoa:"unicode/1f1fc-1f1f8.png?v8",san_marino:"unicode/1f1f8-1f1f2.png?v8",sandal:"unicode/1f461.png?v8",sandwich:"unicode/1f96a.png?v8",santa:"unicode/1f385.png?v8",sao_tome_principe:"unicode/1f1f8-1f1f9.png?v8",sari:"unicode/1f97b.png?v8",sassy_man:"unicode/1f481-2642.png?v8",sassy_woman:"unicode/1f481-2640.png?v8",satellite:"unicode/1f4e1.png?v8",satisfied:"unicode/1f606.png?v8",saudi_arabia:"unicode/1f1f8-1f1e6.png?v8",sauna_man:"unicode/1f9d6-2642.png?v8",sauna_person:"unicode/1f9d6.png?v8",sauna_woman:"unicode/1f9d6-2640.png?v8",sauropod:"unicode/1f995.png?v8",saxophone:"unicode/1f3b7.png?v8",scarf:"unicode/1f9e3.png?v8",school:"unicode/1f3eb.png?v8",school_satchel:"unicode/1f392.png?v8",scientist:"unicode/1f9d1-1f52c.png?v8",scissors:"unicode/2702.png?v8",scorpion:"unicode/1f982.png?v8",scorpius:"unicode/264f.png?v8",scotland:"unicode/1f3f4-e0067-e0062-e0073-e0063-e0074-e007f.png?v8",scream:"unicode/1f631.png?v8",scream_cat:"unicode/1f640.png?v8",screwdriver:"unicode/1fa9b.png?v8",scroll:"unicode/1f4dc.png?v8",seal:"unicode/1f9ad.png?v8",seat:"unicode/1f4ba.png?v8",secret:"unicode/3299.png?v8",see_no_evil:"unicode/1f648.png?v8",seedling:"unicode/1f331.png?v8",selfie:"unicode/1f933.png?v8",senegal:"unicode/1f1f8-1f1f3.png?v8",serbia:"unicode/1f1f7-1f1f8.png?v8",service_dog:"unicode/1f415-1f9ba.png?v8",seven:"unicode/0037-20e3.png?v8",sewing_needle:"unicode/1faa1.png?v8",seychelles:"unicode/1f1f8-1f1e8.png?v8",shallow_pan_of_food:"unicode/1f958.png?v8",shamrock:"unicode/2618.png?v8",shark:"unicode/1f988.png?v8",shaved_ice:"unicode/1f367.png?v8",sheep:"unicode/1f411.png?v8",shell:"unicode/1f41a.png?v8",shield:"unicode/1f6e1.png?v8",shinto_shrine:"unicode/26e9.png?v8",ship:"unicode/1f6a2.png?v8",shipit:"shipit.png?v8",shirt:"unicode/1f455.png?v8",shit:"unicode/1f4a9.png?v8",shoe:"unicode/1f45e.png?v8",shopping:"unicode/1f6cd.png?v8",shopping_cart:"unicode/1f6d2.png?v8",shorts:"unicode/1fa73.png?v8",shower:"unicode/1f6bf.png?v8",shrimp:"unicode/1f990.png?v8",shrug:"unicode/1f937.png?v8",shushing_face:"unicode/1f92b.png?v8",sierra_leone:"unicode/1f1f8-1f1f1.png?v8",signal_strength:"unicode/1f4f6.png?v8",singapore:"unicode/1f1f8-1f1ec.png?v8",singer:"unicode/1f9d1-1f3a4.png?v8",sint_maarten:"unicode/1f1f8-1f1fd.png?v8",six:"unicode/0036-20e3.png?v8",six_pointed_star:"unicode/1f52f.png?v8",skateboard:"unicode/1f6f9.png?v8",ski:"unicode/1f3bf.png?v8",skier:"unicode/26f7.png?v8",skull:"unicode/1f480.png?v8",skull_and_crossbones:"unicode/2620.png?v8",skunk:"unicode/1f9a8.png?v8",sled:"unicode/1f6f7.png?v8",sleeping:"unicode/1f634.png?v8",sleeping_bed:"unicode/1f6cc.png?v8",sleepy:"unicode/1f62a.png?v8",slightly_frowning_face:"unicode/1f641.png?v8",slightly_smiling_face:"unicode/1f642.png?v8",slot_machine:"unicode/1f3b0.png?v8",sloth:"unicode/1f9a5.png?v8",slovakia:"unicode/1f1f8-1f1f0.png?v8",slovenia:"unicode/1f1f8-1f1ee.png?v8",small_airplane:"unicode/1f6e9.png?v8",small_blue_diamond:"unicode/1f539.png?v8",small_orange_diamond:"unicode/1f538.png?v8",small_red_triangle:"unicode/1f53a.png?v8",small_red_triangle_down:"unicode/1f53b.png?v8",smile:"unicode/1f604.png?v8",smile_cat:"unicode/1f638.png?v8",smiley:"unicode/1f603.png?v8",smiley_cat:"unicode/1f63a.png?v8",smiling_face_with_tear:"unicode/1f972.png?v8",smiling_face_with_three_hearts:"unicode/1f970.png?v8",smiling_imp:"unicode/1f608.png?v8",smirk:"unicode/1f60f.png?v8",smirk_cat:"unicode/1f63c.png?v8",smoking:"unicode/1f6ac.png?v8",snail:"unicode/1f40c.png?v8",snake:"unicode/1f40d.png?v8",sneezing_face:"unicode/1f927.png?v8",snowboarder:"unicode/1f3c2.png?v8",snowflake:"unicode/2744.png?v8",snowman:"unicode/26c4.png?v8",snowman_with_snow:"unicode/2603.png?v8",soap:"unicode/1f9fc.png?v8",sob:"unicode/1f62d.png?v8",soccer:"unicode/26bd.png?v8",socks:"unicode/1f9e6.png?v8",softball:"unicode/1f94e.png?v8",solomon_islands:"unicode/1f1f8-1f1e7.png?v8",somalia:"unicode/1f1f8-1f1f4.png?v8",soon:"unicode/1f51c.png?v8",sos:"unicode/1f198.png?v8",sound:"unicode/1f509.png?v8",south_africa:"unicode/1f1ff-1f1e6.png?v8",south_georgia_south_sandwich_islands:"unicode/1f1ec-1f1f8.png?v8",south_sudan:"unicode/1f1f8-1f1f8.png?v8",space_invader:"unicode/1f47e.png?v8",spades:"unicode/2660.png?v8",spaghetti:"unicode/1f35d.png?v8",sparkle:"unicode/2747.png?v8",sparkler:"unicode/1f387.png?v8",sparkles:"unicode/2728.png?v8",sparkling_heart:"unicode/1f496.png?v8",speak_no_evil:"unicode/1f64a.png?v8",speaker:"unicode/1f508.png?v8",speaking_head:"unicode/1f5e3.png?v8",speech_balloon:"unicode/1f4ac.png?v8",speedboat:"unicode/1f6a4.png?v8",spider:"unicode/1f577.png?v8",spider_web:"unicode/1f578.png?v8",spiral_calendar:"unicode/1f5d3.png?v8",spiral_notepad:"unicode/1f5d2.png?v8",sponge:"unicode/1f9fd.png?v8",spoon:"unicode/1f944.png?v8",squid:"unicode/1f991.png?v8",sri_lanka:"unicode/1f1f1-1f1f0.png?v8",st_barthelemy:"unicode/1f1e7-1f1f1.png?v8",st_helena:"unicode/1f1f8-1f1ed.png?v8",st_kitts_nevis:"unicode/1f1f0-1f1f3.png?v8",st_lucia:"unicode/1f1f1-1f1e8.png?v8",st_martin:"unicode/1f1f2-1f1eb.png?v8",st_pierre_miquelon:"unicode/1f1f5-1f1f2.png?v8",st_vincent_grenadines:"unicode/1f1fb-1f1e8.png?v8",stadium:"unicode/1f3df.png?v8",standing_man:"unicode/1f9cd-2642.png?v8",standing_person:"unicode/1f9cd.png?v8",standing_woman:"unicode/1f9cd-2640.png?v8",star:"unicode/2b50.png?v8",star2:"unicode/1f31f.png?v8",star_and_crescent:"unicode/262a.png?v8",star_of_david:"unicode/2721.png?v8",star_struck:"unicode/1f929.png?v8",stars:"unicode/1f320.png?v8",station:"unicode/1f689.png?v8",statue_of_liberty:"unicode/1f5fd.png?v8",steam_locomotive:"unicode/1f682.png?v8",stethoscope:"unicode/1fa7a.png?v8",stew:"unicode/1f372.png?v8",stop_button:"unicode/23f9.png?v8",stop_sign:"unicode/1f6d1.png?v8",stopwatch:"unicode/23f1.png?v8",straight_ruler:"unicode/1f4cf.png?v8",strawberry:"unicode/1f353.png?v8",stuck_out_tongue:"unicode/1f61b.png?v8",stuck_out_tongue_closed_eyes:"unicode/1f61d.png?v8",stuck_out_tongue_winking_eye:"unicode/1f61c.png?v8",student:"unicode/1f9d1-1f393.png?v8",studio_microphone:"unicode/1f399.png?v8",stuffed_flatbread:"unicode/1f959.png?v8",sudan:"unicode/1f1f8-1f1e9.png?v8",sun_behind_large_cloud:"unicode/1f325.png?v8",sun_behind_rain_cloud:"unicode/1f326.png?v8",sun_behind_small_cloud:"unicode/1f324.png?v8",sun_with_face:"unicode/1f31e.png?v8",sunflower:"unicode/1f33b.png?v8",sunglasses:"unicode/1f60e.png?v8",sunny:"unicode/2600.png?v8",sunrise:"unicode/1f305.png?v8",sunrise_over_mountains:"unicode/1f304.png?v8",superhero:"unicode/1f9b8.png?v8",superhero_man:"unicode/1f9b8-2642.png?v8",superhero_woman:"unicode/1f9b8-2640.png?v8",supervillain:"unicode/1f9b9.png?v8",supervillain_man:"unicode/1f9b9-2642.png?v8",supervillain_woman:"unicode/1f9b9-2640.png?v8",surfer:"unicode/1f3c4.png?v8",surfing_man:"unicode/1f3c4-2642.png?v8",surfing_woman:"unicode/1f3c4-2640.png?v8",suriname:"unicode/1f1f8-1f1f7.png?v8",sushi:"unicode/1f363.png?v8",suspect:"suspect.png?v8",suspension_railway:"unicode/1f69f.png?v8",svalbard_jan_mayen:"unicode/1f1f8-1f1ef.png?v8",swan:"unicode/1f9a2.png?v8",swaziland:"unicode/1f1f8-1f1ff.png?v8",sweat:"unicode/1f613.png?v8",sweat_drops:"unicode/1f4a6.png?v8",sweat_smile:"unicode/1f605.png?v8",sweden:"unicode/1f1f8-1f1ea.png?v8",sweet_potato:"unicode/1f360.png?v8",swim_brief:"unicode/1fa72.png?v8",swimmer:"unicode/1f3ca.png?v8",swimming_man:"unicode/1f3ca-2642.png?v8",swimming_woman:"unicode/1f3ca-2640.png?v8",switzerland:"unicode/1f1e8-1f1ed.png?v8",symbols:"unicode/1f523.png?v8",synagogue:"unicode/1f54d.png?v8",syria:"unicode/1f1f8-1f1fe.png?v8",syringe:"unicode/1f489.png?v8","t-rex":"unicode/1f996.png?v8",taco:"unicode/1f32e.png?v8",tada:"unicode/1f389.png?v8",taiwan:"unicode/1f1f9-1f1fc.png?v8",tajikistan:"unicode/1f1f9-1f1ef.png?v8",takeout_box:"unicode/1f961.png?v8",tamale:"unicode/1fad4.png?v8",tanabata_tree:"unicode/1f38b.png?v8",tangerine:"unicode/1f34a.png?v8",tanzania:"unicode/1f1f9-1f1ff.png?v8",taurus:"unicode/2649.png?v8",taxi:"unicode/1f695.png?v8",tea:"unicode/1f375.png?v8",teacher:"unicode/1f9d1-1f3eb.png?v8",teapot:"unicode/1fad6.png?v8",technologist:"unicode/1f9d1-1f4bb.png?v8",teddy_bear:"unicode/1f9f8.png?v8",telephone:"unicode/260e.png?v8",telephone_receiver:"unicode/1f4de.png?v8",telescope:"unicode/1f52d.png?v8",tennis:"unicode/1f3be.png?v8",tent:"unicode/26fa.png?v8",test_tube:"unicode/1f9ea.png?v8",thailand:"unicode/1f1f9-1f1ed.png?v8",thermometer:"unicode/1f321.png?v8",thinking:"unicode/1f914.png?v8",thong_sandal:"unicode/1fa74.png?v8",thought_balloon:"unicode/1f4ad.png?v8",thread:"unicode/1f9f5.png?v8",three:"unicode/0033-20e3.png?v8",thumbsdown:"unicode/1f44e.png?v8",thumbsup:"unicode/1f44d.png?v8",ticket:"unicode/1f3ab.png?v8",tickets:"unicode/1f39f.png?v8",tiger:"unicode/1f42f.png?v8",tiger2:"unicode/1f405.png?v8",timer_clock:"unicode/23f2.png?v8",timor_leste:"unicode/1f1f9-1f1f1.png?v8",tipping_hand_man:"unicode/1f481-2642.png?v8",tipping_hand_person:"unicode/1f481.png?v8",tipping_hand_woman:"unicode/1f481-2640.png?v8",tired_face:"unicode/1f62b.png?v8",tm:"unicode/2122.png?v8",togo:"unicode/1f1f9-1f1ec.png?v8",toilet:"unicode/1f6bd.png?v8",tokelau:"unicode/1f1f9-1f1f0.png?v8",tokyo_tower:"unicode/1f5fc.png?v8",tomato:"unicode/1f345.png?v8",tonga:"unicode/1f1f9-1f1f4.png?v8",tongue:"unicode/1f445.png?v8",toolbox:"unicode/1f9f0.png?v8",tooth:"unicode/1f9b7.png?v8",toothbrush:"unicode/1faa5.png?v8",top:"unicode/1f51d.png?v8",tophat:"unicode/1f3a9.png?v8",tornado:"unicode/1f32a.png?v8",tr:"unicode/1f1f9-1f1f7.png?v8",trackball:"unicode/1f5b2.png?v8",tractor:"unicode/1f69c.png?v8",traffic_light:"unicode/1f6a5.png?v8",train:"unicode/1f68b.png?v8",train2:"unicode/1f686.png?v8",tram:"unicode/1f68a.png?v8",transgender_flag:"unicode/1f3f3-26a7.png?v8",transgender_symbol:"unicode/26a7.png?v8",triangular_flag_on_post:"unicode/1f6a9.png?v8",triangular_ruler:"unicode/1f4d0.png?v8",trident:"unicode/1f531.png?v8",trinidad_tobago:"unicode/1f1f9-1f1f9.png?v8",tristan_da_cunha:"unicode/1f1f9-1f1e6.png?v8",triumph:"unicode/1f624.png?v8",trolleybus:"unicode/1f68e.png?v8",trollface:"trollface.png?v8",trophy:"unicode/1f3c6.png?v8",tropical_drink:"unicode/1f379.png?v8",tropical_fish:"unicode/1f420.png?v8",truck:"unicode/1f69a.png?v8",trumpet:"unicode/1f3ba.png?v8",tshirt:"unicode/1f455.png?v8",tulip:"unicode/1f337.png?v8",tumbler_glass:"unicode/1f943.png?v8",tunisia:"unicode/1f1f9-1f1f3.png?v8",turkey:"unicode/1f983.png?v8",turkmenistan:"unicode/1f1f9-1f1f2.png?v8",turks_caicos_islands:"unicode/1f1f9-1f1e8.png?v8",turtle:"unicode/1f422.png?v8",tuvalu:"unicode/1f1f9-1f1fb.png?v8",tv:"unicode/1f4fa.png?v8",twisted_rightwards_arrows:"unicode/1f500.png?v8",two:"unicode/0032-20e3.png?v8",two_hearts:"unicode/1f495.png?v8",two_men_holding_hands:"unicode/1f46c.png?v8",two_women_holding_hands:"unicode/1f46d.png?v8",u5272:"unicode/1f239.png?v8",u5408:"unicode/1f234.png?v8",u55b6:"unicode/1f23a.png?v8",u6307:"unicode/1f22f.png?v8",u6708:"unicode/1f237.png?v8",u6709:"unicode/1f236.png?v8",u6e80:"unicode/1f235.png?v8",u7121:"unicode/1f21a.png?v8",u7533:"unicode/1f238.png?v8",u7981:"unicode/1f232.png?v8",u7a7a:"unicode/1f233.png?v8",uganda:"unicode/1f1fa-1f1ec.png?v8",uk:"unicode/1f1ec-1f1e7.png?v8",ukraine:"unicode/1f1fa-1f1e6.png?v8",umbrella:"unicode/2614.png?v8",unamused:"unicode/1f612.png?v8",underage:"unicode/1f51e.png?v8",unicorn:"unicode/1f984.png?v8",united_arab_emirates:"unicode/1f1e6-1f1ea.png?v8",united_nations:"unicode/1f1fa-1f1f3.png?v8",unlock:"unicode/1f513.png?v8",up:"unicode/1f199.png?v8",upside_down_face:"unicode/1f643.png?v8",uruguay:"unicode/1f1fa-1f1fe.png?v8",us:"unicode/1f1fa-1f1f8.png?v8",us_outlying_islands:"unicode/1f1fa-1f1f2.png?v8",us_virgin_islands:"unicode/1f1fb-1f1ee.png?v8",uzbekistan:"unicode/1f1fa-1f1ff.png?v8",v:"unicode/270c.png?v8",vampire:"unicode/1f9db.png?v8",vampire_man:"unicode/1f9db-2642.png?v8",vampire_woman:"unicode/1f9db-2640.png?v8",vanuatu:"unicode/1f1fb-1f1fa.png?v8",vatican_city:"unicode/1f1fb-1f1e6.png?v8",venezuela:"unicode/1f1fb-1f1ea.png?v8",vertical_traffic_light:"unicode/1f6a6.png?v8",vhs:"unicode/1f4fc.png?v8",vibration_mode:"unicode/1f4f3.png?v8",video_camera:"unicode/1f4f9.png?v8",video_game:"unicode/1f3ae.png?v8",vietnam:"unicode/1f1fb-1f1f3.png?v8",violin:"unicode/1f3bb.png?v8",virgo:"unicode/264d.png?v8",volcano:"unicode/1f30b.png?v8",volleyball:"unicode/1f3d0.png?v8",vomiting_face:"unicode/1f92e.png?v8",vs:"unicode/1f19a.png?v8",vulcan_salute:"unicode/1f596.png?v8",waffle:"unicode/1f9c7.png?v8",wales:"unicode/1f3f4-e0067-e0062-e0077-e006c-e0073-e007f.png?v8",walking:"unicode/1f6b6.png?v8",walking_man:"unicode/1f6b6-2642.png?v8",walking_woman:"unicode/1f6b6-2640.png?v8",wallis_futuna:"unicode/1f1fc-1f1eb.png?v8",waning_crescent_moon:"unicode/1f318.png?v8",waning_gibbous_moon:"unicode/1f316.png?v8",warning:"unicode/26a0.png?v8",wastebasket:"unicode/1f5d1.png?v8",watch:"unicode/231a.png?v8",water_buffalo:"unicode/1f403.png?v8",water_polo:"unicode/1f93d.png?v8",watermelon:"unicode/1f349.png?v8",wave:"unicode/1f44b.png?v8",wavy_dash:"unicode/3030.png?v8",waxing_crescent_moon:"unicode/1f312.png?v8",waxing_gibbous_moon:"unicode/1f314.png?v8",wc:"unicode/1f6be.png?v8",weary:"unicode/1f629.png?v8",wedding:"unicode/1f492.png?v8",weight_lifting:"unicode/1f3cb.png?v8",weight_lifting_man:"unicode/1f3cb-2642.png?v8",weight_lifting_woman:"unicode/1f3cb-2640.png?v8",western_sahara:"unicode/1f1ea-1f1ed.png?v8",whale:"unicode/1f433.png?v8",whale2:"unicode/1f40b.png?v8",wheel_of_dharma:"unicode/2638.png?v8",wheelchair:"unicode/267f.png?v8",white_check_mark:"unicode/2705.png?v8",white_circle:"unicode/26aa.png?v8",white_flag:"unicode/1f3f3.png?v8",white_flower:"unicode/1f4ae.png?v8",white_haired_man:"unicode/1f468-1f9b3.png?v8",white_haired_woman:"unicode/1f469-1f9b3.png?v8",white_heart:"unicode/1f90d.png?v8",white_large_square:"unicode/2b1c.png?v8",white_medium_small_square:"unicode/25fd.png?v8",white_medium_square:"unicode/25fb.png?v8",white_small_square:"unicode/25ab.png?v8",white_square_button:"unicode/1f533.png?v8",wilted_flower:"unicode/1f940.png?v8",wind_chime:"unicode/1f390.png?v8",wind_face:"unicode/1f32c.png?v8",window:"unicode/1fa9f.png?v8",wine_glass:"unicode/1f377.png?v8",wink:"unicode/1f609.png?v8",wolf:"unicode/1f43a.png?v8",woman:"unicode/1f469.png?v8",woman_artist:"unicode/1f469-1f3a8.png?v8",woman_astronaut:"unicode/1f469-1f680.png?v8",woman_beard:"unicode/1f9d4-2640.png?v8",woman_cartwheeling:"unicode/1f938-2640.png?v8",woman_cook:"unicode/1f469-1f373.png?v8",woman_dancing:"unicode/1f483.png?v8",woman_facepalming:"unicode/1f926-2640.png?v8",woman_factory_worker:"unicode/1f469-1f3ed.png?v8",woman_farmer:"unicode/1f469-1f33e.png?v8",woman_feeding_baby:"unicode/1f469-1f37c.png?v8",woman_firefighter:"unicode/1f469-1f692.png?v8",woman_health_worker:"unicode/1f469-2695.png?v8",woman_in_manual_wheelchair:"unicode/1f469-1f9bd.png?v8",woman_in_motorized_wheelchair:"unicode/1f469-1f9bc.png?v8",woman_in_tuxedo:"unicode/1f935-2640.png?v8",woman_judge:"unicode/1f469-2696.png?v8",woman_juggling:"unicode/1f939-2640.png?v8",woman_mechanic:"unicode/1f469-1f527.png?v8",woman_office_worker:"unicode/1f469-1f4bc.png?v8",woman_pilot:"unicode/1f469-2708.png?v8",woman_playing_handball:"unicode/1f93e-2640.png?v8",woman_playing_water_polo:"unicode/1f93d-2640.png?v8",woman_scientist:"unicode/1f469-1f52c.png?v8",woman_shrugging:"unicode/1f937-2640.png?v8",woman_singer:"unicode/1f469-1f3a4.png?v8",woman_student:"unicode/1f469-1f393.png?v8",woman_teacher:"unicode/1f469-1f3eb.png?v8",woman_technologist:"unicode/1f469-1f4bb.png?v8",woman_with_headscarf:"unicode/1f9d5.png?v8",woman_with_probing_cane:"unicode/1f469-1f9af.png?v8",woman_with_turban:"unicode/1f473-2640.png?v8",woman_with_veil:"unicode/1f470-2640.png?v8",womans_clothes:"unicode/1f45a.png?v8",womans_hat:"unicode/1f452.png?v8",women_wrestling:"unicode/1f93c-2640.png?v8",womens:"unicode/1f6ba.png?v8",wood:"unicode/1fab5.png?v8",woozy_face:"unicode/1f974.png?v8",world_map:"unicode/1f5fa.png?v8",worm:"unicode/1fab1.png?v8",worried:"unicode/1f61f.png?v8",wrench:"unicode/1f527.png?v8",wrestling:"unicode/1f93c.png?v8",writing_hand:"unicode/270d.png?v8",x:"unicode/274c.png?v8",yarn:"unicode/1f9f6.png?v8",yawning_face:"unicode/1f971.png?v8",yellow_circle:"unicode/1f7e1.png?v8",yellow_heart:"unicode/1f49b.png?v8",yellow_square:"unicode/1f7e8.png?v8",yemen:"unicode/1f1fe-1f1ea.png?v8",yen:"unicode/1f4b4.png?v8",yin_yang:"unicode/262f.png?v8",yo_yo:"unicode/1fa80.png?v8",yum:"unicode/1f60b.png?v8",zambia:"unicode/1f1ff-1f1f2.png?v8",zany_face:"unicode/1f92a.png?v8",zap:"unicode/26a1.png?v8",zebra:"unicode/1f993.png?v8",zero:"unicode/0030-20e3.png?v8",zimbabwe:"unicode/1f1ff-1f1fc.png?v8",zipper_mouth_face:"unicode/1f910.png?v8",zombie:"unicode/1f9df.png?v8",zombie_man:"unicode/1f9df-2642.png?v8",zombie_woman:"unicode/1f9df-2640.png?v8",zzz:"unicode/1f4a4.png?v8"}};function jn(e,t){return e.replace(/<(code|pre|script|template)[^>]*?>[\s\S]+?<\/(code|pre|script|template)>/g,function(e){return e.replace(/:/g,"__colon__")}).replace(/<!--[\s\S]+?-->/g,function(e){return e.replace(/:/g,"__colon__")}).replace(/([a-z]{2,}:)?\/\/[^\s'">)]+/gi,function(e){return e.replace(/:/g,"__colon__")}).replace(/:([a-z0-9_\-+]+?):/g,function(e,n){return i=e,o=n,e=t,n=Cn.data[o],i,i=n?e&&/unicode/.test(n)?'<span class="emoji">'+n.replace("unicode/","").replace(/\.png.*/,"").split("-").map(function(e){return"&#x"+e+";"}).join("&zwj;").concat("&#xFE0E;")+"</span>":'<img src="'+Cn.baseURL+n+'.png" alt="'+o+'" class="emoji" loading="lazy">':i;var i,o}).replace(/__colon__/g,":")}function Ln(e){var o={};return{str:e=(e=void 0===e?"":e)&&e.replace(/^('|")/,"").replace(/('|")$/,"").replace(/(?:^|\s):([\w-]+:?)=?([\w-%]+)?/g,function(e,n,i){return-1===n.indexOf(":")?(o[n]=i&&i.replace(/&quot;/g,"")||!0,""):e}).trim(),config:o}}function On(e){return(e=void 0===e?"":e).replace(/(<\/?a.*?>)/gi,"")}var qn,Pn=be(function(e){var u,f,p,d,n,g=function(u){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,e={},R={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof T?new T(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function i(e,o){var t,n;switch(o=o||{},R.util.type(e)){case"Object":if(n=R.util.objId(e),o[n])return o[n];for(var a in t={},o[n]=t,e)e.hasOwnProperty(a)&&(t[a]=i(e[a],o));return t;case"Array":return(n=R.util.objId(e),o[n])?o[n]:(t=[],o[n]=t,e.forEach(function(e,n){t[n]=i(e,o)}),t);default:return e}},getLanguage:function(e){for(;e;){var n=i.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(i,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(e){var n=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(e.stack)||[])[1];if(n){var i,o=document.getElementsByTagName("script");for(i in o)if(o[i].src==n)return o[i]}return null}},isActive:function(e,n,i){for(var o="no-"+n;e;){var t=e.classList;if(t.contains(n))return!0;if(t.contains(o))return!1;e=e.parentElement}return!!i}},languages:{plain:e,plaintext:e,text:e,txt:e,extend:function(e,n){var i,o=R.util.clone(R.languages[e]);for(i in n)o[i]=n[i];return o},insertBefore:function(i,e,n,o){var t,a=(o=o||R.languages)[i],r={};for(t in a)if(a.hasOwnProperty(t)){if(t==e)for(var c in n)n.hasOwnProperty(c)&&(r[c]=n[c]);n.hasOwnProperty(t)||(r[t]=a[t])}var u=o[i];return o[i]=r,R.languages.DFS(R.languages,function(e,n){n===u&&e!=i&&(this[e]=r)}),r},DFS:function e(n,i,o,t){t=t||{};var a,r,c,u=R.util.objId;for(a in n)n.hasOwnProperty(a)&&(i.call(n,a,n[a],o||a),r=n[a],"Object"!==(c=R.util.type(r))||t[u(r)]?"Array"!==c||t[u(r)]||(t[u(r)]=!0,e(r,i,a,t)):(t[u(r)]=!0,e(r,i,null,t)))}},plugins:{},highlightAll:function(e,n){R.highlightAllUnder(document,e,n)},highlightAllUnder:function(e,n,i){var o={callback:i,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};R.hooks.run("before-highlightall",o),o.elements=Array.prototype.slice.apply(o.container.querySelectorAll(o.selector)),R.hooks.run("before-all-elements-highlight",o);for(var t,a=0;t=o.elements[a++];)R.highlightElement(t,!0===n,o.callback)},highlightElement:function(e,n,i){var o=R.util.getLanguage(e),t=R.languages[o];R.util.setLanguage(e,o);var a=e.parentElement;a&&"pre"===a.nodeName.toLowerCase()&&R.util.setLanguage(a,o);var r={element:e,language:o,grammar:t,code:e.textContent};function c(e){r.highlightedCode=e,R.hooks.run("before-insert",r),r.element.innerHTML=r.highlightedCode,R.hooks.run("after-highlight",r),R.hooks.run("complete",r),i&&i.call(r.element)}if(R.hooks.run("before-sanity-check",r),(a=r.element.parentElement)&&"pre"===a.nodeName.toLowerCase()&&!a.hasAttribute("tabindex")&&a.setAttribute("tabindex","0"),!r.code)return R.hooks.run("complete",r),void(i&&i.call(r.element));R.hooks.run("before-highlight",r),r.grammar?n&&u.Worker?((n=new Worker(R.filename)).onmessage=function(e){c(e.data)},n.postMessage(JSON.stringify({language:r.language,code:r.code,immediateClose:!0}))):c(R.highlight(r.code,r.grammar,r.language)):c(R.util.encode(r.code))},highlight:function(e,n,i){i={code:e,grammar:n,language:i};if(R.hooks.run("before-tokenize",i),!i.grammar)throw new Error('The language "'+i.language+'" has no grammar.');return i.tokens=R.tokenize(i.code,i.grammar),R.hooks.run("after-tokenize",i),T.stringify(R.util.encode(i.tokens),i.language)},tokenize:function(e,n){var i=n.rest;if(i){for(var o in i)n[o]=i[o];delete n.rest}var t=new a;return j(t,t.head,e),function e(n,i,o,t,a,r){for(var c in o)if(o.hasOwnProperty(c)&&o[c]){var u=o[c];u=Array.isArray(u)?u:[u];for(var f=0;f<u.length;++f){if(r&&r.cause==c+","+f)return;var p,d=u[f],g=d.inside,s=!!d.lookbehind,l=!!d.greedy,v=d.alias;l&&!d.pattern.global&&(p=d.pattern.toString().match(/[imsuy]*$/)[0],d.pattern=RegExp(d.pattern.source,p+"g"));for(var h=d.pattern||d,_=t.next,m=a;_!==i.tail&&!(r&&m>=r.reach);m+=_.value.length,_=_.next){var b=_.value;if(i.length>n.length)return;if(!(b instanceof T)){var k,w=1;if(l){if(!(k=C(h,m,n,s))||k.index>=n.length)break;var y=k.index,x=k.index+k[0].length,S=m;for(S+=_.value.length;S<=y;)_=_.next,S+=_.value.length;if(S-=_.value.length,m=S,_.value instanceof T)continue;for(var A=_;A!==i.tail&&(S<x||"string"==typeof A.value);A=A.next)w++,S+=A.value.length;w--,b=n.slice(m,S),k.index-=m}else if(!(k=C(h,0,b,s)))continue;var y=k.index,$=k[0],z=b.slice(0,y),F=b.slice(y+$.length),E=m+b.length;r&&E>r.reach&&(r.reach=E);b=_.prev;z&&(b=j(i,b,z),m+=z.length),L(i,b,w);$=new T(c,g?R.tokenize($,g):$,v,$);_=j(i,b,$),F&&j(i,_,F),1<w&&(E={cause:c+","+f,reach:E},e(n,i,o,_.prev,m,E),r&&E.reach>r.reach&&(r.reach=E.reach))}}}}}(e,t,n,t.head,0),function(e){var n=[],i=e.head.next;for(;i!==e.tail;)n.push(i.value),i=i.next;return n}(t)},hooks:{all:{},add:function(e,n){var i=R.hooks.all;i[e]=i[e]||[],i[e].push(n)},run:function(e,n){var i=R.hooks.all[e];if(i&&i.length)for(var o,t=0;o=i[t++];)o(n)}},Token:T};function T(e,n,i,o){this.type=e,this.content=n,this.alias=i,this.length=0|(o||"").length}function C(e,n,i,o){e.lastIndex=n;i=e.exec(i);return i&&o&&i[1]&&(o=i[1].length,i.index+=o,i[0]=i[0].slice(o)),i}function a(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function j(e,n,i){var o=n.next,i={value:i,prev:n,next:o};return n.next=i,o.prev=i,e.length++,i}function L(e,n,i){for(var o=n.next,t=0;t<i&&o!==e.tail;t++)o=o.next;(n.next=o).prev=n,e.length-=t}if(u.Prism=R,T.stringify=function n(e,i){if("string"==typeof e)return e;if(Array.isArray(e)){var o="";return e.forEach(function(e){o+=n(e,i)}),o}var t={type:e.type,content:n(e.content,i),tag:"span",classes:["token",e.type],attributes:{},language:i},e=e.alias;e&&(Array.isArray(e)?Array.prototype.push.apply(t.classes,e):t.classes.push(e)),R.hooks.run("wrap",t);var a,r="";for(a in t.attributes)r+=" "+a+'="'+(t.attributes[a]||"").replace(/"/g,"&quot;")+'"';return"<"+t.tag+' class="'+t.classes.join(" ")+'"'+r+">"+t.content+"</"+t.tag+">"},!u.document)return u.addEventListener&&(R.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),i=n.language,e=n.code,n=n.immediateClose;u.postMessage(R.highlight(e,R.languages[i],i)),n&&u.close()},!1)),R;var o=R.util.currentScript();function t(){R.manual||R.highlightAll()}return o&&(R.filename=o.src,o.hasAttribute("data-manual")&&(R.manual=!0)),R.manual||("loading"===(e=document.readyState)||"interactive"===e&&o&&o.defer?document.addEventListener("DOMContentLoaded",t):window.requestAnimationFrame?window.requestAnimationFrame(t):window.setTimeout(t,16)),R}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=g),void 0!==me&&(me.Prism=g),g.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},g.languages.markup.tag.inside["attr-value"].inside.entity=g.languages.markup.entity,g.languages.markup.doctype.inside["internal-subset"].inside=g.languages.markup,g.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),Object.defineProperty(g.languages.markup.tag,"addInlined",{value:function(e,n){var i={};i["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:g.languages[n]},i.cdata=/^<!\[CDATA\[|\]\]>$/i;i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}};i["language-"+n]={pattern:/[\s\S]+/,inside:g.languages[n]};n={};n[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:i},g.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(g.languages.markup.tag,"addAttribute",{value:function(e,n){g.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:g.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),g.languages.html=g.languages.markup,g.languages.mathml=g.languages.markup,g.languages.svg=g.languages.markup,g.languages.xml=g.languages.extend("markup",{}),g.languages.ssml=g.languages.xml,g.languages.atom=g.languages.xml,g.languages.rss=g.languages.xml,function(e){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+n.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;e=e.languages.markup;e&&(e.tag.addInlined("style","css"),e.tag.addAttribute("style","css"))}(g),g.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},g.languages.javascript=g.languages.extend("clike",{"class-name":[g.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),g.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,g.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:g.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:g.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:g.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:g.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:g.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),g.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:g.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),g.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),g.languages.markup&&(g.languages.markup.tag.addInlined("script","javascript"),g.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),g.languages.js=g.languages.javascript,void 0!==g&&"undefined"!=typeof document&&(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),u={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},d="pre[data-src]:not(["+(f="data-src-status")+'="loaded"]):not(['+f+'="'+(p="loading")+'"])',g.hooks.add("before-highlightall",function(e){e.selector+=", "+d}),g.hooks.add("before-sanity-check",function(e){var t,n,i,o,a,r,c=e.element;c.matches(d)&&(e.code="",c.setAttribute(f,p),(t=c.appendChild(document.createElement("CODE"))).textContent="Loading…",i=c.getAttribute("data-src"),"none"===(e=e.language)&&(n=(/\.(\w+)$/.exec(i)||[,"none"])[1],e=u[n]||n),g.util.setLanguage(t,e),g.util.setLanguage(c,e),(n=g.plugins.autoloader)&&n.loadLanguages(e),i=i,o=function(e){c.setAttribute(f,"loaded");var n,i,o=function(e){if(i=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"")){var n=Number(i[1]),e=i[2],i=i[3];return e?i?[n,Number(i)]:[n,void 0]:[n,n]}}(c.getAttribute("data-range"));o&&(n=e.split(/\r\n?|\n/g),i=o[0],o=null==o[1]?n.length:o[1],i<0&&(i+=n.length),i=Math.max(0,Math.min(i-1,n.length)),o<0&&(o+=n.length),o=Math.max(0,Math.min(o,n.length)),e=n.slice(i,o).join("\n"),c.hasAttribute("data-start")||c.setAttribute("data-start",String(i+1))),t.textContent=e,g.highlightElement(t)},a=function(e){c.setAttribute(f,"failed"),t.textContent=e},(r=new XMLHttpRequest).open("GET",i,!0),r.onreadystatechange=function(){4==r.readyState&&(r.status<400&&r.responseText?o(r.responseText):400<=r.status?a("✖ Error "+r.status+" while fetching file: "+r.statusText):a("✖ Error: File does not exist or is empty"))},r.send(null))}),n=!(g.plugins.fileHighlight={highlight:function(e){for(var n,i=(e||document).querySelectorAll(d),o=0;n=i[o++];)g.highlightElement(n)}}),g.fileHighlight=function(){n||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),n=!0),g.plugins.fileHighlight.highlight.apply(this,arguments)})});function Mn(e,n){return"___"+e.toUpperCase()+n+"___"}qn=Prism,Object.defineProperties(qn.languages["markup-templating"]={},{buildPlaceholders:{value:function(o,t,e,a){var r;o.language===t&&(r=o.tokenStack=[],o.code=o.code.replace(e,function(e){if("function"==typeof a&&!a(e))return e;for(var n,i=r.length;-1!==o.code.indexOf(n=Mn(t,i));)++i;return r[i]=e,n}),o.grammar=qn.languages.markup)}},tokenizePlaceholders:{value:function(f,p){var d,g;f.language===p&&f.tokenStack&&(f.grammar=qn.languages[p],d=0,g=Object.keys(f.tokenStack),function e(n){for(var i=0;i<n.length&&!(d>=g.length);i++){var o,t,a,r,c,u=n[i];"string"==typeof u||u.content&&"string"==typeof u.content?(t=g[d],a=f.tokenStack[t],o="string"==typeof u?u:u.content,c=Mn(p,t),-1<(r=o.indexOf(c))&&(++d,t=o.substring(0,r),a=new qn.Token(p,qn.tokenize(a,f.grammar),"language-"+p,a),r=o.substring(r+c.length),c=[],t&&c.push.apply(c,e([t])),c.push(a),r&&c.push.apply(c,e([r])),"string"==typeof u?n.splice.apply(n,[i,1].concat(c)):u.content=c)):u.content&&e(u.content)}return n}(f.tokens))}}});function In(t,e){var a=this;this.config=t,this.router=e,this.cacheTree={},this.toc=[],this.cacheTOC={},this.linkTarget=t.externalLinkTarget||"_blank",this.linkRel="_blank"===this.linkTarget?t.externalLinkRel||"noopener":"",this.contentBase=e.getBasePath();var n=this._initRenderer();this.heading=n.heading;var r=o(e=t.markdown||{})?e(Sn,n):(Sn.setOptions(m(e,{renderer:m(n,e.renderer)})),Sn);this._marked=r,this.compile=function(i){var o=!0,e=c(function(e){o=!1;var n="";return i&&(n=f(i)?r(i):r.parser(i),n=t.noEmoji?n:jn(n,t.nativeEmoji),Tn.clear(),n)})(i),n=a.router.parse().file;return o?a.toc=a.cacheTOC[n]:a.cacheTOC[n]=[].concat(a.toc),e}}var Nn={},Hn={markdown:function(e){return{url:e}},mermaid:function(e){return{url:e}},iframe:function(e,n){return{html:'<iframe src="'+e+'" '+(n||"width=100% height=400")+"></iframe>"}},video:function(e,n){return{html:'<video src="'+e+'" '+(n||"controls")+">Not Support</video>"}},audio:function(e,n){return{html:'<audio src="'+e+'" '+(n||"controls")+">Not Support</audio>"}},code:function(e,n){var i=e.match(/\.(\w+)$/);return{url:e,lang:i="md"===(i=n||i&&i[1])?"markdown":i}}};In.prototype.compileEmbed=function(e,n){var i,o,t=Ln(n),a=t.str,t=t.config;if(n=a,t.include)return R(e)||(e=q(this.contentBase,C(this.router.getCurrentPath()),e)),t.type&&(o=Hn[t.type])?(i=o.call(this,e,n)).type=t.type:(o="code",/\.(md|markdown)/.test(e)?o="markdown":/\.mmd/.test(e)?o="mermaid":/\.html?/.test(e)?o="iframe":/\.(mp4|ogg)/.test(e)?o="video":/\.mp3/.test(e)&&(o="audio"),(i=Hn[o].call(this,e,n)).type=o),i.fragment=t.fragment,i},In.prototype._matchNotCompileLink=function(e){for(var n=this.config.noCompileLinks||[],i=0;i<n.length;i++){var o=n[i];if((Nn[o]||(Nn[o]=new RegExp("^"+o+"$"))).test(e))return e}},In.prototype._initRenderer=function(){var r,c,u,f,p,d,e=new Sn.Renderer,n=this.linkTarget,i=this.linkRel,a=this.router,o=this.contentBase,g=this,t={};return t.heading=e.heading=function(e,n){var i=Ln(e),o=i.str,t=i.config,e={level:n,title:On(o)};/<!-- {docsify-ignore} -->/g.test(o)&&(o=o.replace("\x3c!-- {docsify-ignore} --\x3e",""),e.title=On(o),e.ignoreSubHeading=!0),/{docsify-ignore}/g.test(o)&&(o=o.replace("{docsify-ignore}",""),e.title=On(o),e.ignoreSubHeading=!0),/<!-- {docsify-ignore-all} -->/g.test(o)&&(o=o.replace("\x3c!-- {docsify-ignore-all} --\x3e",""),e.title=On(o),e.ignoreAllSubs=!0),/{docsify-ignore-all}/g.test(o)&&(o=o.replace("{docsify-ignore-all}",""),e.title=On(o),e.ignoreAllSubs=!0);i=Tn(t.id||o),t=a.toURL(a.getCurrentPath(),{id:i});return e.slug=t,g.toc.push(e),"<h"+n+' id="'+i+'"><a href="'+t+'" data-id="'+i+'" class="anchor"><span>'+o+"</span></a></h"+n+">"},t.code={renderer:e}.renderer.code=function(e,n){var i=Pn.languages[n=void 0===n?"markup":n]||Pn.languages.markup;return'<pre v-pre data-lang="'+n+'"><code class="lang-'+n+'">'+Pn.highlight(e.replace(/@DOCSIFY_QM@/g,"`"),i,n)+"</code></pre>"},t.link=(i=(n={renderer:e,router:a,linkTarget:n,linkRel:i,compilerClass:g}).renderer,c=n.router,u=n.linkTarget,n.linkRel,f=n.compilerClass,i.link=function(e,n,i){var o=[],t=Ln(n=void 0===n?"":n),a=t.str,t=t.config;return u=t.target||u,r="_blank"===u?f.config.externalLinkRel||"noopener":"",n=a,R(e)||f._matchNotCompileLink(e)||t.ignore?(R(e)||"./"!==e.slice(0,2)||(e=document.URL.replace(/\/(?!.*\/).*/,"/").replace("#/./","")+e),o.push(0===e.indexOf("mailto:")?"":'target="'+u+'"'),o.push(0!==e.indexOf("mailto:")&&""!==r?' rel="'+r+'"':"")):(e===f.config.homepage&&(e="README"),e=c.toURL(e,null,c.getCurrentPath())),t.disabled&&(o.push("disabled"),e="javascript:void(0)"),t.class&&o.push('class="'+t.class+'"'),t.id&&o.push('id="'+t.id+'"'),n&&o.push('title="'+n+'"'),'<a href="'+e+'" '+o.join(" ")+">"+i+"</a>"}),t.paragraph={renderer:e}.renderer.paragraph=function(e){e=/^!&gt;/.test(e)?$n("tip",e):/^\?&gt;/.test(e)?$n("warn",e):"<p>"+e+"</p>";return e},t.image=(o=(i={renderer:e,contentBase:o,router:a}).renderer,p=i.contentBase,d=i.router,o.image=function(e,n,i){var o=e,t=[],a=Ln(n),r=a.str,a=a.config;return n=r,a["no-zoom"]&&t.push("data-no-zoom"),n&&t.push('title="'+n+'"'),a.size&&(n=(r=a.size.split("x"))[0],(r=r[1])?t.push('width="'+n+'" height="'+r+'"'):t.push('width="'+n+'"')),a.class&&t.push('class="'+a.class+'"'),a.id&&t.push('id="'+a.id+'"'),R(e)||(o=q(p,C(d.getCurrentPath()),e)),0<t.length?'<img src="'+o+'" data-origin="'+e+'" alt="'+i+'" '+t.join(" ")+" />":'<img src="'+o+'" data-origin="'+e+'" alt="'+i+'"'+t+">"}),t.list={renderer:e}.renderer.list=function(e,n,i){n=n?"ol":"ul";return"<"+n+" "+[/<li class="task-list-item">/.test(e.split('class="task-list"')[0])?'class="task-list"':"",i&&1<i?'start="'+i+'"':""].join(" ").trim()+">"+e+"</"+n+">"},t.listitem={renderer:e}.renderer.listitem=function(e){return/^(<input.*type="checkbox"[^>]*>)/.test(e)?'<li class="task-list-item"><label>'+e+"</label></li>":"<li>"+e+"</li>"},e.origin=t,e},In.prototype.sidebar=function(e,n){var i=this.toc,o=this.router.getCurrentPath(),t="";if(e)t=this.compile(e);else{for(var a=0;a<i.length;a++)if(i[a].ignoreSubHeading){var r=i[a].level;i.splice(a,1);for(var c=a;c<i.length&&r<i[c].level;c++)i.splice(c,1)&&c--&&a++;a--}n=this.cacheTree[o]||zn(i,n),t=An(n,"<ul>{inner}</ul>");this.cacheTree[o]=n}return t},In.prototype.subSidebar=function(e){if(e){var n=this.router.getCurrentPath(),i=this.cacheTree,o=this.toc;o[0]&&o[0].ignoreAllSubs&&o.splice(0),o[0]&&1===o[0].level&&o.shift();for(var t=0;t<o.length;t++)o[t].ignoreSubHeading&&o.splice(t,1)&&t--;e=i[n]||zn(o,e);return i[n]=e,this.toc=[],An(e)}this.toc=[]},In.prototype.header=function(e,n){return this.heading(e,n)},In.prototype.article=function(e){return this.compile(e)},In.prototype.cover=function(e){var n=this.toc.slice(),e=this.compile(e);return this.toc=n.slice(),e};function Dn(e){var n=Zn(e);return 0===n?e:(n=new RegExp("^[ \\t]{"+n+"}","gm"),e.replace(n,""))}var Un,Zn=function(e){e=e.match(/^[ \t]*(?=\S)/gm);return e?e.reduce(function(e,n){return Math.min(e,n.length)},1/0):0},Bn={};function Vn(e,o){var a=e.compiler,t=e.raw;void 0===t&&(t="");var n=e.fetch,e=Bn[t];if(e){var i=e.slice();return i.links=e.links,o(i)}var i=a._marked,r=i.lexer(t),c=[],u=i.Lexer.rules.inline.link,f=r.links;r.forEach(function(e,t){"paragraph"===e.type&&(e.text=e.text.replace(new RegExp(u.source,"g"),function(e,n,i,o){o=a.compileEmbed(i,o);return o&&c.push({index:t,embed:o}),e}))});var p=[];!function(e,a){var n,i=e.embedTokens,r=e.compile,c=(e.fetch,0),u=1;if(!i.length)return a({});for(;n=i[c++];){var o=function(t){return function(e){var n,i,o;e&&("markdown"===t.embed.type?((i=t.embed.url.split("/")).pop(),i=i.join("/"),e=e.replace(/\[([^[\]]+)\]\(([^)]+)\)/g,function(e){var n=e.indexOf("(");return"(."===e.slice(n,n+2)?e.substring(0,n)+"("+window.location.protocol+"//"+window.location.host+i+"/"+e.substring(n+1,e.length-1)+")":e}),!0===(($docsify.frontMatter||{}).installed||!1)&&(e=$docsify.frontMatter.parseMarkdown(e)),n=r.lexer(e)):"code"===t.embed.type?(t.embed.fragment&&(o=t.embed.fragment,o=new RegExp("(?:###|\\/\\/\\/)\\s*\\["+o+"\\]([\\s\\S]*)(?:###|\\/\\/\\/)\\s*\\["+o+"\\]"),e=Dn((e.match(o)||[])[1]||"").trim()),n=r.lexer("```"+t.embed.lang+"\n"+e.replace(/`/g,"@DOCSIFY_QM@")+"\n```\n")):"mermaid"===t.embed.type?(n=[{type:"html",text:'<div class="mermaid">\n'+e+"\n</div>"}]).links={}:(n=[{type:"html",text:e}]).links={}),a({token:t,embedToken:n}),++u>=c&&a({})}}(n);n.embed.url?X(n.embed.url).then(o):o(n.embed.html)}}({compile:i,embedTokens:c,fetch:n},function(e){var n,i=e.embedToken,e=e.token;e?(n=e.index,p.forEach(function(e){n>e.start&&(n+=e.length)}),m(f,i.links),r=r.slice(0,n).concat(i,r.slice(n+1)),p.push({start:n,length:i.length-1})):(Bn[t]=r.concat(),r.links=Bn[t].links=f,o(r))})}function Yn(e,n,i){var o,t,a,r;return n="function"==typeof i?i(n):"string"==typeof i?(a=[],r=0,(o=i).replace(V,function(n,e,i){a.push(o.substring(r,i-1)),r=i+=n.length+1,a.push(t&&t[n]||function(e){return("00"+("string"==typeof Y[n]?e[Y[n]]():Y[n](e))).slice(-n.length)})}),r!==o.length&&a.push(o.substring(r)),function(e){for(var n="",i=0,o=e||new Date;i<a.length;i++)n+="string"==typeof a[i]?a[i]:a[i](o);return n}(new Date(n))):n,e.replace(/{docsify-updated}/g,n)}function Gn(e){function n(e){var n=Boolean(e.__vue__&&e.__vue__._isVue),e=Boolean(e._vnode&&e._vnode.__v_skip);return n||e}var i=this.config,o=b(".markdown-section"),t="Vue"in window&&window.Vue.version&&Number(window.Vue.version.charAt(0));if(e=e||"<h1>404 - Not found</h1>","Vue"in window)for(var a=0,r=k(".markdown-section > *").filter(n);a<r.length;a+=1){var c=r[a];2===t?c.__vue__.$destroy():3===t&&c.__vue_app__.unmount()}if(this._renderTo(o,e),i.loadSidebar||this._renderSidebar(),(i.executeScript||"Vue"in window&&!1!==i.executeScript)&&(!(e=k(".markdown-section>script").filter(function(e){return!/template/.test(e.type)})[0])||(e=e.innerText.trim())&&new Function(e)()),"Vue"in window){var u,f,p=[],d=Object.keys(i.vueComponents||{});2===t&&d.length&&d.forEach(function(e){window.Vue.options.components[e]||window.Vue.component(e,i.vueComponents[e])}),!Un&&i.vueGlobalOptions&&"function"==typeof i.vueGlobalOptions.data&&(Un=i.vueGlobalOptions.data()),p.push.apply(p,Object.keys(i.vueMounts||{}).map(function(e){return[b(o,e),i.vueMounts[e]]}).filter(function(e){var n=e[0];e[1];return n})),(i.vueGlobalOptions||d.length)&&(u=/{{2}[^{}]*}{2}/,f=/<[^>/]+\s([@:]|v-)[\w-:.[\]]+[=>\s]/,p.push.apply(p,k(".markdown-section > *").filter(function(i){return!p.some(function(e){var n=e[0];e[1];return n===i})}).filter(function(e){return e.tagName.toLowerCase()in(i.vueComponents||{})||e.querySelector(d.join(",")||null)||u.test(e.outerHTML)||f.test(e.outerHTML)}).map(function(e){var n=m({},i.vueGlobalOptions||{});return Un&&(n.data=function(){return Un}),[e,n]})));for(var g=0,s=p;g<s.length;g+=1){var l,v=s[g],h=v[0],_=v[1],v="data-isvue";h.matches("pre, script")||n(h)||h.querySelector("["+v+"]")||(h.setAttribute(v,""),2===t?(_.el=void 0,new window.Vue(_).$mount(h)):3===t&&(l=window.Vue.createApp(_),d.forEach(function(e){var n=i.vueComponents[e];l.component(e,n)}),l.mount(h)))}}}function Wn(n,i,o,t,a,e){n=e?n:n.replace(/\/$/,""),(n=C(n))&&X(a.router.getFile(n+o)+i,!1,a.config.requestHeaders).then(t,function(e){return Wn(n,i,o,t,a)})}function Xn(){var n=function(){return null};return[function(e){n(e)},function(e){n=e}]}Me=Object.freeze({__proto__:null,cached:c,hyphenate:a,hasOwn:u,merge:m,isPrimitive:f,noop:d,isFn:o,isExternal:g,inBrowser:!0,isMobile:s,supportsPushState:t,parseQuery:F,stringifyQuery:E,isAbsolutePath:R,removeParams:T,getParentPath:C,cleanPath:j,resolvePath:L,getPath:q,replaceSlug:P});var Qn,Jn=function(e){function n(){e.call(this),this.config=ue(this),this.initLifecycle(),this.initPlugin(),this.callHook("init"),this.initRouter(),this.initRender(),this.initEvent(),this.initFetch(),this.callHook("mounted")}return e&&(n.__proto__=e),((n.prototype=Object.create(e&&e.prototype)).constructor=n).prototype.initPlugin=function(){var n=this;[].concat(this.config.plugins).forEach(function(e){try{o(e)&&e(n._lifecycle,n)}catch(e){if(!n.config.catchPluginErrors)throw e;console.error("Docsify plugin error",e)}})},n}((we=Object,function(e){function n(){e.apply(this,arguments)}return e&&(n.__proto__=e),((n.prototype=Object.create(e&&e.prototype)).constructor=n).prototype._loadSideAndNav=function(e,n,i,o){var t=this;return function(){if(!i)return o();Wn(e,n,i,function(e){t._renderSidebar(e),o()},t,!0)}},n.prototype._fetch=function(i){var o=this;void 0===i&&(i=d);var t,e,n,a,r,c,u,f=this.route.query,p=this.route.path;g(p)?(history.replaceState(null,"","#"),this.router.normalize()):(t=E(f,["id"]),f=(e=this.config).loadNavbar,n=e.requestHeaders,a=e.loadSidebar,r=this.router.getFile(p),this.isRemoteUrl=g(r),this.isHTML=/\.html$/g.test(r),c=function(e,n){o._renderMain(e,n,o._loadSideAndNav(p,t,a,i))},u=function(e){o._fetchFallbackPage(p,t,i)||o._fetch404(r,t,i)},this.isRemoteUrl?Kn(r+t,0,n).then(c,u):this.matchVirtualRoute(p).then(function(e){"string"==typeof e?c(e):Kn(r+t,0,n).then(c,u)}),f&&Wn(p,t,f,function(e){return o._renderNav(e)},this,!0))},n.prototype._fetchCover=function(){var n=this,e=this.config,i=e.coverpage,o=e.requestHeaders,t=this.route.query,a=C(this.route.path);if(i){var r=null,e=this.route.path;"string"==typeof i?"/"===e&&(r=i):r=Array.isArray(i)?-1<i.indexOf(e)&&"_coverpage":!0===(e=i[e])?"_coverpage":e;var c=Boolean(r)&&this.config.onlyCover;return r?(r=this.router.getFile(a+r),this.coverIsHTML=/\.html$/g.test(r),X(r+E(t,["id"]),!1,o).then(function(e){return n._renderCover(e,c)})):this._renderCover(null,c),c}},n.prototype.$fetch=function(e,n){var i=this;void 0===e&&(e=d),void 0===n&&(n=this.$resetEvents.bind(this));function o(){i.callHook("doneEach"),e()}this._fetchCover()?o():this._fetch(function(){n(),o()})},n.prototype._fetchFallbackPage=function(i,o,t){var a=this;void 0===t&&(t=d);var e=this.config,n=e.requestHeaders,r=e.fallbackLanguages,c=e.loadSidebar;if(!r)return!1;e=i.split("/")[1];if(-1===r.indexOf(e))return!1;e=this.router.getFile(i.replace(new RegExp("^/"+e),""));return Kn(e+o,0,n).then(function(e,n){return a._renderMain(e,n,a._loadSideAndNav(i,o,c,t))},function(){return a._fetch404(i,o,t)}),!0},n.prototype._fetch404=function(e,n,i){var o=this,t=this.config,a=t.loadSidebar,r=t.requestHeaders,t=t.notFoundPage,c=this._loadSideAndNav(e,n,a,i=void 0===i?d:i);if(t){e=function(n,e){var i,o,t=e.notFoundPage,a="_404"+(e.ext||".md");switch(typeof t){case"boolean":o=a;break;case"string":o=t;break;case"object":o=(i=Object.keys(t).sort(function(e,n){return n.length-e.length}).filter(function(e){return n.match(new RegExp("^"+e))})[0])&&t[i]||a}return o}(e,this.config);return Kn(this.router.getFile(e),0,r).then(function(e,n){return o._renderMain(e,n,c)},function(){return o._renderMain(null,{},c)}),!0}return this._renderMain(null,{},c),!1},n.prototype.initFetch=function(){var e,n=this,i=this.config.loadSidebar;this.rendered?(e=ee(this.router,".sidebar-nav",!0,!0),i&&e&&(e.parentNode.innerHTML+=window.__SUB_SIDEBAR__),this._bindEventOnRendered(e),this.$resetEvents(),this.callHook("doneEach"),this.callHook("ready")):this.$fetch(function(e){return n.callHook("ready")})},n}(function(e){function n(){e.apply(this,arguments)}return e&&(n.__proto__=e),((n.prototype=Object.create(e&&e.prototype)).constructor=n).prototype.$resetEvents=function(e){var n=this,i=this.config.auto2top;"history"!==e&&(n.route.query.id&&he(n.route.path,n.route.query.id),"navigate"===e&&i&&(i=i,_e.scrollTop=!0===(i=void 0===i?0:i)?0:Number(i))),this.config.loadNavbar&&ee(this.router,"nav")},n.prototype.initEvent=function(){function n(e){return h.classList.toggle("close")}var e;e="button.sidebar-toggle",this.router,null!=(e=l(e))&&(p(e,"click",function(e){e.stopPropagation(),n()}),s&&p(h,"click",function(e){return h.classList.contains("close")&&n()})),e=".sidebar",this.router,null!=(e=l(e))&&p(e,"click",function(e){e=e.target;"A"===e.nodeName&&e.nextSibling&&e.nextSibling.classList&&e.nextSibling.classList.contains("app-sub-sidebar")&&S(e.parentNode,"collapse")}),this.config.coverpage?s||p("scroll",K):h.classList.add("sticky")},n}(function(e){function n(){e.apply(this,arguments)}return e&&(n.__proto__=e),((n.prototype=Object.create(e&&e.prototype)).constructor=n).prototype._renderTo=function(e,n,i){e=l(e);e&&(e[i?"outerHTML":"innerHTML"]=n)},n.prototype._renderSidebar=function(e){var n=this.config,i=n.maxLevel,o=n.subMaxLevel,t=n.loadSidebar;if(n.hideSidebar)return[document.querySelector("aside.sidebar"),document.querySelector("button.sidebar-toggle")].filter(function(e){return!!e}).forEach(function(e){return e.parentNode.removeChild(e)}),document.querySelector("section.content").style.right="unset",document.querySelector("section.content").style.left="unset",document.querySelector("section.content").style.position="relative",document.querySelector("section.content").style.width="100%",null;this._renderTo(".sidebar-nav",this.compiler.sidebar(e,i));i=ee(this.router,".sidebar-nav",!0,!0);t&&i?i.parentNode.innerHTML+=this.compiler.subSidebar(o)||"":this.compiler.subSidebar(),this._bindEventOnRendered(i)},n.prototype._bindEventOnRendered=function(e){var n,i=this.config.autoHeader;!function(e){var n=b(".cover.show");se=n?n.offsetHeight:0;for(var i,n=l(".sidebar"),o=[],t=0,a=(o=null!=n?k(n,"li"):o).length;t<a;t+=1){var r,c,u=o[t],f=u.querySelector("a");f&&("/"!==(r=f.getAttribute("href"))&&(f=(c=e.parse(r)).query.id,c=c.path,f&&(r=ve(c,f))),r&&(fe[decodeURIComponent(r)]=u))}s||(i=T(e.getCurrentPath()),x("scroll",function(){return le(i)}),p("scroll",function(){return le(i)}),p(n,"mouseover",function(){pe=!0}),p(n,"mouseleave",function(){pe=!1}))}(this.router),i&&e&&((i=(n=l("#main")).children[0])&&"H1"!==i.tagName&&y(n,w("div",this.compiler.header(e.innerText,1)).children[0]))},n.prototype._renderNav=function(e){e&&this._renderTo("nav",this.compiler.compile(e)),this.config.loadNavbar&&ee(this.router,"nav")},n.prototype._renderMain=function(o,t,a){var r=this;if(void 0===t&&(t={}),!o)return Gn.call(this,o);this.callHook("beforeEach",o,function(e){function n(){t.updatedAt&&(i=Yn(i,t.updatedAt,r.config.formatUpdated)),r.callHook("afterEach",i,function(e){Gn.call(r,e),a()})}var i;r.isHTML?(i=r.result=o,n()):Vn({compiler:r.compiler,raw:e},function(e){i=r.compiler.compile(e),n()})})},n.prototype._renderCover=function(e,n){var i,o=l(".cover");S(l("main"),n?"add":"remove","hidden"),e?(S(o,"add","show"),(n=(i=this.coverIsHTML?e:this.compiler.cover(e)).trim().match('<p><img.*?data-origin="(.*?)"[^a]+alt="(.*?)">([^<]*?)</p>$'))&&("color"===n[2]?o.style.background=n[1]+(n[3]||""):(e=n[1],S(o,"add","has-mask"),R(n[1])||(e=q(this.router.getBasePath(),n[1])),o.style.backgroundImage="url("+e+")",o.style.backgroundSize="cover",o.style.backgroundPosition="center center"),i=i.replace(n[0],"")),this._renderTo(".cover-main",i),K()):S(o,"remove","show")},n.prototype._updateRender=function(){var e,n,i,o;e=this,n=l(".app-name-link"),i=e.config.nameLink,o=e.route.path,n&&(f(e.config.nameLink)?n.setAttribute("href",i):"object"==typeof i&&(e=Object.keys(i).filter(function(e){return-1<o.indexOf(e)})[0],n.setAttribute("href",i[e])))},n.prototype.initRender=function(){var e=this.config;this.compiler=new In(e,this.router),window.__current_docsify_compiler__=this.compiler;var n,i,o,t,a,r=e.el||"#app",c=b("nav")||w("nav"),u=b(r),f="",p=h;u?(e.repo&&(f+=(t=e.repo,r=e.cornerExternalLinkTarget,t?'<a href="'+(t=(t=!/\/\//.test(t)?"https://github.com/"+t:t).replace(/^git\+/,""))+'" target="'+(r=r||"_blank")+'" class="github-corner" aria-label="View source on Github"><svg viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a>':"")),e.coverpage&&(f+=(o=", 100%, 85%",'<section class="cover show" style="background: '+("linear-gradient(to left bottom, hsl("+Math.floor(255*Math.random())+o+") 0%,hsl("+Math.floor(255*Math.random())+o+") 100%)")+'"><div class="mask"></div><div class="cover-main">\x3c!--cover--\x3e</div></section>')),e.logo&&(o=/^data:image/.test(e.logo),n=/(?:http[s]?:)?\/\//.test(e.logo),i=/^\./.test(e.logo),o||n||i||(e.logo=q(this.router.getBasePath(),e.logo))),f+=(i=(n=e).name||"","<main>"+('<button class="sidebar-toggle" aria-label="Menu"><div class="sidebar-toggle-button"><span></span><span></span><span></span></div></button><aside class="sidebar">'+(n.name?'<h1 class="app-name"><a class="app-name-link" data-nosearch>'+(n.logo?'<img alt="'+i+'" src='+n.logo+">":i)+"</a></h1>":"")+'<div class="sidebar-nav">\x3c!--sidebar--\x3e</div></aside>')+'<section class="content"><article class="markdown-section" id="main">\x3c!--main--\x3e</article></section></main>'),this._renderTo(u,f,!0)):this.rendered=!0,e.mergeNavbar&&s?p=b(".sidebar"):(c.classList.add("app-nav"),e.repo||c.classList.add("no-badge")),e.loadNavbar&&y(p,c),e.themeColor&&(v.head.appendChild(w("div","<style>:root{--theme-color: "+e.themeColor+";}</style>").firstElementChild),a=e.themeColor,window.CSS&&window.CSS.supports&&window.CSS.supports("(--v:red)")||(e=k("style:not(.inserted),link"),[].forEach.call(e,function(e){"STYLE"===e.nodeName?Q(e,a):"LINK"===e.nodeName&&(e=e.getAttribute("href"),/\.css$/.test(e)&&X(e).then(function(e){e=w("style",e);_.appendChild(e),Q(e,a)}))}))),this._updateRender(),S(h,"ready")},n}(function(e){function n(){e.apply(this,arguments)}return e&&(n.__proto__=e),((n.prototype=Object.create(e&&e.prototype)).constructor=n).prototype.routes=function(){return this.config.routes||{}},n.prototype.matchVirtualRoute=function(t){var a=this.routes(),r=Object.keys(a),c=function(){return null};function u(){var e=r.shift();if(!e)return c(null);var n=A(o=(i="^",0===(o=e).indexOf(i)?o:"^"+o),"$")?o:o+"$",i=t.match(n);if(!i)return u();var o=a[e];if("string"==typeof o)return c(o);if("function"!=typeof o)return u();n=o,e=Xn(),o=e[0];return(0,e[1])(function(e){return"string"==typeof e?c(e):!1===e?c(null):u()}),n.length<=2?o(n(t,i)):n(t,i,o)}return{then:function(e){c=e,u()}}},n}(function(i){function e(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];i.apply(this,e),this.route={}}return i&&(e.__proto__=i),((e.prototype=Object.create(i&&i.prototype)).constructor=e).prototype.updateRender=function(){this.router.normalize(),this.route=this.router.parse(),h.setAttribute("data-page",this.route.file)},e.prototype.initRouter=function(){var n=this,e=this.config,e=new("history"===(e.routerMode||"hash")&&t?D:H)(e);this.router=e,this.updateRender(),U=this.route,e.onchange(function(e){n.updateRender(),n._updateRender(),U.path!==n.route.path?(n.$fetch(d,n.$resetEvents.bind(n,e.source)),U=n.route):n.$resetEvents(e.source)})},e}(function(e){function n(){e.apply(this,arguments)}return e&&(n.__proto__=e),((n.prototype=Object.create(e&&e.prototype)).constructor=n).prototype.initLifecycle=function(){var i=this;this._hooks={},this._lifecycle={},["init","mounted","beforeEach","afterEach","doneEach","ready"].forEach(function(e){var n=i._hooks[e]=[];i._lifecycle[e]=function(e){return n.push(e)}})},n.prototype.callHook=function(e,t,a){void 0===a&&(a=d);var r=this._hooks[e],c=this.config.catchPluginErrors,u=function(n){var e=r[n];if(n>=r.length)a(t);else if("function"==typeof e){var i="Docsify plugin error";if(2===e.length)try{e(t,function(e){t=e,u(n+1)})}catch(e){if(!c)throw e;console.error(i,e),u(n+1)}else try{var o=e(t);t=void 0===o?t:o,u(n+1)}catch(e){if(!c)throw e;console.error(i,e),u(n+1)}}else u(n+1)};u(0)},n}(we))))))));function Kn(e,n,i){return Qn&&Qn.abort&&Qn.abort(),Qn=X(e,!0,i)}window.Docsify={util:Me,dom:n,get:X,slugify:Tn,version:"4.13.1"},window.DocsifyCompiler=In,window.marked=Sn,window.Prism=Pn,e(function(e){return new Jn})}(); diff --git a/public/js/front-matter.min.js b/public/js/front-matter.min.js @@ -0,0 +1 @@ +!function(){var x=[],y=[],n=0,R={regLevel:new RegExp("^([\\s\\-]+)"),invalidLine:new RegExp("^\\-\\-\\-|^\\.\\.\\.|^\\s*#.*|^\\s*$"),dashesString:new RegExp('^\\s*\\"([^\\"]*)\\"\\s*$'),quotesString:new RegExp("^\\s*\\'([^\\']*)\\'\\s*$"),float:new RegExp("^[+-]?[0-9]+\\.[0-9]+(e[+-]?[0-9]+(\\.[0-9]+)?)?$"),integer:new RegExp("^[+-]?[0-9]+$"),array:new RegExp("\\[\\s*(.*)\\s*\\]"),map:new RegExp("\\{\\s*(.*)\\s*\\}"),key_value:new RegExp("([a-z0-9_-][ a-z0-9_-]*):( .+)","i"),single_key_value:new RegExp("^([a-z0-9_-][ a-z0-9_-]*):( .+?)$","i"),key:new RegExp("([a-z0-9_-][ a-z0-9_-]+):( .+)?","i"),item:new RegExp("^-\\s+"),trim:new RegExp("^\\s+|\\s+$"),comment:new RegExp("([^\\'\\\"#]+([\\'\\\"][^\\'\\\"]*[\\'\\\"])*)*(#.*)?")};function v(e){return{parent:null,length:0,level:e,lines:[],children:[],addChild:function(e){this.children.push(e),++(e.parent=this).length}}}function N(e){var n=null;if("true"==(e=e.replace(R.trim,"")))return!0;if("false"==e)return!1;if(".NaN"==e)return Number.NaN;if("null"==e)return null;if(".inf"==e)return Number.POSITIVE_INFINITY;if("-.inf"==e)return Number.NEGATIVE_INFINITY;if(n=e.match(R.dashesString))return n[1];if(n=e.match(R.quotesString))return n[1];if(n=e.match(R.float))return parseFloat(n[0]);if(n=e.match(R.integer))return parseInt(n[0]);if(isNaN(n=Date.parse(e))){if(n=e.match(R.single_key_value))return(i={})[n[1]]=N(n[2]),i;if(n=e.match(R.array)){for(var t=0,r=" ",i=[],l="",u=!1,a=0,s=n[1].length;a<s;++a){if("'"==(r=n[1][a])||'"'==r){if(!1===u){l+=u=r;continue}if("'"==r&&"'"==u||'"'==r&&'"'==u){u=!1,l+=r;continue}}else if(!1!==u||"["!=r&&"{"!=r)if(!1!==u||"]"!=r&&"}"!=r){if(!1===u&&0==t&&","==r){i.push(N(l)),l="";continue}}else--t;else++t;l+=r}return 0<l.length&&i.push(N(l)),i}if(n=e.match(R.map)){for(t=0,r=" ",i=[],l="",u=!1,a=0,s=n[1].length;a<s;++a){if("'"==(r=n[1][a])||'"'==r){if(!1===u){l+=u=r;continue}if("'"==r&&"'"==u||'"'==r&&'"'==u){u=!1,l+=r;continue}}else if(!1!==u||"["!=r&&"{"!=r)if(!1!==u||"]"!=r&&"}"!=r){if(!1===u&&0==t&&","==r){i.push(l),l="";continue}}else--t;else++t;l+=r}0<l.length&&i.push(l);for(var f={},a=0,s=i.length;a<s;++a)(n=i[a].match(R.key_value))&&(f[n[1]]=N(n[2]));return f}return e}return new Date(n)}function _(e){for(var n=e.lines,t=e.children,r=[n.join(" ")],i=0,l=t.length;i<l;++i)r.push(_(t[i]));return r.join("\n")}function $(e){for(var n=e.lines,t=e.children,r=n.join("\n"),i=0,l=t.length;i<l;++i)r+=$(t[i]);return r}function t(e){return function e(n){for(var t=null,r={},i=null,l=null,u=-1,a=[],s=!0,f=0,h=n.length;f<h;++f)if(-1==u||u==n[f].level){a.push(f);for(var u=n[f].level,o=n[f].lines,i=n[f].children,l=null,c=0,p=o.length;c<p;++c){var g=o[c];if(t=g.match(R.key)){var v=t[1];if("-"==v[0]&&(v=v.replace(R.item,""),s&&(s=!1,void 0===r.length&&(r=[])),null!=l&&r.push(l),l={},s=!0),void 0!==t[2]){var d=t[2].replace(R.trim,"");if("&"==d[0]){var m=e(i);null!=l?l[v]=m:r[v]=m,y[d.substr(1)]=m}else if("|"==d[0])null!=l?l[v]=$(i.shift()):r[v]=$(i.shift());else if("*"==d[0]){var w=d.substr(1),E={};if(void 0===y[w])x.push("Reference '"+w+"' not found!");else{for(var b in y[w])E[b]=y[w][b];null!=l?l[v]=E:r[v]=E}}else">"==d[0]?null!=l?l[v]=_(i.shift()):r[v]=_(i.shift()):null!=l?l[v]=N(d):r[v]=N(d)}else null!=l?l[v]=e(i):r[v]=e(i)}else g.match(/^-\s*$/)?(s&&(s=!1,void 0===r.length&&(r=[])),null!=l&&r.push(l),l={},s=!0):(t=g.match(/^-\s*(.*)/))&&(null!=l?l.push(N(t[1])):(s&&(s=!1,void 0===r.length&&(r=[])),r.push(N(t[1]))))}null!=l&&(s&&(s=!1,void 0===r.length&&(r=[])),r.push(l))}for(f=a.length-1;0<=f;--f)n.splice.call(n,a[f],1);return r}(e.children)}function i(e){x=[],y=[],n=(new Date).getTime();e=t(function(e){var n=R.regLevel,t=R.invalidLine,r=e.split("\n"),i=0,l=0,u=[],e=new v(-1),a=new v(0);e.addChild(a);var s=[],f="";u.push(a),s.push(i);for(var h=0,o=r.length;h<o;++h)if(!(f=r[h]).match(t)){if(l<(i=(c=n.exec(f))?c[1].length:0)){var c=a,a=new v(i);c.addChild(a),u.push(a),s.push(i)}else if(i<l){for(var p=!1,g=s.length-1;0<=g;--g)if(s[g]==i){a=new v(i),u.push(a),s.push(i),null!=u[g].parent&&u[g].parent.addChild(a),p=!0;break}if(!p)return void x.push("Error: Invalid indentation at line "+h+": "+f)}a.lines.push(f.replace(R.trim,"")),l=i}return e}(function(e){var n,t,r=e.split("\n"),i=R.comment;for(t in r)(n=r[t].match(i))&&void 0!==n[3]&&(r[t]=n[0].substr(0,n[0].length-n[3].length));return r.join("\n")}(e)));return n=(new Date).getTime()-n,e}var l=new RegExp("^(\\ufeff?(= yaml =|---)$([\\s\\S]*?)(?:\\2|\\.\\.\\.)$(?:\\n)?)","m");function r(e){var n=(e=e||"").split(/(\r?\n)/);return n[0]&&/= yaml =|---/.test(n[0])?function(e){var n=l.exec(e);if(!n)return{attributes:{},body:e};var t=n[n.length-1].replace(/^\s+|\s+$/g,""),r=i(t)||{},n=e.replace(n[0],"");return{attributes:r,body:n,frontmatter:t}}(e):{attributes:{},body:e}}$docsify.plugins=[].concat(function(e,t){t.config.frontMatter={},t.config.frontMatter.installed=!0,t.config.frontMatter.parseMarkdown=function(e){return r(e).body},e.beforeEach(function(e){var n=r(e),e=n.attributes,n=n.body;return t.frontmatter=e,n})},$docsify.plugins)}(); diff --git a/public/js/index.js b/public/js/index.js @@ -0,0 +1,20 @@ +function random_float(min, max) { + return Math.random() * (max - min) + min; +} + +function random_int(min, max) { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(Math.random() * (max - min + 1)) + min; +} + +const glitch_elements = document.getElementsByClassName("glitch"); + +for (let el of glitch_elements) { + el.setAttribute("data-text", el.innerText); + let closure_el = el; + setTimeout(() => { + closure_el.classList.remove("glitch"); + closure_el.classList.add("glitch-animate"); + }, random_int(1, 1000)); +} diff --git a/public/js/plugins/accordify.css b/public/js/plugins/accordify.css @@ -0,0 +1,56 @@ +.accordion { + background-color: #eee; + color: #ccc; + cursor: pointer; + padding: 18px; + width: 100%; + text-align: left; + border: none; + outline: none; + transition: padding 0s, max-height 0.2s, height 0.2s; +} + +.plus-container { + position: absolute; + right: 18px; + padding-right: 18px; +} + +.plus.opened { + display: none; +} +.plus-container.opened:before { + content: "-" +} + +.accordion.opened { + background-color: #ccc; +} +.accordion:hover { + background-color: #ddd; +} + +.accordion { + margin-bottom: 0 !important; +} + +.accordion > a:-webkit-any-link { + text-decoration: none; +} + +.panel.opened { + transform: scaleY(1); + padding: 18px; + transition: padding 0s 0s, transform 0.1s 0s ease-in; +} + +.panel { + transform: scaleY(0); + transform-origin: top; + padding: 0; + + overflow: hidden; + border: 1px solid #eee; + border-top: none; + transition: transform 0.1s 0s ease-in, padding 0s 0.1s; +} diff --git a/public/js/plugins/accordify.js b/public/js/plugins/accordify.js @@ -0,0 +1,254 @@ +// ######################################################################### +// # Settings and default containers for ease of use (and standardization) # +// ######################################################################### +/** + * Placeholder object for string formatting in pre-render replacement + * @type {{file: string, name: string, linkName: string}} + */ +const placeholder = { + name: "{{name}}", + linkName: "{{linkName}}", + file: "{{file}}", +} + +/** + * The main object, holding information shared across parts. + * + * This object exists (and is bound globally) so that configurations can easily be applied + * + * @type {{regex: RegExp, prefix: string, constructReplacement: (function(*=, *): string), placeholder: {file: string, name: string, linkName: string}, postfix: string, rawReplacement: string, properties: {prerenderComments: boolean}}} + */ +const Accordify = { + placeholder: placeholder, + rawReplacement: "## " + placeholder.name + " + \n\n[" + placeholder.file + "](" + placeholder.file + " ':include')\n[comment]: <> (End of Accordion " + placeholder.name + ")", + prefix: "<!-- accordify-inline:", + postfix: " -->", + regex: new RegExp(`<!-- accordify-inline:.* -->`, "g"), + properties: { + prerenderComments: true, + selectors: ['h1','h2','h3','h4','h5','h6'], + debug: false + }, + constructReplacement: (contents, rawReplacement) => { + if (!Array.isArray(contents)) { + throw Error("typeof " + contents + " does not match " + typeof contents) + } + + const file = contents[0] + const name = contents.length >= 2 ? contents[1] : contents[0] + + return rawReplacement.replace(placeholder.name, name) + .replaceAll(placeholder.file, file) + } +} + +// ##################################################################### +// # Pre-render comments, pointing to a file into the accordify layout # +// ##################################################################### +/** + * Will prerender comments according to the <!-- accordify-inline:<file><optional: |<title>> --> format + * + * This method will prerender these comments to adhere to the default schema of an accordion (as described in the documentation). + * + * Resulting will be an accordion, which inlines a whole different file, like this: + * + * ```markdown + * ## <title || filename> + + * + * [file](file :'include') + * ``` + * + * @param content the raw markdown + * @returns {string} the pre rendered markdown, with all respective comments translated to accordions + */ +const accordifyInlinePrerender = (content) => { + let newContent = content + if (newContent.search(Accordify.regex) !== -1) { + newContent = newContent.replaceAll(Accordify.regex, substring => { + let rawName = substring.replace(Accordify.prefix, "") + rawName = rawName.replace(Accordify.postfix, "") + + const nameContents = rawName.split("|") + + if(Accordify.properties.debug) { + console.debug("[Prerender] rendering", nameContents) + } + + return Accordify.constructReplacement(nameContents, Accordify.rawReplacement) + }) + } + + return newContent; +} + +// ##################################################### +// # Actually translate the markdown entries into html # +// ##################################################### +/** + * Renders the actual accordions + */ +const accordifyRenderAccordions = () => { + let selected = [] + Accordify.properties.selectors.forEach(selector => { + const found = document.querySelectorAll(selector); + found.forEach(header => selected.push(header)) + if(Accordify.properties.debug) { + console.debug("Selector results", selector, found) + } + }) + + let headerAside; + let titleSpan; + let plusSpan; + + let plusSpanWrapper; + for (let i = 0; i < selected.length; i++) { + if (selected[i].firstChild.firstChild.textContent.endsWith(" +")) { + if(Accordify.properties.debug) { + console.debug("Found accordion relevant element (because it ends on \" +\")", selected[i]) + } + selected[i].classList.add('accordion') + selected[i].classList.add(Accordify.properties.theme) + + headerAside = document.querySelector(`a[title='` + selected[i].firstChild.firstChild.textContent + `']`); + headerAside.href = headerAside.href.substring(0, headerAside.href.length - 1); + headerAside.setAttribute('title', headerAside.getAttribute('title').substring(0, headerAside.getAttribute('title').length - 2)); + headerAside.textContent = headerAside.textContent.substring(0, headerAside.textContent.length - 2); + + selected[i].id = selected[i].id.substring(0, selected[i].id.length - 1); + selected[i].firstChild.href = selected[i].firstChild.href.substring(0, selected[i].firstChild.href.length - 1); + selected[i].firstChild.setAttribute('data-id', selected[i].firstChild.getAttribute('data-id').substring(0, selected[i].firstChild.getAttribute('data-id').length - 1)); + + titleSpan = selected[i].firstChild.firstChild; + titleSpan.textContent = titleSpan.textContent.substring(0, titleSpan.textContent.length - 2) + + plusSpan = document.createElement('span'); + plusSpan.textContent = '+'; + plusSpan.classList.add('plus'); + plusSpan.classList.add(Accordify.properties.theme); + plusSpan.dataset.opentrigger = "1" + + plusSpanWrapper = document.createElement('span') + plusSpanWrapper.classList.add('plus-container'); + plusSpanWrapper.classList.add(Accordify.properties.theme); + plusSpanWrapper.dataset.opentrigger = "1" + plusSpanWrapper.appendChild(plusSpan) + + titleSpan.insertAdjacentElement('afterend', plusSpanWrapper); + } + } + + const accordions = document.querySelectorAll('.accordion'); + + let currentHeaderType; + let panelDiv; + let panelContent; + let panelContents; + + for (let i = 0; i < accordions.length; i++) { + panelContents = []; + currentHeaderType = accordions[i].tagName; + panelDiv = document.createElement('div'); + panelContent = accordions[i]; + panelDiv.classList.add('panel'); + panelDiv.classList.add(Accordify.properties.theme); + while (panelContent) { + panelContent = panelContent.nextElementSibling; + if (panelContent && panelContent.tagName !== currentHeaderType) { + panelContents.push(panelContent); + } else { + break; + } + } + for (let j = 0; j < panelContents.length; j++) { + panelDiv.append(panelContents[j]) + } + accordions[i].insertAdjacentElement('afterend', panelDiv); + } + + if(Accordify.properties.debug) { + console.debug("Successfully translated " + accordions.length + " accordions") + } + for (let i = 0; i < accordions.length; i++) { + accordions[i].addEventListener("click", function () { + this.classList.toggle("opened"); + + this.nextElementSibling.classList.toggle("opened"); + this.querySelectorAll("[data-opentrigger=\"1\"]").forEach(plusSpan => plusSpan.classList.toggle("opened")) + }); + } +} + +/** + * Tries to read and set properties, based on the window.$docsify variable + * + * The sub-namespace must be accordify. + */ +const accordifySetProperties = () => { + if (window.$docsify !== undefined && window.$docsify.accordify !== undefined) { + const setProperties = window.$docsify.accordify + /** + * Tries to update a specific property, base on the provided properties. + * + * This method will also try to ensure type-safety. I.e. the variable type. + * + * @param name the name of the variable that should be checked for and then potentially overwritten + * @param type the expected type of the variable (must be checkable by "typeof") + */ + const setProperty = (name, type) => { + if(setProperties[name] !== undefined) { + if(typeof setProperties[name] === type) { + Accordify.properties[name] = setProperties[name] + } else { + console.warn("IGNORING SET PROPERTY " + name , + "Found illegal type for the property \"" + name + "\". Expected " + type + " but got " + typeof setProperties[name]) + } + } + } + + // Set all the supported properties + setProperty("prerenderComments", "boolean") + setProperty("debug", "boolean") + setProperty("relevantHeaders", "string") + } +} + +// ############################################################################# +// # Register the inline prerender and the accordion render action accordingly # +// ############################################################################# +/** + * The main Accordify plugin, that will automatically be passed down to Docsify + * + * @param hook as the hook container provided by Docsify + * @param vm as the vm provided by Docsify + */ +const AccordifyPlugin = (hook, vm) => { + accordifySetProperties() + if (Accordify.properties.prerenderComments) { + hook.beforeEach(accordifyInlinePrerender) + } + hook.doneEach(accordifyRenderAccordions); +} + +// ####################################################################### +// # Only render the accordions (still here for backwards compatibility) # +// ####################################################################### +/** + * @deprecated please refrain from using this. Instead, simply add the source + * @param hook + * @param vm + */ +function loadAccordions(hook, vm) { + hook.doneEach(accordifyRenderAccordions) +} + +// #################################################### +// # Try to automatically register the docsify plugin # +// #################################################### +if (window.$docsify && window.$docsify.plugins) { + window.$docsify.plugins.push(AccordifyPlugin) +} else if (window.$docsify) { + window.$docsify.plugins = [AccordifyPlugin] +} else { + console.warn("You are using an outdated version of Accordify. Please checkout the github page for further information.") +} diff --git a/public/js/plugins/accordify.md b/public/js/plugins/accordify.md @@ -0,0 +1,140 @@ +# Accordify + +[![Mentioned in Awesome Docsify](https://awesome.re/mentioned-badge.svg)](https://github.com/docsifyjs/awesome-docsify) + +A simple script and sample stylesheet for using accordions in Docsify! + +> If you are here because of a warning in your console, or because of a deprecated `loadAccordions`, go to [update](#Update) + +## How to Use + +1. Insert this script at the end of the document: + +```html +<script src="//unpkg.com/docsify-accordify/src/index.js"></script> +``` + +2. Create a custom stylesheet or use a default one: + +```html +<link rel="stylesheet" href="//unpkg.com/docsify-accordify/src/assets/default.css"> +``` + +3. Indicate which headers you'd like to accordify by adding " +" to the end, like this: + +```markdown +## My great accordion + + +Peekaboo! +``` + +4. Enjoy! + +### Comments-Pre Parser + +Accordify can pre-parse comments and include whole files into the body of an accordion. Let's say, you want to render a custom md file called "foo.md" and add it into an accordion. Then you can add the comment `<!-- accordify-inline:<filename> -->` to your markdown file: + +```markdown +# Some Header + +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam + +<!-- accordify-inline:foo.md --> + +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam +``` + +The prenderer will take this and convert the comment into the following + +```markdown +# Some Header + +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam + +## foo.md + + +[foo.md](foo.md ':include') + +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam +``` + +As you can see, the comment has been translated into an accordion and we use the default ':include' syntax from docsiy. + +#### Custom Title + +The name of the accordion can be changed, py providing a "second argument" to the comment, like this: `<!-- accordify-inline:<filename>|<title> -->` + +So if you want the Title to be "Foo-Bar, the great journey of the Baz", you can to it like this: + +```markdown +<!-- accordify-inline:foo.md|Foo-Bar, the great journey of the Baz --> +``` + +Which will be pre rendered to + +```markdown +## Foo-Bar, the great journey of the Baz + + +[foo.md](foo.md ':include') +``` + +### Configurations + +Accordify allows you to enable or disable certain parts. This is the current configuration with default values provided: + +```javascript +window.$docsify = { + accordify: { + prerenderComments: true, // default + selectors: ['h1','h2','h3','h4','h5','h6'], // default value + debug: false, // default value + } +} +``` + +- **prerenderComments [boolean]:** If false, accordify comments will not be pre rendered +- **selectors [Array<String>]:** List of all selectors that should be respected for accordions (must be findable by `document.querySelectorAll`) +- **debug [boolean]:** If true, some debug statements will be printed + +You do not need to add these comments, if you do not want to change them + +## Update + +If you have seen the warning + +``` +You are using an outdated version of Accordify. Please checkout the github page for further information. +``` + +You may want to do the following: + +1) Move the link to the script to the bottom (under the declaration of `window.$docsify = { ... }`) +2) Remove the explicit plugin `window.$docsify.plugins: [ loadAccordions, ... ]` +3) Done! Now you are up to speed! + +## How to Use (The old way) + +1. Configure docsify-accordify: + +``` +window.$docsify = { + ..., + plugins: [loadAccordions, ...] +} +``` + +2. Insert the script into docsify document: + +``` +<script src="//unpkg.com/docsify-accordify/src/index.js"></script> +``` + +3. Create a custom stylesheet or use mine: + +``` +<link rel="stylesheet" href="//unpkg.com/docsify-accordify/src/assets/ugly-dark-theme.css"> +``` + +4. Indicate which headers you'd like to accordify by adding " +" to the end. + +5. Enjoy! diff --git a/public/js/plugins/accordion.css b/public/js/plugins/accordion.css @@ -0,0 +1,95 @@ +ul.accordion-wrapper { + display: block; + margin: 0; + padding: 0; + list-style: none; + /* counter-reset: question; */ +} + +ul.accordion-wrapper > li { + display: block; + margin: 0; + padding: 0; + overflow: hidden; + /* counter-increment: question; */ + cursor: pointer; +} + +ul.accordion-wrapper > li:hover { + background: rgba(0, 0, 0, 0.1); +} + +ul.accordion-wrapper > li > p:first-of-type { + position: relative; + margin: 0; + padding: 10px 20px; + font-weight: bold; +} + +ul.accordion-wrapper > li.active > p:first-of-type { + padding: 10px 20px 20px 20px; +} + +ul.accordion-wrapper > li.active > p:first-of-type::after { + content: ""; + position: absolute; + top: calc(100% - 10px); + left: 40px; + transform: translate(-50%, -50%); + width: 0; + height: 0; + border: 10px solid white; + border-top-color: transparent; + border-right-color: transparent; + border-left-color: transparent; +} + +ul.accordion-wrapper > li > .accordion-content-container { + display: block; + margin: 0 20px 20px 20px; + padding: 0 15px 20px; + background: white; + cursor: default; + overflow: hidden; +} + +ul.accordion-wrapper > li:not(:first-of-type) { + border-top: 1px solid rgba(0, 0, 0, 0.1); +} + +.accordion { + background: whitesmoke; +} + +.accordion.active { + background: rgba(0, 0, 0, 0.1); + border-left: 3px solid #014f17; +} + +.accordion .accordion-content-container { + display: none !important; +} + +.accordion.active .accordion-content-container { + display: block !important; +} + + +.arrow { + border: solid black; + border-width: 0 3px 3px 0; + display: inline-block; + padding: 4px; + float:right; + margin-top: 1.25%; +} + +.right { + transform: rotate(-45deg); + -webkit-transform: rotate(-45deg); +} + +.down { + transform: rotate(45deg); + -webkit-transform: rotate(45deg); +} diff --git a/public/js/plugins/accordion.js b/public/js/plugins/accordion.js @@ -0,0 +1,77 @@ +(function () { + function io_accordion(hook) { + hook.doneEach(function () { + const allListItems = document.querySelectorAll("li"); + let indexAccordionItemIndex = 0; + + allListItems.forEach(function (el, index) { + if (el.firstChild.textContent.endsWith(" +")) { + const wrapper = document.createElement('div') + const element = allListItems[index]; + + wrapper.setAttribute('id', `accordion-content--${indexAccordionItemIndex}`) + wrapper.classList.add('accordion-content-container') + + Object.values(el.children).forEach(function (childElement, childIndex) { + if (childElement.innerText.startsWith('!>')) { + childElement.innerText = childElement.innerText.replace('!>', '') + childElement.classList.add('tip') + } + + if (childIndex > 0) { + wrapper.appendChild(childElement) + } + }) + + el.appendChild(wrapper) + + element.parentElement.classList.add('accordion-wrapper') + element.classList.add("accordion"); + element.firstChild.addEventListener('click', function (e) { + + if (e.target.parentElement.classList.contains('active')) { + e.target.parentElement.classList.remove('active'); + //Change arrow + let arrow= e.target.childNodes.item(1).classList; + arrow.remove("down"); + arrow.add("right"); + } else { + document.querySelectorAll("li").forEach(function (_el) { + if (_el.classList.contains("accordion")) { + _el.classList.remove("active"); + //Change arrow + let arrow = _el.children.item(0).children.item(0).classList; + arrow.remove("down"); + arrow.add("right"); + } + }); + e.target.parentElement.classList.add('active') + //Change arrow + let arrow=e.target.childNodes.item(1).classList + arrow.remove("right"); + arrow.add("down"); + } + }) + + element.firstChild.textContent = element.firstChild.textContent.substring(0, element.firstChild.textContent.length - 2); + + //Add arrows + let arrow=document.createElement("i") + if (indexAccordionItemIndex === 0) { + element.classList.add("active"); + arrow.classList.add("arrow","down") + } + else{ + arrow.classList.add("arrow","right") + } + let p=element.children.item(0); + p.appendChild(arrow) + + indexAccordionItemIndex++; + } + }); + }); + } + + window.$docsify.plugins = [].concat(io_accordion, $docsify.plugins) +}()); diff --git a/public/js/plugins/accordion.md b/public/js/plugins/accordion.md @@ -0,0 +1,35 @@ +# Docsify Accordion + +Plugin to use accordions in your docsify documentations. + +## Implement stylesheet + javascript into your document: + +```html +<link rel="stylesheet" href="//unpkg.com/docsify-accordion/src/style.css"> +<script src="//unpkg.com/docsify-accordion/src/index.js"></script> +``` + +### Example FAQ Page + +Starting your line with `+(space)` and ending with `(space)+` (spaces are important) will convert the list into an accordion + +```md + +# FAQ Section + +Introduction text for the FAQ page. + ++ Question 1? + + + Answer 1 + ++ Question 2? + + + Answer 2 + +``` + +It will look like this. + +![Screenshot](Screenshot.png) + diff --git a/public/js/plugins/breadcrumb.css b/public/js/plugins/breadcrumb.css @@ -0,0 +1,25 @@ +nav.breadcrumb ol { + list-style: none; + padding: 0; + margin: 1em 0; + text-transform: capitalize; +} +ol.breadcrumb--small { + font-size: 0.75em; +} +ol.breadcrumb--smaller { + font-size: 0.83em; +} +ol.breadcrumb--normal { + font-size: 1em; +} +.breadcrumb li { + display: inline; +} +.breadcrumb a { + text-decoration: none; +} +.breadcrumb a:hover { + text-decoration: underline; +} + diff --git a/public/js/plugins/breadcrumb.js b/public/js/plugins/breadcrumb.js @@ -0,0 +1,47 @@ +var version = (function (e) { + "use strict"; + const i = "undefined" != typeof window, + r = { showHome: !1, homeText: "Home", separator: " &rsaquo; ", casing: "capitalize", linkColor: "var(--theme-color, #42b983)", size: "small", ...(i && window.$docsify?.breadcrumb ? window.$docsify.breadcrumb : {}) }; + function n(e, i) { + e.afterEach(function (e, n) { + const s = i.route.path, + u = s.length < 2, + f = o(i.route, i.compiler.cacheTOC), + m = t(s), + $ = a(m), + w = r.showHome || !u ? l(u) : ""; + n(d(w, c($, m, f)) + e); + }); + } + const o = (e, i) => i[e.file].find((e) => 1 === e.level).title, + t = (e) => + decodeURI(e) + .split("/") + .filter((e) => -1 === ["#", "", "README"].indexOf(e)), + a = (e) => e.map((e) => e.replace(/[._-]/g, " ")), + c = (e, i, n) => + e.reduce((o, t, a) => { + const c = s(i, a + 1); + return o + (a === e.length - 1 ? `<li class="active" aria-current="page">${n}</li>` : `<li><a href=${c} style="color: ${r.linkColor}">${t}</a>${r.separator}</li>`); + }, ""), + s = (e, i) => `#/${e.slice(0, i).join("/")}/`, + l = (e) => { + const i = e ? "inherit" : r.linkColor, + n = e ? "font-weight:inherit;" : "", + o = e ? "" : r.separator; + return `<li><a href='#/' style="color: ${i}; ${n}}">${r.homeText}</a>${o}</li>`; + }, + d = (e, i) => `\n <nav aria-label="Breadcrumb" class="breadcrumb">\n <ol\n class=' breadcrumb--${r.size}'\n style="text-transform:${r.casing}"\n >\n ${e}\n ${i}\n </ol>\n </nav>\n`; + return ( + i && ((window.$docsify = window.$docsify || {}), (window.$docsify.breadcrumb = r), (window.$docsify.plugins = [].concat(n, window.$docsify.plugins))), + (e.breadcrumbPlugin = n), + (e.generateAccessibleBreadcrumb = d), + (e.getHomeLink = l), + (e.getItemLink = s), + (e.getListItems = c), + (e.getPageTitle = o), + (e.getUrlParts = t), + (e.sanitizeUrlParts = a), + e + ); +})({}); diff --git a/public/js/plugins/breadcrumb.md b/public/js/plugins/breadcrumb.md @@ -0,0 +1,78 @@ +# Docsify Breadcrumb + +<p align="center"> + <img src="https://docsify.js.org/_media/icon.svg" /> + <br /> + <code>docsify-breadcrumb</code> +</p> + +This is a plugin for [Docsify](https://docsify.js.org/#/) that adds a breadcrumb to the top of each page. + +## Features + +`docsify-breadcrumb` adds a small, accessible breadcrumb to the top of each page. It supports a number of configuration options and can be styled to match your Docsify theme. + +The breadcrumb is represented by human readable parts of the url combined using a configurable separator. Each part links to its section. The final breadcrumb reflects the title of the current page. + +**For example:** + +`/articles/books-and-more/adventure/` + +![Breadcrumb Example](https://raw.githubusercontent.com/FranCarstens/docsify-breadcrumb/main/assets/example.png) + + +## Basic Usage + +Add the following to your `index.html` below your Docsify script tag: + +```html +<!-- Adds the breadcrumb JavaScript --> +<script src="https://cdn.jsdelivr.net/npm/docsify-breadcrumb@latest/dist/index.min.js"></script> +``` + +## Add default styling + +Add the following to your `index.html` just before the closing `</head>` tag: + +```html +<!-- Adds the default breadcrumb styling --> +<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify-breadcrumb@latest/dist/breadcrumb.min.css"> +``` + +## Configuration + +`docsify-breadcrumb` allows some customization through the `window.$docsify` object. Here are the available options: + +| Option | Type | Default | Description | +| ----------- | ------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `showHome` | Boolean | `false` | Show the home link when you're on the home page. | +| `homeText` | String | `'Home'` | The text for the home link. | +| `separator` | String | `' › '` | The separator between each breadcrumb item. | +| `casing` | String | `'capitalize'` | The casing of the breadcrumb items. Options follow the CSS standard for `text-transform`. E.g., `'capitalize'`, `'uppercase'`, and `'lowercase'`. See [text-transform](https://developer.mozilla.org/en-US/docs/Web/CSS/text-transform) documentation for more information. | +| `linkColor` | String | `'var(--theme-color, #42b983)'` | The color of the breadcrumb links. This can be any valid CSS color value. | +| `size` | String | `'small'` | The size of the breadcrumb links. Options are `'small'` (`0.75em`), `'smaller'` (`0.83em`), and `'normal'` (`1em`). This can easily be overridden with custom CSS. | + +### Example + +You do not have to include options where you want to use the default values.: + +```html +<script> + window.$docsify = { + breadcrumb: { + showHome: true, + homeText: 'Home', + separator: ' &rsaquo; ', + casing: 'capitalize', + linkColor: 'var(--theme-color, #42b983)', + size: 'small' + } + } +</script> +``` + +--- + +Inspired by [the breadcrumb work](https://github.com/docsifyjs/docsify/issues/2016) of [Abhilash](https://github.com/abpanic) + +[![](https://data.jsdelivr.com/v1/package/npm/docsify-breadcrumb/badge)](https://www.jsdelivr.com/package/npm/docsify-breadcrumb) diff --git a/public/js/plugins/charity.css b/public/js/plugins/charity.css @@ -0,0 +1,420 @@ +/*! docsify-charty 3.0.0 | (c) Mark Battistella */ + +/* + * core + */ +.docsify-charty { + + /* colours */ + --charty-colour-focus: #FDCB6E; + --charty-colour-dark: #333; + --charty-colour-light: #CCC; + --charty-colour-medium: #888; + + /* colours - themes */ + + /* sizes */ + --charty-size-title: 0; + --charty-size-baseline: 16; + --charty-size-hole: 50; + --charty-size-radius: 0.3; + + /* normal */ + position: relative; + display: block; + margin: 0 auto; + padding: 0; + border: 0; + width: 100%; + font-size: calc( var(--charty-size-baseline) * 1px ); + line-height: calc( var(--charty-size-baseline) * 1px * 1.5 ); + color: var(--charty-colour-text); +} + +/* mode: dark */ +.docsify-charty.dark { + --charty-colour-focus: #023491; + --charty-colour-dark: #CCC; + --charty-colour-light: #333; + --charty-colour-medium: #777; +} + +.docsify-charty, +.docsify-charty:before, +.docsify-charty:after, +.docsify-charty *, +.docsify-charty *:before, +.docsify-charty *:after { + box-sizing: border-box; + vertical-align: middle; +} + +.docsify-charty .container { + display: flex; + flex-direction: row; + margin-bottom: 4em !important; +} + +.docsify-charty .container > * { + align-self: center; +} + +.docsify-charty .dataset { + max-width: 25em; + width: 100%; +} + + + +/* + * svg + */ + +.docsify-charty .dataset svg { + overflow: visible; + max-width: 25em; + max-height: 25em; +} + +/* all svg items */ +.docsify-charty .dataset svg * { + transform-origin: center center; +} + +.docsify-charty .dataset polyline, +.docsify-charty .dataset line, +.docsify-charty .dataset.radar .data-header circle { + fill: none; + stroke: var(--charty-colour-light); +} + +.docsify-charty text { + transition: all 600ms; + alignment-baseline: middle; + text-anchor: middle; + font-size: 15%; + fill: var(--charty-colour-light); +} + +.docsify-charty .data-header text { + fill: var(--charty-colour-medium); +} + +.docsify-charty .data-item text { + opacity: 0; +} + +.docsify-charty .dataset.radar text { + font-size: 35%; +} + + + +/* + * focus / highlighting + */ +.docsify-charty .focus:after { + content: ''; + position: absolute; + z-index: -1; + background: var(--charty-colour-focus); + border-radius: calc( var(--charty-size-radius) * 1em ); + opacity: 0.5; + top: 0; + bottom: 0; + left: 0; + right: 0; +} + + + +/* + * header + */ +.docsify-charty header { + margin-bottom: 1.3em; +} + +.docsify-charty h3 { + --charty-size-title: 1.35; + font-size: calc( var(--charty-size-title) * 1em); + font-weight: bold; + text-align: left; +} + +.docsify-charty figcaption { + font-size: 0.9em; + color: var(--charty-colour-medium); +} + + + +/* + * legend + */ +.docsify-charty.legend fieldset { + order: 2; + margin-left: auto; + border-width: 5px 0 0 0; + border-color: var(--charty-colour-light); + border-style: solid; + font-size: 0.9em; + max-width: 30%; + width: 100%; +} + +.docsify-charty.legend fieldset legend { + font-size: 1em; + font-family: sans-serif; + font-weight: bold; + padding: 0 1em; + margin: 0 0 0.5em -1em; +} + +.docsify-charty.legend fieldset label { + display: block; + text-indent: -2em; + margin: 0.25em 0 0 2em; + line-height: 1.5em; + border-radius: 3px; + padding: 2px 5px; +} + +.docsify-charty.legend fieldset label span { + height: 1em; + width: 1em; + margin-right: 1em; + border-radius: 0.2em; + display: inline-block; +} + +.docsify-charty.legend fieldset label:hover { + background: var(--charty-colour-light); +} + + + +/* + * hover events + */ +.docsify-charty.legend .dataset .data-item { + opacity: 0.85; + transition: opacity 300ms; +} + +.docsify-charty.legend.hover .dataset .data-item { + opacity: 0.1; +} + +/* hover: heading */ +.docsify-charty header:hover ~ .container .data-text text, +.docsify-charty header:hover ~ .container .data-item:after, + +/* hover: label */ +.docsify-charty .dataset .data-item.active .data-text text, +.docsify-charty.legend.hover .dataset .data-item.active, + +/* hover: data-item */ +.docsify-charty .data-item:hover text, + +/* hover: data-text */ +.docsify-charty .data-text text:hover, +.docsify-charty .data-text text.focus, +.docsify-charty .dataset.bar .data-item:hover:after { + opacity: 1; +} + + + +/* + * axes + */ +.docsify-charty.axes .dataset { + padding: 0; + margin: 0; + border-width: 0 0 3px 3px; + border-style: solid; + border-color: var(--charty-colour-dark, #333); + position: relative; +} + +.docsify-charty.axes .dataset[axes-horizontal] { + margin-bottom: 2em; +} +.docsify-charty.axes .dataset[axes-vertical] { + margin-left: 3.5em; +} + +.docsify-charty.axes .dataset:before, +.docsify-charty.axes .dataset:after { + content: ''; + position: absolute; + z-index: -1; + left: 0; + width: 100%; + font-size: 0.7em; + font-weight: bold; + text-align: center; + letter-spacing: 1px; + color: var(--charty-colour-dark, #333); +} + +.docsify-charty.axes .dataset:before { + content: attr(axes-horizontal); + bottom: -5.5em; +} + +.docsify-charty.axes .dataset:after { + content: attr(axes-vertical); + transform-origin: top right; + left: calc( -100% - 5.5em ); + transform: rotate(-90deg); +} + + + +/* + * charty - radar + */ +.docsify-charty .dataset.radar svg { + transform: scale(0.5) translate(50%, 50%); +} + +.docsify-charty .dataset.radar svg * { + transform-origin: 0 0; +} + +.docsify-charty .dataset.radar .data-header circle:nth-child( even ) { + opacity: 0.3; +} + +.docsify-charty .dataset.radar .data-container, +.docsify-charty .dataset.radar .data-header line, +.docsify-charty .dataset.radar .data-header .data-text { + transform-origin: top left; +} + +.docsify-charty .dataset.radar svg .data-header line { + transform: rotate( calc( var(--angle) * 1deg ) ); +} + +.docsify-charty .dataset.radar .data-header text { + font-weight: bold; + transform: rotate( calc( var(--angle) * 1deg ) ); +} + + + +/* + * charty - pie / donut / section / ring + */ +.docsify-charty .dataset.pie .data-item, +.docsify-charty .dataset.donut .data-item, +.docsify-charty .dataset.section .data-item, +.docsify-charty .dataset.ring .data-item { + transform: rotate( -90deg ); +} + +.docsify-charty .dataset.donut #donut-hole circle { + fill: black; + r: calc( var(--charty-size-hole, 50) * 1% / 2 ); +} + +.docsify-charty .dataset.ring .data-item circle.ring-bg { + fill: none; + stroke: var(--charty-colour-light); +} + + + +/* + * charty - bar / column + */ +.docsify-charty .dataset.column .data-container, +.docsify-charty .dataset.column-stack .data-container { + transform: rotate( 90deg ); +} + + + +/* + * charty - rating + */ +.docsify-charty .dataset.rating { + max-width: none; +} + +.docsify-charty .dataset.rating small { + display: block; + text-align: right; +} + +.docsify-charty .dataset.rating .data-item { + display: flex; + font-weight: bold; + color: #FFF; + text-align: center; + line-height: 2.75; + margin-top: 1px; + overflow: hidden; +} + +.docsify-charty .dataset.rating .data-item:nth-of-type(1) { + border-radius: 2px 2px 0 0; +} + +.docsify-charty .dataset.rating .data-item:nth-last-of-type(1) { + border-radius: 0 0 2px 2px; +} + +.docsify-charty .dataset.rating .data-item > div { + margin-right: 1px; + width: 100%; +} + +.docsify-charty .dataset.rating .data-item .rating-label { + max-width: 10em; + background: var(--charty-colour-dark); +} + +.docsify-charty .dataset.rating .data-item .rating-value { + max-width: 4em; + background: var(--charty-colour-medium); +} + +.docsify-charty .dataset.rating .rating-bar-container { + background: var(--charty-colour-light); +} + +.docsify-charty .dataset.rating .rating-bar-colour { + width: 0%; + height: 100%; + background: var(--charty-colour-light); +} + + + + + +/* + * breakpoints + */ +@media( max-width: 800px ) { + + .docsify-charty .container { + flex-direction: column; + } + .docsify-charty .container > * { + align-self: flex-start; + } + .docsify-charty.legend fieldset { + margin: 2em 0; + max-width: 25em; + } +} + +@media( max-width: 480px ) { + .docsify-charty.axes .dataset[axes-vertical] { + margin-left: 1em; + } +} diff --git a/public/js/plugins/charity.js b/public/js/plugins/charity.js @@ -0,0 +1,1428 @@ +/*! docsify-charty 3.0.0 | (c) Mark Battistella */ + +// +// MARK: - safety first +// +'use strict'; // +// MARK: - get the docsify.config options +// + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } + +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } + +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function getChartyOptions(chartyOptions) { + var chartyTheme = chartyOptions.theme != '' ? chartyOptions.theme : '#0984E3', + chartyMode = chartyOptions.mode != '' ? chartyOptions.mode : 'light', + chartyDebug = chartyOptions.debug === true ? true : false; // build the array + + var outputArray = [chartyTheme, // colour to use for shades + chartyMode, // light or dark mode + chartyDebug // show debug messages + ]; // output + + return outputArray; +} // +// MARK: - default configuration settings +// + + +var chartyOptions = { + theme: '', + mode: 'light', + debug: 0 +}; // +// MARK: - main function +// + +function charty(hook, vm) { + // get the variables from the cofig + var chartyOptionsArray = getChartyOptions(chartyOptions), + // create global options + configTheme = chartyOptionsArray[0], + configMode = chartyOptionsArray[1], + configDebug = chartyOptionsArray[2], + acceptedCharts = ['radar', 'area', 'donut', 'doughnut', 'pie', 'section', 'sectional', 'rings', 'line', 'plot', 'scatter', 'bubble', 'rating', 'review', 'bar', 'column', 'bar-stack', 'bar-stacked', 'column-stack', 'column-stacked']; + console.log(configDebug); // + // MARK: - custom local functions + // + // function: find the arc co-ordinates + + function getCoordinatesFromPercent(percentage) { + // math angles are in radian not degrees + var degreeToRadian = 360 * Math.PI / 180, + // x = centerX + radius * cos( angleInRadians ) + x = 50 + 50 * Math.cos(degreeToRadian * percentage), + // y = centerY + radius * sin( angleInRadians ) + y = 50 + 50 * Math.sin(degreeToRadian * percentage); + return [x, y]; + } // function: check if correctly parsed json + + + function isJSON(string) { + try { + JSON.parse(string); + } catch (error) { + console.log(error); + return false; + } + + return true; + } // function: colour to HSL + + + function colourHEXToHSL(hex) { + var number = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; + // strip the hash + hex = hex.replace(/#/g, ''); // convert 3 character hex to 6 + + if (hex.length === 3) { + hex = hex.split('').map(function (hex) { + return hex + hex; + }).join(''); + } // check if we are in the legal range + + + var result = /^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})[\da-z]{0,0}$/i.exec(hex); // exit if not hex + + if (!result) { + return null; + } // variables + + + var r = parseInt(result[1], 16) / 255, + g = parseInt(result[2], 16) / 255, + b = parseInt(result[3], 16) / 255, + max = Math.max(r, g, b), + min = Math.min(r, g, b), + h, + s, + l = (max + min) / 2; // monochromatic + + if (max == min) { + h = s = 0; + } else { + var d = max - min; + s = l > 0.5 ? d / (2 - max - min) : d / (max + min); + + switch (max) { + case r: + h = (g - b) / d + (g < b ? 6 : 0); + break; + + case g: + h = (b - r) / d + 2; + break; + + case b: + h = (r - g) / d + 4; + break; + } + + h /= 6; + } // saturation + + + s = Math.round(s * 100); // hue + + h = Math.round(360 * h); // get the shades + + if (number != 1 && number < 101 && number > 0) { + l = Math.round(98 / number); + } else { + l = Math.round(l * 100); + } // return it + + + return { + h: h, + s: s, + l: l + }; + } // + // MARK: - after the markdown has been parsed + // + + + hook.afterEach(function (html, next) { + // we load the HTML inside a DOM node to allow for manipulation + var htmlElement = document.createElement('div'); // insert the html into the new element + + htmlElement.innerHTML = html; // find all the charty <pre> tags + + htmlElement.querySelectorAll('pre[data-lang=charty]').forEach(function (element) { + // + // MARK: - create the variables + // + // -- let variables + var replacement = document.createElement('figure'), + // blank the rest of the options + chartyContainer, + // <figure> + chartyHeader, + // <h3> + chartyCaption, + // <figcaption> + chartyDataGroup, + // data-group + chartyDataItem, + // data-item + // data customisations + chartyDataItemColour, + // data-item - colour + chartyDataItemLabel, + // data-item - label + chartyDataItemValue; // data-item - value + // assemble the div + // -- add in the contents + + replacement.textContent = element.textContent; // check if the innerHTML is json + + if (!isJSON(replacement.innerHTML)) { + // exit if not conformed + return; + } // -- constansts + // namespace for svg + + + var chartySVGw3 = 'http://www.w3.org/2000/svg', + // parse the data + chartyJSON = JSON.parse( // get the html to parse + replacement.innerHTML // replace color --> colour + .replace(/"color":/g, '"colour":')), + // @return: type of chart + chartyType = // does it have a type listed + chartyJSON.type && // is it in the list of accepted types + acceptedCharts.includes(chartyJSON.type) ? // spelling: doughnut + chartyJSON.type === 'doughnut' ? 'donut' : // spelling: sectional + chartyJSON.type === 'sectional' ? 'section' : // spelling: rings + chartyJSON.type === 'rings' ? 'ring' : // spelling: scatter + chartyJSON.type === 'scatter' ? 'plot' : // spelling: review + chartyJSON.type === 'review' ? 'rating' : // spelling: *-stacked + chartyJSON.type.endsWith('-stacked') ? chartyJSON.type.replace('-stacked', '-stack') : // all others + chartyJSON.type : // otherwise null + null, + // @return: array of options + chartyJSONOptions = chartyJSON.options, + // option: charty theme + chartyJSONOptionsTheme = // global theme AND local theme + configTheme && chartyJSONOptions.theme ? // override with local + chartyJSONOptions.theme : // else fallback + configTheme, + // option: show legend + chartyJSONOptionsLegend = chartyJSONOptions.legend ? true : false, + // option: show label + chartyJSONOptionsLabel = chartyJSONOptions.labels ? true : false, + // option: show number values + chartyJSONOptionsNumbers = chartyJSONOptions.numbers ? true : false, + // @return: array of data + // -- turn single data into array + chartyJSONData = Array.isArray(chartyJSON.data) ? chartyJSON.data : [chartyJSON.data], + // normalise the data + // -- some data values are singlular others arrays + normaliseData = function normaliseData(arr) { + var data = arr.map(function (_ref) { + var value = _ref.value; + return value; + }); + return typeof arr[0].value === 'number' ? [data] : data; + }, + // run it through normalisation + valueArray = normaliseData(chartyJSONData), + // data: get smallest, largest, sum of values + chartyMinMax = valueArray.reduce(function (arr, el) { + // remove the last item in array + var highestValue = arr.pop(); // do a try-catch + + try { + // check it + // -- is an array + // -- has more than 0 + // -- is only numbers + if ((Array.isArray(el) || el.length) && !el.some(isNaN)) { + // output on valid + var current = { + "min": Math.min.apply(Math, _toConsumableArray(el)), + "max": Math.max.apply(Math, _toConsumableArray(el)), + "sum": _toConsumableArray(el).reduce(function (v, w) { + return v + w; + }), + "avg": _toConsumableArray(el).reduce(function (v, w) { + return v + w; + }) / _toConsumableArray(el).length + }; // add in the current array + // -- min / max / sum / avg + + arr.push(current); // change the largest value if it now is + + if (current.max > highestValue.largest) { + highestValue.largest = current.max; + } + } + } catch (err) { + return configDebug ? console.log(err) : null; + } // add in the highest number + + + arr.push(highestValue); // return it + + return arr; + }, [{ + largest: -Infinity + }]), + // + trimLargeValue = function trimLargeValue(arr) { + // get the last of the array + var lastInArray = arr[arr.length - 1]; // return the new merged array + + return arr.slice(0, -1).map(function (o) { + return _objectSpread(_objectSpread({}, o), lastInArray); + }); + }, + // data: get smallest, largest, sum of values + chartyJSONDataNumbers = trimLargeValue(chartyMinMax), + // @return: colour hsl + // -- passed: hex colour / total numbers + chartyColours = chartyJSONData.map(function (data, index) { + // if there is a manual set colour + if (data.colour) { + return data.colour; + } // make the hsl data + + + var hsl = colourHEXToHSL(chartyJSONOptionsTheme, chartyJSONData.length), + // fix colour if only one item + l = chartyJSONData.length === 1 ? 50 : 0; // return the colour and lightness + + return "hsl( ".concat(hsl.h, ", ").concat(hsl.s, "%, ").concat(hsl.l * index + l, "% )"); + }); // add the classes + // -- main class + + + replacement.classList.add('docsify-charty'); + replacement.classList.add("".concat(configMode)); // -- axes class + + if (chartyJSONOptionsLabel && ['area', 'plot', 'bubble', 'line', 'bar', 'column', 'bar-stack', 'column-stack'].includes(chartyType)) { + replacement.classList.add('axes'); + } // create the parts for the switch + + + var svg = document.createElementNS(chartySVGw3, 'svg'), + defs = document.createElementNS(chartySVGw3, 'defs'), + group = document.createElementNS(chartySVGw3, 'g'), + flexbox = document.createElement('div'), + dataset = document.createElement('div'), + legend = document.createElement('fieldset'), + a11yTitle = document.createElement('title'), + a11yCaption = document.createElement('desc'); // -- svg container + + svg.setAttributeNS('charty', // namespace + 'viewBox', // attribute + '0 0 100 100' // value + ); + svg.setAttributeNS('charty', // namespace + 'preserveAspectRatio', // attribute + 'xMidYMid meet' // value + ); // -- defs background + + defs.innerHTML = '<filter x="-0.25" y="-0.25" width="1.5" height="1.5" id="text-bg"><feFlood flood-color="var(--charty-colour-dark)"/><feComposite in="SourceGraphic" operator="over"/></filter>'; // -- flexbox container + + flexbox.setAttributeNS('charty', // namespace + 'class', // attribute + 'container' // value + ); // -- dataset container + + dataset.setAttributeNS('charty', // namespace + 'class', // attribute + "dataset ".concat(chartyType) // value + ); // -- group container + + group.setAttributeNS('charty', // namespace + 'class', // attribute + 'data-container' // value + ); // -- a11y title + + a11yTitle.innerHTML = chartyJSON.title; + a11yCaption.innerHTML = chartyJSON.caption; // + // MARK: - assemble the items + // + // add the a11y to the svg + + svg.appendChild(a11yTitle); + svg.appendChild(a11yCaption); // add the defs to the svg + + if (chartyJSONOptionsNumbers) { + svg.appendChild(defs); + } // add the group container to the svg + + + svg.appendChild(group); // add the svg to the dataset + // only if not rating + + if (!['rating'].includes(chartyType)) { + dataset.appendChild(svg); + } // add the dataset to the container + + + flexbox.appendChild(dataset); // -- legend things + + if (chartyJSONOptionsLegend && !['rating'].includes(chartyType)) { + // -- legend class + replacement.classList.add('legend'); // add the legend + + flexbox.appendChild(legend); // add the title + + legend.innerHTML = '<legend>Legend</legend>'; + } // + // MARK: - switch the type + // + + + switch (chartyType) { + // charty-radar + case 'radar': + // create the loop rings + var radarDataHeader = document.createElementNS(chartySVGw3, 'g'), + radarDataLines = document.createElementNS(chartySVGw3, 'g'), + radarDataRings = document.createElementNS(chartySVGw3, 'g'), + radarDataText = document.createElementNS(chartySVGw3, 'g'), + radarDataPoints = chartyJSONData[0].points === undefined ? 0 : chartyJSONData[0].points; // add the classes + // -- group container + + radarDataHeader.setAttributeNS('charty', // namespace + 'class', // attribute + 'data-header' // value + ); + radarDataLines.setAttributeNS('charty', // namespace + 'class', // attribute + 'data-lines' // value + ); + radarDataRings.setAttributeNS('charty', // namespace + 'class', // attribute + 'data-rings' // value + ); + radarDataText.setAttributeNS('charty', // namespace + 'class', // attribute + 'data-label' // value + ); // add the rings + + for (var i = 1; i <= 5; i++) { + radarDataRings.innerHTML += '<circle cx="0" cy="0" r="' + i * 20 + '"/>'; + } // add the items to the container group + + + radarDataHeader.appendChild(radarDataLines); + radarDataHeader.appendChild(radarDataRings); // -- show labels + + if (chartyJSONOptionsLabel) { + radarDataHeader.appendChild(radarDataText); + } // add in the titles for the heading rings + + + if (radarDataPoints.length > 0) { + // loop through the array + radarDataPoints.forEach(function (item, i) { + // constants + var textItem = document.createElementNS(chartySVGw3, 'text'), + textLine = document.createElementNS(chartySVGw3, 'line'); // -- item options + + textItem.setAttributeNS('charty', // namespace + 'x', // attribute + 0 // value + ); + textItem.setAttributeNS('charty', // namespace + 'y', // attribute + 105 // value + ); + textItem.setAttributeNS('charty', // namespace + 'style', // attribute + "--angle: ".concat(360 / radarDataPoints.length * i) // value + ); // -- item options + + textLine.setAttributeNS('charty', // namespace + 'x1', // attribute + 0 // value + ); + textLine.setAttributeNS('charty', // namespace + 'x2', // attribute + 100 // value + ); + textLine.setAttributeNS('charty', // namespace + 'y1', // attribute + 0 // value + ); + textLine.setAttributeNS('charty', // namespace + 'y2', // attribute + 0 // value + ); + textLine.setAttributeNS('charty', // namespace + 'style', // attribute + "--angle: ".concat(360 / radarDataPoints.length * i) // value + ); // add the text + + textItem.innerHTML = item; // add it to the container + + radarDataText.appendChild(textItem); // add it to the container + + radarDataLines.appendChild(textLine); + }); + } // add in the <g> header data + + + group.appendChild(radarDataHeader); // loop through all the charty data lines + + chartyJSONData.forEach(function (data, index) { + // error checking + // -- if the values dont match number of points + if (radarDataPoints.length !== data.value.length) { + return configDebug ? console.log(">>> Charty input error\n --> ".concat(data.label, " has ").concat(data.value.length, " values but you have created ").concat(radarDataPoints.length, " labels - not creating the data")) : null; + } // data item container + + + var radarDataItem = document.createElementNS(chartySVGw3, 'g'), + // -- the shape + radarDataShape = document.createElementNS(chartySVGw3, 'polygon'), + // -- text container + radarDataLabels = document.createElementNS(chartySVGw3, 'g'); // radar points on spokes + + var radarPoints = ''; // -- calculate the spokes + + data.value.forEach(function (item, i) { + // error checking + // -- if the value greater than 100 + // -- if the value less than 0 + if (item < 0 || item > 100) { + return configDebug ? console.log(">>> Charty input error\n --> ".concat(data.label, " has a value of ").concat(item, " in its array. Values need to be between 0-100")) : null; + } // -- get the percentage + + + var percent = item >= 0 && item <= 100 ? item / 100 : 0, + // -- the degree turn + degree = 360 / radarDataPoints.length * i, + // -- radians to degrees + number = degree * (Math.PI / 180), + // -- the X position in the arc + radarX = 100 * Math.cos(number) * percent, + // -- the Y position in the arc + radarY = 100 * Math.sin(number) * percent, + // -- text labels + radarDataLabelText = document.createElementNS(chartySVGw3, 'text'); // append the points + + radarPoints += "".concat(radarX, " ").concat(radarY, " "); // -- text items + + radarDataLabelText.setAttributeNS('charty', // namespace + 'x', // attribute + "".concat(radarX) // value + ); + radarDataLabelText.setAttributeNS('charty', // namespace + 'y', // attribute + "".concat(radarY) // value + ); + radarDataLabelText.setAttributeNS('charty', // namespace + 'filter', // attribute + 'url(#text-bg)' // value + ); // -- insert the text + + radarDataLabelText.innerHTML = "".concat(item, "%"); // -- add into the group + + radarDataLabels.appendChild(radarDataLabelText); + }); // -- data item + + radarDataItem.setAttributeNS('charty', // namespace + 'class', // attribute + 'data-item' // value + ); + radarDataShape.setAttributeNS('charty', // namespace + 'points', // attribute + radarPoints // value + ); + radarDataShape.setAttributeNS('charty', // namespace + 'fill', // attribute + chartyColours[index] // value + ); // -- data-text class + + radarDataLabels.setAttributeNS('charty', // namespace + 'class', // attribute + 'data-text' // value + ); // if there is a legend + + if (chartyJSONOptionsLegend) { + legend.innerHTML += "<label><span style=\"background: ".concat(chartyColours[index], ";\"></span>").concat(data.label, "</label>"); + } // add in the items + + + radarDataItem.appendChild(radarDataShape); // -- show values + + if (chartyJSONOptionsNumbers) { + radarDataItem.appendChild(radarDataLabels); + } // add the data-item to group + + + group.appendChild(radarDataItem); + }); + break; + // charty-area + + case 'area': + // create the loop rings + var areaDataHeader = document.createElementNS(chartySVGw3, 'g'), + // -- data-text + areaDataHeaderText = document.createElementNS(chartySVGw3, 'g'), + // -- data-lines + areaDataHeaderLine = document.createElementNS(chartySVGw3, 'g'), + // number of [data] points + areaNumberInDataArray = chartyJSONData.length; // -- data-header class + + areaDataHeader.setAttributeNS('charty', 'class', 'data-header'); // -- data-header class + + areaDataHeaderText.setAttributeNS('charty', 'class', 'data-text'); // -- data-header class + + areaDataHeaderLine.setAttributeNS('charty', 'class', 'data-line'); // -- axes + + dataset.setAttributeNS('charty', 'axes-vertical', 'Values'); // add the lines + + for (var i = 1; i <= 10; i++) { + var yPos = (i - 1) * 10, + number = Math.round(chartyJSONDataNumbers[0].largest - chartyJSONDataNumbers[0].largest / 10 * (i - 1)); + areaDataHeaderLine.innerHTML += "<line x1=\"0\" x2=\"100\" y1=\"".concat(yPos, "\" y2=\"").concat(yPos, "\" stroke-width=\"0.2\" stroke-dasharray=\"4,4\" />"); + areaDataHeaderText.innerHTML += "<text x=\"".concat(-5, "\" y=\"").concat(yPos, "\">").concat(number, "</text>"); + } // add them to the main container + // -- show labels + + + if (chartyJSONOptionsLabel) { + areaDataHeader.appendChild(areaDataHeaderText); + } // -- show lines + + + areaDataHeader.appendChild(areaDataHeaderLine); // add it into the group-container + + group.appendChild(areaDataHeader); // loop through all the charty data lines + + chartyJSONData.forEach(function (data, index) { + // create the constants + // -- create the polygon shape + var areaDataPolygon = document.createElementNS(chartySVGw3, 'polygon'), + // -- calculate the total number of points + areaTotalPoints = chartyJSONData[index].value.length - 1, + // -- check if we are looping or not + areaCounter = chartyJSONData.length > 1 ? index : 0, + // -- use the largest number as the scaling + areaDataCount = chartyJSONDataNumbers[areaCounter].largest, + // -- create the data-item + areaDataItem = document.createElementNS(chartySVGw3, 'g'), + // -- the label group + areaDataLabels = document.createElementNS(chartySVGw3, 'g'); // the polygon points + + var areaPoints = ''; // loop the values + + data.value.forEach(function (item, i) { + // points average + var areaPointAsPercent = 100 - item / areaDataCount * 100, + areaDataLabelText = document.createElementNS(chartySVGw3, 'text'); // -- text items + + areaDataLabelText.setAttributeNS('charty', // namespace + 'x', // attribute + "".concat(100 / areaTotalPoints * i) // value + ); + areaDataLabelText.setAttributeNS('charty', // namespace + 'y', // attribute + "".concat(areaPointAsPercent) // value + ); + areaDataLabelText.setAttributeNS('charty', // namespace + 'filter', // attribute + 'url(#text-bg)' // value + ); // -- insert the text + + areaDataLabelText.innerHTML = item; // -- add into the group + + areaDataLabels.appendChild(areaDataLabelText); // add the poly points + + areaPoints += "".concat(100 / areaTotalPoints * i, " ").concat(areaPointAsPercent, ", "); + }); // add the last two points + // -- this blocks it off + + areaPoints += '100 100, 0 100'; // add the points to the polygon + + areaDataPolygon.setAttributeNS('charty', // namespace + 'points', // attribute + areaPoints // value + ); // add the fill colour + + areaDataPolygon.setAttributeNS('charty', // namespace + 'fill', // attribute + chartyColours[index] // value + ); // add the class to the data-item + + areaDataItem.setAttributeNS('charty', // namespace + 'class', // attribute + 'data-item' // value + ); // add the class to the data-item + + areaDataLabels.setAttributeNS('charty', // namespace + 'class', // attribute + 'data-text' // value + ); // add it into the group + + areaDataItem.appendChild(areaDataPolygon); // -- show labels + + if (chartyJSONOptionsNumbers) { + areaDataItem.appendChild(areaDataLabels); + } + + group.appendChild(areaDataItem); // if there is a legend + + if (chartyJSONOptionsLegend) { + legend.innerHTML += "<label><span style=\"background: ".concat(chartyColours[index], ";\"></span>").concat(data.label, "</label>"); + } + }); + break; + // charty-pie + // charty-donut + // charty-section + + case 'pie': + case 'donut': + case 'section': + // get the sum of all values + var circleDataSum = chartyJSONDataNumbers[0].sum, + // create the cut out hole + donutHoleMask = "<mask id=\"donut-hole\"><rect width=\"100\" height=\"100\" fill=\"white\" /><circle cx=\"50\" cy=\"50\"/></mask>"; // starting total percentage + + var circleSliceTotalPercent = 0; // loop through all the charty data lines + + chartyJSONData.forEach(function (data, index) { + // config: value as a percentage + var circleDataPercent = chartyType === 'section' ? data.value : data.value / circleDataSum, + // data-item + circleDataItem = document.createElementNS(chartySVGw3, // attribute + 'g' // value + ), + // config: value numbers + // -- show values + circleDataNumber = chartyJSONOptionsNumbers ? // -- is there a value + chartyJSONData[index].value ? // -- leave sectional values + chartyType === 'section' ? // output the value as percentage + " (".concat((data.value * 100).toFixed(2), "%)") : // output the value as is + " (".concat(data.value.toLocaleString(), " - ").concat((circleDataPercent * 100).toFixed(2), "%)") : // catch-all + null : // catch-all + ''; // find the start of the arc points + + var _getCoordinatesFromPe = getCoordinatesFromPercent(circleSliceTotalPercent), + _getCoordinatesFromPe2 = _slicedToArray(_getCoordinatesFromPe, 2), + circleArcX1 = _getCoordinatesFromPe2[0], + circleArcY1 = _getCoordinatesFromPe2[1]; // each slice starts where the last slice ended + // -- so keep a cumulative percent + // -- section uses raw values + // -- others use converted percent + + + circleSliceTotalPercent += circleDataPercent; // find the end of the arc points + + var _getCoordinatesFromPe3 = getCoordinatesFromPercent(circleSliceTotalPercent), + _getCoordinatesFromPe4 = _slicedToArray(_getCoordinatesFromPe3, 2), + circleArcX2 = _getCoordinatesFromPe4[0], + circleArcY2 = _getCoordinatesFromPe4[1]; // if the slice is more than 50% + // take the large arc (the long way around) + + + var largeArcFlag = circleDataPercent > 0.5 ? 1 : 0; // create an array + // -- join it just for code readability + + var circleSlicePathData = [// move pen to these starting co-ordinates + "M ".concat(circleArcX1, " ").concat(circleArcY1), // draw an arc + // -- radius radius x-rotate + // -- is it a large arc // > 50% + // -- sweep is 1 + // -- stop drawing at these end co-ordinates + "A 50 50 0 ".concat(largeArcFlag, " 1 ").concat(circleArcX2, " ").concat(circleArcY2), // draw a line back to 50, 50 + "L 50 50"].join(' '); // create a path + + var circleSlicePath = document.createElementNS(chartySVGw3, // attribute + 'path' // value + ); // add the path points + + circleSlicePath.setAttributeNS('charty', // namespace + 'd', // attribute + circleSlicePathData // value + ); // the slice fill colour + + circleSlicePath.setAttributeNS('charty', // namespace + 'fill', // attribute + chartyColours[index] // value + ); // add the class to the data-item + + circleDataItem.setAttributeNS('charty', // namespace + 'class', // attribute + 'data-item' // value + ); // add it into the data-item + + circleDataItem.appendChild(circleSlicePath); // if there is a legend + + if (chartyJSONOptionsLegend) { + var circleDataLabel = chartyJSONOptionsLabel ? data.label : ''; // add the data + + legend.innerHTML += "<label> <span style=\"background:".concat(chartyColours[index], ";\"></span>").concat(circleDataLabel, " ").concat(circleDataNumber, "</label>"); + } // add it into the group-container + + + group.appendChild(circleDataItem); + }); // add the donut hole + + if (chartyType === 'donut') { + // insert the hole mask + defs.innerHTML += donutHoleMask; // add the mask attribute + + group.setAttributeNS('charty', // namespace + 'mask', // attribute + 'url(#donut-hole)' // value + ); + } + + break; + // charty-rings + + case 'ring': + var ringWidth = 32 / chartyJSONData.length, + ringRadius = 50; // loop through all the charty data lines + + chartyJSONData.forEach(function (data, index) { + // data-item + var ringDataItem = document.createElementNS(chartySVGw3, // attribute + 'g' // value + ), + // background element + ringDataItemBG = document.createElementNS(chartySVGw3, // attribute + 'circle' // value + ), + // foreground element + ringDataItemFG = document.createElementNS(chartySVGw3, // attribute + 'circle' // value + ), + // how thick based on total values + ringStrokeWidth = ringRadius - (3 * index + 1) * ringWidth / 2, + // get the value percentage + ringPercent = // use raw value if + // value is between 0 and 1 + data.value >= 0 && data.value <= 1 && // the sum of the values is less than count + // -- if each were weighted at 1.00 + chartyJSONDataNumbers[0].sum <= chartyJSONData.length * 1 ? // is a percentage + data.value : // value is between 0 and 100 + data.value >= 0 && data.value <= 100 && // the sum of the values is less than count + // -- if each were weighted at 100 + chartyJSONDataNumbers[0].sum <= chartyJSONData.length * 100 ? // convert to a percentage + data.value / 100 : // all other values exit + null; // add the data-item class + + ringDataItem.setAttributeNS('charty', // namespace + 'class', // attribute + 'data-item' // value + ); // background elements + + ringDataItemBG.setAttributeNS('charty', // namespace + 'class', // attribute + 'ring-bg' // value + ); + ringDataItemBG.setAttributeNS('charty', // namespace + 'cx', // attribute + '50' // value + ); + ringDataItemBG.setAttributeNS('charty', // namespace + 'cy', // attribute + '50' // value + ); + ringDataItemBG.setAttributeNS('charty', // namespace + 'stroke-width', // attribute + "".concat(ringWidth) // value + ); + ringDataItemBG.setAttributeNS('charty', // namespace + 'r', // attribute + "".concat(ringStrokeWidth) // value + ); // foreground elements + + ringDataItemFG.setAttributeNS('charty', // namespace + 'cx', // attribute + '50' // value + ); + ringDataItemFG.setAttributeNS('charty', // namespace + 'cy', // attribute + '50' // value + ); + ringDataItemFG.setAttributeNS('charty', // namespace + 'stroke', // attribute + "".concat(chartyColours[index]) // value + ); + ringDataItemFG.setAttributeNS('charty', // namespace + 'fill', // attribute + 'none' // value + ); + ringDataItemFG.setAttributeNS('charty', // namespace + 'stroke-width', // attribute + "".concat(ringWidth) // value + ); + ringDataItemFG.setAttributeNS('charty', // namespace + 'r', // attribute + "".concat(ringStrokeWidth) // value + ); + ringDataItemFG.setAttributeNS('charty', // namespace + 'stroke-dasharray', // attribute + "".concat(2 * Math.PI * ringStrokeWidth, " ").concat(2 * Math.PI * ringStrokeWidth) // value + ); + ringDataItemFG.setAttributeNS('charty', // namespace + 'stroke-dashoffset', // attribute + "".concat(2 * Math.PI * ringStrokeWidth - ringPercent * 100 / 100 * (2 * Math.PI * ringStrokeWidth)) // value + ); // add it into the data-item + + ringDataItem.appendChild(ringDataItemBG); + ringDataItem.appendChild(ringDataItemFG); // add it into the group-container + + group.appendChild(ringDataItem); // if there is a legend + + if (chartyJSONOptionsLegend) { + var ringDataLabel = chartyJSONOptionsLabel ? data.label : '', + ringDataValue = chartyJSONOptionsNumbers ? " (".concat(ringPercent.toFixed(2) * 100, "%)") : ''; // add the data + + legend.innerHTML += "<label> <span style=\"background:".concat(chartyColours[index], ";\"></span>").concat(ringDataLabel).concat(ringDataValue, "</label>"); + } + }); + break; + // charty-plot + // charty-line + // charty-bubble + + case 'plot': + case 'line': + case 'bubble': + // -- data-header + var plotDataHeader = document.createElementNS(chartySVGw3, 'g'), + // -- data-text + plotDataHeaderText = document.createElementNS(chartySVGw3, 'g'), + // -- data-lines + plotDataHeaderLine = document.createElementNS(chartySVGw3, 'g'), + // number of [data] points + plotNumberInDataArray = chartyJSONData.length; // -- data-header class + + plotDataHeader.setAttributeNS('charty', 'class', 'data-header'); // -- data-header class + + plotDataHeaderText.setAttributeNS('charty', 'class', 'data-text'); // -- data-header class + + plotDataHeaderLine.setAttributeNS('charty', 'class', 'data-line'); // -- axes + + dataset.setAttributeNS('charty', 'axes-vertical', 'Values'); // add the lines + + for (var i = 1; i <= 10; i++) { + var _yPos = (i - 1) * 10, + _number = Math.round(chartyJSONDataNumbers[0].largest - chartyJSONDataNumbers[0].largest / 10 * (i - 1)); + + plotDataHeaderLine.innerHTML += "<line x1=\"0\" x2=\"100\" y1=\"".concat(_yPos, "\" y2=\"").concat(_yPos, "\" stroke-width=\"0.2\" stroke-dasharray=\"4,4\" />"); + plotDataHeaderText.innerHTML += "<text x=\"".concat(-5, "\" y=\"").concat(_yPos, "\">").concat(_number, "</text>"); + } // add them to the main container + // -- show numbers + + + if (chartyJSONOptionsLabel) { + plotDataHeader.appendChild(plotDataHeaderText); + } // -- show lines + + + plotDataHeader.appendChild(plotDataHeaderLine); // add it into the group-container + + group.appendChild(plotDataHeader); // loop through all the charty data lines + + chartyJSONData.forEach(function (data, index) { + // create the data-item + var plotDataItem = document.createElementNS(chartySVGw3, 'g'), + // create the data-text + plotDataText = document.createElementNS(chartySVGw3, 'g'), + // total number of points + // -- because we're inside an array + plotTotalPoints = chartyJSONData[index].value.length, + // scale for single or stacked + plotCounter = chartyJSONData.length > 1 ? index : 0, + plotDataCount = chartyJSONDataNumbers[plotCounter].largest, + // values in the array + plotDataPoint = chartyJSONData[index].value, + // create the constants + plotDataPolyline = document.createElementNS(chartySVGw3, 'polyline'); // polyline data + + var plotDataPolylinePoints = ''; // add the data-item class + + plotDataItem.setAttributeNS('charty', // namespace + 'class', // attribute + 'data-item' // value + ); // loop the values from the data-value + + plotDataPoint.forEach(function (item, i) { + // create the points + var plotDataPointItem = document.createElementNS(chartySVGw3, 'circle'), + // create the text item + plotDataTextItem = document.createElementNS(chartySVGw3, 'text'), + // x position + plotDataPointX = 100 / plotTotalPoints * (i + 1) - 100 / plotTotalPoints / 2, + // y position + plotDataPointY = 100 - item / plotDataCount * 100, + // adius of circle + plotDataPointRadius = chartyType === 'bubble' ? // normal + 5*percentage + 1.25 + 5 * item / chartyJSONDataNumbers[plotCounter].sum : // normal + 1.25; // -- radius + + plotDataPointItem.setAttributeNS('charty', // namespace + 'r', // attribute + "".concat(plotDataPointRadius) // value + ); // -- x position + + plotDataPointItem.setAttributeNS('charty', // namespace + 'cx', // attribute + "".concat(plotDataPointX) // value + ); // -- y position + + plotDataPointItem.setAttributeNS('charty', // namespace + 'cy', // attribute + "".concat(plotDataPointY) // value + ); // -- fill colour + + plotDataPointItem.setAttributeNS('charty', // namespace + 'fill', // attribute + "".concat(chartyColours[index]) // value + ); // add in the line for the graph + + if (chartyType === 'line') { + // add the points to variable + plotDataPolylinePoints += " ".concat(plotDataPointX, " "); + plotDataPolylinePoints += "".concat(plotDataPointY); // set the polyline up + + plotDataPolyline.setAttributeNS('charty', // namespace + 'points', // attribute + "".concat(plotDataPolylinePoints) // value + ); + plotDataPolyline.setAttributeNS('charty', // namespace + 'stroke-width', // attribute + '0.3' // value + ); + plotDataPolyline.setAttributeNS('charty', // namespace + 'style', // attribute + "stroke: ".concat(chartyColours[index], ";") // value + ); // add the line to the data-item + + plotDataItem.appendChild(plotDataPolyline); + } // text items + + + plotDataText.setAttributeNS('charty', // namespace + 'class', // attribute + 'data-text' // value + ); + plotDataTextItem.setAttributeNS('charty', // namespace + 'x', // attribute + "".concat(plotDataPointX) // value + ); + plotDataTextItem.setAttributeNS('charty', // namespace + 'y', // attribute + "".concat(plotDataPointY - 6) // value + ); + plotDataTextItem.setAttributeNS('charty', // namespace + 'filter', // attribute + "url(#text-bg)" // value + ); // add the value to the text element + + plotDataTextItem.innerHTML = item; // add the text to the container + // -- show values + + if (chartyJSONOptionsNumbers) { + plotDataText.appendChild(plotDataTextItem); + } // add the points to the data-item + + + plotDataItem.appendChild(plotDataPointItem); + }); // add the text container to the data-item + + plotDataItem.appendChild(plotDataText); // add it into the group-container + + group.appendChild(plotDataItem); // if there is a legend + + if (chartyJSONOptionsLegend) { + // add the data + legend.innerHTML += "<label> <span style=\"background:".concat(chartyColours[index], ";\"></span>").concat(data.label, "</label>"); + } + }); + break; + + case 'bar': + case 'column': + case 'bar-stack': + case 'column-stack': + // + // constants + // + // -- using a column graph + var isColumn = chartyType.startsWith('column') ? true : false, + // -- are we using a stack graph + isStacked = chartyType.endsWith('stack') ? true : false, + // -- data-header + barDataHeader = document.createElementNS(chartySVGw3, // namespace + 'g' // property + ), + // -- data-header > data-label + barDataHeaderLabel = document.createElementNS(chartySVGw3, // namespace + 'g' // property + ), + // -- data-header > data-lines + barDataHeaderLines = document.createElementNS(chartySVGw3, // namespace + 'g' // property + ); // + // numbers + // + // -- count of data items + + var numberOfDataItems = chartyJSONData.length, + // -- rework the data + // ---- get the columns + // ---- then the sum of the columns + chartyJSONDataColumn = chartyJSONData.map(function (current, index, arr) { + // create the blanks + var outputArray = [], + previousTotal = 0; // loop through + + for (var _i2 = 0; _i2 < current.value.length; _i2++) { + // if it is first item + if (_i2 < 1) { + // set the value to 0 + previousTotal = 0; + } else { + // add from the last value + previousTotal += arr[_i2 - 1].value[index]; + } // output the new array + + + outputArray.push(previousTotal); + } + + return outputArray; + }); // -- get the sum of all vertical values + + var stackIndexTotal = chartyJSONData.slice(1).reduce(function (sums, _ref2) { + var value = _ref2.value; + return sums.map(function (sum, i) { + return sum + value[i]; + }); + }, chartyJSONData[0].value); // + // attributes + // + // -- not for stacked + + if (!isStacked) { + var orientationHorizontal = isColumn ? 'horizontal' : 'vertical', + orientationVertical = isColumn ? 'vertical' : 'horizontal'; // -- axes + + dataset.setAttributeNS('charty', // namespace + "axes-".concat(orientationHorizontal), // property + 'Values' // value + ); + dataset.setAttributeNS('charty', // namespace + "axes-".concat(orientationVertical), // property + 'Labels' // value + ); + } // -- data-header class + + + barDataHeader.setAttributeNS('charty', 'class', 'data-header'); // -- data-header > data-label class + + barDataHeaderLabel.setAttributeNS('charty', // namespace + 'class', // property + 'data-label' // value + ); // -- data-line class + + barDataHeaderLines.setAttributeNS('charty', // namespace + 'class', // property + 'data-line' // value + ); // + // lines / labels + // + // -- add the lines + // -- add the labels + + for (var i = 1; i <= 10; i++) { + // -- move the labels to the bottom + var headerLabelOffset = isColumn ? 110 : 0, + // -- separate the lines + lineYPosition = (i - 1) * 10, + // -- label text + labelNumber = !isStacked ? Math.round(chartyJSONDataNumbers[0].largest - chartyJSONDataNumbers[0].largest / 10 * (i - 1)) // not stacked + : 100 - 100 / 10 * (i - 1); // -- add: lines + + barDataHeaderLines.innerHTML += "<line x1=\"0\" x2=\"100\" y1=\"".concat(lineYPosition, "\" y2=\"").concat(lineYPosition, "\" stroke-width=\"0.2\" stroke-dasharray=\"4, 4\" />"); // -- add: lines + + barDataHeaderLabel.innerHTML += "<text x=\"".concat(-5 + headerLabelOffset, "\" y=\"").concat(lineYPosition, "\"> ").concat(labelNumber, " </text>"); + } // the parts to the data-header + // -- show labels + + + if (chartyJSONOptionsLabel) { + barDataHeader.appendChild(barDataHeaderLabel); + } // -- show lines + + + barDataHeader.appendChild(barDataHeaderLines); // add it into the group-container + + group.appendChild(barDataHeader); // + // main loop + // + // loop through all the charty data bars + + chartyJSONData.forEach(function (data, index) { + // + // constants + // + // -- cache wrapper + var dataValue = Array.isArray(data.value) ? data.value : [data.value], + // sum of new array + // -- in the columns + chartyJSONDataColumnTotal = chartyJSONDataColumn[index][chartyJSONDataColumn[index].length - 1], + // + // numbers + // + // -- number of [value] points + numberInValueArray = dataValue.length, + // -- size of the group sections + widthOfColumn = 100 / numberOfDataItems, + // -- size of the value item + sizeOfValue = widthOfColumn / numberInValueArray, + // -- size of the value item (half) + sizeOfValueHalf = sizeOfValue / 2, + // + // create the elements + // + // -- data-item + barDataItem = document.createElementNS(chartySVGw3, // namespace + 'g' // property + ), + // create the data-text + barDataText = document.createElementNS(chartySVGw3, // namespace + 'g' // property + ); // -- data-item + + barDataItem.setAttributeNS('charty', // namespace + 'class', // property + 'data-item' // value + ); // -- data-text + + barDataText.setAttributeNS('charty', // namespace + 'class', // property + 'data-text' // value + ); // add it into the group-container + + group.appendChild(barDataItem); // + // second loop + // + // loop the values + + dataValue.forEach(function (item, i) { + // dont label if not matching + if (numberOfDataItems !== numberInValueArray) { + return configDebug ? console.log("Charty error:\n>>> The number of items in the value list does not match the number of titles") : null; + } // -- stacked data + + + if (isStacked) { + // how tall is the bar in the stack + var barDataItemPercent = item / stackIndexTotal[i] * 100, + // how far to offset it + barDataItemOffset = chartyJSONDataColumn[i][index] / stackIndexTotal[i] * 100; // bar item value + + barDataItem.innerHTML += " <rect width=\"".concat(widthOfColumn, "\" height=\"").concat(barDataItemPercent, "\" fill=\"").concat(chartyColours[index], "\" x=\"").concat(widthOfColumn * i, "\" y=\"").concat(barDataItemOffset, "\" /> "); // -- show values + + if (chartyJSONOptionsNumbers) { + barDataText.innerHTML += "<text filter=\"url(#text-bg)\" y=\"".concat(barDataItemOffset + barDataItemPercent / 2, "\" x=\"").concat(widthOfColumn / 2 + i * widthOfColumn, "\">").concat(item, "</text>"); + } // -- normal data + + } else { + // largest + var largestValue = chartyJSONDataNumbers[index].largest, + // how tall is the bar + _barDataItemPercent = item / largestValue * 100, + // how far to offset the bar + _barDataItemOffset = 100 - _barDataItemPercent; // bar item value + + + barDataItem.innerHTML += " <rect width=\"".concat(sizeOfValue, "\" height=\"").concat(_barDataItemPercent, "\" fill=\"").concat(chartyColours[index], "\" x=\"").concat(sizeOfValue * index + widthOfColumn * i, "\" y=\"").concat(_barDataItemOffset, "\" /> "); // add in the footer label text + + barDataHeaderLabel.innerHTML += "<text y=\"".concat(105, "\" x=\"", sizeOfValue * index + widthOfColumn * i + sizeOfValueHalf, " \"> ").concat(data.label, " </text>"); // add in the hover text + // -- show values + + if (chartyJSONOptionsNumbers) { + barDataText.innerHTML += "<text filter=\"url(#text-bg)\" y=\"".concat(100 - _barDataItemPercent, "\" x=\"").concat(sizeOfValue * index + widthOfColumn * i + sizeOfValueHalf, "\">").concat(item, "</text>"); + } + } + }); // if there is a legend + + if (chartyJSONOptionsLegend) { + // add the data + legend.innerHTML += "<label><span style=\"background:".concat(chartyColours[index], ";\"></span>").concat(data.label, "</label>"); + } // add the text into the data-item + + + barDataItem.appendChild(barDataText); + }); + break; + + case 'rating': + // constants + var ratingMaxValue = chartyJSONDataNumbers[0].max; // loop through all the charty rating items + + chartyJSONData.forEach(function (data, index) { + // constansts + // -- data-item + var ratingDataItem = document.createElement('div'), + // -- data-item rating-label + ratingDataItemLabel = document.createElement('div'), + // -- data-item rating-value + ratingDataItemValue = document.createElement('div'), + // -- data-item rating-bar-container + ratingDataItemBarContainer = document.createElement('div'), + // -- data-item rating-bar-colour + ratingDataItemBarColour = document.createElement('div'), + // calculate percentage of bar + ratingDataItemBarColourSize = data.value / ratingMaxValue * 100; // add the class + + ratingDataItem.setAttribute('class', // property + 'data-item' // value + ); + ratingDataItemLabel.setAttribute('class', // property + 'rating-label' // value + ); + ratingDataItemValue.setAttribute('class', // property + 'rating-value' // value + ); + ratingDataItemBarContainer.setAttribute('class', // property + 'rating-bar-container' // value + ); + ratingDataItemBarColour.setAttribute('class', // property + 'rating-bar-colour' // value + ); // add the data + + ratingDataItemLabel.innerHTML = data.label; + ratingDataItemValue.innerHTML = data.value; + ratingDataItemBarColour.setAttribute('style', // property + "width: ".concat(ratingDataItemBarColourSize, "%; background-color: ").concat(chartyColours[index], ";") // value + ); // add to the rating data-item + // -- show labels + + if (chartyJSONOptionsLabel) { + ratingDataItem.appendChild(ratingDataItemLabel); + } // -- show values + + + if (chartyJSONOptionsNumbers) { + ratingDataItem.appendChild(ratingDataItemValue); + } // -- bar data + + + ratingDataItem.appendChild(ratingDataItemBarContainer); + ratingDataItemBarContainer.appendChild(ratingDataItemBarColour); // add it into the dom + + dataset.appendChild(ratingDataItem); + }); // footer notice + + dataset.innerHTML += "<small><em>Ratings are out of a total of <strong>".concat(ratingMaxValue, "</strong></em></small>"); + break; + // no results + + default: + return; + break; + } // add the generated chart + + + charty = flexbox.outerHTML; // + // MARK: build the charts + // + // check before changing DOM + + if (charty) { + // TODO: add link anchor + // TODO: add figure numbering + // add the header (if present) + chartyHeader = chartyJSON.title === '' || !chartyJSON.title ? '' : "<h3>".concat(chartyJSON.title, "</h3>"); // add the caption (if present) + + chartyCaption = chartyJSON.caption === '' || !chartyJSON.caption ? '' : "<figcaption>".concat(chartyJSON.caption, "</figcaption>"); // fix spacing on header or caption not entered + + var chartyHeading = chartyHeader || chartyCaption ? "<header>".concat(chartyHeader).concat(chartyCaption, "</header>") : ''; // add in the bars + + replacement.innerHTML = "".concat(chartyHeading).concat(charty); // commit the manipulation + + element.parentNode.replaceChild(replacement, element); + } else { + // exit if no changes + return; + } + }); // docsify return data + + next(htmlElement.innerHTML); + }); // + // MARK: - after the parsing has completed + // + + hook.doneEach(function () { + // get all the charty items + var docsifyCharty = document.querySelectorAll('.docsify-charty'); // loop through them + + docsifyCharty.forEach(function (item, i) { + // get the parts + // -- + var docsifyChartyDataItems = _toConsumableArray(item.getElementsByClassName('data-item')); // -- labels + + + var docsifyChartyDataLabels = _toConsumableArray(item.getElementsByTagName('label')); // loop through the labels + + + docsifyChartyDataLabels.forEach(function (el, index) { + // hover: + el.addEventListener('mouseover', function (e) { + item.classList.add('hover'); // + + docsifyChartyDataItems.forEach(function (dataItem, index2) { + if (index === index2) { + dataItem.classList.add('active'); + } else { + dataItem.classList.remove('active'); + } + }); + }); // hover: off + + el.addEventListener('mouseout', function (e) { + // remove the class + item.classList.remove('hover'); + docsifyChartyDataItems.forEach(function (r) { + return r.classList.remove('active'); + }); + }); + }); + }); + }); +} // docsify plugin options + + +window.$docsify.charty = Object.assign(chartyOptions, window.$docsify.charty); +window.$docsify.plugins = [].concat(charty, window.$docsify.plugins); diff --git a/public/js/plugins/charity.md b/public/js/plugins/charity.md @@ -0,0 +1,174 @@ +<div align="center" class="gh"> + +# docsify.js charty + +</div> + +This plugin enhances your Docsify documentation by adding SVG charts to your website. It allows you to add in multiple types of charts, including pie, doughnut, sectional, radar, area, scatter, line, and bar types. By utilising this plugin, you can easily show your data in a beautiful interface. + +## Installation + +### Update `index.html` file + +Assuming you have a working [docsify](https://docsify.js.org/) framework set up, it is easy to use the plugin. + +1. Add the following script and stylesheet to your `index.html` via either CDN or downloading it and using it locally: + + ```html + <!-- unpkg.com --> + <script src="https://unpkg.com/@markbattistella/docsify-charty@latest/dist/docsify-charty.min.js"></script> + <link rel="stylesheet" href="https://unpkg.com/@markbattistella/docsify-charty@latest/dist/docsify-charty.min.css"> + + <!-- jsDelivr --> + <script src="https://cdn.jsdelivr.net/npm/@markbattistella/docsify-charty@latest"></script> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@markbattistella/docsify-charty@latest/dist/docsify-charty.min.css"> + + <!-- locally --> + <script src="docsify-charty.min.js"></script> + <link rel="stylesheet" href="docsify-charty.min.css"> + ``` + +1. In docsify setup, configure the plugin: + + ```js + <script> + window.$docsify = { + charty: { + + // Global theme for chart colours in HEX + theme: '.', + + // Accepts "dark" or "light" + mode: "light", + + // Boolean to enable or disable debug messages + debug: false + } + }; + </script> + ``` + +## Configuration + +There are several options available for the docsify-charty plugin: + +> Example: [index.html](https://github.com/markbattistella/docsify-charty/blob/b792e7701e740587f48598c7b61bc7f7ea39c366/docs/index.html#L36-L40) + +| Name | Type | Example | Description | +|---------|-----------|-----------|-------------------------------------------| +| `theme` | `String` | "#EE5599" | Global theme for chart colours in HEX | +| `mode` | `String` | "light" | Accepts "dark" or "light" | +| `debug` | `Boolean` | false | Console logs if charts aren't loading | + +### Per chart settings + +| Name | Accepts | Description | +|-------------------|---------------|------------------------------------------| +| `title` | `String` | The title of the chart, displayed at the top. Leave blank if you want to hide it | +| `caption` | `String` | The sub-text of the chart, displayed under the title. Leave blank to hide it | +| `type` | `String` | The type of charty you want to display | +| `options.theme` | `String` | Set an individual theme to this chart. It will override the global theme | +| `options.legend` | `Boolean` | Show the legend. Default `true` | +| `options.labels` | `Boolean` | Show the chart labels. Default `true` | +| `options.numbers` | `Boolean` | Show the chart numbers. Default `true` | +| `data.label` | `String` | Graphed data point label | +| `data.value` | `Int / Array` | Graphed value that puts it on the render | +| `data.colour` | `String` | Override the global and theme with a specific colour | + +### Markdown code + +```js +```charty +{ + "title": '', + "caption": '', + "type": '', + "options": { + "theme": '', + "legend": '', + "labels": '', + "numbers": '' + }, + "data": [ + { + "label": '', + "value": '', + "colour": '' + } + ] +} +\`\`\` +``` + +## Types of charts + +### Circular + +#### Pie chart + +![docsify-charty: pie](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/pie.jpg) + +#### Donut / Doughnut chart + +![docsify-charty: donut](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/donut.jpg) + +#### Section / Sectional chart + +![docsify-charty: section](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/section.jpg) + +#### Rings chart + +![docsify-charty: rings](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/rings.jpg) + +### Area + +#### Radar chart + +![docsify-charty: radar](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/radar.jpg) + +#### Area chart + +![docsify-charty: area](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/area.jpg) + +### Plot + +#### Scatter chart + +![docsify-charty: scatter](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/scatter.jpg) + +#### Bubble chart + +![docsify-charty: bubble](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/bubble.jpg) + +#### Line chart + +![docsify-charty: line](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/line.jpg)<br> +![docsify-charty: line](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/line-stack.jpg) + +### Bar / Column + +### Bar / Bar-stack chart + +![docsify-charty: line](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/bar.jpg)<br> +![docsify-charty: line](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/bar-stack.jpg) + +### Column / Column-stack chart + +![docsify-charty: line](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/column.jpg)<br> +![docsify-charty: line](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/column-stack.jpg) + +### Rating + +![docsify-charty: line](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/rating.jpg) + +## Contributing + +1. Clone the repo: `git clone https://github.com/markbattistella/docsify-charty.git` + +1. Create your feature branch: `git checkout -b my-feature` + +1. Commit your changes: `git commit -am 'Add some feature'` + +1. `Push` to the branch: `git push origin my-new-feature` + +1. Submit the `pull` request diff --git a/public/js/plugins/chat.js b/public/js/plugins/chat.js @@ -0,0 +1,582 @@ +// src/styles/index.scss +var styles_default = `@media screen and (max-width: 768px) { + .controls { + display: none !important; + } +} +.chat-panel { + position: relative; + border-radius: 0.5rem; + margin: 1rem auto; + background-color: rgb(246, 248, 250); + overflow: hidden; +} +.chat-panel button { + border: 0; + background: none; + margin: 0; + padding: 0; + display: flex; + align-items: center; + justify-content: center; +} +.chat-panel .title-bar { + text-align: center; +} +.chat-panel .title-bar.mac { + display: flex; + justify-content: center; + padding: 0.9rem 1rem; + width: 100%; +} +.chat-panel .title-bar.mac .title { + font-weight: 500; + font-size: 0.9rem; + line-height: 0.9rem; + letter-spacing: 0.5px; +} +.chat-panel .title-bar.mac .controls { + position: absolute; + top: 1rem; + left: 1rem; + display: grid; + gap: 0.6rem; + grid-template-columns: repeat(3, 0.8rem); +} +.chat-panel .title-bar.mac .controls svg { + opacity: 0; +} +.chat-panel .title-bar.mac .controls:hover button { + transform: scale(1.2); +} +.chat-panel .title-bar.mac .controls:hover svg { + opacity: 1; +} +.chat-panel .title-bar.mac .controls .close { + --bg-color: #ff5f56; + --border-color: #e0443e; +} +.chat-panel .title-bar.mac .controls .stretch { + --bg-color: #27c93f; + --border-color: #1aab29; +} +.chat-panel .title-bar.mac .controls .stretch svg { + transform: rotate(90deg); +} +.chat-panel .title-bar.mac .controls .minimize { + --bg-color: #ffbd2e; + --border-color: #dea123; +} +.chat-panel .title-bar.mac .controls .circle { + width: 0.8rem; + height: 0.8rem; + border-radius: 50%; + background-color: var(--bg-color); + box-shadow: 0 0 0 0.5px var(--border-color); + transition: transform 0.1s ease-in; +} +.chat-panel .title-bar.windows { + display: flex; + flex-shrink: 0; + width: 100%; + height: 28px; + align-items: center; + justify-content: center; + position: relative; + border-radius: 6px 6px 0 0; +} +.chat-panel .title-bar.windows .title { + font-size: 0.8rem; +} +.chat-panel .title-bar.windows .controls { + height: 100%; + position: absolute; + right: 0; + display: flex; + align-items: center; +} +.chat-panel .title-bar.windows .controls svg { + width: 12px; + height: 100%; +} +.chat-panel .title-bar.windows .controls button { + height: 100%; + padding: 0 18px; + transition: all ease-in-out 60ms; +} +.chat-panel .title-bar.windows .controls button:hover { + background: rgba(136, 136, 136, 0.2); +} +.chat-panel .title-bar.windows .controls button[class=close]:hover { + background: rgba(255, 0, 0, 0.8); +} +.chat-panel .title-bar.windows .controls button[class=close]:hover svg { + filter: invert(1); +} +.chat-panel .main-area { + width: 100%; + min-height: auto; +} +.chat-panel .main-area .chat-message { + display: flex; + position: relative; + padding: 1rem; + opacity: 0; + transform: translate(-10%); + transition: transform 0.4s ease-out, opacity 0.4s ease-in; +} +.chat-panel .main-area .chat-message.self { + transform: translate(10%); + justify-content: flex-end; +} +.chat-panel .main-area .chat-message.self .message-box { + margin-left: 0; + margin-right: 0.5rem; +} +.chat-panel .main-area .chat-message.self .nickname { + text-align: right; +} +.chat-panel .main-area .chat-message.show { + opacity: 1; + transform: translate(0); +} +.chat-panel .main-area .chat-message .avatar { + width: 2.5rem; + height: 2.5rem; + overflow: hidden; + flex-shrink: 0; + border-radius: 50%; + line-height: 2.5rem; + color: #fff; + text-align: center; +} +.chat-panel .main-area .chat-message .avatar img { + display: inline-flex; + line-height: 0; + justify-content: center; + align-items: center; + color: #fff; +} +.chat-panel .main-area .chat-message .message-box { + display: inline-block; + margin-left: 0.5rem; + max-width: 90%; + vertical-align: top; +} +.chat-panel .main-area .chat-message .message-box .nickname { + font-size: 0.8rem; + color: gray; +} +.chat-panel .main-area .chat-message .message-box .message { + position: relative; + width: fit-content; + font-size: 0.9rem; + border-radius: 0.5rem; + background-color: #fff; + word-break: break-all; + padding: 0.6rem 0.7rem; + margin-top: 0.2rem; + box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px; +} +.chat-panel .main-area .chat-message .message-box .message .chat-text { + min-height: 1rem; +} +.chat-panel .main-area .chat-message .message-box .message .chat-image { + display: block; + min-width: 5rem; + border-radius: 0.3rem; + margin-bottom: 0.3rem; +}`; +// package.json +var version = "1.0.2"; + +// src/util.ts +function stringToColor(string) { + let hash = 0; + let color = "#"; + for (let i = 0;i < string.length; i++) { + hash = string.charCodeAt(i) + ((hash << 5) - hash); + } + for (let i = 0;i < 3; i++) { + const value = hash >> i * 8 & 255; + color += ("00" + value.toString(16)).substr(-2); + } + return color; +} + +// src/icons/mac/close.svg +var close_default = `<svg width="7" height="7" fill="none" xmlns="http://www.w3.org/2000/svg">\r + <path stroke="#000" stroke-width="1.2" stroke-linecap="round" d="M1.182 5.99L5.99 1.182m0 4.95L1.182 1.323" />\r +</svg>`; + +// src/icons/mac/minimize.svg +var minimize_default = `<svg width="6" height="1" fill="none" xmlns="http://www.w3.org/2000/svg">\r + <path stroke="#000" stroke-width="2" stroke-linecap="round" d="M.61.703h5.8" />\r +</svg>`; + +// src/icons/mac/stretch.svg +var stretch_default = `<svg viewBox="0 0 13 13" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2">\r + <path d="M4.871 3.553L9.37 8.098V3.553H4.871zm3.134 5.769L3.506 4.777v4.545h4.499z" />\r + <circle cx="6.438" cy="6.438" r="6.438" fill="none" />\r +</svg>`; + +// src/icons/windows/close.svg +var close_default2 = `<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="512.000000pt" height="512.000000pt" viewBox="0 0 512.000000 512.000000" preserveAspectRatio="xMidYMid meet">\r + <g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)" fill="#000000" stroke="none">\r + <path d="M900 4272 c-46 -23 -75 -79 -65 -130 6 -33 98 -129 778 -809 l772 -773 -772 -772 c-849 -851 -807 -802 -767 -885 25 -51 77 -78 129 -69 36 7 110 78 813 779 l772 772 773 -772 c702 -701 776 -772 812 -779 52 -9 104 18 129 69 40 83 82 34 -767 885 l-772 772 772 773 c680 680 772 776 778 809 15 82 -61 158 -143 143 -33 -6 -129 -98 -810 -778 l-772 -772 -768 767 c-428 428 -779 772 -795 777 -39 15 -56 14 -97 -7z" />\r + </g>\r +</svg>`; + +// src/icons/windows/minimize.svg +var minimize_default2 = `<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="512.000000pt" height="512.000000pt" viewBox="0 0 512.000000 512.000000" preserveAspectRatio="xMidYMid meet">\r + <g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)" fill="#000000" stroke="none">\r + <path d="M724 2751 c-105 -64 -109 -209 -8 -272 l39 -24 1805 0 1805 0 35 22 c101 63 104 194 6 267 l-27 21 -1812 3 c-1761 2 -1813 1 -1843 -17z" />\r + </g>\r +</svg>`; + +// src/icons/windows/stretch.svg +var stretch_default2 = `<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="512.000000pt" height="512.000000pt" viewBox="0 0 512.000000 512.000000" preserveAspectRatio="xMidYMid meet">\r + <g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)" fill="#000000" stroke="none">\r + <path d="M1100 4464 c-218 -47 -399 -229 -445 -449 -22 -105 -22 -2805 0 -2910 47 -222 228 -403 450 -450 105 -22 2805 -22 2910 0 222 47 403 228 450 450 22 105 22 2805 0 2910 -47 222 -228 403 -450 450 -102 21 -2815 21 -2915 -1z m2870 -315 c58 -18 130 -78 159 -134 l26 -50 3 -1385 c2 -1001 0 -1396 -9 -1426 -16 -60 -76 -133 -134 -163 l-50 -26 -1405 0 -1405 0 -50 26 c-58 30 -118 103 -134 163 -9 30 -11 425 -9 1426 l3 1385 26 50 c28 53 100 116 153 133 46 15 2776 16 2826 1z" />\r + </g>\r +</svg>`; + +// node_modules/hanno/lib/index.js +var voidElements = [ + "area", + "base", + "br", + "col", + "embed", + "hr", + "img", + "input", + "link", + "meta", + "param", + "source", + "track", + "wbr" +]; +function isVoidElement(tag) { + return voidElements.includes(tag); +} +function camelToKebab(value) { + return value.replace(/([A-Z])/g, "-$1").toLowerCase(); +} +function serialize(children) { + switch (true) { + case typeof children === "number": + return String(children); + case !children: + case typeof children === "boolean": + return ""; + case Array.isArray(children): + return children.map(serialize).join(""); + default: + return String(children); + } +} +function parseAttribute(name, value) { + switch (true) { + case typeof value === "boolean": + value = ""; + break; + case (name === "style" && value && typeof value === "object"): + value = Object.entries(value).map(([k, v]) => `${camelToKebab(k)}: ${v}`).join("; "); + break; + case (name === "class" && Array.isArray(value)): + value = value.join(" "); + break; + case (name === "class" && value && typeof value === "object"): + value = Object.entries(value).filter(([, v]) => v).map(([k]) => k).join(" "); + break; + default: + value = String(value); + break; + } + return `${name}="${value}"`; +} +function Fragment(props) { + return Array.isArray(props.children) ? props.children.join("") : props.children; +} +function h(type, props) { + if (typeof type === "function") { + return type({ ...props }); + } + const { children = "", dangerouslySetInnerHTML, ...attrProps } = props; + const attributes = Object.entries(attrProps).map((attribute) => parseAttribute(...attribute)).join(" "); + const is_void = isVoidElement(type); + if (is_void) { + return attributes ? `<${type} ${attributes} />` : `<${type} />`; + } + const openingTag = attributes ? `<${type} ${attributes}>` : `<${type}>`; + const closingTag = `</${type}>`; + const textContent = dangerouslySetInnerHTML?.__html ?? serialize(children); + return `${openingTag}${textContent}${closingTag}`; +} +var jsx = h; +var jsxs = h; + +// src/components/index.tsx +function MacControls() { + return /* @__PURE__ */ jsxs(Fragment, { + children: [ + /* @__PURE__ */ jsx("button", { + class: "circle close", + dangerouslySetInnerHTML: { __html: close_default } + }), + /* @__PURE__ */ jsx("button", { + class: "circle minimize", + dangerouslySetInnerHTML: { __html: minimize_default } + }), + /* @__PURE__ */ jsx("button", { + class: "circle stretch", + dangerouslySetInnerHTML: { __html: stretch_default } + }) + ] + }); +} +function WindowsControls() { + return /* @__PURE__ */ jsxs(Fragment, { + children: [ + /* @__PURE__ */ jsx("button", { + class: "minimize", + dangerouslySetInnerHTML: { __html: minimize_default2 } + }), + /* @__PURE__ */ jsx("button", { + class: "stretch", + dangerouslySetInnerHTML: { __html: stretch_default2 } + }), + /* @__PURE__ */ jsx("button", { + class: "close", + dangerouslySetInnerHTML: { __html: close_default2 } + }) + ] + }); +} +function Controls() { + const os = window.$docsify?.chat?.os; + switch (os) { + case "mac": + return /* @__PURE__ */ jsx(MacControls, {}); + case "windows": + return /* @__PURE__ */ jsx(WindowsControls, {}); + default: + console.error(`os "${os}" is invalid argument`); + } +} +function TitleBar(props) { + const os = window.$docsify?.chat?.os; + return /* @__PURE__ */ jsxs("header", { + class: ["title-bar", os], + children: [ + /* @__PURE__ */ jsx("div", { + class: "controls", + children: /* @__PURE__ */ jsx(Controls, {}) + }), + /* @__PURE__ */ jsx("span", { + class: "title", + children: props.title + }) + ] + }); +} +function Avatar(props) { + const { avatar, nickname } = props.user; + if (avatar) { + return /* @__PURE__ */ jsx("div", { + class: avatar, + children: /* @__PURE__ */ jsx("img", { + src: avatar + }) + }); + } else { + const color = stringToColor(nickname); + const first_char = nickname.substring(0, 1); + return /* @__PURE__ */ jsx("div", { + class: "avatar", + style: { + backgroundColor: color + }, + children: /* @__PURE__ */ jsx("span", { + children: first_char + }) + }); + } +} +function Message(props) { + const { user, content, self } = props; + return /* @__PURE__ */ jsxs("div", { + class: { "chat-message": true, self }, + children: [ + !self && /* @__PURE__ */ jsx(Avatar, { + user + }), + /* @__PURE__ */ jsxs("div", { + class: "message-box", + children: [ + /* @__PURE__ */ jsx("div", { + class: "nickname", + children: user.nickname + }), + /* @__PURE__ */ jsx("div", { + class: "message", + children: content + }) + ] + }), + self && /* @__PURE__ */ jsx(Avatar, { + user + }) + ] + }); +} + +// src/index.tsx +var styleElement = document.createElement("style"); +styleElement.textContent = styles_default; +document.head.appendChild(styleElement); +var IS_MAC = /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform); +var CHAT_PANEL_MARKUP = /( *)(<!-+\s+chat:\s*?start\s+-+>)(?:(?!(<!-+\s+chat:\s*?(?:start|end)\s+-+>))[\s\S])*(<!-+\s+chat:\s*?end\s+-+>)/; +var CHAT_TITLE_MARKUP = /[\r\n]*(\s*)<!-+\s+title:\s*(.*)\s+-+>/; +var CHAT_SELF_MARKUP = /[\r\n]*(\s*)<!-+\s+self:\s*(.*)\s+-+>/; +var CHAT_MESSAGE_MARKUP = /[\r\n]*(\s*)#{1,6}\s*[*_]{2}\s*(.*[^\s])\s*[*_]{2}[\r\n]+([\s\S]*?)(?=#{1,6}\s*[*_]{2}|<!-+\s+chat:\s*?end\s+-+>)/m; +var setting = { + animation: 50, + myself: null, + self: null, + os: IS_MAC ? "mac" : "windows", + title: "Dialog", + users: [], + version +}; +function parseContent(markdown) { + const regex = /!\[(.*?)\]\((.*?)\)/; + const segments = markdown.trim().split(` +`); + const content = segments.map((segment) => { + const is_image = regex.test(segment); + if (is_image) { + const image = '<img class="chat-image" src="$2" alt="$1" />'; + return segment.replace(regex, image); + } else { + const text = `<div class="chat-text">${segment}</div>`; + return segment.replace(segment, text); + } + }); + return content.join(""); +} +function renderChat(content, vm) { + let chatExecs; + let messageExecs; + while (chatExecs = CHAT_PANEL_MARKUP.exec(content)) { + let raw_chat = chatExecs[0]; + let title = setting.title; + let self = setting.self || setting.myself; + let chat_start_replacement = ""; + let chat_end_replacement = ""; + const has_title = CHAT_TITLE_MARKUP.test(raw_chat); + const has_self = CHAT_SELF_MARKUP.test(raw_chat); + const has_message = CHAT_MESSAGE_MARKUP.test(raw_chat); + if (has_title) { + const titleExecs = CHAT_TITLE_MARKUP.exec(raw_chat); + title = titleExecs[2]; + raw_chat = raw_chat.replace(CHAT_TITLE_MARKUP, ""); + } + const chat_title_bar = /* @__PURE__ */ jsx(TitleBar, { + title + }); + if (has_self) { + const selfExecs = CHAT_SELF_MARKUP.exec(raw_chat); + self = selfExecs[2]; + raw_chat = raw_chat.replace(CHAT_SELF_MARKUP, ""); + } + if (has_message) { + chat_start_replacement = `<section class="${"chat-panel" /* ChatPanel */}">${chat_title_bar}<main class="main-area">`; + chat_end_replacement = `</main></section>`; + while (messageExecs = CHAT_MESSAGE_MARKUP.exec(raw_chat)) { + const nickname = messageExecs[2]; + const content2 = parseContent(messageExecs[3]); + const user = setting.users.find((item) => item.nickname === nickname) ?? { + nickname + }; + const is_me = self === nickname; + raw_chat = raw_chat.replace(messageExecs[0], /* @__PURE__ */ jsx(Message, { + user, + content: content2, + self: is_me + })); + } + } + const chat_start = chatExecs[2]; + const chat_end = chatExecs[4]; + raw_chat = raw_chat.replace(chat_start, chat_start_replacement); + raw_chat = raw_chat.replace(chat_end, chat_end_replacement); + raw_chat = raw_chat.replace(/(\s{2,}|\n)/g, ""); + content = content.replace(chatExecs[0], raw_chat); + } + return content; +} +function createResizeObserver() { + return new ResizeObserver((entries) => { + entries.forEach((entry) => { + const { target } = entry; + const { offsetWidth } = target; + const chatImageElements = target.getElementsByClassName("chat-image" /* ChatImage */); + for (let i = 0;i < chatImageElements.length; i++) { + const element = chatImageElements[i]; + element.style.maxWidth = `calc((${offsetWidth}px - 5rem) / 2)`; + } + }); + }); +} +function createIntersectionObserver() { + return new IntersectionObserver((entries) => { + entries.forEach((entry) => { + const { target, isIntersecting } = entry; + const chatMessageElements = target.getElementsByClassName("chat-message" /* ChatMessage */); + for (let i = 0;i < chatMessageElements.length; i++) { + const element = chatMessageElements[i]; + if (isIntersecting) { + setTimeout(() => element.classList.add("show"), i * setting.animation); + } else { + element.classList.remove("show"); + } + } + }); + }); +} +function docsifyChat(hook, vm) { + let has_chat; + const resizeObserver = createResizeObserver(); + const intersectionObserver = createIntersectionObserver(); + hook.beforeEach((content) => { + has_chat = CHAT_PANEL_MARKUP.test(content); + if (has_chat) { + content = renderChat(content, vm); + } + return content; + }); + hook.doneEach(() => { + if (setting.myself) { + console.warn('The "myself" attribute is about to be abandoned, it is recommended to replace it with "self".'); + } + resizeObserver.disconnect(); + intersectionObserver.disconnect(); + if (!has_chat) { + return; + } + const chatPanelElements = document.getElementsByClassName("chat-panel" /* ChatPanel */); + for (let i = 0;i < chatPanelElements.length; i++) { + const element = chatPanelElements[i]; + resizeObserver.observe(element); + intersectionObserver.observe(element); + } + }); +} +window.$docsify ??= {}; +window.$docsify.chat ??= {}; +window.$docsify.plugins ??= []; +window.$docsify.plugins.push(docsifyChat); +Object.assign(setting, window.$docsify.chat); diff --git a/public/js/plugins/chat.md b/public/js/plugins/chat.md @@ -0,0 +1,239 @@ +# docsify-chat + +A docsify plugin for generate chat panel from markdown + +Read this in other languages: English | [简体中文](./README.zh.md) + +```markdown +<!-- chat:start --> + +#### **Yuki** + +Hello + +#### **Robot** + +Ciallo ~(∠·ω< )⌒★ + +<!-- chat:end --> +``` + +![docsify_chat](https://cdn.sa.net/2024/12/09/cI9ewyEFLNG6roZ.png) + +## Installation + +1. Add the docsify-chat plugin to your `index.html` after docsify. + + ```html + <!-- Docsify --> + <script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script> + + <!-- Docsify Chat --> + <script src="//cdn.jsdelivr.net/npm/docsify-chat/lib/docsify-chat.min.js"></script> + ``` + +2. Review the [Options](#options) section and configure as needed. + + ```javascript + window.$docsify = { + // ... + chat: { + // chat panel title + title: "Dialog", + // set avatar url + users: [ + { nickname: "Yuki", avatar: "" }, + { nickname: "Robot", avatar: "" }, + ], + }, + }; + ``` + +## Usage + +1. Define a chat set using `chat:start` and `chat:end` HTML comments. + + HTML comments are used to mark the start and end of a chat set. + + ```markdown + <!-- chat:start --> + + ... + + <!-- chat:end --> + ``` + +2. Define chat within a message set using heading + bold markdown. + + Heading text will be used as the user nickname, and all proceeding content will be associated with that chat up to start of the next message or a `chat:end` comment. + + ```markdown + <!-- chat:start --> + + #### **Yuki** + + hello + + #### **Robot** + + hello world + + <!-- chat:end --> + ``` + +3. Generate and display your chat panel. + + If you do not specify a user avatar, the initials of the nickname will be displayed by default. + + ![example](/example.svg) + +## Options + +Options are set within the [`window.$docsify`](https://docsify.js.org/#/configuration) configuration under the `chat` key: + +```html +<script> + window.$docsify = { + // ... + chat: { + // chat panel title + title: "Robot's chat history", + // set avatars + users: [], + // message dialog on the right (myself) + self: "Yuki", + // animation interval (ms) + animation: 50, + // Panel navigation bar style, supporting "mac" and "windows" + os: "mac", + }, + }; +</script> +``` + +### title + +- Type: `string` +- Default: `'Dialog'` + +Sets the chat panel title. + +You can also set the title for each chat panel individually in `<!-- title:xxx -->`. + +**Configuration** + +```javascript +window.$docsify = { + // ... + chat: { + title: 'chat history', + }, +}; +``` + +**Example** + +```markdown +<!-- chat:start --> + +<!-- title:Robot's chat history --> + +<!-- chat:end --> +``` + +### users + +- Type: `array` +- Default: `[]` + +Specify a nickname to match the user's avatar, support network URL. + +**Configuration** + +```javascript +window.$docsify = { + // ... + chat: { + users: [ + { nickname: 'Yuki', avatar: 'images/yuki.png' }, + { nickname: 'Robot', avatar: 'images/robot.png' }, + ], + }, +}; +``` + +### self + +> Before v0.5.0, this attribute was named `"myself"`, but it has now been renamed 'self'. + +- Type: `string` +- Default: `null` + +Set your own global nickname, the dialog will be displayed on the right side of the chat panel. + +You can also set the user for each chat panel individually in `<!-- self:xxx -->`. + +**Configuration** + +```javascript +window.$docsify = { + // ... + chat: { + self: 'Yuki', + }, +}; +``` + +**Example** + +```markdown +<!-- chat:start --> + +<!-- self:Robot --> + +<!-- chat:end --> +``` + +### animation + +- Type: `number` +- Default: `50` + +Adjust the duration of the chat panel fade-in and fade-out animation. + +**Configuration** + +```javascript +window.$docsify = { + // ... + chat: { + animation: 50, + }, +}; +``` + +### os + +- Type: `string` +- Default: `null` + +Define the system style of the title bar, support `"mac"` and `"windows"`. + +If it is not set, it will be based on the current browser `navigator Platform` Automatic rendering. + +**Configuration** + +```javascript +window.$docsify = { + // ... + chat: { + os: 'mac', + }, +}; +``` + +## Postscript + +Because I wrote a chatbot framework, I needed a chat panel for illustrate. before I took screenshots directly in the software, but it felt too troublesome. I was thinking why can't it be generated directly with markdown? I've been looking for a long time, but I can't find any similar plugins, so I made one myself. + +In order to save time, the syntax refers to [docsify-tabs](https://github.com/jhildenbiddle/docsify-tabs), which took only half a day to make. Although it basically meets daily use, there may be some unknown bugs. diff --git a/public/js/plugins/copy-code.js b/public/js/plugins/copy-code.js @@ -0,0 +1,8 @@ +/*! + * docsify-copy-code + * v2.1.1 + * https://github.com/jperasmus/docsify-copy-code + * (c) 2017-2020 JP Erasmus <jperasmus11@gmail.com> + * MIT license + */ +!function(){"use strict";function s(o){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(o)}!function(o,e){void 0===e&&(e={});var t=e.insertAt;if(o&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css","top"===t&&n.firstChild?n.insertBefore(c,n.firstChild):n.appendChild(c),c.styleSheet?c.styleSheet.cssText=o:c.appendChild(document.createTextNode(o))}}(".docsify-copy-code-button,.docsify-copy-code-button span{cursor:pointer;transition:all .25s ease}.docsify-copy-code-button{position:absolute;z-index:1;top:0;right:0;overflow:visible;padding:.65em .8em;border:0;border-radius:0;outline:0;font-size:1em;background:grey;background:var(--theme-color,grey);color:#fff;opacity:0}.docsify-copy-code-button span{border-radius:3px;background:inherit;pointer-events:none}.docsify-copy-code-button .error,.docsify-copy-code-button .success{position:absolute;z-index:-100;top:50%;right:0;padding:.5em .65em;font-size:.825em;opacity:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.docsify-copy-code-button.error .error,.docsify-copy-code-button.success .success{right:100%;opacity:1;-webkit-transform:translate(-115%,-50%);transform:translate(-115%,-50%)}.docsify-copy-code-button:focus,pre:hover .docsify-copy-code-button{opacity:1}"),document.querySelector('link[href*="docsify-copy-code"]')&&console.warn("[Deprecation] Link to external docsify-copy-code stylesheet is no longer necessary."),window.DocsifyCopyCodePlugin={init:function(){return function(o,e){o.ready(function(){console.warn("[Deprecation] Manually initializing docsify-copy-code using window.DocsifyCopyCodePlugin.init() is no longer necessary.")})}}},window.$docsify=window.$docsify||{},window.$docsify.plugins=[function(o,r){o.doneEach(function(){var o=Array.apply(null,document.querySelectorAll("pre[data-lang]")),c={buttonText:"Copy to clipboard",errorText:"Error",successText:"Copied"};r.config.copyCode&&Object.keys(c).forEach(function(t){var n=r.config.copyCode[t];"string"==typeof n?c[t]=n:"object"===s(n)&&Object.keys(n).some(function(o){var e=-1<location.href.indexOf(o);return c[t]=e?n[o]:c[t],e})});var e=['<button class="docsify-copy-code-button">','<span class="label">'.concat(c.buttonText,"</span>"),'<span class="error">'.concat(c.errorText,"</span>"),'<span class="success">'.concat(c.successText,"</span>"),"</button>"].join("");o.forEach(function(o){o.insertAdjacentHTML("beforeend",e)})}),o.mounted(function(){document.querySelector(".content").addEventListener("click",function(o){if(o.target.classList.contains("docsify-copy-code-button")){var e="BUTTON"===o.target.tagName?o.target:o.target.parentNode,t=document.createRange(),n=e.parentNode.querySelector("code"),c=window.getSelection();t.selectNode(n),c.removeAllRanges(),c.addRange(t);try{document.execCommand("copy")&&(e.classList.add("success"),setTimeout(function(){e.classList.remove("success")},1e3))}catch(o){console.error("docsify-copy-code: ".concat(o)),e.classList.add("error"),setTimeout(function(){e.classList.remove("error")},1e3)}"function"==typeof(c=window.getSelection()).removeRange?c.removeRange(t):"function"==typeof c.removeAllRanges&&c.removeAllRanges()}})})}].concat(window.$docsify.plugins||[])}(); diff --git a/public/js/plugins/copy-code.md b/public/js/plugins/copy-code.md @@ -0,0 +1,83 @@ +# docsify-copy-code + +[![NPM](https://img.shields.io/npm/v/docsify-copy-code.svg?style=flat-square)](https://www.npmjs.com/package/docsify-copy-code) +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://github.com/jhildenbiddle/docsify-copy-code/blob/master/LICENSE) + +A [docsify](https://docsify.js.org) plugin that adds a button to easily copy code blocks to your clipboard. + +## Installation + +### Production + +Add following script tag to your `index.html` after docsify. Specifying the `@[version]` in the URL ensures that the release of a major update (v3.x) will not break your production site: + +```html +<!-- Latest v2.x.x --> +<script src="https://unpkg.com/docsify-copy-code@2"></script> +``` + +### Development + +If you prefer to load the latest version of the library, you may do so by omitting the `@[version]` from the above URL. + +```html +<!-- Latest (not recommended for production) --> +<script src="https://unpkg.com/docsify-copy-code"></script> +``` + +## Usage + +Create a markdown code block with help of triple backticks at the beginning and end of your code. This block will have a copy button on the top right when hovering over it. + +## Options + +### Button text + +Button text can be customized as follows: + +```javascript +window.$docsify = { + // docsify-copy-code (defaults) + copyCode: { + buttonText: 'Copy to clipboard', + errorText: 'Error', + successText: 'Copied', + }, +}; +``` + +### Localization (l10n) + +Button text can also be customized based on the current URL. Object key/value pairs are processed in the order provided. + +```javascript +window.$docsify = { + copyCode: { + buttonText: { + '/zh-cn/': '点击复制', + '/ru/': 'Скопировать в буфер обмена', + '/de-de/': 'Klicken Sie zum Kopieren', + '/es/': 'Haga clic para copiar', + '/': 'Copy to clipboard', + }, + errorText: { + '/zh-cn/': '错误', + '/ru/': 'ошибка', + '/': 'Error', + }, + successText: { + '/zh-cn/': '复制', + '/ru/': 'Скопировано', + '/de-de/': 'Kopiert', + '/es/': 'Copiado', + '/': 'Copied', + }, + }, +}; +``` + +**Note:** Docsify's [alias](https://docsify.js.org/#/configuration?id=alias) option makes it easy to manage local content using separate directories. See the [`/demo/`](https://github.com/jperasmus/docsify-copy-code/tree/master/demo) content in this repo for an example. + +## License + +This project is licensed under the MIT License. See the [LICENSE](https://github.com/jperasmus/docsify-copy-code/blob/master/LICENSE) for details. diff --git a/public/js/plugins/dark-mode.css b/public/js/plugins/dark-mode.css @@ -0,0 +1,78 @@ +:root { + --text_color: var(--theme-color); + --docsify_dark_mode_bg: white; + --docsify_dark_mode_btn: var(--theme-color); +} +html, +body, +main, +.sidebar-toggle, +.sidebar, +aside { + background: var(--docsify_dark_mode_bg); +} + +#dark_mode > input[type='checkbox'] { + height: 0; + width: 0; + visibility: hidden; +} +#dark_mode > label { + cursor: pointer; + text-indent: -9999px; + width: 55px; + height: 30px; + background: var(--docsify_dark_mode_btn); + margin: 0 auto; + display: flex; + justify-content: center; + align-items: center; + -webkit-border-radius: 100px; + -moz-border-radius: 100px; + border-radius: 100px; + position: relative; +} + +#dark_mode > label:after { + content: ''; + background: #fff; + width: 20px; + height: 20px; + -webkit-border-radius: 50%; + -moz-border-radius: 50%; + border-radius: 50%; + position: absolute; + top: 5px; + left: 4px; + transition: cubic-bezier(0.68, -0.55, 0.27, 1.55) 320ms; +} + +#dark_mode > input:checked + label { + background: var(--docsify_dark_mode_btn); +} + +#dark_mode > input:checked + label:after { + left: calc(100% - 5px); + -webkit-transform: translateX(-100%); + -moz-transform: translateX(-100%); + -ms-transform: translateX(-100%); + -o-transform: translateX(-100%); + transform: translateX(-100%); +} + +html.transition, +html.transition *, +html.transition *:before, +html.transition *:after { + transition: cubic-bezier(0.68, -0.55, 0.27, 1.55) 420ms !important; + transition-delay: 0 !important; +} + +#dark_mode { + position: absolute; + right: 0; + top: 0; +} +p { + color: var(--text_color); +} diff --git a/public/js/plugins/dark-mode.js b/public/js/plugins/dark-mode.js @@ -0,0 +1,78 @@ +const plugin = (hook, vm) => { + var trans = () => { + document.documentElement.classList.add('transition') + window.setTimeout(() => { + document.documentElement.classList.remove('transition') + }, 800) + } + var setColor = ({ background, toggleBtnBg, textColor }) => { + document.documentElement.style.setProperty( + '--docsify_dark_mode_bg', + background + ) + document.documentElement.style.setProperty( + '--docsify_dark_mode_btn', + toggleBtnBg + ) + document.documentElement.style.setProperty('--text_color', textColor) + } + + var theme = { dark: {}, light: {} } + var defaultConfig = { + dark: { + background: '#1c2022', + toggleBtnBg: '#34495e', + textColor: '#b4b4b4' + }, + light: { + background: 'white', + toggleBtnBg: 'var(--theme-color)', + textColor: 'var(--theme-color)' + } + } + + theme = { ...defaultConfig, ...vm.config.darkMode } + + hook.afterEach(function(html, next) { + var darkEl = ` <div id="dark_mode"> + <input class="container_toggle" type="checkbox" id="switch" name="mode" /> + <label for="switch">Toggle</label> + </div>` + html = `${darkEl}${html}` + next(html) + }) + + hook.doneEach(function() { + var currColor + if (localStorage.getItem('DOCSIFY_DARK_MODE')) { + currColor = localStorage.getItem('DOCSIFY_DARK_MODE') + setColor(theme[`${currColor}`]) + } else { + currColor = 'light' + setColor(theme.light) + } + + var checkbox = document.querySelector('input[name=mode]') + + if (!checkbox) { + return + } + + checkbox.addEventListener('change', function() { + // dark + if (currColor === 'light') { + trans() + setColor(theme.dark) + localStorage.setItem('DOCSIFY_DARK_MODE', 'dark') + currColor = 'dark' + } else { + trans() + setColor(theme.light) + localStorage.setItem('DOCSIFY_DARK_MODE', 'light') + currColor = 'light' + } + }) + }) +} + +window.$docsify.plugins = [].concat(plugin, window.$docsify.plugins) diff --git a/public/js/plugins/dark-mode.md b/public/js/plugins/dark-mode.md @@ -0,0 +1,128 @@ +# docsify-dark-mode + +[![JavaScript Style Guide](https://cdn.rawgit.com/standard/standard/master/badge.svg)](https://github.com/standard/standard) +[![jsDelivr hits (/mo)](https://data.jsdelivr.com/v1/package/npm/docsify-dark-mode/badge)](https://www.jsdelivr.com/package/npm/docsify-dark-mode) + +> This is a docsify plugin which enables dark mode for your docsify site + +Table of contents: + +- [docsify-dark-mode](#docsify-dark-mode) + - [Installation](#installation) + - [Configure](#configure) + - [Defaults](#defaults) + - [Remembering the color mode](#remembering-the-color-mode) + - [Screenshots](#screenshots) + - [Contributing](#contributing) + +## Installation + +Add the following stylesheet along with your other stylesheets: + +```html +<link + rel="stylesheet" + href="//cdn.jsdelivr.net/npm/docsify-dark-mode@latest/dist/style.min.css" +/> +``` + +And add the following script: + +```html +<script src="//cdn.jsdelivr.net/npm/docsify-dark-mode@latest/dist/index.min.js"></script> +``` + +**⚠️ by default, the color of the toggle is set to `white`. It may make the switch invisible. If that's your case, simply set the `themeColor` in your configuration to whatever color you like:** + +```js +window.$docsify = { + // your docsify configuration + themeColor: "#42b983" // this is the default 'vue' color +}; +``` + +## Configure + +In your docsify config object add the following + +```js +window.$docsify = { + // ... + darkMode: { + dark: { + background: "", + toggleBtnBg: "", + textColor: "" + }, + light: { + background: "", + toggleBtnBg: "", + textColor: "" + } + } + // ... +}; +``` + +### Defaults + +```js +{ + dark: { + background: "#1c2022", + toggleBtnBg: "#34495e", + textColor: "#b4b4b4" + }, + light: { + background: "white", + toggleBtnBg: "var(--theme-color)", + textColor: "var(--theme-color)" + } +}; +``` + +**That's it, now enjoy 🎉 the dark mode in your docsify site.** + +### Remembering the color mode + +As of `v0.2.0`, this plugin will remember the color mode set. That means that when the browser is closed and then reopened, the color mode will still be set. This is achieved via `localStorage` + +## Screenshots + +The toggle button in light mode. + +![The toggle button in light mode. +](https://imgur.com/z4jhX61.png) + +The toggle button in dark mode. + +![The toggle button in dark mode.](https://imgur.com/aRVEXAG.png) + +A basic docsify page in ligth mode. + +![A basic docsify page in ligth mode.](https://imgur.com/LQtjAXb.png) + +A basic docsify page in dark mode. + +![A basic docsify page in dark mode.](https://imgur.com/OJvTbfQ.png) + +## Contributing + +1. Clone the repo: + ```bash + git clone https://github.com/anikethsaha/docsify-plugin.git + ``` +2. Install the dependencies for this particular project: + ```bash + cd ./packages/docsify-dark-mode/src/ && yarn i + ``` +3. Start editing the code in `packages/docsify-dark-mode/src/`. +4. To build the project, run: + ```bash + yarn run build + ``` + The build steps are: + - Optimize the generated style using `cssnano` and `postcss` + - Build the javascript using `rollup` + - Optimize it using `rollup-plugin-terser` + - Fix the code style with `standard` diff --git a/public/js/plugins/dark-switcher.js b/public/js/plugins/dark-switcher.js diff --git a/public/js/plugins/dark-switcher.md b/public/js/plugins/dark-switcher.md @@ -0,0 +1,60 @@ +> [!CAUTION] +> # This repository has been moved to GitLab with the latest commits not available in this repository. <sup>[?](https://gitlab.com/LIGMATV)</sup> +> https://gitlab.com/LIGMATV/docsify-dark-switcher + +# Docsify Dark Switcher [Preview](https://docsify-dark-switcher.vercel.app/) +Easily switch toggle to light and dark theme for your Docsify, customizable and works in any CSS themes. +*(With a bit enhancement from you)*. + +| Default | Dark | +|:--:|:--:| +| ![Screenshot Capture - 2024-05-19 - 13-06-35](https://github.com/LIGMATV/docsify-dark-switcher/assets/143163098/90db43ce-a63e-4cb7-8edd-b137f11ff95e) | ![Screenshot Capture - 2024-05-19 - 13-07-12](https://github.com/LIGMATV/docsify-dark-switcher/assets/143163098/979526dd-0981-4f29-9eee-0b708ab8e150) | +| Example, try it [here](https://docsify-dark-switcher.vercel.app/) | + +# Install + +```js +<script src="//cdn.jsdelivr.net/gh/LIGMATV/docsify-dark-switcher@latest/docsify-dark-switcher.js"></script> +``` + +> [!NOTE] +> Just to be safe, please use your downloaded version. +> You can download the docsify-dark-switcher.js <a href="https://cdn.jsdelivr.net/gh/LIGMATV/docsify-dark-switcher@latest/docsify-dark-switcher.js" download>here</a>. + +# Configuration + +**Default configuration** +*This configuration not automically exist in the js, add this to ``<style>`` in your ``index.html``. (Except the ``dark-moon-icon`` and ``dark-sun-icon``).* +```css +:root { + --dark-base-background: #222; + --dark-base-color: #bbc0c4; + --dark-theme-color: var(--theme-color, #42b983); + --dark-code-color: var(--dark-color); + --dark-heading-color: var(--dark-theme-color); + --dark-cover-background: #000000a8; + --dark-code-background: #303030; + --dark-tip-background: #2c0000; + --dark-warn-background: #005842; + --dark-icon-size: 25px; + --dark-icon-transition: .1s ease-in-out .1s; + --dark-moon-color: #000000; + --dark-sun-color: #ffffff; + --dark-moon-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' d='M9.598 1.591a.749.749 0 0 1 .785-.175 7.001 7.001 0 1 1-8.967 8.967.75.75 0 0 1 .961-.96 5.5 5.5 0 0 0 7.046-7.046.75.75 0 0 1 .175-.786m1.616 1.945a7 7 0 0 1-7.678 7.678 5.499 5.499 0 1 0 7.678-7.678'/%3E%3C/svg%3E"); + --dark-sun-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' d='M8 12a4 4 0 1 1 0-8a4 4 0 0 1 0 8m0-1.5a2.5 2.5 0 1 0 0-5a2.5 2.5 0 0 0 0 5m5.657-8.157a.75.75 0 0 1 0 1.061l-1.061 1.06a.749.749 0 0 1-1.275-.326a.749.749 0 0 1 .215-.734l1.06-1.06a.75.75 0 0 1 1.06 0Zm-9.193 9.193a.75.75 0 0 1 0 1.06l-1.06 1.061a.75.75 0 1 1-1.061-1.06l1.06-1.061a.75.75 0 0 1 1.061 0M8 0a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0V.75A.75.75 0 0 1 8 0M3 8a.75.75 0 0 1-.75.75H.75a.75.75 0 0 1 0-1.5h1.5A.75.75 0 0 1 3 8m13 0a.75.75 0 0 1-.75.75h-1.5a.75.75 0 0 1 0-1.5h1.5A.75.75 0 0 1 16 8m-8 5a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5A.75.75 0 0 1 8 13m3.536-1.464a.75.75 0 0 1 1.06 0l1.061 1.06a.75.75 0 0 1-1.06 1.061l-1.061-1.06a.75.75 0 0 1 0-1.061M2.343 2.343a.75.75 0 0 1 1.061 0l1.06 1.061a.751.751 0 0 1-.018 1.042a.751.751 0 0 1-1.042.018l-1.06-1.06a.75.75 0 0 1 0-1.06Z'/%3E%3C/svg%3E"); +} +``` + +If you want add the dark mode version from some element, add ``.docsify-dark-mode`` part on your CSS. +Example : ``.docsify-dark-mode element {`` + +# Showcase + +- [LIGMATV](https://ligmatv.is-a.dev/Docs-Docsify/) - Home of my open blogs 📖. + +--- + +Every ⭐ star is expensive. If you can star this repository, you absolutely rich! +✨ *If you using this plugin, consider to add the project in the showcase. So i can see that! :)* + +usually, you done! diff --git a/public/js/plugins/edit-on-github.js b/public/js/plugins/edit-on-github.js @@ -0,0 +1,61 @@ +;(function(win) { + function isFunction(functionToCheck) { + return functionToCheck && {}.toString.call(functionToCheck) === '[object Function]' + } + + win.EditOnGithubPlugin = {} + + function create(docBase, docEditBase, title) { + title = title || 'Edit on GitHub' + docEditBase = docEditBase || docBase.replace(/\/blob\//, '/edit/') + + function editDoc(event, vm) { + var docName = vm.route.file + + if (docName) { + var editLink = docEditBase + docName + window.open(editLink) + event.preventDefault() + return false + } else { + return true + } + } + + win.EditOnGithubPlugin.editDoc = editDoc + + function generateHeader(title) { + return header = [ + '<div style="overflow: auto">', + '<p style="float: right"><a style="text-decoration: underline; cursor: pointer"', + 'onclick="EditOnGithubPlugin.onClick(event)">', + title, + '</a></p>', + '</div>' + ].join('') + } + + return function(hook, vm) { + win.EditOnGithubPlugin.onClick = function(event) { + EditOnGithubPlugin.editDoc(event, vm) + } + + if (isFunction(title)) { + + hook.afterEach(function (html) { + return generateHeader(title(vm.route.file)) + html + }) + } else { + var header = generateHeader(title) + + hook.afterEach(function (html) { + return header + html + }) + } + + + } + } + + win.EditOnGithubPlugin.create = create +}) (window) diff --git a/public/js/plugins/edit-on-github.md b/public/js/plugins/edit-on-github.md @@ -0,0 +1,44 @@ +# docsify-edit-on-github +A plugin for docsify to generate a `edit on github` button on every pages. click the button to open corresponding `md` editing page on github. + +```html +<script src="//cdn.jsdelivr.net/npm/docsify-edit-on-github"></script> +``` + +```html +<script> + window.$docsify = { + // your config + // ... + plugins: [ + EditOnGithubPlugin.create(docBase, docEditBase, title) + ] + } +</script> +``` + +* `docBase`: [String] the document folder of your github project (e.g.: https://github.com/docsifyjs/docsify/blob/master/docs/) +* `docEditBase`: [String] edit link of your github pages, by default, this is set automatically according to `docBase` +* `title`: [String | Function] the text of the button, default value: `Edit on github`. If passed as function, then the title can be customized according to file path. for example: + ``` + EditOnGithubPlugin.create( + 'https://github.com/docsifyjs/docsify/blob/master/docs/', + null, + function(file) { + if (file.indexOf('en') === -1) { + return '编辑' + } else { + return 'edit on git' + } + } + ) + ``` + ``` + EditOnGithubPlugin.create( + 'https://github.com/njleonzhang/vue-data-tables/blob/master/docs/' + ), + ``` + +[Code example](https://github.com/njleonzhang/vue-data-tables/blob/6bb632419506a14ceff559708180883097d5afa2/docs/index.html#L179-L181) + +[Result example](https://www.njleonzhang.com/vue-data-tables/#/en-us/basic) diff --git a/public/js/plugins/fontsize-darkmode.css b/public/js/plugins/fontsize-darkmode.css @@ -0,0 +1,51 @@ +:root { + --dark-base-background: #222; + --dark-base-color: #bbc0c4; + --dark-theme-color: #42b983; + --dark-heading-color: var(--dark-theme-color); + --dark-cover-background: #000000a8; + --dark-code-color: rgba(213, 213, 213, 0.68); + --dark-code-background: rgba(42, 41, 41, 0.47); + --dark-tip-background: #2c0000; + --dark-warn-background: #005842; + --dark-icon-size: 25px; + --dark-icon-transition: .1s ease-in-out .1s; + --dark-moon-color: #000000; + --dark-sun-color: #ffffff; +} + +/*更改切换按钮的位置跟紫薯统计错开*/ +button[onclick="docsifyDarkSwitcher()"] { + position: fixed; + left: 10px; + } + +/*更改左下角菜单按钮防止跟深色模式冲突*/ +.docsify-dark-mode .sidebar-toggle span{ + background-color: #80eddd !important; +} +.docsify-dark-mode .sidebar-toggle { + background: transparent !important; +} + +/*图片亮度*/ +.docsify-dark-mode .medium-zoom-image{ + filter: brightness(0.8); +} + +/*搜索栏适配夜间模式*/ +.docsify-dark-mode .search a { + color: rgba(255, 255, 255, 0.65); +} + +.docsify-dark-mode .search a:hover{ + color: #ffffff !important; + .search-keyword { + color: rgba(99, 246, 111, 0.78); + } +} + +.docsify-dark-mode .search .search-keyword { + color: rgba(70, 185, 66, 0.55); +} + diff --git a/public/js/plugins/fontsize.js b/public/js/plugins/fontsize.js @@ -0,0 +1,164 @@ +function adjustFontSize(action) { + const markdownSection = document.querySelector('.markdown-section#main'); + let currentSize = parseFloat(window.getComputedStyle(markdownSection).fontSize); + + if (action === 'increase') { + currentSize += 1; + } else if (action === 'decrease') { + currentSize -= 1; + } + + markdownSection.style.setProperty('--font-size', `${currentSize}px`); + updateFontSizeDisplay(currentSize); + localStorage.setItem('font-size', currentSize); +} + +function applyInitialStyles() { + const savedSize = localStorage.getItem('font-size'); + if (savedSize) { + const markdownSection = document.querySelector('.markdown-section#main'); + markdownSection.style.setProperty('--font-size', `${savedSize}px`); + } +} + +function updateFontSizeDisplay(fontSize) { + const fontSizeDisplay = document.querySelector('.font-size-display'); + const lang = document.documentElement.lang; + if (fontSizeDisplay) { + if (lang === 'zh') { + fontSizeDisplay.textContent = `当前字体大小: ${fontSize}px`; + } else { + fontSizeDisplay.textContent = `Font size: ${fontSize}px`; + } + } +} + +document.addEventListener('DOMContentLoaded', applyInitialStyles); + +function styleInject(css, ref) { + if (ref === void 0) ref = {}; + var insertAt = ref.insertAt; + + if (!css || typeof document === 'undefined') { + return; + } + + var head = document.head || document.getElementsByTagName('head')[0]; + var style = document.createElement('style'); + style.type = 'text/css'; + + if (insertAt === 'top') { + if (head.firstChild) { + head.insertBefore(style, head.firstChild); + } else { + head.appendChild(style); + } + } else { + head.appendChild(style); + } + + if (style.styleSheet) { + style.styleSheet.cssText = css; + } else { + style.appendChild(document.createTextNode(css)); + } +} + +var css = ` +.markdown-section { + --font-size: 15px; + font-size: var(--font-size); +} + +.markdown-section code { + font-size: calc(var(--font-size) - 2px) !important; +} + +.markdown-section ol, .markdown-section p, .markdown-section ul { + line-height: calc(var(--font-size) * 2); +} + +.markdown-section h1 { + font-size: calc(var(--font-size) * 2.3); +} + +.markdown-section h2 { + font-size: calc(var(--font-size) * 2.1); +} + +.markdown-section h3 { + font-size: calc(var(--font-size) * 1.8); +} + +.markdown-section h4 { + font-size: calc(var(--font-size) * 1.5); +} + +.markdown-section h5 { + font-size: calc(var(--font-size) * 1.3); +} + +.markdown-section h6 { + font-size: calc(var(--font-size) * 1.1); +} + +button.font-size-button { + position: absolute; + top: 15px; + left: 55px; + padding: 6px; + background: transparent; + cursor: pointer; + z-index: 1000; + font-size: 16px; + border: none; + border-radius: 5px; +} + +button.font-size-button[onclick="adjustFontSize('decrease')"] { + left: 100px; +} + +.docsify-dark-mode button.font-size-button { + color: var(--dark-base-color); +} + +.font-size-display { + position: absolute; + top: 17px; + left: 139px; + background: transparent; + font-size: 16px !important; + z-index: 1000; + color: #333; +} + +@media (max-width: 768px) { + .font-size-display { + top: 40px; + left:10px; + } +} + +.docsify-dark-mode .font-size-display{ + color: var(--dark-base-color); +} +`; + +styleInject(css); + +function install(hook, vm) { + hook.afterEach(function (html) { + const savedSize = localStorage.getItem('font-size') || 15; + const lang = document.documentElement.lang; + const fontSizeText = lang === 'zh' ? `当前字体大小: ${savedSize}px` : `Font size: ${savedSize}px`; + var fontSizeButtons = ` + <button onclick="adjustFontSize('increase')" class="font-size-button" aria-label="Increase font size" title="Increase font size">A+</button> + <button onclick="adjustFontSize('decrease')" class="font-size-button" aria-label="Decrease font size" title="Decrease font size">A-</button> + <div class="font-size-display">${fontSizeText}</div> + `; + return fontSizeButtons + html; + }); +} + +$docsify.plugins = [].concat(install, $docsify.plugins); diff --git a/public/js/plugins/fontsize.md b/public/js/plugins/fontsize.md @@ -0,0 +1,29 @@ +English | [简体中文](./readme_cn.md) +# Description +A plugin for [docsify](https://github.com/docsifyjs/docsify) + +Create two buttons in the top left corner that allow users to customize the font size +![img.png](img/img.png) + +[example](https://techmc.wiki/#/) + +# Install +`<script src="//cdn.jsdelivr.net/gh/SDU-Little-River/docsify-fontsize@latest/fontsize.js"></script>` + +# NightModeCompatible + +Compatible with the [docsify-dark-switcher plugin](https://github.com/LIGMATV/docsify-dark-switcher), if you want to use the following styles, please import the darkmode.css in the repository + +`<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/SDU-Little-River/docsify-fontsize@latest/darkmode.css">` + + +| light | dark | +|--------------------|--------------------| +| ![](img/img_4.png) | ![](img/img_5.png) | + +## compatibilityFix +Fix a bug,The [docsify-dark-switcher](https:github.comLIGMATVdocsify-dark-switcher) plugin was not compatible with night mode + +| origin | fixed | +|--------------------|--------------------| +| ![](img/img_6.png) | ![](img/img_7.png) | diff --git a/public/js/plugins/footer-enh.js b/public/js/plugins/footer-enh.js @@ -0,0 +1,24 @@ +// if (!window.$docsify) { +// window.$docsify = {} +// } +window.$docsify = window.$docsify || {}; +window.$docsify.plugins = (window.$docsify.plugins || []).concat(install); + +function install(hook, vm) { + let userOptions = vm.config.footer; + + let copy = vm.config.footer && vm.config.footer.copy ? vm.config.footer.copy : '<span>&copy; 2019.</span>'; + let auth = + vm.config.footer && vm.config.footer.auth + ? vm.config.footer.auth + : '<span>Published with <a href="https://github.com/docsifyjs/docsify" target="_blank" rel="noreferrer" rel="noopener">docsify</a>.</span>'; + let style = vm.config.footer && vm.config.footer.style ? `style="${vm.config.footer.style}"` : ''; + let clazz = vm.config.footer && vm.config.footer.class ? `class="${vm.config.footer.class}"` : ''; + let pre = vm.config.footer && vm.config.footer.pre ? `${vm.config.footer.pre}` : ''; + + var footer = `${pre}<footer ${style} ${clazz}>${copy} ${auth}</footer>`; + + hook.afterEach(function (html) { + return html + footer; + }); +} diff --git a/public/js/plugins/footer-enh.md b/public/js/plugins/footer-enh.md @@ -0,0 +1,49 @@ +# docsify-footer + +Footer Enhancement plugin for [Docsify](https://docsify.js.org), based on [Docsify example](https://docsify.js.org/#/write-a-plugin?id=example). + +## Install + +1. Then insert script plugin into Docsify document (index.html) + +```html +<script src="//unpkg.com/docsify-footer-enh/dist/docsify-footer-enh.min.js"></script> +``` + +2. Add configuration + +```html +<script> + window.$docsify = { + footer: { + copy: '<span>Acme &copy; 2023</span>', + auth: 'by Me', + pre: '<hr/>', + style: 'text-align: right;', + class: 'className', + }, + }; +</script> +``` + +| Config Option | Description | +| :------------ | :------------------------ | +| copy | Copyright text to display | +| auth | Author text | +| style | Footer CSS inline style | +| class | Footer Classes to include | +| pre | Html pre footer text | + +## Example + +1. Run `npm run build` +1. Run `npm run example` +1. Go to [http://localhost:3000/]() + +## License + +[Apache License](LICENSE) + +## TODO + +- Waiting for recommendations. diff --git a/public/js/plugins/footer.css b/public/js/plugins/footer.css @@ -0,0 +1,38 @@ +/** + * @license + * + * docsify-plugin-footer/plugin.css REL_VER_NUMBER + * (https://github.com/Sujaykumarh/docsify-plugin-footer/) + * + * Copyright (c) 2021 Sujaykumar.Hublikar <hello@sujaykumarh.com> + * Github (@sujaykumarh) + * + * Licensed under Apache License, Version 2.0 + */ + +#customFooter{ + border-top: 1px solid #e5e5e5; + padding-top: 2rem; + padding-bottom: 2rem; + width: 100%; + max-width: 80%; + margin: auto; +} + +#customFooter .powered-by{ + float: right; +} + +#customFooter .copyright a{ + padding-left: 5px; +} + +#customFooter a{ + color: var(--primary, #42b983); + text-decoration: underline dotted; +} + +#customFooter a:hover{ + color: var(--primary-dark, #2c7554); + text-decoration: underline; +} diff --git a/public/js/plugins/footer.js b/public/js/plugins/footer.js @@ -0,0 +1,145 @@ +/** + * @license + * + * docsify-plugin-footer/plugin.js REL_VER_NUMBER + * (https://github.com/Sujaykumarh/docsify-plugin-footer/) + * + * Copyright (c) 2021 Sujaykumar.Hublikar <hello@sujaykumarh.com> + * Github (@sujaykumarh) + * + * Licensed under Apache License, Version 2.0 + */ + + +/** + * @preserve + * + * generates footer + * + * | content here + * | .... + * sidebar | .... + * | + * | ___________________________________________________________________ + * | + * | copyright (c) 2021 copyrightOwner. Powered by docsify. + * | [---copyrightExtra---] + */ + +// javascript policy +'use strict'; + +// config options +const customPageFooterOptions = { + debug: false, // for debugging + + showPoweredBy: true, // should show powered by docsify at right + copyrightYear: '', // show copyright year, default current year. + showCopyright: true, // set to false to hide default copyright + copyright: undefined, // set this to html string to use custom copyrihgt section + copyrightOwnerName: '', // copyright owner name + copyrightOwnerLink: undefined, // copyright owner link if any + copyrightExtra: undefined, // any exta text to show below copyright owner section + + useLocalStorage: true, // build and store footer in localstorage for quick access +} + +const _storageKeyFooter = 'custom-footer'; + +// footer generator +function buildFooter() { + var footer = ''; + + // PoweredBy secion + if (customPageFooterOptions.showPoweredBy) { + footer += '<span class="powered-by">Powered by <a href="https://github.com/docsifyjs/docsify" target="_blank">docsify</a>.</span>'; + } + + // Copyright section + if (customPageFooterOptions.showCopyright && !customPageFooterOptions.copyright) { + footer += '<span class="copyright">&copy; '; + + // year + footer += (customPageFooterOptions.copyrightYear) ? customPageFooterOptions.copyrightYear : new Date().getFullYear(); + + // owner + if (!customPageFooterOptions.copyrightOwnerLink) { + footer += customPageFooterOptions.copyrightOwnerName + '.'; + } else { + footer += '<a href="' + customPageFooterOptions.copyrightOwnerLink + '" target="_blank">' + customPageFooterOptions.copyrightOwnerName + '</a>.'; + } + + // Copyright Extra + if (customPageFooterOptions.copyrightExtra) { + footer += '<div class="copyright-extra">'; + footer += customPageFooterOptions.copyrightExtra; + footer += '</div>' + } + + footer += '</span>' + } else { + footer += customPageFooterOptions.copyright; + } + + + var footer = '<footer id="customFooter">' + footer + '</footer>'; + + if (customPageFooterOptions.useLocalStorage) localStorage.setItem(_storageKeyFooter, footer); + + return footer; +} + +// main function +function customPageFooter(hook, vm) { + + // before hook + // hook.beforeEach( function( content ) { + // }); + + // after hook + hook.doneEach(function () { + var _footer = document.getElementById('customFooter'); + debug("_footer"); debug(_footer); + + if (!_footer) { + var node = document.getElementById('main').parentNode; + if (!node) { + error('parent node not found!'); + return; + } + + debug("node"); debug(node); + + var footer = undefined; + + if (customPageFooterOptions.useLocalStorage) { + footer = localStorage.getItem(_storageKeyFooter); + debug("footer from ls -> " + footer); + } + + node.innerHTML += ((footer) ? footer : buildFooter()); + debug("added custom footer!"); + } + }); +} + +function debug(msg) { + if (customPageFooterOptions.debug) console.log('[customPageFooter] log: ' + msg); +} + +function error(msg) { + if (customPageFooterOptions.debug) console.error('[customPageFooter] err: ' + msg); +} + + +// find customPageFooter plugin options +window.$docsify.customPageFooter = Object.assign( + customPageFooterOptions, + window.$docsify.customPageFooter, +); + +// Set docsify plugin +window.$docsify.plugins = [].concat( + customPageFooter, + window.$docsify.plugins, +); diff --git a/public/js/plugins/footer.md b/public/js/plugins/footer.md @@ -0,0 +1,131 @@ +# Docsify Plugin Footer + +A simple plugin to add page footer to [docsify](https://github.com/docsifyjs/docsify/) + +<!--[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/sujaykumarh/docsify-plugin-footer/Build%20&%20Publish%20package)](https://github.com/Sujaykumarh/docsify-plugin-footer/actions)--> +[![GitHub package.json version](https://img.shields.io/github/package-json/v/sujaykumarh/docsify-plugin-footer)](https://www.npmjs.com/package/@sujaykumarh/docsify-plugin-footer) +[![jsDelivr hits (npm)](https://img.shields.io/jsdelivr/npm/hm/@sujaykumarh/docsify-plugin-footer)](https://www.jsdelivr.com/package/npm/@sujaykumarh/docsify-plugin-footer) + +<br> + +# 📥 Download + +- Locally + + ```bash + npm install @sujaykumarh/docsify-plugin-footer + ``` +- CDN + + ```html + <script src="//cdn.jsdelivr.net/npm/@sujaykumarh/docsify-plugin-footer@1.x/dist/plugin.min.js"></script> + + <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@sujaykumarh/docsify-plugin-footer@1.x/dist/plugin.min.css"> + ``` + +<br> + +# 🧰 Configuration + +Available options + +```js +window.$docsify.customPageFooter = { + debug: false, // for debugging + + showPoweredBy: true, // should show powered by docsify at right + copyrightYear: '', // show copyright year, default current year. + showCopyright: true, // set to false to hide default copyright + copyright: undefined, // set this to html string to use custom copyrihgt section + copyrightOwnerName: '', // copyright owner name + copyrightOwnerLink: undefined, // copyright owner link if any + copyrightExtra: undefined, // any exta text to show below copyright owner section + + useLocalStorage: true, // build and store footer in localstorage for quick access +} +``` + +generates footer + +``` + + | content here + | .... +sidebar | .... + | + | + | ___________________________________________________________________ + | + | copyright (c) 2021 copyrightOwner. Powered by docsify. + | [---copyrightExtra---] + +``` + +Example: + +```html +<script> + ... + + window.$docsify.customPageFooter = { + copyrightOwnerName: 'Sujaykumar Hublikar', + copyrightOwnerLink: 'https://github.com/sujaykumarh', + } + + ... +</script> +``` + +**Colors** + +set `a` link colors set `--primary` & `--primary-dark` in `:root` + +* `--primary` is used default link color + +* `--primary-dark` is used when link:hover + +Example: + +```css +... + + +:root { + --primary: #0f5d9c; + --pirmary-dark: #0a4677; +} + + +... +``` + +<br> + +# 🛠️ Development + +Clone + +```bash +git clone https://github.com/Sujaykumarh/docsify-plugin-footer.git +``` + +install resources + +```bash +npm install +``` + +minify `src/plugin.js` and `src/plugin.css` generate minified files in `dist` folder + +```bash +npm run minify # generate minified resources in ./dist + +npm run minify:css # generate minified css resources in ./dist +npm run minify:js # generate minified js resources in ./dist +``` + +<br> + +# 📄 License + +Copyright (c) 2021 [Sujay H](https://github.com/sujaykumarh) Licensed under `Apache License v2.0` read [LICENSE](./LICENSE) diff --git a/public/js/plugins/footnote.js b/public/js/plugins/footnote.js @@ -0,0 +1,57 @@ +(function () { + var n = function (n, o) { + n.beforeEach(function (r) { + r = r.replaceAll("\r\n", "\n"); + const n = /(^\[\^.+?\]:.+?(?=(\n\n|\n$|\n\[\^.+?\]:|$(?!\n))))|(\^\[.+?\])/gms; + const o = r.match(/```.*?```/gms); + if (o) { + o.forEach(function (n, o) { + r = r.replace(n, "```" + o + "```"); + }); + } + if (n.test(r)) { + const t = r.match(n); + const c = []; + let f = 1; + t.forEach(function (n) { + if (/\^\[.*?\]/s.test(n)) { + r = r.replace(n, `<sup class="footnote-symbol" id="ft-${f}">[\[${f}\]](#ftref-${f})</sup>`); + c.push( + `${f}. ${n + .match(/\[(.*)\]/s)[1] + .trim() + .replaceAll("\n", "<br />")} <stronge id="ftref-${f}">[↩︎](#ft-${f})</stronge>\n` + ); + f++; + } else { + const s = n.split(/(?<=\]):/); + const o = new RegExp("\\[\\^" + s[0].replace(/[\[\^\]]/g, "") + "\\](?!:)", "g"); + r = r.replace(n, ""); + const t = r.match(o); + if (t) { + const e = []; + t.forEach(function (n, o) { + const t = o > 0 ? "-" + o : ""; + const c = $props.hideSubAnchor ? f : f + t; + r = r.replace(s[0], `<sup class="footnote-symbol" id="ft-${f + t}">[\[${c}\]](#ftref-${f + t})</sup>`); + e.push(`<stronge id="ftref-${f + t}">[↩︎](#ft-${f + t})</stronge>`); + }); + c.push(`${f}. ${s[1].trim().replaceAll("\n", "<br />")} ${e.join(" ")}\n`); + f++; + } + } + }); + r += `\n\n---\n ${c.join("")}`; + } + if (o) { + o.forEach(function (n, o) { + r = r.replace("```" + o + "```", n); + }); + } + return r; + }); + }; + $docsify = $docsify || {}; + $props = $docsify.docsifyFootnote || {}; + $docsify.plugins = [].concat($docsify.plugins || [], n); +})(); diff --git a/public/js/plugins/footnote.md b/public/js/plugins/footnote.md @@ -0,0 +1,53 @@ +<div align="center"> + +# docsify-footnote + +[![GitHub Release](https://img.shields.io/github/release/Robert-Du0001/docsify-footnote.svg)](https://github.com/Robert-Du0001/docsify-footnote/releases) [![NPM Release](https://img.shields.io/npm/v/docsify-footnote.svg)](https://www.npmjs.com/package/docsify-footnote) + +[English](/README.md) | [简体中文](/README.zh-CN.md) + +A [docsify.js](https://docsify.js.org) plugin for footnote in markdown. +</div> + +## Example + +You just need to import this JS script: + +```js +<script src="//cdn.jsdelivr.net/npm/docsify-footnote/dist/docsify-footnote.min.js"></script> +``` + +Then, enjoy it: + +```markdown +tf[^1] + +[^1]: Test File + +or + +tf^[Test File] + +or + +tf1[^2] + +[^2]: Test File1 +``` + +![demo-1](/docs/assets/imgs/example.png) + +## Configuration + +```javascript +window.$docsify = { + docsifyFootnote: { + // Set to true to hide the sub-anchor numbering. + // https://github.com/Robert-Du0001/docsify-footnote/pull/5 + hideSubAnchor: true, + } +} +``` + +## License +[MIT License](LICENSE) diff --git a/public/js/plugins/hide-code.js b/public/js/plugins/hide-code.js @@ -0,0 +1,68 @@ +/*! + * docsify-hide-code + * v1.0.0 + * https://github.com/jl15988/docsify-hide-code#readme + * (c) 2023 jl15988 + * MIT license + */ +(function() { + "use strict"; + function styleInject(css, ref) { + if (ref === void 0) ref = {}; + var insertAt = ref.insertAt; + if (!css || typeof document === "undefined") { + return; + } + var head = document.head || document.getElementsByTagName("head")[0]; + var style = document.createElement("style"); + style.type = "text/css"; + if (insertAt === "top") { + if (head.firstChild) { + head.insertBefore(style, head.firstChild); + } else { + head.appendChild(style); + } + } else { + head.appendChild(style); + } + if (style.styleSheet) { + style.styleSheet.cssText = css; + } else { + style.appendChild(document.createTextNode(css)); + } + } + var css_248z = '.hide-code{overflow-y:hidden!important;position:relative}.hide-code .hide-code-mask{background-image:linear-gradient(-180deg,hsla(0,0%,100%,0),#fff);bottom:0;left:0;padding-top:78px;position:absolute;right:0;text-align:center;width:100%;z-index:10}.hide-code .hide-code-mask .hide-code-mask-btn:before{border:9px solid transparent;border-top-color:#aaa;content:"";cursor:pointer;display:inline-block;height:0;margin-right:20px;transform:translateY(10px);transition:all .3s;width:0}'; + styleInject(css_248z); + function hideCode(hook, vm) { + var hideCodeConfig = vm.config.hideCode; + hook.doneEach(function() { + if (hideCodeConfig) { + var targetElms = Array.apply(null, document.querySelectorAll("pre[data-lang]")); + var template = [ '<div class="hide-code-mask">', '<div class="hide-code-mask-btn">', "</div>" ].join(""); + targetElms.forEach(function(elm) { + if (!hideCodeConfig.scroll && hideCodeConfig.height < elm.offsetHeight) { + elm.classList.add("hide-code"); + } + elm.style.maxHeight = hideCodeConfig.height + "px"; + elm.insertAdjacentHTML("beforeend", template); + }); + } + }); + hook.mounted(function() { + if (hideCodeConfig) { + var listenerHost = document.querySelector(".content"); + listenerHost.addEventListener("click", function(evt) { + var isCopyCodeButton = evt.target.classList.contains("hide-code-mask-btn"); + if (isCopyCodeButton) { + var buttonElm = evt.target; + var preElm = buttonElm.parentNode.parentNode; + preElm.classList.remove("hide-code"); + preElm.style.maxHeight = ""; + } + }); + } + }); + } + window.$docsify = window.$docsify || {}; + window.$docsify.plugins = [ hideCode ].concat(window.$docsify.plugins || []); +})(); diff --git a/public/js/plugins/hide-code.md b/public/js/plugins/hide-code.md @@ -0,0 +1,30 @@ +# docsify-hide-code + +![](https://img.shields.io/badge/github-jl15988-000000?logo=github&link=https://github.com/jl15988) ![](https://img.shields.io/badge/github-docsify--hide--code-000000?logo=github&link=https://github.com/jl15988/docsify-hide-code) + +A docsify plugin that hide code. + +## Installation +Add following script tag to your index.html after docsify. + +```js +<script src="https://unpkg.com/docsify-hide-code"></script> +``` + +You can also use the following script. + +```js +<script src="https://cdn.jsdelivr.net/npm/docsify-hide-code/dist/docsify-hide-code.min.js"></script> +``` + +## Options + +```js +window.$docsify = { + hideCode: { + scroll: false, // Enable scrolling + height: 300 // Max height + } +} +``` + diff --git a/public/js/plugins/image-slider.css b/public/js/plugins/image-slider.css @@ -0,0 +1,192 @@ +:root { + /* slider */ + --docsify-image-slider-transition: 0.4s ease-in-out; + --docsify-image-slider-width: 50vw; + --docsify-image-slider-height: 50vh; + --docsify-image-slider-max-width: 768px; + --docsify-image-slider-max-height: 400px; + --docsify-image-slider-overflow: hidden; + --docsify-image-slider-left-right-margin: -3rem; + /* e.g., calc(100vw - .markdown-section padding(40px)*2) */ + --docsify-image-slider-mobile-width: calc(100vw - 80px); + --docsify-image-slider-mobile-height: 30vh; + + /* slider-buttons */ + --docsify-image-slider-button-color: #a0a0a0; + --docsify-image-slider-button-bg-color: transparent; + --docsify-image-slider-button-bg-hover-color: #a0a0a01A; + --docsify-image-slider-button-border-color: #a0a0a0; + + /* slider-bullets */ + --docsify-image-slider-bullet-bg-color: #dee2e6; + --docsify-image-slider-bullet-bg-hover-color: #868e86; + --docsify-image-slider-bullet-margin-top: 50%; + + /* slider-toolbar */ + --docsify-image-slider-toolbar-color: #f8f9fa; + --docsify-image-slider-toolbar-bg-color: #343a40B3; + --docsify-image-slider-toolbar-top: 10%; +} + +.image-slider { + display: flex; + justify-content: center; + align-items: center; +} + +.slider-wrapper { + display: flex; + align-items: center; + position: relative; +} + +.slider { + position: relative; + width: var(--docsify-image-slider-width); + height: var(--docsify-image-slider-height); + max-width: var(--docsify-image-slider-max-width); + max-height: var(--docsify-image-slider-max-height); + overflow: var(--docsify-image-slider-overflow); + margin: 0 var(--docsify-image-slider-left-right-margin); + flex-shrink: 0; +} + +@media screen and (max-width: 768px) { + .slider { + width: var(--docsify-image-slider-mobile-width); + height: 30vh; + } +} + +.slide { + position: absolute; + width: 100%; + height: 100%; + opacity: 0; + transition: var(--docsify-image-slider-transition); + background-size: contain !important; + background-position: center !important; + background-repeat: no-repeat !important; +} + +.slide.current { + opacity: 1; +} + + +button#prev-slide.slider-buttons { + position: relative; + z-index: 1000; + top: 50%; + left: 1rem; +} + +button#next-slide.slider-buttons { + position: relative; + z-index: 1000; + top: 50%; + right: 1rem; +} + +button.slider-buttons { + border: 2px solid var(--docsify-image-slider-button-border-color); + background-color: var(--docsify-image-slider-button-bg-color); + color: var(--docsify-image-slider-button-color); + cursor: pointer; + padding: min(1vw, 12px) min(1.6vw, 14px); + border-radius: 50%; + outline: none; + margin: 0 1rem; +} + +button.slider-buttons:hover { + background-color: var(--docsify-image-slider-button-bg-hover-color); +} + +/* slider-bullets */ +.slider-bullets { + position: absolute; + transform: translateX(-50%); + left: 50%; + margin-top: var(--docsify-image-slider-bullet-margin-top); +} + +.bullet { + display: inline-block; + width: 10px; + height: 10px; + margin: 0 5px; + background: var(--docsify-image-slider-bullet-bg-color); + border-radius: 50%; + cursor: pointer; + transition: background-color 0.6s ease; +} + +.bullet.active { + background: var(--docsify-image-slider-bullet-bg-hover-color); +} + +/* slider-toolbar */ +.slider-slider-toolbar { + text-align: center; +} + +.slider-tool-buttons { + position: absolute; + top: var(--docsify-image-slider-toolbar-top); + right: calc(1rem + 0.5vw); + z-index: 1500; + margin: 0 1rem; + border: none; + border-radius: 20%; + cursor: pointer; + color: transparent; + background-color: transparent; + padding: 6px 8px; + font-size: 12px; +} + +.slider-wrapper:hover .slider-tool-buttons { + color: var(--docsify-image-slider-toolbar-color); + background-color: var(--docsify-image-slider-toolbar-bg-color); +} + +@media screen and (max-width: 768px) { + .slider-tool-buttons { + right: 0; + } +} + +/* fullscreen */ +.slider-wrapper:fullscreen { + position: relative !important; + align-items: center; + justify-content: center; +} + +.slider-wrapper:fullscreen .slider { + width: 97.5vw; + height: 70vh; + max-width: 97.5vw; + max-height: 70vh; +} + +.slider-wrapper:fullscreen .slider-buttons { + top: 0% !important; +} + +.slider-wrapper:fullscreen .slider-tool-buttons { + top: var(--docsify-image-slider-toolbar-top); + color: var(--docsify-image-slider-toolbar-color); + background-color: var(--docsify-image-slider-toolbar-bg-color); + font-size: 18px; +} + +.slider-wrapper:fullscreen .bullet { + background: transparent; + border: 1px solid var(--docsify-image-slider-bullet-bg-hover-color); +} + +.slider-wrapper:fullscreen .bullet.active { + background: var(--docsify-image-slider-bullet-bg-hover-color); +} diff --git a/public/js/plugins/image-slider.js b/public/js/plugins/image-slider.js @@ -0,0 +1,160 @@ +window.$docsify = window.$docsify || {}; +window.$docsify.plugins = (window.$docsify.plugins || []).concat((hook, vm) => { + const slideRegEx = /\[\[slider\]\]\((.+?)\)/g; + + const slideConfig = vm.config.slider || {}; + const auto = slideConfig["auto"] || false; + const intervalTime = slideConfig["intervalTime"] || 20000; + const hideToolbar = slideConfig["hideToolbar"] || false; + + function renderSlider(imageUrls) { + let sliderContent = ""; + + sliderContent += ` <div class="image-slider"> + <div class="slider-wrapper"> + <button class="slider-buttons" id="prev-slide"> + <i class="fas fa-arrow-left"></i> + </button> + <div class="slider"> + <div class="slide current"></div> + ${imageUrls.map((_, index) => { + if (index === 0) { + return ""; + } else { + return `<div class="slide"></div>`; + } + }).join('')} + </div> + <button class="slider-buttons" id="next-slide"> + <i class="fas fa-arrow-right"></i> + </button>`; + + if (!hideToolbar) { + sliderContent += ` + <div class="slider-toolbar"> + <button class="slider-tool-buttons" id="fullscreen"> + <i class="fa-solid fa-up-right-and-down-left-from-center"></i> + </button> + </div>` + } + + sliderContent += ` + <div class="slider-bullets"> + ${imageUrls.map((_, index) => { + return `<span class="bullet${index === 0 ? ' active' : ''}" data-index="${index}"></span>`; + }).join('')} + </div> + </div> + </div>` + + return sliderContent; + } + + hook.beforeEach(content => { + hasSlider = content.includes("[[slider]]("); + + return content.replace(slideRegEx, (string, urls) => { + const imageUrls = urls.split('|').map(url => url.trim()).filter(url => url !== ""); + + cssStyles = imageUrls.map((url, index) => { + if (index === 0) { + return `.slide:first-child { background: url("${url}"); }`; + } else { + return `.slide:nth-child(${index + 1}) { background: url("${url}"); }`; + } + }).join('\n'); + + return string.replace( + string, renderSlider(imageUrls) + ); + }); + }); + + hook.doneEach(() => { + if (!hasSlider) return; + + const sliderPageDiv = document.getElementsByClassName("image-slider")[0]; + sliderPageDiv.innerHTML += `<style>${cssStyles}</style>`; + + let slideInterval; + + const updateBullets = () => { + const bullets = document.querySelectorAll('.bullet'); + const slides = document.querySelectorAll('.slide'); + const currentIndex = Array.from(slides).findIndex(slide => slide.classList.contains('current')); + bullets.forEach((b, i) => { + b.classList.toggle('active', i === currentIndex); + }); + }; + + const nextSlide = () => { + const slides = document.querySelectorAll(".slide"); + const current = document.querySelector(".current"); + current.classList.remove("current"); + if (current.nextElementSibling) { + current.nextElementSibling.classList.add("current"); + } else { + slides[0].classList.add("current"); + } + updateBullets(); + }; + + const prevSlide = () => { + const slides = document.querySelectorAll(".slide"); + const current = document.querySelector(".current"); + current.classList.remove("current"); + if (current.previousElementSibling) { + current.previousElementSibling.classList.add("current"); + } else { + slides[slides.length - 1].classList.add("current"); + } + updateBullets(); + }; + + document.addEventListener('click', (event) => { + if (event.target.id === 'next-slide') { + nextSlide(); + if (auto) { + clearInterval(slideInterval); + slideInterval = setInterval(nextSlide, intervalTime); + } + } + if (event.target.id === 'prev-slide') { + prevSlide(); + if (auto) { + clearInterval(slideInterval); + slideInterval = setInterval(nextSlide, intervalTime); + } + } + if (event.target.classList.contains('bullet')) { + const index = parseInt(event.target.getAttribute('data-index'), 10); + const slides = document.querySelectorAll('.slide'); + document.querySelector('.slide.current').classList.remove('current'); + slides[index].classList.add('current'); + updateBullets(); + if (auto) { + clearInterval(slideInterval); + slideInterval = setInterval(nextSlide, intervalTime); + } + } + if (event.target.id === 'fullscreen') { + const sliderWrapper = document.querySelector('.slider-wrapper'); + if (!document.fullscreenElement) { + sliderWrapper.requestFullscreen?.() || + sliderWrapper.webkitRequestFullscreen?.() || + sliderWrapper.mozRequestFullScreen?.() || + sliderWrapper.msRequestFullscreen?.(); + } else { + document.exitFullscreen?.() || + document.webkitExitFullscreen?.() || + document.mozCancelFullScreen?.() || + document.msExitFullscreen?.(); + } + } + }); + + if (auto) { + slideInterval = setInterval(nextSlide, intervalTime); + } + }); +}); diff --git a/public/js/plugins/image-slider.md b/public/js/plugins/image-slider.md @@ -0,0 +1,148 @@ +<div align="center"> + +# docsify-image-slider + +[![NPM Release](https://img.shields.io/npm/v/docsify-image-slider.svg?logo=npm&style=flat-square)](https://www.npmjs.com/package/docsify-image-slider) +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://github.com/erectbranch/docsify-image-slider/blob/master/LICENSE) + +A plugin for [Docsify](https://docsify.js.org/#/) that allows you to create a slider for images in your documentation. + +![demo](demo.gif) + +</div> + +## Import + +To use the image slider, you need to include the plugin in your Docsify `index.html` file: + +**Add stylesheet** + +```html +<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify-image-slider@latest/dist/slider.min.css"> +``` + +**Add script** + +```html +<script src="//cdn.jsdelivr.net/npm/docsify-image-slider@latest/dist/docsify-image-slider.min.js"></script> +``` + +--- + +## Usage + +To create an image slider, you can use the following syntax in your markdown files: + +```html +[[slider]](img url 1|img url 2|...|img url n) +``` + +--- + +## Configuration + +To configure the slider, you can set options in your `index.html` file. The available options are: + +| Option | Type | Default | Description | +| --- | --- | --- | --- | +| `auto` | `Boolean` | false | Whether to automatically switch images. | +| `intervalTime` | `Int` | 20000 | Time interval for automatic switching (in milliseconds). | +| `hideToolbar` | `Boolean` | false | Whether to hide the toolbar buttons. | + +```javascript +window.$docsify = { + slider: { + // Default options + auto: false, + intervalTime: 20000, + hideToolbar: false, + }, +}; +``` + +--- + +## Customization + +The slider can be customized using CSS. You can override the following CSS variables in your `index.html` file. + +```html +<style> +:root { + /* slider */ + --docsify-image-slider-transition: 0.4s ease-in-out; + --docsify-image-slider-width: 50vw; + --docsify-image-slider-height: 50vh; + --docsify-image-slider-max-width: 768px; + --docsify-image-slider-max-height: 400px; + --docsify-image-slider-overflow: hidden; + --docsify-image-slider-left-right-margin: -3rem; + /* e.g., calc(100vw - .markdown-section padding(40px)*2) */ + --docsify-image-slider-mobile-width: calc(100vw - 80px); + --docsify-image-slider-mobile-height: 30vh; + + /* slider-buttons */ + --docsify-image-slider-button-color: #a0a0a0; + --docsify-image-slider-button-bg-color: transparent; + --docsify-image-slider-button-bg-hover-color: #a0a0a01A; + --docsify-image-slider-button-border-color: #a0a0a0; + + /* slider-bullets */ + --docsify-image-slider-bullet-bg-color: #dee2e6; + --docsify-image-slider-bullet-bg-hover-color: #868e86; + --docsify-image-slider-bullet-margin-top: 50%; + + /* slider-toolbar */ + --docsify-image-slider-toolbar-color: #f8f9fa; + --docsify-image-slider-toolbar-bg-color: #343a40B3; + --docsify-image-slider-toolbar-top: 10%; +} +</style> +``` + +**slider** + +| Style | Description | +| --- | --- | +| `--docsify-image-slider-transition` | Transition effect for the slider. | +| `--docsify-image-slider-width` | Width of the slide. | +| `--docsify-image-slider-height` | Height of the slide. | +| `--docsify-image-slider-max-width` | Maximum width of the slide. | +| `--docsify-image-slider-max-height` | Maximum height of the slide. | +| `--docsify-image-slider-overflow` | Overflow property for the slide. | +| `--docsify-image-slider-left-right-margin` | Margin for the left and right sides of the slider buttons. | +| `--docsify-image-slider-mobile-width` | Width of the slide on mobile devices. | +| `--docsify-image-slider-mobile-height` | Height of the slide on mobile devices. | + +**slider-buttons** + +| Style | Description | +| --- | --- | +| `--docsify-image-slider-button-color` | Color of the slider arrows. | +| `--docsify-image-slider-button-bg-color` | Background color of the slider buttons. | +| `--docsify-image-slider-button-bg-hover-color` | Background color of the slider buttons on hover. | +| `--docsify-image-slider-button-border-color` | Border color of the slider buttons. | + +**slider-bullets** + +| Style | Description | +| --- | --- | +| `--docsify-image-slider-bullet-bg-color` | Background color of the slider bullets. | +| `--docsify-image-slider-bullet-bg-hover-color` | Background color of the current slider bullet. | +| `--docsify-image-slider-bullet-margin-top` | Top margin for the slider bullets. | + +**slider-toolbar** + +| Style | Description | +| --- | --- | +| `--docsify-image-slider-toolbar-color` | Color of the slider toolbar buttons. | +| `--docsify-image-slider-toolbar-bg-color` | Background color of the slider toolbar buttons. | +| `--docsify-image-slider-toolbar-top` | Top position of the slider toolbar. | + +--- + +## Contribution + +Please feel free to submit a pull request or open an issue on the GitHub repository. Your contributions are welcome and appreciated! + +--- diff --git a/public/js/plugins/inline-code.js b/public/js/plugins/inline-code.js @@ -0,0 +1,45 @@ +// SPDX-FileCopyrightText: (C) 2024 Alisa Lain <al1-ce@null.net> +// SPDX-License-Identifier: GPL-3.0-or-later + +'use strict'; + +/* +[[filename]] +[[filename|Link Text]] +[[filename#header|Link text]] +[[dir/file]] +*/ + +// Docsify plugin functions +function plugin(hook, vm) { + hook.afterEach(function(content) { + return content + }); + hook.beforeEach(function(markdown, next) { + const out = markdown.replace(/{@([^{}]+)}/g, function(content) { + const innerContent = content.replace('{@', '').replace('}', ''); + const words = innerContent.split(' '); + if (words.length < 2) return content; + let type = words[0]; + words.shift(); + if (type == 'k') type = 'keyword'; + if (type == 'n') type = 'number'; + if (type == 'f') type = 'function'; + if (type == 's') type = 'string'; + if (type == 'c') type = 'comment'; + if (type == 't') type = 'tag'; + const text = words.join(' '); + return `<span class="token ${type}">${text}</span>` + }); + + next(out); + }); +} + +if (!window.$docsify) { + console.error('This is a docsify plugin, please import the docsify library first!'); +} else { + window.$docsify.plugins = [].concat(plugin, window.$docsify.plugins); +} + + diff --git a/public/js/plugins/inline-code.md b/public/js/plugins/inline-code.md @@ -0,0 +1,17 @@ +>by me again lol + +Supports + +- k - keyword +- n - number +- f - function +- s - string +- c - comment +- t - tag + +Syntax + +```md +{@k keyword} {@n 255} +``` + diff --git a/public/js/plugins/navbar-fixed.css b/public/js/plugins/navbar-fixed.css @@ -0,0 +1,66 @@ +.app-nav { + position: fixed; + background-color: var(--theme-color, #42b983); + width: 100%; + margin: 0; + margin-right: 0 !important; + padding: 12px; + color: #ffffff; + transition: 0.2s; +} + +.app-nav li { + padding: 0; +} + +.app-nav p img:nth-child(1) { + width: 24px; + float: left; +} + +.app-nav p:nth-child(2) { + float: left; + font-weight: 600; + margin-left: 16px; +} + +.app-nav li ul { + color: #000000; +} + +.app-nav .badge { + min-width: 85px !important; + max-width: 85px; + float: right !important; + margin-left: 10px; +} + +.search input, .search .clear-button { + margin-top: 15%; +} + +section.cover img:first-child { + margin-top: 4%; +} + +.markdown-section h1 { + font-size: 2rem; + padding: 40px 0 1rem; + margin: 0 !important; +} +.markdown-section h2 { + font-size: 1.75rem; + padding: 45px 0 0.8rem; + margin: 0 !important; +} +.markdown-section h3 { + font-size: 1.5rem; + padding: 40px 0 0.6rem; + margin: 0 !important; +} + +@media screen and (max-width: 770px) { + .search input, .search .clear-button { + margin-top: 0%; + } +} diff --git a/public/js/plugins/navbar-fixed.md b/public/js/plugins/navbar-fixed.md @@ -0,0 +1,72 @@ +> [!CAUTION] +> # This repository has been moved to GitLab with the latest commits not available in this repository. <sup>[?](https://gitlab.com/LIGMATV)</sup> +> https://gitlab.com/LIGMATV/docsify-navbar-fixed + +# Docsify Navbar Fixed [Preview](https://docsify-navbar-fixed.vercel.app/) + +> A new always on top customizable and pretty navigation bar for your docs. + +| ![Screenshot Capture - 2024-05-20 - 16-35-42](https://github.com/LIGMATV/docsify-navbar-fixed/assets/143163098/a1123575-832e-49b1-8a26-c1c86b7b8a69) | +|:---:| +| Example, try it [here](https://docsify-navbar-fixed.vercel.app/) | + + +## Installation + +```index.html +<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css"> +<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/LIGMATV/docsify-navbar-fixed/navbar-fixed.css"> +``` + +> [!NOTE] +> Just to be safe, please use your downloaded version. +> You can download the navbar-fixed.css <a href="https://cdn.jsdelivr.net/gh/LIGMATV/docsify-navbar-fixed/navbar-fixed.css">here</a>. + +Every ⭐ star is expensive. If you can star this repository, you absolutely rich! + +## Configuration +You can configure your navbar preferences in ``_navbar.md`` file. [**Example**](https://raw.githubusercontent.com/LIGMATV/docsify-navbar-fixed/main/docs/_navbar.md) + +> [!IMPORTANT] +> You need to add ``loadNavbar: true`` to your index.html script, so the navbar will work. [Learn more](https://docsify.js.org/#/configuration?id=loadnavbar) + +### Logo + +```_navbar.md +<!-- Logo --> +[![](https://docsify.js.org/_media/icon.svg)](/) +``` + +[![](https://docsify.js.org/_media/icon.svg)](/) + +> [!IMPORTANT] +> The Logo code must in the first line. + +### Title +```_navbar.md +<!-- Title --> +docsify +``` + +docsify + +> [!IMPORTANT] +> The Title code must be below the logo code or in the line after the logo code. + +### Badge + [GitHub Corner](https://docsify.js.org/#/configuration?id=repo) was not supported on docsify-navbar-fixed. So you can use [Shields.io](https://shields.io/) badge inside. + Example : + ```_navbar.md + [![GitHub Repo stars](https://img.shields.io/github/stars/docsifyjs/docsify ':class=badge')](https://github.com/docsifyjs/docsify/) + ``` + [![GitHub Repo stars](https://img.shields.io/github/stars/docsifyjs/docsify ':class=badge')](https://github.com/docsifyjs/docsify/) + +> [!IMPORTANT] +> Do not forget to add ``':class=badge'`` inside the image code. + +### Color + ``#42b983`` + The navbar color is the same like in your ``themeColor`` configuration. + [Learn more](https://docsify.js.org/#/configuration?id=themecolor) + +usually, you done! diff --git a/public/js/plugins/page-history.js b/public/js/plugins/page-history.js @@ -0,0 +1,4271 @@ +(function (factory) { + typeof define === 'function' && define.amd ? define(factory) : + factory(); +})((function () { 'use strict'; + + const msg = (message) => `[docsify-plugin-page-history] ${message}`; + + /** + * @typedef {object} History + * @property {string | Date} date + * @property {string} message + */ + + /** + * 数字を2桁になるようゼロ埋めする + * @param {number} num + * @returns {string} + */ + const zeroPad = (num) => { + return num.toString().padStart(2, "0"); + }; + + /** + * 日付を YYYY-MM-DD 形式に変換する + * @param {Date | string} date + * @returns {string} + */ + const formatDate = (date) => { + if (date instanceof Date) { + const year = date.getFullYear(); + const month = date.getMonth() + 1; + const day = date.getDate(); + + return `${year}-${zeroPad(month)}-${zeroPad(day)}`; + } + + return date; + }; + + /** + * メッセージを正規化する + * @param {string | string[]} message + * @returns {string} + */ + const normalizeMessage = (message) => { + if (Array.isArray(message)) { + return message.join(" "); + } + + return message; + }; + + /** + * 履歴をパースする + * @param {History[]} input + * @returns {History[]} + */ + const parseHistory = (input) => { + try { + if (!input) return []; + + if (!Array.isArray(input)) { + throw TypeError(msg('"history" must be an array')); + } + + return ( + input + .filter((item) => typeof item === "object" && item !== null) + // 日付を大きい順に並び替える + .sort(({ date: x }, { date: y }) => { + if (x instanceof Date) { + if (y instanceof Date) { + return y - x > 0 ? 1 : -1; + } + return -1; + } + return 1; + }) + .map(({ date, message }) => { + return { + date: formatDate(date), + message: normalizeMessage(message), + }; + }) + ); + } catch (err) { + console.error(err); + + return []; + } + }; + + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + function getDefaultExportFromCjs (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; + } + + var frontMatter = {exports: {}}; + + var jsYaml$1 = {}; + + var loader$1 = {}; + + var common$6 = {}; + + function isNothing(subject) { + return (typeof subject === 'undefined') || (subject === null); + } + + + function isObject(subject) { + return (typeof subject === 'object') && (subject !== null); + } + + + function toArray(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; + + return [ sequence ]; + } + + + function extend(target, source) { + var index, length, key, sourceKeys; + + if (source) { + sourceKeys = Object.keys(source); + + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; + } + } + + return target; + } + + + function repeat(string, count) { + var result = '', cycle; + + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } + + return result; + } + + + function isNegativeZero(number) { + return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); + } + + + common$6.isNothing = isNothing; + common$6.isObject = isObject; + common$6.toArray = toArray; + common$6.repeat = repeat; + common$6.isNegativeZero = isNegativeZero; + common$6.extend = extend; + + function YAMLException$4(reason, mark) { + // Super constructor + Error.call(this); + + this.name = 'YAMLException'; + this.reason = reason; + this.mark = mark; + this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : ''); + + // Include stack trace in error object + if (Error.captureStackTrace) { + // Chrome and NodeJS + Error.captureStackTrace(this, this.constructor); + } else { + // FF, IE 10+ and Safari 6+. Fallback for others + this.stack = (new Error()).stack || ''; + } + } + + + // Inherit from Error + YAMLException$4.prototype = Object.create(Error.prototype); + YAMLException$4.prototype.constructor = YAMLException$4; + + + YAMLException$4.prototype.toString = function toString(compact) { + var result = this.name + ': '; + + result += this.reason || '(unknown reason)'; + + if (!compact && this.mark) { + result += ' ' + this.mark.toString(); + } + + return result; + }; + + + var exception = YAMLException$4; + + var common$5 = common$6; + + + function Mark$1(name, buffer, position, line, column) { + this.name = name; + this.buffer = buffer; + this.position = position; + this.line = line; + this.column = column; + } + + + Mark$1.prototype.getSnippet = function getSnippet(indent, maxLength) { + var head, start, tail, end, snippet; + + if (!this.buffer) return null; + + indent = indent || 4; + maxLength = maxLength || 75; + + head = ''; + start = this.position; + + while (start > 0 && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) { + start -= 1; + if (this.position - start > (maxLength / 2 - 1)) { + head = ' ... '; + start += 5; + break; + } + } + + tail = ''; + end = this.position; + + while (end < this.buffer.length && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end)) === -1) { + end += 1; + if (end - this.position > (maxLength / 2 - 1)) { + tail = ' ... '; + end -= 5; + break; + } + } + + snippet = this.buffer.slice(start, end); + + return common$5.repeat(' ', indent) + head + snippet + tail + '\n' + + common$5.repeat(' ', indent + this.position - start + head.length) + '^'; + }; + + + Mark$1.prototype.toString = function toString(compact) { + var snippet, where = ''; + + if (this.name) { + where += 'in "' + this.name + '" '; + } + + where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1); + + if (!compact) { + snippet = this.getSnippet(); + + if (snippet) { + where += ':\n' + snippet; + } + } + + return where; + }; + + + var mark = Mark$1; + + var YAMLException$3 = exception; + + var TYPE_CONSTRUCTOR_OPTIONS = [ + 'kind', + 'resolve', + 'construct', + 'instanceOf', + 'predicate', + 'represent', + 'defaultStyle', + 'styleAliases' + ]; + + var YAML_NODE_KINDS = [ + 'scalar', + 'sequence', + 'mapping' + ]; + + function compileStyleAliases(map) { + var result = {}; + + if (map !== null) { + Object.keys(map).forEach(function (style) { + map[style].forEach(function (alias) { + result[String(alias)] = style; + }); + }); + } + + return result; + } + + function Type$h(tag, options) { + options = options || {}; + + Object.keys(options).forEach(function (name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new YAMLException$3('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + + // TODO: Add tag format check. + this.tag = tag; + this.kind = options['kind'] || null; + this.resolve = options['resolve'] || function () { return true; }; + this.construct = options['construct'] || function (data) { return data; }; + this.instanceOf = options['instanceOf'] || null; + this.predicate = options['predicate'] || null; + this.represent = options['represent'] || null; + this.defaultStyle = options['defaultStyle'] || null; + this.styleAliases = compileStyleAliases(options['styleAliases'] || null); + + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new YAMLException$3('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } + } + + var type = Type$h; + + /*eslint-disable max-len*/ + + var common$4 = common$6; + var YAMLException$2 = exception; + var Type$g = type; + + + function compileList(schema, name, result) { + var exclude = []; + + schema.include.forEach(function (includedSchema) { + result = compileList(includedSchema, name, result); + }); + + schema[name].forEach(function (currentType) { + result.forEach(function (previousType, previousIndex) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) { + exclude.push(previousIndex); + } + }); + + result.push(currentType); + }); + + return result.filter(function (type, index) { + return exclude.indexOf(index) === -1; + }); + } + + + function compileMap(/* lists... */) { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {} + }, index, length; + + function collectType(type) { + result[type.kind][type.tag] = result['fallback'][type.tag] = type; + } + + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; + } + + + function Schema$5(definition) { + this.include = definition.include || []; + this.implicit = definition.implicit || []; + this.explicit = definition.explicit || []; + + this.implicit.forEach(function (type) { + if (type.loadKind && type.loadKind !== 'scalar') { + throw new YAMLException$2('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); + } + }); + + this.compiledImplicit = compileList(this, 'implicit', []); + this.compiledExplicit = compileList(this, 'explicit', []); + this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit); + } + + + Schema$5.DEFAULT = null; + + + Schema$5.create = function createSchema() { + var schemas, types; + + switch (arguments.length) { + case 1: + schemas = Schema$5.DEFAULT; + types = arguments[0]; + break; + + case 2: + schemas = arguments[0]; + types = arguments[1]; + break; + + default: + throw new YAMLException$2('Wrong number of arguments for Schema.create function'); + } + + schemas = common$4.toArray(schemas); + types = common$4.toArray(types); + + if (!schemas.every(function (schema) { return schema instanceof Schema$5; })) { + throw new YAMLException$2('Specified list of super schemas (or a single Schema object) contains a non-Schema object.'); + } + + if (!types.every(function (type) { return type instanceof Type$g; })) { + throw new YAMLException$2('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + + return new Schema$5({ + include: schemas, + explicit: types + }); + }; + + + var schema = Schema$5; + + var Type$f = type; + + var str = new Type$f('tag:yaml.org,2002:str', { + kind: 'scalar', + construct: function (data) { return data !== null ? data : ''; } + }); + + var Type$e = type; + + var seq = new Type$e('tag:yaml.org,2002:seq', { + kind: 'sequence', + construct: function (data) { return data !== null ? data : []; } + }); + + var Type$d = type; + + var map = new Type$d('tag:yaml.org,2002:map', { + kind: 'mapping', + construct: function (data) { return data !== null ? data : {}; } + }); + + var Schema$4 = schema; + + + var failsafe = new Schema$4({ + explicit: [ + str, + seq, + map + ] + }); + + var Type$c = type; + + function resolveYamlNull(data) { + if (data === null) return true; + + var max = data.length; + + return (max === 1 && data === '~') || + (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); + } + + function constructYamlNull() { + return null; + } + + function isNull(object) { + return object === null; + } + + var _null = new Type$c('tag:yaml.org,2002:null', { + kind: 'scalar', + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function () { return '~'; }, + lowercase: function () { return 'null'; }, + uppercase: function () { return 'NULL'; }, + camelcase: function () { return 'Null'; } + }, + defaultStyle: 'lowercase' + }); + + var Type$b = type; + + function resolveYamlBoolean(data) { + if (data === null) return false; + + var max = data.length; + + return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || + (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); + } + + function constructYamlBoolean(data) { + return data === 'true' || + data === 'True' || + data === 'TRUE'; + } + + function isBoolean(object) { + return Object.prototype.toString.call(object) === '[object Boolean]'; + } + + var bool = new Type$b('tag:yaml.org,2002:bool', { + kind: 'scalar', + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function (object) { return object ? 'true' : 'false'; }, + uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, + camelcase: function (object) { return object ? 'True' : 'False'; } + }, + defaultStyle: 'lowercase' + }); + + var common$3 = common$6; + var Type$a = type; + + function isHexCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || + ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || + ((0x61/* a */ <= c) && (c <= 0x66/* f */)); + } + + function isOctCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); + } + + function isDecCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); + } + + function resolveYamlInteger(data) { + if (data === null) return false; + + var max = data.length, + index = 0, + hasDigits = false, + ch; + + if (!max) return false; + + ch = data[index]; + + // sign + if (ch === '-' || ch === '+') { + ch = data[++index]; + } + + if (ch === '0') { + // 0 + if (index + 1 === max) return true; + ch = data[++index]; + + // base 2, base 8, base 16 + + if (ch === 'b') { + // base 2 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch !== '0' && ch !== '1') return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + + if (ch === 'x') { + // base 16 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + // base 8 + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + // base 10 (except 0) or base 60 + + // value should not start with `_`; + if (ch === '_') return false; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch === ':') break; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + + // Should have digits and should not end with `_` + if (!hasDigits || ch === '_') return false; + + // if !base60 - done; + if (ch !== ':') return true; + + // base60 almost not used, no needs to optimize + return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); + } + + function constructYamlInteger(data) { + var value = data, sign = 1, ch, base, digits = []; + + if (value.indexOf('_') !== -1) { + value = value.replace(/_/g, ''); + } + + ch = value[0]; + + if (ch === '-' || ch === '+') { + if (ch === '-') sign = -1; + value = value.slice(1); + ch = value[0]; + } + + if (value === '0') return 0; + + if (ch === '0') { + if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); + if (value[1] === 'x') return sign * parseInt(value, 16); + return sign * parseInt(value, 8); + } + + if (value.indexOf(':') !== -1) { + value.split(':').forEach(function (v) { + digits.unshift(parseInt(v, 10)); + }); + + value = 0; + base = 1; + + digits.forEach(function (d) { + value += (d * base); + base *= 60; + }); + + return sign * value; + + } + + return sign * parseInt(value, 10); + } + + function isInteger(object) { + return (Object.prototype.toString.call(object)) === '[object Number]' && + (object % 1 === 0 && !common$3.isNegativeZero(object)); + } + + var int = new Type$a('tag:yaml.org,2002:int', { + kind: 'scalar', + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, + octal: function (obj) { return obj >= 0 ? '0' + obj.toString(8) : '-0' + obj.toString(8).slice(1); }, + decimal: function (obj) { return obj.toString(10); }, + /* eslint-disable max-len */ + hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } + }, + defaultStyle: 'decimal', + styleAliases: { + binary: [ 2, 'bin' ], + octal: [ 8, 'oct' ], + decimal: [ 10, 'dec' ], + hexadecimal: [ 16, 'hex' ] + } + }); + + var common$2 = common$6; + var Type$9 = type; + + var YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + '^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + + // .2e4, .2 + // special case, seems not from spec + '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + + // 20:59 + '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*' + + // .inf + '|[-+]?\\.(?:inf|Inf|INF)' + + // .nan + '|\\.(?:nan|NaN|NAN))$'); + + function resolveYamlFloat(data) { + if (data === null) return false; + + if (!YAML_FLOAT_PATTERN.test(data) || + // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === '_') { + return false; + } + + return true; + } + + function constructYamlFloat(data) { + var value, sign, base, digits; + + value = data.replace(/_/g, '').toLowerCase(); + sign = value[0] === '-' ? -1 : 1; + digits = []; + + if ('+-'.indexOf(value[0]) >= 0) { + value = value.slice(1); + } + + if (value === '.inf') { + return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + + } else if (value === '.nan') { + return NaN; + + } else if (value.indexOf(':') >= 0) { + value.split(':').forEach(function (v) { + digits.unshift(parseFloat(v, 10)); + }); + + value = 0.0; + base = 1; + + digits.forEach(function (d) { + value += d * base; + base *= 60; + }); + + return sign * value; + + } + return sign * parseFloat(value, 10); + } + + + var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + + function representYamlFloat(object, style) { + var res; + + if (isNaN(object)) { + switch (style) { + case 'lowercase': return '.nan'; + case 'uppercase': return '.NAN'; + case 'camelcase': return '.NaN'; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '.inf'; + case 'uppercase': return '.INF'; + case 'camelcase': return '.Inf'; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '-.inf'; + case 'uppercase': return '-.INF'; + case 'camelcase': return '-.Inf'; + } + } else if (common$2.isNegativeZero(object)) { + return '-0.0'; + } + + res = object.toString(10); + + // JS stringifier can build scientific format without dots: 5e-100, + // while YAML requres dot: 5.e-100. Fix it with simple hack + + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; + } + + function isFloat(object) { + return (Object.prototype.toString.call(object) === '[object Number]') && + (object % 1 !== 0 || common$2.isNegativeZero(object)); + } + + var float = new Type$9('tag:yaml.org,2002:float', { + kind: 'scalar', + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: 'lowercase' + }); + + var Schema$3 = schema; + + + var json = new Schema$3({ + include: [ + failsafe + ], + implicit: [ + _null, + bool, + int, + float + ] + }); + + var Schema$2 = schema; + + + var core = new Schema$2({ + include: [ + json + ] + }); + + var Type$8 = type; + + var YAML_DATE_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9])' + // [2] month + '-([0-9][0-9])$'); // [3] day + + var YAML_TIMESTAMP_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9]?)' + // [2] month + '-([0-9][0-9]?)' + // [3] day + '(?:[Tt]|[ \\t]+)' + // ... + '([0-9][0-9]?)' + // [4] hour + ':([0-9][0-9])' + // [5] minute + ':([0-9][0-9])' + // [6] second + '(?:\\.([0-9]*))?' + // [7] fraction + '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour + '(?::([0-9][0-9]))?))?$'); // [11] tz_minute + + function resolveYamlTimestamp(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; + } + + function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, + delta = null, tz_hour, tz_minute, date; + + match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + + if (match === null) throw new Error('Date resolve error'); + + // match: [1] year [2] month [3] day + + year = +(match[1]); + month = +(match[2]) - 1; // JS month starts with 0 + day = +(match[3]); + + if (!match[4]) { // no hour + return new Date(Date.UTC(year, month, day)); + } + + // match: [4] hour [5] minute [6] second [7] fraction + + hour = +(match[4]); + minute = +(match[5]); + second = +(match[6]); + + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { // milli-seconds + fraction += '0'; + } + fraction = +fraction; + } + + // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute + + if (match[9]) { + tz_hour = +(match[10]); + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds + if (match[9] === '-') delta = -delta; + } + + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + + if (delta) date.setTime(date.getTime() - delta); + + return date; + } + + function representYamlTimestamp(object /*, style*/) { + return object.toISOString(); + } + + var timestamp = new Type$8('tag:yaml.org,2002:timestamp', { + kind: 'scalar', + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp + }); + + var Type$7 = type; + + function resolveYamlMerge(data) { + return data === '<<' || data === null; + } + + var merge = new Type$7('tag:yaml.org,2002:merge', { + kind: 'scalar', + resolve: resolveYamlMerge + }); + + function commonjsRequire(path) { + throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); + } + + /*eslint-disable no-bitwise*/ + + var NodeBuffer; + + try { + // A trick for browserified version, to not include `Buffer` shim + var _require$1 = commonjsRequire; + NodeBuffer = _require$1('buffer').Buffer; + } catch (__) {} + + var Type$6 = type; + + + // [ 64, 65, 66 ] -> [ padding, CR, LF ] + var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; + + + function resolveYamlBinary(data) { + if (data === null) return false; + + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + + // Convert one by one. + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + + // Skip CR/LF + if (code > 64) continue; + + // Fail on illegal characters + if (code < 0) return false; + + bitlen += 6; + } + + // If there are any bits left, source was corrupted + return (bitlen % 8) === 0; + } + + function constructYamlBinary(data) { + var idx, tailbits, + input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan + max = input.length, + map = BASE64_MAP, + bits = 0, + result = []; + + // Collect by 6*4 bits (3 bytes) + + for (idx = 0; idx < max; idx++) { + if ((idx % 4 === 0) && idx) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } + + bits = (bits << 6) | map.indexOf(input.charAt(idx)); + } + + // Dump tail + + tailbits = (max % 4) * 6; + + if (tailbits === 0) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } else if (tailbits === 18) { + result.push((bits >> 10) & 0xFF); + result.push((bits >> 2) & 0xFF); + } else if (tailbits === 12) { + result.push((bits >> 4) & 0xFF); + } + + // Wrap into Buffer for NodeJS and leave Array for browser + if (NodeBuffer) { + // Support node 6.+ Buffer API when available + return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result); + } + + return result; + } + + function representYamlBinary(object /*, style*/) { + var result = '', bits = 0, idx, tail, + max = object.length, + map = BASE64_MAP; + + // Convert every three bytes to 4 ASCII characters. + + for (idx = 0; idx < max; idx++) { + if ((idx % 3 === 0) && idx) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } + + bits = (bits << 8) + object[idx]; + } + + // Dump tail + + tail = max % 3; + + if (tail === 0) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } else if (tail === 2) { + result += map[(bits >> 10) & 0x3F]; + result += map[(bits >> 4) & 0x3F]; + result += map[(bits << 2) & 0x3F]; + result += map[64]; + } else if (tail === 1) { + result += map[(bits >> 2) & 0x3F]; + result += map[(bits << 4) & 0x3F]; + result += map[64]; + result += map[64]; + } + + return result; + } + + function isBinary(object) { + return NodeBuffer && NodeBuffer.isBuffer(object); + } + + var binary = new Type$6('tag:yaml.org,2002:binary', { + kind: 'scalar', + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary + }); + + var Type$5 = type; + + var _hasOwnProperty$3 = Object.prototype.hasOwnProperty; + var _toString$2 = Object.prototype.toString; + + function resolveYamlOmap(data) { + if (data === null) return true; + + var objectKeys = [], index, length, pair, pairKey, pairHasKey, + object = data; + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + + if (_toString$2.call(pair) !== '[object Object]') return false; + + for (pairKey in pair) { + if (_hasOwnProperty$3.call(pair, pairKey)) { + if (!pairHasKey) pairHasKey = true; + else return false; + } + } + + if (!pairHasKey) return false; + + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + + return true; + } + + function constructYamlOmap(data) { + return data !== null ? data : []; + } + + var omap = new Type$5('tag:yaml.org,2002:omap', { + kind: 'sequence', + resolve: resolveYamlOmap, + construct: constructYamlOmap + }); + + var Type$4 = type; + + var _toString$1 = Object.prototype.toString; + + function resolveYamlPairs(data) { + if (data === null) return true; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + if (_toString$1.call(pair) !== '[object Object]') return false; + + keys = Object.keys(pair); + + if (keys.length !== 1) return false; + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return true; + } + + function constructYamlPairs(data) { + if (data === null) return []; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + keys = Object.keys(pair); + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return result; + } + + var pairs = new Type$4('tag:yaml.org,2002:pairs', { + kind: 'sequence', + resolve: resolveYamlPairs, + construct: constructYamlPairs + }); + + var Type$3 = type; + + var _hasOwnProperty$2 = Object.prototype.hasOwnProperty; + + function resolveYamlSet(data) { + if (data === null) return true; + + var key, object = data; + + for (key in object) { + if (_hasOwnProperty$2.call(object, key)) { + if (object[key] !== null) return false; + } + } + + return true; + } + + function constructYamlSet(data) { + return data !== null ? data : {}; + } + + var set = new Type$3('tag:yaml.org,2002:set', { + kind: 'mapping', + resolve: resolveYamlSet, + construct: constructYamlSet + }); + + var Schema$1 = schema; + + + var default_safe = new Schema$1({ + include: [ + core + ], + implicit: [ + timestamp, + merge + ], + explicit: [ + binary, + omap, + pairs, + set + ] + }); + + var Type$2 = type; + + function resolveJavascriptUndefined() { + return true; + } + + function constructJavascriptUndefined() { + /*eslint-disable no-undefined*/ + return undefined; + } + + function representJavascriptUndefined() { + return ''; + } + + function isUndefined(object) { + return typeof object === 'undefined'; + } + + var _undefined = new Type$2('tag:yaml.org,2002:js/undefined', { + kind: 'scalar', + resolve: resolveJavascriptUndefined, + construct: constructJavascriptUndefined, + predicate: isUndefined, + represent: representJavascriptUndefined + }); + + var Type$1 = type; + + function resolveJavascriptRegExp(data) { + if (data === null) return false; + if (data.length === 0) return false; + + var regexp = data, + tail = /\/([gim]*)$/.exec(data), + modifiers = ''; + + // if regexp starts with '/' it can have modifiers and must be properly closed + // `/foo/gim` - modifiers tail can be maximum 3 chars + if (regexp[0] === '/') { + if (tail) modifiers = tail[1]; + + if (modifiers.length > 3) return false; + // if expression starts with /, is should be properly terminated + if (regexp[regexp.length - modifiers.length - 1] !== '/') return false; + } + + return true; + } + + function constructJavascriptRegExp(data) { + var regexp = data, + tail = /\/([gim]*)$/.exec(data), + modifiers = ''; + + // `/foo/gim` - tail can be maximum 4 chars + if (regexp[0] === '/') { + if (tail) modifiers = tail[1]; + regexp = regexp.slice(1, regexp.length - modifiers.length - 1); + } + + return new RegExp(regexp, modifiers); + } + + function representJavascriptRegExp(object /*, style*/) { + var result = '/' + object.source + '/'; + + if (object.global) result += 'g'; + if (object.multiline) result += 'm'; + if (object.ignoreCase) result += 'i'; + + return result; + } + + function isRegExp(object) { + return Object.prototype.toString.call(object) === '[object RegExp]'; + } + + var regexp = new Type$1('tag:yaml.org,2002:js/regexp', { + kind: 'scalar', + resolve: resolveJavascriptRegExp, + construct: constructJavascriptRegExp, + predicate: isRegExp, + represent: representJavascriptRegExp + }); + + var esprima; + + // Browserified version does not have esprima + // + // 1. For node.js just require module as deps + // 2. For browser try to require mudule via external AMD system. + // If not found - try to fallback to window.esprima. If not + // found too - then fail to parse. + // + try { + // workaround to exclude package from browserify list. + var _require = commonjsRequire; + esprima = _require('esprima'); + } catch (_) { + /* eslint-disable no-redeclare */ + /* global window */ + if (typeof window !== 'undefined') esprima = window.esprima; + } + + var Type = type; + + function resolveJavascriptFunction(data) { + if (data === null) return false; + + try { + var source = '(' + data + ')', + ast = esprima.parse(source, { range: true }); + + if (ast.type !== 'Program' || + ast.body.length !== 1 || + ast.body[0].type !== 'ExpressionStatement' || + (ast.body[0].expression.type !== 'ArrowFunctionExpression' && + ast.body[0].expression.type !== 'FunctionExpression')) { + return false; + } + + return true; + } catch (err) { + return false; + } + } + + function constructJavascriptFunction(data) { + /*jslint evil:true*/ + + var source = '(' + data + ')', + ast = esprima.parse(source, { range: true }), + params = [], + body; + + if (ast.type !== 'Program' || + ast.body.length !== 1 || + ast.body[0].type !== 'ExpressionStatement' || + (ast.body[0].expression.type !== 'ArrowFunctionExpression' && + ast.body[0].expression.type !== 'FunctionExpression')) { + throw new Error('Failed to resolve function'); + } + + ast.body[0].expression.params.forEach(function (param) { + params.push(param.name); + }); + + body = ast.body[0].expression.body.range; + + // Esprima's ranges include the first '{' and the last '}' characters on + // function expressions. So cut them out. + if (ast.body[0].expression.body.type === 'BlockStatement') { + /*eslint-disable no-new-func*/ + return new Function(params, source.slice(body[0] + 1, body[1] - 1)); + } + // ES6 arrow functions can omit the BlockStatement. In that case, just return + // the body. + /*eslint-disable no-new-func*/ + return new Function(params, 'return ' + source.slice(body[0], body[1])); + } + + function representJavascriptFunction(object /*, style*/) { + return object.toString(); + } + + function isFunction(object) { + return Object.prototype.toString.call(object) === '[object Function]'; + } + + var _function = new Type('tag:yaml.org,2002:js/function', { + kind: 'scalar', + resolve: resolveJavascriptFunction, + construct: constructJavascriptFunction, + predicate: isFunction, + represent: representJavascriptFunction + }); + + var Schema = schema; + + + var default_full = Schema.DEFAULT = new Schema({ + include: [ + default_safe + ], + explicit: [ + _undefined, + regexp, + _function + ] + }); + + /*eslint-disable max-len,no-use-before-define*/ + + var common$1 = common$6; + var YAMLException$1 = exception; + var Mark = mark; + var DEFAULT_SAFE_SCHEMA$1 = default_safe; + var DEFAULT_FULL_SCHEMA$1 = default_full; + + + var _hasOwnProperty$1 = Object.prototype.hasOwnProperty; + + + var CONTEXT_FLOW_IN = 1; + var CONTEXT_FLOW_OUT = 2; + var CONTEXT_BLOCK_IN = 3; + var CONTEXT_BLOCK_OUT = 4; + + + var CHOMPING_CLIP = 1; + var CHOMPING_STRIP = 2; + var CHOMPING_KEEP = 3; + + + var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; + var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; + var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; + var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + + + function _class(obj) { return Object.prototype.toString.call(obj); } + + function is_EOL(c) { + return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); + } + + function is_WHITE_SPACE(c) { + return (c === 0x09/* Tab */) || (c === 0x20/* Space */); + } + + function is_WS_OR_EOL(c) { + return (c === 0x09/* Tab */) || + (c === 0x20/* Space */) || + (c === 0x0A/* LF */) || + (c === 0x0D/* CR */); + } + + function is_FLOW_INDICATOR(c) { + return c === 0x2C/* , */ || + c === 0x5B/* [ */ || + c === 0x5D/* ] */ || + c === 0x7B/* { */ || + c === 0x7D/* } */; + } + + function fromHexCode(c) { + var lc; + + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + /*eslint-disable no-bitwise*/ + lc = c | 0x20; + + if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { + return lc - 0x61 + 10; + } + + return -1; + } + + function escapedHexLen(c) { + if (c === 0x78/* x */) { return 2; } + if (c === 0x75/* u */) { return 4; } + if (c === 0x55/* U */) { return 8; } + return 0; + } + + function fromDecimalCode(c) { + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + return -1; + } + + function simpleEscapeSequence(c) { + /* eslint-disable indent */ + return (c === 0x30/* 0 */) ? '\x00' : + (c === 0x61/* a */) ? '\x07' : + (c === 0x62/* b */) ? '\x08' : + (c === 0x74/* t */) ? '\x09' : + (c === 0x09/* Tab */) ? '\x09' : + (c === 0x6E/* n */) ? '\x0A' : + (c === 0x76/* v */) ? '\x0B' : + (c === 0x66/* f */) ? '\x0C' : + (c === 0x72/* r */) ? '\x0D' : + (c === 0x65/* e */) ? '\x1B' : + (c === 0x20/* Space */) ? ' ' : + (c === 0x22/* " */) ? '\x22' : + (c === 0x2F/* / */) ? '/' : + (c === 0x5C/* \ */) ? '\x5C' : + (c === 0x4E/* N */) ? '\x85' : + (c === 0x5F/* _ */) ? '\xA0' : + (c === 0x4C/* L */) ? '\u2028' : + (c === 0x50/* P */) ? '\u2029' : ''; + } + + function charFromCodepoint(c) { + if (c <= 0xFFFF) { + return String.fromCharCode(c); + } + // Encode UTF-16 surrogate pair + // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF + return String.fromCharCode( + ((c - 0x010000) >> 10) + 0xD800, + ((c - 0x010000) & 0x03FF) + 0xDC00 + ); + } + + var simpleEscapeCheck = new Array(256); // integer, for fast access + var simpleEscapeMap = new Array(256); + for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); + } + + + function State$1(input, options) { + this.input = input; + + this.filename = options['filename'] || null; + this.schema = options['schema'] || DEFAULT_FULL_SCHEMA$1; + this.onWarning = options['onWarning'] || null; + this.legacy = options['legacy'] || false; + this.json = options['json'] || false; + this.listener = options['listener'] || null; + + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + + this.documents = []; + + /* + this.version; + this.checkLineBreaks; + this.tagMap; + this.anchorMap; + this.tag; + this.anchor; + this.kind; + this.result;*/ + + } + + + function generateError(state, message) { + return new YAMLException$1( + message, + new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart))); + } + + function throwError(state, message) { + throw generateError(state, message); + } + + function throwWarning(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message)); + } + } + + + var directiveHandlers = { + + YAML: function handleYamlDirective(state, name, args) { + + var match, major, minor; + + if (state.version !== null) { + throwError(state, 'duplication of %YAML directive'); + } + + if (args.length !== 1) { + throwError(state, 'YAML directive accepts exactly one argument'); + } + + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + + if (match === null) { + throwError(state, 'ill-formed argument of the YAML directive'); + } + + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + + if (major !== 1) { + throwError(state, 'unacceptable YAML version of the document'); + } + + state.version = args[0]; + state.checkLineBreaks = (minor < 2); + + if (minor !== 1 && minor !== 2) { + throwWarning(state, 'unsupported YAML version of the document'); + } + }, + + TAG: function handleTagDirective(state, name, args) { + + var handle, prefix; + + if (args.length !== 2) { + throwError(state, 'TAG directive accepts exactly two arguments'); + } + + handle = args[0]; + prefix = args[1]; + + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); + } + + if (_hasOwnProperty$1.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); + } + + state.tagMap[handle] = prefix; + } + }; + + + function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + + if (start < end) { + _result = state.input.slice(start, end); + + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 0x09 || + (0x20 <= _character && _character <= 0x10FFFF))) { + throwError(state, 'expected valid JSON character'); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, 'the stream contains non-printable characters'); + } + + state.result += _result; + } + } + + function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + + if (!common$1.isObject(source)) { + throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); + } + + sourceKeys = Object.keys(source); + + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + + if (!_hasOwnProperty$1.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } + } + + function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) { + var index, quantity; + + // The output is a plain object here, so keys can only be strings. + // We need to convert keyNode to a string, but doing so can hang the process + // (deeply nested arrays that explode exponentially using aliases). + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) { + throwError(state, 'nested arrays are not supported inside keys'); + } + + if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { + keyNode[index] = '[object Object]'; + } + } + } + + // Avoid code execution in load() via toString property + // (still use its own toString for arrays, timestamps, + // and whatever user schema extensions happen to have @@toStringTag) + if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { + keyNode = '[object Object]'; + } + + + keyNode = String(keyNode); + + if (_result === null) { + _result = {}; + } + + if (keyTag === 'tag:yaml.org,2002:merge') { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && + !_hasOwnProperty$1.call(overridableKeys, keyNode) && + _hasOwnProperty$1.call(_result, keyNode)) { + state.line = startLine || state.line; + state.position = startPos || state.position; + throwError(state, 'duplicated mapping key'); + } + _result[keyNode] = valueNode; + delete overridableKeys[keyNode]; + } + + return _result; + } + + function readLineBreak(state) { + var ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x0A/* LF */) { + state.position++; + } else if (ch === 0x0D/* CR */) { + state.position++; + if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { + state.position++; + } + } else { + throwError(state, 'a line break is expected'); + } + + state.line += 1; + state.lineStart = state.position; + } + + function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (allowComments && ch === 0x23/* # */) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); + } + + if (is_EOL(ch)) { + readLineBreak(state); + + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + + while (ch === 0x20/* Space */) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, 'deficient indentation'); + } + + return lineBreaks; + } + + function testDocumentSeparator(state) { + var _position = state.position, + ch; + + ch = state.input.charCodeAt(_position); + + // Condition state.position === state.lineStart is tested + // in parent on each call, for efficiency. No needs to test here again. + if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && + ch === state.input.charCodeAt(_position + 1) && + ch === state.input.charCodeAt(_position + 2)) { + + _position += 3; + + ch = state.input.charCodeAt(_position); + + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + + return false; + } + + function writeFoldedLines(state, count) { + if (count === 1) { + state.result += ' '; + } else if (count > 1) { + state.result += common$1.repeat('\n', count - 1); + } + } + + + function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, + following, + captureStart, + captureEnd, + hasPendingContent, + _line, + _lineStart, + _lineIndent, + _kind = state.kind, + _result = state.result, + ch; + + ch = state.input.charCodeAt(state.position); + + if (is_WS_OR_EOL(ch) || + is_FLOW_INDICATOR(ch) || + ch === 0x23/* # */ || + ch === 0x26/* & */ || + ch === 0x2A/* * */ || + ch === 0x21/* ! */ || + ch === 0x7C/* | */ || + ch === 0x3E/* > */ || + ch === 0x27/* ' */ || + ch === 0x22/* " */ || + ch === 0x25/* % */ || + ch === 0x40/* @ */ || + ch === 0x60/* ` */) { + return false; + } + + if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + + state.kind = 'scalar'; + state.result = ''; + captureStart = captureEnd = state.position; + hasPendingContent = false; + + while (ch !== 0) { + if (ch === 0x3A/* : */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + + } else if (ch === 0x23/* # */) { + preceding = state.input.charCodeAt(state.position - 1); + + if (is_WS_OR_EOL(preceding)) { + break; + } + + } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || + withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, captureEnd, false); + + if (state.result) { + return true; + } + + state.kind = _kind; + state.result = _result; + return false; + } + + function readSingleQuotedScalar(state, nodeIndent) { + var ch, + captureStart, captureEnd; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x27/* ' */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x27/* ' */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x27/* ' */) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a single quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a single quoted scalar'); + } + + function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, + captureEnd, + hexLength, + hexResult, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x22/* " */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x22/* " */) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + + } else if (ch === 0x5C/* \ */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + + // TODO: rework to inline fn with no type cast? + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + + } else { + throwError(state, 'expected hexadecimal character'); + } + } + + state.result += charFromCodepoint(hexResult); + + state.position++; + + } else { + throwError(state, 'unknown escape sequence'); + } + + captureStart = captureEnd = state.position; + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a double quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a double quoted scalar'); + } + + function readFlowCollection(state, nodeIndent) { + var readNext = true, + _line, + _tag = state.tag, + _result, + _anchor = state.anchor, + following, + terminator, + isPair, + isExplicitPair, + isMapping, + overridableKeys = {}, + keyNode, + keyTag, + valueNode, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x5B/* [ */) { + terminator = 0x5D;/* ] */ + isMapping = false; + _result = []; + } else if (ch === 0x7B/* { */) { + terminator = 0x7D;/* } */ + isMapping = true; + _result = {}; + } else { + return false; + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(++state.position); + + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? 'mapping' : 'sequence'; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, 'missed comma between flow collection entries'); + } + + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + + if (ch === 0x3F/* ? */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode)); + } else { + _result.push(keyNode); + } + + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x2C/* , */) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + + throwError(state, 'unexpected end of the stream within a flow collection'); + } + + function readBlockScalar(state, nodeIndent) { + var captureStart, + folding, + chomping = CHOMPING_CLIP, + didReadContent = false, + detectedIndent = false, + textIndent = nodeIndent, + emptyLines = 0, + atMoreIndented = false, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x7C/* | */) { + folding = false; + } else if (ch === 0x3E/* > */) { + folding = true; + } else { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { + if (CHOMPING_CLIP === chomping) { + chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, 'repeat of a chomping mode identifier'); + } + + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, 'repeat of an indentation width identifier'); + } + + } else { + break; + } + } + + if (is_WHITE_SPACE(ch)) { + do { ch = state.input.charCodeAt(++state.position); } + while (is_WHITE_SPACE(ch)); + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (!is_EOL(ch) && (ch !== 0)); + } + } + + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + + ch = state.input.charCodeAt(state.position); + + while ((!detectedIndent || state.lineIndent < textIndent) && + (ch === 0x20/* Space */)) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + + if (is_EOL(ch)) { + emptyLines++; + continue; + } + + // End of the scalar. + if (state.lineIndent < textIndent) { + + // Perform the chomping. + if (chomping === CHOMPING_KEEP) { + state.result += common$1.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { // i.e. only if the scalar is not empty. + state.result += '\n'; + } + } + + // Break this `while` cycle and go to the funciton's epilogue. + break; + } + + // Folded style: use fancy rules to handle line breaks. + if (folding) { + + // Lines starting with white space characters (more-indented lines) are not folded. + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + // except for the first content line (cf. Example 8.1) + state.result += common$1.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + + // End of more-indented block. + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common$1.repeat('\n', emptyLines + 1); + + // Just one line break - perceive as the same line. + } else if (emptyLines === 0) { + if (didReadContent) { // i.e. only if we have already read some scalar content. + state.result += ' '; + } + + // Several line breaks - perceive as different lines. + } else { + state.result += common$1.repeat('\n', emptyLines); + } + + // Literal style: just add exact number of line breaks between content lines. + } else { + // Keep all line breaks except the header line break. + state.result += common$1.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } + + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + + while (!is_EOL(ch) && (ch !== 0)) { + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, state.position, false); + } + + return true; + } + + function readBlockSequence(state, nodeIndent) { + var _line, + _tag = state.tag, + _anchor = state.anchor, + _result = [], + following, + detected = false, + ch; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + + if (ch !== 0x2D/* - */) { + break; + } + + following = state.input.charCodeAt(state.position + 1); + + if (!is_WS_OR_EOL(following)) { + break; + } + + detected = true; + state.position++; + + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a sequence entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'sequence'; + state.result = _result; + return true; + } + return false; + } + + function readBlockMapping(state, nodeIndent, flowIndent) { + var following, + allowCompact, + _line, + _pos, + _tag = state.tag, + _anchor = state.anchor, + _result = {}, + overridableKeys = {}, + keyTag = null, + keyNode = null, + valueNode = null, + atExplicitKey = false, + detected = false, + ch; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + following = state.input.charCodeAt(state.position + 1); + _line = state.line; // Save the current line. + _pos = state.position; + + // + // Explicit notation case. There are two separate blocks: + // first for the key (denoted by "?") and second for the value (denoted by ":") + // + if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { + + if (ch === 0x3F/* ? */) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = true; + allowCompact = true; + + } else if (atExplicitKey) { + // i.e. 0x3A/* : */ === character after the explicit key. + atExplicitKey = false; + allowCompact = true; + + } else { + throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); + } + + state.position += 1; + ch = following; + + // + // Implicit notation case. Flow-style node as the key first, then ":", and the value. + // + } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x3A/* : */) { + ch = state.input.charCodeAt(++state.position); + + if (!is_WS_OR_EOL(ch)) { + throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); + } + + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + + } else if (detected) { + throwError(state, 'can not read an implicit mapping pair; a colon is missed'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else if (detected) { + throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else { + break; // Reading is done. Go to the epilogue. + } + + // + // Common reading code for both explicit and implicit notations. + // + if (state.line === _line || state.lineIndent > nodeIndent) { + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos); + keyTag = keyNode = valueNode = null; + } + + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + + if (state.lineIndent > nodeIndent && (ch !== 0)) { + throwError(state, 'bad indentation of a mapping entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + // + // Epilogue. + // + + // Special case: last mapping's node contains only the key in explicit notation. + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + } + + // Expose the resulting mapping. + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'mapping'; + state.result = _result; + } + + return detected; + } + + function readTagProperty(state) { + var _position, + isVerbatim = false, + isNamed = false, + tagHandle, + tagName, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x21/* ! */) return false; + + if (state.tag !== null) { + throwError(state, 'duplication of a tag property'); + } + + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x3C/* < */) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + + } else if (ch === 0x21/* ! */) { + isNamed = true; + tagHandle = '!!'; + ch = state.input.charCodeAt(++state.position); + + } else { + tagHandle = '!'; + } + + _position = state.position; + + if (isVerbatim) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && ch !== 0x3E/* > */); + + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, 'unexpected end of the stream within a verbatim tag'); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + + if (ch === 0x21/* ! */) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, 'named tag handle cannot contain such characters'); + } + + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, 'tag suffix cannot contain exclamation marks'); + } + } + + ch = state.input.charCodeAt(++state.position); + } + + tagName = state.input.slice(_position, state.position); + + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, 'tag suffix cannot contain flow indicator characters'); + } + } + + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, 'tag name cannot contain such characters: ' + tagName); + } + + if (isVerbatim) { + state.tag = tagName; + + } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + + } else if (tagHandle === '!') { + state.tag = '!' + tagName; + + } else if (tagHandle === '!!') { + state.tag = 'tag:yaml.org,2002:' + tagName; + + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + + return true; + } + + function readAnchorProperty(state) { + var _position, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x26/* & */) return false; + + if (state.anchor !== null) { + throwError(state, 'duplication of an anchor property'); + } + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an anchor node must contain at least one character'); + } + + state.anchor = state.input.slice(_position, state.position); + return true; + } + + function readAlias(state) { + var _position, alias, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x2A/* * */) return false; + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an alias node must contain at least one character'); + } + + alias = state.input.slice(_position, state.position); + + if (!_hasOwnProperty$1.call(state.anchorMap, alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; + } + + function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, + allowBlockScalars, + allowBlockCollections, + indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this<parent + atNewLine = false, + hasContent = false, + typeIndex, + typeQuantity, + type, + flowIndent, + blockIndent; + + if (state.listener !== null) { + state.listener('open', state); + } + + state.tag = null; + state.anchor = null; + state.kind = null; + state.result = null; + + allowBlockStyles = allowBlockScalars = allowBlockCollections = + CONTEXT_BLOCK_OUT === nodeContext || + CONTEXT_BLOCK_IN === nodeContext; + + if (allowToSeek) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + + blockIndent = state.position - state.lineStart; + + if (indentStatus === 1) { + if (allowBlockCollections && + (readBlockSequence(state, blockIndent) || + readBlockMapping(state, blockIndent, flowIndent)) || + readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || + readSingleQuotedScalar(state, flowIndent) || + readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + + } else if (readAlias(state)) { + hasContent = true; + + if (state.tag !== null || state.anchor !== null) { + throwError(state, 'alias node should not have any properties'); + } + + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + + if (state.tag === null) { + state.tag = '?'; + } + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + // Special case: block sequences are allowed to have same indentation level as the parent. + // http://www.yaml.org/spec/1.2/spec.html#id2799784 + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + + if (state.tag !== null && state.tag !== '!') { + if (state.tag === '?') { + // Implicit resolving is not allowed for non-scalar types, and '?' + // non-specific tag is only automatically assigned to plain scalars. + // + // We only need to check kind conformity in case user explicitly assigns '?' + // tag, for example like this: "!<?> [0]" + // + if (state.result !== null && state.kind !== 'scalar') { + throwError(state, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + state.kind + '"'); + } + + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + + if (type.resolve(state.result)) { // `state.result` updated in resolver if matched + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (_hasOwnProperty$1.call(state.typeMap[state.kind || 'fallback'], state.tag)) { + type = state.typeMap[state.kind || 'fallback'][state.tag]; + + if (state.result !== null && type.kind !== state.kind) { + throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + + if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched + throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); + } else { + state.result = type.construct(state.result); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else { + throwError(state, 'unknown tag !<' + state.tag + '>'); + } + } + + if (state.listener !== null) { + state.listener('close', state); + } + return state.tag !== null || state.anchor !== null || hasContent; + } + + function readDocument(state) { + var documentStart = state.position, + _position, + directiveName, + directiveArgs, + hasDirectives = false, + ch; + + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = {}; + state.anchorMap = {}; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if (state.lineIndent > 0 || ch !== 0x25/* % */) { + break; + } + + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + + if (directiveName.length < 1) { + throwError(state, 'directive name must not be less than one character in length'); + } + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && !is_EOL(ch)); + break; + } + + if (is_EOL(ch)) break; + + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveArgs.push(state.input.slice(_position, state.position)); + } + + if (ch !== 0) readLineBreak(state); + + if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + + skipSeparationSpace(state, true, -1); + + if (state.lineIndent === 0 && + state.input.charCodeAt(state.position) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + + } else if (hasDirectives) { + throwError(state, 'directives end mark is expected'); + } + + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + + if (state.checkLineBreaks && + PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, 'non-ASCII line breaks are interpreted as content'); + } + + state.documents.push(state.result); + + if (state.position === state.lineStart && testDocumentSeparator(state)) { + + if (state.input.charCodeAt(state.position) === 0x2E/* . */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + + if (state.position < (state.length - 1)) { + throwError(state, 'end of the stream or a document separator is expected'); + } else { + return; + } + } + + + function loadDocuments(input, options) { + input = String(input); + options = options || {}; + + if (input.length !== 0) { + + // Add tailing `\n` if not exists + if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && + input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { + input += '\n'; + } + + // Strip BOM + if (input.charCodeAt(0) === 0xFEFF) { + input = input.slice(1); + } + } + + var state = new State$1(input, options); + + var nullpos = input.indexOf('\0'); + + if (nullpos !== -1) { + state.position = nullpos; + throwError(state, 'null byte is not allowed in input'); + } + + // Use 0 as string terminator. That significantly simplifies bounds check. + state.input += '\0'; + + while (state.input.charCodeAt(state.position) === 0x20/* Space */) { + state.lineIndent += 1; + state.position += 1; + } + + while (state.position < (state.length - 1)) { + readDocument(state); + } + + return state.documents; + } + + + function loadAll(input, iterator, options) { + if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { + options = iterator; + iterator = null; + } + + var documents = loadDocuments(input, options); + + if (typeof iterator !== 'function') { + return documents; + } + + for (var index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } + } + + + function load(input, options) { + var documents = loadDocuments(input, options); + + if (documents.length === 0) { + /*eslint-disable no-undefined*/ + return undefined; + } else if (documents.length === 1) { + return documents[0]; + } + throw new YAMLException$1('expected a single document in the stream, but found more'); + } + + + function safeLoadAll(input, iterator, options) { + if (typeof iterator === 'object' && iterator !== null && typeof options === 'undefined') { + options = iterator; + iterator = null; + } + + return loadAll(input, iterator, common$1.extend({ schema: DEFAULT_SAFE_SCHEMA$1 }, options)); + } + + + function safeLoad(input, options) { + return load(input, common$1.extend({ schema: DEFAULT_SAFE_SCHEMA$1 }, options)); + } + + + loader$1.loadAll = loadAll; + loader$1.load = load; + loader$1.safeLoadAll = safeLoadAll; + loader$1.safeLoad = safeLoad; + + var dumper$1 = {}; + + /*eslint-disable no-use-before-define*/ + + var common = common$6; + var YAMLException = exception; + var DEFAULT_FULL_SCHEMA = default_full; + var DEFAULT_SAFE_SCHEMA = default_safe; + + var _toString = Object.prototype.toString; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + + var CHAR_TAB = 0x09; /* Tab */ + var CHAR_LINE_FEED = 0x0A; /* LF */ + var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ + var CHAR_SPACE = 0x20; /* Space */ + var CHAR_EXCLAMATION = 0x21; /* ! */ + var CHAR_DOUBLE_QUOTE = 0x22; /* " */ + var CHAR_SHARP = 0x23; /* # */ + var CHAR_PERCENT = 0x25; /* % */ + var CHAR_AMPERSAND = 0x26; /* & */ + var CHAR_SINGLE_QUOTE = 0x27; /* ' */ + var CHAR_ASTERISK = 0x2A; /* * */ + var CHAR_COMMA = 0x2C; /* , */ + var CHAR_MINUS = 0x2D; /* - */ + var CHAR_COLON = 0x3A; /* : */ + var CHAR_EQUALS = 0x3D; /* = */ + var CHAR_GREATER_THAN = 0x3E; /* > */ + var CHAR_QUESTION = 0x3F; /* ? */ + var CHAR_COMMERCIAL_AT = 0x40; /* @ */ + var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ + var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ + var CHAR_GRAVE_ACCENT = 0x60; /* ` */ + var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ + var CHAR_VERTICAL_LINE = 0x7C; /* | */ + var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ + + var ESCAPE_SEQUENCES = {}; + + ESCAPE_SEQUENCES[0x00] = '\\0'; + ESCAPE_SEQUENCES[0x07] = '\\a'; + ESCAPE_SEQUENCES[0x08] = '\\b'; + ESCAPE_SEQUENCES[0x09] = '\\t'; + ESCAPE_SEQUENCES[0x0A] = '\\n'; + ESCAPE_SEQUENCES[0x0B] = '\\v'; + ESCAPE_SEQUENCES[0x0C] = '\\f'; + ESCAPE_SEQUENCES[0x0D] = '\\r'; + ESCAPE_SEQUENCES[0x1B] = '\\e'; + ESCAPE_SEQUENCES[0x22] = '\\"'; + ESCAPE_SEQUENCES[0x5C] = '\\\\'; + ESCAPE_SEQUENCES[0x85] = '\\N'; + ESCAPE_SEQUENCES[0xA0] = '\\_'; + ESCAPE_SEQUENCES[0x2028] = '\\L'; + ESCAPE_SEQUENCES[0x2029] = '\\P'; + + var DEPRECATED_BOOLEANS_SYNTAX = [ + 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', + 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' + ]; + + function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; + + if (map === null) return {}; + + result = {}; + keys = Object.keys(map); + + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + + if (tag.slice(0, 2) === '!!') { + tag = 'tag:yaml.org,2002:' + tag.slice(2); + } + type = schema.compiledTypeMap['fallback'][tag]; + + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + + result[tag] = style; + } + + return result; + } + + function encodeHex(character) { + var string, handle, length; + + string = character.toString(16).toUpperCase(); + + if (character <= 0xFF) { + handle = 'x'; + length = 2; + } else if (character <= 0xFFFF) { + handle = 'u'; + length = 4; + } else if (character <= 0xFFFFFFFF) { + handle = 'U'; + length = 8; + } else { + throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); + } + + return '\\' + handle + common.repeat('0', length - string.length) + string; + } + + function State(options) { + this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; + this.indent = Math.max(1, (options['indent'] || 2)); + this.noArrayIndent = options['noArrayIndent'] || false; + this.skipInvalid = options['skipInvalid'] || false; + this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); + this.styleMap = compileStyleMap(this.schema, options['styles'] || null); + this.sortKeys = options['sortKeys'] || false; + this.lineWidth = options['lineWidth'] || 80; + this.noRefs = options['noRefs'] || false; + this.noCompatMode = options['noCompatMode'] || false; + this.condenseFlow = options['condenseFlow'] || false; + + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + + this.tag = null; + this.result = ''; + + this.duplicates = []; + this.usedDuplicates = null; + } + + // Indents every line in a string. Empty lines (\n only) are not indented. + function indentString(string, spaces) { + var ind = common.repeat(' ', spaces), + position = 0, + next = -1, + result = '', + line, + length = string.length; + + while (position < length) { + next = string.indexOf('\n', position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + + if (line.length && line !== '\n') result += ind; + + result += line; + } + + return result; + } + + function generateNextLine(state, level) { + return '\n' + common.repeat(' ', state.indent * level); + } + + function testImplicitResolving(state, str) { + var index, length, type; + + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + + if (type.resolve(str)) { + return true; + } + } + + return false; + } + + // [33] s-white ::= s-space | s-tab + function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; + } + + // Returns true if the character can be printed without escaping. + // From YAML 1.2: "any allowed characters known to be non-printable + // should also be escaped. [However,] This isn’t mandatory" + // Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. + function isPrintable(c) { + return (0x00020 <= c && c <= 0x00007E) + || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) + || ((0x0E000 <= c && c <= 0x00FFFD) && c !== 0xFEFF /* BOM */) + || (0x10000 <= c && c <= 0x10FFFF); + } + + // [34] ns-char ::= nb-char - s-white + // [27] nb-char ::= c-printable - b-char - c-byte-order-mark + // [26] b-char ::= b-line-feed | b-carriage-return + // [24] b-line-feed ::= #xA /* LF */ + // [25] b-carriage-return ::= #xD /* CR */ + // [3] c-byte-order-mark ::= #xFEFF + function isNsChar(c) { + return isPrintable(c) && !isWhitespace(c) + // byte-order-mark + && c !== 0xFEFF + // b-char + && c !== CHAR_CARRIAGE_RETURN + && c !== CHAR_LINE_FEED; + } + + // Simplified test for values allowed after the first character in plain style. + function isPlainSafe(c, prev) { + // Uses a subset of nb-char - c-flow-indicator - ":" - "#" + // where nb-char ::= c-printable - b-char - c-byte-order-mark. + return isPrintable(c) && c !== 0xFEFF + // - c-flow-indicator + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // - ":" - "#" + // /* An ns-char preceding */ "#" + && c !== CHAR_COLON + && ((c !== CHAR_SHARP) || (prev && isNsChar(prev))); + } + + // Simplified test for values allowed as the first character in plain style. + function isPlainSafeFirst(c) { + // Uses a subset of ns-char - c-indicator + // where ns-char = nb-char - s-white. + return isPrintable(c) && c !== 0xFEFF + && !isWhitespace(c) // - s-white + // - (c-indicator ::= + // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” + && c !== CHAR_MINUS + && c !== CHAR_QUESTION + && c !== CHAR_COLON + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” + && c !== CHAR_SHARP + && c !== CHAR_AMPERSAND + && c !== CHAR_ASTERISK + && c !== CHAR_EXCLAMATION + && c !== CHAR_VERTICAL_LINE + && c !== CHAR_EQUALS + && c !== CHAR_GREATER_THAN + && c !== CHAR_SINGLE_QUOTE + && c !== CHAR_DOUBLE_QUOTE + // | “%” | “@” | “`”) + && c !== CHAR_PERCENT + && c !== CHAR_COMMERCIAL_AT + && c !== CHAR_GRAVE_ACCENT; + } + + // Determines whether block indentation indicator is required. + function needIndentIndicator(string) { + var leadingSpaceRe = /^\n* /; + return leadingSpaceRe.test(string); + } + + var STYLE_PLAIN = 1, + STYLE_SINGLE = 2, + STYLE_LITERAL = 3, + STYLE_FOLDED = 4, + STYLE_DOUBLE = 5; + + // Determines which scalar styles are possible and returns the preferred style. + // lineWidth = -1 => no limit. + // Pre-conditions: str.length > 0. + // Post-conditions: + // STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. + // STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). + // STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). + function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) { + var i; + var char, prev_char; + var hasLineBreak = false; + var hasFoldableLine = false; // only checked if shouldTrackWidth + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; // count the first line correctly + var plain = isPlainSafeFirst(string.charCodeAt(0)) + && !isWhitespace(string.charCodeAt(string.length - 1)); + + if (singleLineOnly) { + // Case: no block styles. + // Check for disallowed characters to rule out plain and single. + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + prev_char = i > 0 ? string.charCodeAt(i - 1) : null; + plain = plain && isPlainSafe(char, prev_char); + } + } else { + // Case: block styles permitted. + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + // Check if any line can be folded. + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || + // Foldable line = too long, and not more-indented. + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' '); + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + prev_char = i > 0 ? string.charCodeAt(i - 1) : null; + plain = plain && isPlainSafe(char, prev_char); + } + // in case the end is missing a \n + hasFoldableLine = hasFoldableLine || (shouldTrackWidth && + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' ')); + } + // Although every style can represent \n without escaping, prefer block styles + // for multiline, since they're more readable and they don't add empty lines. + // Also prefer folding a super-long line. + if (!hasLineBreak && !hasFoldableLine) { + // Strings interpretable as another type have to be quoted; + // e.g. the string 'true' vs. the boolean true. + return plain && !testAmbiguousType(string) + ? STYLE_PLAIN : STYLE_SINGLE; + } + // Edge case: block indentation indicator can only have one digit. + if (indentPerLevel > 9 && needIndentIndicator(string)) { + return STYLE_DOUBLE; + } + // At this point we know block styles are valid. + // Prefer literal style unless we want to fold. + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; + } + + // Note: line breaking/folding is implemented for only the folded style. + // NB. We drop the last trailing newline (if any) of a returned block scalar + // since the dumper adds its own newline. This always works: + // • No ending newline => unaffected; already using strip "-" chomping. + // • Ending newline => removed then restored. + // Importantly, this keeps the "+" chomp indicator from gaining an extra line. + function writeScalar(state, string, level, iskey) { + state.dump = (function () { + if (string.length === 0) { + return "''"; + } + if (!state.noCompatMode && + DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) { + return "'" + string + "'"; + } + + var indent = state.indent * Math.max(1, level); // no 0-indent scalars + // As indentation gets deeper, let the width decrease monotonically + // to the lower bound min(state.lineWidth, 40). + // Note that this implies + // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. + // state.lineWidth > 40 + state.indent: width decreases until the lower bound. + // This behaves better than a constant minimum width which disallows narrower options, + // or an indent threshold which causes the width to suddenly increase. + var lineWidth = state.lineWidth === -1 + ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + + // Without knowing if keys are implicit/explicit, assume implicit for safety. + var singleLineOnly = iskey + // No block styles in flow mode. + || (state.flowLevel > -1 && level >= state.flowLevel); + function testAmbiguity(string) { + return testImplicitResolving(state, string); + } + + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) { + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return '|' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return '>' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string) + '"'; + default: + throw new YAMLException('impossible error: invalid scalar style'); + } + }()); + } + + // Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. + function blockHeader(string, indentPerLevel) { + var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; + + // note the special case: the string '\n' counts as a "trailing" empty line. + var clip = string[string.length - 1] === '\n'; + var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); + var chomp = keep ? '+' : (clip ? '' : '-'); + + return indentIndicator + chomp + '\n'; + } + + // (See the note for writeScalar.) + function dropEndingNewline(string) { + return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; + } + + // Note: a long line without a suitable break point will exceed the width limit. + // Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. + function foldString(string, width) { + // In folded style, $k$ consecutive newlines output as $k+1$ newlines— + // unless they're before or after a more-indented line, or at the very + // beginning or end, in which case $k$ maps to $k$. + // Therefore, parse each chunk as newline(s) followed by a content line. + var lineRe = /(\n+)([^\n]*)/g; + + // first line (possibly an empty line) + var result = (function () { + var nextLF = string.indexOf('\n'); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }()); + // If we haven't reached the first content line yet, don't add an extra \n. + var prevMoreIndented = string[0] === '\n' || string[0] === ' '; + var moreIndented; + + // rest of the lines + var match; + while ((match = lineRe.exec(string))) { + var prefix = match[1], line = match[2]; + moreIndented = (line[0] === ' '); + result += prefix + + (!prevMoreIndented && !moreIndented && line !== '' + ? '\n' : '') + + foldLine(line, width); + prevMoreIndented = moreIndented; + } + + return result; + } + + // Greedy line breaking. + // Picks the longest line under the limit each time, + // otherwise settles for the shortest line over the limit. + // NB. More-indented lines *cannot* be folded, as that would add an extra \n. + function foldLine(line, width) { + if (line === '' || line[0] === ' ') return line; + + // Since a more-indented line adds a \n, breaks can't be followed by a space. + var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. + var match; + // start is an inclusive index. end, curr, and next are exclusive. + var start = 0, end, curr = 0, next = 0; + var result = ''; + + // Invariants: 0 <= start <= length-1. + // 0 <= curr <= next <= max(0, length-2). curr - start <= width. + // Inside the loop: + // A match implies length >= 2, so curr and next are <= length-2. + while ((match = breakRe.exec(line))) { + next = match.index; + // maintain invariant: curr - start <= width + if (next - start > width) { + end = (curr > start) ? curr : next; // derive end <= length-2 + result += '\n' + line.slice(start, end); + // skip the space that was output as \n + start = end + 1; // derive start <= length-1 + } + curr = next; + } + + // By the invariants, start <= length-1, so there is something left over. + // It is either the whole string or a part starting from non-whitespace. + result += '\n'; + // Insert a break if the remainder is too long and there is a break available. + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + '\n' + line.slice(curr + 1); + } else { + result += line.slice(start); + } + + return result.slice(1); // drop extra \n joiner + } + + // Escapes a double-quoted string. + function escapeString(string) { + var result = ''; + var char, nextChar; + var escapeSeq; + + for (var i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + // Check for surrogate pairs (reference Unicode 3.0 section "3.7 Surrogates"). + if (char >= 0xD800 && char <= 0xDBFF/* high surrogate */) { + nextChar = string.charCodeAt(i + 1); + if (nextChar >= 0xDC00 && nextChar <= 0xDFFF/* low surrogate */) { + // Combine the surrogate pair and store it escaped. + result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000); + // Advance index one extra since we already used that char here. + i++; continue; + } + } + escapeSeq = ESCAPE_SEQUENCES[char]; + result += !escapeSeq && isPrintable(char) + ? string[i] + : escapeSeq || encodeHex(char); + } + + return result; + } + + function writeFlowSequence(state, level, object) { + var _result = '', + _tag = state.tag, + index, + length; + + for (index = 0, length = object.length; index < length; index += 1) { + // Write only valid elements. + if (writeNode(state, level, object[index], false, false)) { + if (index !== 0) _result += ',' + (!state.condenseFlow ? ' ' : ''); + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = '[' + _result + ']'; + } + + function writeBlockSequence(state, level, object, compact) { + var _result = '', + _tag = state.tag, + index, + length; + + for (index = 0, length = object.length; index < length; index += 1) { + // Write only valid elements. + if (writeNode(state, level + 1, object[index], true, true)) { + if (!compact || index !== 0) { + _result += generateNextLine(state, level); + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += '-'; + } else { + _result += '- '; + } + + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = _result || '[]'; // Empty sequence if no valid values. + } + + function writeFlowMapping(state, level, object) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + pairBuffer; + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + + pairBuffer = ''; + if (index !== 0) pairBuffer += ', '; + + if (state.condenseFlow) pairBuffer += '"'; + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (!writeNode(state, level, objectKey, false, false)) { + continue; // Skip this pair because of invalid key; + } + + if (state.dump.length > 1024) pairBuffer += '? '; + + pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); + + if (!writeNode(state, level, objectValue, false, false)) { + continue; // Skip this pair because of invalid value. + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = '{' + _result + '}'; + } + + function writeBlockMapping(state, level, object, compact) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + explicitPair, + pairBuffer; + + // Allow sorting keys so that the output file is deterministic + if (state.sortKeys === true) { + // Default sorting + objectKeyList.sort(); + } else if (typeof state.sortKeys === 'function') { + // Custom sort function + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + // Something is wrong + throw new YAMLException('sortKeys must be a boolean or a function'); + } + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ''; + + if (!compact || index !== 0) { + pairBuffer += generateNextLine(state, level); + } + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; // Skip this pair because of invalid key. + } + + explicitPair = (state.tag !== null && state.tag !== '?') || + (state.dump && state.dump.length > 1024); + + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += '?'; + } else { + pairBuffer += '? '; + } + } + + pairBuffer += state.dump; + + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; // Skip this pair because of invalid value. + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ':'; + } else { + pairBuffer += ': '; + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = _result || '{}'; // Empty mapping if no valid pairs. + } + + function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + + typeList = explicit ? state.explicitTypes : state.implicitTypes; + + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + + if ((type.instanceOf || type.predicate) && + (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && + (!type.predicate || type.predicate(object))) { + + state.tag = explicit ? type.tag : '?'; + + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + + if (_toString.call(type.represent) === '[object Function]') { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + + state.dump = _result; + } + + return true; + } + } + + return false; + } + + // Serializes `object` and writes it to global `result`. + // Returns true on success, or false on invalid object. + // + function writeNode(state, level, object, block, compact, iskey) { + state.tag = null; + state.dump = object; + + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + + var type = _toString.call(state.dump); + + if (block) { + block = (state.flowLevel < 0 || state.flowLevel > level); + } + + var objectOrArray = type === '[object Object]' || type === '[object Array]', + duplicateIndex, + duplicate; + + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + + if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { + compact = false; + } + + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = '*ref_' + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type === '[object Object]') { + if (block && (Object.keys(state.dump).length !== 0)) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object Array]') { + var arrayLevel = (state.noArrayIndent && (level > 0)) ? level - 1 : level; + if (block && (state.dump.length !== 0)) { + writeBlockSequence(state, arrayLevel, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, arrayLevel, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object String]') { + if (state.tag !== '?') { + writeScalar(state, state.dump, level, iskey); + } + } else { + if (state.skipInvalid) return false; + throw new YAMLException('unacceptable kind of an object to dump ' + type); + } + + if (state.tag !== null && state.tag !== '?') { + state.dump = '!<' + state.tag + '> ' + state.dump; + } + } + + return true; + } + + function getDuplicateReferences(object, state) { + var objects = [], + duplicatesIndexes = [], + index, + length; + + inspectNode(object, objects, duplicatesIndexes); + + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); + } + + function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, + index, + length; + + if (object !== null && typeof object === 'object') { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } + } + + function dump(input, options) { + options = options || {}; + + var state = new State(options); + + if (!state.noRefs) getDuplicateReferences(input, state); + + if (writeNode(state, 0, input, true, true)) return state.dump + '\n'; + + return ''; + } + + function safeDump(input, options) { + return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } + + dumper$1.dump = dump; + dumper$1.safeDump = safeDump; + + var loader = loader$1; + var dumper = dumper$1; + + + function deprecated(name) { + return function () { + throw new Error('Function ' + name + ' is deprecated and cannot be used.'); + }; + } + + + jsYaml$1.Type = type; + jsYaml$1.Schema = schema; + jsYaml$1.FAILSAFE_SCHEMA = failsafe; + jsYaml$1.JSON_SCHEMA = json; + jsYaml$1.CORE_SCHEMA = core; + jsYaml$1.DEFAULT_SAFE_SCHEMA = default_safe; + jsYaml$1.DEFAULT_FULL_SCHEMA = default_full; + jsYaml$1.load = loader.load; + jsYaml$1.loadAll = loader.loadAll; + jsYaml$1.safeLoad = loader.safeLoad; + jsYaml$1.safeLoadAll = loader.safeLoadAll; + jsYaml$1.dump = dumper.dump; + jsYaml$1.safeDump = dumper.safeDump; + jsYaml$1.YAMLException = exception; + + // Deprecated schema names from JS-YAML 2.0.x + jsYaml$1.MINIMAL_SCHEMA = failsafe; + jsYaml$1.SAFE_SCHEMA = default_safe; + jsYaml$1.DEFAULT_SCHEMA = default_full; + + // Deprecated functions from JS-YAML 1.x.x + jsYaml$1.scan = deprecated('scan'); + jsYaml$1.parse = deprecated('parse'); + jsYaml$1.compose = deprecated('compose'); + jsYaml$1.addConstructor = deprecated('addConstructor'); + + var yaml = jsYaml$1; + + + var jsYaml = yaml; + + var parser = jsYaml; + var optionalByteOrderMark = '\\ufeff?'; + var platform = typeof process !== 'undefined' ? process.platform : ''; + var pattern = '^(' + + optionalByteOrderMark + + '(= yaml =|---)' + + '$([\\s\\S]*?)' + + '^(?:\\2|\\.\\.\\.)\\s*' + + '$' + + (platform === 'win32' ? '\\r?' : '') + + '(?:\\n)?)'; + // NOTE: If this pattern uses the 'g' flag the `regex` variable definition will + // need to be moved down into the functions that use it. + var regex = new RegExp(pattern, 'm'); + + frontMatter.exports = extractor; + frontMatter.exports.test = test; + + function extractor (string, options) { + string = string || ''; + var defaultOptions = { allowUnsafe: false }; + options = options instanceof Object ? { ...defaultOptions, ...options } : defaultOptions; + options.allowUnsafe = Boolean(options.allowUnsafe); + var lines = string.split(/(\r?\n)/); + if (lines[0] && /= yaml =|---/.test(lines[0])) { + return parse(string, options.allowUnsafe) + } else { + return { + attributes: {}, + body: string, + bodyBegin: 1 + } + } + } + + function computeLocation (match, body) { + var line = 1; + var pos = body.indexOf('\n'); + var offset = match.index + match[0].length; + + while (pos !== -1) { + if (pos >= offset) { + return line + } + line++; + pos = body.indexOf('\n', pos + 1); + } + + return line + } + + function parse (string, allowUnsafe) { + var match = regex.exec(string); + if (!match) { + return { + attributes: {}, + body: string, + bodyBegin: 1 + } + } + + var loader = allowUnsafe ? parser.load : parser.safeLoad; + var yaml = match[match.length - 1].replace(/^\s+|\s+$/g, ''); + var attributes = loader(yaml) || {}; + var body = string.replace(match[0], ''); + var line = computeLocation(match, string); + + return { + attributes: attributes, + body: body, + bodyBegin: line, + frontmatter: yaml + } + } + + function test (string) { + string = string || ''; + + return regex.test(string) + } + + var frontMatterExports = frontMatter.exports; + var fm = /*@__PURE__*/getDefaultExportFromCjs(frontMatterExports); + + const getAllPaths = (router) => { + const paths = Docsify.dom + .findAll(".sidebar-nav a") + .map((node) => { + const originHref = node.getAttribute("href"); + const { path } = router.parse(node.href); + const title = node.textContent; + + if (!path || Docsify.util.isAbsolutePath(originHref)) { + return; + } + + return { + path, + title, + }; + }) + .filter(Boolean); + + return [...new Set(paths)]; + }; + + const collectHistory = async (router) => { + const paths = getAllPaths(router); + const data = await Promise.all( + paths.map(async ({ path, title }) => { + try { + const md = await Docsify.get(router.getFile(path)); + const { attributes } = fm(md); + + return attributes.history.map(({ date, message }) => ({ + path, + date: formatDate(date), + title, + message: normalizeMessage(message), + })); + } catch { + return; + } + }), + ); + const history = data.filter(Boolean).flat(); + const dates = [...new Set(history.map(({ date }) => date))].sort().reverse(); + + return dates.map((date) => { + const items = history.filter((item) => item.date === date); + + return { + date, + items, + }; + }); + }; + + function htm(n){for(var l,e,s=arguments,t=1,r="",u="",a=[0],c=function(n){1===t&&(n||(r=r.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?a.push(n?s[n]:r):3===t&&(n||r)?(a[1]=n?s[n]:r,t=2):2===t&&"..."===r&&n?a[2]=Object.assign(a[2]||{},s[n]):2===t&&r&&!n?(a[2]=a[2]||{})[r]=!0:t>=5&&(5===t?((a[2]=a[2]||{})[e]=n?r?r+s[n]:s[n]:r,t=6):(n||r)&&(a[2][e]+=n?r+s[n]:r)),r="";},h=0;h<n.length;h++){h&&(1===t&&c(),c(h));for(var i=0;i<n[h].length;i++)l=n[h][i],1===t?"<"===l?(c(),a=[a,"",null],t=3):r+=l:4===t?"--"===r&&">"===l?(t=1,r=""):r=l+r[0]:u?l===u?u="":r+=l:'"'===l||"'"===l?u=l:">"===l?(c(),t=1):t&&("="===l?(t=5,e=r,r=""):"/"===l&&(t<5||">"===n[h][i+1])?(c(),3===t&&(a=a[0]),t=a,(a=a[0]).push(this.apply(null,t.slice(1))),t=0):" "===l||"\t"===l||"\n"===l||"\r"===l?(c(),t=2):r+=l),3===t&&"!--"===r&&(t=4,a=a[0]);}return c(),a.length>2?a.slice(1):a[1]} + + var vhtml$1 = {exports: {}}; + + (function (module, exports) { + (function (global, factory) { + module.exports = factory() ; + }(commonjsGlobal, (function () { + var emptyTags = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']; + + var esc = function esc(str) { + return String(str).replace(/[&<>"']/g, function (s) { + return '&' + map[s] + ';'; + }); + }; + var map = { '&': 'amp', '<': 'lt', '>': 'gt', '"': 'quot', "'": 'apos' }; + var setInnerHTMLAttr = 'dangerouslySetInnerHTML'; + var DOMAttributeNames = { + className: 'class', + htmlFor: 'for' + }; + + var sanitized = {}; + + function h(name, attrs) { + var stack = [], + s = ''; + attrs = attrs || {}; + for (var i = arguments.length; i-- > 2;) { + stack.push(arguments[i]); + } + + if (typeof name === 'function') { + attrs.children = stack.reverse(); + return name(attrs); + } + + if (name) { + s += '<' + name; + if (attrs) for (var _i in attrs) { + if (attrs[_i] !== false && attrs[_i] != null && _i !== setInnerHTMLAttr) { + s += ' ' + (DOMAttributeNames[_i] ? DOMAttributeNames[_i] : esc(_i)) + '="' + esc(attrs[_i]) + '"'; + } + } + s += '>'; + } + + if (emptyTags.indexOf(name) === -1) { + if (attrs[setInnerHTMLAttr]) { + s += attrs[setInnerHTMLAttr].__html; + } else while (stack.length) { + var child = stack.pop(); + if (child) { + if (child.pop) { + for (var _i2 = child.length; _i2--;) { + stack.push(child[_i2]); + } + } else { + s += sanitized[child] === true ? child : esc(child); + } + } + } + + s += name ? '</' + name + '>' : ''; + } + + sanitized[s] = true; + return s; + } + + return h; + + }))); + + } (vhtml$1)); + + var vhtmlExports = vhtml$1.exports; + var vhtml = /*@__PURE__*/getDefaultExportFromCjs(vhtmlExports); + + const html = htm.bind(vhtml); + + /** プラグインをインストール */ + const install = (hook, vm) => { + // ページに履歴を追加 + hook.afterEach((content) => { + if (!vm.frontmatter) { + console.warn( + msg( + "before install official front matter plugin. see https://www.npmjs.com/package/docsify-plugin-page-history#install", + ), + ); + + return content; + } + + const history = parseHistory(vm.frontmatter.history); + const lastModified = history[0]?.date; + + const details = html` + <details class="docsify-page-history"> + <summary> + ${lastModified ? `Last modified at ${lastModified}` : "No history"} + </summary> + ${history.length + ? html` + <dl> + ${history.map( + ({ date, message }) => html` + <dt><strong>${date}</strong></dt> + <dd + dangerouslySetInnerHTML=${{ + __html: marked(message, { breaks: true }), + }} + /> + `, + )} + </dl> + ` + : html`<p>There is no history for this page.</p>`} + </details> + `; + + return `${content}${details}`; + }); + + // @[page-history] を履歴一覧に置換 + hook.beforeEach((content) => { + return content.replace( + /(?:^|\n)@\[page-history\](?:$|\n)/g, + '\n<div class="docsify-page-history-list"></div>\n', + ); + }); + + hook.doneEach(async () => { + const elms = document.getElementsByClassName("docsify-page-history-list"); + + if (!elms.length === 0) return; + + const history = await collectHistory(vm.router); + + for (const el of elms) { + el.innerHTML = html` + <ul> + ${history.map( + ({ date, items }) => html` + <li> + <strong>${date}</strong> + <ul> + ${items.map( + ({ path, title, message }) => html` + <li> + <a href="${vm.router.toURL(path)}" title="${message}"> + ${title} + </a> + </li> + `, + )} + </ul> + </li> + `, + )} + </ul> + `; + } + }); + }; + + $docsify.plugins = [].concat(install, $docsify.plugins); + +})); diff --git a/public/js/plugins/page-history.md b/public/js/plugins/page-history.md @@ -0,0 +1,75 @@ +<p align="center"> + <img src="docsify.svg" alt="Docsify Logo" height="128"> +</p> +<h1 align="center">Docsify Plugins</h1> +<h3 align="center">Page History</h3> +<p align="center">by <a href="https://github.com/simochee">simochee</a></p> + +[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/docsify-plugin-page-history/badge)](https://www.jsdelivr.com/package/npm/docsify-plugin-page-history) +[![npm version](https://badge.fury.io/js/docsify-plugin-page-history.svg)](https://badge.fury.io/js/docsify-plugin-page-history) +[![License](https://img.shields.io/npm/l/docsify-plugin-page-history)](https://github.com/simochee/docsify-plugin-page-history/blob/main/LICENSE) +[![Release](https://github.com/simochee/docsify-plugin-page-history/actions/workflows/release.yaml/badge.svg)](https://github.com/simochee/docsify-plugin-page-history/actions/workflows/release.yaml) + +Page-by-page history for Docsify. + +## 📀 Installation + +Insert a script tag to load the plugin script file after loading the Docsify script. + +```html +<script> + window.$docsify = {}; +</script> +<script src="//cdn.jsdelivr.net/npm/docsify@v4/lib/docsify.min.js"></script> +<script src="//cdn.jsdelivr.net/npm/docsify@v4/lib/plugins/front-matter.min.js"></script> +<script src="//cdn.jsdelivr.net/npm/docsify-plugin-page-history/lib/docsify-plugin-page-history.min.js"></script> +``` + +## 🔰 Usage + +### Add page history + +Add `history` field to page front-matter. + +```md +--- +history: + - date: 2023-10-15 # recommended YYYY-MM-DD + message: | + Add **awesome section**. + - date: 2023-10-10 + message: | + Initial release +--- + +## Page Title + +... +``` + +### Display all page history + +Add `@[page-history]` to your markdown file + +```md +# History + +@[page-history] +``` + +## 💻 Development + +1. Clone this repository +1. Enable Corepack using `corepack enable` +1. Install dependencies using `pnpm install` +1. Run watch mode using `pnpm run watch` +1. Start server using [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) +1. Insert a script tag to load the plugin script file after loading the Docsify script. + +```html +<script src="http://localhost:5500"></script> +``` + +## 🛡️ License + +MIT diff --git a/public/js/plugins/pagination.js b/public/js/plugins/pagination.js @@ -0,0 +1,392 @@ +// SPDX-FilyCopyrightText: Copyright (c) 2017 - present, yelo <zhihuzeye@gmail.com> +// SPDX-License-Identifier: MIT + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory() : + typeof define === 'function' && define.amd ? define(factory) : + (factory()); +}(this, (function () { 'use strict'; + +var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + + + + +function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; +} + +var componentQuery = createCommonjsModule(function (module, exports) { +function one(selector, el) { + return el.querySelector(selector); +} + +exports = module.exports = function (selector, el) { + el = el || document; + return one(selector, el); +}; + +exports.all = function (selector, el) { + el = el || document; + return el.querySelectorAll(selector); +}; + +exports.engine = function (obj) { + if (!obj.one) throw new Error('.one callback required'); + if (!obj.all) throw new Error('.all callback required'); + one = obj.one; + exports.all = obj.all; + return exports; +}; +}); + +var componentQuery_1 = componentQuery.all; +var componentQuery_2 = componentQuery.engine; + +var globalObject = createCommonjsModule(function (module) { +(function ($) { + try { + $('export default global'); + } catch (e) { + try { + $('export default self'); + } catch (e) { + try { + module.exports = commonjsGlobal; + } catch (e) { + try { + self.global = self; + } catch (e) { + window.global = window; + } + } + } + } +})(eval); +}); + +/** + * Module dependencies. + */ + +try { + var query$1 = componentQuery; +} catch (err) { + var query$1 = componentQuery; +} + +/** + * Element prototype. + */ + +var Element = globalObject.Element; +var proto = Element && Element.prototype || {}; + +/** + * Vendor function. + */ + +var vendor = proto.matches || proto.webkitMatchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector || proto.oMatchesSelector; + +/** + * Expose `match()`. + */ + +var componentMatchesSelector = match; + +/** + * Match `el` to `selector`. + * + * @param {Element} el + * @param {String} selector + * @return {Boolean} + * @api public + */ + +function match(el, selector) { + if (!el || el.nodeType !== 1) return false; + if (vendor) return vendor.call(el, selector); + var nodes = query$1.all(selector, el.parentNode); + for (var i = 0; i < nodes.length; ++i) { + if (nodes[i] == el) return true; + } + return false; +} + +/** + * Module Dependencies + */ + +try { + var matches = componentMatchesSelector; +} catch (err) { + var matches = componentMatchesSelector; +} + +/** + * Export `closest` + */ + +var componentClosest = closest; + +/** + * Closest + * + * @param {Element} el + * @param {String} selector + * @param {Element} scope (optional) + */ + +function closest(el, selector, scope) { + scope = scope || document.documentElement; + + // walk up the dom + while (el && el !== scope) { + if (matches(el, selector)) return el; + el = el.parentNode; + } + + // check scope for match + return matches(el, selector) ? el : null; +} + +function styleInject(css, ref) { + if (ref === void 0) ref = {}; + var insertAt = ref.insertAt; + + if (!css || typeof document === 'undefined') { + return; + } + + var head = document.head || document.getElementsByTagName('head')[0]; + var style = document.createElement('style'); + style.type = 'text/css'; + + if (insertAt === 'top') { + if (head.firstChild) { + head.insertBefore(style, head.firstChild); + } else { + head.appendChild(style); + } + } else { + head.appendChild(style); + } + + if (style.styleSheet) { + style.styleSheet.cssText = css; + } else { + style.appendChild(document.createTextNode(css)); + } +} + +var css = ".docsify-pagination-container{display:flex;flex-wrap:wrap;justify-content:space-between;overflow:hidden;margin:5em 0 1em;border-top:1px solid rgba(0,0,0,.07)}.pagination-item{margin-top:2.5em}.pagination-item a,.pagination-item a:hover{text-decoration:none}.pagination-item a{color:currentColor}.pagination-item a:hover .pagination-item-title{text-decoration:underline}.pagination-item:not(:last-child) a .pagination-item-label,.pagination-item:not(:last-child) a .pagination-item-subtitle,.pagination-item:not(:last-child) a .pagination-item-title{opacity:.3;transition:all .2s}.pagination-item:last-child .pagination-item-label,.pagination-item:not(:last-child) a:hover .pagination-item-label{opacity:.6}.pagination-item:not(:last-child) a:hover .pagination-item-title{opacity:1}.pagination-item-label{font-size:.8em}.pagination-item-label>*{line-height:1;vertical-align:middle}.pagination-item-label svg{height:.8em;width:auto;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1px}.pagination-item--next{margin-left:auto;text-align:right}.pagination-item--next svg{margin-left:.5em}.pagination-item--previous svg{margin-right:.5em}.pagination-item-title{font-size:1.6em}.pagination-item-subtitle{text-transform:uppercase;opacity:.3}"; +styleInject(css); + +var classCallCheck = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +}; + +var createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + + + + + + + +var _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; +}; + +/** + * constants + */ +var DEFAULT_OPTIONS = function DEFAULT_OPTIONS(config) { + return { + previousText: 'PREVIOUS', + nextText: 'NEXT', + crossChapter: false, + crossChapterText: false + }; +}; +var CONTAINER_CLASSNAME = 'docsify-pagination-container'; + +/** + * basic utilities + */ +function toArray(elements) { + return Array.prototype.slice.call(elements); +} +function findChapter(element) { + var container = componentClosest(element, 'div > ul > li'); + return componentQuery('p', container); +} +function findHyperlink(element) { + return element.href ? element : componentQuery('a', element); +} +function normailizeLink(path) { + if (path && path.toUpperCase() === '#/README') { + return '#/'; + } + return path; +} +function isALinkTo(path, element) { + if (arguments.length === 1) { + return function (element) { + return isALinkTo(path, element); + }; + } + return normailizeLink(decodeURIComponent(element.getAttribute('href').split('?')[0])) === normailizeLink(decodeURIComponent(path)); +} + +/** + * core renderer + */ + +var Link = function () { + function Link(element) { + classCallCheck(this, Link); + + if (!element) { + return; + } + this.chapter = findChapter(element); + this.hyperlink = findHyperlink(element); + } + + createClass(Link, [{ + key: 'toJSON', + value: function toJSON() { + if (!this.hyperlink) { + return; + } + return { + name: this.hyperlink.innerText, + href: this.hyperlink.getAttribute('href'), + chapterName: this.chapter && this.chapter.innerText || '', + isExternal: this.hyperlink.getAttribute('target') === '_blank' + }; + } + }]); + return Link; +}(); + +function pagination(vm, _ref) { + var crossChapter = _ref.crossChapter; + + try { + var path = vm.router.toURL(vm.route.path); + var all = toArray(componentQuery.all('.sidebar-nav li a')).filter(function (element) { + return !componentMatchesSelector(element, '.section-link'); + }); + var active = all.find(isALinkTo(path)); + var group = toArray((componentClosest(active, 'ul') || {}).children).filter(function (element) { + return element.tagName.toUpperCase() === 'LI'; + }); + var index = crossChapter ? all.findIndex(isALinkTo(path)) : group.findIndex(function (item) { + var hyperlink = findHyperlink(item); + return hyperlink && isALinkTo(path, hyperlink); + }); + + var links = crossChapter ? all : group; + + return { + route: vm.route, + prev: new Link(links[index - 1]).toJSON(), + next: new Link(links[index + 1]).toJSON() + }; + } catch (error) { + return { + route: {} + }; + } +} + +var template = { + container: function container() { + return '<div class="' + CONTAINER_CLASSNAME + '"></div>'; + }, + inner: function inner(data, options) { + var _getLocalizationTexts = getLocalizationTexts(options, data.route.path), + previousText = _getLocalizationTexts.previousText, + nextText = _getLocalizationTexts.nextText; + + return [data.prev && '\n <div class="pagination-item pagination-item--previous">\n <a href="' + data.prev.href + '" ' + (data.prev.isExternal ? 'target="_blank"' : '') + '>\n <div class="pagination-item-label">\n <svg width="10" height="16" viewBox="0 0 10 16" xmlns="http://www.w3.org/2000/svg">\n <polyline fill="none" vector-effect="non-scaling-stroke" points="8,2 2,8 8,14"/>\n </svg>\n <span>' + previousText + '</span>\n </div>\n <div class="pagination-item-title">' + data.prev.name + '</div>\n ', data.prev && options.crossChapterText && '<div class="pagination-item-subtitle">' + data.prev.chapterName + '</div>', data.prev && '</a>\n </div>\n ', data.next && '\n <div class="pagination-item pagination-item--next">\n <a href="' + data.next.href + '" ' + (data.next.isExternal ? 'target="_blank"' : '') + '>\n <div class="pagination-item-label">\n <span>' + nextText + '</span>\n <svg width="10" height="16" viewBox="0 0 10 16" xmlns="http://www.w3.org/2000/svg">\n <polyline fill="none" vector-effect="non-scaling-stroke" points="2,2 8,8 2,14"/>\n </svg>\n </div>\n <div class="pagination-item-title">' + data.next.name + '</div>\n ', data.next && options.crossChapterText && '<div class="pagination-item-subtitle">' + data.next.chapterName + '</div>', data.next && '</a>\n </div>\n '].filter(Boolean).join(''); + } +}; + +function getLocalizationTexts(options, path) { + var texts = {};['previousText', 'nextText'].forEach(function (key) { + var text = options[key]; + + if (typeof text === 'string') { + texts[key] = text; + } else { + Object.keys(text).some(function (local) { + var isMatch = path && path.indexOf(local) > -1; + + texts[key] = isMatch ? text[local] : text; + + return isMatch; + }); + } + }); + return texts; +} + +/** + * installation + */ +function install(hook, vm) { + var options = _extends({}, DEFAULT_OPTIONS(vm.config), vm.config.pagination || {}); + + function render() { + var container = componentQuery('.' + CONTAINER_CLASSNAME); + + if (!container) return; + + container.innerHTML = template.inner(pagination(vm, options), options); + } + + hook.afterEach(function (html) { + return html + template.container(); + }); + hook.doneEach(function () { + return render(); + }); +} + +window.$docsify = window.$docsify || {}; + +window.$docsify.plugins = [install].concat(window.$docsify.plugins || []); + +}))); diff --git a/public/js/plugins/pagination.md b/public/js/plugins/pagination.md @@ -0,0 +1,84 @@ +# docsify-pagination +> Pagination for docsify + +[![npm](https://img.shields.io/npm/v/docsify-pagination.svg?style=flat-square)](https://www.npmjs.com/package/docsify-pagination) +[![license](https://img.shields.io/github/license/imyelo/docsify-pagination.svg?style=flat-square)](./LICENSE) +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) + +## How does it look like? +![screenshot](./_medias/screenshot.png) + +## Install +1. insert script into document + + ```html + <script src="//unpkg.com/docsify-pagination/dist/docsify-pagination.min.js"></script> + ``` + +2. specify the label text (optional) + + ```javascript + window.$docsify = { + // ... + pagination: { + previousText: '上一章节', + // or + nextText: { + '/en/': 'NEXT', + '/': '下一章节' + }, + crossChapter: true, + crossChapterText: true, + }, + } + ``` + +## Options +### pagination.previousText +* **Default:** ``'PREVIOUS'`` +* **Type:** ``String | Object`` +* **Description:** The text of previous label. + +### pagination.nextText +* **Default:** ``'NEXT'`` +* **Type:** ``String | Object`` +* **Description:** The text of next label. + +### pagination.crossChapter +* **Default:** `false` +* **Type:** ``Boolean`` +* **Description:** Allow navigation to previous/next chapter. + +### pagination.crossChapterText +* **Default:** `false` +* **Type:** ``Boolean`` +* **Description:** Display chapter name. + +### ~~pagination.routerMode~~ +* **Deprecated** +* **Default:** [`window.$docsify.routerMode`](https://docsify.js.org/#/configuration?id=routermode) +* **Type:** ``String`` +* **Description:** Router mode. In most cases, you don't need to modify it. Docsify-Pagination will take care of it for you. + +## Example +### Run example on local + +- [Example](example/default/index.html) +- [Example with Docsify's History Route-Mode](example/router-mode-history/index.html) +- [Example with Localization](example/router-mode-history/index.html) + +#### How to open these? +```bash +$ git clone https://github.com/imyelo/docsify-pagination.git && cd docsify-pagination && yarn +$ yarn example +``` + +### Online Showcase +- [Tina.js](https://tina.js.org/) +- [😘 Tell us yours ...](https://github.com/imyelo/docsify-pagination/edit/master/readme.md) + +## Related +- [docsify](https://github.com/QingWei-Li/docsify/) + +## License +MIT &copy; [yelo](https://github.com/imyelo) diff --git a/public/js/plugins/rename-header.js b/public/js/plugins/rename-header.js @@ -0,0 +1,77 @@ +// SPDX-FileCopyrightText: (C) 2024 Alisa Lain <al1-ce@null.net> +// SPDX-License-Identifier: GPL-3.0-or-later + +'use strict'; + +// Docsify plugin functions +function plugin(hook, vm) { + hook.beforeEach(function(content) { + return content + }); + hook.afterEach(function(html, next) { + var mdDom = document.createElement( + 'div'); + mdDom.innerHTML = html; + var index = location.hash.lastIndexOf('/'); + const list = []; + list.push(...mdDom.getElementsByTagName('h1')); + list.push(...mdDom.getElementsByTagName('h2')); + list.push(...mdDom.getElementsByTagName('h3')); + list.push(...mdDom.getElementsByTagName('h4')); + list.push(...mdDom.getElementsByTagName('h5')); + list.push(...mdDom.getElementsByTagName('h6')); + + for (var i = 0; i < list.length; i++) { + var para = list[i].innerHTML; + let innerContent; + const eachParaRes = para.replace(/{#([^{}]+)}/g, function(content) { + innerContent = content.replace('{', '').replace('}', '').replace('#', ''); + return ''; + }); + if (innerContent === undefined || innerContent.length == 0) continue; + list[i].id = innerContent; + list[i].innerHTML = eachParaRes; + var a = list[i].getElementsByTagName('a')?.[0]; + a.setAttribute('href', `#${vm.route.path}?id=${innerContent}`) + a.setAttribute('data-id', `${innerContent}`) + } + + next(mdDom.innerHTML); + }); +} + +if (!window.$docsify) { + console.error('This is a docsify plugin, please import the docsify library first!'); +} else { + window.$docsify.plugins = [].concat(plugin, window.$docsify.plugins); +} + +/* +'use strict'; + +// Docsify plugin functions +function plugin(hook, vm) { + hook.afterEach(function(content) { + return content + }); + hook.beforeEach(function(markdown, next) { + const out = markdown.replace(/{#([^{}]+)}/g, function(content) { + const innerContent = + content + .replace('{', '') + .replace('}', '') + .replace('#', ''); + return `<a id="${innerContent}"></a>` + }); + + next(out); + }); +} + +if (!window.$docsify) { + console.error('This is a docsify plugin, please import the docsify library first!'); +} else { + window.$docsify.plugins = [].concat(plugin, window.$docsify.plugins); +} +*/ + diff --git a/public/js/plugins/rename-header.md b/public/js/plugins/rename-header.md @@ -0,0 +1,8 @@ +> BY ME LOL + +```md +# something header {#replace-with-this-id} + +[link to that header](#replace-with-this-id) +``` + diff --git a/public/js/plugins/search.js b/public/js/plugins/search.js @@ -0,0 +1,543 @@ +// SPDX-FilyCopyrightText: Copyright (c) 2016 - present Docsify Contributors (https://github.com/docsifyjs/docsify/graphs/contributors) +// SPDX-License-Identifier: MIT + +(function () { + /** + * Converts a colon formatted string to a object with properties. + * + * This is process a provided string and look for any tokens in the format + * of `:name[=value]` and then convert it to a object and return. + * An example of this is ':include :type=code :fragment=demo' is taken and + * then converted to: + * + * ``` + * { + * include: '', + * type: 'code', + * fragment: 'demo' + * } + * ``` + * + * @param {string} str The string to parse. + * + * @return {object} The original string and parsed object, { str, config }. + */ + function getAndRemoveConfig(str) { + if ( str === void 0 ) str = ''; + + var config = {}; + + if (str) { + str = str + .replace(/^('|")/, '') + .replace(/('|")$/, '') + .replace(/(?:^|\s):([\w-]+:?)=?([\w-%]+)?/g, function (m, key, value) { + if (key.indexOf(':') === -1) { + config[key] = (value && value.replace(/&quot;/g, '')) || true; + return ''; + } + + return m; + }) + .trim(); + } + + return { str: str, config: config }; + } + + function removeDocsifyIgnoreTag(str) { + return str + .replace(/<!-- {docsify-ignore} -->/, '') + .replace(/{docsify-ignore}/, '') + .replace(/<!-- {docsify-ignore-all} -->/, '') + .replace(/{docsify-ignore-all}/, '') + .trim(); + } + + /* eslint-disable no-unused-vars */ + + var INDEXS = {}; + + var LOCAL_STORAGE = { + EXPIRE_KEY: 'docsify.search.expires', + INDEX_KEY: 'docsify.search.index', + }; + + function resolveExpireKey(namespace) { + return namespace + ? ((LOCAL_STORAGE.EXPIRE_KEY) + "/" + namespace) + : LOCAL_STORAGE.EXPIRE_KEY; + } + + function resolveIndexKey(namespace) { + return namespace + ? ((LOCAL_STORAGE.INDEX_KEY) + "/" + namespace) + : LOCAL_STORAGE.INDEX_KEY; + } + + function escapeHtml(string) { + var entityMap = { + '&': '&amp;', + '<': '&lt;', + '>': '&gt;', + '"': '&quot;', + "'": '&#39;', + }; + + return String(string).replace(/[&<>"']/g, function (s) { return entityMap[s]; }); + } + + function getAllPaths(router) { + var paths = []; + + Docsify.dom + .findAll('.sidebar-nav a:not(.section-link):not([data-nosearch])') + .forEach(function (node) { + var href = node.href; + var originHref = node.getAttribute('href'); + var path = router.parse(href).path; + + if ( + path && + paths.indexOf(path) === -1 && + !Docsify.util.isAbsolutePath(originHref) + ) { + paths.push(path); + } + }); + + return paths; + } + + function getTableData(token) { + if (!token.text && token.type === 'table') { + token.cells.unshift(token.header); + token.text = token.cells + .map(function (rows) { + return rows.join(' | '); + }) + .join(' |\n '); + } + return token.text; + } + + function getListData(token) { + if (!token.text && token.type === 'list') { + token.text = token.raw; + } + return token.text; + } + + function saveData(maxAge, expireKey, indexKey) { + localStorage.setItem(expireKey, Date.now() + maxAge); + localStorage.setItem(indexKey, JSON.stringify(INDEXS)); + } + + function genIndex(path, content, router, depth) { + if ( content === void 0 ) content = ''; + + var tokens = window.marked.lexer(content); + var slugify = window.Docsify.slugify; + var index = {}; + var slug; + var title = ''; + + tokens.forEach(function (token, tokenIndex) { + if (token.type === 'heading' && token.depth <= depth) { + var ref = getAndRemoveConfig(token.text); + var str = ref.str; + var config = ref.config; + + var text = removeDocsifyIgnoreTag(token.text); + + if (config.id) { + slug = router.toURL(path, { id: slugify(config.id) }); + } else { + slug = router.toURL(path, { id: slugify(escapeHtml(text)) }); + } + + if (str) { + title = removeDocsifyIgnoreTag(str); + } + + index[slug] = { slug: slug, title: title, body: '' }; + } else { + if (tokenIndex === 0) { + slug = router.toURL(path); + index[slug] = { + slug: slug, + title: path !== '/' ? path.slice(1) : 'Home Page', + body: token.text || '', + }; + } + + if (!slug) { + return; + } + + if (!index[slug]) { + index[slug] = { slug: slug, title: '', body: '' }; + } else if (index[slug].body) { + token.text = getTableData(token); + token.text = getListData(token); + + index[slug].body += '\n' + (token.text || ''); + } else { + token.text = getTableData(token); + token.text = getListData(token); + + index[slug].body = token.text || ''; + } + } + }); + slugify.clear(); + return index; + } + + function ignoreDiacriticalMarks(keyword) { + if (keyword && keyword.normalize) { + return keyword.normalize('NFD').replace(/[\u0300-\u036f]/g, ''); + } + return keyword; + } + + /** + * @param {String} query Search query + * @returns {Array} Array of results + */ + function search(query) { + var matchingResults = []; + var data = []; + Object.keys(INDEXS).forEach(function (key) { + data = data.concat(Object.keys(INDEXS[key]).map(function (page) { return INDEXS[key][page]; })); + }); + + query = query.trim(); + var keywords = query.split(/[\s\-,\\/]+/); + if (keywords.length !== 1) { + keywords = [].concat(query, keywords); + } + + var loop = function ( i ) { + var post = data[i]; + var matchesScore = 0; + var resultStr = ''; + var handlePostTitle = ''; + var handlePostContent = ''; + var postTitle = post.title && post.title.trim(); + var postContent = post.body && post.body.trim(); + var postUrl = post.slug || ''; + + if (postTitle) { + keywords.forEach(function (keyword) { + // From https://github.com/sindresorhus/escape-string-regexp + var regEx = new RegExp( + escapeHtml(ignoreDiacriticalMarks(keyword)).replace( + /[|\\{}()[\]^$+*?.]/g, + '\\$&' + ), + 'gi' + ); + var indexTitle = -1; + var indexContent = -1; + handlePostTitle = postTitle + ? escapeHtml(ignoreDiacriticalMarks(postTitle)) + : postTitle; + handlePostContent = postContent + ? escapeHtml(ignoreDiacriticalMarks(postContent)) + : postContent; + + indexTitle = postTitle ? handlePostTitle.search(regEx) : -1; + indexContent = postContent ? handlePostContent.search(regEx) : -1; + + if (indexTitle >= 0 || indexContent >= 0) { + matchesScore += indexTitle >= 0 ? 3 : indexContent >= 0 ? 2 : 0; + if (indexContent < 0) { + indexContent = 0; + } + + var start = 0; + var end = 0; + + start = indexContent < 11 ? 0 : indexContent - 10; + end = start === 0 ? 70 : indexContent + keyword.length + 60; + + if (postContent && end > postContent.length) { + end = postContent.length; + } + + var matchContent = + handlePostContent && + '...' + + handlePostContent + .substring(start, end) + .replace( + regEx, + function (word) { return ("<em class=\"search-keyword\">" + word + "</em>"); } + ) + + '...'; + + resultStr += matchContent; + } + }); + + if (matchesScore > 0) { + var matchingPost = { + title: handlePostTitle, + content: postContent ? resultStr : '', + url: postUrl, + score: matchesScore, + }; + + matchingResults.push(matchingPost); + } + } + }; + + for (var i = 0; i < data.length; i++) loop( i ); + + return matchingResults.sort(function (r1, r2) { return r2.score - r1.score; }); + } + + function init(config, vm) { + var isAuto = config.paths === 'auto'; + var paths = isAuto ? getAllPaths(vm.router) : config.paths; + + var namespaceSuffix = ''; + + // only in auto mode + if (paths.length && isAuto && config.pathNamespaces) { + var path = paths[0]; + + if (Array.isArray(config.pathNamespaces)) { + namespaceSuffix = + config.pathNamespaces.filter( + function (prefix) { return path.slice(0, prefix.length) === prefix; } + )[0] || namespaceSuffix; + } else if (config.pathNamespaces instanceof RegExp) { + var matches = path.match(config.pathNamespaces); + + if (matches) { + namespaceSuffix = matches[0]; + } + } + var isExistHome = paths.indexOf(namespaceSuffix + '/') === -1; + var isExistReadme = paths.indexOf(namespaceSuffix + '/README') === -1; + if (isExistHome && isExistReadme) { + paths.unshift(namespaceSuffix + '/'); + } + } else if (paths.indexOf('/') === -1 && paths.indexOf('/README') === -1) { + paths.unshift('/'); + } + + var expireKey = resolveExpireKey(config.namespace) + namespaceSuffix; + var indexKey = resolveIndexKey(config.namespace) + namespaceSuffix; + + var isExpired = localStorage.getItem(expireKey) < Date.now(); + + INDEXS = JSON.parse(localStorage.getItem(indexKey)); + + if (isExpired) { + INDEXS = {}; + } else if (!isAuto) { + return; + } + + var len = paths.length; + var count = 0; + + paths.forEach(function (path) { + if (INDEXS[path]) { + return count++; + } + + Docsify.get(vm.router.getFile(path), false, vm.config.requestHeaders).then( + function (result) { + INDEXS[path] = genIndex(path, result, vm.router, config.depth); + len === ++count && saveData(config.maxAge, expireKey, indexKey); + } + ); + }); + } + + /* eslint-disable no-unused-vars */ + + var NO_DATA_TEXT = ''; + var options; + + function style() { + var code = "\n.sidebar {\n padding-top: 0;\n}\n\n.search {\n margin-bottom: 20px;\n padding: 6px;\n border-bottom: 1px solid #eee;\n}\n\n.search .input-wrap {\n display: flex;\n align-items: center;\n}\n\n.search .results-panel {\n display: none;\n}\n\n.search .results-panel.show {\n display: block;\n}\n\n.search input {\n outline: none;\n border: none;\n width: 100%;\n padding: 0.6em 7px;\n font-size: inherit;\n border: 1px solid transparent;\n}\n\n.search input:focus {\n box-shadow: 0 0 5px var(--theme-color, #42b983);\n border: 1px solid var(--theme-color, #42b983);\n}\n\n.search input::-webkit-search-decoration,\n.search input::-webkit-search-cancel-button,\n.search input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\n\n.search input::-ms-clear {\n display: none;\n height: 0;\n width: 0;\n}\n\n.search .clear-button {\n cursor: pointer;\n width: 36px;\n text-align: right;\n display: none;\n}\n\n.search .clear-button.show {\n display: block;\n}\n\n.search .clear-button svg {\n transform: scale(.5);\n}\n\n.search h2 {\n font-size: 17px;\n margin: 10px 0;\n}\n\n.search a {\n text-decoration: none;\n color: inherit;\n}\n\n.search .matching-post {\n border-bottom: 1px solid #eee;\n}\n\n.search .matching-post:last-child {\n border-bottom: 0;\n}\n\n.search p {\n font-size: 14px;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n\n.search p.empty {\n text-align: center;\n}\n\n.app-name.hide, .sidebar-nav.hide {\n display: none;\n}"; + + Docsify.dom.style(code); + } + + function tpl(defaultValue) { + if ( defaultValue === void 0 ) defaultValue = ''; + + var html = "<div class=\"input-wrap\">\n <input type=\"search\" value=\"" + defaultValue + "\" aria-label=\"Search text\" />\n <div class=\"clear-button\">\n <svg width=\"26\" height=\"24\">\n <circle cx=\"12\" cy=\"12\" r=\"11\" fill=\"#ccc\" />\n <path stroke=\"white\" stroke-width=\"2\" d=\"M8.25,8.25,15.75,15.75\" />\n <path stroke=\"white\" stroke-width=\"2\"d=\"M8.25,15.75,15.75,8.25\" />\n </svg>\n </div>\n </div>\n <div class=\"results-panel\"></div>\n </div>"; + var el = Docsify.dom.create('div', html); + var aside = Docsify.dom.find('aside'); + + Docsify.dom.toggleClass(el, 'search'); + Docsify.dom.before(aside, el); + } + + function doSearch(value) { + var $search = Docsify.dom.find('div.search'); + var $panel = Docsify.dom.find($search, '.results-panel'); + var $clearBtn = Docsify.dom.find($search, '.clear-button'); + var $sidebarNav = Docsify.dom.find('.sidebar-nav'); + var $appName = Docsify.dom.find('.app-name'); + + if (!value) { + $panel.classList.remove('show'); + $clearBtn.classList.remove('show'); + $panel.innerHTML = ''; + + if (options.hideOtherSidebarContent) { + $sidebarNav && $sidebarNav.classList.remove('hide'); + $appName && $appName.classList.remove('hide'); + } + + return; + } + + var matchs = search(value); + + var html = ''; + matchs.forEach(function (post) { + html += "<div class=\"matching-post\">\n<a href=\"" + (post.url) + "\">\n<h2>" + (post.title) + "</h2>\n<p>" + (post.content) + "</p>\n</a>\n</div>"; + }); + + $panel.classList.add('show'); + $clearBtn.classList.add('show'); + $panel.innerHTML = html || ("<p class=\"empty\">" + NO_DATA_TEXT + "</p>"); + if (options.hideOtherSidebarContent) { + $sidebarNav && $sidebarNav.classList.add('hide'); + $appName && $appName.classList.add('hide'); + } + } + + function bindEvents() { + var $search = Docsify.dom.find('div.search'); + var $input = Docsify.dom.find($search, 'input'); + var $inputWrap = Docsify.dom.find($search, '.input-wrap'); + + var timeId; + + /** + Prevent to Fold sidebar. + + When searching on the mobile end, + the sidebar is collapsed when you click the INPUT box, + making it impossible to search. + */ + Docsify.dom.on( + $search, + 'click', + function (e) { return ['A', 'H2', 'P', 'EM'].indexOf(e.target.tagName) === -1 && + e.stopPropagation(); } + ); + Docsify.dom.on($input, 'input', function (e) { + clearTimeout(timeId); + timeId = setTimeout(function (_) { return doSearch(e.target.value.trim()); }, 100); + }); + Docsify.dom.on($inputWrap, 'click', function (e) { + // Click input outside + if (e.target.tagName !== 'INPUT') { + $input.value = ''; + doSearch(); + } + }); + } + + function updatePlaceholder(text, path) { + var $input = Docsify.dom.getNode('.search input[type="search"]'); + + if (!$input) { + return; + } + + if (typeof text === 'string') { + $input.placeholder = text; + } else { + var match = Object.keys(text).filter(function (key) { return path.indexOf(key) > -1; })[0]; + $input.placeholder = text[match]; + } + } + + function updateNoData(text, path) { + if (typeof text === 'string') { + NO_DATA_TEXT = text; + } else { + var match = Object.keys(text).filter(function (key) { return path.indexOf(key) > -1; })[0]; + NO_DATA_TEXT = text[match]; + } + } + + function updateOptions(opts) { + options = opts; + } + + function init$1(opts, vm) { + var keywords = vm.router.parse().query.s; + + updateOptions(opts); + style(); + tpl(keywords); + bindEvents(); + keywords && setTimeout(function (_) { return doSearch(keywords); }, 500); + } + + function update(opts, vm) { + updateOptions(opts); + updatePlaceholder(opts.placeholder, vm.route.path); + updateNoData(opts.noData, vm.route.path); + } + + /* eslint-disable no-unused-vars */ + + var CONFIG = { + placeholder: 'Type to search', + noData: 'No Results!', + paths: 'auto', + depth: 2, + maxAge: 86400000, // 1 day + hideOtherSidebarContent: false, + namespace: undefined, + pathNamespaces: undefined, + }; + + var install = function (hook, vm) { + var util = Docsify.util; + var opts = vm.config.search || CONFIG; + + if (Array.isArray(opts)) { + CONFIG.paths = opts; + } else if (typeof opts === 'object') { + CONFIG.paths = Array.isArray(opts.paths) ? opts.paths : 'auto'; + CONFIG.maxAge = util.isPrimitive(opts.maxAge) ? opts.maxAge : CONFIG.maxAge; + CONFIG.placeholder = opts.placeholder || CONFIG.placeholder; + CONFIG.noData = opts.noData || CONFIG.noData; + CONFIG.depth = opts.depth || CONFIG.depth; + CONFIG.hideOtherSidebarContent = + opts.hideOtherSidebarContent || CONFIG.hideOtherSidebarContent; + CONFIG.namespace = opts.namespace || CONFIG.namespace; + CONFIG.pathNamespaces = opts.pathNamespaces || CONFIG.pathNamespaces; + } + + var isAuto = CONFIG.paths === 'auto'; + + hook.mounted(function (_) { + init$1(CONFIG, vm); + !isAuto && init(CONFIG, vm); + }); + hook.doneEach(function (_) { + update(CONFIG, vm); + isAuto && init(CONFIG, vm); + }); + }; + + $docsify.plugins = [].concat(install, $docsify.plugins); + +}()); diff --git a/public/js/plugins/search.md b/public/js/plugins/search.md @@ -0,0 +1,61 @@ +Full text search +By default, the hyperlink on the current page is recognized and the content is saved in localStorage. You can also specify the path to the files. + +<script> + window.$docsify = { + search: 'auto', // default + + search: [ + '/', // => /README.md + '/guide', // => /guide.md + '/get-started', // => /get-started.md + '/zh-cn/', // => /zh-cn/README.md + ], + + // complete configuration parameters + search: { + maxAge: 86400000, // Expiration time, the default one day + paths: [], // or 'auto' + placeholder: 'Type to search', + + // Localization + placeholder: { + '/zh-cn/': '搜索', + '/': 'Type to search', + }, + + noData: 'No Results!', + + // Localization + noData: { + '/zh-cn/': '找不到结果', + '/': 'No Results', + }, + + // Headline depth, 1 - 6 + depth: 2, + + hideOtherSidebarContent: false, // whether or not to hide other sidebar content + + // To avoid search index collision + // between multiple websites under the same domain + namespace: 'website-1', + + // Use different indexes for path prefixes (namespaces). + // NOTE: Only works in 'auto' mode. + // + // When initialiazing an index, we look for the first path from the sidebar. + // If it matches the prefix from the list, we switch to the corresponding index. + pathNamespaces: ['/zh-cn', '/ru-ru', '/ru-ru/v1'], + + // You can provide a regexp to match prefixes. In this case, + // the matching substring will be used to identify the index + pathNamespaces: /^(\/(zh-cn|ru-ru))?(\/(v1|v2))?/, + }, + }; +</script> +<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script> +<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script> +This plugin ignores diacritical marks when performing a full text search (e.g., "cafe" will also match "café"). Legacy browsers like IE11 require the following String.normalize() polyfill to ignore diacritical marks: + +<script src="//polyfill.io/v3/polyfill.min.js?features=String.prototype.normalize"></script> diff --git a/public/js/plugins/sidebar-collapse-folder.css b/public/js/plugins/sidebar-collapse-folder.css @@ -0,0 +1 @@ +.sidebar-nav>ul{margin-left:20px}.sidebar-nav ul:not(.app-sub-sidebar)>li{position:relative;margin:0;cursor:pointer;margin-left:4px}.sidebar-nav ul:not(.app-sub-sidebar)>li::before{content:'';display:block;position:absolute;top:8px;left:-16px;height:14px;width:14px}.sidebar-nav ul:not(.app-sub-sidebar)>li.folder::before{background:center/contain no-repeat url(data:image/svg+xml;base64,PHN2ZyB0PSIxNTk4NTQ1MTE2ODQ2IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjIyNTciCiAgd2lkdGg9IjIwMCIgaGVpZ2h0PSIyMDAiPgogIDxwYXRoIGQ9Ik00NDggMTI4aDUxMmE2NCA2NCAwIDAgMSA2NCA2NHYzMjBhNjQgNjQgMCAwIDEtNjQgNjRINDQ4YTY0IDY0IDAgMCAxLTY0LTY0VjE5MmE2NCA2NCAwIDAgMSA2NC02NHoiCiAgICBmaWxsPSIjNzliOGZmIiBwLWlkPSIyMjU4Ij48L3BhdGg+CiAgPHBhdGgKICAgIGQ9Ik02NCA2NGg0MDguNDQ4YTY0IDY0IDAgMCAxIDU3LjIxNiAzNS4zOTJsOTIuNjcyIDE4NS4yMTZhNjQgNjQgMCAwIDAgNTcuMjE2IDM1LjM5Mkg5NjBhNjQgNjQgMCAwIDEgNjQgNjR2NTEyYTY0IDY0IDAgMCAxLTY0IDY0SDY0YTY0IDY0IDAgMCAxLTY0LTY0VjEyOGE2NCA2NCAwIDAgMSA2NC02NHoiCiAgICBmaWxsPSIjNzliOGZmIiBwLWlkPSIyMjU5Ij48L3BhdGg+Cjwvc3ZnPgo=)}.sidebar-nav ul:not(.app-sub-sidebar)>li.file::before{background:center/contain no-repeat url(data:image/svg+xml;base64,PHN2ZyB0PSIxNTk4NTQ1NjIzOTMxIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjgxNzMiCiAgd2lkdGg9IjIwMCIgaGVpZ2h0PSIyMDAiPgogIDxwYXRoCiAgICBkPSJNODEyLjggMjY4LjhsLTE4NS42LTE4NS42Yy0xMi44LTEyLjgtMjguOC0xOS4yLTQ0LjgtMTkuMkgyNTZjLTM1LjIgMC02NCAyOC44LTY0IDY0djc2OGMwIDM1LjIgMjguOCA2NCA2NCA2NGg1MTJjMzUuMiAwIDY0LTI4LjggNjQtNjRWMzEzLjZjMC0xNi02LjQtMzItMTkuMi00NC44eiBtLTcwLjQgMTkuMkg2MDhWMTUzLjZMNzQyLjQgMjg4ek03MDQgODk2SDI1NlYxMjhoMjg4djE2MGMwIDM1LjIgMjguOCA2NCA2NCA2NGgxNjB2NTQ0aC02NHoiCiAgICBwLWlkPSI4MTc0Ij48L3BhdGg+Cjwvc3ZnPgo=)} diff --git a/public/js/plugins/sidebar-collapse.css b/public/js/plugins/sidebar-collapse.css @@ -0,0 +1 @@ +.sidebar-nav li{position:relative;margin:0;cursor:pointer}.sidebar-nav ul:not(.app-sub-sidebar)>li:not(.file)::before{content:'';display:block;position:absolute;top:11px;left:-12px;height:6px;width:6px;border-right:1px solid #505d6b;border-bottom:1px solid #505d6b;transform:rotate(-45deg);transition:transform .1s}.sidebar-nav ul:not(.app-sub-sidebar)>li.open::before{transform:rotate(45deg)}.sidebar-nav ul:not(.app-sub-sidebar)>li.collapse::before{transform:rotate(-45deg)} diff --git a/public/js/plugins/sidebar-collapse.js b/public/js/plugins/sidebar-collapse.js @@ -0,0 +1,256 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory() : + typeof define === 'function' && define.amd ? define(factory) : + (factory()); +}(this, (function () { 'use strict'; + + function styleInject(css, ref) { + if ( ref === void 0 ) ref = {}; + var insertAt = ref.insertAt; + + if (!css || typeof document === 'undefined') { return; } + + var head = document.head || document.getElementsByTagName('head')[0]; + var style = document.createElement('style'); + style.type = 'text/css'; + + if (insertAt === 'top') { + if (head.firstChild) { + head.insertBefore(style, head.firstChild); + } else { + head.appendChild(style); + } + } else { + head.appendChild(style); + } + + if (style.styleSheet) { + style.styleSheet.cssText = css; + } else { + style.appendChild(document.createTextNode(css)); + } + } + + var css = ".sidebar-nav > ul > li ul {\n display: none;\n}\n\n.app-sub-sidebar {\n display: none;\n}\n\n.app-sub-sidebar.open {\n display: block;\n}\n\n.sidebar-nav .open > ul:not(.app-sub-sidebar),\n.sidebar-nav .active:not(.collapse) > ul {\n display: block;\n}\n\n/* 抖动 */\n.sidebar-nav li.open:not(.collapse) > ul {\n display: block;\n}\n\n.active + ul.app-sub-sidebar {\n display: block;\n}\n"; + styleInject(css); + + function sidebarCollapsePlugin(hook, vm) { + hook.doneEach(function (html, next) { + var activeNode = getActiveNode(); + openActiveToRoot(activeNode); + addFolderFileClass(); + addLevelClass(); + syncScrollTop(activeNode); + next(html); + }); + hook.ready(function () { + document.querySelector('.sidebar-nav').addEventListener('click', handleMenuClick); + }); + } + + function init() { + document.addEventListener('scroll', scrollSyncMenuStatus); + } + + var lastTop; // 侧边栏滚动状态 + + function syncScrollTop(activeNode) { + if (activeNode && lastTop != undefined) { + var curTop = activeNode.getBoundingClientRect().top; + document.querySelector('.sidebar').scrollBy(0, curTop - lastTop); + } + } + + function scrollSyncMenuStatus() { + requestAnimationFrame(function () { + var el = document.querySelector('.app-sub-sidebar > .active'); + + if (el) { + el.parentNode.parentNode.querySelectorAll('.app-sub-sidebar').forEach(function (dom) { + return dom.classList.remove('open'); + }); + + while (el.parentNode.classList.contains('app-sub-sidebar')) { + if (el.parentNode.classList.contains('open')) { + break; + } else { + el.parentNode.classList.add('open'); + el = el.parentNode; + } + } + } + }); + } + + function handleMenuClick(e) { + lastTop = e.target.getBoundingClientRect().top; + var newActiveNode = findTagParent(e.target, 'LI', 2); + if (!newActiveNode) return; + + if (newActiveNode.classList.contains('open')) { + newActiveNode.classList.remove('open'); // docsify 默认行为会操作 collapse,我们异步之后修补 + + setTimeout(function () { + newActiveNode.classList.add('collapse'); + }, 0); + } else { + removeOpenToRoot(getActiveNode()); + openActiveToRoot(newActiveNode); // docsify 默认行为会操作 collapse,我们异步之后修补 + + setTimeout(function () { + newActiveNode.classList.remove('collapse'); + }, 0); + } + + syncScrollTop(newActiveNode); + } + + function getActiveNode() { + var node = document.querySelector('.sidebar-nav .active'); + + if (!node) { + var curLink = document.querySelector(".sidebar-nav a[href=\"".concat(decodeURIComponent(location.hash).replace(/ /gi, '%20'), "\"]")); + node = findTagParent(curLink, 'LI', 2); + + if (node) { + node.classList.add('active'); + } + } + + return node; + } + + function openActiveToRoot(node) { + if (node) { + node.classList.add('open', 'active'); + + while (node && node.className !== 'sidebar-nav' && node.parentNode) { + if (node.parentNode.tagName === 'LI' || node.parentNode.className === 'app-sub-sidebar') { + node.parentNode.classList.add('open'); + } + + node = node.parentNode; + } + } + } + + function removeOpenToRoot(node) { + if (node) { + node.classList.remove('open', 'active'); + + while (node && node.className !== 'sidebar-nav' && node.parentNode) { + if (node.parentNode.tagName === 'LI' || node.parentNode.className === 'app-sub-sidebar') { + node.parentNode.classList.remove('open'); + } + + node = node.parentNode; + } + } + } + + function findTagParent(curNode, tagName, level) { + if (curNode && curNode.tagName === tagName) return curNode; + var l = 0; + + while (curNode) { + l++; + if (l > level) return; + + if (curNode.parentNode.tagName === tagName) { + return curNode.parentNode; + } + + curNode = curNode.parentNode; + } + } + + function addFolderFileClass() { + document.querySelectorAll('.sidebar-nav li').forEach(function (li) { + if (li.querySelector('ul:not(.app-sub-sidebar)')) { + li.classList.add('folder'); + } else { + li.classList.add('file'); + } + }); + } + + function addLevelClass() { + function find(root, level) { + root.childNodes && root.childNodes.forEach(function (child) { + if (child.classList && child.classList.contains('folder')) { + child.classList.add("level-".concat(level)); + + if (window.$docsify && window.$docsify.sidebarDisplayLevel && typeof window.$docsify.sidebarDisplayLevel === 'number' && level <= window.$docsify.sidebarDisplayLevel) { + child.classList.add('open'); + } + + if (child && child.childNodes.length > 1) { + find(child.childNodes[1], level + 1); + } + } + }); + } + + find(document.querySelector('.sidebar-nav > ul'), 1); + } + + init(); + + var css$1 = "@media screen and (max-width: 768px) {\n /* 移动端适配 */\n .markdown-section {\n max-width: none;\n padding: 16px;\n }\n /* 改变原来按钮热区大小 */\n .sidebar-toggle {\n padding: 0 0 10px 10px;\n }\n /* my pin */\n .sidebar-pin {\n appearance: none;\n outline: none;\n position: fixed;\n bottom: 0;\n border: none;\n width: 40px;\n height: 40px;\n background: transparent;\n }\n}\n"; + styleInject(css$1); + + var PIN = 'DOCSIFY_SIDEBAR_PIN_FLAG'; + + function init$1() { + // 响应式尺寸 @media screen and (max-width: 768px) + if (document.documentElement.clientWidth > 768) return; + localStorage.setItem(PIN, false); // 添加覆盖标签 + + var btn = document.createElement('button'); + btn.classList.add('sidebar-pin'); + btn.onclick = togglePin; + document.body.append(btn); + window.addEventListener('load', function () { + var content = document.querySelector('.content'); // 点击内容区域收起侧边栏 + + document.body.onclick = content.onclick = function (e) { + if (e.target === document.body || e.currentTarget === content) { + if (localStorage.getItem(PIN) === 'true') { + togglePin(); + } + } + }; + }); + } + + function togglePin() { + var pin = localStorage.getItem(PIN); + pin = pin === 'true'; + localStorage.setItem(PIN, !pin); + + if (pin) { + document.querySelector('.sidebar').style.transform = 'translateX(0)'; + document.querySelector('.content').style.transform = 'translateX(0)'; + } else { + document.querySelector('.sidebar').style.transform = 'translateX(300px)'; + document.querySelector('.content').style.transform = 'translateX(300px)'; + } + } + + init$1(); + + function install() { + if (!window.$docsify) { + console.error('这是一个docsify插件,请先引用docsify库!'); + } else { + for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) { + plugins[_key] = arguments[_key]; + } + + $docsify.plugins = plugins.concat($docsify.plugins || []); + } + } + + install(sidebarCollapsePlugin); + +}))); diff --git a/public/js/plugins/sidebar-collapse.md b/public/js/plugins/sidebar-collapse.md @@ -0,0 +1,71 @@ +# docsify-sidebar-collapse + +![](https://img.shields.io/npm/v/docsify-sidebar-collapse.svg) +![](https://img.shields.io/github/license/iPeng6/docsify-sidebar-collapse.svg) + +Support docsify sidebar catalog expand and collapse + +## Preview + +![](assets/show.gif) + +## Usage + +Firstly, make sure that the [loadSidebar](https://docsify.js.org/#/configuration?id=loadsidebar) config is enabled,and the Markdown file `_sidebar.md` is provided in the root directory. + +Then insert script into document just like the [official plugins](https://docsify.js.org/#/plugins)'s usage + +```html +<script> + window.$docsify = { + loadSidebar: true, + alias: { + '/.*/_sidebar.md': '/_sidebar.md', + }, + subMaxLevel: 3, + ... + sidebarDisplayLevel: 1, // set sidebar display level + } +</script> +<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script> + +<!-- plugins --> +<script src="//cdn.jsdelivr.net/npm/docsify-sidebar-collapse/dist/docsify-sidebar-collapse.min.js"></script> +``` + +## \_sidebar.md demo + +``` +- [数据结构与算法](/general/algorithm/README.md) + - 数据结构 + - [stack](/general/algorithm/data-structures/stack/README.zh-CN.md) + - [queue](/general/algorithm/data-structures/queue/README.zh-CN.md) + - list + - [linked-list](/general/algorithm/data-structures/linked-list/README.zh-CN.md) + - [doubly-linked-list](/general/algorithm/data-structures/doubly-linked-list/README.zh-CN.md) + - [tree](/general/algorithm/data-structures/tree/README.zh-CN.md) + - [binary search tree](/general/algorithm/data-structures/tree/binary-search-tree/README.md) + - [red black tree](/general/algorithm/data-structures/tree/red-black-tree/README.md) + - [heap](/general/algorithm/data-structures/heap/README.zh-CN.md) + - [hash-table](/general/algorithm/data-structures/hash-table/README.md) + - [graph](/general/algorithm/data-structures/graph/README.zh-CN.md) + - 算法 + - [排序算法](/general/algorithm/algorithms/sorting.md) +- [设计模式](/general/design-pattern/README.md) +- 网络 + - [协议模型](/general/network/protocol-model.md) + - [TCP/IP](/general/network/tcp-ip.md) +``` + +## Style demo + +- arrow style + ```html + <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify-sidebar-collapse/dist/sidebar.min.css" /> + ``` + +- folder style + ```html + <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify-sidebar-collapse/dist/sidebar-folder.min.css" /> + ``` + ![](assets/style-folder.jpg) diff --git a/public/js/plugins/tabs.js b/public/js/plugins/tabs.js @@ -0,0 +1,248 @@ +// SPDX-FilyCopyrightText: Copyright (c) 2018 John Hildenbiddle +// SPDX-License-Identifier: MIT + +/*! + * docsify-tabs + * v1.6.3 + * https://jhildenbiddle.github.io/docsify-tabs/ + * (c) 2018-2024 John Hildenbiddle + * MIT license + */ +!(function () { + "use strict"; + !(function (t, a) { + void 0 === a && (a = {}); + var o = a.insertAt; + if (t && "undefined" != typeof document) { + var c = document.head || document.getElementsByTagName("head")[0], + e = document.createElement("style"); + (e.type = "text/css"), "top" === o && c.firstChild ? c.insertBefore(e, c.firstChild) : c.appendChild(e), e.styleSheet ? (e.styleSheet.cssText = t) : e.appendChild(document.createTextNode(t)); + } + })( + ':root{--docsifytabs-border-color:#ededed;--docsifytabs-border-px:1px;--docsifytabs-border-radius-px: ;--docsifytabs-margin:1.5em 0;--docsifytabs-tab-background:#f8f8f8;--docsifytabs-tab-background--active:var(--docsifytabs-content-background);--docsifytabs-tab-color:#999;--docsifytabs-tab-color--active:inherit;--docsifytabs-tab-highlight-px:3px;--docsifytabs-tab-highlight-color:var(--theme-color,currentColor);--docsifytabs-tab-padding:0.6em 1em;--docsifytabs-content-background:inherit;--docsifytabs-content-padding:1.5rem}.docsify-tabs:before,.docsify-tabs__tab{z-index:1}.docsify-tabs__tab--active,.docsify-tabs__tab:focus{z-index:2}.docsify-tabs{display:flex;flex-wrap:wrap;position:relative}.docsify-tabs:before{content:"";flex:1 1;order:0}.docsify-tabs__tab{appearance:none;font-size:inherit;margin:0;order:-1;position:relative}.docsify-tabs__content[class]{height:0;overflow:hidden;position:absolute;visibility:hidden;width:100%}.docsify-tabs__content[class]>:first-child{margin-top:0}.docsify-tabs__content[class]>:last-child{margin-bottom:0}.docsify-tabs__tab--active+.docsify-tabs__content[class]{height:auto;overflow:auto;position:relative;visibility:visible}[class*=docsify-tabs--]{margin:1.5em 0;margin:var(--docsifytabs-margin)}[class*=docsify-tabs--]>.docsify-tabs__tab{background:#f8f8f8;background:var(--docsifytabs-tab-background);color:#999;color:var(--docsifytabs-tab-color);padding:.6em 1em;padding:var(--docsifytabs-tab-padding)}[class*=docsify-tabs--]>.docsify-tabs__tab--active{background:inherit;background:var(--docsifytabs-tab-background--active);color:inherit;color:var(--docsifytabs-tab-color--active)}[class*=docsify-tabs--]>.docsify-tabs__content{background:inherit;background:var(--docsifytabs-content-background)}[class*=docsify-tabs--]>.docsify-tabs__tab--active+.docsify-tabs__content{padding:1.5rem;padding:var(--docsifytabs-content-padding)}.docsify-tabs--classic:before,.docsify-tabs--classic>.docsify-tabs__content,.docsify-tabs--classic>.docsify-tabs__tab{border-color:#ededed;border-color:var(--docsifytabs-border-color);border-style:solid;border-width:1px;border-width:var(--docsifytabs-border-px)}.docsify-tabs--classic:before{border-left-width:0;border-right-width:0;border-top-width:0;margin-right:1px;margin-right:var(--docsifytabs-border-px)}.docsify-tabs--classic>.docsify-tabs__tab:first-of-type{border-top-left-radius:var(--docsifytabs-border-radius-px)}.docsify-tabs--classic>.docsify-tabs__tab:last-of-type{border-top-right-radius:var(--docsifytabs-border-radius-px)}.docsify-tabs--classic>.docsify-tabs__tab~.docsify-tabs__tab{margin-left:-1px;margin-left:calc(0px - var(--docsifytabs-border-px))}.docsify-tabs--classic>.docsify-tabs__tab--active{border-bottom-width:0;box-shadow:inset 0 3px 0 0 currentColor;box-shadow:inset 0 var(--docsifytabs-tab-highlight-px) 0 0 var(--docsifytabs-tab-highlight-color)}.docsify-tabs--classic>.docsify-tabs__content{border-radius:0;border-radius:0 var(--docsifytabs-border-radius-px) var(--docsifytabs-border-radius-px) var(--docsifytabs-border-radius-px);border-top:0;margin-top:-1px;margin-top:calc(0px - var(--docsifytabs-border-px))}.docsify-tabs--material>.docsify-tabs__tab{background:transparent;border:0;margin-bottom:2px;margin-bottom:calc(var(--docsifytabs-tab-highlight-px) - var(--docsifytabs-border-px))}.docsify-tabs--material>.docsify-tabs__tab--active{background:transparent;box-shadow:0 3px 0 0 currentColor;box-shadow:0 var(--docsifytabs-tab-highlight-px) 0 0 var(--docsifytabs-tab-highlight-color)}.docsify-tabs--material>.docsify-tabs__content{border-color:#ededed;border-color:var(--docsifytabs-border-color);border-style:solid;border-width:1px 0;border-width:var(--docsifytabs-border-px) 0}', + { insertAt: "top" } + ); + var t = "tabs:replace", + a = { tabsContainer: "content", tabBlock: "docsify-tabs", tabButton: "docsify-tabs__tab", tabButtonActive: "docsify-tabs__tab--active", tabContent: "docsify-tabs__content" }, + o = { + codeMarkup: /(```[\s\S]*?```)/gm, + commentReplaceMarkup: new RegExp("\x3c!-- ".concat(t, " (.*?) --\x3e")), + tabBlockMarkup: /( *)(<!-+\s+tabs:\s*?start\s+-+>)(?:(?!(<!-+\s+tabs:\s*?(?:start|end)\s+-+>))[\s\S])*(<!-+\s+tabs:\s*?end\s+-+>)/, + tabCommentMarkup: /[\r\n]*(\s*)<!-+\s+tab:\s*(.*)\s+-+>[\r\n]+([\s\S]*?)[\r\n]*\s*(?=<!-+\s+tabs?:(?!replace))/m, + tabHeadingMarkup: /[\r\n]*(\s*)#{1,6}\s*[*_]{2}\s*(.*[^\s])\s*[*_]{2}[\r\n]+([\s\S]*?)(?=#{1,6}\s*[*_]{2}|<!-+\s+tabs:\s*?end\s+-+>)/m, + }, + c = { persist: !0, sync: !0, theme: "classic", tabComments: !0, tabHeadings: !0 }, + e = { + get persist() { + return "docsify-tabs.persist.".concat(window.location.pathname); + }, + sync: "docsify-tabs.sync", + }; + function s(t, a) { + return (Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector).call(t, a); + } + function r() { + var t = document.querySelector(".".concat(a.tabsContainer)), + o = t ? Array.apply(null, t.querySelectorAll(".".concat(a.tabBlock))) : [], + r = JSON.parse(sessionStorage.getItem(e.persist)) || {}, + i = JSON.parse(sessionStorage.getItem(e.sync)) || []; + !(function () { + var t = window.location.hash || window.location.search, + o = decodeURIComponent((t.match(/(?:id=)([^&]+)/) || [])[1]), + c = o && ".".concat(a.tabBlock, " #").concat(o); + if (o && document.querySelector(c)) { + var e, + s = document.querySelector("#".concat(o)); + if (s.closest) e = s.closest(".".concat(a.tabContent)); + else for (e = s.parentNode; e !== document.body && !e.classList.contains("".concat(a.tabContent)); ) e = e.parentNode; + n(e.previousElementSibling); + } + })(), + o.forEach(function (t, o) { + var e = Array.apply(null, t.children).filter(function (t) { + return s(t, ".".concat(a.tabButtonActive)); + })[0]; + e || + (c.sync && + i.length && + (e = i + .map(function (o) { + return Array.apply(null, t.children).filter(function (t) { + return s(t, ".".concat(a.tabButton, '[data-tab="').concat(o, '"]')); + })[0]; + }) + .filter(function (t) { + return t; + })[0]), + !e && + c.persist && + (e = Array.apply(null, t.children).filter(function (t) { + return s(t, ".".concat(a.tabButton, '[data-tab="').concat(r[o], '"]')); + })[0]), + (e = e || t.querySelector(".".concat(a.tabButton))) && e.classList.add(a.tabButtonActive)); + }); + } + function n(t) { + var o = arguments.length > 1 && void 0 !== arguments[1] && arguments[1], + r = (function (t, a) { + if (Element.prototype.closest) return t.closest(a); + for (; t; ) { + if (s(t, a)) return t; + t = t.parentNode || null; + } + return t; + })(t, ".".concat(a.tabButton)); + if (r) { + var i = r.getAttribute("data-tab"), + d = document.querySelector(".".concat(a.tabsContainer)), + b = r.parentNode, + f = Array.apply(null, b.children).filter(function (t) { + return s(t, "button"); + }), + l = b.offsetTop; + if ( + (f.forEach(function (t) { + return t.classList.remove(a.tabButtonActive); + }), + r.classList.add(a.tabButtonActive), + !o) + ) { + if (c.persist) { + var u = (d ? Array.apply(null, d.querySelectorAll(".".concat(a.tabBlock))) : []).indexOf(b), + y = JSON.parse(sessionStorage.getItem(e.persist)) || {}; + (y[u] = i), sessionStorage.setItem(e.persist, JSON.stringify(y)); + } + if (c.sync) { + var p = d ? Array.apply(null, d.querySelectorAll(".".concat(a.tabButton, '[data-tab="').concat(i, '"]'))) : [], + m = JSON.parse(sessionStorage.getItem(e.sync)) || []; + p.forEach(function (t) { + n(t, !0); + }), + window.scrollBy(0, 0 - (l - b.offsetTop)), + m.indexOf(i) > 0 && m.splice(m.indexOf(i), 1), + 0 !== m.indexOf(i) && (m.unshift(i), sessionStorage.setItem(e.sync, JSON.stringify(m))); + } + } + } + } + window && + ((window.$docsify = window.$docsify || {}), + (window.$docsify.tabs = window.$docsify.tabs || {}), + Object.keys(window.$docsify.tabs).forEach(function (t) { + Object.prototype.hasOwnProperty.call(c, t) && (c[t] = window.$docsify.tabs[t]); + }), + (window.$docsify.tabs.version = "1.6.3"), + (c.tabComments || c.tabHeadings) && + (window.$docsify.plugins = [].concat(window.$docsify.plugins || [], function (e, s) { + var i = !1; + e.beforeEach(function (e) { + return ( + (i = o.tabBlockMarkup.test(e)) && + (e = (function (e, s) { + for ( + var r = e.match(o.codeMarkup) || [], + n = r.map(function (a, o) { + var c = "\x3c!-- ".concat(t, " CODEBLOCK").concat(o, " --\x3e"); + return ( + (e = e.replace(a, function () { + return c; + })), + c + ); + }), + i = c.theme ? "".concat(a.tabBlock, "--").concat(c.theme) : "", + d = document.createElement("div"), + b = e.match(o.tabBlockMarkup), + f = 1, + l = function () { + var r, + n = b[0], + l = b[1], + u = b[2], + y = b[4], + p = c.tabComments && o.tabCommentMarkup.test(n), + m = c.tabHeadings && o.tabHeadingMarkup.test(n), + h = "", + g = ""; + if (p || m) { + (h = "\x3c!-- ".concat(t, ' <div class="').concat([a.tabBlock, i].join(" "), '"> --\x3e')), (g = "\n".concat(l, "\x3c!-- ").concat(t, " </div> --\x3e")); + for ( + var v = function () { + d.innerHTML = r[2].trim() ? s.compiler.compile(r[2]).replace(/<\/?p>/g, "") : "Tab ".concat(f); + var o = d.innerHTML, + c = (r[3] || "").trim(), + e = (d.textContent || d.firstChild.getAttribute("alt") || d.firstChild.getAttribute("src")).trim().toLowerCase(); + (n = n.replace(r[0], function () { + return [ + "\n".concat(l, "\x3c!-- ").concat(t, ' <button class="').concat(a.tabButton, '" data-tab="').concat(e, '">').concat(o, "</button> --\x3e"), + "\n".concat(l, "\x3c!-- ").concat(t, ' <div class="').concat(a.tabContent, '" data-tab-content="').concat(e, '"> --\x3e'), + "\n\n".concat(l).concat(c), + "\n\n".concat(l, "\x3c!-- ").concat(t, " </div> --\x3e"), + ].join(""); + })), + f++; + }; + null !== (r = (c.tabComments ? o.tabCommentMarkup.exec(n) : null) || (c.tabHeadings ? o.tabHeadingMarkup.exec(n) : null)); + + ) + v(); + } + (n = (n = n.replace(u, function () { + return h; + })).replace(y, function () { + return g; + })), + (e = e.replace(b[0], function () { + return n; + })), + (b = e.match(o.tabBlockMarkup)); + }; + b; + + ) + l(); + return ( + n.forEach(function (t, a) { + e = e.replace(t, function () { + return r[a]; + }); + }), + e + ); + })(e, s)), + e + ); + }), + e.afterEach(function (t, a) { + i && + (t = (function (t) { + for ( + var a, + c = function () { + var o = a[0], + c = a[1] || ""; + t = t.replace(o, function () { + return c; + }); + }; + null !== (a = o.commentReplaceMarkup.exec(t)); + + ) + c(); + return t; + })(t)), + a(t); + }), + e.doneEach(function () { + i && r(); + }), + e.mounted(function () { + var t = document.querySelector(".".concat(a.tabsContainer)); + t && + t.addEventListener("click", function (t) { + n(t.target); + }); + }); + }))); +})(); + diff --git a/public/js/plugins/tabs.md b/public/js/plugins/tabs.md @@ -0,0 +1,714 @@ +# docsify-tabs + +[![NPM](https://img.shields.io/npm/v/docsify-tabs.svg?style=flat-square)](https://www.npmjs.com/package/docsify-tabs) +[![GitHub Workflow Status (master)](https://img.shields.io/github/actions/workflow/status/jhildenbiddle/docsify-tabs/test.yml?branch=master&label=checks&style=flat-square)](https://github.com/jhildenbiddle/docsify-tabs/actions?query=branch%3Amaster+) +[![Codacy grade](https://img.shields.io/codacy/grade/e9c2a9504211450ab39e0d72a1158a47.svg?style=flat-square)](https://app.codacy.com/gh/jhildenbiddle/docsify-tabs/dashboard) +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://github.com/jhildenbiddle/docsify-tabs/blob/master/LICENSE) +[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/docsify-tabs/badge)](https://www.jsdelivr.com/package/npm/docsify-tabs) +[![Sponsor this project](https://img.shields.io/static/v1?style=flat-square&label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/jhildenbiddle) +[![Add a star on GitHub](https://img.shields.io/github/stars/jhildenbiddle/docsify-tabs?style=social)](https://github.com/jhildenbiddle/docsify-tabs) +[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fgithub.com%2Fjhildenbiddle%2Fdocsify-tabs&hashtags=docsify,developers,frontend,plugin) + +A [docsify.js](https://docsify.js.org) plugin for rendering tabbed content from markdown. + +## Demo + +A basic tab set using the default [options](#options). + +<!-- tabs:start --> + +#### **Tab A** + +### Heading for Tab A {docsify-ignore} + +This is some text. + +- List item A-1 +- List item A-2 + +```js +// JavaScript +function add(a, b) { + return a + b; +} +``` + +<!-- tabs:start --> + +#### **Nested Tab 1** + +Life is what happens when you're busy making other plans. + +\- _John Lennon_ + +#### **Nested Tab 2** + +The greatest glory in living lies not in never falling, but in rising every time we fall. + +\- _Nelson Mandela_ + +<!-- tabs:end --> + +#### **Tab B** + +### Heading for Tab B {docsify-ignore} + +This is some text. + +- List item B-1 +- List item B-2 + +```css +/* CSS */ +body { + background: white; + color: #222; +} +``` + +#### **Tab C** + +This is some text. + +- List item C-1 +- List item C-2 + +```html +<!-- HTML --> +<h1>Heading</h1> +<p>This is a paragraph.</p> +``` + +<!-- tabs:end --> + +?> Like this plugin? Check out [docsify-themeable](https://jhildenbiddle.github.io/docsify-themeable) for your site theme, [docsify-plugin-ethicalads](https://jhildenbiddle.github.io/docsify-plugin-ethicalads/) for EthicalAds integration, and [docsify-plugin-runkit](https://jhildenbiddle.github.io/docsify-plugin-runkit/) for live JavaScript REPLs! + +## Features + +- Generate tabbed content using unobtrusive markup +- Persist tab selections on refresh/revisit +- Sync tab selection for tabs with matching labels +- Nest tab sets within tab sets +- Style tabs using "classic" or "material" tab theme +- Customize styles without complex CSS using CSS custom properties +- Compatible with [docsify-themeable](https://jhildenbiddle.github.io/docsify-themeable/) themes + +**Limitations** + +- Tabs wraps when their combined width exceeds the content area width + +## Installation + +1. Add the docsify-tabs plugin to your `index.html` after docsify. The plugin is available on [jsdelivr](https://www.jsdelivr.com/package/npm/docsify-tabs) (below), [unpkg](https://unpkg.com/browse/docsify-tabs/), and other CDN services that auto-publish npm packages. + + ```html + <!-- docsify (latest v4.x.x)--> + <script src="https://cdn.jsdelivr.net/npm/docsify@4"></script> + + <!-- docsify-tabs (latest v1.x.x) --> + <script src="https://cdn.jsdelivr.net/npm/docsify-tabs@1"></script> + ``` + + !> Note the `@` version number lock in the URLs above. This prevents breaking changes in future releases from affecting your project and is therefore the safest method of loading dependencies from a CDN. When a new major version is released, you will need to manually update your CDN URLs by changing the version number after the @ symbol. + +1. Review the [Options](#options) section and configure as needed. + + ```javascript + window.$docsify = { + // ... + tabs: { + persist: true, // default + sync: true, // default + theme: 'classic', // default + tabComments: true, // default + tabHeadings: true // default + } + }; + ``` + +1. Review the [Customization](#customization) section and set theme properties as needed. + + ```html + <style> + :root { + --docsifytabs-border-color: #ededed; + --docsifytabs-tab-highlight-color: purple; + } + </style> + ``` + +## Usage + +1. Define a tab set using `tabs:start` and `tabs:end` HTML comments. + + HTML comments are used to mark the start and end of a tab set. The use of HTML comments prevents tab-related markup from being displayed when markdown is rendered as HTML outside of your docsify site (e.g. GitHub, GitLab, etc). + + ```markdown + <!-- tabs:start --> + + ... + + <!-- tabs:end --> + ``` + +1. Define tabs within a tab set using heading + bold markdown. + + Heading text will be used as the tab label, and all proceeding content will be associated with that tab up to start of the next tab or a `tab:end` comment. The use of heading + bold markdown allows tabs to be defined using standard markdown and ensures that tab content is displayed with a heading when rendered outside of your docsify site (e.g. GitHub, GitLab, etc). + + ```markdown + <!-- tabs:start --> + + #### **English** + + Hello! + + #### **French** + + Bonjour! + + #### **Italian** + + Ciao! + + <!-- tabs:end --> + ``` + + See [`options.tabHeadings`](#tabheadings) for details or [`options.tabComments`](#tabcomments) for an alternate method of defining tabs using HTML comments. + +1. Voilà! A tab set is formed. + + <!-- tabs:start --> + + #### **English** + + Hello! + + #### **French** + + Bonjour! + + #### **Italian** + + Ciao! + + <!-- tabs:end --> + +## Options + +Options are set within the [`window.$docsify`](https://docsify.js.org/#/configuration) configuration under the `tabs` key: + +```html +<script> + window.$docsify = { + // ... + tabs: { + persist: true, // default + sync: true, // default + theme: 'classic', // default + tabComments: true, // default + tabHeadings: true // default + } + }; +</script> +``` + +### persist + +- Type: `boolean` +- Default: `true` + +Determines if tab selections will be restored after a page refresh/revisit. + +**Configuration** + +```javascript +window.$docsify = { + // ... + tabs: { + persist: true // default + } +}; +``` + +### sync + +- Type: `boolean` +- Default: `true` + +Determines if tab selections will be synced across tabs with matching labels. + +**Configuration** + +```javascript +window.$docsify = { + // ... + tabs: { + sync: true // default + } +}; +``` + +**Demo** + +<!-- tabs:start --> + +#### **macOS** + +Instructions for macOS... + +#### **Windows** + +Instructions for Windows... + +#### **Linux** + +Instructions for Linux... + +<!-- tabs:end --> + +<!-- tabs:start --> + +#### **macOS** + +More instructions for macOS... + +#### **Windows** + +More instructions for Windows... + +#### **Linux** + +More instructions for Linux... + +<!-- tabs:end --> + +### theme + +- Type: `string|boolean` +- Accepts: `'classic'`, `'material'`, `false` +- Default: `'classic'` + +Sets the tab theme. A value of `false` will indicate that no theme should be applied, which should be used when creating custom tab themes. + +**Configuration** + +```javascript +window.$docsify = { + // ... + tabs: { + theme: 'classic' // default + } +}; +``` + +**Demo** + +<label data-class-target="label + .docsify-tabs" data-class-remove="docsify-tabs--material" data-class-add="docsify-tabs--classic"> + <input name="theme" type="radio" value="classic" checked="checked"> Classic +</label> +<label data-class-target="label + .docsify-tabs" data-class-remove="docsify-tabs--classic" data-class-add="docsify-tabs--material"> + <input name="theme" type="radio" value="material"> Material +</label> +<label data-class-target="label + .docsify-tabs" data-class-remove="docsify-tabs--classic docsify-tabs--material"> + <input name="theme" type="radio" value="none"> No Theme +</label> + +<!-- tabs:start --> + +#### **Tab A** + +This is some text. + +#### **Tab B** + +This is some more text. + +#### **Tab C** + +Yes, this is even more text. + +<!-- tabs:end --> + +### tabComments + +- Type: `boolean` +- Default: `true` + +Determines if tabs within a tab set can be defined using tab comments. + +Note that defining tabs using HTML comments means tab content will not be labeled when rendered outside of your docsify site (e.g. GitHub, GitLab, etc). For this reason, defining tabs using [`options.tabHeadings`](#tabheadings) is recommended. + +**Configuration** + +```javascript +window.$docsify = { + // ... + tabs: { + tabComments: true // default + } +}; +``` + +**Example** + +```markdown +<!-- tabs:start --> + +<!-- tab:English --> + +Hello! + +<!-- tab:French --> + +Bonjour! + +<!-- tab:Italian --> + +Ciao! + +<!-- tabs:end --> +``` + +### tabHeadings + +- Type: `boolean` +- Default: `true` + +Determines if tabs within a tab set can be defined using heading + bold markdown. + +The use of heading + bold markdown allows tabs to be defined using standard markdown and ensures that tab content is displayed with a heading when rendered outside of your docsify site (e.g. GitHub, GitLab, etc). Heading levels 1-6 are supported (e.g. `#` - `######`) as are both asterisks (`**`) and underscores (`__`) for bold text via markdown. + +**Configuration** + +```javascript +window.$docsify = { + // ... + tabs: { + tabHeadings: true // default + } +}; +``` + +**Example** + +```markdown +<!-- tabs:start --> + +#### **English** + +Hello! + +#### **French** + +Bonjour! + +#### **Italian** + +Ciao! + +<!-- tabs:end --> +``` + +## Customization + +### Themes + +See [`options.theme`](#theme) for details on available themes. + +### Theme Properties + +Theme properties allow you to customize tab styles without writing complex CSS. The following list contains the default theme values. + +[vars.css](https://raw.githubusercontent.com/jhildenbiddle/docsify-tabs/master/src/css/vars.css ':include :type:code') + +To set theme properties, add a `<style>` element to your `index.html` file after all other stylesheets and set properties within a `:root` selector. + +```html +<style> + :root { + --docsifytabs-border-color: #ededed; + --docsifytabs-tab-highlight-color: purple; + } +</style> +``` + +### Custom Styles + +The easiest way to create custom tab styles is by using markdown and/or HTML in your tab label. + +<!-- tabs:start --> + +#### **Bold** + +**Tab Markdown** + +```markdown +<!-- tabs:start --> + +#### **Bold** + +... + +<!-- tabs:end --> +``` + +#### **<em>Italic</em>** + +**Tab Markdown** + +```markdown +<!-- tabs:start --> + +#### **<em>Italic</em>** + +... + +<!-- tabs:end --> +``` + +#### **<span style="color: red;">Red</span>** + +**Tab Markdown** + +```markdown +<!-- tabs:start --> + +#### **<span style="color: red;">Red</span>** + +... + +<!-- tabs:end --> +``` + +#### **:smile:** + +**Tab Markdown** + +```markdown +<!-- tabs:start --> + +#### **:smile:** + +... + +<!-- tabs:end --> +``` + +#### **😀** + +**Tab Markdown** + +```markdown +<!-- tabs:start --> + +#### **😀** + +... + +<!-- tabs:end --> +``` + +#### **Badge <span class="tab-badge">New!</span>** + +**Tab Markdown** + +```markdown +<!-- tabs:start --> + +#### **Badge <span class="tab-badge">New!</span>** + +... + +<!-- tabs:end --> +``` + +#### CSS + +```html +<style> + .tab-badge { + position: absolute; + top: 0; + right: 0; + transform: translate(35%, -45%); + padding: 0.25em 0.35em; + border-radius: 3px; + background: red; + color: white; + font-family: sans-serif; + font-size: 11px; + font-weight: bold; + } +</style> +``` + +<!-- tabs:end --> + +More advanced styling can be applied by leveraging the CSS class names and data attributes associated with tab containers, toggles, labels, and content blocks. Consider the following tab markdown and the HTML output generated by docsify-tabs: + +```markdown +<!-- tabs:start --> + +#### **My Tab** + +... + +<!-- tabs:end --> +``` + +```html +<button class="docsify-tabs__tab" data-tab="my tab">My Tab</button> +<div class="docsify-tabs__content" data-tab-content="my tab">...</div> +``` + +When the tab is active, note the addition of the `docsify-tabs__tab--active` class: + +```html +<button class="docsify-tabs__tab docsify-tabs__tab--active" data-tab="my tab">Basic Tab</button> +``` + +**Examples** + +<!-- tabs:start --> + +#### **Active State** + +**Markdown** + +```markdown +<!-- tabs:start --> + +#### **Active State** + +... + +<!-- tabs:end --> +``` + +**HTML Output** + +```html +<button class="docsify-tabs__tab docsify-tabs__tab--active" data-tab="active state"> + Active State +</button> +<div class="docsify-tabs__content" data-tab-content="active state">...</div> +``` + +**Custom CSS** + +```css +.docsify-tabs__tab--active[data-tab='active state'] { + box-shadow: none; + background: #13547a; + color: white; +} +.docsify-tabs__content[data-tab-content='active state'] { + background-image: linear-gradient(0deg, #80d0c7 0%, #13547a 100%); +} +.docsify-tabs__content[data-tab-content='active state'] p strong { + color: white; +} +``` + +#### **CodePen** + +<div class="cp_embed_wrapper"> + <iframe height="400" style="width: 100%;" scrolling="no" title="CSS Device Frames - Demo" src="https://codepen.io/jhildenbiddle/embed/zYzmzqX?default-tab=result&theme-id=light" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true"> + See the Pen <a href="https://codepen.io/jhildenbiddle/pen/zYzmzqX"> + CSS Device Frames - Demo</a> by John Hildenbiddle (<a href="https://codepen.io/jhildenbiddle">@jhildenbiddle</a>) + on <a href="https://codepen.io">CodePen</a>. + </iframe> +</div> + +**Markdown** + +```markdown +<!-- tabs:start --> + +#### **CodePen** + +CodePen Embed Code... + +<!-- tabs:end --> +``` + +**HTML Output** + +```html +<button class="docsify-tabs__tab docsify-tabs__tab--active" data-tab="codepen">CodePen</button> +<div class="docsify-tabs__content" data-tab-content="codepen">...</div> +``` + +**Custom CSS** + +```css +[data-tab-content='codepen'] .cp_embed_wrapper { + position: relative; + top: calc(0px - var(--docsifytabs-content-padding)); + left: calc(0px - var(--docsifytabs-content-padding)); + width: calc(100% + calc(var(--docsifytabs-content-padding) * 2)); + margin-bottom: calc(0px - var(--docsifytabs-content-padding)); +} + +[data-tab-content='codepen'] .cp_embed_wrapper > * { + margin: 0; +} +``` + +#### **Badge** + +**Markdown** + +```markdown +<!-- tabs:start --> + +#### **Badge** + +... + +<!-- tabs:end --> +``` + +**Custom CSS** + +```css +[data-tab='badge']:after { + content: 'New!'; + position: absolute; + top: 0; + right: 0; + transform: translate(35%, -45%); + padding: 0.25em 0.35em; + border-radius: 3px; + background: red; + color: white; + font-family: sans-serif; + font-size: 11px; + font-weight: bold; +} +``` + +<!-- tabs:end --> + +## Sponsorship + +A [sponsorship](https://github.com/sponsors/jhildenbiddle) is more than just a way to show appreciation for the open-source authors and projects we rely on; it can be the spark that ignites the next big idea, the inspiration to create something new, and the motivation to share so that others may benefit. + +If you benefit from this project, please consider lending your support and encouraging future efforts by [becoming a sponsor](https://github.com/sponsors/jhildenbiddle). + +Thank you! 🙏🏻 + +<iframe src="https://github.com/sponsors/jhildenbiddle/button" title="Sponsor jhildenbiddle" height="35" width="116" style="border: 0; margin: 0;"></iframe> + +## Contact & Support + +- Follow 👨🏻‍💻 **@jhildenbiddle** on [Twitter](https://twitter.com/jhildenbiddle) and [GitHub](https://github.com/jhildenbiddle) for announcements +- Create a 💬 [GitHub issue](https://github.com/jhildenbiddle/docsify-tabs/issues) for bug reports, feature requests, or questions +- Add a ⭐️ [star on GitHub](https://github.com/jhildenbiddle/docsify-tabs) and 🐦 [tweet](https://twitter.com/intent/tweet?url=https%3A%2F%2Fgithub.com%2Fjhildenbiddle%2Fdocsify-tabs&hashtags=css,developers,frontend,javascript) to promote the project +- Become a 💖 [sponsor](https://github.com/sponsors/jhildenbiddle) to support the project and future efforts + +## License + +This project is licensed under the [MIT license](https://github.com/jhildenbiddle/docsify-tabs/blob/master/LICENSE). + +Copyright (c) John Hildenbiddle ([@jhildenbiddle](https://twitter.com/jhildenbiddle)) diff --git a/public/js/plugins/terminal-block.js b/public/js/plugins/terminal-block.js @@ -0,0 +1,126 @@ +/** + * Skipped minification because the original files appears to be already minified. + * Original file: /npm/docsify-terminal-block@1.0.3/dist/index.iife.js + * + * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files + */ +(function () { + "use strict"; + ((r, e) => { + console.log(e); + try { + if (typeof document < "u") { + var o = document.createElement("style"); + console.log("TEST", r); + const t = r.replace(/\[data-theme\]{[^{}]*}/g, ""); + o.appendChild(document.createTextNode(t)), document.head.appendChild(o); + } + } catch (t) { + console.error("vite-plugin-css-injected-by-js", t); + } + })( + ':root,[data-theme]{background-color:hsla(var(--b1) / var(--tw-bg-opacity, 1));color:hsla(var(--bc) / var(--tw-text-opacity, 1))}html{-webkit-tap-highlight-color:transparent}:root{color-scheme:light;--pf: 258.89 94.378% 40.941%;--sf: 314 100% 37.647%;--af: 174 60% 40.784%;--nf: 219 14.085% 22.275%;--in: 198 93% 60%;--su: 158 64% 52%;--wa: 43 96% 56%;--er: 0 91% 71%;--inc: 198 100% 12%;--suc: 158 100% 10%;--wac: 43 100% 11%;--erc: 0 100% 14%;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-text-case: uppercase;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 258.89 94.378% 51.176%;--pc: 0 0% 100%;--s: 314 100% 47.059%;--sc: 0 0% 100%;--a: 174 60% 50.98%;--ac: 174.71 43.59% 15.294%;--n: 219 14.085% 27.843%;--nc: 0 0% 100%;--b1: 0 0% 100%;--b2: 0 0% 94.902%;--b3: 180 1.9608% 90%;--bc: 215 27.907% 16.863% }*,:before,:after{--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: rgb(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: rgb(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: }.dtb-btn{display:inline-flex;flex-shrink:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:center;border-color:transparent;border-color:hsl(var(--n) / var(--tw-border-opacity));text-align:center;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);border-radius:var(--rounded-btn, .5rem);height:3rem;padding-left:1rem;padding-right:1rem;font-size:.875rem;line-height:1.25rem;line-height:1em;min-height:3rem;font-weight:600;text-transform:uppercase;text-transform:var(--btn-text-case, uppercase);text-decoration-line:none;border-width:var(--border-btn, 1px);animation:button-pop var(--animation-btn, .25s) ease-out;--tw-border-opacity: 1;--tw-bg-opacity: 1;background-color:hsl(var(--n) / var(--tw-bg-opacity));--tw-text-opacity: 1;color:hsl(var(--nc) / var(--tw-text-opacity))}.dtb-btn-disabled,.dtb-btn[disabled]{pointer-events:none}.dtb-btn-square{height:3rem;width:3rem;padding:0}.dtb-btn.dtb-loading,.dtb-btn.dtb-loading:hover{pointer-events:none}.dtb-btn.dtb-loading:before{margin-right:.5rem;height:1rem;width:1rem;border-radius:9999px;border-width:2px;animation:spin 2s linear infinite;content:"";border-top-color:transparent;border-left-color:transparent;border-bottom-color:currentColor;border-right-color:currentColor}@media (prefers-reduced-motion: reduce){.dtb-btn.dtb-loading:before{animation:spin 10s linear infinite}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.dtb-btn-group>input[type=radio].dtb-btn{-webkit-appearance:none;-moz-appearance:none;appearance:none}.dtb-btn-group>input[type=radio].dtb-btn:before{content:attr(data-title)}.dtb-mockup-code{position:relative;overflow:hidden;overflow-x:auto;min-width:18rem;--tw-bg-opacity: 1;background-color:hsl(var(--n) / var(--tw-bg-opacity));padding-top:1.25rem;padding-bottom:1.25rem;--tw-text-opacity: 1;color:hsl(var(--nc) / var(--tw-text-opacity));border-radius:var(--rounded-box, 1rem)}.dtb-mockup-code pre[data-prefix]:before{content:attr(data-prefix);display:inline-block;text-align:right;width:2rem;opacity:.5}.dtb-tooltip{position:relative;display:inline-block;--tooltip-offset: calc(100% + 1px + var(--tooltip-tail, 0px));text-align:center;--tooltip-tail: 3px;--tooltip-color: hsl(var(--n));--tooltip-text-color: hsl(var(--nc));--tooltip-tail-offset: calc(100% + 1px - var(--tooltip-tail)) }.dtb-tooltip:before{position:absolute;pointer-events:none;z-index:1;content:var(--tw-content);--tw-content: attr(data-tip);max-width:20rem;border-radius:.25rem;padding:.25rem .5rem;font-size:.875rem;line-height:1.25rem;background-color:var(--tooltip-color);color:var(--tooltip-text-color);width:-moz-max-content;width:max-content}.dtb-tooltip:before,.dtb-tooltip-top:before{transform:translate(-50%);top:auto;left:50%;right:auto;bottom:var(--tooltip-offset)}.dtb-tooltip-left:before{transform:translateY(-50%);top:50%;left:auto;right:var(--tooltip-offset);bottom:auto}.dtb-btn:active:hover,.dtb-btn:active:focus{animation:none;transform:scale(var(--btn-focus-scale, .95))}.dtb-btn:hover,.dtb-btn-active{--tw-border-opacity: 1;border-color:hsl(var(--nf, var(--n)) / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:hsl(var(--nf, var(--n)) / var(--tw-bg-opacity))}.dtb-btn:focus-visible{outline:2px solid hsl(var(--nf));outline-offset:2px}.dtb-btn.dtb-glass:hover,.dtb-btn.dtb-glass.dtb-btn-active{--glass-opacity: 25%;--glass-border-opacity: 15% }.dtb-btn.dtb-glass:focus-visible{outline:2px solid currentColor}.dtb-btn-disabled,.dtb-btn-disabled:hover,.dtb-btn[disabled],.dtb-btn[disabled]:hover{--tw-border-opacity: 0;background-color:hsl(var(--n) / var(--tw-bg-opacity));--tw-bg-opacity: .2;color:hsl(var(--bc) / var(--tw-text-opacity));--tw-text-opacity: .2 }.dtb-btn.dtb-loading.dtb-btn-square:before,.dtb-btn.dtb-loading.dtb-btn-circle:before{margin-right:0}.dtb-btn.dtb-loading.dtb-btn-xl:before,.dtb-btn.dtb-loading.dtb-btn-lg:before{height:1.25rem;width:1.25rem}.dtb-btn.dtb-loading.dtb-btn-sm:before,.dtb-btn.dtb-loading.dtb-btn-xs:before{height:.75rem;width:.75rem}.dtb-btn-group>input[type=radio]:checked.dtb-btn,.dtb-btn-group>.dtb-btn-active{--tw-border-opacity: 1;border-color:hsl(var(--p) / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:hsl(var(--p) / var(--tw-bg-opacity));--tw-text-opacity: 1;color:hsl(var(--pc) / var(--tw-text-opacity))}.dtb-btn-group>input[type=radio]:checked.dtb-btn:focus-visible,.dtb-btn-group>.dtb-btn-active:focus-visible{outline:2px solid hsl(var(--p))}@keyframes button-pop{0%{transform:scale(var(--btn-focus-scale, .95))}40%{transform:scale(1.02)}to{transform:scale(1)}}@keyframes checkmark{0%{background-position-y:5px}50%{background-position-y:-2px}to{background-position-y:0}}.dtb-mockup-code:before{content:"";margin-bottom:1rem;display:block;height:.75rem;width:.75rem;border-radius:9999px;opacity:.3;box-shadow:1.4em 0,2.8em 0,4.2em 0}.dtb-mockup-code pre{padding-right:1.25rem}.dtb-mockup-code pre:before{content:"";margin-right:2ch}@keyframes progress-loading{50%{left:107%}}@keyframes radiomark{0%{box-shadow:0 0 0 12px hsl(var(--b1)) inset,0 0 0 12px hsl(var(--b1)) inset}50%{box-shadow:0 0 0 3px hsl(var(--b1)) inset,0 0 0 3px hsl(var(--b1)) inset}to{box-shadow:0 0 0 4px hsl(var(--b1)) inset,0 0 0 4px hsl(var(--b1)) inset}}@keyframes rating-pop{0%{transform:translateY(-.125em)}40%{transform:translateY(-.125em)}to{transform:translateY(0)}}@keyframes toast-pop{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}.dtb-tooltip:before,.dtb-tooltip:after{opacity:0;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-delay:.1s;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.dtb-tooltip:after{position:absolute;content:"";border-style:solid;border-width:var(--tooltip-tail, 0);width:0;height:0;display:block}.dtb-tooltip.dtb-tooltip-open:before,.dtb-tooltip.dtb-tooltip-open:after,.dtb-tooltip:hover:before,.dtb-tooltip:hover:after{opacity:1;transition-delay:75ms}.dtb-tooltip:not([data-tip]):hover:before,.dtb-tooltip:not([data-tip]):hover:after{visibility:hidden;opacity:0}.dtb-tooltip:after,.dtb-tooltip-top:after{transform:translate(-50%);border-color:var(--tooltip-color) transparent transparent transparent;top:auto;left:50%;right:auto;bottom:var(--tooltip-tail-offset)}.dtb-tooltip-left:after{transform:translateY(-50%);border-color:transparent transparent transparent var(--tooltip-color);top:50%;left:auto;right:calc(var(--tooltip-tail-offset) + 1px);bottom:auto}.dtb-tooltip-accent{--tooltip-color: hsl(var(--a));--tooltip-text-color: hsl(var(--ac)) }.dtb-btn-sm{height:2rem;padding-left:.75rem;padding-right:.75rem;min-height:2rem;font-size:.875rem}.dtb-btn-square:where(.dtb-btn-xs){height:1.5rem;width:1.5rem;padding:0}.dtb-btn-square:where(.dtb-btn-sm){height:2rem;width:2rem;padding:0}.dtb-btn-square:where(.dtb-btn-md){height:3rem;width:3rem;padding:0}.dtb-btn-square:where(.dtb-btn-lg){height:4rem;width:4rem;padding:0}.dtb-btn-circle:where(.dtb-btn-sm){height:2rem;width:2rem;border-radius:9999px;padding:0}.dtb-btn-group .dtb-btn:not(:first-child):not(:last-child){border-radius:0}.dtb-btn-group .dtb-btn:first-child:not(:last-child){margin-top:-0px;margin-left:-1px;border-top-left-radius:var(--rounded-btn, .5rem);border-top-right-radius:0;border-bottom-left-radius:var(--rounded-btn, .5rem);border-bottom-right-radius:0}.dtb-btn-group .dtb-btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:var(--rounded-btn, .5rem);border-bottom-left-radius:0;border-bottom-right-radius:var(--rounded-btn, .5rem)}.dtb-btn-group-horizontal .dtb-btn:not(:first-child):not(:last-child){border-radius:0}.dtb-btn-group-horizontal .dtb-btn:first-child:not(:last-child){margin-top:-0px;margin-left:-1px;border-top-left-radius:var(--rounded-btn, .5rem);border-top-right-radius:0;border-bottom-left-radius:var(--rounded-btn, .5rem);border-bottom-right-radius:0}.dtb-btn-group-horizontal .dtb-btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:var(--rounded-btn, .5rem);border-bottom-left-radius:0;border-bottom-right-radius:var(--rounded-btn, .5rem)}.dtb-btn-group-vertical .dtb-btn:first-child:not(:last-child){margin-top:-1px;margin-left:-0px;border-top-left-radius:var(--rounded-btn, .5rem);border-top-right-radius:var(--rounded-btn, .5rem);border-bottom-left-radius:0;border-bottom-right-radius:0}.dtb-btn-group-vertical .dtb-btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:var(--rounded-btn, .5rem);border-bottom-right-radius:var(--rounded-btn, .5rem)}.dtb-absolute{position:absolute}.dtb-relative{position:relative}.dtb-right-2{right:.5rem}.dtb-top-2{top:.5rem}.dtb-h-5{height:1.25rem}.dtb-w-5{width:1.25rem}.dtb-border-0{border-width:0px}.\\!dtb-bg-error{--tw-bg-opacity: 1 !important;background-color:hsl(var(--er) / var(--tw-bg-opacity))!important}.\\!dtb-bg-info{--tw-bg-opacity: 1 !important;background-color:hsl(var(--in) / var(--tw-bg-opacity))!important}.\\!dtb-bg-success{--tw-bg-opacity: 1 !important;background-color:hsl(var(--su) / var(--tw-bg-opacity))!important}.\\!dtb-bg-warning{--tw-bg-opacity: 1 !important;background-color:hsl(var(--wa) / var(--tw-bg-opacity))!important}.dtb-fill-current{fill:currentColor}.\\!dtb-text-error-content{--tw-text-opacity: 1 !important;color:hsl(var(--erc, var(--nc)) / var(--tw-text-opacity))!important}.\\!dtb-text-info-content{--tw-text-opacity: 1 !important;color:hsl(var(--inc, var(--nc)) / var(--tw-text-opacity))!important}.\\!dtb-text-success-content{--tw-text-opacity: 1 !important;color:hsl(var(--suc, var(--nc)) / var(--tw-text-opacity))!important}.\\!dtb-text-warning-content{--tw-text-opacity: 1 !important;color:hsl(var(--wac, var(--nc)) / var(--tw-text-opacity))!important}.\\!dtb-text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity))!important}.dtb-opacity-100{opacity:1}.dtb-opacity-80{opacity:.8}', + {} + ); +})(); +(function () { + "use strict"; + const m = "", + l = (o) => { + const a = document.createElement("div"); + a.classList.add("dtb-mockup-code"), + o.forEach((c) => { + a.appendChild(c), c.querySelectorAll(".docsify-copy-code-button").forEach((d) => d.remove()); + }); + const n = document.createElement("div"); + n.classList.add("dtb-tooltip", "dtb-tooltip-left", "dtb-tooltip-accent", "dtb-absolute", "dtb-top-2", "dtb-right-2"), n.setAttribute("data-tip", "Copy"), a.appendChild(n); + const t = document.createElement("button"); + t.classList.add("dtb-btn", "dtb-btn-square", "dtb-btn-sm", "dtb-border-0", "dtb-relative", "dtb-opacity-100", "docsify-terminal-copy-button"); + const e = document.createElement("svg"); + e.classList.add("dtb-w-5", "dtb-h-5", "dtb-fill-current"), e.setAttribute("xmlns", "http://www.w3.org/2000/svg"), e.setAttribute("viewBox", "0 0 32 32"); + const s = document.createElement("path"); + return ( + s.setAttribute( + "d", + "M 16 3 C 14.742188 3 13.847656 3.890625 13.40625 5 L 6 5 L 6 28 L 26 28 L 26 5 L 18.59375 5 C 18.152344 3.890625 17.257813 3 16 3 Z M 16 5 C 16.554688 5 17 5.445313 17 6 L 17 7 L 20 7 L 20 9 L 12 9 L 12 7 L 15 7 L 15 6 C 15 5.445313 15.445313 5 16 5 Z M 8 7 L 10 7 L 10 11 L 22 11 L 22 7 L 24 7 L 24 26 L 8 26 Z" + ), + e.appendChild(s), + t.appendChild(e), + n.appendChild(t), + a + ); + }, + b = (o) => + o.map((n) => { + const t = document.createElement("pre"); + t.setAttribute("v-pre", ""), t.setAttribute("data-lang", ""), n.prefix && t.setAttribute("data-prefix", n.prefix), t.setAttribute("style", "background-color: transparent; padding: 0; margin: 0; display: flex;"); + const e = document.createElement("code"); + switch ((e.setAttribute("class", "lang-terminal"), e.classList.add("lang-terminal"), e.setAttribute("style", "background-color: transparent !important; padding: 0; margin: 0;"), n.type)) { + case "info": + t.classList.add("!dtb-bg-info", "!dtb-text-info-content"), e.classList.add("!dtb-text-warning-content", "dtb-opacity-80"); + break; + case "error": + t.classList.add("!dtb-bg-error", "!dtb-text-error-content"), e.classList.add("!dtb-text-error-content", "dtb-opacity-80"); + break; + case "success": + t.classList.add("!dtb-bg-success", "!dtb-text-success-content"), e.classList.add("!dtb-text-success-content", "dtb-opacity-80"); + break; + case "warning": + t.classList.add("!dtb-bg-warning", "!dtb-text-warning-content"), e.classList.add("!dtb-text-warning-content", "dtb-opacity-80"); + break; + default: + e.classList.add("!dtb-text-white"); + break; + } + return (e.textContent = n.text), t.appendChild(e), t; + }), + i = new Set(["info", "error", "success", "warning", "default"]), + u = (o) => { + let [a, n, t] = o.split("|"); + return t === void 0 && (t = n), n === void 0 && ((n = "default"), (t = a), (a = void 0)), (n = i.has(n) ? n : "default"), i.has(a) && ((n = a), (a = void 0)), { prefix: a, type: n || "default", text: t ?? "" }; + }, + p = () => { + document.querySelectorAll(".docsify-terminal-copy-button").forEach((a) => { + a.addEventListener("click", (n) => { + var c, r; + const t = (c = n.target.parentElement) == null ? void 0 : c.parentElement, + s = Array.from(((r = t == null ? void 0 : t.parentElement) == null ? void 0 : r.querySelectorAll("pre")) ?? []) + .map((d) => d.innerText) + .filter((d) => d) + .join("\r"); + t == null || t.setAttribute("data-tip", "Copied!"), + t == null || t.classList.add("dtb-tooltip-open"), + setTimeout(() => { + t == null || t.setAttribute("data-tip", "Copy"); + }, 2e3), + setTimeout(() => { + t == null || t.classList.remove("dtb-tooltip-open"); + }, 1800), + navigator.clipboard.writeText(s); + }); + }); + }; + (function () { + const o = (a, n) => { + a.doneEach(function () { + document.querySelectorAll('pre[data-lang="terminal"]').forEach((e) => { + var r; + e.setAttribute("data-lang", ""), e.setAttribute("data-prefix", ">"); + const s = e.getElementsByTagName("code")[0], + c = + ((r = s.textContent) == null + ? void 0 + : r.split(` +`)) || []; + e.setAttribute("style", "background-color: transparent; padding: 0; margin: 0; display: flex;"), + s.setAttribute("style", "background-color: transparent !important; padding: 0; margin: 0; color: white;"), + e.removeAttribute(":after"), + (e.outerHTML = l([...b(c.map((d) => u(d)))]).outerHTML), + p(); + }); + }); + }; + (window.$docsify = window.$docsify || {}), (window.$docsify.plugins = [].concat(window.$docsify.plugins || [], o)); + })(); +})(); + diff --git a/public/js/plugins/terminal-block.md b/public/js/plugins/terminal-block.md @@ -0,0 +1,71 @@ +# docsify-terminal-block 🖥️ + +[![](https://data.jsdelivr.com/v1/package/npm/docsify-terminal-block/badge)](https://www.jsdelivr.com/package/npm/docsify-terminal-block) + +A docsify plugin to add pretty terminal blocks to your docs. It has `Copy to Clipboard` functionality too. + +## Screenshots + +![Example](https://i.imgur.com/IZdOtLh.png) + +## Installation + +Add the docsify-terminal-block plugin to your index.html after docsify. The plugin is available on jsdelivr (below), unpkg, and other CDN services that auto-publish npm packages. + +```html +<script src="https://cdn.jsdelivr.net/npm/docsify-terminal-block@1.0.3"></script> +``` + +## Usage + +Add the `terminal` tag to your markdown file to create a terminal block. + +```` + + ```terminal + npm run start + ``` +```` + +You can add prefixes to the terminal block to change the style of the line. For example adding `$` or `>`: + +```` + + ```terminal + $|npm run start + >|npm run start + ``` +```` + +You can make the line a warning, info, error, or success by adding `warning`, `info`, `error`, or `success` after the prefix: + +```` + + ```terminal + $|warning|npm run build + >|info|npm run start + >|error|npm run start + >|success|npm run start + ``` +```` + +## Example + +```` + + ```terminal + npm run start + $|npm run start + $|warning|npm run build + >|info|npm run start + |... + >|error|npm run start + >|success|npm run start + + warning|npm run build + ``` +```` + +--- + +Made with ❤️ diff --git a/public/js/plugins/themable.css b/public/js/plugins/themable.css @@ -0,0 +1,2255 @@ +/* SPDX-FilyCopyrightText: Copyright (c) 2018 John Hildenbiddle */ +/* SPDX-License-Identifier: MIT */ + +.github-corner { + position: absolute; + z-index: 40; + top: 0; + right: 0; + border-bottom: 0; + text-decoration: none +} + +.github-corner svg { + height: 70px; + width: 70px; + fill: var(--theme-color); + color: var(--base-background-color) +} + +.github-corner:hover .octo-arm { + -webkit-animation: octocat-wave 560ms ease-in-out; + animation: octocat-wave 560ms ease-in-out +} + +@-webkit-keyframes octocat-wave { + 0%, + 100% { + transform: rotate(0) + } + 20%, + 60% { + transform: rotate(-25deg) + } + 40%, + 80% { + transform: rotate(10deg) + } +} + +@keyframes octocat-wave { + 0%, + 100% { + transform: rotate(0) + } + 20%, + 60% { + transform: rotate(-25deg) + } + 40%, + 80% { + transform: rotate(10deg) + } +} + +.progress { + position: fixed; + z-index: 2147483647; + top: 0; + left: 0; + right: 0; + height: 3px; + width: 0; + background-color: var(--theme-color); + transition: width var(--duration-fast), opacity calc(var(--duration-fast)*2) +} + +body.ready-transition:after, +body.ready-transition>*:not(.progress) { + opacity: 0; + transition: opacity var(--spinner-transition-duration) +} + +body.ready-transition:after { + content: ""; + position: absolute; + z-index: 1000; + top: calc(50% - var(--spinner-size)/2); + left: calc(50% - var(--spinner-size)/2); + height: var(--spinner-size); + width: var(--spinner-size); + border: var(--spinner-track-width, 0) solid var(--spinner-track-color); + border-left-color: var(--theme-color); + border-left-color: var(--theme-color); + border-radius: 50%; + -webkit-animation: spinner var(--duration-slow) infinite linear; + animation: spinner var(--duration-slow) infinite linear +} + +body.ready-transition.ready-spinner:after { + opacity: 1 +} + +body.ready-transition.ready-fix:after { + opacity: 0 +} + +body.ready-transition.ready-fix>*:not(.progress) { + opacity: 1; + transition-delay: var(--spinner-transition-duration) +} + +@-webkit-keyframes spinner { + 0% { + transform: rotate(0deg) + } + 100% { + transform: rotate(360deg) + } +} + +@keyframes spinner { + 0% { + transform: rotate(0deg) + } + 100% { + transform: rotate(360deg) + } +} + +*, +*:before, +*:after { + box-sizing: inherit; + font-size: inherit; + -webkit-overflow-scrolling: touch; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-text-size-adjust: none; + -webkit-touch-callout: none +} + +:root { + box-sizing: border-box; + background-color: var(--base-background-color); + font-size: var(--base-font-size); + font-weight: var(--base-font-weight); + line-height: var(--base-line-height); + letter-spacing: var(--base-letter-spacing); + color: var(--base-color); + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-smoothing: antialiased +} + +html, +button, +input, +optgroup, +select, +textarea { + font-family: var(--base-font-family) +} + +button, +input, +optgroup, +select, +textarea { + font-size: 100%; + margin: 0 +} + +a { + text-decoration: none; + -webkit-text-decoration-skip: ink; + text-decoration-skip-ink: auto +} + +body { + margin: 0 +} + +hr { + height: 0; + margin: 2em 0; + border: none; + border-bottom: var(--hr-border, 0) +} + +img { + max-width: 100%; + border: 0 +} + +main { + display: block +} + +main.hidden { + display: none +} + +mark { + background: var(--mark-background); + color: var(--mark-color) +} + +pre { + font-family: var(--pre-font-family); + font-size: var(--pre-font-size); + font-weight: var(--pre-font-weight); + line-height: var(--pre-line-height) +} + +small { + display: inline-block; + font-size: var(--small-font-size) +} + +strong { + font-weight: var(--strong-font-weight); + color: var(--strong-color, currentColor) +} + +sub, +sup { + font-size: var(--subsup-font-size); + line-height: 0; + position: relative; + vertical-align: baseline +} + +sub { + bottom: -0.25em +} + +sup { + top: -0.5em +} + +body:not([data-platform^=Mac]) * { + scrollbar-color: hsla(var(--mono-hue), var(--mono-saturation), 50%, 0.3) hsla(var(--mono-hue), var(--mono-saturation), 50%, 0.1); + scrollbar-width: thin +} + +body:not([data-platform^=Mac]) * ::-webkit-scrollbar { + width: 5px; + height: 5px +} + +body:not([data-platform^=Mac]) * ::-webkit-scrollbar-thumb { + background: hsla(var(--mono-hue), var(--mono-saturation), 50%, 0.3) +} + +body:not([data-platform^=Mac]) * ::-webkit-scrollbar-track { + background: hsla(var(--mono-hue), var(--mono-saturation), 50%, 0.1) +} + +::-moz-selection { + background: var(--selection-color) +} + +::selection { + background: var(--selection-color) +} + +.emoji { + height: var(--emoji-size); + vertical-align: middle +} + +.task-list-item { + list-style: none +} + +.task-list-item input { + margin-right: .5em; + margin-left: 0; + vertical-align: .075em +} + +.markdown-section code[class*=lang-], +.markdown-section pre[data-lang] { + font-family: var(--code-font-family); + font-size: var(--code-font-size); + font-weight: var(--code-font-weight); + letter-spacing: normal; + line-height: var(--code-block-line-height); + -moz-tab-size: var(--code-tab-size); + -o-tab-size: var(--code-tab-size); + tab-size: var(--code-tab-size); + text-align: left; + white-space: pre; + word-spacing: normal; + word-wrap: normal; + word-break: normal; + -webkit-hyphens: none; + hyphens: none +} + +.markdown-section pre[data-lang] { + position: relative; + overflow: hidden; + margin: var(--code-block-margin); + padding: 0; + border-radius: var(--code-block-border-radius) +} + +.markdown-section pre[data-lang]::after { + content: attr(data-lang); + position: absolute; + top: .75em; + right: .75em; + opacity: .6; + color: inherit; + font-size: var(--font-size-s); + line-height: 1 +} + +.markdown-section pre[data-lang] code { + display: block; + overflow: auto; + padding: var(--code-block-padding) +} + +code[class*=lang-], +pre[data-lang] { + color: var(--code-theme-text) +} + +pre[data-lang]::-moz-selection, +pre[data-lang] ::-moz-selection, +code[class*=lang-]::-moz-selection, +code[class*=lang-] ::-moz-selection { + background: var(--code-theme-selection, var(--selection-color)) +} + +pre[data-lang]::-moz-selection, +pre[data-lang] ::-moz-selection, +code[class*=lang-]::-moz-selection, +code[class*=lang-] ::-moz-selection { + background: var(--code-theme-selection, var(--selection-color)) +} + +pre[data-lang]::selection, +pre[data-lang] ::selection, +code[class*=lang-]::selection, +code[class*=lang-] ::selection { + background: var(--code-theme-selection, var(--selection-color)) +} + +:not(pre)>code[class*=lang-], +pre[data-lang] { + background: var(--code-theme-background) +} + +.namespace { + opacity: .7 +} + +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: var(--code-theme-comment) +} + +.token.punctuation { + color: var(--code-theme-punctuation) +} + +.token.property, +.token.tag, +.token.boolean, +.token.number, +.token.constant, +.token.symbol, +.token.deleted { + color: var(--code-theme-tag) +} + +.token.selector, +.token.attr-name, +.token.string, +.token.char, +.token.builtin, +.token.inserted { + color: var(--code-theme-selector) +} + +.token.operator, +.token.entity, +.token.url, +.language-css .token.string, +.style .token.string { + color: var(--code-theme-operator) +} + +.token.atrule, +.token.attr-value, +.token.keyword { + color: var(--code-theme-keyword) +} + +.token.function { + color: var(--code-theme-function) +} + +.token.regex, +.token.important, +.token.variable { + color: var(--code-theme-variable) +} + +.token.important, +.token.bold { + font-weight: bold +} + +.token.italic { + font-style: italic +} + +.token.entity { + cursor: help +} + +.markdown-section { + position: relative; + max-width: var(--content-max-width); + margin: 0 auto; + padding: 2rem 45px +} + +.app-nav:not(:empty)~main .markdown-section { + padding-top: 3.5rem +} + +.markdown-section figure, +.markdown-section p, +.markdown-section ol, +.markdown-section ul { + margin: 1em 0 +} + +.markdown-section ol, +.markdown-section ul { + padding-left: 1.5rem +} + +.markdown-section ol ol, +.markdown-section ol ul, +.markdown-section ul ol, +.markdown-section ul ul { + margin-top: .15rem; + margin-bottom: .15rem +} + +.markdown-section a { + border-bottom: var(--link-border-bottom); + color: var(--link-color); + -webkit-text-decoration: var(--link-text-decoration); + text-decoration: var(--link-text-decoration); + -webkit-text-decoration-color: var(--link-text-decoration-color); + text-decoration-color: var(--link-text-decoration-color) +} + +.markdown-section a:hover { + border-bottom: var(--link-border-bottom--hover, var(--link-border-bottom, 0)); + color: var(--link-color--hover, var(--link-color)); + -webkit-text-decoration: var(--link-text-decoration--hover, var(--link-text-decoration)); + text-decoration: var(--link-text-decoration--hover, var(--link-text-decoration)); + -webkit-text-decoration-color: var(--link-text-decoration-color--hover, var(--link-text-decoration-color)); + text-decoration-color: var(--link-text-decoration-color--hover, var(--link-text-decoration-color)) +} + +.markdown-section a.anchor { + border-bottom: 0; + color: inherit; + text-decoration: none +} + +.markdown-section a.anchor:hover { + text-decoration: underline +} + +.markdown-section blockquote { + overflow: visible; + margin: 2em 0; + padding: var(--blockquote-padding); + border-width: var(--blockquote-border-width, 0); + border-style: var(--blockquote-border-style); + border-color: var(--blockquote-border-color); + border-radius: var(--blockquote-border-radius); + background: var(--blockquote-background); + color: var(--blockquote-color); + font-family: var(--blockquote-font-family); + font-size: var(--blockquote-font-size); + font-style: var(--blockquote-font-style); + font-weight: var(--blockquote-font-weight); + quotes: "“" "”" "‘" "’" +} + +.markdown-section blockquote em { + font-family: var(--blockquote-em-font-family); + font-size: var(--blockquote-em-font-size); + font-style: var(--blockquote-em-font-style); + font-weight: var(--blockquote-em-font-weight) +} + +.markdown-section blockquote p:first-child { + margin-top: 0 +} + +.markdown-section blockquote p:first-child:before, +.markdown-section blockquote p:first-child:after { + color: var(--blockquote-quotes-color); + font-family: var(--blockquote-quotes-font-family); + font-size: var(--blockquote-quotes-font-size); + line-height: 0 +} + +.markdown-section blockquote p:first-child:before { + content: var(--blockquote-quotes-open); + margin-right: .15em; + vertical-align: -0.45em +} + +.markdown-section blockquote p:first-child:after { + content: var(--blockquote-quotes-close); + margin-left: .15em; + vertical-align: -0.55em +} + +.markdown-section blockquote p:last-child { + margin-bottom: 0 +} + +.markdown-section code { + font-family: var(--code-font-family); + font-size: var(--code-font-size); + font-weight: var(--code-font-weight); + line-height: inherit +} + +.markdown-section code:not([class*=lang-]):not([class*=language-]) { + margin: var(--code-inline-margin); + padding: var(--code-inline-padding); + border-radius: var(--code-inline-border-radius); + background: var(--code-inline-background); + color: var(--code-inline-color, currentColor); + white-space: nowrap +} + +.markdown-section h1:first-child, +.markdown-section h2:first-child, +.markdown-section h3:first-child, +.markdown-section h4:first-child, +.markdown-section h5:first-child, +.markdown-section h6:first-child { + margin-top: 0 +} + +.markdown-section h1 a[data-id], +.markdown-section h2 a[data-id], +.markdown-section h3 a[data-id], +.markdown-section h4 a[data-id], +.markdown-section h5 a[data-id], +.markdown-section h6 a[data-id] { + display: inline-block +} + +.markdown-section h1 code, +.markdown-section h2 code, +.markdown-section h3 code, +.markdown-section h4 code, +.markdown-section h5 code, +.markdown-section h6 code { + font-size: .875em +} + +.markdown-section h1+h2, +.markdown-section h1+h3, +.markdown-section h1+h4, +.markdown-section h1+h5, +.markdown-section h1+h6, +.markdown-section h2+h3, +.markdown-section h2+h4, +.markdown-section h2+h5, +.markdown-section h2+h6, +.markdown-section h3+h4, +.markdown-section h3+h5, +.markdown-section h3+h6, +.markdown-section h4+h5, +.markdown-section h4+h6, +.markdown-section h5+h6 { + margin-top: 1rem +} + +.markdown-section h1 { + margin: var(--heading-h1-margin, var(--heading-margin)); + padding: var(--heading-h1-padding, var(--heading-padding)); + border-width: var(--heading-h1-border-width, 0); + border-style: var(--heading-h1-border-style); + border-color: var(--heading-h1-border-color); + font-family: var(--heading-h1-font-family, var(--heading-font-family)); + font-size: var(--heading-h1-font-size); + font-weight: var(--heading-h1-font-weight, var(--heading-font-weight)); + line-height: var(--base-line-height); + color: var(--heading-h1-color, var(--heading-color)) +} + +.markdown-section h2 { + margin: var(--heading-h2-margin, var(--heading-margin)); + padding: var(--heading-h2-padding, var(--heading-padding)); + border-width: var(--heading-h2-border-width, 0); + border-style: var(--heading-h2-border-style); + border-color: var(--heading-h2-border-color); + font-family: var(--heading-h2-font-family, var(--heading-font-family)); + font-size: var(--heading-h2-font-size); + font-weight: var(--heading-h2-font-weight, var(--heading-font-weight)); + line-height: var(--base-line-height); + color: var(--heading-h2-color, var(--heading-color)) +} + +.markdown-section h3 { + margin: var(--heading-h3-margin, var(--heading-margin)); + padding: var(--heading-h3-padding, var(--heading-padding)); + border-width: var(--heading-h3-border-width, 0); + border-style: var(--heading-h3-border-style); + border-color: var(--heading-h3-border-color); + font-family: var(--heading-h3-font-family, var(--heading-font-family)); + font-size: var(--heading-h3-font-size); + font-weight: var(--heading-h3-font-weight, var(--heading-font-weight)); + color: var(--heading-h3-color, var(--heading-color)) +} + +.markdown-section h4 { + margin: var(--heading-h4-margin, var(--heading-margin)); + padding: var(--heading-h4-padding, var(--heading-padding)); + border-width: var(--heading-h4-border-width, 0); + border-style: var(--heading-h4-border-style); + border-color: var(--heading-h4-border-color); + font-family: var(--heading-h4-font-family, var(--heading-font-family)); + font-size: var(--heading-h4-font-size); + font-weight: var(--heading-h4-font-weight, var(--heading-font-weight)); + color: var(--heading-h4-color, var(--heading-color)) +} + +.markdown-section h5 { + margin: var(--heading-h5-margin, var(--heading-margin)); + padding: var(--heading-h5-padding, var(--heading-padding)); + border-width: var(--heading-h5-border-width, 0); + border-style: var(--heading-h5-border-style); + border-color: var(--heading-h5-border-color); + font-family: var(--heading-h5-font-family, var(--heading-font-family)); + font-size: var(--heading-h5-font-size); + font-weight: var(--heading-h5-font-weight, var(--heading-font-weight)); + color: var(--heading-h5-color, var(--heading-color)) +} + +.markdown-section h6 { + margin: var(--heading-h6-margin, var(--heading-margin)); + padding: var(--heading-h6-padding, var(--heading-padding)); + border-width: var(--heading-h6-border-width, 0); + border-style: var(--heading-h6-border-style); + border-color: var(--heading-h6-border-color); + font-family: var(--heading-h6-font-family, var(--heading-font-family)); + font-size: var(--heading-h6-font-size); + font-weight: var(--heading-h6-font-weight, var(--heading-font-weight)); + color: var(--heading-h6-color, var(--heading-color)) +} + +.markdown-section iframe { + margin: 1em 0 +} + +.markdown-section img { + max-width: 100% +} + +.markdown-section kbd { + display: inline-block; + min-width: var(--kbd-min-width); + margin: var(--kbd-margin); + padding: var(--kbd-padding); + border: var(--kbd-border); + border-radius: var(--kbd-border-radius); + background: var(--kbd-background); + font-family: inherit; + font-size: var(--kbd-font-size); + text-align: center; + letter-spacing: 0; + line-height: 1; + color: var(--kbd-color) +} + +.markdown-section kbd+kbd { + margin-left: -0.15em +} + +.markdown-section table { + display: block; + overflow: auto; + margin: 1rem 0; + border-spacing: 0; + border-collapse: collapse +} + +.markdown-section th, +.markdown-section td { + padding: var(--table-cell-padding) +} + +.markdown-section th:not([align]) { + text-align: left +} + +.markdown-section thead { + border-color: var(--table-head-border-color); + border-style: solid; + border-width: var(--table-head-border-width, 0); + background: var(--table-head-background) +} + +.markdown-section th { + font-weight: var(--table-head-font-weight); + color: var(--strong-color) +} + +.markdown-section td { + border-color: var(--table-cell-border-color); + border-style: solid; + border-width: var(--table-cell-border-width, 0) +} + +.markdown-section tbody { + border-color: var(--table-body-border-color); + border-style: solid; + border-width: var(--table-body-border-width, 0) +} + +.markdown-section tbody tr:nth-child(odd) { + background: var(--table-row-odd-background) +} + +.markdown-section tbody tr:nth-child(even) { + background: var(--table-row-even-background) +} + +.markdown-section>ul .task-list-item { + margin-left: -1.25em +} + +.markdown-section>ul .task-list-item .task-list-item { + margin-left: 0 +} + +.markdown-section .table-wrapper { + overflow-x: auto +} + +.markdown-section .table-wrapper table { + display: table; + width: 100% +} + +.markdown-section .table-wrapper td::before { + display: none +} + +@media(max-width: 30em) { + .markdown-section .table-wrapper tbody, + .markdown-section .table-wrapper tr, + .markdown-section .table-wrapper td { + display: block + } + .markdown-section .table-wrapper th, + .markdown-section .table-wrapper td { + border: none + } + .markdown-section .table-wrapper thead { + display: none + } + .markdown-section .table-wrapper tr { + border-color: var(--table-cell-border-color); + border-style: solid; + border-width: var(--table-cell-border-width, 0); + padding: var(--table-cell-padding) + } + .markdown-section .table-wrapper tr:not(:last-child) { + border-bottom: 0 + } + .markdown-section .table-wrapper td { + padding: .15em 0 .15em 8em + } + .markdown-section .table-wrapper td::before { + display: inline-block; + float: left; + width: 8em; + margin-left: -8em; + font-weight: bold; + text-align: left + } +} + +.markdown-section .tip, +.markdown-section .warn { + position: relative; + margin: 2em 0; + padding: var(--notice-padding); + border-width: var(--notice-border-width, 0); + border-style: var(--notice-border-style); + border-color: var(--notice-border-color); + border-radius: var(--notice-border-radius); + background: var(--notice-background); + font-family: var(--notice-font-family); + font-weight: var(--notice-font-weight); + color: var(--notice-color) +} + +.markdown-section .tip:before, +.markdown-section .warn:before { + display: inline-block; + position: var(--notice-before-position, relative); + top: var(--notice-before-top); + left: var(--notice-before-left); + height: var(--notice-before-height); + width: var(--notice-before-width); + margin: var(--notice-before-margin); + padding: var(--notice-before-padding); + border-radius: var(--notice-before-border-radius); + line-height: var(--notice-before-line-height); + font-family: var(--notice-before-font-family); + font-size: var(--notice-before-font-size); + font-weight: var(--notice-before-font-weight); + text-align: center +} + +.markdown-section .tip { + border-width: var(--notice-important-border-width, var(--notice-border-width, 0)); + border-style: var(--notice-important-border-style, var(--notice-border-style)); + border-color: var(--notice-important-border-color, var(--notice-border-color)); + background: var(--notice-important-background, var(--notice-background)); + color: var(--notice-important-color, var(--notice-color)) +} + +.markdown-section .tip:before { + content: var(--notice-important-before-content, var(--notice-before-content)); + background: var(--notice-important-before-background, var(--notice-before-background)); + color: var(--notice-important-before-color, var(--notice-before-color)) +} + +.markdown-section .warn { + border-width: var(--notice-tip-border-width, var(--notice-border-width, 0)); + border-style: var(--notice-tip-border-style, var(--notice-border-style)); + border-color: var(--notice-tip-border-color, var(--notice-border-color)); + background: var(--notice-tip-background, var(--notice-background)); + color: var(--notice-tip-color, var(--notice-color)) +} + +.markdown-section .warn:before { + content: var(--notice-tip-before-content, var(--notice-before-content)); + background: var(--notice-tip-before-background, var(--notice-before-background)); + color: var(--notice-tip-before-color, var(--notice-before-color)) +} + +.cover { + display: none; + position: relative; + z-index: 20; + min-height: 100vh; + flex-direction: column; + align-items: center; + justify-content: center; + padding: calc(var(--cover-border-inset, 0px) + var(--cover-border-width, 0px)); + color: var(--cover-color); + text-align: var(--cover-text-align) +} + +@media screen and (-ms-high-contrast: active), +screen and (-ms-high-contrast: none) { + .cover { + height: 100vh + } +} + +.cover:before, +.cover:after { + content: ""; + position: absolute +} + +.cover:before { + top: 0; + bottom: 0; + left: 0; + right: 0; + background-blend-mode: var(--cover-background-blend-mode); + background-color: var(--cover-background-color); + background-image: var(--cover-background-image); + background-position: var(--cover-background-position); + background-repeat: var(--cover-background-repeat); + background-size: var(--cover-background-size) +} + +.cover:after { + top: var(--cover-border-inset, 0); + bottom: var(--cover-border-inset, 0); + left: var(--cover-border-inset, 0); + right: var(--cover-border-inset, 0); + border-width: var(--cover-border-width, 0); + border-style: solid; + border-color: var(--cover-border-color) +} + +.cover a { + border-bottom: var(--cover-link-border-bottom); + color: var(--cover-link-color); + -webkit-text-decoration: var(--cover-link-text-decoration); + text-decoration: var(--cover-link-text-decoration); + -webkit-text-decoration-color: var(--cover-link-text-decoration-color); + text-decoration-color: var(--cover-link-text-decoration-color) +} + +.cover a:hover { + border-bottom: var(--cover-link-border-bottom--hover, var(--cover-link-border-bottom)); + color: var(--cover-link-color--hover, var(--cover-link-color)); + -webkit-text-decoration: var(--cover-link-text-decoration--hover, var(--cover-link-text-decoration)); + text-decoration: var(--cover-link-text-decoration--hover, var(--cover-link-text-decoration)); + -webkit-text-decoration-color: var(--cover-link-text-decoration-color--hover, var(--cover-link-text-decoration-color)); + text-decoration-color: var(--cover-link-text-decoration-color--hover, var(--cover-link-text-decoration-color)) +} + +.cover h1 { + color: var(--cover-heading-color); + position: relative; + margin: 0; + font-size: var(--cover-heading-font-size); + font-weight: var(--cover-heading-font-weight); + line-height: 1.2 +} + +.cover h1 a, +.cover h1 a:hover { + display: block; + border-bottom: none; + color: inherit; + text-decoration: none +} + +.cover h1 small { + position: absolute; + bottom: 0; + margin-left: .5em +} + +.cover h1 span { + font-size: calc(var(--cover-heading-font-size-min)*1px) +} + +@media(min-width: 26em) { + .cover h1 span { + font-size: calc(var(--cover-heading-font-size-min)*1px + (var(--cover-heading-font-size-max) - var(--cover-heading-font-size-min))*(100vw - 420px)/604) + } +} + +@media(min-width: 64em) { + .cover h1 span { + font-size: calc(var(--cover-heading-font-size-max)*1px) + } +} + +.cover blockquote { + margin: 0; + color: var(--cover-blockquote-color); + font-size: var(--cover-blockquote-font-size) +} + +.cover blockquote a { + color: inherit +} + +.cover ul { + padding: 0; + list-style-type: none +} + +.cover .cover-main { + position: relative; + z-index: 1; + max-width: var(--cover-max-width); + margin: var(--cover-margin); + padding: 0 45px +} + +.cover .cover-main>p:last-child { + margin: 1.25em -0.25em +} + +.cover .cover-main>p:last-child a { + display: block; + margin: .375em .25em; + padding: var(--cover-button-padding); + border: var(--cover-button-border); + border-radius: var(--cover-button-border-radius); + box-shadow: var(--cover-button-box-shadow); + background: var(--cover-button-background); + text-align: center; + -webkit-text-decoration: var(--cover-button-text-decoration); + text-decoration: var(--cover-button-text-decoration); + -webkit-text-decoration-color: var(--cover-button-text-decoration-color); + text-decoration-color: var(--cover-button-text-decoration-color); + color: var(--cover-button-color); + white-space: nowrap; + transition: var(--cover-button-transition) +} + +.cover .cover-main>p:last-child a:hover { + border: var(--cover-button-border--hover, var(--cover-button-border)); + box-shadow: var(--cover-button-box-shadow--hover, var(--cover-button-box-shadow)); + background: var(--cover-button-background--hover, var(--cover-button-background)); + -webkit-text-decoration: var(--cover-button-text-decoration--hover, var(--cover-button-text-decoration)); + text-decoration: var(--cover-button-text-decoration--hover, var(--cover-button-text-decoration)); + -webkit-text-decoration-color: var(--cover-button-text-decoration-color--hover, var(--cover-button-text-decoration-color)); + text-decoration-color: var(--cover-button-text-decoration-color--hover, var(--cover-button-text-decoration-color)); + color: var(--cover-button-color--hover, var(--cover-button-color)) +} + +.cover .cover-main>p:last-child a:first-child { + border: var(--cover-button-primary-border, var(--cover-button-border)); + box-shadow: var(--cover-button-primary-box-shadow, var(--cover-button-box-shadow)); + background: var(--cover-button-primary-background, var(--cover-button-background)); + -webkit-text-decoration: var(--cover-button-primary-text-decoration, var(--cover-button-text-decoration)); + text-decoration: var(--cover-button-primary-text-decoration, var(--cover-button-text-decoration)); + -webkit-text-decoration-color: var(--cover-button-primary-text-decoration-color, var(--cover-button-text-decoration-color)); + text-decoration-color: var(--cover-button-primary-text-decoration-color, var(--cover-button-text-decoration-color)); + color: var(--cover-button-primary-color, var(--cover-button-color)) +} + +.cover .cover-main>p:last-child a:first-child:hover { + border: var(--cover-button-primary-border--hover, var(--cover-button-border--hover, var(--cover-button-primary-border, var(--cover-button-border)))); + box-shadow: var(--cover-button-primary-box-shadow--hover, var(--cover-button-box-shadow--hover, var(--cover-button-primary-box-shadow, var(--cover-button-box-shadow)))); + background: var(--cover-button-primary-background--hover, var(--cover-button-background--hover, var(--cover-button-primary-background, var(--cover-button-background)))); + -webkit-text-decoration: var(--cover-button-primary-text-decoration--hover, var(--cover-button-text-decoration--hover, var(--cover-button-primary-text-decoration, var(--cover-button-text-decoration)))); + text-decoration: var(--cover-button-primary-text-decoration--hover, var(--cover-button-text-decoration--hover, var(--cover-button-primary-text-decoration, var(--cover-button-text-decoration)))); + -webkit-text-decoration-color: var(--cover-button-primary-text-decoration-color--hover, var(--cover-button-text-decoration-color--hover, var(--cover-button-primary-text-decoration-color, var(--cover-button-text-decoration-color)))); + text-decoration-color: var(--cover-button-primary-text-decoration-color--hover, var(--cover-button-text-decoration-color--hover, var(--cover-button-primary-text-decoration-color, var(--cover-button-text-decoration-color)))); + color: var(--cover-button-primary-color--hover, var(--cover-button-color--hover, var(--cover-button-primary-color, var(--cover-button-color)))) +} + +@media(min-width: 30.01em) { + .cover .cover-main>p:last-child a { + display: inline-block + } +} + +.cover .mask { + visibility: var(--cover-background-mask-visibility, hidden); + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + background-color: var(--cover-background-mask-color); + opacity: var(--cover-background-mask-opacity) +} + +.cover.has-mask .mask { + visibility: visible +} + +.cover.show { + display: flex +} + +.app-nav { + position: absolute; + z-index: 30; + top: calc(35px - .5em*var(--base-line-height)); + left: 45px; + right: 80px; + text-align: right +} + +.app-nav.no-badge { + right: 45px +} + +.app-nav li>img, +.app-nav li>a>img { + margin-top: -0.25em; + vertical-align: middle +} + +.app-nav li>img:first-child, +.app-nav li>a>img:first-child { + margin-right: .5em +} + +.app-nav ul, +.app-nav li { + margin: 0; + padding: 0; + list-style: none +} + +.app-nav li { + position: relative +} + +.app-nav li a { + display: block; + line-height: 1; + transition: var(--navbar-root-transition) +} + +.app-nav>ul>li { + display: inline-block; + margin: var(--navbar-root-margin) +} + +.app-nav>ul>li:first-child { + margin-left: 0 +} + +.app-nav>ul>li:last-child { + margin-right: 0 +} + +.app-nav>ul>li>a, +.app-nav>ul>li>span { + padding: var(--navbar-root-padding); + border-width: var(--navbar-root-border-width, 0); + border-style: var(--navbar-root-border-style); + border-color: var(--navbar-root-border-color); + border-radius: var(--navbar-root-border-radius); + background: var(--navbar-root-background); + color: var(--navbar-root-color); + -webkit-text-decoration: var(--navbar-root-text-decoration); + text-decoration: var(--navbar-root-text-decoration); + -webkit-text-decoration-color: var(--navbar-root-text-decoration-color); + text-decoration-color: var(--navbar-root-text-decoration-color) +} + +.app-nav>ul>li>a:hover, +.app-nav>ul>li>span:hover { + background: var(--navbar-root-background--hover, var(--navbar-root-background)); + border-style: var(--navbar-root-border-style--hover, var(--navbar-root-border-style)); + border-color: var(--navbar-root-border-color--hover, var(--navbar-root-border-color)); + color: var(--navbar-root-color--hover, var(--navbar-root-color)); + -webkit-text-decoration: var(--navbar-root-text-decoration--hover, var(--navbar-root-text-decoration)); + text-decoration: var(--navbar-root-text-decoration--hover, var(--navbar-root-text-decoration)); + -webkit-text-decoration-color: var(--navbar-root-text-decoration-color--hover, var(--navbar-root-text-decoration-color)); + text-decoration-color: var(--navbar-root-text-decoration-color--hover, var(--navbar-root-text-decoration-color)) +} + +.app-nav>ul>li>a:not(:last-child), +.app-nav>ul>li>span:not(:last-child) { + padding: var(--navbar-menu-root-padding, var(--navbar-root-padding)); + background: var(--navbar-menu-root-background, var(--navbar-root-background)) +} + +.app-nav>ul>li>a:not(:last-child):hover, +.app-nav>ul>li>span:not(:last-child):hover { + background: var(--navbar-menu-root-background--hover, var(--navbar-menu-root-background, var(--navbar-root-background--hover, var(--navbar-root-background)))) +} + +.app-nav>ul>li>a.active { + background: var(--navbar-root-background--active, var(--navbar-root-background)); + border-style: var(--navbar-root-border-style--active, var(--navbar-root-border-style)); + border-color: var(--navbar-root-border-color--active, var(--navbar-root-border-color)); + color: var(--navbar-root-color--active, var(--navbar-root-color)); + -webkit-text-decoration: var(--navbar-root-text-decoration--active, var(--navbar-root-text-decoration)); + text-decoration: var(--navbar-root-text-decoration--active, var(--navbar-root-text-decoration)); + -webkit-text-decoration-color: var(--navbar-root-text-decoration-color--active, var(--navbar-root-text-decoration-color)); + text-decoration-color: var(--navbar-root-text-decoration-color--active, var(--navbar-root-text-decoration-color)) +} + +.app-nav>ul>li>a.active:not(:last-child):hover { + background: var(--navbar-menu-root-background--active, var(--navbar-menu-root-background, var(--navbar-root-background--active, var(--navbar-root-background)))) +} + +.app-nav>ul>li ul { + visibility: hidden; + position: absolute; + top: 100%; + right: 50%; + overflow-y: auto; + box-sizing: border-box; + max-height: 50vh; + padding: var(--navbar-menu-padding); + border-width: var(--navbar-menu-border-width, 0); + border-style: solid; + border-color: var(--navbar-menu-border-color); + border-radius: var(--navbar-menu-border-radius); + background: var(--navbar-menu-background); + box-shadow: var(--navbar-menu-box-shadow); + text-align: left; + white-space: nowrap; + opacity: 0; + transform: translate(50%, -0.35em); + transition: var(--navbar-menu-transition) +} + +.app-nav>ul>li ul li { + white-space: nowrap +} + +.app-nav>ul>li ul a { + margin: var(--navbar-menu-link-margin); + padding: var(--navbar-menu-link-padding); + border-width: var(--navbar-menu-link-border-width, 0); + border-style: var(--navbar-menu-link-border-style); + border-color: var(--navbar-menu-link-border-color); + border-radius: var(--navbar-menu-link-border-radius); + background: var(--navbar-menu-link-background); + color: var(--navbar-menu-link-color); + -webkit-text-decoration: var(--navbar-menu-link-text-decoration); + text-decoration: var(--navbar-menu-link-text-decoration); + -webkit-text-decoration-color: var(--navbar-menu-link-text-decoration-color); + text-decoration-color: var(--navbar-menu-link-text-decoration-color) +} + +.app-nav>ul>li ul a:hover { + background: var(--navbar-menu-link-background--hover, var(--navbar-menu-link-background)); + border-style: var(--navbar-menu-link-border-style--hover, var(--navbar-menu-link-border-style)); + border-color: var(--navbar-menu-link-border-color--hover, var(--navbar-menu-link-border-color)); + color: var(--navbar-menu-link-color--hover, var(--navbar-menu-link-color)); + -webkit-text-decoration: var(--navbar-menu-link-text-decoration--hover, var(--navbar-menu-link-text-decoration)); + text-decoration: var(--navbar-menu-link-text-decoration--hover, var(--navbar-menu-link-text-decoration)); + -webkit-text-decoration-color: var(--navbar-menu-link-text-decoration-color--hover, var(--navbar-menu-link-text-decoration-color)); + text-decoration-color: var(--navbar-menu-link-text-decoration-color--hover, var(--navbar-menu-link-text-decoration-color)) +} + +.app-nav>ul>li ul a.active { + background: var(--navbar-menu-link-background--active, var(--navbar-menu-link-background)); + border-style: var(--navbar-menu-link-border-style--active, var(--navbar-menu-link-border-style)); + border-color: var(--navbar-menu-link-border-color--active, var(--navbar-menu-link-border-color)); + color: var(--navbar-menu-link-color--active, var(--navbar-menu-link-color)); + -webkit-text-decoration: var(--navbar-menu-link-text-decoration--active, var(--navbar-menu-link-text-decoration)); + text-decoration: var(--navbar-menu-link-text-decoration--active, var(--navbar-menu-link-text-decoration)); + -webkit-text-decoration-color: var(--navbar-menu-link-text-decoration-color--active, var(--navbar-menu-link-text-decoration-color)); + text-decoration-color: var(--navbar-menu-link-text-decoration-color--active, var(--navbar-menu-link-text-decoration-color)) +} + +.app-nav>ul>li:hover ul, +.app-nav>ul>li:focus ul, +.app-nav>ul>li.focus-within ul { + visibility: visible; + opacity: 1; + transform: translate(50%, 0) +} + +@media(min-width: 48em) { + nav.app-nav { + margin-left: var(--sidebar-width) + } +} + +main { + position: relative; + overflow-x: hidden; + min-height: 100vh +} + +.sidebar, +.sidebar-toggle, +.sidebar+.content { + transition: all var(--sidebar-transition-duration) ease-out +} + +@media(min-width: 48em) { + .sidebar+.content { + margin-left: var(--sidebar-width) + } +} + +.sidebar { + display: flex; + flex-direction: column; + position: fixed; + z-index: 10; + top: 0; + right: 100%; + overflow-x: hidden; + overflow-y: auto; + height: 100vh; + width: var(--sidebar-width); + padding: var(--sidebar-padding); + border-width: var(--sidebar-border-width); + border-style: solid; + border-color: var(--sidebar-border-color); + background: var(--sidebar-background) +} + +.sidebar>h1 { + margin: 0; + margin: var(--sidebar-name-margin); + padding: var(--sidebar-name-padding); + background: var(--sidebar-name-background); + color: var(--sidebar-name-color); + font-family: var(--sidebar-name-font-family); + font-size: var(--sidebar-name-font-size); + font-weight: var(--sidebar-name-font-weight); + text-align: var(--sidebar-name-text-align) +} + +.sidebar>h1 img { + max-width: 100% +} + +.sidebar>h1 .app-name-link { + color: var(--sidebar-name-color) +} + +body:not([data-platform^=Mac]) .sidebar::-webkit-scrollbar { + width: 5px +} + +body:not([data-platform^=Mac]) .sidebar::-webkit-scrollbar-thumb { + border-radius: 50vw +} + +@media(min-width: 48em) { + .sidebar { + position: absolute; + transform: translateX(var(--sidebar-width)) + } +} + +@media print { + .sidebar { + display: none + } +} + +.sidebar-nav, +.sidebar nav { + order: 1; + margin: var(--sidebar-nav-margin); + padding: var(--sidebar-nav-padding); + background: var(--sidebar-nav-background) +} + +.sidebar-nav ul, +.sidebar nav ul { + margin: 0; + padding: 0; + list-style: none +} + +.sidebar-nav ul ul, +.sidebar nav ul ul { + margin-left: var(--sidebar-nav-indent) +} + +.sidebar-nav a, +.sidebar nav a { + display: block; + overflow: hidden; + margin: var(--sidebar-nav-link-margin); + padding: var(--sidebar-nav-link-padding); + border-width: var(--sidebar-nav-link-border-width, 0); + border-style: var(--sidebar-nav-link-border-style); + border-color: var(--sidebar-nav-link-border-color); + border-radius: var(--sidebar-nav-link-border-radius); + background: var(--sidebar-nav-link-background); + color: var(--sidebar-nav-link-color); + font-weight: var(--sidebar-nav-link-font-weight); + white-space: nowrap; + -webkit-text-decoration: var(--sidebar-nav-link-text-decoration); + text-decoration: var(--sidebar-nav-link-text-decoration); + -webkit-text-decoration-color: var(--sidebar-nav-link-text-decoration-color); + text-decoration-color: var(--sidebar-nav-link-text-decoration-color); + text-overflow: ellipsis; + transition: var(--sidebar-nav-link-transition) +} + +.sidebar-nav a img, +.sidebar nav a img { + margin-top: -0.25em; + vertical-align: middle +} + +.sidebar-nav a img:first-child, +.sidebar nav a img:first-child { + margin-right: .5em +} + +.sidebar-nav a:hover, +.sidebar nav a:hover { + border-width: var(--sidebar-nav-link-border-width--hover, var(--sidebar-nav-link-border-width, 0)); + border-style: var(--sidebar-nav-link-border-style--hover, var(--sidebar-nav-link-border-style)); + border-color: var(--sidebar-nav-link-border-color--hover, var(--sidebar-nav-link-border-color)); + background: var(--sidebar-nav-link-background--hover, var(--sidebar-nav-link-background)); + color: var(--sidebar-nav-link-color--hover, var(--sidebar-nav-link-color)); + font-weight: var(--sidebar-nav-link-font-weight--hover, var(--sidebar-nav-link-font-weight)); + -webkit-text-decoration: var(--sidebar-nav-link-text-decoration--hover, var(--sidebar-nav-link-text-decoration)); + text-decoration: var(--sidebar-nav-link-text-decoration--hover, var(--sidebar-nav-link-text-decoration)); + -webkit-text-decoration-color: var(--sidebar-nav-link-text-decoration-color); + text-decoration-color: var(--sidebar-nav-link-text-decoration-color) +} + +.sidebar-nav ul>li>span, +.sidebar-nav ul>li>strong, +.sidebar nav ul>li>span, +.sidebar nav ul>li>strong { + display: block; + margin: var(--sidebar-nav-strong-margin); + padding: var(--sidebar-nav-strong-padding); + border-width: var(--sidebar-nav-strong-border-width, 0); + border-style: solid; + border-color: var(--sidebar-nav-strong-border-color); + color: var(--sidebar-nav-strong-color); + font-size: var(--sidebar-nav-strong-font-size); + font-weight: var(--sidebar-nav-strong-font-weight); + text-transform: var(--sidebar-nav-strong-text-transform) +} + +.sidebar-nav ul>li>span+ul, +.sidebar-nav ul>li>strong+ul, +.sidebar nav ul>li>span+ul, +.sidebar nav ul>li>strong+ul { + margin-left: 0 +} + +.sidebar-nav ul>li:first-child>span, +.sidebar-nav ul>li:first-child>strong, +.sidebar nav ul>li:first-child>span, +.sidebar nav ul>li:first-child>strong { + margin-top: 0 +} + +.sidebar-nav::-webkit-scrollbar, +.sidebar nav::-webkit-scrollbar { + width: 0 +} + +@supports(width: env(safe-area-inset)) { + @media only screen and (orientation: landscape) { + .sidebar-nav, .sidebar nav { + margin-left:calc(env(safe-area-inset-left)/2) + } + } +} + +.sidebar-nav li>a:before, +.sidebar-nav li>strong:before { + display: inline-block +} + +.sidebar-nav li>a { + background-repeat: var(--sidebar-nav-pagelink-background-repeat); + background-size: var(--sidebar-nav-pagelink-background-size) +} + +.sidebar-nav li>a[href^="/"]:not([href*="?id="]), +.sidebar-nav li>a[href^="#/"]:not([href*="?id="]) { + transition: var(--sidebar-nav-pagelink-transition) +} + +.sidebar-nav li>a[href^="/"]:not([href*="?id="]), +.sidebar-nav li>a[href^="/"]:not([href*="?id="])~ul a, +.sidebar-nav li>a[href^="#/"]:not([href*="?id="]), +.sidebar-nav li>a[href^="#/"]:not([href*="?id="])~ul a { + padding: var(--sidebar-nav-pagelink-padding, var(--sidebar-nav-link-padding)) +} + +.sidebar-nav li>a[href^="/"]:not([href*="?id="]):only-child, +.sidebar-nav li>a[href^="#/"]:not([href*="?id="]):only-child { + background: var(--sidebar-nav-pagelink-background) +} + +.sidebar-nav li>a[href^="/"]:not([href*="?id="]):not(:only-child), +.sidebar-nav li>a[href^="#/"]:not([href*="?id="]):not(:only-child) { + background: var(--sidebar-nav-pagelink-background--loaded, var(--sidebar-nav-pagelink-background)) +} + +.sidebar-nav li.active>a, +.sidebar-nav li.collapse>a { + border-width: var(--sidebar-nav-link-border-width--active, var(--sidebar-nav-link-border-width)); + border-style: var(--sidebar-nav-link-border-style--active, var(--sidebar-nav-link-border-style)); + border-color: var(--sidebar-nav-link-border-color--active, var(--sidebar-nav-link-border-color)); + background: var(--sidebar-nav-link-background--active, var(--sidebar-nav-link-background)); + color: var(--sidebar-nav-link-color--active, var(--sidebar-nav-link-color)); + font-weight: var(--sidebar-nav-link-font-weight--active, var(--sidebar-nav-link-font-weight)); + -webkit-text-decoration: var(--sidebar-nav-link-text-decoration--active, var(--sidebar-nav-link-text-decoration)); + text-decoration: var(--sidebar-nav-link-text-decoration--active, var(--sidebar-nav-link-text-decoration)); + -webkit-text-decoration-color: var(--sidebar-nav-link-text-decoration-color); + text-decoration-color: var(--sidebar-nav-link-text-decoration-color) +} + +.sidebar-nav li.active>a[href^="/"]:not([href*="?id="]):not(:only-child), +.sidebar-nav li.active>a[href^="#/"]:not([href*="?id="]):not(:only-child) { + background: var(--sidebar-nav-pagelink-background--active, var(--sidebar-nav-pagelink-background--loaded, var(--sidebar-nav-pagelink-background))) +} + +.sidebar-nav li.collapse>a[href^="/"]:not([href*="?id="]):not(:only-child), +.sidebar-nav li.collapse>a[href^="#/"]:not([href*="?id="]):not(:only-child) { + background: var(--sidebar-nav-pagelink-background--collapse, var(--sidebar-nav-pagelink-background--loaded, var(--sidebar-nav-pagelink-background))) +} + +.sidebar-nav li.collapse .app-sub-sidebar { + display: none +} + +.sidebar-nav>ul>li>a:before { + content: var(--sidebar-nav-link-before-content-l1, var(--sidebar-nav-link-before-content)); + margin: var(--sidebar-nav-link-before-margin-l1, var(--sidebar-nav-link-before-margin)); + color: var(--sidebar-nav-link-before-color-l1, var(--sidebar-nav-link-before-color)) +} + +.sidebar-nav>ul>li.active>a:before { + content: var(--sidebar-nav-link-before-content-l1--active, var(--sidebar-nav-link-before-content--active, var(--sidebar-nav-link-before-content-l1, var(--sidebar-nav-link-before-content)))); + color: var(--sidebar-nav-link-before-color-l1--active, var(--sidebar-nav-link-before-color--active, var(--sidebar-nav-link-before-color-l1, var(--sidebar-nav-link-before-color)))) +} + +.sidebar-nav>ul>li>ul>li>a:before { + content: var(--sidebar-nav-link-before-content-l2, var(--sidebar-nav-link-before-content)); + margin: var(--sidebar-nav-link-before-margin-l2, var(--sidebar-nav-link-before-margin)); + color: var(--sidebar-nav-link-before-color-l2, var(--sidebar-nav-link-before-color)) +} + +.sidebar-nav>ul>li>ul>li.active>a:before { + content: var(--sidebar-nav-link-before-content-l2--active, var(--sidebar-nav-link-before-content--active, var(--sidebar-nav-link-before-content-l2, var(--sidebar-nav-link-before-content)))); + color: var(--sidebar-nav-link-before-color-l2--active, var(--sidebar-nav-link-before-color--active, var(--sidebar-nav-link-before-color-l2, var(--sidebar-nav-link-before-color)))) +} + +.sidebar-nav>ul>li>ul>li>ul>li>a:before { + content: var(--sidebar-nav-link-before-content-l3, var(--sidebar-nav-link-before-content)); + margin: var(--sidebar-nav-link-before-margin-l3, var(--sidebar-nav-link-before-margin)); + color: var(--sidebar-nav-link-before-color-l3, var(--sidebar-nav-link-before-color)) +} + +.sidebar-nav>ul>li>ul>li>ul>li.active>a:before { + content: var(--sidebar-nav-link-before-content-l3--active, var(--sidebar-nav-link-before-content--active, var(--sidebar-nav-link-before-content-l3, var(--sidebar-nav-link-before-content)))); + color: var(--sidebar-nav-link-before-color-l3--active, var(--sidebar-nav-link-before-color--active, var(--sidebar-nav-link-before-color-l3, var(--sidebar-nav-link-before-color)))) +} + +.sidebar-nav>ul>li>ul>li>ul>li>ul>li>a:before { + content: var(--sidebar-nav-link-before-content-l4, var(--sidebar-nav-link-before-content)); + margin: var(--sidebar-nav-link-before-margin-l4, var(--sidebar-nav-link-before-margin)); + color: var(--sidebar-nav-link-before-color-l4, var(--sidebar-nav-link-before-color)) +} + +.sidebar-nav>ul>li>ul>li>ul>li>ul>li.active>a:before { + content: var(--sidebar-nav-link-before-content-l4--active, var(--sidebar-nav-link-before-content--active, var(--sidebar-nav-link-before-content-l4, var(--sidebar-nav-link-before-content)))); + color: var(--sidebar-nav-link-before-color-l4--active, var(--sidebar-nav-link-before-color--active, var(--sidebar-nav-link-before-color-l4, var(--sidebar-nav-link-before-color)))) +} + +.sidebar-nav>:last-child { + margin-bottom: 2rem +} + +.sidebar-toggle, +.sidebar-toggle-button { + width: var(--sidebar-toggle-width); + outline: none +} + +.sidebar-toggle { + position: fixed; + z-index: 11; + top: 0; + bottom: 0; + left: 0; + max-width: 40px; + margin: 0; + padding: 0; + border: 0; + background: rgba(0, 0, 0, 0); + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + cursor: pointer +} + +.sidebar-toggle .sidebar-toggle-button { + position: absolute; + top: var(--sidebar-toggle-offset-top); + left: var(--sidebar-toggle-offset-left); + height: var(--sidebar-toggle-height); + border-radius: var(--sidebar-toggle-border-radius); + border-width: var(--sidebar-toggle-border-width); + border-style: var(--sidebar-toggle-border-style); + border-color: var(--sidebar-toggle-border-color); + background: var(--sidebar-toggle-background, transparent); + color: var(--sidebar-toggle-icon-color) +} + +.sidebar-toggle span { + position: absolute; + top: calc(50% - var(--sidebar-toggle-icon-stroke-width)/2); + left: calc(50% - var(--sidebar-toggle-icon-width)/2); + height: var(--sidebar-toggle-icon-stroke-width); + width: var(--sidebar-toggle-icon-width); + background-color: currentColor +} + +.sidebar-toggle span:nth-child(1) { + margin-top: calc(0px - var(--sidebar-toggle-icon-height)/2) +} + +.sidebar-toggle span:nth-child(3) { + margin-top: calc(var(--sidebar-toggle-icon-height)/2) +} + +@media(min-width: 48em) { + .sidebar-toggle { + position: absolute; + overflow: visible; + top: var(--sidebar-toggle-offset-top); + bottom: auto; + left: 0; + height: var(--sidebar-toggle-height); + transform: translateX(var(--sidebar-width)) + } + .sidebar-toggle .sidebar-toggle-button { + top: 0 + } +} + +@media print { + .sidebar-toggle { + display: none + } +} + +@media(max-width: 47.99em) { + body.close .sidebar, + body.close .sidebar-toggle, + body.close .sidebar+.content { + transform: translateX(var(--sidebar-width)) + } +} + +@media(min-width: 48em) { + body.close .sidebar+.content { + transform: translateX(0) + } +} + +@media(max-width: 47.99em) { + body.close nav.app-nav, + body.close .github-corner { + display: none + } +} + +@media(min-width: 48em) { + body.close .sidebar, + body.close .sidebar-toggle { + transform: translateX(0) + } +} + +@media(min-width: 48em) { + body.close nav.app-nav { + margin-left: 0 + } +} + +@media(max-width: 47.99em) { + body.close .sidebar-toggle { + width: 100%; + max-width: none + } + body.close .sidebar-toggle span { + margin-top: 0 + } + body.close .sidebar-toggle span:nth-child(1) { + transform: rotate(45deg) + } + body.close .sidebar-toggle span:nth-child(2) { + display: none + } + body.close .sidebar-toggle span:nth-child(3) { + transform: rotate(-45deg) + } +} + +@media(min-width: 48em) { + body.close .sidebar+.content { + margin-left: 0 + } +} + +@media(min-width: 48em) { + body.sticky .sidebar, + body.sticky .sidebar-toggle { + position: fixed + } +} + +body .docsify-copy-code-button, +body .docsify-copy-code-button:after { + border-radius: var(--border-radius-m, 0); + border-top-left-radius: 0; + border-bottom-right-radius: 0; + background: var(--copycode-background); + color: var(--copycode-color) +} + +body .docsify-copy-code-button span { + border-radius: var(--border-radius-s, 0) +} + +body .docsify-pagination-container { + border-top: var(--pagination-border-top); + color: var(--pagination-color) +} + +body .pagination-item-label { + font-size: var(--pagination-label-font-size) +} + +body .pagination-item-label svg { + color: var(--pagination-label-color); + height: var(--pagination-chevron-height); + stroke: var(--pagination-chevron-stroke); + stroke-linecap: var(--pagination-chevron-stroke-linecap); + stroke-linejoin: var(--pagination-chevron-stroke-linecap); + stroke-width: var(--pagination-chevron-stroke-width) +} + +body .pagination-item-title { + color: var(--pagination-title-color); + font-size: var(--pagination-title-font-size) +} + +body .app-name.hide { + display: block +} + +body .sidebar { + padding: var(--sidebar-padding) +} + +.sidebar .search { + margin: 0; + padding: 0; + border: 0 +} + +.sidebar .search input { + padding: 0; + line-height: 1; + font-size: inherit +} + +.sidebar .search .clear-button { + width: auto +} + +.sidebar .search .clear-button svg { + transform: scale(1) +} + +.sidebar .search .matching-post { + border: none +} + +.sidebar .search p { + font-size: inherit +} + +.sidebar .search { + order: var(--search-flex-order); + margin: var(--search-margin); + padding: var(--search-padding); + background: var(--search-background) +} + +.sidebar .search a { + color: inherit +} + +.sidebar .search h2 { + margin: var(--search-result-heading-margin); + font-size: var(--search-result-heading-font-size); + font-weight: var(--search-result-heading-font-weight); + color: var(--search-result-heading-color) +} + +.sidebar .search .input-wrap { + align-items: stretch; + margin: var(--search-input-margin); + background-color: var(--search-input-background-color); + border-width: var(--search-input-border-width, 0); + border-style: solid; + border-color: var(--search-input-border-color); + border-radius: var(--search-input-border-radius) +} + +.sidebar .search input[type=search] { + min-width: 0; + padding: var(--search-input-padding); + border: none; + background-color: rgba(0, 0, 0, 0); + background-image: var(--search-input-background-image); + background-position: var(--search-input-background-position); + background-repeat: var(--search-input-background-repeat); + background-size: var(--search-input-background-size); + font-size: var(--search-input-font-size); + color: var(--search-input-color); + transition: var(--search-input-transition) +} + +.sidebar .search input[type=search]::-ms-clear { + display: none +} + +.sidebar .search input[type=search]::-moz-placeholder { + color: var(--search-input-placeholder-color, #808080) +} + +.sidebar .search input[type=search]::placeholder { + color: var(--search-input-placeholder-color, #808080) +} + +.sidebar .search input[type=search]::-webkit-input-placeholder { + line-height: normal +} + +.sidebar .search input[type=search]:focus { + background-color: var(--search-input-background-color--focus, var(--search-input-background-color)); + background-image: var(--search-input-background-image--focus, var(--search-input-background-image)); + background-position: var(--search-input-background-position--focus, var(--search-input-background-position)); + background-size: var(--search-input-background-size--focus, var(--search-input-background-size)) +} + +@supports(width: env(safe-area-inset)) { + @media only screen and (orientation: landscape) { + .sidebar .search input[type=search] { + margin-left:calc(env(safe-area-inset-left)/2) + } + } +} + +.sidebar .search p { + overflow: hidden; + text-overflow: ellipsis; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2 +} + +.sidebar .search p:empty { + text-align: center +} + +.sidebar .search .clear-button { + margin: 0; + padding: 0 10px; + border: none; + line-height: 1; + background: rgba(0, 0, 0, 0); + cursor: pointer +} + +.sidebar .search .clear-button svg circle { + fill: var(--search-clear-icon-color1, #808080) +} + +.sidebar .search .clear-button svg path { + stroke: var(--search-clear-icon-color2, #fff) +} + +.sidebar .search.show~*:not(h1) { + display: none +} + +.sidebar .search .results-panel { + display: none; + color: var(--search-result-item-color); + font-size: var(--search-result-item-font-size); + font-weight: var(--search-result-item-font-weight) +} + +.sidebar .search .results-panel.show { + display: block +} + +.sidebar .search .matching-post { + margin: var(--search-result-item-margin); + padding: var(--search-result-item-padding) +} + +.sidebar .search .matching-post, +.sidebar .search .matching-post:last-child { + border-width: var(--search-result-item-border-width, 0) !important; + border-style: var(--search-result-item-border-style); + border-color: var(--search-result-item-border-color) +} + +.sidebar .search .matching-post p { + margin: 0 +} + +.sidebar .search .search-keyword { + margin: var(--search-result-keyword-margin); + padding: var(--search-result-keyword-padding); + border-radius: var(--search-result-keyword-border-radius); + background-color: var(--search-result-keyword-background); + color: var(--search-result-keyword-color, currentColor); + font-style: normal; + font-weight: var(--search-result-keyword-font-weight) +} + +.medium-zoom-overlay, +.medium-zoom-image--open, +.medium-zoom-image--opened { + z-index: 2147483646 !important +} + +.medium-zoom-overlay { + background: var(--zoomimage-overlay-background) !important +} + +:root { + --mono-hue: 113; + --mono-saturation: 0%; + --mono-shade3: hsl(var(--mono-hue), var(--mono-saturation), 20%); + --mono-shade2: hsl(var(--mono-hue), var(--mono-saturation), 30%); + --mono-shade1: hsl(var(--mono-hue), var(--mono-saturation), 40%); + --mono-base: hsl(var(--mono-hue), var(--mono-saturation), 50%); + --mono-tint1: hsl(var(--mono-hue), var(--mono-saturation), 70%); + --mono-tint2: hsl(var(--mono-hue), var(--mono-saturation), 89%); + --mono-tint3: hsl(var(--mono-hue), var(--mono-saturation), 97%); + --theme-hue: 204; + --theme-saturation: 90%; + --theme-lightness: 45%; + --theme-color: hsl(var(--theme-hue), var(--theme-saturation), var(--theme-lightness)); + --modular-scale: 1.333; + --modular-scale--2: calc(var(--modular-scale--1) / var(--modular-scale)); + --modular-scale--1: calc(var(--modular-scale-1) / var(--modular-scale)); + --modular-scale-1: 1rem; + --modular-scale-2: calc(var(--modular-scale-1) * var(--modular-scale)); + --modular-scale-3: calc(var(--modular-scale-2) * var(--modular-scale)); + --modular-scale-4: calc(var(--modular-scale-3) * var(--modular-scale)); + --modular-scale-5: calc(var(--modular-scale-4) * var(--modular-scale)); + --font-size-xxxl: var(--modular-scale-5); + --font-size-xxl: var(--modular-scale-4); + --font-size-xl: var(--modular-scale-3); + --font-size-l: var(--modular-scale-2); + --font-size-m: var(--modular-scale-1); + --font-size-s: var(--modular-scale--1); + --font-size-xs: var(--modular-scale--2); + --duration-slow: 1s; + --duration-medium: 0.5s; + --duration-fast: 0.25s; + --spinner-size: 60px; + --spinner-track-width: 4px; + --spinner-track-color: rgba(0, 0, 0, 0.15); + --spinner-transition-duration: var(--duration-medium) +} + +:root { + --base-background-color: #fff; + --base-color: var(--mono-shade2); + --base-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + --base-font-size: 16px; + --base-font-weight: normal; + --base-line-height: 1.7; + --emoji-size: calc(var(--base-line-height) * 1em); + --hr-border: 1px solid var(--mono-tint2); + --mark-background: #ffecb3; + --pre-font-family: var(--code-font-family); + --pre-font-size: var(--code-font-size); + --pre-font-weight: normal; + --selection-color: #b4d5fe; + --small-font-size: var(--font-size-s); + --strong-color: var(--heading-color); + --strong-font-weight: 600; + --subsup-font-size: var(--font-size-s) +} + +:root { + --content-max-width: 55em; + --blockquote-background: var(--mono-tint3); + --blockquote-border-style: solid; + --blockquote-border-radius: var(--border-radius-m); + --blockquote-em-font-weight: normal; + --blockquote-font-weight: normal; + --blockquote-padding: 1.5em; + --code-font-family: Inconsolata, Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; + --code-font-size: calc(var(--font-size-m) * 0.95); + --code-font-weight: normal; + --code-tab-size: 4; + --code-block-border-radius: var(--border-radius-m); + --code-block-line-height: var(--base-line-height); + --code-block-margin: 1em 0; + --code-block-padding: 1.75em 1.5em 1.5em 1.5em; + --code-inline-background: var(--code-theme-background); + --code-inline-border-radius: var(--border-radius-s); + --code-inline-color: var(--code-theme-text); + --code-inline-margin: 0 0.15em; + --code-inline-padding: 0.125em 0.4em; + --code-theme-background: var(--mono-tint3); + --heading-color: var(--mono-shade3); + --heading-margin: 2.5rem 0 0; + --heading-h1-border-style: solid; + --heading-h1-font-size: var(--font-size-xxl); + --heading-h2-border-style: solid; + --heading-h2-font-size: var(--font-size-xl); + --heading-h3-border-style: solid; + --heading-h3-font-size: var(--font-size-l); + --heading-h4-border-style: solid; + --heading-h4-font-size: var(--font-size-m); + --heading-h5-border-style: solid; + --heading-h5-font-size: var(--font-size-s); + --heading-h6-border-style: solid; + --heading-h6-font-size: var(--font-size-xs); + --kbd-background: var(--mono-tint3); + --kbd-border-radius: var(--border-radius-m); + --kbd-margin: 0 0.3em; + --kbd-min-width: 2.5em; + --kbd-padding: 0.65em 0.5em; + --link-text-decoration: underline; + --notice-background: var(--mono-tint3); + --notice-border-radius: var(--border-radius-m); + --notice-border-style: solid; + --notice-font-weight: normal; + --notice-padding: 1em 1.5em; + --notice-before-font-weight: normal; + --table-cell-padding: 0.75em 0.5em; + --table-head-border-color: var(--table-cell-border-color); + --table-head-font-weight: var(--strong-font-weight); + --table-row-odd-background: var(--mono-tint3) +} + +:root { + --cover-margin: 0 auto; + --cover-max-width: 40em; + --cover-text-align: center; + --cover-background-color: var(--base-background-color); + --cover-background-mask-color: var(--base-background-color); + --cover-background-mask-opacity: 0.8; + --cover-background-position: center center; + --cover-background-repeat: no-repeat; + --cover-background-size: cover; + --cover-blockquote-font-size: var(--font-size-l); + --cover-border-color: var(--theme-color); + --cover-button-border: 1px solid var(--theme-color); + --cover-button-border-radius: var(--border-radius-m); + --cover-button-color: var(--theme-color); + --cover-button-padding: 0.5em 2rem; + --cover-button-text-decoration: none; + --cover-button-transition: all var(--duration-fast) ease-in-out; + --cover-button-primary-background: var(--theme-color); + --cover-button-primary-border: 1px solid var(--theme-color); + --cover-button-primary-color: #fff; + --cover-heading-color: var(--theme-color); + --cover-heading-font-size: var(--font-size-xxl); + --cover-heading-font-weight: normal; + --cover-link-text-decoration: underline +} + +:root { + --navbar-root-border-style: solid; + --navbar-root-margin: 0 0 0 1.5em; + --navbar-root-transition: all var(--duration-fast); + --navbar-menu-background: var(--base-background-color); + --navbar-menu-border-radius: var(--border-radius-m); + --navbar-menu-box-shadow: rgba(45, 45, 45, 0.05) 0px 0px 1px, rgba(49, 49, 49, 0.05) 0px 1px 2px, rgba(42, 42, 42, 0.05) 0px 2px 4px, rgba(32, 32, 32, 0.05) 0px 4px 8px, rgba(49, 49, 49, 0.05) 0px 8px 16px, rgba(35, 35, 35, 0.05) 0px 16px 32px; + --navbar-menu-padding: 0.5em; + --navbar-menu-transition: all var(--duration-fast); + --navbar-menu-link-border-style: solid; + --navbar-menu-link-margin: 0.75em 0.5em; + --navbar-menu-link-padding: 0.2em 0 +} + +:root { + --copycode-background: #808080; + --copycode-color: #fff +} + +:root { + --docsifytabs-border-color: var(--mono-tint2); + --docsifytabs-border-radius-px: var(--border-radius-s); + --docsifytabs-tab-background: var(--mono-tint3); + --docsifytabs-tab-color: var(--mono-tint1) +} + +:root { + --pagination-border-top: 1px solid var(--mono-tint2); + --pagination-chevron-height: 0.8em; + --pagination-chevron-stroke: currentColor; + --pagination-chevron-stroke-linecap: round; + --pagination-chevron-stroke-width: 1px; + --pagination-label-font-size: var(--font-size-s); + --pagination-title-font-size: var(--font-size-l) +} + +:root { + --search-margin: 1.5rem 0 0; + --search-input-background-repeat: no-repeat; + --search-input-border-color: var(--mono-tint1); + --search-input-border-width: 1px; + --search-input-padding: 0.5em; + --search-flex-order: 1; + --search-result-heading-color: var(--heading-color); + --search-result-heading-font-size: var(--base-font-size); + --search-result-heading-font-weight: normal; + --search-result-heading-margin: 0 0 0.25em; + --search-result-item-border-color: var(--mono-tint2); + --search-result-item-border-style: solid; + --search-result-item-border-width: 0 0 1px 0; + --search-result-item-font-weight: normal; + --search-result-item-padding: 1em 0; + --search-result-keyword-background: var(--mark-background); + --search-result-keyword-border-radius: var(--border-radius-s); + --search-result-keyword-color: var(--mark-color); + --search-result-keyword-font-weight: normal; + --search-result-keyword-margin: 0 0.1em; + --search-result-keyword-padding: 0.2em 0 +} + +:root { + --zoomimage-overlay-background: rgba(0, 0, 0, 0.875) +} + +:root { + --sidebar-background: var(--base-background-color); + --sidebar-border-width: 0; + --sidebar-padding: 0 25px; + --sidebar-transition-duration: var(--duration-fast); + --sidebar-width: 17rem; + --sidebar-name-font-size: var(--font-size-l); + --sidebar-name-font-weight: normal; + --sidebar-name-margin: 1.5rem 0 0; + --sidebar-name-text-align: center; + --sidebar-nav-strong-border-color: var(--sidebar-border-color); + --sidebar-nav-strong-color: var(--heading-color); + --sidebar-nav-strong-font-weight: var(--strong-font-weight); + --sidebar-nav-strong-margin: 1.5em 0 0.5em; + --sidebar-nav-strong-padding: 0.25em 0; + --sidebar-nav-indent: 1em; + --sidebar-nav-margin: 1.5rem 0 0; + --sidebar-nav-link-border-style: solid; + --sidebar-nav-link-border-width: 0; + --sidebar-nav-link-color: var(--base-color); + --sidebar-nav-link-font-weight: normal; + --sidebar-nav-link-padding: 0.25em 0; + --sidebar-nav-link-text-decoration--active: underline; + --sidebar-nav-link-text-decoration--hover: underline; + --sidebar-nav-link-before-margin: 0 0.35em 0 0; + --sidebar-nav-pagelink-transition: var(--sidebar-nav-link-transition); + --sidebar-toggle-border-radius: var(--border-radius-s); + --sidebar-toggle-border-style: solid; + --sidebar-toggle-border-width: 0; + --sidebar-toggle-height: 36px; + --sidebar-toggle-icon-color: var(--base-color); + --sidebar-toggle-icon-height: 10px; + --sidebar-toggle-icon-stroke-width: 1px; + --sidebar-toggle-icon-width: 16px; + --sidebar-toggle-offset-left: 0; + --sidebar-toggle-offset-top: calc(35px - (var(--sidebar-toggle-height) / 2)); + --sidebar-toggle-width: 44px +} + +:root { + --code-theme-background: #f3f3f3; + --code-theme-comment: #6e8090; + --code-theme-function: #dd4a68; + --code-theme-keyword: #07a; + --code-theme-operator: #a67f59; + --code-theme-punctuation: #999; + --code-theme-selector: #690; + --code-theme-tag: #905; + --code-theme-text: #333; + --code-theme-variable: #e90 +} + +:root { + --border-radius-s: 2px; + --border-radius-m: 4px; + --border-radius-l: 8px; + --strong-font-weight: 600; + --blockquote-border-color: var(--theme-color); + --blockquote-border-radius: 0 var(--border-radius-m) var(--border-radius-m) 0; + --blockquote-border-width: 0 0 0 4px; + --code-inline-background: var(--mono-tint2); + --code-theme-background: var(--mono-tint3); + --heading-font-weight: var(--strong-font-weight); + --heading-h1-font-weight: 400; + --heading-h2-font-weight: 400; + --heading-h2-border-color: var(--mono-tint2); + --heading-h2-border-width: 0 0 1px 0; + --heading-h2-margin: 2.5rem 0 1.5rem; + --heading-h2-padding: 0 0 1rem 0; + --kbd-border: 1px solid var(--mono-tint2); + --notice-border-radius: 0 var(--border-radius-m) var(--border-radius-m) 0; + --notice-border-width: 0 0 0 4px; + --notice-padding: 1em 1.5em 1em 3em; + --notice-before-border-radius: 100%; + --notice-before-font-weight: bold; + --notice-before-height: 1.5em; + --notice-before-left: 0.75em; + --notice-before-line-height: 1.5; + --notice-before-margin: 0 0.25em 0 0; + --notice-before-position: absolute; + --notice-before-width: var(--notice-before-height); + --notice-important-background: hsl(340, 60%, 96%); + --notice-important-border-color: hsl(340, 90%, 45%); + --notice-important-before-background: var(--notice-important-border-color) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3E%3Cpath d='M10 14C10 15.1 9.1 16 8 16 6.9 16 6 15.1 6 14 6 12.9 6.9 12 8 12 9.1 12 10 12.9 10 14Z'/%3E%3Cpath d='M10 1.6C10 1.2 9.8 0.9 9.6 0.7 9.2 0.3 8.6 0 8 0 7.4 0 6.8 0.2 6.5 0.6 6.2 0.9 6 1.2 6 1.6 6 1.7 6 1.8 6 1.9L6.8 9.6C6.9 9.9 7 10.1 7.2 10.2 7.4 10.4 7.7 10.5 8 10.5 8.3 10.5 8.6 10.4 8.8 10.3 9 10.1 9.1 9.9 9.2 9.6L10 1.9C10 1.8 10 1.7 10 1.6Z'/%3E%3C/svg%3E") center / 0.875em no-repeat; + --notice-important-before-color: #fff; + --notice-important-before-content: ""; + --notice-tip-background: hsl(204, 60%, 96%); + --notice-tip-border-color: hsl(204, 90%, 45%); + --notice-tip-before-background: var(--notice-tip-border-color) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3E%3Cpath d='M9.1 0C10.2 0 10.7 0.7 10.7 1.6 10.7 2.6 9.8 3.6 8.6 3.6 7.6 3.6 7 3 7 2 7 1.1 7.7 0 9.1 0Z'/%3E%3Cpath d='M5.8 16C5 16 4.4 15.5 5 13.2L5.9 9.1C6.1 8.5 6.1 8.2 5.9 8.2 5.7 8.2 4.6 8.6 3.9 9.1L3.5 8.4C5.6 6.6 7.9 5.6 8.9 5.6 9.8 5.6 9.9 6.6 9.5 8.2L8.4 12.5C8.2 13.2 8.3 13.5 8.5 13.5 8.7 13.5 9.6 13.2 10.4 12.5L10.9 13.2C8.9 15.2 6.7 16 5.8 16Z'/%3E%3C/svg%3E") center / 0.875em no-repeat; + --notice-tip-before-color: #fff; + --notice-tip-before-content: ""; + --table-cell-border-color: var(--mono-tint2); + --table-cell-border-width: 1px 0; + --cover-background-color: hsl(var(--theme-hue), 25%, 60%); + --cover-background-image: radial-gradient(ellipse at center 115%, rgba(255, 255, 255, 0.9), transparent); + --cover-blockquote-color: var(--strong-color); + --cover-heading-color: #fff; + --cover-heading-font-size-max: 56; + --cover-heading-font-size-min: 34; + --cover-heading-font-weight: 200; + --navbar-root-color--active: var(--theme-color); + --navbar-menu-border-radius: var(--border-radius-m); + --navbar-menu-root-background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9.6' height='6' viewBox='0 0 9.6 6'%3E%3Cpath d='M1.5 1.5l3.3 3 3.3-3' stroke-width='1.5' stroke='rgb%28179, 179, 179%29' fill='none' stroke-linecap='square' stroke-linejoin='miter' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") right no-repeat; + --navbar-menu-root-padding: 0 18px 0 0; + --search-input-background-color: #fff; + --search-input-background-image: url("data:image/svg+xml,%3Csvg height='20px' width='20px' viewBox='0 0 24 24' fill='none' stroke='rgba(0, 0, 0, 0.3)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' preserveAspectRatio='xMidYMid meet' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10.5' cy='10.5' r='7.5' vector-effect='non-scaling-stroke'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='15.8' y2='15.8' vector-effect='non-scaling-stroke'%3E%3C/line%3E%3C/svg%3E"); + --search-input-background-position: 21px center; + --search-input-border-color: var(--sidebar-border-color); + --search-input-border-width: 1px 0; + --search-input-margin: 0 -25px; + --search-input-padding: 0.65em 1em 0.65em 50px; + --search-input-placeholder-color: rgba(0, 0, 0, 0.4); + --search-clear-icon-color1: rgba(0, 0, 0, 0.3); + --search-result-heading-font-weight: var(--strong-font-weight); + --search-result-item-border-color: var(--sidebar-border-color); + --search-result-keyword-border-radius: var(--border-radius-s); + --sidebar-background: var(--mono-tint3); + --sidebar-border-color: var(--mono-tint2); + --sidebar-border-width: 0 1px 0 0; + --sidebar-name-color: var(--theme-color); + --sidebar-name-font-weight: 300; + --sidebar-nav-strong-border-width: 0 0 1px 0; + --sidebar-nav-strong-font-size: smaller; + --sidebar-nav-strong-margin: 2em -25px 0.75em 0; + --sidebar-nav-strong-padding: 0.25em 0 0.75em 0; + --sidebar-nav-strong-text-transform: uppercase; + --sidebar-nav-link-border-color: transparent; + --sidebar-nav-link-border-color--active: var(--theme-color); + --sidebar-nav-link-border-width: 0 4px 0 0; + --sidebar-nav-link-color--active: var(--theme-color); + --sidebar-nav-link-margin: 0 -25px 0 0; + --sidebar-nav-link-text-decoration: none; + --sidebar-nav-link-text-decoration--active: none; + --sidebar-nav-link-text-decoration--hover: underline; + --sidebar-nav-pagelink-background: no-repeat 2px calc(50% - 2.5px) / 6px 5px linear-gradient(45deg, transparent 2.75px, var(--mono-tint1) 2.75px 4.25px, transparent 4px), no-repeat 2px calc(50% + 2.5px) / 6px 5px linear-gradient(135deg, transparent 2.75px, var(--mono-tint1) 2.75px 4.25px, transparent 4px); + --sidebar-nav-pagelink-background--active: no-repeat 0px center / 5px 6px linear-gradient(225deg, transparent 2.75px, var(--theme-color) 2.75px 4.25px, transparent 4.25px), no-repeat 5px center / 5px 6px linear-gradient(135deg, transparent 2.75px, var(--theme-color) 2.75px 4.25px, transparent 4.25px); + --sidebar-nav-pagelink-background--collapse: no-repeat 2px calc(50% - 2.5px) / 6px 5px linear-gradient(45deg, transparent 2.75px, var(--theme-color) 2.75px 4.25px, transparent 4px), no-repeat 2px calc(50% + 2.5px) / 6px 5px linear-gradient(135deg, transparent 2.75px, var(--theme-color) 2.75px 4.25px, transparent 4px); + --sidebar-nav-pagelink-background--loaded: no-repeat 0px center / 5px 6px linear-gradient(225deg, transparent 2.75px, var(--mono-tint1) 2.75px 4.25px, transparent 4.25px), no-repeat 5px center / 5px 6px linear-gradient(135deg, transparent 2.75px, var(--mono-tint1) 2.75px 4.25px, transparent 4.25px); + --sidebar-nav-pagelink-padding: 0.25em 0 0.25em 20px; + --sidebar-nav-pagelink-transition: none; + --sidebar-toggle-background: var(--sidebar-border-color); + --sidebar-toggle-border-radius: 0 var(--border-radius-s) var(--border-radius-s) 0; + --sidebar-toggle-width: 32px +} diff --git a/public/js/plugins/themable.md b/public/js/plugins/themable.md @@ -0,0 +1,772 @@ +Customization +Theme Styles +To customize a docsify-themeable theme: + +Add a <style> tag after the theme stylesheet in your index.html: + +<!-- Theme --> +<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple.css"> + +<!-- Custom theme styles --> +<style> + /* ... */ +</style> +Copy to clipboardErrorCopied +If you prefer, you can use a <link> to an external stylesheet: + +<!-- Theme --> +<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple.css"> + +<!-- Custom theme stylesheet --> +<link rel="stylesheet" href="theme-custom.css"> +Copy to clipboardErrorCopied +Set any of the theme properties found below: + +:root { + --base-font-size: 14px; + --theme-color : purple; +} +Copy to clipboardErrorCopied +It’s easy to to mix styles from different themes! Just view the source of other themes, find the theme properties you like, and copy them to your custom stylesheet. + +App +Theme properties for application styles. + +/* App +============================================================================= */ +:root { + /* Color + ------------------------------------------------------------------------- */ + /* Monochrome */ + --mono-hue : 113; + --mono-saturation : 0%; + + /* Monochrome shades (darker) and tints (lighter) */ + --mono-shade3 : hsl(var(--mono-hue), var(--mono-saturation), 20%); /* #333333 */ + --mono-shade2 : hsl(var(--mono-hue), var(--mono-saturation), 30%); /* #4d4d4d */ + --mono-shade1 : hsl(var(--mono-hue), var(--mono-saturation), 40%); /* #666666 */ + --mono-base : hsl(var(--mono-hue), var(--mono-saturation), 50%); /* #808080 */ + --mono-tint1 : hsl(var(--mono-hue), var(--mono-saturation), 70%); /* #b3b3b3 */ + --mono-tint2 : hsl(var(--mono-hue), var(--mono-saturation), 89%); /* #e3e3e3 */ + --mono-tint3 : hsl(var(--mono-hue), var(--mono-saturation), 97%); /* #f7f7f7 */ + + /* Theme */ + --theme-hue : 204; + --theme-saturation: 90%; + --theme-lightness : 45%; + --theme-color : hsl(var(--theme-hue), var(--theme-saturation), var(--theme-lightness)); + + /* Typography + ------------------------------------------------------------------------- */ + /* Modular Scale */ + --modular-scale : 1.333; + + /* Module Scale Calculations (do not edit these) */ + --modular-scale--2: calc(var(--modular-scale--1) / var(--modular-scale)); + --modular-scale--1: calc(var(--modular-scale-1) / var(--modular-scale)); + --modular-scale-1 : 1rem; + --modular-scale-2 : calc(var(--modular-scale-1) * var(--modular-scale)); + --modular-scale-3 : calc(var(--modular-scale-2) * var(--modular-scale)); + --modular-scale-4 : calc(var(--modular-scale-3) * var(--modular-scale)); + --modular-scale-5 : calc(var(--modular-scale-4) * var(--modular-scale)); + + /* Font size */ + --font-size-xxxl : var(--modular-scale-5); + --font-size-xxl : var(--modular-scale-4); + --font-size-xl : var(--modular-scale-3); + --font-size-l : var(--modular-scale-2); + --font-size-m : var(--modular-scale-1); + --font-size-s : var(--modular-scale--1); + --font-size-xs : var(--modular-scale--2); + + /* Utility + ------------------------------------------------------------------------- */ + /* Borders */ + --border-radius-s : ; + --border-radius-m : ; + --border-radius-l : ; + + /* Animations and transitions */ + --duration-slow : 1s; + --duration-medium : 0.5s; + --duration-fast : 0.25s; + + /* Misc + ------------------------------------------------------------------------- */ + /* Spinner */ + --spinner-size : 60px; + --spinner-track-width : 4px; + --spinner-track-color : rgba(0, 0, 0, 0.15); + --spinner-transition-duration: var(--duration-medium); +} +Copy to clipboardErrorCopied +Base +Theme properties for base styles. + +/* Base +============================================================================= */ +:root { + --base-background-color: #fff; + --base-color : var(--mono-shade2); + --base-font-family : -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + --base-font-size : 16px; + --base-font-weight : normal; + --base-letter-spacing : ; + --base-line-height : 1.7; + + /* Emoji */ + --emoji-size : calc(var(--base-line-height) * 1em); + + /* Horizontal Rule */ + --hr-border : 1px solid var(--mono-tint2); + + /* Mark */ + --mark-background : #ffecb3; + --mark-color : ; + + /* Preformatted */ + --pre-font-family : var(--code-font-family); + --pre-font-size : var(--code-font-size); + --pre-font-weight : normal; + --pre-line-height : ; + + /* Selection */ + --selection-color : #b4d5fe; + + /* Small */ + --small-font-size : var(--font-size-s); + + /* Strong */ + --strong-color : var(--heading-color); + --strong-font-weight : 600; + + /* Sub/Sup */ + --subsup-font-size : var(--font-size-s); +} +Copy to clipboardErrorCopied +Code +See the --code properties listed in Content section as well as the PrismJS section for additional details related to syntax highlighting themes. + +Content +Theme properties for markdown content. + +/* Content +============================================================================= */ +:root { + --content-max-width : 55em; + + /* Blockquote */ + --blockquote-background : var(--mono-tint3); + --blockquote-border-color : ; + --blockquote-border-style : solid; + --blockquote-border-width : ; + --blockquote-border-radius : var(--border-radius-m); + --blockquote-color : ; + --blockquote-em-font-family : ; + --blockquote-em-font-size : ; + --blockquote-em-font-style : ; + --blockquote-em-font-weight : normal; + --blockquote-font-family : ; + --blockquote-font-size : ; + --blockquote-font-style : ; + --blockquote-font-weight : normal; + --blockquote-quotes-close : ; + --blockquote-quotes-color : ; + --blockquote-quotes-font-family : ; + --blockquote-quotes-font-size : ; + --blockquote-quotes-open : ; + --blockquote-padding : 1.5em; + + /* Code */ + --code-font-family : Inconsolata, Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; + --code-font-size : calc(var(--font-size-m) * 0.95); + --code-font-weight : normal; + --code-tab-size : 4; + + --code-block-border-radius : var(--border-radius-m); + --code-block-line-height : var(--base-line-height); + --code-block-margin : 1em 0; + --code-block-padding : 1.75em 1.5em 1.5em 1.5em; + + --code-inline-background : var(--code-theme-background); + --code-inline-border-radius : var(--border-radius-s); + --code-inline-color : var(--code-theme-text); + --code-inline-margin : 0 0.15em; + --code-inline-padding : 0.125em 0.4em; + + --code-theme-background : var(--mono-tint3); + --code-theme-comment : ; + --code-theme-function : ; + --code-theme-keyword : ; + --code-theme-operator : ; + --code-theme-punctuation : ; + --code-theme-selection : ; + --code-theme-selector : ; + --code-theme-tag : ; + --code-theme-text : ; + --code-theme-variable : ; + + /* Headings */ + --heading-color : var(--mono-shade3); + --heading-font-family : ; + --heading-font-weight : ; + --heading-margin : 2.5rem 0 0; + --heading-padding : ; + --heading-h1-border-color : ; + --heading-h1-border-style : solid; + --heading-h1-border-width : ; + --heading-h1-color : ; + --heading-h1-font-family : ; + --heading-h1-font-size : var(--font-size-xxl); + --heading-h1-font-weight : ; + --heading-h1-margin : ; + --heading-h1-padding : ; + --heading-h2-border-color : ; + --heading-h2-border-style : solid; + --heading-h2-border-width : ; + --heading-h2-color : ; + --heading-h2-font-family : ; + --heading-h2-font-size : var(--font-size-xl); + --heading-h2-font-weight : ; + --heading-h2-margin : ; + --heading-h2-padding : ; + --heading-h3-border-color : ; + --heading-h3-border-style : solid; + --heading-h3-border-width : ; + --heading-h3-color : ; + --heading-h3-font-family : ; + --heading-h3-font-size : var(--font-size-l); + --heading-h3-font-weight : ; + --heading-h3-margin : ; + --heading-h3-padding : ; + --heading-h4-border-color : ; + --heading-h4-border-style : solid; + --heading-h4-border-width : ; + --heading-h4-color : ; + --heading-h4-font-family : ; + --heading-h4-font-size : var(--font-size-m); + --heading-h4-font-weight : ; + --heading-h4-margin : ; + --heading-h4-padding : ; + + --heading-h5-border-color : ; + --heading-h5-border-style : solid; + --heading-h5-border-width : ; + --heading-h5-color : ; + --heading-h5-font-family : ; + --heading-h5-font-size : var(--font-size-s); + --heading-h5-font-weight : ; + --heading-h5-margin : ; + --heading-h5-padding : ; + + --heading-h6-border-color : ; + --heading-h6-border-style : solid; + --heading-h6-border-width : ; + --heading-h6-color : ; + --heading-h6-font-family : ; + --heading-h6-font-size : var(--font-size-xs); + --heading-h6-font-weight : ; + --heading-h6-margin : ; + --heading-h6-padding : ; + + /* Keyboard */ + --kbd-background : var(--mono-tint3); + --kbd-border : ; + --kbd-border-radius : var(--border-radius-m); + --kbd-color : ; + --kbd-font-size : ; + --kbd-margin : 0 0.3em; + --kbd-min-width : 2.5em; + --kbd-padding : 0.65em 0.5em; + + /* Links */ + --link-border-bottom : ; + --link-border-bottom--hover : ; + --link-color : ; + --link-color--hover : ; + --link-text-decoration : underline; + --link-text-decoration--hover : ; + --link-text-decoration-color : ; + --link-text-decoration-color--hover : ; + + /* Notice */ + --notice-background : var(--mono-tint3); + --notice-border-color : ; + --notice-border-radius : var(--border-radius-m); + --notice-border-style : solid; + --notice-border-width : ; + --notice-color : ; + --notice-font-family : ; + --notice-font-weight : normal; + --notice-padding : 1em 1.5em; + + /* Notice - Pseudo */ + --notice-before-background : ; + --notice-before-border-radius : ; + --notice-before-color : ; + --notice-before-content : ; + --notice-before-font-family : ; + --notice-before-font-size : ; + --notice-before-font-weight : normal; + --notice-before-height : ; + --notice-before-left : ; + --notice-before-line-height : ; + --notice-before-margin : ; + --notice-before-padding : ; + --notice-before-position : ; + --notice-before-top : ; + --notice-before-width : ; + + /* Notice - Important */ + --notice-important-background : ; + --notice-important-border-color : ; + --notice-important-border-style : ; + --notice-important-border-width : ; + --notice-important-color : ; + + /* Notice - Important Pseudo */ + --notice-important-before-background: ; + --notice-important-before-color : ; + --notice-important-before-content : ; + + /* Notice - Tip */ + --notice-tip-background : ; + --notice-tip-border-color : ; + --notice-tip-border-style : ; + --notice-tip-border-width : ; + --notice-tip-color : ; + + /* Notice - Tip Pseudo */ + --notice-tip-before-background : ; + --notice-tip-before-color : ; + --notice-tip-before-content : ; + + /* Tables */ + --table-body-border-color : ; + --table-body-border-width : ; + --table-cell-border-color : ; + --table-cell-border-width : ; + --table-cell-padding : 0.75em 0.5em; + --table-head-background : ; + --table-head-border-color : var(--table-cell-border-color); + --table-head-border-width : ; + --table-head-font-weight : var(--strong-font-weight); + --table-row-even-background : ; + --table-row-odd-background : var(--mono-tint3); +} +Copy to clipboardErrorCopied +Cover +Theme properties for docsify’s coverpage. + +/* Cover +============================================================================= */ +:root { + --cover-color : ; + --cover-margin : 0 auto; + --cover-max-width : 40em; + --cover-text-align : center; + + /* Background */ + --cover-background-blend-mode : ; + --cover-background-color : var(--base-background-color); + --cover-background-image : ; + --cover-background-mask-color : var(--base-background-color); + --cover-background-mask-opacity : 0.8; + --cover-background-mask-visibility : ; + --cover-background-position : center center; + --cover-background-repeat : no-repeat; + --cover-background-size : cover; + + /* Blockquote (Subtitle) */ + --cover-blockquote-color : ; + --cover-blockquote-font-size : var(--font-size-l); + + /* Border */ + --cover-border-inset : ; + --cover-border-color : var(--theme-color); + --cover-border-width : ; + + /* Buttons */ + --cover-button-background : ; + --cover-button-background--hover : ; + --cover-button-border : 1px solid var(--theme-color); + --cover-button-border--hover : ; + --cover-button-border-radius : var(--border-radius-m); + --cover-button-box-shadow : ; + --cover-button-box-shadow--hover : ; + --cover-button-color : var(--theme-color); + --cover-button-color--hover : ; + --cover-button-padding : 0.5em 2rem; + --cover-button-text-decoration : none; + --cover-button-text-decoration--hover : ; + --cover-button-text-decoration-color : ; + --cover-button-text-decoration-color--hover : ; + --cover-button-transition : all var(--duration-fast) ease-in-out; + + /* Buttons - Primary */ + --cover-button-primary-background : var(--theme-color); + --cover-button-primary-background--hover : ; + --cover-button-primary-border : 1px solid var(--theme-color); + --cover-button-primary-border--hover : ; + --cover-button-primary-box-shadow : ; + --cover-button-primary-box-shadow--hover : ; + --cover-button-primary-color : #fff; + --cover-button-primary-color--hover : ; + --cover-button-primary-text-decoration : ; + --cover-button-primary-text-decoration--hover : ; + --cover-button-primary-text-decoration-color : ; + --cover-button-primary-text-decoration-color--hover: ; + + /* Heading */ + --cover-heading-color : var(--theme-color); + --cover-heading-font-size : var(--font-size-xxl); + --cover-heading-font-size-min : ; + --cover-heading-font-size-max : ; + --cover-heading-font-weight : normal; + + /* Links */ + --cover-link-border-bottom : ; + --cover-link-border-bottom--hover : ; + --cover-link-color : ; + --cover-link-color--hover : ; + --cover-link-text-decoration : underline; + --cover-link-text-decoration--hover : ; + --cover-link-text-decoration-color : ; + --cover-link-text-decoration-color--hover : ; +} +Copy to clipboardErrorCopied +Navbar +Theme properties for docsify’s custom navbar. + +/* Navbar +============================================================================= */ +:root { + /* Root */ + --navbar-root-background : ; + --navbar-root-background--active : ; + --navbar-root-background--hover : ; + --navbar-root-border-color : ; + --navbar-root-border-color--active : ; + --navbar-root-border-color--hover : ; + --navbar-root-border-radius : ; + --navbar-root-border-style : solid; + --navbar-root-border-style--active : ; + --navbar-root-border-style--hover : ; + --navbar-root-border-width : ; + --navbar-root-color : ; + --navbar-root-color--active : ; + --navbar-root-color--hover : ; + --navbar-root-margin : 0 0 0 1.5em; + --navbar-root-padding : ; + --navbar-root-transition : all var(--duration-fast); + --navbar-root-text-decoration : ; + --navbar-root-text-decoration--active : ; + --navbar-root-text-decoration--hover : ; + --navbar-root-text-decoration-color : ; + --navbar-root-text-decoration-color--active : ; + --navbar-root-text-decoration-color--hover : ; + + /* Menus */ + --navbar-menu-background : var(--base-background-color); + --navbar-menu-border-color : ; + --navbar-menu-border-radius : var(--border-radius-m); + --navbar-menu-border-width : ; + --navbar-menu-box-shadow : rgba(45,45,45,0.05) 0px 0px 1px, rgba(49,49,49,0.05) 0px 1px 2px, rgba(42,42,42,0.05) 0px 2px 4px, rgba(32,32,32,0.05) 0px 4px 8px, rgba(49,49,49,0.05) 0px 8px 16px, rgba(35,35,35,0.05) 0px 16px 32px; + --navbar-menu-padding : 0.5em; + --navbar-menu-transition : all var(--duration-fast); + + /* Menu Root */ + --navbar-menu-root-background : ; + --navbar-menu-root-background--active : ; + --navbar-menu-root-background--hover : ; + --navbar-menu-root-padding : ; + + /* Menu Links */ + --navbar-menu-link-background : ; + --navbar-menu-link-background--active : ; + --navbar-menu-link-background--hover : ; + --navbar-menu-link-border-color : ; + --navbar-menu-link-border-color--active : ; + --navbar-menu-link-border-color--hover : ; + --navbar-menu-link-border-radius : ; + --navbar-menu-link-border-style : solid; + --navbar-menu-link-border-style--active : ; + --navbar-menu-link-border-style--hover : ; + --navbar-menu-link-border-width : ; + --navbar-menu-link-color : ; + --navbar-menu-link-color--active : ; + --navbar-menu-link-color--hover : ; + --navbar-menu-link-margin : 0.75em 0.5em; + --navbar-menu-link-padding : 0.2em 0; + --navbar-menu-link-text-decoration : ; + --navbar-menu-link-text-decoration--active : ; + --navbar-menu-link-text-decoration--hover : ; + --navbar-menu-link-text-decoration-color : ; + --navbar-menu-link-text-decoration-color--active: ; + --navbar-menu-link-text-decoration-color--hover : ; +} +Copy to clipboardErrorCopied +Sidebar +Theme properties for docsify’s custom sidebar. + +/* Sidebar +============================================================================= */ +:root { + --sidebar-background : var(--base-background-color); + --sidebar-border-color : ; + --sidebar-border-width : 0; + --sidebar-padding : 0 25px; + --sidebar-transition-duration : var(--duration-fast); + --sidebar-width : 17rem; + + /* Name */ + --sidebar-name-background : ; + --sidebar-name-color : ; + --sidebar-name-font-family : ; + --sidebar-name-font-size : var(--font-size-l); + --sidebar-name-font-weight : normal; + --sidebar-name-margin : 1.5rem 0 0; + --sidebar-name-padding : ; + --sidebar-name-text-align : center; + + /* Nav Headings */ + --sidebar-nav-strong-border-color : var(--sidebar-border-color); + --sidebar-nav-strong-border-width : ; + --sidebar-nav-strong-color : var(--heading-color); + --sidebar-nav-strong-font-size : ; + --sidebar-nav-strong-font-weight : var(--strong-font-weight); + --sidebar-nav-strong-margin : 1.5em 0 0.5em; + --sidebar-nav-strong-padding : 0.25em 0; + --sidebar-nav-strong-text-transform : ; + + /* Nav Container */ + --sidebar-nav-background : ; + --sidebar-nav-indent : 1em; + --sidebar-nav-margin : 1.5rem 0 0; + --sidebar-nav-padding : ; + + /* Nav Links */ + --sidebar-nav-link-background : ; + --sidebar-nav-link-background--active : ; + --sidebar-nav-link-background--hover : ; + --sidebar-nav-link-border-color : ; + --sidebar-nav-link-border-color--active : ; + --sidebar-nav-link-border-color--hover : ; + --sidebar-nav-link-border-radius : ; + --sidebar-nav-link-border-style : solid; + --sidebar-nav-link-border-style--active : ; + --sidebar-nav-link-border-style--hover : ; + --sidebar-nav-link-border-width : 0; + --sidebar-nav-link-border-width--active : ; + --sidebar-nav-link-border-width--hover : ; + --sidebar-nav-link-color : var(--base-color); + --sidebar-nav-link-color--active : ; + --sidebar-nav-link-color--hover : ; + --sidebar-nav-link-font-weight : normal; + --sidebar-nav-link-font-weight--active : ; + --sidebar-nav-link-font-weight--hover : ; + --sidebar-nav-link-margin : ; + --sidebar-nav-link-padding : 0.25em 0; + --sidebar-nav-link-text-decoration : ; + --sidebar-nav-link-text-decoration--active : underline; + --sidebar-nav-link-text-decoration--hover : underline; + --sidebar-nav-link-text-decoration-color : ; + --sidebar-nav-link-transition : ; + + /* Nav Links - Pseudo Content */ + --sidebar-nav-link-before-content : ; + --sidebar-nav-link-before-content--active : ; + --sidebar-nav-link-before-content-l1 : ; + --sidebar-nav-link-before-content-l1--active : ; + --sidebar-nav-link-before-content-l2 : ; + --sidebar-nav-link-before-content-l2--active : ; + --sidebar-nav-link-before-content-l3 : ; + --sidebar-nav-link-before-content-l3--active : ; + --sidebar-nav-link-before-content-l4 : ; + --sidebar-nav-link-before-content-l4--active : ; + + /* Nav Links - Pseudo Style */ + --sidebar-nav-link-before-color : ; + --sidebar-nav-link-before-color--active : ; + --sidebar-nav-link-before-color-l1 : ; + --sidebar-nav-link-before-color-l1--active : ; + --sidebar-nav-link-before-color-l2 : ; + --sidebar-nav-link-before-color-l2--active : ; + --sidebar-nav-link-before-color-l3 : ; + --sidebar-nav-link-before-color-l3--active : ; + --sidebar-nav-link-before-color-l4 : ; + --sidebar-nav-link-before-color-l4--active : ; + --sidebar-nav-link-before-margin : 0 0.35em 0 0; + --sidebar-nav-link-before-margin-l1 : ; + --sidebar-nav-link-before-margin-l2 : ; + --sidebar-nav-link-before-margin-l3 : ; + --sidebar-nav-link-before-margin-l4 : ; + + /* Nav Page Links */ + --sidebar-nav-pagelink-background : ; + --sidebar-nav-pagelink-background--active : ; + --sidebar-nav-pagelink-background--collapse : ; + --sidebar-nav-pagelink-background--loaded : ; + --sidebar-nav-pagelink-padding : ; + --sidebar-nav-pagelink-transition : var(--sidebar-nav-link-transition); + + /* Toggle */ + --sidebar-toggle-background : ; + --sidebar-toggle-border-color : ; + --sidebar-toggle-border-radius : var(--border-radius-s); + --sidebar-toggle-border-style : solid; + --sidebar-toggle-border-width : 0; + --sidebar-toggle-height : 36px; + --sidebar-toggle-icon-color : var(--base-color); + --sidebar-toggle-icon-height : 10px; + --sidebar-toggle-icon-stroke-width : 1px; + --sidebar-toggle-icon-width : 16px; + --sidebar-toggle-offset-left : 0; + --sidebar-toggle-offset-top : calc(35px - (var(--sidebar-toggle-height) / 2)); + --sidebar-toggle-width : 44px; +} +Copy to clipboardErrorCopied +Plugin Styles +All docsify plugins will work with docsify-themeable, however there are two potential issues to be aware of: + +Not all plugins support multiple themes + +Plugins often inject CSS to style plugin-related elements. Ideally, a plugin’s CSS would inherit visual styles from the current theme. This isn’t always practical, so some plugins will apply visual styles intended to match a specific theme (typically the default vue.css theme). The result is color, typography, and layout styles that do not match your site theme. + +Not all plugins support theme customization + +Many docsify plugins were developed prior to the release of docsify-themeable and therefore do not offer theme customization. To address this issue, docsify-themeable provides customizable theme properties for many popular docsify plugins (below). If you would like to see theme properties added to a plugin, create a Github issue with the plugin name and a link to the source code. + +Copy Code +Theme properties for docsify-copy-code plugin. + +/* Plugin: Copy Code +============================================================================= */ +:root { + --copycode-background: #808080; + --copycode-color : #fff; +} +Copy to clipboardErrorCopied +Pagination +Theme properties for docsify-pagination plugin. + +/* Plugin: Pagination +============================================================================= */ +:root { + --pagination-border-top : 1px solid var(--mono-tint2); + --pagination-chevron-height : 0.8em; + --pagination-chevron-stroke : currentColor; + --pagination-chevron-stroke-linecap: round; + --pagination-chevron-stroke-width : 1px; + --pagination-label-color : ; + --pagination-label-font-size : var(--font-size-s); + --pagination-title-color : ; + --pagination-title-font-size : var(--font-size-l); +} +Copy to clipboardErrorCopied +Search +Theme properties for docsify’s search plugin. + +/* Plugin: Search +============================================================================= */ +:root { + --search-background : ; + --search-margin : 1.5rem 0 0; + --search-padding : ; + + /* Clear Button */ + --search-clear-icon-color1 : ; + --search-clear-icon-color2 : ; + + /* Input */ + --search-input-background-color : ; + --search-input-background-color--focus : ; + --search-input-background-image : ; + --search-input-background-image--focus : ; + --search-input-background-position : ; + --search-input-background-position--focus: ; + --search-input-background-repeat : no-repeat; + --search-input-background-size : ; + --search-input-background-size--focus : ; + --search-input-border-color : var(--mono-tint1); + --search-input-border-radius : ; + --search-input-border-width : 1px; + --search-input-color : ; + --search-input-font-size : ; + --search-input-margin : ; + --search-input-padding : 0.5em; + --search-input-placeholder-color : ; + --search-input-transition : ; + + /* Order */ + --search-flex-order : 1; + + /* Results */ + --search-result-heading-color : var(--heading-color); + --search-result-heading-font-size : var(--base-font-size); + --search-result-heading-font-weight : normal; + --search-result-heading-margin : 0 0 0.25em; + --search-result-item-border-color : var(--mono-tint2); + --search-result-item-border-style : solid; + --search-result-item-border-width : 0 0 1px 0; + --search-result-item-color : ; + --search-result-item-font-size : ; + --search-result-item-font-weight : normal; + --search-result-item-margin : ; + --search-result-item-padding : 1em 0; + --search-result-keyword-background : var(--mark-background); + --search-result-keyword-border-radius : var(--border-radius-s); + --search-result-keyword-color : var(--mark-color); + --search-result-keyword-font-weight : normal; + --search-result-keyword-margin : 0 0.1em; + --search-result-keyword-padding : 0.2em 0; +} +Copy to clipboardErrorCopied +Tabs +See the docsify-tabs site for a complete list of theme properties. + +The following theme properties overrides are included with docsify-themeable: + +/* Plugin: Docsify Tabs +============================================================================= */ +:root { + /* Tab blocks */ + --docsifytabs-border-color : var(--mono-tint2); + --docsifytabs-border-radius-px: var(--border-radius-s); + + /* Tabs */ + --docsifytabs-tab-background : var(--mono-tint3); + --docsifytabs-tab-color : var(--mono-tint1); +} +Copy to clipboardErrorCopied +Zoom Image +Theme properties for docsify’s zoom image plugin. + +/* Plugin: Zoom Image +============================================================================= */ +:root { + --zoomimage-overlay-background: rgba(0, 0, 0, 0.875); +} +Copy to clipboardErrorCopied +PrismJS +PrismJS is the syntax highlighter used by docsify for styling code blocks. Styles can be customized by setting --code theme properties listed in the Content section or by using one of the many PrismJS themes available. + +To use a PrismJS theme, add a <link> to your index.html after your site theme: + +<!-- Site theme --> +<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-defaults.min.css"> + +<!-- PrismJS theme --> +<link rel="stylesheet" href="path/to/prismjs-theme.css"> +Copy to clipboardErrorCopied +Note that only PrismJS theme colors will be applied. Layout and typography styles such as font-family, border-radius, margin and padding will continue to be applied by the site theme to maintain visual consistency. + +The theme properties that override PrismJS theme values are: + +--code-font-family +--code-font-size +--code-font-weight +--code-block-border-radius +--code-block-line-height +--code-block-margin +--code-block-padding diff --git a/public/js/plugins/time-updater.js b/public/js/plugins/time-updater.js @@ -0,0 +1,39 @@ +// Docsify plugin default values +let defaultDocsifyUpdatedOptions = { + text: ">Last Modify: {docsify-updated}", + formatUpdated: "{YYYY}/{MM}/{DD}", + whereToPlace: "bottom" +} + +// Docsify plugin functions +function plugin(hook, vm) { + let text = vm.config.timeUpdater.text + let whereToPlace = String(vm.config.timeUpdater.whereToPlace).toLowerCase() + hook.beforeEach(function (content) { + switch (whereToPlace) { + case "top": + return text + "\n\n" + content + case "bottom": + return content + "\n\n" + text + default: + return content + "\n\n" + text + } + }) +} + +// Docsify plugin options +window.$docsify = (window.$docsify || {}) +// https://docsify.js.org/#/configuration?id=formatupdated +// https://github.com/lukeed/tinydate#patterns +window.$docsify.formatUpdated = window.$docsify["timeUpdater"] ? window.$docsify["timeUpdater"].formatUpdated : defaultDocsifyUpdatedOptions.formatUpdated +window.$docsify["timeUpdater"] = Object.assign(defaultDocsifyUpdatedOptions, window.$docsify["timeUpdater"]) +window.$docsify.plugins = (window.$docsify.plugins || []).concat(plugin) + +// Usage: +// window.$docsify = { +// timeUpdater: { +// text: ">last update time: {docsify-updated}", +// formatUpdated: '{YYYY}/{MM}/{DD}', +// whereToPlace: "bottom" // top || bottom +// } +// } +\ No newline at end of file diff --git a/public/js/plugins/time-updater.md b/public/js/plugins/time-updater.md @@ -0,0 +1,193 @@ +# docsify-updated + +![npm](https://img.shields.io/npm/v/docsify-updated) ![NPM](https://img.shields.io/npm/l/docsify-updated) [![](https://data.jsdelivr.com/v1/package/npm/docsify-updated/badge?style=rounded)](https://www.jsdelivr.com/package/npm/docsify-updated) + +Add update time for each of your docsify markdown ([English](./README.md)/[中文](./zh-README.md)). + +## Install + +add js CDN to `index.html` + +```javascript +<script src="https://cdn.jsdelivr.net/npm/docsify-updated/src/time-updater.min.js"></script> +``` + +or + +```javascript +<script src="https://cdn.jsdelivr.net/npm/docsify-updated/src/time-updater.js"></script> +``` + +## Usage + +Add javasript to `index.html`, and you can modify the content of the text field arbitrarily + +```javascript +window.$docsify = { + timeUpdater: { + text: ">last update time: {docsify-updated}", + formatUpdated: "{YYYY}/{MM}/{DD}", + whereToPlace: "bottom", // "top" or "bottom", default to "bottom" + }, +}; +``` + +or + +```javascript +window.$docsify = { + timeUpdater: { + text: ">最后更新时间: {docsify-updated}", + formatUpdated: "{YYYY}/{MM}/{DD}", + whereToPlace: "bottom", // "top" or "bottom", default to "bottom" + }, +}; +``` + +## Parameter + +| Field | Describe | Detail | +| :-----------: | ----------------------------------- | ------------------------------------------------------------ | +| text | label style to show | *text* stores the style and content before the *formatUpdated* | +| formatUpdated | updated time format and it's suffix | *formatUpdated* stores time formated and it's suffix, eg. {YYYY}/{MM}/{DD} by Author | +| whereToPlace | where the label is placed | "top" or "bottom", default to "bottom" | + +## Time Patterns + +please see [https://github.com/lukeed/tinydate#patterns](https://github.com/lukeed/tinydate#patterns) + +- `{YYYY}`: full year; eg: **2017** +- `{YY}`: short year; eg: **17** +- `{MM}`: month; eg: **04** +- `{DD}`: day; eg: **01** +- `{HH}`: hours; eg: **06** (24h) +- `{mm}`: minutes; eg: **59** +- `{ss}`: seconds; eg: **09** +- `{fff}`: milliseconds; eg: **555** + +## Nested + +modify `timeUpdater.text` to nest HTML + +```javascript +window.$docsify = { + timeUpdater: { + text: "<div align='center'>last update time: {docsify-updated}</div>", + formatUpdated: "{YYYY}/{MM}/{DD}", + }, +}; +``` + +![demo1](./images/demo1.png) + +or + +```javascript +window.$docsify = { + timeUpdater: { + text: "<div align='center' width='200px' style='color:gray;font-size:10px'>-------------- 最后更新时间:&emsp;{docsify-updated} --------------</div>", + formatUpdated: "{YYYY} 年 {MM} 月 {DD} 日", + }, +}; +``` + +![demo2](./images/demo2.png) + +## Location + +choose where to place it by `timeUpdater.whereToPlace` + +```javascript +window.$docsify = { + timeUpdater: { + text: "<div align='center' width='200px' style='color:gray;font-size:10px'>-------------- 最后更新时间:&emsp;{docsify-updated} --------------</div>", + formatUpdated: "{YYYY}/{MM}/{DD}", + whereToPlace: "top" // "top" or "bottom", default to "bottom" + }, +}; +``` + +![demo3](./images/demo3.png) + +## Question + +### 1. Modify a single document, all document updated time has been modified? + +In the process of using any CI/CD method, if you automatically pull the `git` documentation and deploy `docsify`, you may encounter the `.md` file update time is set to the CI/CD time of `git clone your_repo` during this process. + +This will cause the plugin to display the wrong time when the file is updated (the plugin's display time is the last update time of each file). + +**Repair method** + +It is recommended to use `git` to fix file update times during deployment of docsify documentation (automatically or manually). + +For example to manually deploy the document: + +```shell +# clone repo +git clone https://github.com/your_repo.git + +# cd dir +cd your_repo_dir + +# repair file update time +git ls-files | while read file; do touch -d $(git log -1 --format="@%ct" "$file") "$file"; done + +# Start the docsify service +docsify serve docs/ +``` + +## Various Styles + +demo: **english** + +```javascript +window.$docsify = { + timeUpdater: { + text: ">Last Modify: {docsify-updated}", + formatUpdated: "{YYYY}/{MM}/{DD}", + }, +}; +``` + +![demo4](./images/demo4.png) + +demo: **chinese** + +```javascript +window.$docsify = { + timeUpdater: { + text: ">最后更新时间: {docsify-updated}", + formatUpdated: "{YYYY}/{MM}/{DD}", + }, +}; +``` + +![demo5](./images/demo5.png) + +demo: **another style** + +```javascript +window.$docsify = { + timeUpdater: { + text: "---\nlast update time: {docsify-updated}", + formatUpdated: "{YYYY}/{MM}/{DD}", + }, +}; +``` + +![demo6](./images/demo6.png) + +demo: **bottom left** + +```java +window.$docsify = { + timeUpdater: { + text: "<div align='left' width='200px' style='color:gray;font-size:16px'>Posted @ {docsify-updated}</div>", + formatUpdated: "{YYYY}-{MM}-{DD} {HH}:{mm}", + }, +}; +``` + +![demo7](./images/demo7.png) + diff --git a/public/js/plugins/title.js b/public/js/plugins/title.js @@ -0,0 +1,71 @@ +/** + * @license + * + * docsify-plugin-title/plugin.js REL_VER_NUMBER + * (https://github.com/Sujaykumarh/docsify-plugin-title/) + * + * Copyright (c) 2021 Sujaykumar.Hublikar <hello@sujaykumarh.com> + * Github (@sujaykumarh) + * + * Licensed under Apache License, Version 2.0 + */ + + +// javascript policy +'use strict'; + +// config options +const customPageTitleOptions = { + prefix: false, + suffix: false, + separator: '|', + debug: false, +} + +// main function +function customPageTitle(hook, vm) { + + // before hook + // hook.beforeEach(function (content) { + // }); + + // after hook + hook.doneEach(function () { + var _title = document.title; // title from docsify + + debug('customPageTitleOptions: ' + customPageTitleOptions); + debug('page title [before]: ' + document.title); + if (customPageTitleOptions.prefix != '' || customPageTitleOptions.prefix != false) { + _title = customPageTitleOptions.prefix + " " + customPageTitleOptions.separator + " " + _title; + debug('new title [prefix]:' + _title); + } + + if (customPageTitleOptions.suffix != '' || customPageTitleOptions.suffix != false) { + _title = _title + " " + customPageTitleOptions.separator + " " + customPageTitleOptions.suffix; + debug('new title [suffix]:' + _title); + } + + document.title = _title; + }); +} + +function debug(msg) { + if (customPageTitleOptions.debug) console.log('[customPageTitle] log: ' + msg); +} + +function error(msg) { + if (customPageTitleOptions.debug) console.error('[customPageTitle] err: ' + msg); +} + + +// find customPageTitle plugin options +window.$docsify.customPageTitle = Object.assign( + customPageTitleOptions, + window.$docsify.customPageTitle +); + +// Set docsify plugin +window.$docsify.plugins = [].concat( + customPageTitle, + window.$docsify.plugins +); diff --git a/public/js/plugins/title.md b/public/js/plugins/title.md @@ -0,0 +1,83 @@ +# Docsify Plugin Title + +> [!NOTE] +> v1.2.0 fixed typo [#40](https://github.com/sujaykumarh/docsify-plugin-title/issues/40) `seprator` in v1.x to `separator` as a breaking change was released earlier under v1.2.0 on 06-09-2023 and has since been unpublished as on 11-09-2023. +> Please upgrade to v2.x for typo fix + +A simple plugin to customize [docsify](https://github.com/docsifyjs/docsify/) page title + +<!--[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/sujaykumarh/docsify-plugin-title/Build%20&%20Publish%20package)](https://github.com/Sujaykumarh/docsify-plugin-title/actions)--> +[![GitHub package.json version](https://img.shields.io/github/package-json/v/sujaykumarh/docsify-plugin-title)](https://www.npmjs.com/package/@sujaykumarh/docsify-plugin-title) +[![jsDelivr hits (npm)](https://img.shields.io/jsdelivr/npm/hm/@sujaykumarh/docsify-plugin-title)](https://www.jsdelivr.com/package/npm/@sujaykumarh/docsify-plugin-title) +<br> + +# 📥 Download + +- Locally + + ```bash + npm install @sujaykumarh/docsify-plugin-title + ``` +- CDN + + ```html + <script src="//cdn.jsdelivr.net/npm/@sujaykumarh/docsify-plugin-title@2.x/dist/plugin.min.js"></script> + ``` + +<br> + +# 🧰 Configuration + +Available options + +```js +window.$docsify.customPageTitle = { + prefix: false, // [optional] title prefix. default: false eg: prefix: "Application" + suffix: false, // [optional] title suffix. default: false eg: suffix: "v1.0.0" + separator: '|', // [optional] separator for title eg: title-> prefix | title | suffix + debug: false, // [optional] should debug +} +``` + +Example: + +```html +<script> + ... + + window.$docsify.customPageTitle = { + prefix: 'Docsify', // title prefix. + suffix: 'v1.0.0', // title suffix. + } + + ... +</script> +``` + +<br> + +# 🛠️ Development + +Clone + +```bash +git clone https://github.com/sujaykumarh/docsify-plugin-title.git +``` + +install resources + +```bash +npm install +``` + +minify `src/plugin.js` to generate minified files in `dist` folder + +```bash +npm run minify # generate minified .min.js in dist +``` + +<br> + +# 📄 License + +Copyright (c) 2021 [Sujay H](https://github.com/sujaykumarh) Licensed under `Apache License v2.0` read [LICENSE](./LICENSE) diff --git a/public/js/plugins/top-banner.css b/public/js/plugins/top-banner.css @@ -0,0 +1,19 @@ +#TOPBANNER { + display: block; + height: 2rem; + width: 100%; + padding: 0 20px; + line-height: 0.1rem; + top: 0; +} +#TOPBANNER p { + margin: auto; + height: 100%; + padding: 0.5rem 0; +} + +#TOPBANNER a { + margin: auto 5px; + font-size: 1.1rem; + letter-spacing: 1px; +} diff --git a/public/js/plugins/top-banner.js b/public/js/plugins/top-banner.js @@ -0,0 +1,42 @@ +function plugin (hook, vm) { + hook.ready(function () { + const { topBanner } = vm.config + if (!topBanner) { + return + } + const defaultTag = topBanner.defaultTag || 'span' + const bannerContent = vm.compiler.compile(topBanner.content) + const backgroundColor = topBanner.backgroundColor || '#deebff' + const textColor = topBanner.textColor || '#091E42' + const linkColor = topBanner.linkColor || textColor + const textAlign = topBanner.textAlign || 'center' + const bannerPosition = topBanner.position || 'fixed' + const bannerZIndex = topBanner.zIndex || '99' + // creating the new element + const bannerElement = document.createElement(defaultTag) + bannerElement.setAttribute('id', 'TOPBANNER') + + // adding bannerElement to DOM + const placeholder = document.querySelector('body') + placeholder.insertBefore(bannerElement, placeholder.childNodes[0]) + + // add the contents + const contentEl = document.querySelector(`${defaultTag}#TOPBANNER`) + contentEl.innerHTML = bannerContent + + contentEl.style.backgroundColor = backgroundColor + contentEl.style.color = textColor + contentEl.style.position = bannerPosition + contentEl.style.Zindex = bannerZIndex + + const contentAnchorEl = document.querySelector(`${defaultTag}#TOPBANNER a`) + contentAnchorEl.style.color = linkColor + bannerElement.style.textAlign = textAlign + + contentAnchorEl.addEventListener('click', e => { + bannerElement.parentNode.removeChild(bannerElement) + }) + }) +} + +window.$docsify.plugins = [].concat(plugin, window.$docsify.plugins) diff --git a/public/js/plugins/top-banner.md b/public/js/plugins/top-banner.md @@ -0,0 +1,140 @@ +# docsify-top-banner-plugin + +Get a pretty banner probably used for notifying announcements and updates + +<p align="center"> + +<img alt="ss" src="https://imgur.com/md5J8rw.png" width="400px" /> + +</p> + +[![JavaScript Style Guide](https://cdn.rawgit.com/standard/standard/master/badge.svg)](https://github.com/standard/standard) +[![](https://data.jsdelivr.com/v1/package/npm/docsify-top-banner-plugin/badge)](https://www.jsdelivr.com/package/npm/docsify-top-banner-plugin) + +### Donation + +<a href="https://www.buymeacoffee.com/eydPs6n" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" style="height: 51px !important;width: 217px !important;" ></a> + +## Installation + +Add the following stylesheet along with your other stylesheets + +```html +<link + rel="stylesheet" + href="//cdn.jsdelivr.net/npm/docsify-top-banner-plugin@latest/dist/style.css" +/> +``` + +And add the following script + +```html +<script src="https://cdn.jsdelivr.net/npm/docsify-top-banner-plugin@latest/dist/index.js"></script> +``` + +## Configure + +In your docsify config object add the following + +```js +window.$docsify = { +... +topBanner: { + options +}, +... +} +``` + +## Options + +### `content` + +Type : `String` + +Default : none + +It is the content which will be render as the top banner + +> NOTE: it should be a single line content + +> NOTE: It cant be empty! leaving empty will simply render an empty banner + +### `defaultTag` + +Type : `String` + +Default : 'span' + +the html tag which will be added in the DOM to render the banner + +### `position` + +Type : `String` + +Default : 'fixed' + +This is the banner's CSS `position` property. + +### `backgroundColor` + +Type : `String` + +Default : `'#deebff'` + +The background color of the banner + +### `zIndex` + +Type : `String` + +Default : `99` + +The `z-index` of the banner + +> Recommended : Use position `relative` and `zIndex` = `-1` when you have repo config in your docsify + +### `textColor` + +Type : `String` + +Default : `'#091E42'` + +The primary text color of the banner + +### `linkColor` + +Type : `String` + +Default : `value of textColor` + +The primary text color of the anchor tag inside the banner + +### `textAlign` + +Type : `String` + +Default : `center` + +Alignment of the content of the banner + +## Screen Shot + +<p align="center"> + +<img alt="ss" src="https://imgur.com/iVMzbYQ.png" width="400px" /> +<br/> +<img alt="ss" src="https://imgur.com/uF8N2uf.png" width="400px" /> + +</p> + +## Contribution Guide + +- Clone the repo +- start editing on `src/index.js` and `src/style.styl` +- The build step using + - the `styl -> css` using `styl` CLI + - Optimize the generated style using `cssnano` and `postcss` + - Build the javascript using `rollup` + - optimize it using `rollup-plugin-terser` + - styling rule using `standard` diff --git a/public/js/plugins/wikilink.js b/public/js/plugins/wikilink.js @@ -0,0 +1,58 @@ +// SPDX-FileCopyrightText: (C) 2024 Alisa Lain <al1-ce@null.net> +// SPDX-License-Identifier: GPL-3.0-or-later + +'use strict'; + +/* +[[filename]] +[[filename|Link Text]] +[[filename#header|Link text]] +[[dir/file]] +*/ + +// Docsify plugin functions +function plugin(hook, vm) { + hook.afterEach(function(content) { + return content + }); + hook.beforeEach(function(markdown, next) { + var index = location.hash.lastIndexOf('/'); + var relativePath = location.hash.substring(0, index + 1); + const out = markdown.replace(/\[\[([^\[\]]+)\]\]/g, function(content) { + const innerContent = content.replace('[[', '').replace(']]', ''); + const linkAliasSps = innerContent.split('|'); // [link, alias] + // [[link|showtext]] = Create a link to the internal wiki page 'Link' with the text 'click here'. + const link = linkAliasSps.length === 2 ? `${linkAliasSps[0].trim()}` : innerContent; + var hashPath = link; + var topic = ''; + var showText = innerContent; + if (link.indexOf('#') != -1) { + const linkTopicSps = link.split('#'); // link, topic + hashPath = linkTopicSps[0]; + topic = `?id=${linkTopicSps[1]}`; + showText = `${linkAliasSps[1].trim()}`; + } + if (showText.split("|").length == 2) { showText = showText.split("|")[1]; } + hashPath = hashPath.replaceAll(' ', '_'); + topic = topic.replaceAll(' ', '-'); + if (hashPath.length == 0) { + hashPath = vm.route.path; + return `<a href="#${topic}">${showText}</a>` + } + if (hashPath.indexOf('/') === 0) { + //absolute path + return `<a href="#${hashPath}${topic}">${showText}</a>` + } else { + return `<a href="${relativePath}${hashPath}${topic}">${showText}</a>` + } + }); + + next(out); + }); +} + +if (!window.$docsify) { + console.error('This is a docsify plugin, please import the docsify library first!'); +} else { + window.$docsify.plugins = [].concat(plugin, window.$docsify.plugins); +} diff --git a/public/js/plugins/wikilink.md b/public/js/plugins/wikilink.md @@ -0,0 +1,11 @@ +# docsify-wikilink +> more of my job but setup is same + +This is a plugin allow wikilinks features for markdown files of docsify. + +add this line of code to Docsify project to install this plugin. +```html +<script src="https://cdn.jsdelivr.net/npm/docsify-wikilink@1"></script> +``` + +[preview example](https://zpengg.github.io/docsify-wikilink/#/) diff --git a/public/js/prism/bash.js b/public/js/prism/bash.js @@ -0,0 +1,238 @@ +// SPDX-FilyCopyrightText: Copyright (c) 2012 Lea Verou +// SPDX-License-Identifier: MIT + +(function (Prism) { + // $ set | grep '^[A-Z][^[:space:]]*=' | cut -d= -f1 | tr '\n' '|' + // + LC_ALL, RANDOM, REPLY, SECONDS. + // + make sure PS1..4 are here as they are not always set, + // - some useless things. + var envVars = '\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b'; + + var commandAfterHeredoc = { + pattern: /(^(["']?)\w+\2)[ \t]+\S.*/, + lookbehind: true, + alias: 'punctuation', // this looks reasonably well in all themes + inside: null // see below + }; + + var insideString = { + 'bash': commandAfterHeredoc, + 'environment': { + pattern: RegExp('\\$' + envVars), + alias: 'constant' + }, + 'variable': [ + // [0]: Arithmetic Environment + { + pattern: /\$?\(\([\s\S]+?\)\)/, + greedy: true, + inside: { + // If there is a $ sign at the beginning highlight $(( and )) as variable + 'variable': [ + { + pattern: /(^\$\(\([\s\S]+)\)\)/, + lookbehind: true + }, + /^\$\(\(/ + ], + 'number': /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/, + // Operators according to https://www.gnu.org/software/bash/manual/bashref.html#Shell-Arithmetic + 'operator': /--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/, + // If there is no $ sign at the beginning highlight (( and )) as punctuation + 'punctuation': /\(\(?|\)\)?|,|;/ + } + }, + // [1]: Command Substitution + { + pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/, + greedy: true, + inside: { + 'variable': /^\$\(|^`|\)$|`$/ + } + }, + // [2]: Brace expansion + { + pattern: /\$\{[^}]+\}/, + greedy: true, + inside: { + 'operator': /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/, + 'punctuation': /[\[\]]/, + 'environment': { + pattern: RegExp('(\\{)' + envVars), + lookbehind: true, + alias: 'constant' + } + } + }, + /\$(?:\w+|[#?*!@$])/ + ], + // Escape sequences from echo and printf's manuals, and escaped quotes. + 'entity': /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/ + }; + + Prism.languages.bash = { + 'shebang': { + pattern: /^#!\s*\/.*/, + alias: 'important' + }, + 'comment': { + pattern: /(^|[^"{\\$])#.*/, + lookbehind: true + }, + 'function-name': [ + // a) function foo { + // b) foo() { + // c) function foo() { + // but not “foo {” + { + // a) and c) + pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/, + lookbehind: true, + alias: 'function' + }, + { + // b) + pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/, + alias: 'function' + } + ], + // Highlight variable names as variables in for and select beginnings. + 'for-or-select': { + pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/, + alias: 'variable', + lookbehind: true + }, + // Highlight variable names as variables in the left-hand part + // of assignments (“=” and “+=”). + 'assign-left': { + pattern: /(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/, + inside: { + 'environment': { + pattern: RegExp('(^|[\\s;|&]|[<>]\\()' + envVars), + lookbehind: true, + alias: 'constant' + } + }, + alias: 'variable', + lookbehind: true + }, + // Highlight parameter names as variables + 'parameter': { + pattern: /(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/, + alias: 'variable', + lookbehind: true + }, + 'string': [ + // Support for Here-documents https://en.wikipedia.org/wiki/Here_document + { + pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/, + lookbehind: true, + greedy: true, + inside: insideString + }, + // Here-document with quotes around the tag + // → No expansion (so no “inside”). + { + pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/, + lookbehind: true, + greedy: true, + inside: { + 'bash': commandAfterHeredoc + } + }, + // “Normal” string + { + // https://www.gnu.org/software/bash/manual/html_node/Double-Quotes.html + pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/, + lookbehind: true, + greedy: true, + inside: insideString + }, + { + // https://www.gnu.org/software/bash/manual/html_node/Single-Quotes.html + pattern: /(^|[^$\\])'[^']*'/, + lookbehind: true, + greedy: true + }, + { + // https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html + pattern: /\$'(?:[^'\\]|\\[\s\S])*'/, + greedy: true, + inside: { + 'entity': insideString.entity + } + } + ], + 'environment': { + pattern: RegExp('\\$?' + envVars), + alias: 'constant' + }, + 'variable': insideString.variable, + 'function': { + pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/, + lookbehind: true + }, + 'keyword': { + pattern: /(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/, + lookbehind: true + }, + // https://www.gnu.org/software/bash/manual/html_node/Shell-Builtin-Commands.html + 'builtin': { + pattern: /(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/, + lookbehind: true, + // Alias added to make those easier to distinguish from strings. + alias: 'class-name' + }, + 'boolean': { + pattern: /(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/, + lookbehind: true + }, + 'file-descriptor': { + pattern: /\B&\d\b/, + alias: 'important' + }, + 'operator': { + // Lots of redirections here, but not just that. + pattern: /\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/, + inside: { + 'file-descriptor': { + pattern: /^\d/, + alias: 'important' + } + } + }, + 'punctuation': /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/, + 'number': { + pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/, + lookbehind: true + } + }; + + commandAfterHeredoc.inside = Prism.languages.bash; + + /* Patterns in command substitution. */ + var toBeCopied = [ + 'comment', + 'function-name', + 'for-or-select', + 'assign-left', + 'parameter', + 'string', + 'environment', + 'function', + 'keyword', + 'builtin', + 'boolean', + 'file-descriptor', + 'operator', + 'punctuation', + 'number' + ]; + var inside = insideString.variable[1].inside; + for (var i = 0; i < toBeCopied.length; i++) { + inside[toBeCopied[i]] = Prism.languages.bash[toBeCopied[i]]; + } + + Prism.languages.sh = Prism.languages.bash; + Prism.languages.shell = Prism.languages.bash; +}(Prism)); diff --git a/public/js/prism/d.js b/public/js/prism/d.js @@ -0,0 +1,87 @@ +// SPDX-FilyCopyrightText: Copyright (c) 2012 Lea Verou +// SPDX-License-Identifier: MIT + +Prism.languages.d = Prism.languages.extend('clike', { + 'comment': [ + { + // Shebang + pattern: /^\s*#!.+/, + greedy: true + }, + { + pattern: RegExp(/(^|[^\\])/.source + '(?:' + [ + // /+ comment +/ + // Allow one level of nesting + /\/\+(?:\/\+(?:[^+]|\+(?!\/))*\+\/|(?!\/\+)[\s\S])*?\+\//.source, + // // comment + /\/\/.*/.source, + // /* comment */ + /\/\*[\s\S]*?\*\//.source + ].join('|') + ')'), + lookbehind: true, + greedy: true + } + ], + 'string': [ + { + pattern: RegExp([ + // r"", x"" + /\b[rx]"(?:\\[\s\S]|[^\\"])*"[cwd]?/.source, + + // q"[]", q"()", q"<>", q"{}" + /\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/.source, + + // q"IDENT + // ... + // IDENT" + /\bq"((?!\d)\w+)$[\s\S]*?^\1"/.source, + + // q"//", q"||", etc. + // eslint-disable-next-line regexp/strict + /\bq"(.)[\s\S]*?\2"/.source, + + // eslint-disable-next-line regexp/strict + /(["`])(?:\\[\s\S]|(?!\3)[^\\])*\3[cwd]?/.source + ].join('|'), 'm'), + greedy: true + }, + { + pattern: /\bq\{(?:\{[^{}]*\}|[^{}])*\}/, + greedy: true, + alias: 'token-string' + } + ], + + // In order: $, keywords and special tokens, globally defined symbols + 'keyword': /\$|\b(?:__(?:(?:DATE|EOF|FILE|FUNCTION|LINE|MODULE|PRETTY_FUNCTION|TIMESTAMP|TIME|VENDOR|VERSION)__|gshared|parameters|traits|vector)|abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|dstring|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|ptrdiff_t|public|pure|real|ref|return|scope|shared|short|size_t|static|string|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|wstring)\b/, + + 'number': [ + // The lookbehind and the negative look-ahead try to prevent bad highlighting of the .. operator + // Hexadecimal numbers must be handled separately to avoid problems with exponent "e" + /\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]{0,4}/i, + { + pattern: /((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]{0,4}/i, + lookbehind: true + } + ], + + 'operator': /\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/ +}); + +Prism.languages.insertBefore('d', 'string', { + // Characters + // 'a', '\\', '\n', '\xFF', '\377', '\uFFFF', '\U0010FFFF', '\quot' + 'char': /'(?:\\(?:\W|\w+)|[^\\])'/ +}); + +Prism.languages.insertBefore('d', 'keyword', { + 'property': /\B@\w*/ +}); + +Prism.languages.insertBefore('d', 'function', { + 'register': { + // Iasm registers + pattern: /\b(?:[ABCD][LHX]|E?(?:BP|DI|SI|SP)|[BS]PL|[ECSDGF]S|CR[0234]|[DS]IL|DR[012367]|E[ABCD]X|X?MM[0-7]|R(?:1[0-5]|[89])[BWD]?|R[ABCD]X|R[BS]P|R[DS]I|TR[3-7]|XMM(?:1[0-5]|[89])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/, + alias: 'variable' + } +}); diff --git a/public/js/prism/json.js b/public/js/prism/json.js @@ -0,0 +1,30 @@ +// SPDX-FilyCopyrightText: Copyright (c) 2012 Lea Verou +// SPDX-License-Identifier: MIT + +// https://www.json.org/json-en.html +Prism.languages.json = { + 'property': { + pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/, + lookbehind: true, + greedy: true + }, + 'string': { + pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/, + lookbehind: true, + greedy: true + }, + 'comment': { + pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, + greedy: true + }, + 'number': /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, + 'punctuation': /[{}[\],]/, + 'operator': /:/, + 'boolean': /\b(?:false|true)\b/, + 'null': { + pattern: /\bnull\b/, + alias: 'keyword' + } +}; + +Prism.languages.webmanifest = Prism.languages.json; diff --git a/public/wiki/A_Topic.md b/public/wiki/A_Topic.md diff --git a/public/wiki/BJapan.md b/public/wiki/BJapan.md diff --git a/public/wiki/CNameless_Rumia.md b/public/wiki/CNameless_Rumia.md diff --git a/public/wiki/Fsome.md b/public/wiki/Fsome.md diff --git a/public/wiki/wiki.md b/public/wiki/wiki.md @@ -0,0 +1,59 @@ +From Wikipedia, the free encyclopedia +For the concept in semiotics, see Hypertext (semiotics). + +Visual abstraction of several documents being connected by hyperlinks + +Information mapping +Topics and fields +Business decision mappingData visualizationGraphic communicationInfographicsInformation designKnowledge visualizationMental modelMorphological analysisOntology (information science)Schema (psychology)Visual analyticsVisual language +Node–link approaches +Argument mapCladisticsCognitive mapConcept latticeConcept mapConceptual graphDecision treeDendrogramGraph drawingHyperbolic treeHypertextIssue mapIssue treeLayered graph drawingMind mapObject-role modelingOrganizational chartPathfinder networkRadial treeSemantic networkSociogramTimelineTopic mapTree structureZigZag +See also +Design rationaleDiagrammatic reasoningEntity–relationship modelGeovisualizationList of concept- and mind-mapping softwareOlogOntology (philosophy)Problem structuring methodsSemantic WebTreemappingWicked problem +vte + +Engineer Vannevar Bush wrote "As We May Think" in July of 1945 in which he described the Memex, a theoretical proto-hypertext device which in turn helped inspire the subsequent invention of hypertext. + +Douglas Engelbart in 2009, at the 40th anniversary celebrations of "The Mother of All Demos" in San Francisco, a 90-minute 1968 presentation of the NLS computer system which was a combination of hardware and software that demonstrated many hypertext ideas +Hypertext is text displayed on a computer display or other electronic devices with references (hyperlinks) to other text that the reader can immediately access.[1] Hypertext documents are interconnected by hyperlinks, which are typically activated by a mouse click, keypress set, or screen touch. Apart from text, the term "hypertext" is also sometimes used to describe tables, images, and other presentational materials with integrated hyperlinks. Hypertext is one of the key underlying concepts of the World Wide Web,[2] where Web pages are often written in the Hypertext Markup Language (HTML). As implemented on the Web, hypertext enables the easy-to-use publication of information over the Internet. + +Etymology[edit] +"(...)'Hypertext' is a recent coinage. 'Hyper-' is used in the mathematical sense of extension and generality (as in 'hyperspace,' 'hypercube') rather than the medical sense of 'excessive' ('hyperactivity'). There is no implication about size— a hypertext could contain only 500 words or so. 'Hyper-' refers to structure and not size." + +— Theodor H. Nelson, Brief Words on the Hypertext, 23 January 1967 +The English prefix "hyper-" comes from the Greek prefix "ὑπερ-" and means "over" or "beyond"; it has a common origin with the prefix "super-" which comes from Latin. It signifies the overcoming of the previous linear constraints of written text. + +The term "hypertext" is often used where the term "hypermedia" might seem appropriate. + +In 1992, author Ted Nelson – who coined both terms in 1963 [3][4]– wrote: + +By now the word "hypertext" has become generally accepted for branching and responding text, but the corresponding word "hypermedia", meaning complexes of branching and responding graphics, movies and sound – as well as text – is much less used. Instead they use the strange term "interactive multimedia": this is four syllables longer, and does not express the idea of extending hypertext. + +— Nelson, Literary Machines, 1992 +Types and uses of hypertext[edit] +Hypertext documents can either be static (prepared and stored in advance) or dynamic (continually changing in response to user input, such as dynamic web pages). Static hypertext can be used to cross-reference collections of data in documents, software applications, or books on CDs. A well-constructed system can also incorporate other user-interface conventions, such as menus and command lines. Links used in a hypertext document usually replace the current piece of hypertext with the destination document. A lesser known feature is StretchText, which expands or contracts the content in place, thereby giving more control to the reader in determining the level of detail of the displayed document. Some implementations support transclusion, where text or other content is included by reference and automatically rendered in place. + +Hypertext can be used to support very complex and dynamic systems of linking and cross-referencing. The most famous implementation of hypertext is the World Wide Web, written in the final months of 1990 and released on the Internet in 1991. + +History[edit] +Main articles: History of hypertext and Timeline of hypertext technology +See also: National Physical Laboratory (United Kingdom) § Scrapbook +Part of a series on +Anthropology of nature, +science, and technology +show +Basic concepts +show +Major theorists +hide +Related articles +Capitalist Realism (2009)Cultural ecologyCybernetic Culture Research Unit (CCRU)CybertextCyborg anthropologyDigital anthropologyEcological anthropologyEnvironmental anthropologyFanged Noumena (2011)Hari KunzruHypermediaHypertextHypertext fictionLiterary Machines (1981)Political ecologyRave cultureScience, technology and society +Social and cultural anthropology +vte +In 1941, Jorge Luis Borges published "The Garden of Forking Paths", a short story that is often considered an inspiration for the concept of hypertext.[5] + +In 1945, Vannevar Bush wrote an article in The Atlantic Monthly called "As We May Think", about a futuristic proto-hypertext device he called a Memex. A Memex would hypothetically store — and record — content on reels of microfilm, using electric photocells to read coded symbols recorded next to individual microfilm frames while the reels spun at high speed, and stopping on command. The coded symbols would enable the Memex to index, search, and link content to create and follow associative trails. Because the Memex was never implemented and could only link content in a relatively crude fashion — by creating chains of entire microfilm frames — the Memex is regarded only as a proto-hypertext device, but it is fundamental to the history of hypertext because it directly inspired the invention of hypertext by Ted Nelson and Douglas Engelbart. + + +Ted Nelson gives a presentation on Project Xanadu, a theoretical hypertext model conceived in the 1960s whose first and incomplete implementation was first published in 1998.[6] +In 1965, Ted Nelson coined the terms 'hypertext' and 'hypermedia' as part of a model he developed for creating and using linked content (first published reference 1965).[7] He later worked with Andries van Dam to develop the Hypertext Editing System (text editing) in 1967 at Brown University. It was implemented using the terminal IBM 2250 with a light pen which was provided as a pointing device.[8] By 1976, its successor FRESS was used in a poetry class in which students could browse a hyperlinked set of poems and discussion by experts, faculty and other students, in what was arguably the world's first online scholarly community[9] which van Dam says "foreshadowed wikis, blogs and communal documents of all kinds".[10] Ted Nelson said in the 1960s that he began implementation of a hypertext system he theorized, which was named Project Xanadu, but his first and incomplete public release was finished much later, in 1998.[6] During this period, Nelson also proposed using Vladimir Nabokov’s 1962 novel Pale Fire as part of a demonstration to IBM, intending to show how hypertext could support complex, non-linear forms of literary analysis. The novel, structured as a long poem with an extensive, self-referential commentary and index, embodied the principles of associative linking and user-directed navigation that Nelson believed defined hypertext.[11] Its layered design enabled readers to follow multiple interpretive paths through the text, resembling the branching structures later implemented in digital hypertext systems. However, IBM chose a more technically conventional presentation, and the literary demonstration was never realized.[12]