From 90184ca3e7049188709bb804119833a6bfd263d4 Mon Sep 17 00:00:00 2001 From: Dillon Date: Wed, 15 Apr 2020 15:46:50 +0800 Subject: [PATCH] feat(search): add local search (#231) * feat(search): add local search * docs: add docs for search --- README.md | 20 +- README.zh-cn.md | 8 +- archetypes/default.md | 1 + assets/css/_core/_base.scss | 34 +- assets/css/_core/_layout.scss | 8 - assets/css/_core/_media.scss | 20 +- assets/css/_mixin/_blur.scss | 5 + assets/css/_mixin/_compatibility.scss | 69 + assets/css/_mixin/_index.scss | 2 + assets/css/_mixin/_link.scss | 4 +- assets/css/_mixin/_summary.scss | 13 +- assets/css/_page/_404.scss | 2 +- assets/css/_page/_home.scss | 28 +- assets/css/_page/_index.scss | 2 + assets/css/_page/_single.scss | 49 +- assets/css/_partial/_archive/_tags.scss | 13 +- assets/css/_partial/_archive/_terms.scss | 9 +- assets/css/_partial/_fixed-button.scss | 10 +- assets/css/_partial/_footer.scss | 23 +- assets/css/_partial/_header.scss | 408 +++- assets/css/_partial/_mask.scss | 16 + assets/css/_partial/_pagination.scss | 14 +- assets/css/_partial/_single/_admonition.scss | 4 +- assets/css/_partial/_single/_code.scss | 18 +- assets/css/_partial/_single/_footer.scss | 23 +- assets/css/_partial/_single/_instagram.scss | 2 +- assets/css/_partial/_single/_toc.scss | 18 +- assets/css/_variables.scss | 17 +- assets/js/theme.min.js | 3 +- assets/js/theme.min.js.map | 2 +- assets/lib/VERSION | 9 +- .../algoliasearch-lite.umd.min.js | 2 + assets/lib/aplayer/dark.scss | 2 +- assets/lib/autocomplete/autocomplete.min.js | 7 + assets/lib/lunr/lunr.fr.js | 703 +++++++ assets/lib/lunr/lunr.min.js | 6 + assets/lib/lunr/lunr.segmentit.js | 174 ++ assets/lib/lunr/lunr.stemmer.support.js | 304 +++ assets/lib/lunr/lunr.zh.js | 141 ++ assets/lib/mermaid/mermaid.scss | 2 +- assets/lib/polyfill.yml | 8 + assets/lib/smooth-scroll/smooth-scroll.min.js | 2 + .../smooth-scroll.polyfills.min.js | 2 - assets/lib/valine/valine.scss | 2 +- exampleSite/config.toml | 53 +- exampleSite/content/about.en.md | 13 +- exampleSite/content/about.fr.md | 13 +- exampleSite/content/about.zh-cn.md | 7 +- .../posts/theme-documentation-basics.en.md | 87 +- .../posts/theme-documentation-basics.fr.md | 87 +- .../posts/theme-documentation-basics.zh-cn.md | 84 +- .../posts/theme-documentation-content.en.md | 6 + .../posts/theme-documentation-content.fr.md | 6 + .../theme-documentation-content.zh-cn.md | 13 +- ...documentation-extended-shortcodes.zh-cn.md | 14 - i18n/en.toml | 15 + i18n/fr.toml | 23 + i18n/zh-CN.toml | 23 + layouts/404.html | 13 +- layouts/_default/baseof.html | 21 +- layouts/_default/single.html | 2 +- layouts/_default/summary.html | 2 +- layouts/index.json | 15 + layouts/partials/assets.html | 253 +-- layouts/partials/comment.html | 218 +-- .../{single => function}/content.html | 2 +- layouts/partials/function/id.html | 2 +- layouts/partials/head/link.html | 31 +- layouts/partials/header.html | 100 +- layouts/partials/plugin/script.html | 24 +- layouts/partials/plugin/stylesheet.html | 28 +- layouts/posts/single.html | 19 +- layouts/shortcodes/mapbox.html | 2 +- package-lock.json | 1723 +++++++++++++++-- package.json | 24 +- ...s_90197bdac482216ecaaaae0fb88517c1.content | 3 - ...s_b8ba9a60a151126bfcde1421dc0b972d.content | 3 + ...css_b8ba9a60a151126bfcde1421dc0b972d.json} | 0 ...s_4fddb88d50abca04f2e7ef77f0bb1c3b.content | 3 - ...scss_4fddb88d50abca04f2e7ef77f0bb1c3b.json | 1 - ...s_be0d6bec1a51ff037db8cc74d6ec1271.content | 3 + ...scss_be0d6bec1a51ff037db8cc74d6ec1271.json | 1 + ...s_43d09a0fb297c4cc88d4122515a2e889.content | 3 + ...scss_43d09a0fb297c4cc88d4122515a2e889.json | 1 + ...s_4fddb88d50abca04f2e7ef77f0bb1c3b.content | 3 - ...scss_4fddb88d50abca04f2e7ef77f0bb1c3b.json | 1 - ...s_4fddb88d50abca04f2e7ef77f0bb1c3b.content | 3 - ...scss_4fddb88d50abca04f2e7ef77f0bb1c3b.json | 1 - ...s_c443f4e76f09daefa6d3fafd13c88b9c.content | 3 + ...scss_c443f4e76f09daefa6d3fafd13c88b9c.json | 1 + src/js/theme.js | 847 +++++--- src/lib/lunr.segmentit.js | 8 + 92 files changed, 4823 insertions(+), 1194 deletions(-) create mode 100644 assets/css/_mixin/_blur.scss create mode 100644 assets/css/_mixin/_compatibility.scss create mode 100644 assets/css/_partial/_mask.scss create mode 100644 assets/lib/algoliasearch/algoliasearch-lite.umd.min.js create mode 100644 assets/lib/autocomplete/autocomplete.min.js create mode 100644 assets/lib/lunr/lunr.fr.js create mode 100644 assets/lib/lunr/lunr.min.js create mode 100644 assets/lib/lunr/lunr.segmentit.js create mode 100644 assets/lib/lunr/lunr.stemmer.support.js create mode 100644 assets/lib/lunr/lunr.zh.js create mode 100644 assets/lib/polyfill.yml create mode 100644 assets/lib/smooth-scroll/smooth-scroll.min.js delete mode 100755 assets/lib/smooth-scroll/smooth-scroll.polyfills.min.js create mode 100644 layouts/index.json rename layouts/partials/{single => function}/content.html (92%) delete mode 100644 resources/_gen/assets/scss/css/style.template.scss_90197bdac482216ecaaaae0fb88517c1.content create mode 100644 resources/_gen/assets/scss/css/style.template.scss_b8ba9a60a151126bfcde1421dc0b972d.content rename resources/_gen/assets/scss/css/{style.template.scss_90197bdac482216ecaaaae0fb88517c1.json => style.template.scss_b8ba9a60a151126bfcde1421dc0b972d.json} (100%) delete mode 100644 resources/_gen/assets/scss/lib/aplayer/dark.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.content delete mode 100644 resources/_gen/assets/scss/lib/aplayer/dark.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.json create mode 100644 resources/_gen/assets/scss/lib/aplayer/dark.scss_be0d6bec1a51ff037db8cc74d6ec1271.content create mode 100644 resources/_gen/assets/scss/lib/aplayer/dark.scss_be0d6bec1a51ff037db8cc74d6ec1271.json create mode 100644 resources/_gen/assets/scss/lib/mermaid/mermaid.scss_43d09a0fb297c4cc88d4122515a2e889.content create mode 100644 resources/_gen/assets/scss/lib/mermaid/mermaid.scss_43d09a0fb297c4cc88d4122515a2e889.json delete mode 100644 resources/_gen/assets/scss/lib/mermaid/mermaid.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.content delete mode 100644 resources/_gen/assets/scss/lib/mermaid/mermaid.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.json delete mode 100644 resources/_gen/assets/scss/lib/valine/valine.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.content delete mode 100644 resources/_gen/assets/scss/lib/valine/valine.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.json create mode 100644 resources/_gen/assets/scss/lib/valine/valine.scss_c443f4e76f09daefa6d3fafd13c88b9c.content create mode 100644 resources/_gen/assets/scss/lib/valine/valine.scss_c443f4e76f09daefa6d3fafd13c88b9c.json create mode 100644 src/lib/lunr.segmentit.js diff --git a/README.md b/README.md index 3e756c2e..bec20604 100644 --- a/README.md +++ b/README.md @@ -32,9 +32,10 @@ Compared to the original LeaveIt theme and the KeepIt theme, the LoveIt theme ha * Some beautiful **CSS animations** * Easy-to-use and self-expanding **table of contents** * More **social links**, **share sites** and **comment system** -* Extended markdown syntax for **[Font Awesome](https://fontawesome.com/) icons** -* Extended markdown syntax for **ruby annotation** -* Extended markdown syntax for **fraction** +* **Search** supported by [Lunr.js](https://lunrjs.com/) or [algolia](https://www.algolia.com/) +* Extended Markdown syntax for **[Font Awesome](https://fontawesome.com/) icons** +* Extended Markdown syntax for **ruby annotation** +* Extended Markdown syntax for **fraction** * **Mathematical formula** supported by [KaTeX](https://katex.org/) * **Diagram syntax** shortcode supported by [mermaid](https://github.com/knsv/mermaid) * **Interactive data visualization** shortcode supported by [ECharts](https://echarts.apache.org/) @@ -89,11 +90,12 @@ I hope you will LoveIt ❤️! ### Extended Features +* **Search** supported by [Lunr.js](https://lunrjs.com/) or [algolia](https://www.algolia.com/) * Automatically **highlighting** code * **Images gallery** supported by [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) -* Extended markdown syntax for **[Font Awesome](https://fontawesome.com/) icons** -* Extended markdown syntax for **ruby annotation** -* Extended markdown syntax for **fraction** +* Extended Markdown syntax for **[Font Awesome](https://fontawesome.com/) icons** +* Extended Markdown syntax for **ruby annotation** +* Extended Markdown syntax for **fraction** * **Mathematical formula** supported by [KaTeX](https://katex.org/) * **Diagrams** shortcode supported by [mermaid](https://github.com/knsv/mermaid) * **Interactive data visualization** shortcode supported by [ECharts](https://echarts.apache.org/) @@ -128,9 +130,13 @@ Thanks to the authors of following resources included in the theme: * [Font Awesome](https://fontawesome.com/) * [Fork Awesome](https://forkaweso.me/Fork-Awesome/) * [Animate.css](https://daneden.github.io/animate.css/) +* [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll) +* [autocomplete.js](https://github.com/algolia/autocomplete.js) +* [Lunr.js](https://lunrjs.com/) +* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript) +* [Sharer.js](https://github.com/ellisonleao/sharer.js) * [lazysizes](https://github.com/aFarkas/lazysizes) * [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) -* [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll) * [TypeIt](https://typeitjs.com/) * [KaTeX](https://katex.org/) * [mermaid](https://github.com/knsv/mermaid) diff --git a/README.zh-cn.md b/README.zh-cn.md index b0f57320..539806a0 100644 --- a/README.zh-cn.md +++ b/README.zh-cn.md @@ -31,6 +31,7 @@ * 一些美观的 **CSS 动画** * 易用和自动展开的**文章目录** * 支持更多的**社交链接**、**网站分享**和**评论系统** +* 支持基于 [Lunr.js](https://lunrjs.com/) 或 [algolia](https://www.algolia.com/) 的**搜索** * 支持基于 **[Font Awesome](https://fontawesome.com/) 图标**的扩展 Markdown 语法 * 支持**上标注释**的扩展 Markdown 语法 * 支持**分数**的扩展 Markdown 语法 @@ -84,6 +85,7 @@ ### 扩展功能 +* 支持基于 [Lunr.js](https://lunrjs.com/) 或 [algolia](https://www.algolia.com/) 的**搜索** * 支持**代码高亮** * 支持基于 [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) 的**图片画廊** * 支持 **[Font Awesome](https://fontawesome.com/) 图标**的扩展 Markdown 语法 @@ -123,9 +125,13 @@ LoveIt 主题中用到了以下项目,感谢它们的作者: * [Font Awesome](https://fontawesome.com/) * [Fork Awesome](https://forkaweso.me/Fork-Awesome/) * [Animate.css](https://daneden.github.io/animate.css/) +* [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll) +* [autocomplete.js](https://github.com/algolia/autocomplete.js) +* [Lunr.js](https://lunrjs.com/) +* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript) +* [Sharer.js](https://github.com/ellisonleao/sharer.js) * [lazysizes](https://github.com/aFarkas/lazysizes) * [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) -* [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll) * [TypeIt](https://typeitjs.com/) * [KaTeX](https://katex.org/) * [mermaid](https://github.com/knsv/mermaid) diff --git a/archetypes/default.md b/archetypes/default.md index 6036b1f5..fc3ba0dd 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -12,6 +12,7 @@ license: "" tags: [] categories: [] hiddenFromHomePage: false +hiddenFromSearch: false featuredImage: "" featuredImagePreview: "" diff --git a/assets/css/_core/_base.scss b/assets/css/_core/_base.scss index 9bd8e342..de905e94 100644 --- a/assets/css/_core/_base.scss +++ b/assets/css/_core/_base.scss @@ -9,8 +9,8 @@ html { /* scrollbar, only support webkit */ ::-webkit-scrollbar { - width: 6px; - height: 6px; + width: .5rem; + height: .5rem; } ::-webkit-scrollbar-thumb { @@ -22,44 +22,26 @@ html { } ::selection { - background: $selection-color; + background-color: $selection-color; - .dark-theme & { - background: $selection-color-dark; + .dark & { + background-color: $selection-color-dark; } } body { - -webkit-font-smoothing: subpixel-antialiased; background-color: $global-background-color; color: $global-font-color; overflow-wrap: break-word; - &::before { - content: ""; - background-repeat: no-repeat; - background-position: center; - opacity: 0.05; - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: -1; - -webkit-filter: grayscale(100%); - -moz-filter: grayscale(100%); - -ms-filter: grayscale(100%); - -o-filter: grayscale(100%); - filter: grayscale(100%); - filter: gray; - } - - &.dark-theme { + &.dark { color: $global-font-color-dark; background-color: $global-background-color-dark; } } +@import "../_partial/mask"; + a { text-decoration: none; } diff --git a/assets/css/_core/_layout.scss b/assets/css/_core/_layout.scss index 03206e88..d2e92f76 100644 --- a/assets/css/_core/_layout.scss +++ b/assets/css/_core/_layout.scss @@ -14,11 +14,3 @@ } } } - -.footer { - height: 2rem; - width: 100%; - text-align: center; - line-height: 1.5rem; - padding-top: 2rem; -} diff --git a/assets/css/_core/_media.scss b/assets/css/_core/_media.scss index e2113a44..4d02c4e0 100644 --- a/assets/css/_core/_media.scss +++ b/assets/css/_core/_media.scss @@ -11,16 +11,16 @@ } @media only screen and (max-width: 960px) { - .page { - max-width: 80%; + #toc-auto { + display: none; + } - #toc-auto { - display: none; - } + #toc-static { + display: block; + } - #toc-static { - display: block; - } + .page { + max-width: 80%; } } @@ -33,6 +33,10 @@ display: block; } + body.blur { + overflow: hidden; + } + .page { max-width: 100%; padding-top: $page-padding-top-mobile; diff --git a/assets/css/_mixin/_blur.scss b/assets/css/_mixin/_blur.scss new file mode 100644 index 00000000..d68ac171 --- /dev/null +++ b/assets/css/_mixin/_blur.scss @@ -0,0 +1,5 @@ +@mixin blur { + .blur & { + @include filter(blur(1.5px)); + } +} diff --git a/assets/css/_mixin/_compatibility.scss b/assets/css/_mixin/_compatibility.scss new file mode 100644 index 00000000..8e1e4d33 --- /dev/null +++ b/assets/css/_mixin/_compatibility.scss @@ -0,0 +1,69 @@ +@mixin border-radius($value) { + -webkit-border-radius: $value; + -moz-border-radius: $value; + border-radius: $value; +} + +@mixin box-shadow($value) { + -webkit-box-shadow: $value; + box-shadow: $value; +} + +@mixin transition($values...) { + -webkit-transition: $values; + -moz-transition: $values; + -o-transition: $values; + transition: $values; +} + +@mixin transform($value) { + -webkit-transform: $value; + -moz-transform: $value; + -ms-transform: $value; + -o-transform: $value; + transform: $value; +} + +@mixin filter($value) { + -webkit-filter: $value; + -moz-filter: $value; + -ms-filter: $value; + filter: $value; +} + +@mixin flex($value) { + -webkit-flex: $value; + flex: $value; +} + +@mixin box($orient) { + display: -moz-box; + display: -webkit-box; + display: box; + + -moz-box-orient: $orient; + -webkit-box-orient: $orient; + box-orient: $orient; +} + +@mixin placeholder($color) { + input::-webkit-input-placeholder{ + color: $color; + } + + input:-moz-placeholder{ + color: $color; + } + + input::-moz-placeholder{ + color: $color; + } + + input:-ms-input-placeholder{ + color: $color; + } + + input::placeholder { + color: $color; + } +} diff --git a/assets/css/_mixin/_index.scss b/assets/css/_mixin/_index.scss index 34ffd188..63e1ab32 100644 --- a/assets/css/_mixin/_index.scss +++ b/assets/css/_mixin/_index.scss @@ -1,2 +1,4 @@ +@import "_compatibility"; @import "_link"; +@import "_blur"; @import "_summary"; diff --git a/assets/css/_mixin/_link.scss b/assets/css/_mixin/_link.scss index 057949f6..1ee219a2 100644 --- a/assets/css/_mixin/_link.scss +++ b/assets/css/_mixin/_link.scss @@ -2,7 +2,7 @@ a { color: if($light, $global-link-color, $single-link-color); - .dark-theme & { + .dark & { color: if($dark, $global-link-color-dark, $single-link-color-dark); } @@ -10,7 +10,7 @@ &:hover { color: if($light, $global-link-hover-color, $single-link-hover-color); - .dark-theme & { + .dark & { color: if($dark, $global-link-hover-color-dark, $single-link-hover-color-dark); } } diff --git a/assets/css/_mixin/_summary.scss b/assets/css/_mixin/_summary.scss index 82b28dcc..904abfc3 100644 --- a/assets/css/_mixin/_summary.scss +++ b/assets/css/_mixin/_summary.scss @@ -5,7 +5,7 @@ color: $global-font-color; border-bottom: 1px dashed $global-border-color; - .dark-theme & { + .dark & { color: $global-font-color-dark; border-bottom: 1px dashed $global-border-color-dark; } @@ -33,10 +33,7 @@ } .content { - display: -moz-box; - display: -webkit-box; - -moz-box-orient: vertical; - -webkit-box-orient: vertical; + @include box(vertical); -webkit-line-clamp: 3; margin-top: .3rem; width: 100%; @@ -45,7 +42,7 @@ overflow-wrap: break-word; color: $global-font-secondary-color; - .dark-theme & { + .dark & { color: $global-font-secondary-color-dark; } @@ -76,7 +73,7 @@ margin-right: .3125rem; color: $global-link-color; - .dark-theme & { + .dark & { color: $global-link-color-dark; } } @@ -93,7 +90,7 @@ @include link(true, true); b, strong { - .dark-theme & { + .dark & { color: $global-font-secondary-color-dark; } } diff --git a/assets/css/_page/_404.scss b/assets/css/_page/_404.scss index 4b2790f0..774c7dd2 100644 --- a/assets/css/_page/_404.scss +++ b/assets/css/_page/_404.scss @@ -1,6 +1,6 @@ #content-404 { font-size: 1.8rem; line-height: 3rem; - transform: translateY(30vh); + @include transform(translateY(30vh)); text-align: center; } diff --git a/assets/css/_page/_home.scss b/assets/css/_page/_home.scss index 3e74babb..247b3831 100644 --- a/assets/css/_page/_home.scss +++ b/assets/css/_page/_home.scss @@ -1,13 +1,8 @@ -/** Home **/ @mixin page-home($profile, $posts) { .home { @if $profile { .home-profile { - -webkit-transform: translateY(if($posts, 0, 16vh)); - -moz-transform: translateY(if($posts, 0, 16vh)); - -ms-transform: translateY(if($posts, 0, 16vh)); - -o-transform: translateY(if($posts, 0, 16vh)); - transform: translateY(if($posts, 0, 16vh)); + @include transform(translateY(if($posts, 0, 16vh))); padding: if($posts, 2rem, 0) 0 .5rem; text-align: center; @@ -15,27 +10,18 @@ padding: 0.6rem; img { + display: inline-block; width: if($posts, 6rem, 8rem); height: auto; - display: inline-block; - -webkit-border-radius: 100%; - border-radius: 100%; - -webkit-box-shadow: 0 0 0 0.3618em rgba(0, 0, 0, 0.05); - box-shadow: 0 0 0 0.3618em rgba(0, 0, 0, 0.05); margin: 0 auto; - -webkit-transition: all ease 0.4s; - -moz-transition: all ease 0.4s; - -o-transition: all ease 0.4s; - transition: all ease 0.4s; + @include border-radius(100%); + @include box-shadow(0 0 0 .3618em rgba(0, 0, 0, .05)); + @include transition(all 0.4s ease); cursor: pointer; &:hover { position: relative; - -webkit-transform: translateY(-0.75rem); - -moz-transform: translateY(-0.75rem); - -ms-transform: translateY(-0.75rem); - -o-transform: translateY(-0.75rem); - transform: translateY(-0.75rem); + @include transform(translateY(-.75rem)); cursor: pointer; } } @@ -70,7 +56,7 @@ padding: .4rem; color: $global-font-secondary-color; - .dark-theme & { + .dark & { color: $global-font-secondary-color-dark; } } diff --git a/assets/css/_page/_index.scss b/assets/css/_page/_index.scss index ed901f89..c4b46366 100644 --- a/assets/css/_page/_index.scss +++ b/assets/css/_page/_index.scss @@ -4,6 +4,8 @@ max-width: 60%; margin: 0 auto; padding-top: $page-padding-top-desktop; + + @include blur; } @import "_single"; diff --git a/assets/css/_page/_single.scss b/assets/css/_page/_single.scss index 3f75ac4a..043687ae 100644 --- a/assets/css/_page/_single.scss +++ b/assets/css/_page/_single.scss @@ -1,4 +1,5 @@ -/** Single **/ +@import "../_partial/_single/toc"; + .single { .single-title { margin: 1rem 0 .5rem; @@ -22,7 +23,7 @@ display: inline-block; } - .dark-theme & { + .dark & { color: $global-font-secondary-color-dark; } @@ -45,8 +46,6 @@ } } - @import "../_partial/_single/toc"; - .content { > h2 { font-size: 1.5rem; @@ -88,7 +87,7 @@ font-weight: bold; margin: 1.2rem 0; - .dark-theme & { + .dark & { font-weight: bolder; } } @@ -103,7 +102,7 @@ margin-right: .3125rem; color: $single-link-color; - .dark-theme & { + .dark & { color: $single-link-color-dark; } } @@ -120,7 +119,7 @@ b, strong { font-weight: bold; - .dark-theme & { + .dark & { color: #ddd; } } @@ -131,12 +130,12 @@ word-break: break-all; word-break: break-word; - .dark-theme & b, .dark-theme & strong { + .dark & b, .dark & strong { color: $single-link-color-dark; } } - .dark-theme a:hover b, .dark-theme a:hover strong { + .dark a:hover b, .dark a:hover strong { color: $single-link-hover-color-dark; } @@ -153,7 +152,7 @@ color: $global-font-secondary-color; } - .dark-theme & { + .dark & { background: $code-background-color-dark; rt { @@ -168,7 +167,7 @@ &::-webkit-scrollbar { background-color: $table-background-color; - .dark-theme & { + .dark & { background-color: $table-background-color-dark; } } @@ -181,14 +180,14 @@ background: $table-background-color; border-collapse: collapse; - .dark-theme & { + .dark & { background: $table-background-color-dark; } thead { background: $table-thead-color; - .dark-theme & { + .dark & { background-color: $table-thead-color-dark; } } @@ -197,7 +196,7 @@ padding: .3rem 1rem; border: 1px double $global-border-color; - .dark-theme & { + .dark & { border: 1px double $global-border-color-dark; } } @@ -249,14 +248,14 @@ position: absolute; top: 0em; left: 50%; - transform: translate(-50%, -50%); + @include transform(translate(-50%, -50%)); width: 3rem; height: 2rem; font: 6em/1.08em 'PT Sans', sans-serif; color: $single-link-color; text-align: center; - .dark-theme & { + .dark & { color: $single-link-color-dark; } } @@ -268,12 +267,12 @@ font-size: 0.875em; color: $single-link-color; - .dark-theme & { + .dark & { color: $single-link-color-dark; } } - .dark-theme & { + .dark & { border-color: $global-border-color-dark; } } @@ -281,7 +280,7 @@ .footnotes { color: $global-font-secondary-color; - .dark-theme & { + .dark & { color: $global-font-secondary-color-dark; } @@ -304,7 +303,7 @@ border-top: 1px dashed $global-border-color; border-bottom: none; - .dark-theme & { + .dark & { border-top: 1px dashed $global-border-color-dark; } } @@ -315,19 +314,17 @@ background-color: $global-background-color; border: 1px solid $global-border-color; border-bottom-color: $global-border-color; - border-radius: 3px; - -webkit-box-shadow: inset 0 -1px 0 $global-border-color; - box-shadow: inset 0 -1px 0 $global-border-color; + @include border-radius(3px); + @include box-shadow(inset 0 -1px 0 $global-border-color); font-size: .8rem; font-family: $code-font-family; color: $code-color; - .dark-theme & { + .dark & { background-color: $global-background-color-dark; border: 1px solid $global-border-color-dark; border-bottom-color: $global-border-color-dark; - -webkit-box-shadow: inset 0 -1px 0 $global-border-color-dark; - box-shadow: inset 0 -1px 0 $global-border-color-dark; + @include box-shadow(inset 0 -1px 0 $global-border-color-dark); color: $code-color-dark; } } diff --git a/assets/css/_partial/_archive/_tags.scss b/assets/css/_partial/_archive/_tags.scss index 17d5eec1..21d9055c 100644 --- a/assets/css/_partial/_archive/_tags.scss +++ b/assets/css/_partial/_archive/_tags.scss @@ -8,25 +8,18 @@ position: relative; margin: 5px 10px; overflow-wrap: break-word; - -webkit-transition: all ease-out .3s; - -moz-transition: all ease-out .3s; - -o-transition: all ease-out .3s; - transition: all ease-out .3s; + @include transition(all ease-out 0.3s); &:active, &:focus, &:hover { - -webkit-transform: scale(1.2); - -moz-transform: scale(1.2); - -ms-transform: scale(1.2); - -o-transform: scale(1.2); - transform: scale(1.2); + @include transform(scale(1.2)); } sup { color: $global-font-secondary-color; - .dark-theme & { + .dark & { color: $global-font-secondary-color-dark; } } diff --git a/assets/css/_partial/_archive/_terms.scss b/assets/css/_partial/_archive/_terms.scss index 0288256d..d47b1a3a 100644 --- a/assets/css/_partial/_archive/_terms.scss +++ b/assets/css/_partial/_archive/_terms.scss @@ -44,7 +44,6 @@ .archive-item-link { display: inline-block; - text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -55,15 +54,11 @@ background-color: transparent; } - .dark-theme & { + .dark & { color: $global-link-color-dark; - text-decoration: none; - transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease; &:hover { color: $global-link-hover-color-dark; - text-decoration: none; - transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease; } } } @@ -73,7 +68,7 @@ text-align: right; color: $global-font-secondary-color; - .dark-theme & { + .dark & { color: $global-font-secondary-color-dark; } } diff --git a/assets/css/_partial/_fixed-button.scss b/assets/css/_partial/_fixed-button.scss index b5ec515e..531c3e1b 100644 --- a/assets/css/_partial/_fixed-button.scss +++ b/assets/css/_partial/_fixed-button.scss @@ -13,7 +13,9 @@ color: $global-font-secondary-color; background: $header-background-color; border: 1px solid darken($global-border-color, 10%); - border-radius: 2rem; + @include border-radius(2rem); + + @include blur; &:hover, &:active { color: $global-font-color; @@ -24,7 +26,7 @@ outline: none; } - .dark-theme & { + .dark & { color: $global-font-secondary-color-dark; background: $header-background-color-dark; border-color: darken($global-border-color-dark, 10%); @@ -35,11 +37,11 @@ } } -#top-button { +#back-to-top { display: block; bottom: 1.5rem; } -#comment-button { +#view-comments { bottom: 4.5rem; } diff --git a/assets/css/_partial/_footer.scss b/assets/css/_partial/_footer.scss index fe17fe02..8e51b361 100644 --- a/assets/css/_partial/_footer.scss +++ b/assets/css/_partial/_footer.scss @@ -1,12 +1,21 @@ -/**Footer**/ -.copyright { - font-size: .875rem; +footer { + height: 2rem; + width: 100%; + text-align: center; + line-height: 1.5rem; + padding-top: 2rem; - .copyright-line { - width: 100%; + .copyright { + font-size: .875rem; - .icp-br { - display: none; + .copyright-line { + width: 100%; + + .icp-br { + display: none; + } } } + + @include blur; } diff --git a/assets/css/_partial/_header.scss b/assets/css/_partial/_header.scss index 6a1bbb23..74fe1d0b 100644 --- a/assets/css/_partial/_header.scss +++ b/assets/css/_partial/_header.scss @@ -1,73 +1,169 @@ header { width: 100%; - z-index: 100; + z-index: 150; background-color: $header-background-color; - .dark-theme & { + .dark & { background-color: $header-background-color-dark; } +} - .header-title { - font-family: $header-title-font-family; - font-weight: bold; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; +.header-wrapper { + display: flex; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + width: 100%; +} + +.header-title { + font-family: $header-title-font-family; + font-weight: bold; + margin-right: .5rem; + min-width: 10%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + @include flex(10); +} + +.menu .menu-item { + position: relative; +} + +.language-select { + position: absolute; + opacity: 0; + left: 0; + top: 0; + width: 100%; + height: 100%; + + &:hover { + cursor: pointer; } +} + +.search { + position: relative; + + input { + color: transparent; + box-sizing: border-box; + height: 2.5rem; + width: 2.5rem; + @include border-radius(.5rem); + border: none; + outline: none; + background-color: $header-background-color; + vertical-align: baseline !important; + @include transition(width 0.3s ease 0s); - .menu .menu-item { - position: relative; + .dark & { + background-color: $header-background-color-dark; + } } - .language-select { + @include placeholder(transparent); + + .search-button { + margin: 0; position: absolute; - opacity: 0; - left: 0; - top: 0; - width: 100%; - height: 100%; + left: auto; + right: 1rem; + } - &:hover { - cursor: pointer; - } + .search-toggle { + left: .5rem; + right: auto; + } + + .search-loading { + display: none; } - .theme-switch i { - -webkit-transform: rotate(225deg); - -moz-transform: rotate(225deg); - -ms-transform: rotate(225deg); - -o-transform: rotate(225deg); - transform: rotate(225deg); + .search-clear { + display: none; + } + + .open &, &.mobile { + input { + color: $global-font-color; + background-color: $search-background-color; + padding: 0 2rem 0 2rem; + } + + .dark & { + input { + color: $global-font-color-dark; + background-color: $search-background-color-dark; + } + + @include placeholder($global-font-secondary-color-dark); + } + + @include placeholder($global-font-secondary-color); + + .search-button { + color: $global-font-secondary-color; + + .dark & { + color: $global-font-secondary-color-dark; + } + } + + .search-clear:hover { + color: #ff6b6b; + } + + .search-toggle:hover { + cursor: default; + } } } +.theme-switch i { + @include transform(rotate(225deg)); +} + #header-desktop { display: block; position: $header-position-desktop; - height: $header-height-desktop; - line-height: $header-height-desktop; + height: $header-height; + line-height: $header-height; .header-wrapper { - width: auto; - text-align: center; - padding: 0 3%; - display: flex; - justify-content: space-between; + padding: 0 1.5rem; .header-title { font-size: $header-title-font-size-desktop; - max-width: 30%; } .menu { overflow: hidden; white-space: nowrap; + .menu-inner { + float: right; + } + .menu-item { margin: 0 .5rem; - &.theme-switch { - margin: 0 .3rem; + &.delimiter { + border-left: 1.5px solid $global-font-color; + + .dark & { + border-left-color: $global-border-color-dark; + } + } + + &.language { + margin-right: 0; + } + + &.search { + margin: 0 -.5rem 0 0; } } @@ -75,58 +171,56 @@ header { font-weight: 900; color: $header-hover-color; - .dark-theme & { + .dark & { color: $header-hover-color-dark; } } } } + + &.open .header-wrapper .menu .menu-item.search { + margin: 0 .25rem 0 .5rem; + + input { + width: 24rem; + } + } } #header-mobile { display: none; position: $header-position-mobile; - height: $header-height-mobile; - line-height: $header-height-mobile; + height: $header-height; + line-height: $header-height; - .header-wrapper { + .header-container { padding: 0; margin: 0; - transition: all 0.3s ease 0s; - .header-container { - display: flex; - justify-content: space-between; - align-items: center; - width: 100%; + .header-wrapper { + padding: 0 1rem; font-size: 1.125rem; - padding-right: 1rem; - padding-left: 1rem; - box-sizing: border-box; + @include transition(margin-top 0.3s ease 0s); .header-title { - max-width: 80%; font-size: $header-title-font-size-mobile; + max-width: 80%; } .menu-toggle { - cursor: pointer; line-height: 4rem; + cursor: pointer; + @include transition(width 0.3s ease 0s); span { display: block; background: $global-font-color; width: 1.5rem; height: 2px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - -webkit-transition: .1s margin .1s, .1s transform; - -moz-transition: .1s margin .1s, .1s transform; - -o-transition: .1s margin .1s, .1s transform; - transition: .1s margin .1s, .1s transform; - - .dark-theme & { + @include border-radius(3px); + @include transition(all 0.3s ease-in-out); + + .dark & { background: $global-font-color-dark; } } @@ -140,19 +234,8 @@ header { } &.active { - span { - -webkit-transition: .1s margin, .1s transform .1s; - -moz-transition: .1s margin, .1s transform .1s; - -o-transition: .1s margin, .1s transform .1s; - transition: .1s margin, .1s transform .1s; - } - span:nth-child(1) { - -webkit-transform: rotate(45deg) translate(.4rem, .5rem); - -moz-transform: rotate(45deg) translate(.4rem, .5rem); - -ms-transform: rotate(45deg) translate(.4rem, .5rem); - -o-transform: rotate(45deg) translate(.4rem, .5rem); - transform: rotate(45deg) translate(.4rem, .5rem); + @include transform(rotate(45deg) translate(.4rem, .5rem)); } span:nth-child(2) { @@ -160,11 +243,7 @@ header { } span:nth-child(3) { - -moz-transform: rotate(-45deg) translate(.4rem, -.5rem); - -ms-transform: rotate(-45deg) translate(.4rem, -.5rem); - -webkit-transform: rotate(-45deg) translate(.4rem, -.5rem); - -o-transform: rotate(-45deg) translate(.4rem, -.5rem); - transform: rotate(-45deg) translate(.4rem, -.5rem); + @include transform(rotate(-45deg) translate(.4rem, -.5rem)); } } } @@ -172,12 +251,35 @@ header { .menu { text-align: center; - background: $global-background-color; - border-top: 2px solid $global-font-color; + background: $header-background-color; + border-top: 2px solid $global-border-color; display: none; - box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1), 0px 4px 8px rgba(0, 0, 0, 0.1); + padding-top: .5rem; + @include box-shadow(0 .125rem .25rem rgba(0, 0, 0, .1)); - a { + .search-wrapper { + display: flex; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + padding: ($header-height - 2.5rem) / 2 1rem; + line-height: 2.5rem; + } + + .search { + flex-grow: 10; + + .algolia-autocomplete, input { + width: 100%; + } + } + + .search-cancel { + display: none; + margin-left: .75rem; + } + + .menu-item { display: block; line-height: 2.5rem; } @@ -186,9 +288,149 @@ header { display: block; } - .dark-theme & { - background: $global-background-color-dark; - border-top: 2px solid $global-font-color-dark; + .dark & { + background: $header-background-color-dark; + border-top-color: $global-border-color-dark; + } + } + } + + &.open { + .header-wrapper { + margin-top: -$header-height; + } + + .menu { + padding-top: 0; + border-top: none; + + .menu-item { + display: none; + } + + .search-cancel { + display: inline; + } + } + } +} + +.search-dropdown { + position: fixed; + z-index: 200; + top: $header-height; + @include box-shadow(0 .125rem .25rem rgba(0, 0, 0, .1)); + + &.desktop { + right: 1.5rem; + width: 30rem; + } + + &.mobile { + right: 0; + width: 100%; + } + + .dropdown-menu { + right: 0 !important; + background-color: $global-background-color; + + .dark & { + background-color: $global-background-color-dark; + } + + .suggestions { + overflow-y: auto; + max-height: calc(100vh - #{$header-height}); + + .suggestion { + padding: .75rem 1rem; + + .suggestion-title { + display: inline-block; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + font-size: 1rem; + font-weight: bold; + max-width: 75%; + } + + .suggestion-date { + font-size: .875rem; + float: right; + text-align: right; + color: $global-font-secondary-color; + + .dark & { + color: $global-font-secondary-color-dark; + } + } + + .suggestion-context { + line-height: 1.25rem; + @include box(vertical); + -webkit-line-clamp: 2; + overflow: hidden; + text-overflow: ellipsis; + overflow-wrap: break-word; + color: $global-font-secondary-color; + + .dark & { + color: $global-font-secondary-color-dark; + } + } + + em { + font-style: normal; + background-color: $selection-color; + + .dark & { + background-color: $selection-color-dark; + } + } + + &.cursor { + background: darken($code-background-color, 5%); + + .dark & { + background: lighten($code-background-color-dark, 5%); + } + } + + &:hover { + cursor: pointer; + } + } + } + + .search-empty { + padding: 1rem; + text-align: center; + + .search-query { + font-weight: bold; + + .dark & { + color: #ddd; + } + } + } + + .search-footer { + padding: .5rem 1rem; + float: right; + font-size: .8rem; + color: $global-font-secondary-color; + + .dark { + color: $global-font-secondary-color-dark; + } + + @include link(false, false); + + a { + font-size: 1rem; } } } diff --git a/assets/css/_partial/_mask.scss b/assets/css/_partial/_mask.scss new file mode 100644 index 00000000..65b5734a --- /dev/null +++ b/assets/css/_partial/_mask.scss @@ -0,0 +1,16 @@ +#mask { + background-repeat: no-repeat; + background-position: center; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: -1; + background-color: rgba(0, 0, 0, 0); + + .blur & { + z-index: 100; + background-color: rgba(0, 0, 0, .25); + } +} diff --git a/assets/css/_partial/_pagination.scss b/assets/css/_partial/_pagination.scss index 78e5030c..4e9a4858 100644 --- a/assets/css/_partial/_pagination.scss +++ b/assets/css/_partial/_pagination.scss @@ -1,4 +1,3 @@ -/** pagination **/ .pagination { display: flex; flex-direction: row; @@ -9,14 +8,13 @@ padding: 1rem 0 0; a { - -webkit-font-smoothing: antialiased; font-size: .8rem; color: #bfbfbf; letter-spacing: .1rem; font-weight: 700; padding: 5px 5px; text-decoration: none; - transition: 0.3s; + @include transition(0.3s); } li { @@ -34,7 +32,7 @@ color: $pagination-link-hover-color; } - .dark-theme &:hover a { + .dark &:hover a { color: $pagination-link-hover-color-dark; } @@ -45,12 +43,12 @@ width: 0; height: 3px; background: $pagination-link-hover-color; - transition: 0.3s; + @include transition(0.3s); bottom: 0px; } - .dark-theme &:before, - .dark-theme &:after { + .dark &:before, + .dark &:after { background: $pagination-link-hover-color-dark; } @@ -80,7 +78,7 @@ color: $pagination-link-hover-color; } - .dark-theme & a { + .dark & a { color: $pagination-link-hover-color-dark; } diff --git a/assets/css/_partial/_single/_admonition.scss b/assets/css/_partial/_single/_admonition.scss index 69a79133..0eb6c606 100644 --- a/assets/css/_partial/_single/_admonition.scss +++ b/assets/css/_partial/_single/_admonition.scss @@ -68,7 +68,7 @@ details.admonition { right: .5rem; color: $global-font-color; - .dark-theme & { + .dark & { color: $global-font-color-dark; } } @@ -77,6 +77,6 @@ details.admonition { details.admonition[open] { i.details { - transform: rotate(180deg); + @include transform(rotate(180deg)); } } diff --git a/assets/css/_partial/_single/_code.scss b/assets/css/_partial/_single/_code.scss index 60289da1..c58d8e94 100644 --- a/assets/css/_partial/_single/_code.scss +++ b/assets/css/_partial/_single/_code.scss @@ -4,7 +4,7 @@ code { padding: .2rem .4rem; color: $code-color; - .dark-theme & { + .dark & { color: $code-color-dark; } } @@ -12,7 +12,7 @@ code { code, pre, .highlight table, .highlight tr, .highlight td { background: $code-background-color; - .dark-theme & { + .dark & { background: $code-background-color-dark; } } @@ -27,14 +27,14 @@ code, pre, .highlight table, .highlight tr, .highlight td { &::before { display: block; - padding: .4rem; + padding: .2rem .4rem; font-family: $global-font-family; font-weight: bold; color: $code-info-color; background: darken($code-background-color, 3%); content: 'Code'; - .dark-theme & { + .dark & { color: $code-info-color-dark; background: darken($code-background-color-dark, 3%); } @@ -56,7 +56,7 @@ code, pre, .highlight table, .highlight tr, .highlight td { display: block; background-color: darken($code-background-color, 5%); - .dark-theme & { + .dark & { background-color: darken($code-background-color-dark, 5%); } } @@ -66,7 +66,7 @@ code, pre, .highlight table, .highlight tr, .highlight td { .ln, .lnt { color: $global-font-secondary-color; - .dark-theme & { + .dark & { color: $global-font-secondary-color-dark; } } @@ -89,7 +89,7 @@ code, pre, .highlight table, .highlight tr, .highlight td { .#{$class} { color: $color; } } - .dark-theme & { + .dark & { @each $class, $color in $code-highlight-color-map-dark { .#{$class} { color: $color; } } @@ -119,12 +119,12 @@ code, pre, .highlight table, .highlight tr, .highlight td { @include link(false, false); - .dark-theme & { + .dark & { background-color: darken($code-background-color-dark, 5%); } } - .dark-theme & { + .dark & { // imported from https://github.com/lonekorean/gist-syntax-themes/blob/master/stylesheets/one-dark.css .highlight { background: #141414; diff --git a/assets/css/_partial/_single/_footer.scss b/assets/css/_partial/_single/_footer.scss index 3cadeff2..b02fa643 100644 --- a/assets/css/_partial/_single/_footer.scss +++ b/assets/css/_partial/_single/_footer.scss @@ -5,7 +5,7 @@ border-bottom: 1px solid $global-border-color; padding: 1rem 0 0.3rem; - .dark-theme & { + .dark & { border-bottom: 1px solid $global-border-color-dark; } @@ -17,7 +17,7 @@ font-size: 0.8em; color: $global-font-secondary-color; - .dark-theme & { + .dark & { color: $global-font-secondary-color-dark; } @@ -28,7 +28,7 @@ font-size: 0.8em; color: $global-font-secondary-color; - .dark-theme & { + .dark & { color: $global-font-secondary-color-dark; } } @@ -68,10 +68,7 @@ & a.next { font-size: 1rem; font-weight: 600; - -webkit-transition: all ease-out .3s; - -moz-transition: all ease-out .3s; - -o-transition: all ease-out .3s; - transition: all ease-out .3s; + @include transition(all 0.3s ease-out); } & a.prev { @@ -79,11 +76,7 @@ } & a.prev:hover { - -webkit-transform: translateX(-4px); - -moz-transform: translateX(-4px); - -ms-transform: translateX(-4px); - -o-transform: translateX(-4px); - transform: translateX(-4px); + @include transform(translateX(-4px)); } & a.next { @@ -91,11 +84,7 @@ } & a.next:hover { - -webkit-transform: translateX(4px); - -moz-transform: translateX(4px); - -ms-transform: translateX(4px); - -o-transform: translateX(4px); - transform: translateX(4px); + @include transform(translateX(4px)); } } } diff --git a/assets/css/_partial/_single/_instagram.scss b/assets/css/_partial/_single/_instagram.scss index 49c08867..0a41417d 100644 --- a/assets/css/_partial/_single/_instagram.scss +++ b/assets/css/_partial/_single/_instagram.scss @@ -1,5 +1,5 @@ iframe.instagram-media { - .dark-theme & { + .dark & { border: none !important; } } diff --git a/assets/css/_partial/_single/_toc.scss b/assets/css/_partial/_single/_toc.scss index df15b8c4..139a5b3f 100644 --- a/assets/css/_partial/_single/_toc.scss +++ b/assets/css/_partial/_single/_toc.scss @@ -9,7 +9,9 @@ top: if($header-normal-mode-desktop, 5rem, 10rem); left: 10000px; - .dark-theme & { + @include blur; + + .dark & { border-left: 1px solid $global-border-color-dark; } @@ -39,7 +41,7 @@ margin-right: .5rem; color: $single-link-color; - .dark-theme & { + .dark & { color: $single-link-color-dark; } } @@ -58,14 +60,14 @@ font-weight: bold; color: $single-link-color; - .dark-theme & { + .dark & { color: $single-link-color-dark; } &::before { color: $single-link-hover-color; - .dark-theme & { + .dark & { color: $single-link-hover-color-dark; } } @@ -82,7 +84,7 @@ list-style: none; background: darken($code-background-color, 3%); - .dark-theme & { + .dark & { background: darken($code-background-color-dark, 3%); } @@ -111,7 +113,7 @@ details[open] { i.details { - transform: rotate(180deg); + @include transform(rotate(180deg)); } } @@ -131,7 +133,7 @@ } } - .dark-theme & { + .dark & { background-color: $code-background-color-dark; } } @@ -153,7 +155,7 @@ color: $global-font-secondary-color; } - .dark-theme & { + .dark & { background: $code-background-color-dark; rt { diff --git a/assets/css/_variables.scss b/assets/css/_variables.scss index 2bfe3033..2049aa2d 100644 --- a/assets/css/_variables.scss +++ b/assets/css/_variables.scss @@ -30,7 +30,7 @@ $global-link-hover-color: #2d96bd !default; $global-link-hover-color-dark: #fff !default; // Color of the border -$global-border-color: #dcdcdc !default; +$global-border-color: #cacaca !default; $global-border-color-dark: #4a4b50 !default; // ========== Global ========== // @@ -44,14 +44,13 @@ $scrollbar-hover-color: #a9a9b3 !default; // ========== Selection ========== // // Color of the selected text -$selection-color: rgba(38, 139, 211, 0.2) !default; -$selection-color-dark: rgba(38, 139, 211, 0.3) !default; +$selection-color: rgba(53, 166, 247, 0.25) !default; +$selection-color-dark: rgba(50, 112, 194, 0.4) !default; // ========== Selection ========== // // ========== Header ========== // // Height of the header -$header-height-desktop: 3.5rem !default; -$header-height-mobile: 3.5rem !default; +$header-height: 3.5rem !default; // Color of the header background $header-background-color: #f8f8f8 !default; @@ -68,12 +67,16 @@ $header-position-desktop: if($header-normal-mode-desktop, static, fixed) !defaul $header-position-mobile: if($header-normal-mode-mobile, static, fixed) !default; // Top of the page padding -$page-padding-top-desktop: if($header-normal-mode-desktop, 0, $header-height-desktop) !default; -$page-padding-top-mobile: if($header-normal-mode-mobile, 0, $header-height-mobile) !default; +$page-padding-top-desktop: if($header-normal-mode-desktop, 0, $header-height) !default; +$page-padding-top-mobile: if($header-normal-mode-mobile, 0, $header-height) !default; // Color of the hover header item $header-hover-color: #161209 !default; $header-hover-color-dark: #fff !default; + +// Color of the search background +$search-background-color: #e9e9e9 !default; +$search-background-color-dark: #363636 !default; // ========== Header ========== // // ========== Single Content ========== // diff --git a/assets/js/theme.min.js b/assets/js/theme.min.js index 6950908b..b5f2e50a 100644 --- a/assets/js/theme.min.js +++ b/assets/js/theme.min.js @@ -1,3 +1,4 @@ -"use strict";function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _defineProperties(a,b){for(var c,d=0;d .chroma"),function(a){var b=a.querySelectorAll("pre.chroma > code"),c=b[b.length-1],d=c?c.className.toLowerCase():"";a.className+=" "+d}),this.util.forEach(document.querySelectorAll(".highlight > pre.chroma"),function(a){var b=document.createElement("div");b.className=a.className;var c=document.createElement("table");b.appendChild(c);var d=document.createElement("tbody");c.appendChild(d);var e=document.createElement("tr");d.appendChild(e);var f=document.createElement("td");e.appendChild(f),a.parentElement.replaceChild(b,a),f.appendChild(a)})}},{key:"initTable",value:function initTable(){this.util.forEach(document.querySelectorAll(".content table"),function(a){var b=document.createElement("div");b.className="table-wrapper",a.parentElement.replaceChild(b,a),b.appendChild(a)})}},{key:"initHeaderLink",value:function initHeaderLink(){for(var a=1;6>=a;a++)this.util.forEach(document.querySelectorAll(".page.single .content > h"+a),function(a){a.classList.add("headerLink"),a.innerHTML="").concat(a.innerHTML)})}},{key:"initToc",value:function initToc(){var a=this,b=document.getElementById("TableOfContents");if(null!==b)if(this.util.isTocStatic()){var k=document.getElementById("toc-content-static");b.parentElement!==k&&(b.parentElement.removeChild(b),k.appendChild(b)),this._tocOnScroll&&this.scrollEventSet.delete(this._tocOnScroll)}else{var l=document.getElementById("toc-content-auto");b.parentElement!==l&&(b.parentElement.removeChild(b),l.appendChild(b));var c=document.getElementById("toc-auto"),d=document.getElementsByClassName("page")[0];c.style.maxWidth="".concat(d.getBoundingClientRect().left-20,"px"),this._tocLinks=this._tocLinks||b.getElementsByTagName("a"),this._tocLis=this._tocLis||b.getElementsByTagName("li"),this._headerLinks=this._headerLinks||document.getElementsByClassName("headerLink");var e="normal"!==window.desktopHeaderMode,f=document.getElementById("header-desktop").offsetHeight,g=20+(e?f:0),h=c.offsetTop,j=h-g+(e?0:f);this._tocOnScroll=this._tocOnScroll||function(){var k=document.getElementById("post-footer").offsetTop,l=k-c.getBoundingClientRect().height,m=l-g+(e?0:f),n=d.getBoundingClientRect();a.newScrollTopm?(c.style.position="absolute",c.style.top="".concat(l,"px"),c.style.left="".concat(n.width+20,"px")):(c.style.position="fixed",c.style.top="".concat(g,"px"),c.style.left="".concat(n.left+n.width+20,"px")),a.util.forEach(a._tocLinks,function(a){a.classList.remove("active")}),a.util.forEach(a._tocLis,function(a){a.classList.remove("has-active")});for(var o=20+(e?f:0),p=a._headerLinks.length-1,q=0;qo||r<=o&&s>o){p=q;break}}if(-1!==p){a._tocLinks[p].classList.add("active");for(var t=a._tocLinks[p].parentElement;t!==b;)t.classList.add("has-active"),t=t.parentElement.parentElement}},this._tocOnScroll(),this.scrollEventSet.add(this._tocOnScroll)}}},{key:"initMermaid",value:function initMermaid(){var a=document.getElementsByClassName("mermaid");a.length&&(mermaid.initialize({startOnLoad:!1,theme:"null"}),this.util.forEach(a,function(a){mermaid.mermaidAPI.render("svg-"+a.id,window.contentMap[a.id],function(b){a.innerHTML=b},a)}))}},{key:"initEcharts",value:function initEcharts(){var a=this;this._echartsOnSwitchTheme=this._echartsOnSwitchTheme||function(){a._echartsArr=a._echartsArr||[];for(var b=0;be?(a.classList.remove("fadeInDown"),a.classList.add("fadeOutUp")):c<-e&&(a.classList.remove("fadeOutUp"),a.classList.add("fadeInDown"))}),20e?(d.classList.remove("fadeIn"),d.classList.add("fadeOut")):c<-e&&(d.style.display="block",d.classList.remove("fadeOut"),d.classList.add("fadeIn")):d.style.display="none",a._scrollTimeout||(a._scrollTimeout=window.setTimeout(function(){a._scrollTimeout=null;var b=!0,c=!1,d=void 0;try{for(var e,f,g=a.scrollEventSet[Symbol.iterator]();!(b=(e=g.next()).done);b=!0)f=e.value,f()}catch(a){c=!0,d=a}finally{try{b||null==g.return||g.return()}finally{if(c)throw d}}},10)),a.oldScrollTop=a.newScrollTop},!1)}},{key:"onResize",value:function onResize(){var a=this;window.addEventListener("resize",function(){a._resizeTimeout||(a._resizeTimeout=window.setTimeout(function(){a._resizeTimeout=null;var b=!0,c=!1,d=void 0;try{for(var e,f,g=a.resizeEventSet[Symbol.iterator]();!(b=(e=g.next()).done);b=!0)f=e.value,f()}catch(a){c=!0,d=a}finally{try{b||null==g.return||g.return()}finally{if(c)throw d}}a.initMenuMobile(),a.initToc(),a.initSmoothScroll(),a.initMermaid()},100))},!1)}},{key:"init",value:function init(){this.initMenuMobile(),this.initSwitchTheme(),this.initHighlight(),this.initTable(),this.initHeaderLink(),this.initMermaid(),this.initEcharts(),this.initMapbox(),this.initTypeit(),this.initToc(),this.initSmoothScroll(),this.onScroll(),this.onResize()}}]),b}(),c=function(){var a=new b;a.init()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",c,!1):c()})(); +"use strict";function _objectDestructuringEmpty(a){if(null==a)throw new TypeError("Cannot destructure undefined")}function _createForOfIteratorHelper(a){if("undefined"==typeof Symbol||null==a[Symbol.iterator]){if(Array.isArray(a)||(a=_unsupportedIterableToArray(a))){var b=0,c=function(){};return{s:c,n:function n(){return b>=a.length?{done:!0}:{done:!1,value:a[b++]}},e:function e(a){throw a},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var d,e,f=!0,g=!1;return{s:function s(){d=a[Symbol.iterator]()},n:function n(){var a=d.next();return f=a.done,a},e:function e(a){g=!0,e=a},f:function f(){try{f||null==d.return||d.return()}finally{if(g)throw e}}}}function _unsupportedIterableToArray(a,b){if(a){if("string"==typeof a)return _arrayLikeToArray(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);return"Object"===c&&a.constructor&&(c=a.constructor.name),"Map"===c||"Set"===c?Array.from(c):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?_arrayLikeToArray(a,b):void 0}}function _arrayLikeToArray(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=Array(b);c$1"),g=g.replace(new RegExp("(".concat(a,")"),"gi"),"$1")}),{uri:e.uri,title:f,date:e.date,context:g}})};a._index?e(f()):fetch(b.lunrIndexURL).then(function(a){return a.json()}).then(function(c){var d={};a._index=lunr(function(){var a=this;b.lunrLanguageCode&&this.use(lunr[b.lunrLanguageCode]),this.ref("uri"),this.field("title",{boost:50}),this.field("tags",{boost:20}),this.field("description",{boost:10}),this.field("content",{boost:5}),this.metadataWhitelist=["position"],c.forEach(function(b){d[b.uri]=b,a.add(b)})}),a._indexData=d,e(f())}).catch(function(a){console.error(a),e([])})}else"algolia"===b.type&&(h.style.display="inline",i.style.display="none",a._algoliaIndex=a._algoliaIndex||algoliasearch(b.algoliaAppID,b.algoliaSearchKey).initIndex(b.algoliaIndex),a._algoliaIndex.search(c,{offset:0,length:12,attributesToHighlight:["title","content"]}).then(function(a){var b=a.hits;e(b.map(function(a){var b=a.uri,c=a.date,d=a._highlightResult,e=d.title,f=d.content;return{uri:b,title:e.value,date:c,context:f.value}}))}).catch(function(a){console.error(a),e([])}))},templates:{suggestion:function suggestion(a){var b=a.title,c=a.date,d=a.context;return"
".concat(b,"").concat(c,"
").concat(d,"
")},empty:function empty(a){var c=a.query;return"
".concat(b.noResultsFound,": \"").concat(c,"\"
")},footer:function footer(a){_objectDestructuringEmpty(a);var c="algolia"===b.type?{searchType:"algolia",icon:"",href:"https://www.algolia.com/"}:{searchType:"Lunr.js",icon:"",href:"https://lunrjs.com/"},d=c.searchType,e=c.icon,f=c.href;return"")}}});e.on("autocomplete:selected",function(a,b){window.location.assign(b.uri)}),c?a._searchMobile=e:a._searchDesktop=e};if(b.lunrSegmentitURL&&!document.getElementById("lunr-segmentit")){var k=document.createElement("script");k.id="lunr-segmentit",k.type="text/javascript",k.src=b.lunrSegmentitURL,k.async=!0,k.readyState?k.onreadystatechange=function(){("loaded"==k.readyState||"complete"==k.readyState)&&(k.onreadystatechange=null,j())}:k.onload=function(){j()},document.body.appendChild(k)}else j()}}},{key:"initLightGallery",value:function initLightGallery(){this.config.lightGallery&&lightGallery(document.getElementById("content"),this.config.lightGallery)}},{key:"initHighlight",value:function initHighlight(){this.util.forEach(document.querySelectorAll(".highlight > .chroma"),function(a){var b=a.querySelectorAll("pre.chroma > code"),c=b[b.length-1],d=c?c.className.toLowerCase():"";a.className+=" "+d}),this.util.forEach(document.querySelectorAll(".highlight > pre.chroma"),function(a){var b=document.createElement("div");b.className=a.className;var c=document.createElement("table");b.appendChild(c);var d=document.createElement("tbody");c.appendChild(d);var e=document.createElement("tr");d.appendChild(e);var f=document.createElement("td");e.appendChild(f),a.parentElement.replaceChild(b,a),f.appendChild(a)})}},{key:"initTable",value:function initTable(){this.util.forEach(document.querySelectorAll(".content table"),function(a){var b=document.createElement("div");b.className="table-wrapper",a.parentElement.replaceChild(b,a),b.appendChild(a)})}},{key:"initHeaderLink",value:function initHeaderLink(){for(var a=1;6>=a;a++)this.util.forEach(document.querySelectorAll(".page.single .content > h"+a),function(a){a.classList.add("headerLink"),a.innerHTML="").concat(a.innerHTML)})}},{key:"initToc",value:function initToc(){var a=this,b=document.getElementById("TableOfContents");if(null!==b)if(this.util.isTocStatic()){var o=document.getElementById("toc-content-static");b.parentElement!==o&&(b.parentElement.removeChild(b),o.appendChild(b)),this._tocOnScroll&&this.scrollEventSet.delete(this._tocOnScroll)}else{var p=document.getElementById("toc-content-auto");b.parentElement!==p&&(b.parentElement.removeChild(b),p.appendChild(b));var c=document.getElementById("toc-auto"),d=document.getElementsByClassName("page")[0],e=d.getBoundingClientRect();c.style.left="".concat(e.left+e.width+20,"px"),c.style.maxWidth="".concat(d.getBoundingClientRect().left-20,"px");var f=b.getElementsByTagName("a"),g=b.getElementsByTagName("li"),h=document.getElementsByClassName("headerLink"),j="normal"!==this.config.desktopHeaderMode,k=document.getElementById("header-desktop").offsetHeight,l=20+(j?k:0),m=c.offsetTop,n=m-l+(j?0:k);this._tocOnScroll=this._tocOnScroll||function(){var d=document.getElementById("post-footer").offsetTop,e=d-c.getBoundingClientRect().height,o=e-l+(j?0:k);a.newScrollTopo?(c.style.position="absolute",c.style.top="".concat(e,"px")):(c.style.position="fixed",c.style.top="".concat(l,"px")),a.util.forEach(f,function(a){a.classList.remove("active")}),a.util.forEach(g,function(a){a.classList.remove("has-active")});for(var p=20+(j?k:0),q=h.length-1,r=0;rp||s<=p&&t>p){q=r;break}}if(-1!==q){f[q].classList.add("active");for(var u=f[q].parentElement;u!==b;)u.classList.add("has-active"),u=u.parentElement.parentElement}},this._tocOnScroll(),this.scrollEventSet.add(this._tocOnScroll)}}},{key:"initMath",value:function initMath(){this.config.math&&renderMathInElement(document.body,this.config.math)}},{key:"initMermaid",value:function initMermaid(){var a=this,b=document.getElementsByClassName("mermaid");b.length&&(mermaid.initialize({startOnLoad:!1,theme:"null"}),this.util.forEach(b,function(b){mermaid.mermaidAPI.render("svg-"+b.id,a.contentData[b.id],function(a){b.innerHTML=a},b)}))}},{key:"initEcharts",value:function initEcharts(){var a=this;this._echartsOnSwitchTheme=this._echartsOnSwitchTheme||function(){a._echartsArr=a._echartsArr||[];for(var b=0;bd?(a.classList.remove("fadeInDown"),a.classList.add("fadeOutUp")):e<-d&&(a.classList.remove("fadeOutUp"),a.classList.add("fadeInDown"))}),a.newScrollTop>d?e>d?(c.classList.remove("fadeIn"),c.classList.add("fadeOut")):e<-d&&(c.style.display="block",c.classList.remove("fadeOut"),c.classList.add("fadeIn")):c.style.display="none";var f,g=_createForOfIteratorHelper(a.scrollEventSet);try{for(g.s();!(f=g.n()).done;){var h=f.value;h()}}catch(a){g.e(a)}finally{g.f()}a.oldScrollTop=a.newScrollTop},!1)}},{key:"onResize",value:function onResize(){var a=this;window.addEventListener("resize",function(){a._resizeTimeout||(a._resizeTimeout=window.setTimeout(function(){a._resizeTimeout=null;var b,c=_createForOfIteratorHelper(a.resizeEventSet);try{for(c.s();!(b=c.n()).done;){var d=b.value;d()}}catch(a){c.e(a)}finally{c.f()}a.initToc(),a.initSmoothScroll(),a.initMermaid(),a.initSearch()},100))},!1)}},{key:"onClickMask",value:function onClickMask(){var a=this;document.getElementById("mask").addEventListener("click",function(){var b,c=_createForOfIteratorHelper(a.clickMaskEventSet);try{for(c.s();!(b=c.n()).done;){var d=b.value;d()}}catch(a){c.e(a)}finally{c.f()}document.body.classList.remove("blur")},!1)}},{key:"init",value:function init(){this.initMenuMobile(),this.initSwitchTheme(),this.initSearch(),this.initLightGallery(),this.initHighlight(),this.initTable(),this.initHeaderLink(),this.initMath(),this.initMermaid(),this.initEcharts(),this.initMapbox(),this.initTypeit(),this.initToc(),this.initComment(),this.initSmoothScroll(),this.onScroll(),this.onResize(),this.onClickMask()}}]),a}(),themeInit=function(){var a=new Theme;a.init()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",themeInit,!1):themeInit(); //# sourceMappingURL=theme.min.js.map \ No newline at end of file diff --git a/assets/js/theme.min.js.map b/assets/js/theme.min.js.map index 4418e166..4e0629f0 100644 --- a/assets/js/theme.min.js.map +++ b/assets/js/theme.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/js/theme.js"],"names":[],"mappings":"+YAAA,CAAC,UAAM,CACH,aADG,GAGG,CAAA,CAHH,2HAIS,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C,CAAI,CAAC,YAAL,CAAoB,CAAI,CAAC,YAC5B,CA/BD,IAgCH,CApVF,2CAsVY,YACP,MAAM,CAAC,gBAAP,CAAwB,QAAxB,CAAkC,UAAM,CAC/B,CAAI,CAAC,cAD0B,GAEhC,CAAI,CAAC,cAAL,CAAsB,MAAM,CAAC,UAAP,CAAkB,UAAM,CAC1C,CAAI,CAAC,cAAL,CAAsB,IADoB,4BAE1C,UAAS,CAAT,GAAkB,CAAI,CAAC,cAAvB,gDAAS,CAAT,SAAuC,CAAK,EAFF,mFAG1C,CAAI,CAAC,cAAL,EAH0C,CAI1C,CAAI,CAAC,OAAL,EAJ0C,CAK1C,CAAI,CAAC,gBAAL,EAL0C,CAM1C,CAAI,CAAC,WAAL,EACH,CAPqB,CAOnB,GAPmB,CAFU,CAWvC,CAXD,IAYH,CAnWF,mCAqWQ,CACH,KAAK,cAAL,EADG,CAEH,KAAK,eAAL,EAFG,CAGH,KAAK,aAAL,EAHG,CAIH,KAAK,SAAL,EAJG,CAKH,KAAK,cAAL,EALG,CAMH,KAAK,WAAL,EANG,CAOH,KAAK,WAAL,EAPG,CAQH,KAAK,UAAL,EARG,CASH,KAAK,UAAL,EATG,CAUH,KAAK,OAAL,EAVG,CAWH,KAAK,gBAAL,EAXG,CAaH,KAAK,QAAL,EAbG,CAcH,KAAK,QAAL,EACH,CApXF,SAuXG,CAAS,CAAG,UAAM,CACpB,GAAM,CAAA,CAAK,CAAG,GAAI,CAAA,CAAlB,CACA,CAAK,CAAC,IAAN,EACH,CA1XE,CA4XyB,SAAxB,GAAA,QAAQ,CAAC,UA5XV,CA+XC,QAAQ,CAAC,gBAAT,CAA0B,kBAA1B,CAA8C,CAA9C,IA/XD,CA6XC,CAAS,EAIhB,CAjYD,G","file":"theme.min.js","sourcesContent":["(() => {\n 'use strict';\n\n class Util {\n forEach(elements, handler) {\n elements = elements || [];\n for (let i = 0; i < elements.length; i++) {\n handler(elements[i]);\n }\n }\n\n getScrollTop() {\n return (document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop;\n }\n\n isMobile() {\n return window.matchMedia('only screen and (max-width: 680px)').matches;\n }\n\n isTocStatic() {\n return window.matchMedia('only screen and (max-width: 960px)').matches;\n }\n }\n\n class Theme {\n constructor() {\n this.util = new Util();\n this.newScrollTop = this.util.getScrollTop();\n this.oldScrollTop = this.newScrollTop;\n this.scrollEventSet = new Set();\n this.resizeEventSet = new Set();\n this.switchThemeEventSet = new Set();\n }\n\n initMenuMobile() {\n const menuToggleMobile = document.getElementById('menu-toggle-mobile');\n const menuMobile = document.getElementById('menu-mobile');\n this._menuMobileOnScroll = this._menuMobileOnScroll || (() => {\n menuToggleMobile.classList.remove('active');\n menuMobile.classList.remove('active');\n });\n if (this.util.isMobile()) {\n menuToggleMobile.onclick = () => {\n menuToggleMobile.classList.toggle('active');\n menuMobile.classList.toggle('active');\n };\n this.scrollEventSet.add(this._menuMobileOnScroll);\n } else {\n this.scrollEventSet.delete(this._menuMobileOnScroll);\n }\n }\n\n initSwitchTheme() {\n this.util.forEach(document.getElementsByClassName('theme-switch'), (button) => {\n button.onclick = () => {\n document.body.classList.toggle('dark-theme');\n window.isDark = !window.isDark;\n window.localStorage && window.localStorage.setItem('theme', window.isDark ? 'dark' : 'light');\n for (let event of this.switchThemeEventSet) event();\n };\n });\n }\n\n initHighlight() {\n this.util.forEach(document.querySelectorAll('.highlight > .chroma'), (block) => {\n const codes = block.querySelectorAll('pre.chroma > code');\n const code = codes[codes.length - 1];\n const lang = code ? code.className.toLowerCase() : '';\n block.className += ' ' + lang;\n });\n this.util.forEach(document.querySelectorAll('.highlight > pre.chroma'), (block) => {\n const chroma = document.createElement('div');\n chroma.className = block.className;\n const table = document.createElement('table');\n chroma.appendChild(table);\n const tbody = document.createElement('tbody');\n table.appendChild(tbody);\n const tr = document.createElement('tr');\n tbody.appendChild(tr);\n const td = document.createElement('td');\n tr.appendChild(td);\n block.parentElement.replaceChild(chroma, block);\n td.appendChild(block);\n });\n }\n\n initTable() {\n this.util.forEach(document.querySelectorAll('.content table'), (table) => {\n const wrapper = document.createElement('div');\n wrapper.className = 'table-wrapper';\n table.parentElement.replaceChild(wrapper, table);\n wrapper.appendChild(table);\n });\n }\n\n initHeaderLink() {\n for (let num = 1; num <= 6; num++) {\n this.util.forEach(document.querySelectorAll('.page.single .content > h' + num), (header) => {\n header.classList.add('headerLink');\n header.innerHTML = `${header.innerHTML}`;\n });\n }\n }\n\n initToc() {\n const tocCore = document.getElementById('TableOfContents');\n if (tocCore === null) return;\n if (this.util.isTocStatic()) {\n const tocContentStatic = document.getElementById('toc-content-static');\n if (tocCore.parentElement !== tocContentStatic) {\n tocCore.parentElement.removeChild(tocCore);\n tocContentStatic.appendChild(tocCore);\n }\n if (this._tocOnScroll) this.scrollEventSet.delete(this._tocOnScroll);\n } else {\n const tocContentAuto = document.getElementById('toc-content-auto');\n if (tocCore.parentElement !== tocContentAuto) {\n tocCore.parentElement.removeChild(tocCore);\n tocContentAuto.appendChild(tocCore);\n }\n const toc = document.getElementById('toc-auto');\n const page = document.getElementsByClassName('page')[0];\n toc.style.maxWidth = `${page.getBoundingClientRect().left - 20}px`;\n this._tocLinks = this._tocLinks || tocCore.getElementsByTagName('a');\n this._tocLis = this._tocLis || tocCore.getElementsByTagName('li');\n this._headerLinks = this._headerLinks || document.getElementsByClassName('headerLink');\n const headerIsFixed = window.desktopHeaderMode !== 'normal';\n const headerHeight = document.getElementById('header-desktop').offsetHeight;\n const TOP_SPACING = 20 + (headerIsFixed ? headerHeight : 0);\n const minTocTop = toc.offsetTop;\n const minScrollTop = minTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight);\n this._tocOnScroll = this._tocOnScroll || (() => {\n const footerTop = document.getElementById('post-footer').offsetTop;\n const maxTocTop = footerTop - toc.getBoundingClientRect().height;\n const maxScrollTop = maxTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight);\n const rect = page.getBoundingClientRect();\n if (this.newScrollTop < minScrollTop) {\n toc.style.position = 'absolute';\n toc.style.top = `${minTocTop}px`;\n toc.style.left = `${rect.width + 20}px`;\n } else if (this.newScrollTop > maxScrollTop) {\n toc.style.position = 'absolute';\n toc.style.top = `${maxTocTop}px`;\n toc.style.left = `${rect.width + 20}px`;\n } else {\n toc.style.position = 'fixed';\n toc.style.top = `${TOP_SPACING}px`;\n toc.style.left = `${rect.left + rect.width + 20}px`;\n }\n\n this.util.forEach(this._tocLinks, (link) => { link.classList.remove('active'); });\n this.util.forEach(this._tocLis, (link) => { link.classList.remove('has-active'); });\n const INDEX_SPACING = 20 + (headerIsFixed ? headerHeight : 0);\n let activeTocIndex = this._headerLinks.length - 1;\n for (let i = 0; i < this._headerLinks.length - 1; i++) {\n const thisTop = this._headerLinks[i].getBoundingClientRect().top;\n const nextTop = this._headerLinks[i + 1].getBoundingClientRect().top;\n if ((i == 0 && thisTop > INDEX_SPACING)\n || (thisTop <= INDEX_SPACING && nextTop > INDEX_SPACING)) {\n activeTocIndex = i;\n break;\n }\n }\n if (activeTocIndex !== -1) {\n this._tocLinks[activeTocIndex].classList.add('active');\n let parent = this._tocLinks[activeTocIndex].parentElement;\n while (parent !== tocCore) {\n parent.classList.add('has-active');\n parent = parent.parentElement.parentElement;\n }\n }\n });\n this._tocOnScroll();\n this.scrollEventSet.add(this._tocOnScroll);\n }\n }\n\n initMermaid() {\n const elements = document.getElementsByClassName('mermaid');\n if (elements.length) {\n mermaid.initialize({startOnLoad: false, theme: 'null'});\n this.util.forEach(elements, (element) => {\n mermaid.mermaidAPI.render('svg-' + element.id, window.contentMap[element.id], (svgCode) => {\n element.innerHTML = svgCode;\n }, element);\n });\n }\n }\n\n initEcharts() {\n this._echartsOnSwitchTheme = this._echartsOnSwitchTheme || (() => {\n this._echartsArr = this._echartsArr || [];\n for (let i = 0; i < this._echartsArr.length; i++) {\n this._echartsArr[i].dispose();\n }\n this._echartsArr = [];\n this.util.forEach(document.getElementsByClassName('echarts'), (element) => {\n const chart = echarts.init(element, window.isDark ? 'dark' : 'macarons', {renderer: 'svg'});\n chart.setOption(JSON.parse(window.contentMap[element.id]));\n this._echartsArr.push(chart);\n });\n });\n this.switchThemeEventSet.add(this._echartsOnSwitchTheme);\n this._echartsOnSwitchTheme();\n this._echartsOnResize = this._echartsOnResize || (() => {\n for (let i = 0; i < this._echartsArr.length; i++) {\n this._echartsArr[i].resize();\n }\n });\n this.resizeEventSet.add(this._echartsOnResize);\n }\n\n initMapbox() {\n this._mapboxArr = this._mapboxArr || [];\n this.util.forEach(document.getElementsByClassName('mapbox'), (element) => {\n const options = window.contentMap[element.id];\n const mapbox = new mapboxgl.Map({\n container: element,\n center: [options['lng'], options['lat']],\n zoom: options['zoom'],\n minZoom: .2,\n style: window.isDark ? options['dark-style'] : options['light-style'],\n attributionControl: false,\n });\n if (options['marked']) {\n new mapboxgl.Marker().setLngLat([options['lng'], options['lat']]).addTo(mapbox);\n }\n if (options['navigation']) {\n mapbox.addControl(new mapboxgl.NavigationControl(), 'bottom-right');\n }\n if (options['geolocate']) {\n mapbox.addControl(new mapboxgl.GeolocateControl({\n positionOptions: {\n enableHighAccuracy: true,\n },\n showUserLocation: true,\n trackUserLocation: true,\n }), 'bottom-right');\n }\n if (options['scale']) {\n mapbox.addControl(new mapboxgl.ScaleControl());\n }\n if (options['fullscreen']) {\n mapbox.addControl(new mapboxgl.FullscreenControl());\n }\n mapbox.addControl(new MapboxLanguage());\n this._mapboxArr.push(mapbox);\n });\n this._mapboxOnSwitchTheme = this._mapboxOnSwitchTheme || (() => {\n this.util.forEach(this._mapboxArr, (mapbox) => {\n const element = mapbox.getContainer();\n const options = window.contentMap[element.id];\n mapbox.setStyle(window.isDark ? options['dark-style'] : options['light-style']);\n mapbox.addControl(new MapboxLanguage());\n });\n });\n this.switchThemeEventSet.add(this._mapboxOnSwitchTheme);\n }\n\n initTypeit() {\n if (window.typeitArr) {\n for (let i = 0; i < window.typeitArr.length; i++) {\n const group = window.typeitArr[i];\n (function typeone(i) {\n const id = group[i];\n if (i === group.length - 1) {\n new TypeIt(`#${id}`, {\n strings: window.contentMap[id],\n }).go();\n return;\n }\n let instance = new TypeIt(`#${id}`, {\n strings: window.contentMap[id],\n afterComplete: () => {\n instance.destroy();\n typeone(i + 1);\n },\n }).go();\n })(0);\n }\n }\n }\n\n initSmoothScroll() {\n if ((!this.util.isMobile() && window.desktopHeaderMode === 'normal')\n || (this.util.isMobile() && window.mobileHeaderMode === 'normal')) {\n new SmoothScroll('[href^=\"#\"]', {speed: 300, speedAsDuration: true});\n } else {\n new SmoothScroll('[href^=\"#\"]', {speed: 300, speedAsDuration: true, header: '#header-desktop'});\n }\n }\n\n onScroll() {\n const headers = [];\n if (window.desktopHeaderMode === 'auto') headers.push(document.getElementById('header-desktop'));\n if (window.mobileHeaderMode === 'auto') headers.push(document.getElementById('header-mobile'));\n this.util.forEach(headers, (header) => {\n header.classList.add('animated');\n header.classList.add('faster');\n });\n const comments = document.getElementsByClassName('comment');\n if (comments.length) {\n const button = document.getElementById('comment-button');\n button.href = `#${comments[0].id}`;\n button.style.display = 'block';\n }\n const fixedButtons = document.getElementById('fixed-buttons');\n const MIN_SCROLL = 10;\n window.addEventListener('scroll', () => {\n this.newScrollTop = this.util.getScrollTop();\n const scroll = this.newScrollTop - this.oldScrollTop;\n this.util.forEach(headers, (header) => {\n if (scroll > MIN_SCROLL) {\n header.classList.remove('fadeInDown');\n header.classList.add('fadeOutUp');\n } else if (scroll < - MIN_SCROLL) {\n header.classList.remove('fadeOutUp');\n header.classList.add('fadeInDown');\n }\n });\n if (this.newScrollTop > 20) {\n if (scroll > MIN_SCROLL) {\n fixedButtons.classList.remove('fadeIn');\n fixedButtons.classList.add('fadeOut');\n } else if (scroll < - MIN_SCROLL) {\n fixedButtons.style.display = 'block';\n fixedButtons.classList.remove('fadeOut');\n fixedButtons.classList.add('fadeIn');\n }\n } else {\n fixedButtons.style.display = 'none';\n }\n if (!this._scrollTimeout) {\n this._scrollTimeout = window.setTimeout(() => {\n this._scrollTimeout = null;\n for (let event of this.scrollEventSet) event();\n }, 10);\n }\n this.oldScrollTop = this.newScrollTop;\n }, false);\n }\n\n onResize() {\n window.addEventListener('resize', () => {\n if (!this._resizeTimeout) {\n this._resizeTimeout = window.setTimeout(() => {\n this._resizeTimeout = null;\n for (let event of this.resizeEventSet) event();\n this.initMenuMobile();\n this.initToc();\n this.initSmoothScroll();\n this.initMermaid()\n }, 100);\n }\n }, false);\n }\n\n init() {\n this.initMenuMobile();\n this.initSwitchTheme();\n this.initHighlight();\n this.initTable();\n this.initHeaderLink();\n this.initMermaid();\n this.initEcharts();\n this.initMapbox();\n this.initTypeit();\n this.initToc();\n this.initSmoothScroll();\n\n this.onScroll();\n this.onResize();\n }\n }\n\n const themeInit = () => {\n const theme = new Theme();\n theme.init();\n };\n\n if (document.readyState !== 'loading') {\n themeInit();\n } else {\n document.addEventListener('DOMContentLoaded', themeInit, false);\n }\n})();\n"]} \ No newline at end of file +{"version":3,"sources":["../../src/js/theme.js"],"names":[],"mappings":"mlDAAM,CAAA,I,2HACM,C,CAAU,C,CAAS,CACvB,CAAQ,CAAG,CAAQ,EAAI,EADA,CAEvB,IAAK,GAAI,CAAA,CAAC,CAAG,CAAb,CAAgB,CAAC,CAAG,CAAQ,CAAC,MAA7B,CAAqC,CAAC,EAAtC,CACI,CAAO,CAAC,CAAQ,CAAC,CAAD,CAAT,CAEd,C,mDAEc,CACX,MAAQ,CAAA,QAAQ,CAAC,eAAT,EAA4B,QAAQ,CAAC,eAAT,CAAyB,SAAtD,EAAoE,QAAQ,CAAC,IAAT,CAAc,SAC5F,C,2CAEU,CACP,MAAO,CAAA,MAAM,CAAC,UAAP,CAAkB,oCAAlB,EAAwD,OAClE,C,iDAEa,CACV,MAAO,CAAA,MAAM,CAAC,UAAP,CAAkB,oCAAlB,EAAwD,OAClE,C,SAGC,K,yBACF,YAAc,yBACV,KAAK,MAAL,CAAc,MAAM,CAAC,MADX,CAEV,KAAK,WAAL,CAAmB,KAAK,MAAL,CAAY,OAFrB,CAGV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MAAxB,EAAgC,gBAAhC,CAAiD,OAAjD,CAA0D,UAAM,oCAC1C,CAAI,CAAC,iBADqC,MAC5D,+BAAS,CAAA,CAAT,SAA0C,CAAK,EAA/C,CAD4D,+BAE5D,QAAQ,CAAC,IAAT,CAAc,SAAd,CAAwB,MAAxB,CAA+B,MAA/B,CACH,CAHD,IAIH,C,mCAEM,CACH,KAAK,cAAL,EADG,CAEH,KAAK,eAAL,EAFG,CAGH,KAAK,UAAL,EAHG,CAIH,KAAK,gBAAL,EAJG,CAKH,KAAK,aAAL,EALG,CAMH,KAAK,SAAL,EANG,CAOH,KAAK,cAAL,EAPG,CAQH,KAAK,QAAL,EARG,CASH,KAAK,WAAL,EATG,CAUH,KAAK,WAAL,EAVG,CAWH,KAAK,UAAL,EAXG,CAYH,KAAK,UAAL,EAZG,CAaH,KAAK,OAAL,EAbG,CAcH,KAAK,WAAL,EAdG,CAeH,KAAK,gBAAL,EAfG,CAiBH,KAAK,QAAL,EAjBG,CAkBH,KAAK,QAAL,EAlBG,CAmBH,KAAK,WAAL,EACH,C,SAGC,SAAS,CAAG,UAAM,CACpB,GAAM,CAAA,CAAK,CAAG,GAAI,CAAA,KAAlB,CACA,CAAK,CAAC,IAAN,EACH,C,CAE2B,SAAxB,GAAA,QAAQ,CAAC,U,CAGT,QAAQ,CAAC,gBAAT,CAA0B,kBAA1B,CAA8C,SAA9C,I,CAFA,SAAS,E","file":"theme.min.js","sourcesContent":["class Util {\n forEach(elements, handler) {\n elements = elements || [];\n for (let i = 0; i < elements.length; i++) {\n handler(elements[i]);\n }\n }\n\n getScrollTop() {\n return (document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop;\n }\n\n isMobile() {\n return window.matchMedia('only screen and (max-width: 680px)').matches;\n }\n\n isTocStatic() {\n return window.matchMedia('only screen and (max-width: 960px)').matches;\n }\n}\n\nclass Theme {\n constructor() {\n this.config = window.config;\n this.contentData = this.config.content;\n this.isDark = document.body.classList.contains('dark');\n this.util = new Util();\n this.newScrollTop = this.util.getScrollTop();\n this.oldScrollTop = this.newScrollTop;\n this.scrollEventSet = new Set();\n this.resizeEventSet = new Set();\n this.switchThemeEventSet = new Set();\n this.clickMaskEventSet = new Set();\n }\n\n initMenuMobile() {\n const $menuToggleMobile = document.getElementById('menu-toggle-mobile');\n const $menuMobile = document.getElementById('menu-mobile');\n $menuToggleMobile.addEventListener('click', () => {\n document.body.classList.toggle('blur');\n $menuToggleMobile.classList.toggle('active');\n $menuMobile.classList.toggle('active');\n }, false);\n this._menuMobileOnClickMask = this._menuMobileOnClickMask || (() => {\n $menuToggleMobile.classList.remove('active');\n $menuMobile.classList.remove('active');\n });\n this.clickMaskEventSet.add(this._menuMobileOnClickMask);\n }\n\n initSwitchTheme() {\n this.util.forEach(document.getElementsByClassName('theme-switch'), $themeSwitch => {\n $themeSwitch.addEventListener('click', () => {\n document.body.classList.toggle('dark');\n this.isDark = !this.isDark;\n window.localStorage && localStorage.setItem('theme', this.isDark ? 'dark' : 'light');\n for (let event of this.switchThemeEventSet) event();\n }, false);\n });\n }\n\n initSearch() {\n const searchConfig = this.config.search;\n const isMobile = this.util.isMobile();\n if (!searchConfig || isMobile && this._searchMobileOnce || !isMobile && this._searchDesktopOnce) return;\n const classSuffix = isMobile ? 'mobile' : 'desktop';\n const $header = document.getElementById(`header-${classSuffix}`);\n const $searchInput = document.getElementById(`search-input-${classSuffix}`);\n const $searchToggle = document.getElementById(`search-toggle-${classSuffix}`);\n const $searchLoading = document.getElementById(`search-loading-${classSuffix}`);\n const $searchClear = document.getElementById(`search-clear-${classSuffix}`);\n if (isMobile) {\n this._searchMobileOnce = true;\n $searchInput.addEventListener('focus', () => {\n document.body.classList.add('blur');\n $header.classList.add('open');\n }, false);\n document.getElementById('search-cancel-mobile').addEventListener('click', () => {\n $header.classList.remove('open');\n document.body.classList.remove('blur');\n document.getElementById('menu-toggle-mobile').classList.remove('active');\n document.getElementById('menu-mobile').classList.remove('active');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n }, false);\n $searchClear.addEventListener('click', () => {\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n }, false);\n this._searchMobileOnClickMask = this._searchMobileOnClickMask || (() => {\n $header.classList.remove('open');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n });\n this.clickMaskEventSet.add(this._searchMobileOnClickMask);\n } else {\n this._searchDesktopOnce = true;\n $searchToggle.addEventListener('click', () => {\n document.body.classList.add('blur');\n $header.classList.add('open');\n $searchInput.focus();\n }, false);\n $searchClear.addEventListener('click', () => {\n $searchClear.style.display = 'none';\n this._searchDesktop && this._searchDesktop.autocomplete.setVal('');\n }, false);\n this._searchDesktopOnClickMask = this._searchDesktopOnClickMask || (() => {\n $header.classList.remove('open');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchDesktop && this._searchDesktop.autocomplete.setVal('');\n });\n this.clickMaskEventSet.add(this._searchDesktopOnClickMask);\n }\n $searchInput.addEventListener('input', () => {\n if ($searchInput.value === '') $searchClear.style.display = 'none';\n else $searchClear.style.display = 'inline';\n }, false);\n\n const CONTEXT_LENGTH = 200;\n const initAutosearch = () => {\n const autosearch = autocomplete(`#search-input-${classSuffix}`, {\n hint: false,\n autoselect: true,\n dropdownMenuContainer: `#search-dropdown-${classSuffix}`,\n clearOnSelected: true,\n cssClasses: { noPrefix: true },\n // debug: true,\n }, {\n name: 'search',\n source: (query, callback) => {\n $searchLoading.style.display = 'inline';\n $searchClear.style.display = 'none';\n const finish = (results) => {\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'inline';\n callback(results);\n };\n if (searchConfig.type === 'lunr') {\n const search = () => {\n if (lunr.queryHandler) query = lunr.queryHandler(query);\n return this._index.search(query).slice(0, 12).map(({ ref, matchData: { metadata } }) => {\n const matchData = this._indexData[ref];\n let { title, content: context } = matchData;\n let position = 0;\n Object.values(metadata).forEach(({ description, content }) => {\n if (description) {\n context = matchData.description;\n position = -1;\n } else if (content) {\n const matchPosition = content.position[0][0];\n if (matchPosition < position || position === 0) position = matchPosition;\n }\n });\n position -= CONTEXT_LENGTH / 5;\n if (position > 0) {\n position += context.substr(position, 25).lastIndexOf(' ') + 1;\n context = '...' + context.substr(position, CONTEXT_LENGTH);\n } else {\n context = context.substr(0, CONTEXT_LENGTH);\n }\n Object.keys(metadata).forEach(key => {\n title = title.replace(new RegExp(`(${key})`, 'gi'), '$1');\n context = context.replace(new RegExp(`(${key})`, 'gi'), '$1');\n });\n return {\n 'uri': matchData.uri,\n 'title' : title,\n 'date' : matchData.date,\n 'context' : context,\n };\n });\n }\n if (!this._index) {\n fetch(searchConfig.lunrIndexURL)\n .then(response => response.json())\n .then(data => {\n const indexData = {};\n this._index = lunr(function () {\n if (searchConfig.lunrLanguageCode) this.use(lunr[searchConfig.lunrLanguageCode]);\n this.ref('uri');\n this.field('title', { boost: 50 });\n this.field('tags', { boost: 20 });\n this.field('description', { boost: 10 });\n this.field('content', { boost: 5 });\n this.metadataWhitelist = ['position'];\n data.forEach((record) => {\n indexData[record.uri] = record;\n this.add(record);\n });\n });\n this._indexData = indexData;\n finish(search());\n }).catch(err => {\n console.error(err);\n finish([]);\n });\n } else finish(search());\n } else if (searchConfig.type === 'algolia') {\n $searchLoading.style.display = 'inline';\n $searchClear.style.display = 'none';\n this._algoliaIndex = this._algoliaIndex || algoliasearch(searchConfig.algoliaAppID, searchConfig.algoliaSearchKey).initIndex(searchConfig.algoliaIndex);\n this._algoliaIndex\n .search(query, { offset: 0, length: 12, attributesToHighlight: ['title', 'content'] })\n .then(({ hits }) => {\n finish(hits.map(({ uri, date, _highlightResult: { title, content } }) => ({\n uri: uri,\n title: title.value,\n date: date,\n context: content.value,\n })));\n })\n .catch(err => {\n console.error(err);\n finish([]);\n });\n }\n },\n templates: {\n suggestion: ({ title, date, context }) => `
${title}${date}
${context}
`,\n empty: ({ query }) => `
${searchConfig.noResultsFound}: \"${query}\"
`,\n footer: ({}) => {\n const { searchType, icon, href } = searchConfig.type === 'algolia' ? {\n searchType: 'algolia',\n icon: '',\n href: 'https://www.algolia.com/',\n } : {\n searchType: 'Lunr.js',\n icon: '',\n href: 'https://lunrjs.com/',\n };\n return ``;},\n },\n });\n autosearch.on('autocomplete:selected', (event, suggestion, dataset, context) => {\n window.location.assign(suggestion.uri);\n });\n if (isMobile) this._searchMobile = autosearch;\n else this._searchDesktop = autosearch;\n };\n if (searchConfig.lunrSegmentitURL && !document.getElementById('lunr-segmentit')) {\n const script = document.createElement('script');\n script.id = 'lunr-segmentit';\n script.type = 'text/javascript';\n script.src = searchConfig.lunrSegmentitURL;\n script.async = true;\n if (script.readyState) {\n script.onreadystatechange = () => {\n if (script.readyState == 'loaded' || script.readyState == 'complete'){\n script.onreadystatechange = null;\n initAutosearch();\n }\n };\n } else {\n script.onload = () => {\n initAutosearch();\n };\n }\n document.body.appendChild(script);\n } else initAutosearch();\n }\n\n initLightGallery() {\n if (this.config.lightGallery) lightGallery(document.getElementById('content'), this.config.lightGallery);\n }\n\n initHighlight() {\n this.util.forEach(document.querySelectorAll('.highlight > .chroma'), $chroma => {\n const $codes = $chroma.querySelectorAll('pre.chroma > code');\n const $code = $codes[$codes.length - 1];\n const lang = $code ? $code.className.toLowerCase() : '';\n $chroma.className += ' ' + lang;\n });\n this.util.forEach(document.querySelectorAll('.highlight > pre.chroma'), $preChroma => {\n const $chroma = document.createElement('div');\n $chroma.className = $preChroma.className;\n const $table = document.createElement('table');\n $chroma.appendChild($table);\n const $tbody = document.createElement('tbody');\n $table.appendChild($tbody);\n const $tr = document.createElement('tr');\n $tbody.appendChild($tr);\n const $td = document.createElement('td');\n $tr.appendChild($td);\n $preChroma.parentElement.replaceChild($chroma, $preChroma);\n $td.appendChild($preChroma);\n });\n }\n\n initTable() {\n this.util.forEach(document.querySelectorAll('.content table'), $table => {\n const $wrapper = document.createElement('div');\n $wrapper.className = 'table-wrapper';\n $table.parentElement.replaceChild($wrapper, $table);\n $wrapper.appendChild($table);\n });\n }\n\n initHeaderLink() {\n for (let num = 1; num <= 6; num++) {\n this.util.forEach(document.querySelectorAll('.page.single .content > h' + num), $header => {\n $header.classList.add('headerLink');\n $header.innerHTML = `${$header.innerHTML}`;\n });\n }\n }\n\n initToc() {\n const $tocCore = document.getElementById('TableOfContents');\n if ($tocCore === null) return;\n if (this.util.isTocStatic()) {\n const $tocContentStatic = document.getElementById('toc-content-static');\n if ($tocCore.parentElement !== $tocContentStatic) {\n $tocCore.parentElement.removeChild($tocCore);\n $tocContentStatic.appendChild($tocCore);\n }\n if (this._tocOnScroll) this.scrollEventSet.delete(this._tocOnScroll);\n } else {\n const $tocContentAuto = document.getElementById('toc-content-auto');\n if ($tocCore.parentElement !== $tocContentAuto) {\n $tocCore.parentElement.removeChild($tocCore);\n $tocContentAuto.appendChild($tocCore);\n }\n const $toc = document.getElementById('toc-auto');\n const $page = document.getElementsByClassName('page')[0];\n const rect = $page.getBoundingClientRect();\n $toc.style.left = `${rect.left + rect.width + 20}px`;\n $toc.style.maxWidth = `${$page.getBoundingClientRect().left - 20}px`;\n const $tocLinkElements = $tocCore.getElementsByTagName('a');\n const $tocLiElements = $tocCore.getElementsByTagName('li');\n const $headerLinkElements = document.getElementsByClassName('headerLink');\n const headerIsFixed = this.config.desktopHeaderMode !== 'normal';\n const headerHeight = document.getElementById('header-desktop').offsetHeight;\n const TOP_SPACING = 20 + (headerIsFixed ? headerHeight : 0);\n const minTocTop = $toc.offsetTop;\n const minScrollTop = minTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight);\n this._tocOnScroll = this._tocOnScroll || (() => {\n const footerTop = document.getElementById('post-footer').offsetTop;\n const maxTocTop = footerTop - $toc.getBoundingClientRect().height;\n const maxScrollTop = maxTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight);\n if (this.newScrollTop < minScrollTop) {\n $toc.style.position = 'absolute';\n $toc.style.top = `${minTocTop}px`;\n } else if (this.newScrollTop > maxScrollTop) {\n $toc.style.position = 'absolute';\n $toc.style.top = `${maxTocTop}px`;\n } else {\n $toc.style.position = 'fixed';\n $toc.style.top = `${TOP_SPACING}px`;\n }\n\n this.util.forEach($tocLinkElements, link => { link.classList.remove('active'); });\n this.util.forEach($tocLiElements, link => { link.classList.remove('has-active'); });\n const INDEX_SPACING = 20 + (headerIsFixed ? headerHeight : 0);\n let activeTocIndex = $headerLinkElements.length - 1;\n for (let i = 0; i < $headerLinkElements.length - 1; i++) {\n const thisTop = $headerLinkElements[i].getBoundingClientRect().top;\n const nextTop = $headerLinkElements[i + 1].getBoundingClientRect().top;\n if ((i == 0 && thisTop > INDEX_SPACING)\n || (thisTop <= INDEX_SPACING && nextTop > INDEX_SPACING)) {\n activeTocIndex = i;\n break;\n }\n }\n if (activeTocIndex !== -1) {\n $tocLinkElements[activeTocIndex].classList.add('active');\n let $parent = $tocLinkElements[activeTocIndex].parentElement;\n while ($parent !== $tocCore) {\n $parent.classList.add('has-active');\n $parent = $parent.parentElement.parentElement;\n }\n }\n });\n this._tocOnScroll();\n this.scrollEventSet.add(this._tocOnScroll);\n }\n }\n\n initMath() {\n if (this.config.math) renderMathInElement(document.body, this.config.math);\n }\n\n initMermaid() {\n const $mermaidElements = document.getElementsByClassName('mermaid');\n if ($mermaidElements.length) {\n mermaid.initialize({startOnLoad: false, theme: 'null'});\n this.util.forEach($mermaidElements, element => {\n mermaid.mermaidAPI.render('svg-' + element.id, this.contentData[element.id], svgCode => {\n element.innerHTML = svgCode;\n }, element);\n });\n }\n }\n\n initEcharts() {\n this._echartsOnSwitchTheme = this._echartsOnSwitchTheme || (() => {\n this._echartsArr = this._echartsArr || [];\n for (let i = 0; i < this._echartsArr.length; i++) {\n this._echartsArr[i].dispose();\n }\n this._echartsArr = [];\n this.util.forEach(document.getElementsByClassName('echarts'), element => {\n const chart = echarts.init(element, this.isDark ? 'dark' : 'macarons', {renderer: 'svg'});\n chart.setOption(JSON.parse(this.contentData[element.id]));\n this._echartsArr.push(chart);\n });\n });\n this.switchThemeEventSet.add(this._echartsOnSwitchTheme);\n this._echartsOnSwitchTheme();\n this._echartsOnResize = this._echartsOnResize || (() => {\n for (let i = 0; i < this._echartsArr.length; i++) {\n this._echartsArr[i].resize();\n }\n });\n this.resizeEventSet.add(this._echartsOnResize);\n }\n\n initMapbox() {\n if (this.config.mapbox) {\n mapboxgl.accessToken = this.config.mapbox.accessToken;\n mapboxgl.setRTLTextPlugin(this.config.mapbox.RTLTextPlugin);\n this._mapboxArr = this._mapboxArr || [];\n this.util.forEach(document.getElementsByClassName('mapbox'), element => {\n const { lng, lat, zoom, lightStyle, darkStyle, marked, navigation, geolocate, scale, fullscreen } = this.contentData[element.id];\n const options = this.contentData[element.id];\n const mapbox = new mapboxgl.Map({\n container: element,\n center: [lng, lat],\n zoom: zoom,\n minZoom: .2,\n style: this.isDark ? darkStyle : lightStyle,\n attributionControl: false,\n });\n if (marked) {\n new mapboxgl.Marker().setLngLat([lng, lat]).addTo(mapbox);\n }\n if (navigation) {\n mapbox.addControl(new mapboxgl.NavigationControl(), 'bottom-right');\n }\n if (geolocate) {\n mapbox.addControl(new mapboxgl.GeolocateControl({\n positionOptions: {\n enableHighAccuracy: true,\n },\n showUserLocation: true,\n trackUserLocation: true,\n }), 'bottom-right');\n }\n if (scale) {\n mapbox.addControl(new mapboxgl.ScaleControl());\n }\n if (fullscreen) {\n mapbox.addControl(new mapboxgl.FullscreenControl());\n }\n mapbox.addControl(new MapboxLanguage());\n this._mapboxArr.push(mapbox);\n });\n this._mapboxOnSwitchTheme = this._mapboxOnSwitchTheme || (() => {\n this.util.forEach(this._mapboxArr, mapbox => {\n const element = mapbox.getContainer();\n const { lightStyle, darkStyle } = this.contentData[element.id];\n mapbox.setStyle(this.isDark ? darkStyle : lightStyle);\n mapbox.addControl(new MapboxLanguage());\n });\n });\n this.switchThemeEventSet.add(this._mapboxOnSwitchTheme);\n }\n }\n\n initTypeit() {\n if (this.config.typeit) {\n const typeitData = this.config.typeit;\n for (let i = 0; i < typeitData.length; i++) {\n const group = typeitData[i];\n ((i) => {\n const id = group[i];\n if (i === group.length - 1) {\n new TypeIt(`#${id}`, {\n strings: this.contentData[id],\n }).go();\n return;\n }\n let instance = new TypeIt(`#${id}`, {\n strings: this.contentData[id],\n afterComplete: () => {\n instance.destroy();\n typeone(i + 1);\n },\n }).go();\n })(0);\n }\n }\n }\n\n initComment() {\n if (this.config.comment && this.config.comment.gitalk) {\n this.config.comment.gitalk.body = decodeURI(window.location.href);\n const gitalk = new Gitalk(this.config.comment.gitalk.body);\n gitalk.render('gitalk');\n }\n if (this.config.comment && this.config.comment.valine) new Valine(this.config.comment.valine);\n }\n\n initSmoothScroll() {\n if ((!this.util.isMobile() && this.config.desktopHeaderMode === 'normal')\n || (this.util.isMobile() && this.config.mobileHeaderMode === 'normal')) {\n new SmoothScroll('[href^=\"#\"]', {speed: 300, speedAsDuration: true});\n } else {\n new SmoothScroll('[href^=\"#\"]', {speed: 300, speedAsDuration: true, header: '#header-desktop'});\n }\n }\n\n onScroll() {\n const $headers = [];\n if (this.config.desktopHeaderMode === 'auto') $headers.push(document.getElementById('header-desktop'));\n if (this.config.mobileHeaderMode === 'auto') $headers.push(document.getElementById('header-mobile'));\n this.util.forEach($headers, $header => {\n $header.classList.add('animated');\n $header.classList.add('faster');\n });\n if (document.getElementById('comments')) {\n const $viewComments = document.getElementById('view-comments');\n $viewComments.href = `#comments`;\n $viewComments.style.display = 'block';\n }\n const $fixedButtons = document.getElementById('fixed-buttons');\n const MIN_SCROLL = 20;\n window.addEventListener('scroll', () => {\n this.newScrollTop = this.util.getScrollTop();\n const scroll = this.newScrollTop - this.oldScrollTop;\n this.util.forEach($headers, header => {\n if (scroll > MIN_SCROLL) {\n header.classList.remove('fadeInDown');\n header.classList.add('fadeOutUp');\n } else if (scroll < - MIN_SCROLL) {\n header.classList.remove('fadeOutUp');\n header.classList.add('fadeInDown');\n }\n });\n if (this.newScrollTop > MIN_SCROLL) {\n if (scroll > MIN_SCROLL) {\n $fixedButtons.classList.remove('fadeIn');\n $fixedButtons.classList.add('fadeOut');\n } else if (scroll < - MIN_SCROLL) {\n $fixedButtons.style.display = 'block';\n $fixedButtons.classList.remove('fadeOut');\n $fixedButtons.classList.add('fadeIn');\n }\n } else {\n $fixedButtons.style.display = 'none';\n }\n for (let event of this.scrollEventSet) event();\n this.oldScrollTop = this.newScrollTop;\n }, false);\n }\n\n onResize() {\n window.addEventListener('resize', () => {\n if (!this._resizeTimeout) {\n this._resizeTimeout = window.setTimeout(() => {\n this._resizeTimeout = null;\n for (let event of this.resizeEventSet) event();\n this.initToc();\n this.initSmoothScroll();\n this.initMermaid();\n this.initSearch();\n }, 100);\n }\n }, false);\n }\n\n onClickMask() {\n document.getElementById('mask').addEventListener('click', () => {\n for (let event of this.clickMaskEventSet) event();\n document.body.classList.remove('blur');\n }, false);\n }\n\n init() {\n this.initMenuMobile();\n this.initSwitchTheme();\n this.initSearch();\n this.initLightGallery();\n this.initHighlight();\n this.initTable();\n this.initHeaderLink();\n this.initMath();\n this.initMermaid();\n this.initEcharts();\n this.initMapbox();\n this.initTypeit();\n this.initToc();\n this.initComment();\n this.initSmoothScroll();\n\n this.onScroll();\n this.onResize();\n this.onClickMask();\n }\n}\n\nconst themeInit = () => {\n const theme = new Theme();\n theme.init();\n};\n\nif (document.readyState !== 'loading') {\n themeInit();\n} else {\n document.addEventListener('DOMContentLoaded', themeInit, false);\n}\n"]} \ No newline at end of file diff --git a/assets/lib/VERSION b/assets/lib/VERSION index 1137724b..c869132b 100644 --- a/assets/lib/VERSION +++ b/assets/lib/VERSION @@ -2,16 +2,19 @@ fontawesome-free@5.12.1 https://fontawesome.com/ forkawesome@1.1.7 https://forkaweso.me/Fork-Awesome/ animate.css@3.7.2 https://github.com/daneden/animate.css smooth-scroll@16.1.2 https://github.com/cferdinandi/smooth-scroll +autocomplete.js@0.37.1 https://github.com/algolia/autocomplete.js +lunr.js@2.3.8 https://lunrjs.com/ +algoliasearch@4.1.0 https://github.com/algolia/algoliasearch-client-javascript sharer@0.4.0 https://github.com/ellisonleao/sharer.js lazysizes@5.2.0 https://github.com/aFarkas/lazysizes lightgallery@1.1.3 lg-thumbnail@1.1.0 lg-zoom@1.1.0 https://github.com/sachinchoolur/lightgallery.js typeit@6.5.1 https://github.com/alexmacarthur/typeit -katex@0.11.1 https://github.com/KaTeX/KaTeX +katex@0.11.1 https://katex.org/ mermaid@8.4.8 https://github.com/knsv/mermaid -aplayer@1.10.1 https://github.com/MoePlayer/APlayer -meting@2.0.1 https://github.com/metowolf/MetingJS echarts@4.6.0 https://echarts.apache.org/ mapbox-gl@1.8.1 https://github.com/mapbox/mapbox-gl-js +aplayer@1.10.1 https://github.com/MoePlayer/APlayer +meting@2.0.1 https://github.com/metowolf/MetingJS gitalk@1.6.2 https://github.com/gitalk/gitalk valine@1.3.10 https://valine.js.org/ iconfont https://www.iconfont.cn/ diff --git a/assets/lib/algoliasearch/algoliasearch-lite.umd.min.js b/assets/lib/algoliasearch/algoliasearch-lite.umd.min.js new file mode 100644 index 00000000..181ba051 --- /dev/null +++ b/assets/lib/algoliasearch/algoliasearch-lite.umd.min.js @@ -0,0 +1,2 @@ +/*! algoliasearch-lite.umd.js | 4.1.0 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).algoliasearch=t()}(this,(function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(r){for(var n=1;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var r=[],n=!0,o=!1,a=void 0;try{for(var u,i=e[Symbol.iterator]();!(n=(u=i.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==i.return||i.return()}finally{if(o)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){var r=JSON.stringify(e),n=a()[r];return Promise.all([n||t(),void 0!==n])})).then((function(e){var t=o(e,2),n=t[0],a=t[1];return Promise.all([n,a||r.miss(n)])})).then((function(e){return o(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var o=a();return o[JSON.stringify(e)]=t,n().setItem(r,JSON.stringify(o)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=a();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function i(e){var t=a(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},n=t();return n.then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return o(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,o).catch((function(){return i({caches:t}).get(e,n,o)}))},set:function(e,n){return r.set(e,n).catch((function(){return i({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return i({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return i({caches:t}).clear()}))}}}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(r);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var u=n(),i=o&&o.miss||function(){return Promise.resolve()};return u.then((function(e){return i(e)})).then((function(){return u}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function c(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function l(e,t){return Object.keys(void 0!==t?t:{}).forEach((function(r){e[r]=t[r](e)})),e}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var m={Read:1,Write:2,Any:3},p=1,v=2,g=3;function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;return r({},e,{status:t,lastUpdate:Date.now()})}function b(e){return{protocol:e.protocol||"https",url:e.url,accept:e.accept||m.Any}}var O="GET",P="POST";function q(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(y(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===p||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===g&&Date.now()-e.lastUpdate<=12e4}(e)})),o=[].concat(a(r),a(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:o.length>0?o.map((function(e){return b(e)})):t}}))}function j(e,t,n,o){var u=[],i=function(e,t){if(e.method===O||void 0===e.data&&void 0===t.data)return;var n=Array.isArray(e.data)?e.data:r({},e.data,{},t.data);return JSON.stringify(n)}(n,o),s=function(e,t){var n=r({},e.headers,{},t.headers),o={};return Object.keys(n).forEach((function(e){var t=n[e];o[e.toLowerCase()]=t})),o}(e,o),c=n.method,l=n.method!==O?{}:r({},n.data,{},o.data),f=r({"x-algolia-agent":e.userAgent.value},e.queryParameters,{},l,{},o.queryParameters),h=0,d=function t(r,a){var l=r.pop();if(void 0===l)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:A(u)};var d={data:i,headers:s,method:c,url:w(l,n.path,f),connectTimeout:a(h,e.timeouts.connect),responseTimeout:a(h,o.timeout)},m=function(e){var t={request:d,response:e,host:l,triesLeft:r.length};return u.push(t),t},p={onSucess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(n){var o=m(n);return n.isTimedOut&&h++,Promise.all([e.logger.info("Retryable failure",x(o)),e.hostsCache.set(l,y(l,n.isTimedOut?g:v))]).then((function(){return t(r,a)}))},onFail:function(e){throw m(e),function(e,t){var r=e.content,n=e.status,o=r;try{o=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(o,n,t)}(e,A(u))}};return e.requester.send(d).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&0==~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSucess(e):t.onFail(e)}(e,p)}))};return q(e.hostsCache,t).then((function(e){return d(a(e.statelessHosts).reverse(),e.getTimeout)}))}function S(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function w(e,t,r){var n=T(r),o="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(o+="?".concat(n)),o}function T(e){return Object.keys(e).map((function(t){return f("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function A(e){return e.map((function(e){return x(e)}))}function x(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r({},e,{request:r({},e.request,{headers:r({},e.request.headers,{},t)})})}var C=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===h.WithinHeaders?n:{}},queryParameters:function(){return e===h.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:h.WithinHeaders,t,e.apiKey),a=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,a=e.requestsCache,u=e.responsesCache,i=e.timeouts,s=e.userAgent,c=e.hosts,l=e.queryParameters,f={hostsCache:t,logger:r,requester:n,requestsCache:a,responsesCache:u,timeouts:i,userAgent:s,headers:e.headers,queryParameters:l,hosts:c.map((function(e){return b(e)})),read:function(e,t){var r=d(t,f.timeouts.read),n=function(){return j(f,f.hosts.filter((function(e){return 0!=(e.accept&m.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var a={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(a,(function(){return f.requestsCache.get(a,(function(){return f.requestsCache.set(a,n()).then((function(e){return Promise.all([f.requestsCache.delete(a),e])}),(function(e){return Promise.all([f.requestsCache.delete(a),Promise.reject(e)])})).then((function(e){var t=o(e,2);t[0];return t[1]}))}))}),{miss:function(e){return f.responsesCache.set(a,e)}})},write:function(e,t){return j(f,f.hosts.filter((function(e){return 0!=(e.accept&m.Write)})),e,d(t,f.timeouts.write))}};return f}(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:m.Read},{url:"".concat(t,".algolia.net"),accept:m.Write}].concat(c([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e,{headers:r({},n.headers(),{},{"content-type":"application/x-www-form-urlencoded"},{},e.headers),queryParameters:r({},n.queryParameters(),{},e.queryParameters)}));return l({transporter:a,appId:t,addAlgoliaAgent:function(e,t){a.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then((function(){}))}},e.methods)},N=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={transporter:e.transporter,appId:e.appId,indexName:t};return l(n,r.methods)}},k=function(e){return function(t,n){var o=t.map((function(e){return r({},e,{params:T(e.params||{})})}));return e.transporter.read({method:P,path:"1/indexes/*/queries",data:{requests:o},cacheable:!0},n)}},J=function(e){return function(t,o){return Promise.all(t.map((function(t){var a=t.params,u=a.facetName,i=a.facetQuery,s=n(a,["facetName","facetQuery"]);return N(e)(t.indexName,{methods:{searchForFacetValues:I}}).searchForFacetValues(u,i,r({},o,{},s))})))}},E=function(e){return function(t,r){return e.transporter.read({method:P,path:f("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},I=function(e){return function(t,r,n){return e.transporter.read({method:P,path:f("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},F=1,R=2,D=3;function W(e,t,n){var o,a={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,o=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},a=o(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=o(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(o=D,{debug:function(e,t){return F>=o&&console.debug(e,t),Promise.resolve()},info:function(e,t){return R>=o&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:i({caches:[u({key:"".concat("4.1.0","-").concat(e)}),s()]}),userAgent:S("4.1.0").add({segment:"Browser",version:"lite"}),authMode:h.WithinQueryParameters};return C(r({},a,{},n,{methods:{search:k,searchForFacetValues:J,multipleQueries:k,multipleSearchForFacetValues:J,initIndex:function(e){return function(t){return N(e)(t,{methods:{search:E,searchForFacetValues:I}})}}}}))}return W.version="4.1.0",W})); \ No newline at end of file diff --git a/assets/lib/aplayer/dark.scss b/assets/lib/aplayer/dark.scss index 08d7bf14..4a26503e 100644 --- a/assets/lib/aplayer/dark.scss +++ b/assets/lib/aplayer/dark.scss @@ -1,4 +1,4 @@ -.dark-theme .aplayer { +.dark .aplayer { background: #212121; &.aplayer-withlist { diff --git a/assets/lib/autocomplete/autocomplete.min.js b/assets/lib/autocomplete/autocomplete.min.js new file mode 100644 index 00000000..e115402f --- /dev/null +++ b/assets/lib/autocomplete/autocomplete.min.js @@ -0,0 +1,7 @@ +/*! + * autocomplete.js 0.37.1 + * https://github.com/algolia/autocomplete.js + * Copyright 2020 Algolia, Inc. and other contributors; Licensed MIT + */ +!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports.autocomplete=b():a.autocomplete=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";a.exports=c(1)},function(a,b,c){"use strict";function d(a,b,c,d){c=f.isArray(c)?c:[].slice.call(arguments,2);var j=e(a).each(function(a,f){var j=e(f),k=new i({el:j}),l=d||new h({input:j,eventBus:k,dropdownMenuContainer:b.dropdownMenuContainer,hint:void 0===b.hint||!!b.hint,minLength:b.minLength,autoselect:b.autoselect,autoselectOnBlur:b.autoselectOnBlur,tabAutocomplete:b.tabAutocomplete,openOnFocus:b.openOnFocus,templates:b.templates,debug:b.debug,clearOnSelected:b.clearOnSelected,cssClasses:b.cssClasses,datasets:c,keyboardShortcuts:b.keyboardShortcuts,appendTo:b.appendTo,autoWidth:b.autoWidth,ariaLabel:b.ariaLabel||f.getAttribute("aria-label")});j.data(g,l)});return j.autocomplete={},f.each(["open","close","getVal","setVal","destroy","getWrapper"],function(a){j.autocomplete[a]=function(){var b,c=arguments;return j.each(function(d,f){var h=e(f).data(g);b=h[a].apply(h,c)}),b}}),j}var e=c(2);c(3).element=e;var f=c(4);f.isArray=e.isArray,f.isFunction=e.isFunction,f.isObject=e.isPlainObject,f.bind=e.proxy,f.each=function(a,b){function c(a,c){return b(c,a)}e.each(a,c)},f.map=e.map,f.mixin=e.extend,f.Event=e.Event;var g="aaAutocomplete",h=c(5),i=c(6);d.sources=h.sources,d.escapeHighlightedString=f.escapeHighlightedString;var j="autocomplete"in window,k=window.autocomplete;d.noConflict=function(){return j?window.autocomplete=k:delete window.autocomplete,d},a.exports=d},function(a,b){!function(b,c){a.exports=function(a){var b=function(){function b(a){return null==a?String(a):V[W.call(a)]||"object"}function c(a){return"function"==b(a)}function d(a){return null!=a&&a==a.window}function e(a){return null!=a&&a.nodeType==a.DOCUMENT_NODE}function f(a){return"object"==b(a)}function g(a){return f(a)&&!d(a)&&Object.getPrototypeOf(a)==Object.prototype}function h(a){var b=!!a&&"length"in a&&a.length,c=z.type(a);return"function"!=c&&!d(a)&&("array"==c||0===b||"number"==typeof b&&b>0&&b-1 in a)}function i(a){return F.call(a,function(a){return null!=a})}function j(a){return a.length>0?z.fn.concat.apply([],a):a}function k(a){return a.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function l(a){return a in J?J[a]:J[a]=new RegExp("(^|\\s)"+a+"(\\s|$)")}function m(a,b){return"number"!=typeof b||K[k(a)]?b:b+"px"}function n(a){var b,c;return I[a]||(b=H.createElement(a),H.body.appendChild(b),c=getComputedStyle(b,"").getPropertyValue("display"),b.parentNode.removeChild(b),"none"==c&&(c="block"),I[a]=c),I[a]}function o(a){return"children"in a?G.call(a.children):z.map(a.childNodes,function(a){if(1==a.nodeType)return a})}function p(a,b){var c,d=a?a.length:0;for(c=0;c]*>/,M=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,N=/^(?:body|html)$/i,O=["val","css","html","text","data","width","height","offset"],P=["after","prepend","before","append"],Q=H.createElement("table"),R=H.createElement("tr"),S={tr:H.createElement("tbody"),tbody:Q,thead:Q,tfoot:Q,td:R,th:R,"*":H.createElement("div")},T=/complete|loaded|interactive/,U=/^[\w-]*$/,V={},W=V.toString,X={},Y=H.createElement("div"),Z={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},$=Array.isArray||function(a){return a instanceof Array};return X.matches=function(a,b){if(!b||!a||1!==a.nodeType)return!1;var c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.matchesSelector;if(c)return c.call(a,b);var d,e=a.parentNode,f=!e;return f&&(e=Y).appendChild(a),d=~X.qsa(e,b).indexOf(a),f&&Y.removeChild(a),d},B=function(a){return a.replace(/-+(.)?/g,function(a,b){return b?b.toUpperCase():""})},C=function(a){return F.call(a,function(b,c){return a.indexOf(b)==c})},X.fragment=function(a,b,c){var d,e,f;return M.test(a)&&(d=z(H.createElement(RegExp.$1))),d||(a.replace&&(a=a.replace(/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,"<$1>")),b===x&&(b=L.test(a)&&RegExp.$1),b in S||(b="*"),f=S[b],f.innerHTML=""+a,d=z.each(G.call(f.childNodes),function(){f.removeChild(this)})),g(c)&&(e=z(d),z.each(c,function(a,b){O.indexOf(a)>-1?e[a](b):e.attr(a,b)})),d},X.Z=function(a,b){return new p(a,b)},X.isZ=function(a){return a instanceof X.Z},X.init=function(a,b){var d;if(!a)return X.Z();if("string"==typeof a)if(a=a.trim(),"<"==a[0]&&L.test(a))d=X.fragment(a,RegExp.$1,b),a=null;else{if(b!==x)return z(b).find(a);d=X.qsa(H,a)}else{if(c(a))return z(H).ready(a);if(X.isZ(a))return a;if($(a))d=i(a);else if(f(a))d=[a],a=null;else if(L.test(a))d=X.fragment(a.trim(),RegExp.$1,b),a=null;else{if(b!==x)return z(b).find(a);d=X.qsa(H,a)}}return X.Z(d,a)},z=function(a,b){return X.init(a,b)},z.extend=function(a){var b,c=G.call(arguments,1);return"boolean"==typeof a&&(b=a,a=c.shift()),c.forEach(function(c){q(a,c,b)}),a},X.qsa=function(a,b){var c,d="#"==b[0],e=!d&&"."==b[0],f=d||e?b.slice(1):b,g=U.test(f);return a.getElementById&&g&&d?(c=a.getElementById(f))?[c]:[]:1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType?[]:G.call(g&&!d&&a.getElementsByClassName?e?a.getElementsByClassName(f):a.getElementsByTagName(b):a.querySelectorAll(b))},z.contains=H.documentElement.contains?function(a,b){return a!==b&&a.contains(b)}:function(a,b){for(;b&&(b=b.parentNode);)if(b===a)return!0;return!1},z.type=b,z.isFunction=c,z.isWindow=d,z.isArray=$,z.isPlainObject=g,z.isEmptyObject=function(a){var b;for(b in a)return!1;return!0},z.isNumeric=function(a){var b=Number(a),c=typeof a;return null!=a&&"boolean"!=c&&("string"!=c||a.length)&&!isNaN(b)&&isFinite(b)||!1},z.inArray=function(a,b,c){return D.indexOf.call(b,a,c)},z.camelCase=B,z.trim=function(a){return null==a?"":String.prototype.trim.call(a)},z.uuid=0,z.support={},z.expr={},z.noop=function(){},z.map=function(a,b){var c,d,e,f=[];if(h(a))for(d=0;d=0?a:a+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(a){return D.every.call(this,function(b,c){return a.call(b,c,b)!==!1}),this},filter:function(a){return c(a)?this.not(this.not(a)):z(F.call(this,function(b){return X.matches(b,a)}))},add:function(a,b){return z(C(this.concat(z(a,b))))},is:function(a){return this.length>0&&X.matches(this[0],a)},not:function(a){var b=[];if(c(a)&&a.call!==x)this.each(function(c){a.call(this,c)||b.push(this)});else{var d="string"==typeof a?this.filter(a):h(a)&&c(a.item)?G.call(a):z(a);this.forEach(function(a){d.indexOf(a)<0&&b.push(a)})}return z(b)},has:function(a){return this.filter(function(){return f(a)?z.contains(this,a):z(this).find(a).size()})},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){var a=this[0];return a&&!f(a)?a:z(a)},last:function(){var a=this[this.length-1];return a&&!f(a)?a:z(a)},find:function(a){var b=this;return a?"object"==typeof a?z(a).filter(function(){var a=this;return D.some.call(b,function(b){return z.contains(b,a)})}):1==this.length?z(X.qsa(this[0],a)):this.map(function(){return X.qsa(this,a)}):z()},closest:function(a,b){var c=[],d="object"==typeof a&&z(a);return this.each(function(f,g){for(;g&&!(d?d.indexOf(g)>=0:X.matches(g,a));)g=g!==b&&!e(g)&&g.parentNode;g&&c.indexOf(g)<0&&c.push(g)}),z(c)},parents:function(a){for(var b=[],c=this;c.length>0;)c=z.map(c,function(a){if((a=a.parentNode)&&!e(a)&&b.indexOf(a)<0)return b.push(a),a});return r(b,a)},parent:function(a){return r(C(this.pluck("parentNode")),a)},children:function(a){return r(this.map(function(){return o(this)}),a)},contents:function(){return this.map(function(){return this.contentDocument||G.call(this.childNodes)})},siblings:function(a){return r(this.map(function(a,b){return F.call(o(b.parentNode),function(a){return a!==b})}),a)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(a){return z.map(this,function(b){return b[a]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=n(this.nodeName))})},replaceWith:function(a){return this.before(a).remove()},wrap:function(a){var b=c(a);if(this[0]&&!b)var d=z(a).get(0),e=d.parentNode||this.length>1;return this.each(function(c){z(this).wrapAll(b?a.call(this,c):e?d.cloneNode(!0):d)})},wrapAll:function(a){if(this[0]){z(this[0]).before(a=z(a));for(var b;(b=a.children()).length;)a=b.first();z(a).append(this)}return this},wrapInner:function(a){var b=c(a);return this.each(function(c){var d=z(this),e=d.contents(),f=b?a.call(this,c):a;e.length?e.wrapAll(f):d.append(f)})},unwrap:function(){return this.parent().each(function(){z(this).replaceWith(z(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(a){return this.each(function(){var b=z(this);(a===x?"none"==b.css("display"):a)?b.show():b.hide()})},prev:function(a){return z(this.pluck("previousElementSibling")).filter(a||"*")},next:function(a){return z(this.pluck("nextElementSibling")).filter(a||"*")},html:function(a){return 0 in arguments?this.each(function(b){var c=this.innerHTML;z(this).empty().append(s(this,a,b,c))}):0 in this?this[0].innerHTML:null},text:function(a){return 0 in arguments?this.each(function(b){var c=s(this,a,b,this.textContent);this.textContent=null==c?"":""+c}):0 in this?this.pluck("textContent").join(""):null},attr:function(a,b){var c;return"string"!=typeof a||1 in arguments?this.each(function(c){if(1===this.nodeType)if(f(a))for(y in a)t(this,y,a[y]);else t(this,a,s(this,b,c,this.getAttribute(a)))}):0 in this&&1==this[0].nodeType&&null!=(c=this[0].getAttribute(a))?c:x},removeAttr:function(a){return this.each(function(){1===this.nodeType&&a.split(" ").forEach(function(a){t(this,a)},this)})},prop:function(a,b){return a=Z[a]||a,1 in arguments?this.each(function(c){this[a]=s(this,b,c,this[a])}):this[0]&&this[0][a]},removeProp:function(a){return a=Z[a]||a,this.each(function(){delete this[a]})},data:function(a,b){var c="data-"+a.replace(/([A-Z])/g,"-$1").toLowerCase(),d=1 in arguments?this.attr(c,b):this.attr(c);return null!==d?v(d):x},val:function(a){return 0 in arguments?(null==a&&(a=""),this.each(function(b){this.value=s(this,a,b,this.value)})):this[0]&&(this[0].multiple?z(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(b){if(b)return this.each(function(a){var c=z(this),d=s(this,b,a,c.offset()),e=c.offsetParent().offset(),f={top:d.top-e.top,left:d.left-e.left};"static"==c.css("position")&&(f.position="relative"),c.css(f)});if(!this.length)return null;if(H.documentElement!==this[0]&&!z.contains(H.documentElement,this[0]))return{top:0,left:0};var c=this[0].getBoundingClientRect();return{left:c.left+a.pageXOffset,top:c.top+a.pageYOffset,width:Math.round(c.width),height:Math.round(c.height)}},css:function(a,c){if(arguments.length<2){var d=this[0];if("string"==typeof a){if(!d)return;return d.style[B(a)]||getComputedStyle(d,"").getPropertyValue(a)}if($(a)){if(!d)return;var e={},f=getComputedStyle(d,"");return z.each(a,function(a,b){e[b]=d.style[B(b)]||f.getPropertyValue(b)}),e}}var g="";if("string"==b(a))c||0===c?g=k(a)+":"+m(a,c):this.each(function(){this.style.removeProperty(k(a))});else for(y in a)a[y]||0===a[y]?g+=k(y)+":"+m(y,a[y])+";":this.each(function(){this.style.removeProperty(k(y))});return this.each(function(){this.style.cssText+=";"+g})},index:function(a){return a?this.indexOf(z(a)[0]):this.parent().children().indexOf(this[0])},hasClass:function(a){return!!a&&D.some.call(this,function(a){return this.test(u(a))},l(a))},addClass:function(a){return a?this.each(function(b){if("className"in this){A=[];var c=u(this);s(this,a,b,c).split(/\s+/g).forEach(function(a){z(this).hasClass(a)||A.push(a)},this),A.length&&u(this,c+(c?" ":"")+A.join(" "))}}):this},removeClass:function(a){return this.each(function(b){if("className"in this){if(a===x)return u(this,"");A=u(this),s(this,a,b,A).split(/\s+/g).forEach(function(a){A=A.replace(l(a)," ")}),u(this,A.trim())}})},toggleClass:function(a,b){return a?this.each(function(c){var d=z(this);s(this,a,c,u(this)).split(/\s+/g).forEach(function(a){(b===x?!d.hasClass(a):b)?d.addClass(a):d.removeClass(a)})}):this},scrollTop:function(a){if(this.length){var b="scrollTop"in this[0];return a===x?b?this[0].scrollTop:this[0].pageYOffset:this.each(b?function(){this.scrollTop=a}:function(){this.scrollTo(this.scrollX,a)})}},scrollLeft:function(a){if(this.length){var b="scrollLeft"in this[0];return a===x?b?this[0].scrollLeft:this[0].pageXOffset:this.each(b?function(){this.scrollLeft=a}:function(){this.scrollTo(a,this.scrollY)})}},position:function(){if(this.length){var a=this[0],b=this.offsetParent(),c=this.offset(),d=N.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(z(a).css("margin-top"))||0,c.left-=parseFloat(z(a).css("margin-left"))||0,d.top+=parseFloat(z(b[0]).css("border-top-width"))||0,d.left+=parseFloat(z(b[0]).css("border-left-width"))||0,{top:c.top-d.top,left:c.left-d.left}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||H.body;a&&!N.test(a.nodeName)&&"static"==z(a).css("position");)a=a.offsetParent;return a})}},z.fn.detach=z.fn.remove,["width","height"].forEach(function(a){var b=a.replace(/./,function(a){return a[0].toUpperCase()});z.fn[a]=function(c){var f,g=this[0];return c===x?d(g)?g["inner"+b]:e(g)?g.documentElement["scroll"+b]:(f=this.offset())&&f[a]:this.each(function(b){g=z(this),g.css(a,s(this,c,b,g[a]()))})}}),P.forEach(function(c,d){var e=d%2;z.fn[c]=function(){var c,f,g=z.map(arguments,function(a){var d=[];return c=b(a),"array"==c?(a.forEach(function(a){return a.nodeType!==x?d.push(a):z.zepto.isZ(a)?d=d.concat(a.get()):void(d=d.concat(X.fragment(a)))}),d):"object"==c||null==a?a:X.fragment(a)}),h=this.length>1;return g.length<1?this:this.each(function(b,c){f=e?c:c.parentNode,c=0==d?c.nextSibling:1==d?c.firstChild:2==d?c:null;var i=z.contains(H.documentElement,f);g.forEach(function(b){if(h)b=b.cloneNode(!0);else if(!f)return z(b).remove();f.insertBefore(b,c),i&&w(b,function(b){if(!(null==b.nodeName||"SCRIPT"!==b.nodeName.toUpperCase()||b.type&&"text/javascript"!==b.type||b.src)){var c=b.ownerDocument?b.ownerDocument.defaultView:a;c.eval.call(c,b.innerHTML)}})})})},z.fn[e?c+"To":"insert"+(d?"Before":"After")]=function(a){return z(a)[c](this),this}}),X.Z.prototype=p.prototype=z.fn,X.uniq=C,X.deserializeValue=v,z.zepto=X,z}();return function(b){function c(a){return a._zid||(a._zid=n++)}function d(a,b,d,g){if(b=e(b),b.ns)var h=f(b.ns);return(r[c(a)]||[]).filter(function(a){return a&&(!b.e||a.e==b.e)&&(!b.ns||h.test(a.ns))&&(!d||c(a.fn)===c(d))&&(!g||a.sel==g)})}function e(a){var b=(""+a).split(".");return{e:b[0],ns:b.slice(1).sort().join(" ")}}function f(a){return new RegExp("(?:^| )"+a.replace(" "," .* ?")+"(?: |$)")}function g(a,b){return a.del&&!t&&a.e in u||!!b}function h(a){return v[a]||t&&u[a]||a}function i(a,d,f,i,j,l,n){var o=c(a),p=r[o]||(r[o]=[]);d.split(/\s/).forEach(function(c){if("ready"==c)return b(document).ready(f);var d=e(c);d.fn=f,d.sel=j,d.e in v&&(f=function(a){var c=a.relatedTarget;if(!c||c!==this&&!b.contains(this,c))return d.fn.apply(this,arguments)}),d.del=l;var o=l||f;d.proxy=function(b){if(b=k(b),!b.isImmediatePropagationStopped()){try{var c=Object.getOwnPropertyDescriptor(b,"data");c&&!c.writable||(b.data=i)}catch(b){}var d=o.apply(a,b._args==m?[b]:[b].concat(b._args));return d===!1&&(b.preventDefault(),b.stopPropagation()),d}},d.i=p.length,p.push(d),"addEventListener"in a&&a.addEventListener(h(d.e),d.proxy,g(d,n))})}function j(a,b,e,f,i){var j=c(a);(b||"").split(/\s/).forEach(function(b){d(a,b,e,f).forEach(function(b){delete r[j][b.i],"removeEventListener"in a&&a.removeEventListener(h(b.e),b.proxy,g(b,i))})})}function k(a,c){if(c||!a.isDefaultPrevented){c||(c=a),b.each(z,function(b,d){var e=c[b];a[b]=function(){return this[d]=w,e&&e.apply(c,arguments)},a[d]=x});try{a.timeStamp||(a.timeStamp=Date.now())}catch(a){}(c.defaultPrevented!==m?c.defaultPrevented:"returnValue"in c?c.returnValue===!1:c.getPreventDefault&&c.getPreventDefault())&&(a.isDefaultPrevented=w)}return a}function l(a){var b,c={originalEvent:a};for(b in a)y.test(b)||a[b]===m||(c[b]=a[b]);return k(c,a)}var m,n=1,o=Array.prototype.slice,p=b.isFunction,q=function(a){return"string"==typeof a},r={},s={},t="onfocusin"in a,u={focus:"focusin",blur:"focusout"},v={mouseenter:"mouseover",mouseleave:"mouseout"};s.click=s.mousedown=s.mouseup=s.mousemove="MouseEvents",b.event={add:i,remove:j},b.proxy=function(a,d){var e=2 in arguments&&o.call(arguments,2);if(p(a)){var f=function(){return a.apply(d,e?e.concat(o.call(arguments)):arguments)};return f._zid=c(a),f}if(q(d))return e?(e.unshift(a[d],a),b.proxy.apply(null,e)):b.proxy(a[d],a);throw new TypeError("expected function")},b.fn.bind=function(a,b,c){return this.on(a,b,c)},b.fn.unbind=function(a,b){return this.off(a,b)},b.fn.one=function(a,b,c,d){return this.on(a,b,c,d,1)};var w=function(){return!0},x=function(){return!1},y=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,z={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};b.fn.delegate=function(a,b,c){return this.on(b,a,c)},b.fn.undelegate=function(a,b,c){return this.off(b,a,c)},b.fn.live=function(a,c){return b(document.body).delegate(this.selector,a,c),this},b.fn.die=function(a,c){return b(document.body).undelegate(this.selector,a,c),this},b.fn.on=function(a,c,d,e,f){var g,h,k=this;return a&&!q(a)?(b.each(a,function(a,b){k.on(a,c,d,b,f)}),k):(q(c)||p(e)||e===!1||(e=d,d=c,c=m),e!==m&&d!==!1||(e=d,d=m),e===!1&&(e=x),k.each(function(k,m){f&&(g=function(a){return j(m,a.type,e),e.apply(this,arguments)}),c&&(h=function(a){var d,f=b(a.target).closest(c,m).get(0);if(f&&f!==m)return d=b.extend(l(a),{currentTarget:f,liveFired:m}),(g||e).apply(f,[d].concat(o.call(arguments,1)))}),i(m,a,e,d,c,h||g)}))},b.fn.off=function(a,c,d){var e=this;return a&&!q(a)?(b.each(a,function(a,b){e.off(a,c,b)}),e):(q(c)||p(d)||d===!1||(d=c,c=m),d===!1&&(d=x),e.each(function(){j(this,a,d,c)}))},b.fn.trigger=function(a,c){return a=q(a)||b.isPlainObject(a)?b.Event(a):k(a),a._args=c,this.each(function(){a.type in u&&"function"==typeof this[a.type]?this[a.type]():"dispatchEvent"in this?this.dispatchEvent(a):b(this).triggerHandler(a,c)})},b.fn.triggerHandler=function(a,c){var e,f;return this.each(function(g,h){e=l(q(a)?b.Event(a):a),e._args=c,e.target=h,b.each(d(h,a.type||a),function(a,b){if(f=b.proxy(e),e.isImmediatePropagationStopped())return!1})}),f},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(a){b.fn[a]=function(b){return 0 in arguments?this.bind(a,b):this.trigger(a)}}),b.Event=function(a,b){q(a)||(b=a,a=b.type);var c=document.createEvent(s[a]||"Events"),d=!0;if(b)for(var e in b)"bubbles"==e?d=!!b[e]:c[e]=b[e];return c.initEvent(a,d,!0),k(c)}}(b),function(a){var b,c=[];a.fn.remove=function(){return this.each(function(){this.parentNode&&("IMG"===this.tagName&&(c.push(this),this.src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",b&&clearTimeout(b),b=setTimeout(function(){c=[]},6e4)),this.parentNode.removeChild(this))})}}(b),function(a){function b(b,d){var i=b[h],j=i&&e[i];if(void 0===d)return j||c(b);if(j){if(d in j)return j[d];var k=g(d);if(k in j)return j[k]}return f.call(a(b),d)}function c(b,c,f){var i=b[h]||(b[h]=++a.uuid),j=e[i]||(e[i]=d(b));return void 0!==c&&(j[g(c)]=f),j}function d(b){var c={};return a.each(b.attributes||i,function(b,d){0==d.name.indexOf("data-")&&(c[g(d.name.replace("data-",""))]=a.zepto.deserializeValue(d.value))}),c}var e={},f=a.fn.data,g=a.camelCase,h=a.expando="Zepto"+ +new Date,i=[];a.fn.data=function(d,e){return void 0===e?a.isPlainObject(d)?this.each(function(b,e){a.each(d,function(a,b){c(e,a,b)})}):0 in this?b(this[0],d):void 0:this.each(function(){c(this,d,e)})},a.data=function(b,c,d){return a(b).data(c,d)},a.hasData=function(b){var c=b[h],d=c&&e[c];return!!d&&!a.isEmptyObject(d)},a.fn.removeData=function(b){return"string"==typeof b&&(b=b.split(/\s+/)),this.each(function(){var c=this[h],d=c&&e[c];d&&a.each(b||d,function(a){delete d[b?g(this):a]})})},["remove","empty"].forEach(function(b){var c=a.fn[b];a.fn[b]=function(){var a=this.find("*");return"remove"===b&&(a=a.add(this)),a.removeData(),c.call(this)}})}(b),b}(b)}(window)},function(a,b){"use strict";a.exports={element:null}},function(a,b,c){"use strict";function d(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var e=c(3);a.exports={isArray:null,isFunction:null,isObject:null,bind:null,each:null,map:null,mixin:null,isMsie:function(a){if(void 0===a&&(a=navigator.userAgent),/(msie|trident)/i.test(a)){var b=a.match(/(msie |rv:)(\d+(.\d+)?)/i);if(b)return b[2]}return!1},escapeRegExChars:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isNumber:function(a){return"number"==typeof a},toStr:function(a){return void 0===a||null===a?"":a+""},cloneDeep:function(a){var b=this.mixin({},a),c=this;return this.each(b,function(a,d){a&&(c.isArray(a)?b[d]=[].concat(a):c.isObject(a)&&(b[d]=c.cloneDeep(a)))}),b},error:function(a){throw new Error(a)},every:function(a,b){var c=!0;return a?(this.each(a,function(d,e){c&&(c=b.call(null,d,e,a)&&c)}),!!c):c},any:function(a,b){var c=!1;return a?(this.each(a,function(d,e){if(b.call(null,d,e,a))return c=!0,!1}),c):c},getUniqueId:function(){var a=0;return function(){return a++}}(),templatify:function(a){if(this.isFunction(a))return a;var b=e.element(a);return"SCRIPT"===b.prop("tagName")?function(){return b.text()}:function(){return String(a)}},defer:function(a){setTimeout(a,0)},noop:function(){},formatPrefix:function(a,b){return b?"":a+"-"},className:function(a,b,c){return(c?"":".")+a+b},escapeHighlightedString:function(a,b,c){b=b||"";var e=document.createElement("div");e.appendChild(document.createTextNode(b)),c=c||"";var f=document.createElement("div");f.appendChild(document.createTextNode(c));var g=document.createElement("div");return g.appendChild(document.createTextNode(a)),g.innerHTML.replace(RegExp(d(e.innerHTML),"g"),b).replace(RegExp(d(f.innerHTML),"g"),c)}}},function(a,b,c){"use strict";function d(a){var b,c;if(a=a||{},a.input||i.error("missing input"),this.isActivated=!1,this.debug=!!a.debug,this.autoselect=!!a.autoselect,this.autoselectOnBlur=!!a.autoselectOnBlur,this.openOnFocus=!!a.openOnFocus,this.minLength=i.isNumber(a.minLength)?a.minLength:1,this.autoWidth=void 0===a.autoWidth||!!a.autoWidth,this.clearOnSelected=!!a.clearOnSelected,this.tabAutocomplete=void 0===a.tabAutocomplete||!!a.tabAutocomplete,a.hint=!!a.hint,a.hint&&a.appendTo)throw new Error("[autocomplete.js] hint and appendTo options can't be used at the same time");this.css=a.css=i.mixin({},o,a.appendTo?o.appendTo:{}),this.cssClasses=a.cssClasses=i.mixin({},o.defaultClasses,a.cssClasses||{}),this.cssClasses.prefix=a.cssClasses.formattedPrefix=i.formatPrefix(this.cssClasses.prefix,this.cssClasses.noPrefix),this.listboxId=a.listboxId=[this.cssClasses.root,"listbox",i.getUniqueId()].join("-");var f=e(a);this.$node=f.wrapper;var g=this.$input=f.input;b=f.menu,c=f.hint,a.dropdownMenuContainer&&j.element(a.dropdownMenuContainer).css("position","relative").append(b.css("top","0")),g.on("blur.aa",function(a){var c=document.activeElement;i.isMsie()&&(b[0]===c||b[0].contains(c))&&(a.preventDefault(),a.stopImmediatePropagation(),i.defer(function(){g.focus()}))}),b.on("mousedown.aa",function(a){a.preventDefault()}),this.eventBus=a.eventBus||new k({el:g}),this.dropdown=new d.Dropdown({appendTo:a.appendTo,wrapper:this.$node,menu:b,datasets:a.datasets,templates:a.templates,cssClasses:a.cssClasses,minLength:this.minLength}).onSync("suggestionClicked",this._onSuggestionClicked,this).onSync("cursorMoved",this._onCursorMoved,this).onSync("cursorRemoved",this._onCursorRemoved,this).onSync("opened",this._onOpened,this).onSync("closed",this._onClosed,this).onSync("shown",this._onShown,this).onSync("empty",this._onEmpty,this).onSync("redrawn",this._onRedrawn,this).onAsync("datasetRendered",this._onDatasetRendered,this),this.input=new d.Input({input:g,hint:c}).onSync("focused",this._onFocused,this).onSync("blurred",this._onBlurred,this).onSync("enterKeyed",this._onEnterKeyed,this).onSync("tabKeyed",this._onTabKeyed,this).onSync("escKeyed",this._onEscKeyed,this).onSync("upKeyed",this._onUpKeyed,this).onSync("downKeyed",this._onDownKeyed,this).onSync("leftKeyed",this._onLeftKeyed,this).onSync("rightKeyed",this._onRightKeyed,this).onSync("queryChanged",this._onQueryChanged,this).onSync("whitespaceChanged",this._onWhitespaceChanged,this),this._bindKeyboardShortcuts(a),this._setLanguageDirection()}function e(a){var b,c,d,e;b=j.element(a.input),c=j.element(n.wrapper.replace("%ROOT%",a.cssClasses.root)).css(a.css.wrapper),a.appendTo||"block"!==b.css("display")||"table"!==b.parent().css("display")||c.css("display","table-cell");var g=n.dropdown.replace("%PREFIX%",a.cssClasses.prefix).replace("%DROPDOWN_MENU%",a.cssClasses.dropdownMenu);d=j.element(g).css(a.css.dropdown).attr({role:"listbox",id:a.listboxId}),a.templates&&a.templates.dropdownMenu&&d.html(i.templatify(a.templates.dropdownMenu)()),e=b.clone().css(a.css.hint).css(f(b)),e.val("").addClass(i.className(a.cssClasses.prefix,a.cssClasses.hint,!0)).removeAttr("id name placeholder required").prop("readonly",!0).attr({"aria-hidden":"true",autocomplete:"off",spellcheck:"false",tabindex:-1}),e.removeData&&e.removeData(),b.data(h,{"aria-autocomplete":b.attr("aria-autocomplete"),"aria-expanded":b.attr("aria-expanded"),"aria-owns":b.attr("aria-owns"),autocomplete:b.attr("autocomplete"),dir:b.attr("dir"),role:b.attr("role"),spellcheck:b.attr("spellcheck"),style:b.attr("style"),type:b.attr("type")}),b.addClass(i.className(a.cssClasses.prefix,a.cssClasses.input,!0)).attr({autocomplete:"off",spellcheck:!1,role:"combobox","aria-autocomplete":a.datasets&&a.datasets[0]&&a.datasets[0].displayKey?"both":"list","aria-expanded":"false","aria-label":a.ariaLabel,"aria-owns":a.listboxId}).css(a.hint?a.css.input:a.css.inputWithNoHint);try{b.attr("dir")||b.attr("dir","auto")}catch(a){}return c=a.appendTo?c.appendTo(j.element(a.appendTo).eq(0)).eq(0):b.wrap(c).parent(),c.prepend(a.hint?e:null).append(d),{wrapper:c,input:b,hint:e,menu:d}}function f(a){return{backgroundAttachment:a.css("background-attachment"),backgroundClip:a.css("background-clip"),backgroundColor:a.css("background-color"),backgroundImage:a.css("background-image"),backgroundOrigin:a.css("background-origin"),backgroundPosition:a.css("background-position"),backgroundRepeat:a.css("background-repeat"),backgroundSize:a.css("background-size")}}function g(a,b){var c=a.find(i.className(b.prefix,b.input));i.each(c.data(h),function(a,b){void 0===a?c.removeAttr(b):c.attr(b,a)}),c.detach().removeClass(i.className(b.prefix,b.input,!0)).insertAfter(a),c.removeData&&c.removeData(h),a.remove()}var h="aaAttrs",i=c(4),j=c(3),k=c(6),l=c(7),m=c(16),n=c(18),o=c(19);i.mixin(d.prototype,{_bindKeyboardShortcuts:function(a){if(a.keyboardShortcuts){var b=this.$input,c=[];i.each(a.keyboardShortcuts,function(a){"string"==typeof a&&(a=a.toUpperCase().charCodeAt(0)),c.push(a)}),j.element(document).keydown(function(a){var d=a.target||a.srcElement,e=d.tagName;if(!d.isContentEditable&&"INPUT"!==e&&"SELECT"!==e&&"TEXTAREA"!==e){var f=a.which||a.keyCode;c.indexOf(f)!==-1&&(b.focus(),a.stopPropagation(),a.preventDefault())}})}},_onSuggestionClicked:function(a,b){var c,d={selectionMethod:"click"};(c=this.dropdown.getDatumForSuggestion(b))&&this._select(c,d)},_onCursorMoved:function(a,b){var c=this.dropdown.getDatumForCursor(),d=this.dropdown.getCurrentCursor().attr("id");this.input.setActiveDescendant(d),c&&(b&&this.input.setInputValue(c.value,!0),this.eventBus.trigger("cursorchanged",c.raw,c.datasetName))},_onCursorRemoved:function(){this.input.resetInputValue(),this._updateHint(),this.eventBus.trigger("cursorremoved")},_onDatasetRendered:function(){this._updateHint(),this.eventBus.trigger("updated")},_onOpened:function(){this._updateHint(),this.input.expand(),this.eventBus.trigger("opened")},_onEmpty:function(){this.eventBus.trigger("empty")},_onRedrawn:function(){this.$node.css("top","0px"),this.$node.css("left","0px");var a=this.$input[0].getBoundingClientRect();this.autoWidth&&this.$node.css("width",a.width+"px");var b=this.$node[0].getBoundingClientRect(),c=a.bottom-b.top;this.$node.css("top",c+"px");var d=a.left-b.left;this.$node.css("left",d+"px"),this.eventBus.trigger("redrawn")},_onShown:function(){this.eventBus.trigger("shown"),this.autoselect&&this.dropdown.cursorTopSuggestion()},_onClosed:function(){this.input.clearHint(),this.input.removeActiveDescendant(),this.input.collapse(),this.eventBus.trigger("closed")},_onFocused:function(){if(this.isActivated=!0,this.openOnFocus){var a=this.input.getQuery();a.length>=this.minLength?this.dropdown.update(a):this.dropdown.empty(),this.dropdown.open()}},_onBlurred:function(){var a,b;a=this.dropdown.getDatumForCursor(),b=this.dropdown.getDatumForTopSuggestion();var c={selectionMethod:"blur"};this.debug||(this.autoselectOnBlur&&a?this._select(a,c):this.autoselectOnBlur&&b?this._select(b,c):(this.isActivated=!1,this.dropdown.empty(),this.dropdown.close()))},_onEnterKeyed:function(a,b){var c,d +;c=this.dropdown.getDatumForCursor(),d=this.dropdown.getDatumForTopSuggestion();var e={selectionMethod:"enterKey"};c?(this._select(c,e),b.preventDefault()):this.autoselect&&d&&(this._select(d,e),b.preventDefault())},_onTabKeyed:function(a,b){if(!this.tabAutocomplete)return void this.dropdown.close();var c,d={selectionMethod:"tabKey"};(c=this.dropdown.getDatumForCursor())?(this._select(c,d),b.preventDefault()):this._autocomplete(!0)},_onEscKeyed:function(){this.dropdown.close(),this.input.resetInputValue()},_onUpKeyed:function(){var a=this.input.getQuery();this.dropdown.isEmpty&&a.length>=this.minLength?this.dropdown.update(a):this.dropdown.moveCursorUp(),this.dropdown.open()},_onDownKeyed:function(){var a=this.input.getQuery();this.dropdown.isEmpty&&a.length>=this.minLength?this.dropdown.update(a):this.dropdown.moveCursorDown(),this.dropdown.open()},_onLeftKeyed:function(){"rtl"===this.dir&&this._autocomplete()},_onRightKeyed:function(){"ltr"===this.dir&&this._autocomplete()},_onQueryChanged:function(a,b){this.input.clearHintIfInvalid(),b.length>=this.minLength?this.dropdown.update(b):this.dropdown.empty(),this.dropdown.open(),this._setLanguageDirection()},_onWhitespaceChanged:function(){this._updateHint(),this.dropdown.open()},_setLanguageDirection:function(){var a=this.input.getLanguageDirection();this.dir!==a&&(this.dir=a,this.$node.css("direction",a),this.dropdown.setLanguageDirection(a))},_updateHint:function(){var a,b,c,d,e,f;a=this.dropdown.getDatumForTopSuggestion(),a&&this.dropdown.isVisible()&&!this.input.hasOverflow()?(b=this.input.getInputValue(),c=l.normalizeQuery(b),d=i.escapeRegExChars(c),e=new RegExp("^(?:"+d+")(.+$)","i"),f=e.exec(a.value),f?this.input.setHint(b+f[1]):this.input.clearHint()):this.input.clearHint()},_autocomplete:function(a){var b,c,d,e;b=this.input.getHint(),c=this.input.getQuery(),d=a||this.input.isCursorAtEnd(),b&&c!==b&&d&&(e=this.dropdown.getDatumForTopSuggestion(),e&&this.input.setInputValue(e.value),this.eventBus.trigger("autocompleted",e.raw,e.datasetName))},_select:function(a,b){void 0!==a.value&&this.input.setQuery(a.value),this.clearOnSelected?this.setVal(""):this.input.setInputValue(a.value,!0),this._setLanguageDirection(),this.eventBus.trigger("selected",a.raw,a.datasetName,b).isDefaultPrevented()===!1&&(this.dropdown.close(),i.defer(i.bind(this.dropdown.empty,this.dropdown)))},open:function(){if(!this.isActivated){var a=this.input.getInputValue();a.length>=this.minLength?this.dropdown.update(a):this.dropdown.empty()}this.dropdown.open()},close:function(){this.dropdown.close()},setVal:function(a){a=i.toStr(a),this.isActivated?this.input.setInputValue(a):(this.input.setQuery(a),this.input.setInputValue(a,!0)),this._setLanguageDirection()},getVal:function(){return this.input.getQuery()},destroy:function(){this.input.destroy(),this.dropdown.destroy(),g(this.$node,this.cssClasses),this.$node=null},getWrapper:function(){return this.dropdown.$container[0]}}),d.Dropdown=m,d.Input=l,d.sources=c(20),a.exports=d},function(a,b,c){"use strict";function d(a){a&&a.el||e.error("EventBus initialized without el"),this.$el=f.element(a.el)}var e=c(4),f=c(3);e.mixin(d.prototype,{trigger:function(a,b,c,d){var f=e.Event("autocomplete:"+a);return this.$el.trigger(f,[b,c,d]),f}}),a.exports=d},function(a,b,c){"use strict";function d(a){var b,c,d,f,g=this;a=a||{},a.input||i.error("input is missing"),b=i.bind(this._onBlur,this),c=i.bind(this._onFocus,this),d=i.bind(this._onKeydown,this),f=i.bind(this._onInput,this),this.$hint=j.element(a.hint),this.$input=j.element(a.input).on("blur.aa",b).on("focus.aa",c).on("keydown.aa",d),0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=i.noop),i.isMsie()?this.$input.on("keydown.aa keypress.aa cut.aa paste.aa",function(a){h[a.which||a.keyCode]||i.defer(i.bind(g._onInput,g,a))}):this.$input.on("input.aa",f),this.query=this.$input.val(),this.$overflowHelper=e(this.$input)}function e(a){return j.element('').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:a.css("font-family"),fontSize:a.css("font-size"),fontStyle:a.css("font-style"),fontVariant:a.css("font-variant"),fontWeight:a.css("font-weight"),wordSpacing:a.css("word-spacing"),letterSpacing:a.css("letter-spacing"),textIndent:a.css("text-indent"),textRendering:a.css("text-rendering"),textTransform:a.css("text-transform")}).insertAfter(a)}function f(a,b){return d.normalizeQuery(a)===d.normalizeQuery(b)}function g(a){return a.altKey||a.ctrlKey||a.metaKey||a.shiftKey}var h;h={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"};var i=c(4),j=c(3),k=c(8);d.normalizeQuery=function(a){return(a||"").replace(/^\s*/g,"").replace(/\s{2,}/g," ")},i.mixin(d.prototype,k,{_onBlur:function(){this.resetInputValue(),this.$input.removeAttr("aria-activedescendant"),this.trigger("blurred")},_onFocus:function(){this.trigger("focused")},_onKeydown:function(a){var b=h[a.which||a.keyCode];this._managePreventDefault(b,a),b&&this._shouldTrigger(b,a)&&this.trigger(b+"Keyed",a)},_onInput:function(){this._checkInputValue()},_managePreventDefault:function(a,b){var c,d,e;switch(a){case"tab":d=this.getHint(),e=this.getInputValue(),c=d&&d!==e&&!g(b);break;case"up":case"down":c=!g(b);break;default:c=!1}c&&b.preventDefault()},_shouldTrigger:function(a,b){var c;switch(a){case"tab":c=!g(b);break;default:c=!0}return c},_checkInputValue:function(){var a,b,c;a=this.getInputValue(),b=f(a,this.query),c=!(!b||!this.query)&&this.query.length!==a.length,this.query=a,b?c&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(a){this.query=a},getInputValue:function(){return this.$input.val()},setInputValue:function(a,b){void 0===a&&(a=this.query),this.$input.val(a),b?this.clearHint():this._checkInputValue()},expand:function(){this.$input.attr("aria-expanded","true")},collapse:function(){this.$input.attr("aria-expanded","false")},setActiveDescendant:function(a){this.$input.attr("aria-activedescendant",a)},removeActiveDescendant:function(){this.$input.removeAttr("aria-activedescendant")},resetInputValue:function(){this.setInputValue(this.query,!0)},getHint:function(){return this.$hint.val()},setHint:function(a){this.$hint.val(a)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var a,b,c,d;a=this.getInputValue(),b=this.getHint(),c=a!==b&&0===b.indexOf(a),(d=""!==a&&c&&!this.hasOverflow())||this.clearHint()},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},hasOverflow:function(){var a=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=a},isCursorAtEnd:function(){var a,b,c;return a=this.$input.val().length,b=this.$input[0].selectionStart,i.isNumber(b)?b===a:!document.selection||(c=document.selection.createRange(),c.moveStart("character",-a),a===c.text.length)},destroy:function(){this.$hint.off(".aa"),this.$input.off(".aa"),this.$hint=this.$input=this.$overflowHelper=null}}),a.exports=d},function(a,b,c){"use strict";function d(a,b,c,d){var e;if(!c)return this;for(b=b.split(l),c=d?j(c,d):c,this._callbacks=this._callbacks||{};e=b.shift();)this._callbacks[e]=this._callbacks[e]||{sync:[],async:[]},this._callbacks[e][a].push(c);return this}function e(a,b,c){return d.call(this,"async",a,b,c)}function f(a,b,c){return d.call(this,"sync",a,b,c)}function g(a){var b;if(!this._callbacks)return this;for(a=a.split(l);b=a.shift();)delete this._callbacks[b];return this}function h(a){var b,c,d,e,f;if(!this._callbacks)return this;for(a=a.split(l),d=[].slice.call(arguments,1);(b=a.shift())&&(c=this._callbacks[b]);)e=i(c.sync,this,[b].concat(d)),f=i(c.async,this,[b].concat(d)),e()&&k(f);return this}function i(a,b,c){function d(){for(var d,e=0,f=a.length;!d&&e1)for(var c=1;c1)for(var c=1;c'),this.$menu.append(this.$empty),this.$empty.hide()),this.datasets=f.map(a.datasets,function(b){return e(h.$menu,b,a.cssClasses)}),f.each(this.datasets,function(a){var b=a.getRoot();b&&0===b.parent().length&&h.$menu.append(b),a.onSync("rendered",h._onRendered,h)}),a.templates&&a.templates.footer&&(this.templates.footer=f.templatify(a.templates.footer),this.$menu.append(this.templates.footer()));var k=this;g.element(window).resize(function(){k._redraw()})}function e(a,b,c){return new d.Dataset(f.mixin({$menu:a,cssClasses:c},b))}var f=c(4),g=c(3),h=c(8),i=c(17),j=c(19);f.mixin(d.prototype,h,{_onSuggestionClick:function(a){this.trigger("suggestionClicked",g.element(a.currentTarget))},_onSuggestionMouseEnter:function(a){var b=g.element(a.currentTarget);if(!b.hasClass(f.className(this.cssClasses.prefix,this.cssClasses.cursor,!0))){this._removeCursor();var c=this;setTimeout(function(){c._setCursor(b,!1)},0)}},_onSuggestionMouseLeave:function(a){if(a.relatedTarget){if(g.element(a.relatedTarget).closest("."+f.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).length>0)return}this._removeCursor(),this.trigger("cursorRemoved")},_onRendered:function(a,b){function c(a){return a.isEmpty()}function d(a){return a.templates&&a.templates.empty}if(this.isEmpty=f.every(this.datasets,c),this.isEmpty)if(b.length>=this.minLength&&this.trigger("empty"),this.$empty)if(b.length=this.minLength?this._show():this._hide());this.trigger("datasetRendered")},_hide:function(){this.$container.hide()},_show:function(){this.$container.css("display","block"),this._redraw(),this.trigger("shown")},_redraw:function(){this.isOpen&&this.appendTo&&this.trigger("redrawn")},_getSuggestions:function(){return this.$menu.find(f.className(this.cssClasses.prefix,this.cssClasses.suggestion))},_getCursor:function(){return this.$menu.find(f.className(this.cssClasses.prefix,this.cssClasses.cursor)).first()},_setCursor:function(a,b){a.first().addClass(f.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).attr("aria-selected","true"),this.trigger("cursorMoved",b)},_removeCursor:function(){this._getCursor().removeClass(f.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).removeAttr("aria-selected")},_moveCursor:function(a){var b,c,d,e;if(this.isOpen){if(c=this._getCursor(),b=this._getSuggestions(),this._removeCursor(),d=b.index(c)+a,(d=(d+1)%(b.length+1)-1)===-1)return void this.trigger("cursorRemoved");d<-1&&(d=b.length-1),this._setCursor(e=b.eq(d),!0),this._ensureVisible(e)}},_ensureVisible:function(a){var b,c,d,e;b=a.position().top,c=b+a.height()+parseInt(a.css("margin-top"),10)+parseInt(a.css("margin-bottom"),10),d=this.$menu.scrollTop(),e=this.$menu.height()+parseInt(this.$menu.css("padding-top"),10)+parseInt(this.$menu.css("padding-bottom"),10),b<0?this.$menu.scrollTop(d+b):e0?l.element(a.$menu.find(b+"-"+this.name)[0]):l.element(m.dataset.replace("%CLASS%",this.name).replace("%PREFIX%",this.cssClasses.prefix).replace("%DATASET%",this.cssClasses.dataset)),this.$menu=a.$menu,this.clearCachedSuggestions()}function e(a){function b(b){return b[a]}return a=a||"value",k.isFunction(a)?a:b}function f(a,b){function c(a){return"

"+b(a)+"

"}return{empty:a.empty&&k.templatify(a.empty),header:a.header&&k.templatify(a.header),footer:a.footer&&k.templatify(a.footer),suggestion:a.suggestion||c}}function g(a){return/^[_a-zA-Z0-9-]+$/.test(a)}var h="aaDataset",i="aaValue",j="aaDatum",k=c(4),l=c(3),m=c(18),n=c(19),o=c(8);d.extractDatasetName=function(a){return l.element(a).data(h)},d.extractValue=function(a){return l.element(a).data(i)},d.extractDatum=function(a){var b=l.element(a).data(j);return"string"==typeof b&&(b=JSON.parse(b)),b},k.mixin(d.prototype,o,{_render:function(a,b){function c(){var b=[].slice.call(arguments,0);return b=[{query:a,isEmpty:!0}].concat(b),n.templates.empty.apply(this,b)}function d(){function a(a){var b,c=m.suggestion.replace("%PREFIX%",f.cssClasses.prefix).replace("%SUGGESTION%",f.cssClasses.suggestion);return b=l.element(c).attr({role:"option",id:["option",Math.floor(1e8*Math.random())].join("-")}).append(n.templates.suggestion.apply(this,[a].concat(e))),b.data(h,n.name),b.data(i,n.displayFn(a)||void 0),b.data(j,JSON.stringify(a)),b.children().each(function(){l.element(this).css(f.css.suggestionChild)}),b}var c,d,e=[].slice.call(arguments,0),f=this,g=m.suggestions.replace("%PREFIX%",this.cssClasses.prefix).replace("%SUGGESTIONS%",this.cssClasses.suggestions);return c=l.element(g).css(this.css.suggestions),d=k.map(b,a),c.append.apply(c,d),c}function e(){var b=[].slice.call(arguments,0);return b=[{query:a,isEmpty:!g}].concat(b),n.templates.header.apply(this,b)}function f(){var b=[].slice.call(arguments,0);return b=[{query:a,isEmpty:!g}].concat(b),n.templates.footer.apply(this,b)}if(this.$el){var g,n=this,o=[].slice.call(arguments,2);if(this.$el.empty(),g=b&&b.length,this._isEmpty=!g,!g&&this.templates.empty)this.$el.html(c.apply(this,o)).prepend(n.templates.header?e.apply(this,o):null).append(n.templates.footer?f.apply(this,o):null);else if(g)this.$el.html(d.apply(this,o)).prepend(n.templates.header?e.apply(this,o):null).append(n.templates.footer?f.apply(this,o):null);else if(b&&!Array.isArray(b))throw new TypeError("suggestions must be an array");this.$menu&&this.$menu.addClass(this.cssClasses.prefix+(g?"with":"without")+"-"+this.name).removeClass(this.cssClasses.prefix+(g?"without":"with")+"-"+this.name),this.trigger("rendered",a)}},getRoot:function(){return this.$el},update:function(a){function b(b){if(!this.canceled&&a===this.query){var c=[].slice.call(arguments,1);this.cacheSuggestions(a,b,c),this._render.apply(this,[a,b].concat(c))}}if(this.query=a,this.canceled=!1,this.shouldFetchFromCache(a))b.apply(this,[this.cachedSuggestions].concat(this.cachedRenderExtraArgs));else{var c=this,d=function(){c.canceled||c.source(a,b.bind(c))};if(this.debounce){var e=function(){c.debounceTimeout=null,d()};clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout(e,this.debounce)}else d()}},cacheSuggestions:function(a,b,c){this.cachedQuery=a,this.cachedSuggestions=b,this.cachedRenderExtraArgs=c},shouldFetchFromCache:function(a){return this.cache&&this.cachedQuery===a&&this.cachedSuggestions&&this.cachedSuggestions.length},clearCachedSuggestions:function(){delete this.cachedQuery,delete this.cachedSuggestions,delete this.cachedRenderExtraArgs},cancel:function(){this.canceled=!0},clear:function(){this.$el&&(this.cancel(),this.$el.empty(),this.trigger("rendered",""))},isEmpty:function(){return this._isEmpty},destroy:function(){this.clearCachedSuggestions(),this.$el=null}}),a.exports=d},function(a,b){"use strict";a.exports={wrapper:'',dropdown:'',dataset:'
',suggestions:'',suggestion:'
'}},function(a,b,c){"use strict";var d=c(4),e={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:"0"},defaultClasses:{root:"algolia-autocomplete",prefix:"aa",noPrefix:!1,dropdownMenu:"dropdown-menu",input:"input",hint:"hint",suggestions:"suggestions",suggestion:"suggestion",cursor:"cursor",dataset:"dataset",empty:"empty"},appendTo:{wrapper:{position:"absolute",zIndex:"100",display:"none"},input:{},inputWithNoHint:{},dropdown:{display:"block"}}};d.isMsie()&&d.mixin(e.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),d.isMsie()&&d.isMsie()<=7&&d.mixin(e.input,{marginTop:"-1px"}),a.exports=e},function(a,b,c){"use strict";a.exports={hits:c(21),popularIn:c(24)}},function(a,b,c){"use strict";var d=c(4),e=c(22),f=c(23);a.exports=function(a,b){function c(c,e){a.search(c,b,function(a,b){if(a)return void d.error(a.message);e(b.hits,b)})}var g=f(a.as._ua);return g&&g[0]>=3&&g[1]>20&&(b=b||{},b.additionalUA="autocomplete.js "+e),c}},function(a,b){a.exports="0.37.1"},function(a,b){"use strict";a.exports=function(a){var b=a.match(/Algolia for JavaScript \((\d+\.)(\d+\.)(\d+)\)/)||a.match(/Algolia for vanilla JavaScript (\d+\.)(\d+\.)(\d+)/);if(b)return[b[1],b[2],b[3]]}},function(a,b,c){"use strict";var d=c(4),e=c(22),f=c(23);a.exports=function(a,b,c,g){function h(h,i){a.search(h,b,function(a,h){if(a)return void d.error(a.message);if(h.hits.length>0){var l=h.hits[0],m=d.mixin({hitsPerPage:0},c);delete m.source,delete m.index;var n=f(k.as._ua);return n&&n[0]>=3&&n[1]>20&&(b.additionalUA="autocomplete.js "+e),void k.search(j(l),m,function(a,b){if(a)return void d.error(a.message);var c=[];if(g.includeAll){var e=g.allTitle||"All departments";c.push(d.mixin({facet:{value:e,count:b.nbHits}},d.cloneDeep(l)))}d.each(b.facets,function(a,b){d.each(a,function(a,e){c.push(d.mixin({facet:{facet:b,value:e,count:a}},d.cloneDeep(l)))})});for(var f=1;f=3&&i[1]>20&&(b=b||{},b.additionalUA="autocomplete.js "+e),!c.source)return d.error("Missing 'source' key");var j=d.isFunction(c.source)?c.source:function(a){return a[c.source]};if(!c.index)return d.error("Missing 'index' key");var k=c.index;return g=g||{},h}}])}); \ No newline at end of file diff --git a/assets/lib/lunr/lunr.fr.js b/assets/lib/lunr/lunr.fr.js new file mode 100644 index 00000000..2de6d469 --- /dev/null +++ b/assets/lib/lunr/lunr.fr.js @@ -0,0 +1,703 @@ +/*! + * Lunr languages, `French` language + * https://github.com/MihaiValentin/lunr-languages + * + * Copyright 2014, Mihai Valentin + * http://www.mozilla.org/MPL/ + */ +/*! + * based on + * Snowball JavaScript Library v0.3 + * http://code.google.com/p/urim/ + * http://snowball.tartarus.org/ + * + * Copyright 2010, Oleg Mazko + * http://www.mozilla.org/MPL/ + */ + +/** + * export the module via AMD, CommonJS or as a browser global + * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js + */ +; +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory) + } else if (typeof exports === 'object') { + /** + * Node. Does not work with strict CommonJS, but + * only CommonJS-like environments that support module.exports, + * like Node. + */ + module.exports = factory() + } else { + // Browser globals (root is window) + factory()(root.lunr); + } +}(this, function() { + /** + * Just return a value to define the module export. + * This example returns an object, but the module + * can return a function as the exported value. + */ + return function(lunr) { + /* throw error if lunr is not yet included */ + if ('undefined' === typeof lunr) { + throw new Error('Lunr is not present. Please include / require Lunr before this script.'); + } + + /* throw error if lunr stemmer support is not yet included */ + if ('undefined' === typeof lunr.stemmerSupport) { + throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.'); + } + + /* register specific locale function */ + lunr.fr = function() { + this.pipeline.reset(); + this.pipeline.add( + lunr.fr.trimmer, + lunr.fr.stopWordFilter, + lunr.fr.stemmer + ); + + // for lunr version 2 + // this is necessary so that every searched word is also stemmed before + // in lunr <= 1 this is not needed, as it is done using the normal pipeline + if (this.searchPipeline) { + this.searchPipeline.reset(); + this.searchPipeline.add(lunr.fr.stemmer) + } + }; + + /* lunr trimmer function */ + lunr.fr.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A"; + lunr.fr.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.fr.wordCharacters); + + lunr.Pipeline.registerFunction(lunr.fr.trimmer, 'trimmer-fr'); + + /* lunr stemmer function */ + lunr.fr.stemmer = (function() { + /* create the wrapped stemmer object */ + var Among = lunr.stemmerSupport.Among, + SnowballProgram = lunr.stemmerSupport.SnowballProgram, + st = new function FrenchStemmer() { + var a_0 = [new Among("col", -1, -1), new Among("par", -1, -1), + new Among("tap", -1, -1) + ], + a_1 = [new Among("", -1, 4), + new Among("I", 0, 1), new Among("U", 0, 2), new Among("Y", 0, 3) + ], + a_2 = [ + new Among("iqU", -1, 3), new Among("abl", -1, 3), + new Among("I\u00E8r", -1, 4), new Among("i\u00E8r", -1, 4), + new Among("eus", -1, 2), new Among("iv", -1, 1) + ], + a_3 = [ + new Among("ic", -1, 2), new Among("abil", -1, 1), + new Among("iv", -1, 3) + ], + a_4 = [new Among("iqUe", -1, 1), + new Among("atrice", -1, 2), new Among("ance", -1, 1), + new Among("ence", -1, 5), new Among("logie", -1, 3), + new Among("able", -1, 1), new Among("isme", -1, 1), + new Among("euse", -1, 11), new Among("iste", -1, 1), + new Among("ive", -1, 8), new Among("if", -1, 8), + new Among("usion", -1, 4), new Among("ation", -1, 2), + new Among("ution", -1, 4), new Among("ateur", -1, 2), + new Among("iqUes", -1, 1), new Among("atrices", -1, 2), + new Among("ances", -1, 1), new Among("ences", -1, 5), + new Among("logies", -1, 3), new Among("ables", -1, 1), + new Among("ismes", -1, 1), new Among("euses", -1, 11), + new Among("istes", -1, 1), new Among("ives", -1, 8), + new Among("ifs", -1, 8), new Among("usions", -1, 4), + new Among("ations", -1, 2), new Among("utions", -1, 4), + new Among("ateurs", -1, 2), new Among("ments", -1, 15), + new Among("ements", 30, 6), new Among("issements", 31, 12), + new Among("it\u00E9s", -1, 7), new Among("ment", -1, 15), + new Among("ement", 34, 6), new Among("issement", 35, 12), + new Among("amment", 34, 13), new Among("emment", 34, 14), + new Among("aux", -1, 10), new Among("eaux", 39, 9), + new Among("eux", -1, 1), new Among("it\u00E9", -1, 7) + ], + a_5 = [ + new Among("ira", -1, 1), new Among("ie", -1, 1), + new Among("isse", -1, 1), new Among("issante", -1, 1), + new Among("i", -1, 1), new Among("irai", 4, 1), + new Among("ir", -1, 1), new Among("iras", -1, 1), + new Among("ies", -1, 1), new Among("\u00EEmes", -1, 1), + new Among("isses", -1, 1), new Among("issantes", -1, 1), + new Among("\u00EEtes", -1, 1), new Among("is", -1, 1), + new Among("irais", 13, 1), new Among("issais", 13, 1), + new Among("irions", -1, 1), new Among("issions", -1, 1), + new Among("irons", -1, 1), new Among("issons", -1, 1), + new Among("issants", -1, 1), new Among("it", -1, 1), + new Among("irait", 21, 1), new Among("issait", 21, 1), + new Among("issant", -1, 1), new Among("iraIent", -1, 1), + new Among("issaIent", -1, 1), new Among("irent", -1, 1), + new Among("issent", -1, 1), new Among("iront", -1, 1), + new Among("\u00EEt", -1, 1), new Among("iriez", -1, 1), + new Among("issiez", -1, 1), new Among("irez", -1, 1), + new Among("issez", -1, 1) + ], + a_6 = [new Among("a", -1, 3), + new Among("era", 0, 2), new Among("asse", -1, 3), + new Among("ante", -1, 3), new Among("\u00E9e", -1, 2), + new Among("ai", -1, 3), new Among("erai", 5, 2), + new Among("er", -1, 2), new Among("as", -1, 3), + new Among("eras", 8, 2), new Among("\u00E2mes", -1, 3), + new Among("asses", -1, 3), new Among("antes", -1, 3), + new Among("\u00E2tes", -1, 3), new Among("\u00E9es", -1, 2), + new Among("ais", -1, 3), new Among("erais", 15, 2), + new Among("ions", -1, 1), new Among("erions", 17, 2), + new Among("assions", 17, 3), new Among("erons", -1, 2), + new Among("ants", -1, 3), new Among("\u00E9s", -1, 2), + new Among("ait", -1, 3), new Among("erait", 23, 2), + new Among("ant", -1, 3), new Among("aIent", -1, 3), + new Among("eraIent", 26, 2), new Among("\u00E8rent", -1, 2), + new Among("assent", -1, 3), new Among("eront", -1, 2), + new Among("\u00E2t", -1, 3), new Among("ez", -1, 2), + new Among("iez", 32, 2), new Among("eriez", 33, 2), + new Among("assiez", 33, 3), new Among("erez", 32, 2), + new Among("\u00E9", -1, 2) + ], + a_7 = [new Among("e", -1, 3), + new Among("I\u00E8re", 0, 2), new Among("i\u00E8re", 0, 2), + new Among("ion", -1, 1), new Among("Ier", -1, 2), + new Among("ier", -1, 2), new Among("\u00EB", -1, 4) + ], + a_8 = [ + new Among("ell", -1, -1), new Among("eill", -1, -1), + new Among("enn", -1, -1), new Among("onn", -1, -1), + new Among("ett", -1, -1) + ], + g_v = [17, 65, 16, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 128, 130, 103, 8, 5 + ], + g_keep_with_s = [1, 65, 20, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 + ], + I_p2, I_p1, I_pV, sbp = new SnowballProgram(); + this.setCurrent = function(word) { + sbp.setCurrent(word); + }; + this.getCurrent = function() { + return sbp.getCurrent(); + }; + + function habr1(c1, c2, v_1) { + if (sbp.eq_s(1, c1)) { + sbp.ket = sbp.cursor; + if (sbp.in_grouping(g_v, 97, 251)) { + sbp.slice_from(c2); + sbp.cursor = v_1; + return true; + } + } + return false; + } + + function habr2(c1, c2, v_1) { + if (sbp.eq_s(1, c1)) { + sbp.ket = sbp.cursor; + sbp.slice_from(c2); + sbp.cursor = v_1; + return true; + } + return false; + } + + function r_prelude() { + var v_1, v_2; + while (true) { + v_1 = sbp.cursor; + if (sbp.in_grouping(g_v, 97, 251)) { + sbp.bra = sbp.cursor; + v_2 = sbp.cursor; + if (habr1("u", "U", v_1)) + continue; + sbp.cursor = v_2; + if (habr1("i", "I", v_1)) + continue; + sbp.cursor = v_2; + if (habr2("y", "Y", v_1)) + continue; + } + sbp.cursor = v_1; + sbp.bra = v_1; + if (!habr1("y", "Y", v_1)) { + sbp.cursor = v_1; + if (sbp.eq_s(1, "q")) { + sbp.bra = sbp.cursor; + if (habr2("u", "U", v_1)) + continue; + } + sbp.cursor = v_1; + if (v_1 >= sbp.limit) + return; + sbp.cursor++; + } + } + } + + function habr3() { + while (!sbp.in_grouping(g_v, 97, 251)) { + if (sbp.cursor >= sbp.limit) + return true; + sbp.cursor++; + } + while (!sbp.out_grouping(g_v, 97, 251)) { + if (sbp.cursor >= sbp.limit) + return true; + sbp.cursor++; + } + return false; + } + + function r_mark_regions() { + var v_1 = sbp.cursor; + I_pV = sbp.limit; + I_p1 = I_pV; + I_p2 = I_pV; + if (sbp.in_grouping(g_v, 97, 251) && sbp.in_grouping(g_v, 97, 251) && + sbp.cursor < sbp.limit) + sbp.cursor++; + else { + sbp.cursor = v_1; + if (!sbp.find_among(a_0, 3)) { + sbp.cursor = v_1; + do { + if (sbp.cursor >= sbp.limit) { + sbp.cursor = I_pV; + break; + } + sbp.cursor++; + } while (!sbp.in_grouping(g_v, 97, 251)); + } + } + I_pV = sbp.cursor; + sbp.cursor = v_1; + if (!habr3()) { + I_p1 = sbp.cursor; + if (!habr3()) + I_p2 = sbp.cursor; + } + } + + function r_postlude() { + var among_var, v_1; + while (true) { + v_1 = sbp.cursor; + sbp.bra = v_1; + among_var = sbp.find_among(a_1, 4); + if (!among_var) + break; + sbp.ket = sbp.cursor; + switch (among_var) { + case 1: + sbp.slice_from("i"); + break; + case 2: + sbp.slice_from("u"); + break; + case 3: + sbp.slice_from("y"); + break; + case 4: + if (sbp.cursor >= sbp.limit) + return; + sbp.cursor++; + break; + } + } + } + + function r_RV() { + return I_pV <= sbp.cursor; + } + + function r_R1() { + return I_p1 <= sbp.cursor; + } + + function r_R2() { + return I_p2 <= sbp.cursor; + } + + function r_standard_suffix() { + var among_var, v_1; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_4, 43); + if (among_var) { + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + if (!r_R2()) + return false; + sbp.slice_del(); + break; + case 2: + if (!r_R2()) + return false; + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(2, "ic")) { + sbp.bra = sbp.cursor; + if (!r_R2()) + sbp.slice_from("iqU"); + else + sbp.slice_del(); + } + break; + case 3: + if (!r_R2()) + return false; + sbp.slice_from("log"); + break; + case 4: + if (!r_R2()) + return false; + sbp.slice_from("u"); + break; + case 5: + if (!r_R2()) + return false; + sbp.slice_from("ent"); + break; + case 6: + if (!r_RV()) + return false; + sbp.slice_del(); + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_2, 6); + if (among_var) { + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + if (r_R2()) { + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(2, "at")) { + sbp.bra = sbp.cursor; + if (r_R2()) + sbp.slice_del(); + } + } + break; + case 2: + if (r_R2()) + sbp.slice_del(); + else if (r_R1()) + sbp.slice_from("eux"); + break; + case 3: + if (r_R2()) + sbp.slice_del(); + break; + case 4: + if (r_RV()) + sbp.slice_from("i"); + break; + } + } + break; + case 7: + if (!r_R2()) + return false; + sbp.slice_del(); + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_3, 3); + if (among_var) { + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + if (r_R2()) + sbp.slice_del(); + else + sbp.slice_from("abl"); + break; + case 2: + if (r_R2()) + sbp.slice_del(); + else + sbp.slice_from("iqU"); + break; + case 3: + if (r_R2()) + sbp.slice_del(); + break; + } + } + break; + case 8: + if (!r_R2()) + return false; + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(2, "at")) { + sbp.bra = sbp.cursor; + if (r_R2()) { + sbp.slice_del(); + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(2, "ic")) { + sbp.bra = sbp.cursor; + if (r_R2()) + sbp.slice_del(); + else + sbp.slice_from("iqU"); + break; + } + } + } + break; + case 9: + sbp.slice_from("eau"); + break; + case 10: + if (!r_R1()) + return false; + sbp.slice_from("al"); + break; + case 11: + if (r_R2()) + sbp.slice_del(); + else if (!r_R1()) + return false; + else + sbp.slice_from("eux"); + break; + case 12: + if (!r_R1() || !sbp.out_grouping_b(g_v, 97, 251)) + return false; + sbp.slice_del(); + break; + case 13: + if (r_RV()) + sbp.slice_from("ant"); + return false; + case 14: + if (r_RV()) + sbp.slice_from("ent"); + return false; + case 15: + v_1 = sbp.limit - sbp.cursor; + if (sbp.in_grouping_b(g_v, 97, 251) && r_RV()) { + sbp.cursor = sbp.limit - v_1; + sbp.slice_del(); + } + return false; + } + return true; + } + return false; + } + + function r_i_verb_suffix() { + var among_var, v_1; + if (sbp.cursor < I_pV) + return false; + v_1 = sbp.limit_backward; + sbp.limit_backward = I_pV; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_5, 35); + if (!among_var) { + sbp.limit_backward = v_1; + return false; + } + sbp.bra = sbp.cursor; + if (among_var == 1) { + if (!sbp.out_grouping_b(g_v, 97, 251)) { + sbp.limit_backward = v_1; + return false; + } + sbp.slice_del(); + } + sbp.limit_backward = v_1; + return true; + } + + function r_verb_suffix() { + var among_var, v_2, v_3; + if (sbp.cursor < I_pV) + return false; + v_2 = sbp.limit_backward; + sbp.limit_backward = I_pV; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_6, 38); + if (!among_var) { + sbp.limit_backward = v_2; + return false; + } + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + if (!r_R2()) { + sbp.limit_backward = v_2; + return false; + } + sbp.slice_del(); + break; + case 2: + sbp.slice_del(); + break; + case 3: + sbp.slice_del(); + v_3 = sbp.limit - sbp.cursor; + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(1, "e")) { + sbp.bra = sbp.cursor; + sbp.slice_del(); + } else + sbp.cursor = sbp.limit - v_3; + break; + } + sbp.limit_backward = v_2; + return true; + } + + function r_residual_suffix() { + var among_var, v_1 = sbp.limit - sbp.cursor, + v_2, v_4, v_5; + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(1, "s")) { + sbp.bra = sbp.cursor; + v_2 = sbp.limit - sbp.cursor; + if (sbp.out_grouping_b(g_keep_with_s, 97, 232)) { + sbp.cursor = sbp.limit - v_2; + sbp.slice_del(); + } else + sbp.cursor = sbp.limit - v_1; + } else + sbp.cursor = sbp.limit - v_1; + if (sbp.cursor >= I_pV) { + v_4 = sbp.limit_backward; + sbp.limit_backward = I_pV; + sbp.ket = sbp.cursor; + among_var = sbp.find_among_b(a_7, 7); + if (among_var) { + sbp.bra = sbp.cursor; + switch (among_var) { + case 1: + if (r_R2()) { + v_5 = sbp.limit - sbp.cursor; + if (!sbp.eq_s_b(1, "s")) { + sbp.cursor = sbp.limit - v_5; + if (!sbp.eq_s_b(1, "t")) + break; + } + sbp.slice_del(); + } + break; + case 2: + sbp.slice_from("i"); + break; + case 3: + sbp.slice_del(); + break; + case 4: + if (sbp.eq_s_b(2, "gu")) + sbp.slice_del(); + break; + } + } + sbp.limit_backward = v_4; + } + } + + function r_un_double() { + var v_1 = sbp.limit - sbp.cursor; + if (sbp.find_among_b(a_8, 5)) { + sbp.cursor = sbp.limit - v_1; + sbp.ket = sbp.cursor; + if (sbp.cursor > sbp.limit_backward) { + sbp.cursor--; + sbp.bra = sbp.cursor; + sbp.slice_del(); + } + } + } + + function r_un_accent() { + var v_1, v_2 = 1; + while (sbp.out_grouping_b(g_v, 97, 251)) + v_2--; + if (v_2 <= 0) { + sbp.ket = sbp.cursor; + v_1 = sbp.limit - sbp.cursor; + if (!sbp.eq_s_b(1, "\u00E9")) { + sbp.cursor = sbp.limit - v_1; + if (!sbp.eq_s_b(1, "\u00E8")) + return; + } + sbp.bra = sbp.cursor; + sbp.slice_from("e"); + } + } + + function habr5() { + if (!r_standard_suffix()) { + sbp.cursor = sbp.limit; + if (!r_i_verb_suffix()) { + sbp.cursor = sbp.limit; + if (!r_verb_suffix()) { + sbp.cursor = sbp.limit; + r_residual_suffix(); + return; + } + } + } + sbp.cursor = sbp.limit; + sbp.ket = sbp.cursor; + if (sbp.eq_s_b(1, "Y")) { + sbp.bra = sbp.cursor; + sbp.slice_from("i"); + } else { + sbp.cursor = sbp.limit; + if (sbp.eq_s_b(1, "\u00E7")) { + sbp.bra = sbp.cursor; + sbp.slice_from("c"); + } + } + } + this.stem = function() { + var v_1 = sbp.cursor; + r_prelude(); + sbp.cursor = v_1; + r_mark_regions(); + sbp.limit_backward = v_1; + sbp.cursor = sbp.limit; + habr5(); + sbp.cursor = sbp.limit; + r_un_double(); + sbp.cursor = sbp.limit; + r_un_accent(); + sbp.cursor = sbp.limit_backward; + r_postlude(); + return true; + } + }; + + /* and return a function that stems a word for the current locale */ + return function(token) { + // for lunr version 2 + if (typeof token.update === "function") { + return token.update(function(word) { + st.setCurrent(word); + st.stem(); + return st.getCurrent(); + }) + } else { // for lunr version <= 1 + st.setCurrent(token); + st.stem(); + return st.getCurrent(); + } + } + })(); + + lunr.Pipeline.registerFunction(lunr.fr.stemmer, 'stemmer-fr'); + + lunr.fr.stopWordFilter = lunr.generateStopWordFilter('ai aie aient aies ait as au aura aurai auraient aurais aurait auras aurez auriez aurions aurons auront aux avaient avais avait avec avez aviez avions avons ayant ayez ayons c ce ceci celà ces cet cette d dans de des du elle en es est et eu eue eues eurent eus eusse eussent eusses eussiez eussions eut eux eûmes eût eûtes furent fus fusse fussent fusses fussiez fussions fut fûmes fût fûtes ici il ils j je l la le les leur leurs lui m ma mais me mes moi mon même n ne nos notre nous on ont ou par pas pour qu que quel quelle quelles quels qui s sa sans se sera serai seraient serais serait seras serez seriez serions serons seront ses soi soient sois soit sommes son sont soyez soyons suis sur t ta te tes toi ton tu un une vos votre vous y à étaient étais était étant étiez étions été étée étées étés êtes'.split(' ')); + + lunr.Pipeline.registerFunction(lunr.fr.stopWordFilter, 'stopWordFilter-fr'); + }; +})) \ No newline at end of file diff --git a/assets/lib/lunr/lunr.min.js b/assets/lib/lunr/lunr.min.js new file mode 100644 index 00000000..3f2f2cc6 --- /dev/null +++ b/assets/lib/lunr/lunr.min.js @@ -0,0 +1,6 @@ +/** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.7 + * Copyright (C) 2019 Oliver Nightingale + * @license MIT + */ +!function(){var e=function(t){var r=new e.Builder;return r.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),r.searchPipeline.add(e.stemmer),t.call(r,r),r.build()};e.version="2.3.7",e.utils={},e.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),e.utils.asString=function(e){return void 0===e||null===e?"":e.toString()},e.utils.clone=function(e){if(null===e||void 0===e)return e;for(var t=Object.create(null),r=Object.keys(e),i=0;i0){var c=e.utils.clone(r)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(i.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e?2*n:s>e?2*n:sa?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o["final"]=!0),n.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(0!=s.editsRemaining){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}if(0==s.str.length&&(u["final"]=!0),n.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&n.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),1==s.str.length&&(s.node["final"]=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}1==s.str.length&&(l["final"]=!0),n.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var c,h=s.str.charAt(0),d=s.str.charAt(1);d in s.node.edges?c=s.node.edges[d]:(c=new e.TokenSet,s.node.edges[d]=c),1==s.str.length&&(c["final"]=!0),n.push({node:c,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var r=new e.TokenSet,i=r,n=0,s=t.length;n=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r["char"]]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(r){var i=new e.QueryParser(t,r);i.parse()})},e.Index.prototype.query=function(t){for(var r=new e.Query(this.fields),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u1?this._b=1:this._b=e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(t,r){var i=t[this._ref],n=Object.keys(this._fields);this._documents[i]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,r;do t=this.next(),r=t.charCodeAt(0);while(r>47&&r<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var r=t.next();if(r==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(92!=r.charCodeAt(0)){if(":"==r)return e.QueryLexer.lexField;if("~"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if("+"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if("-"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(r.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}else t.escapeCharacter()}},e.QueryParser=function(t,r){this.lexer=new e.QueryLexer(t),this.query=r,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseClause=function(t){var r=t.peekLexeme();if(void 0!=r)switch(r.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(i+=" with value '"+r.str+"'"),new e.QueryParseError(i,r.start,r.end)}},e.QueryParser.parsePresence=function(t){var r=t.consumeLexeme();if(void 0!=r){switch(r.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+r.str+"'";throw new e.QueryParseError(i,r.start,r.end)}var n=t.peekLexeme();if(void 0==n){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,r.start,r.end)}switch(n.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+n.type+"'";throw new e.QueryParseError(i,n.start,n.end)}}},e.QueryParser.parseField=function(t){var r=t.consumeLexeme();if(void 0!=r){if(t.query.allFields.indexOf(r.str)==-1){var i=t.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+r.str+"', possible fields: "+i;throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.fields=[r.str];var s=t.peekLexeme();if(void 0==s){var n="expecting term, found nothing";throw new e.QueryParseError(n,r.start,r.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var n="expecting term, found '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var r=t.consumeLexeme();if(void 0!=r){t.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(void 0==i)return void t.nextClause();switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(n,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="boost must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}(); diff --git a/assets/lib/lunr/lunr.segmentit.js b/assets/lib/lunr/lunr.segmentit.js new file mode 100644 index 00000000..4c9c9ac2 --- /dev/null +++ b/assets/lib/lunr/lunr.segmentit.js @@ -0,0 +1,174 @@ +(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i[]{}=!@#$%^&*()~`。,、':∶;?‘’“”〝〞ˆˇ﹕︰﹔﹖﹑·¨….¸;!´?!~—ˉ|‖"〃`@﹫¡¿﹏﹋﹌︴々﹟#﹩$﹠&﹪%*﹡﹢﹦﹤‐ ̄¯―﹨ˆ˜﹍﹎+=<­__-ˇ~﹉﹊()〈〉‹›﹛﹜『』〖〗[]《》〔〕{}「」【】︵︷︿︹︽_﹁﹃︻︶︸﹀︺︾ˉ﹂﹄︼+-×÷﹢﹣±/=≈≡≠∧∨∑∏∪∩∈⊙⌒⊥∥∠∽≌<>≤≥≮≯∧∨√﹙﹚[]﹛﹜∫∮∝∞⊙∏┌┬┐┏┳┓╒╤╕─│├┼┤┣╋┫╞╪╡━┃└┴┘┗┻┛╘╧╛┄┆┅┇╭─╮┏━┓╔╦╗┈┊│╳│┃┃╠╬╣┉┋╰─╯┗━┛╚╩╝╲╱┞┟┠┡┢┦┧┨┩┪╉╊┭┮┯┰┱┲┵┶┷┸╇╈┹┺┽┾┿╀╁╂╃╄╅╆○◇□△▽☆●◆■▲▼★♠♥♦♣☼☺◘♀√☻◙♂×▁▂▃▄▅▆▇█⊙◎۞卍卐╱╲▁▏↖↗↑←↔◤◥╲╱▔▕↙↘↓→↕◣◢∷▒░℡™" +z=z.split("") +var R={},U={} +for(var I in z)if(""!==z[I]){var L=z[I].length +U[R[z[I]]=L]||(U[L]={}),U[L][z[I]]=L}var j=function(){function s(){return r(this,s),u(this,i(s).apply(this,arguments))}return x(s,_),e(s,[{key:"split",value:function(n){for(var x,e=this.segment.POSTAG,c=[],f=0;x=n[f];f++)if(0= min) { + ch -= min; + if (s[ch >> 3] & (0X1 << (ch & 0X7))) { + this.cursor++; + return true; + } + } + } + return false; + }, + in_grouping_b : function(s, min, max) { + if (this.cursor > this.limit_backward) { + var ch = current.charCodeAt(this.cursor - 1); + if (ch <= max && ch >= min) { + ch -= min; + if (s[ch >> 3] & (0X1 << (ch & 0X7))) { + this.cursor--; + return true; + } + } + } + return false; + }, + out_grouping : function(s, min, max) { + if (this.cursor < this.limit) { + var ch = current.charCodeAt(this.cursor); + if (ch > max || ch < min) { + this.cursor++; + return true; + } + ch -= min; + if (!(s[ch >> 3] & (0X1 << (ch & 0X7)))) { + this.cursor++; + return true; + } + } + return false; + }, + out_grouping_b : function(s, min, max) { + if (this.cursor > this.limit_backward) { + var ch = current.charCodeAt(this.cursor - 1); + if (ch > max || ch < min) { + this.cursor--; + return true; + } + ch -= min; + if (!(s[ch >> 3] & (0X1 << (ch & 0X7)))) { + this.cursor--; + return true; + } + } + return false; + }, + eq_s : function(s_size, s) { + if (this.limit - this.cursor < s_size) + return false; + for (var i = 0; i < s_size; i++) + if (current.charCodeAt(this.cursor + i) != s.charCodeAt(i)) + return false; + this.cursor += s_size; + return true; + }, + eq_s_b : function(s_size, s) { + if (this.cursor - this.limit_backward < s_size) + return false; + for (var i = 0; i < s_size; i++) + if (current.charCodeAt(this.cursor - s_size + i) != s + .charCodeAt(i)) + return false; + this.cursor -= s_size; + return true; + }, + find_among : function(v, v_size) { + var i = 0, j = v_size, c = this.cursor, l = this.limit, common_i = 0, common_j = 0, first_key_inspected = false; + while (true) { + var k = i + ((j - i) >> 1), diff = 0, common = common_i < common_j + ? common_i + : common_j, w = v[k]; + for (var i2 = common; i2 < w.s_size; i2++) { + if (c + common == l) { + diff = -1; + break; + } + diff = current.charCodeAt(c + common) - w.s[i2]; + if (diff) + break; + common++; + } + if (diff < 0) { + j = k; + common_j = common; + } else { + i = k; + common_i = common; + } + if (j - i <= 1) { + if (i > 0 || j == i || first_key_inspected) + break; + first_key_inspected = true; + } + } + while (true) { + var w = v[i]; + if (common_i >= w.s_size) { + this.cursor = c + w.s_size; + if (!w.method) + return w.result; + var res = w.method(); + this.cursor = c + w.s_size; + if (res) + return w.result; + } + i = w.substring_i; + if (i < 0) + return 0; + } + }, + find_among_b : function(v, v_size) { + var i = 0, j = v_size, c = this.cursor, lb = this.limit_backward, common_i = 0, common_j = 0, first_key_inspected = false; + while (true) { + var k = i + ((j - i) >> 1), diff = 0, common = common_i < common_j + ? common_i + : common_j, w = v[k]; + for (var i2 = w.s_size - 1 - common; i2 >= 0; i2--) { + if (c - common == lb) { + diff = -1; + break; + } + diff = current.charCodeAt(c - 1 - common) - w.s[i2]; + if (diff) + break; + common++; + } + if (diff < 0) { + j = k; + common_j = common; + } else { + i = k; + common_i = common; + } + if (j - i <= 1) { + if (i > 0 || j == i || first_key_inspected) + break; + first_key_inspected = true; + } + } + while (true) { + var w = v[i]; + if (common_i >= w.s_size) { + this.cursor = c - w.s_size; + if (!w.method) + return w.result; + var res = w.method(); + this.cursor = c - w.s_size; + if (res) + return w.result; + } + i = w.substring_i; + if (i < 0) + return 0; + } + }, + replace_s : function(c_bra, c_ket, s) { + var adjustment = s.length - (c_ket - c_bra), left = current + .substring(0, c_bra), right = current.substring(c_ket); + current = left + s + right; + this.limit += adjustment; + if (this.cursor >= c_ket) + this.cursor += adjustment; + else if (this.cursor > c_bra) + this.cursor = c_bra; + return adjustment; + }, + slice_check : function() { + if (this.bra < 0 || this.bra > this.ket || this.ket > this.limit + || this.limit > current.length) + throw ("faulty slice operation"); + }, + slice_from : function(s) { + this.slice_check(); + this.replace_s(this.bra, this.ket, s); + }, + slice_del : function() { + this.slice_from(""); + }, + insert : function(c_bra, c_ket, s) { + var adjustment = this.replace_s(c_bra, c_ket, s); + if (c_bra <= this.bra) + this.bra += adjustment; + if (c_bra <= this.ket) + this.ket += adjustment; + }, + slice_to : function() { + this.slice_check(); + return current.substring(this.bra, this.ket); + }, + eq_v_b : function(s) { + return this.eq_s_b(s.length, s); + } + }; + } + }; + + lunr.trimmerSupport = { + generateTrimmer: function(wordCharacters) { + var startRegex = new RegExp("^[^" + wordCharacters + "]+") + var endRegex = new RegExp("[^" + wordCharacters + "]+$") + + return function(token) { + // for lunr version 2 + if (typeof token.update === "function") { + return token.update(function (s) { + return s + .replace(startRegex, '') + .replace(endRegex, ''); + }) + } else { // for lunr version 1 + return token + .replace(startRegex, '') + .replace(endRegex, ''); + } + }; + } + } + } +})); diff --git a/assets/lib/lunr/lunr.zh.js b/assets/lib/lunr/lunr.zh.js new file mode 100644 index 00000000..7c71d548 --- /dev/null +++ b/assets/lib/lunr/lunr.zh.js @@ -0,0 +1,141 @@ +/*! + * Lunr languages, `Chinese` language + * https://github.com/MihaiValentin/lunr-languages + * + * Copyright 2019, Felix Lian (repairearth) + * http://www.mozilla.org/MPL/ + */ +/*! + * based on + * Snowball zhvaScript Library v0.3 + * http://code.google.com/p/urim/ + * http://snowball.tartarus.org/ + * + * Copyright 2010, Oleg Mazko + * http://www.mozilla.org/MPL/ + */ + +/** + * export the module via AMD, CommonJS or as a browser global + * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js + */ +; +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory) + } else if (typeof exports === 'object') { + /** + * Node. Does not work with strict CommonJS, but + * only CommonJS-like environments that support module.exports, + * like Node. + */ + module.exports = factory() + } else { + // Browser globals (root is window) + factory()(root.lunr); + } +}(this, function() { + /** + * Just return a value to define the module export. + * This example returns an object, but the module + * can return a function as the exported value. + */ + return function(lunr) { + /* throw error if lunr is not yet included */ + if ('undefined' === typeof lunr) { + throw new Error('Lunr is not present. Please include / require Lunr before this script.'); + } + + /* throw error if lunr stemmer support is not yet included */ + if ('undefined' === typeof lunr.stemmerSupport) { + throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.'); + } + + /* + Chinese tokenization is trickier, since it does not + take into account spaces. + Since the tokenization function is represented different + internally for each of the Lunr versions, this had to be done + in order to try to try to pick the best way of doing this based + on the Lunr version + */ + var isLunr2 = lunr.version[0] == "2"; + + /* register specific locale function */ + lunr.zh = function() { + this.pipeline.reset(); + this.pipeline.add( + lunr.zh.trimmer, + lunr.zh.stopWordFilter, + lunr.zh.stemmer + ); + + // change the tokenizer for Chinese one + if (isLunr2) { // for lunr version 2.0.0 + this.tokenizer = lunr.zh.tokenizer; + } else { + if (lunr.tokenizer) { // for lunr version 0.6.0 + lunr.tokenizer = lunr.zh.tokenizer; + } + if (this.tokenizerFn) { // for lunr version 0.7.0 -> 1.0.0 + this.tokenizerFn = lunr.zh.tokenizer; + } + } + }; + + lunr.zh.tokenizer = function(obj) { + if (!arguments.length || obj == null || obj == undefined) return [] + if (Array.isArray(obj)) return obj.map(function (t) { return isLunr2 ? new lunr.Token(t.toLowerCase()) : t.toLowerCase() }) + + var str = obj.toString().trim().toLowerCase(); + var tokens = []; + + lunr.segmentit && lunr.segmentit.doSegment(str).forEach(function (seg) { + tokens = tokens.concat(seg.w.split(' ')); + }); + + tokens = tokens.filter(function (token) { + return !!token; + }); + + var fromIndex = 0 + + return tokens.map(function (token, index) { + if (isLunr2) { + var start = str.indexOf(token, fromIndex) + + var tokenMetadata = {} + tokenMetadata["position"] = [start, token.length] + tokenMetadata["index"] = index + + fromIndex = start + + return new lunr.Token(token, tokenMetadata); + } else { + return token + } + }); + } + + /* lunr trimmer function */ + lunr.zh.wordCharacters = "\\w\u4e00-\u9fa5"; + lunr.zh.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.zh.wordCharacters); + lunr.Pipeline.registerFunction(lunr.zh.trimmer, 'trimmer-zh'); + + /* lunr stemmer function */ + lunr.zh.stemmer = (function() { + + /* TODO Chinese stemmer */ + return function(word) { + return word; + } + })(); + lunr.Pipeline.registerFunction(lunr.zh.stemmer, 'stemmer-zh'); + + /* lunr stop word filter. see https://www.ranks.nl/stopwords/chinese-stopwords */ + lunr.zh.stopWordFilter = lunr.generateStopWordFilter( + '的 一 不 在 人 有 是 为 以 于 上 他 而 后 之 来 及 了 因 下 可 到 由 这 与 也 此 但 并 个 其 已 无 小 我 们 起 最 再 今 去 好 只 又 或 很 亦 某 把 那 你 乃 它 吧 被 比 别 趁 当 从 到 得 打 凡 儿 尔 该 各 给 跟 和 何 还 即 几 既 看 据 距 靠 啦 了 另 么 每 们 嘛 拿 哪 那 您 凭 且 却 让 仍 啥 如 若 使 谁 虽 随 同 所 她 哇 嗡 往 哪 些 向 沿 哟 用 于 咱 则 怎 曾 至 致 着 诸 自'.split(' ')); + lunr.Pipeline.registerFunction(lunr.zh.stopWordFilter, 'stopWordFilter-zh'); + }; +})) \ No newline at end of file diff --git a/assets/lib/mermaid/mermaid.scss b/assets/lib/mermaid/mermaid.scss index 7568095c..074d7c37 100644 --- a/assets/lib/mermaid/mermaid.scss +++ b/assets/lib/mermaid/mermaid.scss @@ -9,7 +9,7 @@ @import "themes/neutral/index"; - .dark-theme & { + .dark & { @import "themes/dark/index"; } } diff --git a/assets/lib/polyfill.yml b/assets/lib/polyfill.yml new file mode 100644 index 00000000..15000eb7 --- /dev/null +++ b/assets/lib/polyfill.yml @@ -0,0 +1,8 @@ +smooth-scroll: + - Element.prototype.closest + - requestAnimationFrame + - CustomEvent +algoliasearch: + - Promise + - Object.entries + - Object.assign diff --git a/assets/lib/smooth-scroll/smooth-scroll.min.js b/assets/lib/smooth-scroll/smooth-scroll.min.js new file mode 100644 index 00000000..3899799e --- /dev/null +++ b/assets/lib/smooth-scroll/smooth-scroll.min.js @@ -0,0 +1,2 @@ +/*! smooth-scroll v16.1.2 | (c) 2020 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/smooth-scroll */ +!(function(e,t){"function"==typeof define&&define.amd?define([],(function(){return t(e)})):"object"==typeof exports?module.exports=t(e):e.SmoothScroll=t(e)})("undefined"!=typeof global?global:"undefined"!=typeof window?window:this,(function(w){"use strict";var L={ignore:"[data-scroll-ignore]",header:null,topOnEmptyHash:!0,speed:500,speedAsDuration:!1,durationMax:null,durationMin:null,clip:!0,offset:0,easing:"easeInOutCubic",customEasing:null,updateURL:!0,popstate:!0,emitEvents:!0},H=function(){var n={};return Array.prototype.forEach.call(arguments,(function(e){for(var t in e){if(!e.hasOwnProperty(t))return;n[t]=e[t]}})),n},r=function(e){"#"===e.charAt(0)&&(e=e.substr(1));for(var t,n=String(e),o=n.length,a=-1,r="",i=n.charCodeAt(0);++ao.durationMax?o.durationMax:o.durationMin&&a=v)return C.cancelScroll(!0),o=t,a=u,0===(n=i)&&document.body.focus(),a||(n.focus(),document.activeElement!==n&&(n.setAttribute("tabindex","-1"),n.focus(),n.style.outline="none"),w.scrollTo(0,o)),Q("scrollStop",c,i,s),!(A=d=null)},O=function(e){var t,n,o;d||(d=e),S+=e-d,f=l+y*(n=r=1<(r=0===E?0:S/E)?1:r,"easeInQuad"===(t=c).easing&&(o=n*n),"easeOutQuad"===t.easing&&(o=n*(2-n)),"easeInOutQuad"===t.easing&&(o=n<.5?2*n*n:(4-2*n)*n-1),"easeInCubic"===t.easing&&(o=n*n*n),"easeOutCubic"===t.easing&&(o=--n*n*n+1),"easeInOutCubic"===t.easing&&(o=n<.5?4*n*n*n:(n-1)*(2*n-2)*(2*n-2)+1),"easeInQuart"===t.easing&&(o=n*n*n*n),"easeOutQuart"===t.easing&&(o=1- --n*n*n*n),"easeInOutQuart"===t.easing&&(o=n<.5?8*n*n*n*n:1-8*--n*n*n*n),"easeInQuint"===t.easing&&(o=n*n*n*n*n),"easeOutQuint"===t.easing&&(o=1+--n*n*n*n*n),"easeInOutQuint"===t.easing&&(o=n<.5?16*n*n*n*n*n:1+16*--n*n*n*n*n),t.customEasing&&(o=t.customEasing(n)),o||n),w.scrollTo(0,Math.floor(f)),b(f,g)||(A=w.requestAnimationFrame(O),d=e)};0===w.pageYOffset&&w.scrollTo(0,0),m=i,h=c,u||history.pushState&&h.updateURL&&history.pushState({smoothScroll:JSON.stringify(h),anchor:m.id},document.title,m===document.documentElement?"#top":"#"+m.id),"matchMedia"in w&&w.matchMedia("(prefers-reduced-motion)").matches?w.scrollTo(0,Math.floor(g)):(Q("scrollStart",c,i,s),C.cancelScroll(!0),w.requestAnimationFrame(O))}};var t=function(e){if(!e.defaultPrevented&&!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey)&&"closest"in e.target&&(a=e.target.closest(o))&&"a"===a.tagName.toLowerCase()&&!e.target.closest(I.ignore)&&a.hostname===w.location.hostname&&a.pathname===w.location.pathname&&/#/.test(a.href)){var t,n;try{t=r(decodeURIComponent(a.hash))}catch(e){t=r(a.hash)}if("#"===t){if(!I.topOnEmptyHash)return;n=document.documentElement}else n=document.querySelector(t);(n=n||"#top"!==t?n:document.documentElement)&&(e.preventDefault(),(function(e){if(history.replaceState&&e.updateURL&&!history.state){var t=w.location.hash;t=t||"",history.replaceState({smoothScroll:JSON.stringify(e),anchor:t||w.pageYOffset},document.title,t||w.location.href)}})(I),C.animateScroll(n,a))}},n=function(e){if(null!==history.state&&history.state.smoothScroll&&history.state.smoothScroll===JSON.stringify(I)){var t=history.state.anchor;"string"==typeof t&&t&&!(t=document.querySelector(r(history.state.anchor)))||C.animateScroll(t,null,{updateURL:!1})}};C.destroy=function(){I&&(document.removeEventListener("click",t,!1),w.removeEventListener("popstate",n,!1),C.cancelScroll(),A=M=a=I=null)};return (function(){if(!("querySelector"in document&&"addEventListener"in w&&"requestAnimationFrame"in w&&"closest"in w.Element.prototype))throw"Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.";C.destroy(),I=H(L,e||{}),M=I.header?document.querySelector(I.header):null,document.addEventListener("click",t,!1),I.updateURL&&I.popstate&&w.addEventListener("popstate",n,!1)})(),C}})); \ No newline at end of file diff --git a/assets/lib/smooth-scroll/smooth-scroll.polyfills.min.js b/assets/lib/smooth-scroll/smooth-scroll.polyfills.min.js deleted file mode 100755 index 311685af..00000000 --- a/assets/lib/smooth-scroll/smooth-scroll.polyfills.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! smooth-scroll v16.1.2 | (c) 2020 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/smooth-scroll */ -window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t,n=(this.document||this.ownerDocument).querySelectorAll(e),o=this;do{for(t=n.length;0<=--t&&n.item(t)!==o;);}while(t<0&&(o=o.parentElement));return o}),(function(){if("function"==typeof window.CustomEvent)return;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e})(),(function(){for(var r=0,e=["ms","moz","webkit","o"],t=0;to.durationMax?o.durationMax:o.durationMin&&a=v)return M.cancelScroll(!0),o=t,a=u,0===(n=i)&&document.body.focus(),a||(n.focus(),document.activeElement!==n&&(n.setAttribute("tabindex","-1"),n.focus(),n.style.outline="none"),q.scrollTo(0,o)),H("scrollStop",s,i,c),!(C=m=null)},b=function(e){var t,n,o;m||(m=e),w+=e-m,d=l+y*(n=r=1<(r=0===S?0:w/S)?1:r,"easeInQuad"===(t=s).easing&&(o=n*n),"easeOutQuad"===t.easing&&(o=n*(2-n)),"easeInOutQuad"===t.easing&&(o=n<.5?2*n*n:(4-2*n)*n-1),"easeInCubic"===t.easing&&(o=n*n*n),"easeOutCubic"===t.easing&&(o=--n*n*n+1),"easeInOutCubic"===t.easing&&(o=n<.5?4*n*n*n:(n-1)*(2*n-2)*(2*n-2)+1),"easeInQuart"===t.easing&&(o=n*n*n*n),"easeOutQuart"===t.easing&&(o=1- --n*n*n*n),"easeInOutQuart"===t.easing&&(o=n<.5?8*n*n*n*n:1-8*--n*n*n*n),"easeInQuint"===t.easing&&(o=n*n*n*n*n),"easeOutQuint"===t.easing&&(o=1+--n*n*n*n*n),"easeInOutQuint"===t.easing&&(o=n<.5?16*n*n*n*n*n:1+16*--n*n*n*n*n),t.customEasing&&(o=t.customEasing(n)),o||n),q.scrollTo(0,Math.floor(d)),E(d,g)||(C=q.requestAnimationFrame(b),m=e)};0===q.pageYOffset&&q.scrollTo(0,0),f=i,h=s,u||history.pushState&&h.updateURL&&history.pushState({smoothScroll:JSON.stringify(h),anchor:f.id},document.title,f===document.documentElement?"#top":"#"+f.id),"matchMedia"in q&&q.matchMedia("(prefers-reduced-motion)").matches?q.scrollTo(0,Math.floor(g)):(H("scrollStart",s,i,c),M.cancelScroll(!0),q.requestAnimationFrame(b))}};var t=function(e){if(!e.defaultPrevented&&!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey)&&"closest"in e.target&&(a=e.target.closest(o))&&"a"===a.tagName.toLowerCase()&&!e.target.closest(A.ignore)&&a.hostname===q.location.hostname&&a.pathname===q.location.pathname&&/#/.test(a.href)){var t,n;try{t=r(decodeURIComponent(a.hash))}catch(e){t=r(a.hash)}if("#"===t){if(!A.topOnEmptyHash)return;n=document.documentElement}else n=document.querySelector(t);(n=n||"#top"!==t?n:document.documentElement)&&(e.preventDefault(),(function(e){if(history.replaceState&&e.updateURL&&!history.state){var t=q.location.hash;t=t||"",history.replaceState({smoothScroll:JSON.stringify(e),anchor:t||q.pageYOffset},document.title,t||q.location.href)}})(A),M.animateScroll(n,a))}},n=function(e){if(null!==history.state&&history.state.smoothScroll&&history.state.smoothScroll===JSON.stringify(A)){var t=history.state.anchor;"string"==typeof t&&t&&!(t=document.querySelector(r(history.state.anchor)))||M.animateScroll(t,null,{updateURL:!1})}};M.destroy=function(){A&&(document.removeEventListener("click",t,!1),q.removeEventListener("popstate",n,!1),M.cancelScroll(),C=O=a=A=null)};return (function(){if(!("querySelector"in document&&"addEventListener"in q&&"requestAnimationFrame"in q&&"closest"in q.Element.prototype))throw"Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.";M.destroy(),A=F(I,e||{}),O=A.header?document.querySelector(A.header):null,document.addEventListener("click",t,!1),A.updateURL&&A.popstate&&q.addEventListener("popstate",n,!1)})(),M}})); \ No newline at end of file diff --git a/assets/lib/valine/valine.scss b/assets/lib/valine/valine.scss index 31c8f482..c68a0462 100644 --- a/assets/lib/valine/valine.scss +++ b/assets/lib/valine/valine.scss @@ -18,7 +18,7 @@ $single-link-color-dark: #55bde2 !default; $code-background-color: #f5f5f5 !default; $code-background-color-dark: #272C34 !default; -.dark-theme { +.dark { // copied from https://github.com/xCss/Valine/issues/221 .v *, .v .vwrap .vheader .vinput, diff --git a/exampleSite/config.toml b/exampleSite/config.toml index b4886a23..c1fd9db2 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -93,6 +93,17 @@ enableEmoji = true keywords = ["Theme", "Hugo"] # site default theme ("light", "dark", "auto") defaultTheme = "auto" + # Search + [languages.en.params.search] + enable = true + # type of search engine ("lunr", "algolia") + type = "algolia" + # index length of the content + contentLength = 5000 + [languages.en.params.search.algolia] + index = "index.en" + appID = "PASDMWALPK" + searchKey = "b42948e51daaa93df92381c8e2ac0f93" # Home Page Info [languages.en.params.home] # Home Page Profile @@ -327,6 +338,17 @@ enableEmoji = true keywords = ["Theme", "Hugo"] # 网站默认主题 ("light", "dark", "auto") defaultTheme = "auto" + # 搜索 + [languages.zh-cn.params.search] + enable = true + # 搜索引擎的类型 ("lunr", "algolia") + type = "algolia" + # 文章内容索引长度 + contentLength = 5000 + [languages.zh-cn.params.search.algolia] + index = "index.zh-cn" + appID = "PASDMWALPK" + searchKey = "b42948e51daaa93df92381c8e2ac0f93" # 主页信息设置 [languages.zh-cn.params.home] # 主页个人信息 @@ -561,6 +583,17 @@ enableEmoji = true keywords = ["Thème", "Hugo"] # site default theme ("light", "dark", "auto") defaultTheme = "auto" + # Search + [languages.fr.params.search] + enable = true + # type of search engine ("lunr", "algolia") + type = "algolia" + # index length of the content + contentLength = 5000 + [languages.fr.params.search.algolia] + index = "index.fr" + appID = "PASDMWALPK" + searchKey = "b42948e51daaa93df92381c8e2ac0f93" # Home Page Info [languages.fr.params.home] # Home Page Profile @@ -847,6 +880,12 @@ enableEmoji = true animateCSS = '' # smooth-scroll@16.1.2 https://github.com/cferdinandi/smooth-scroll smoothScrollJS = '' + # autocomplete.js@0.37.1 https://github.com/algolia/autocomplete.js + autocompleteJS = '' + # lunr.js@2.3.8 https://lunrjs.com/ + lunrJS = '' + # algoliasearch@4.1.0 https://github.com/algolia/algoliasearch-client-javascript + algoliasearchJS = '' # sharer@0.4.0 https://github.com/ellisonleao/sharer.js sharerJS = '' # lazysizes@5.2.0 https://github.com/aFarkas/lazysizes @@ -858,7 +897,7 @@ enableEmoji = true lightgalleryZoomJS = '' # typeit@6.5.1 https://github.com/alexmacarthur/typeit typeitJS = '' - # katex@0.11.1 https://github.com/KaTeX/KaTeX + # katex@0.11.1 https://katex.org/ katexCSS = '' katexJS = '' katexAutoRenderJS = '' @@ -867,17 +906,17 @@ enableEmoji = true katexMhchemJS = '' # mermaid@8.4.8 https://github.com/knsv/mermaid mermaidJS = '' - # aplayer@1.10.1 https://github.com/MoePlayer/APlayer - aplayerCSS = '' - aplayerJS = '' - # meting@2.0.1 https://github.com/metowolf/MetingJS - metingJS = '' # echarts@4.6.0 https://echarts.apache.org/ echartsJS = '' echartsMacaronsJS = '' # mapbox-gl@1.8.1 https://docs.mapbox.com/mapbox-gl-js mapboxGLCSS = '' mapboxGLJS = '' + # aplayer@1.10.1 https://github.com/MoePlayer/APlayer + aplayerCSS = '' + aplayerJS = '' + # meting@2.0.1 https://github.com/metowolf/MetingJS + metingJS = '' # gitalk@1.6.2 https://github.com/gitalk/gitalk gitalkCSS = '' gitalkJS = '' @@ -962,7 +1001,7 @@ enableEmoji = true # Options to make hugo output files # 用于 Hugo 输出文档的设置 [outputs] - home = ["HTML", "RSS"] + home = ["HTML", "RSS", "JSON"] page = ["HTML", "MarkDown"] section = ["HTML", "RSS"] taxonomy = ["HTML", "RSS"] diff --git a/exampleSite/content/about.en.md b/exampleSite/content/about.en.md index bdde2612..3ed7f317 100644 --- a/exampleSite/content/about.en.md +++ b/exampleSite/content/about.en.md @@ -54,11 +54,12 @@ It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) a #### Extended Features +* :(fas fa-search): **Search** supported by [Lunr.js](https://lunrjs.com/) or [algolia](https://www.algolia.com/) * :(fas fa-code): Automatically **highlighting** code * :(far fa-images): **Images gallery** supported by [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) -* :(fab fa-font-awesome): Extended markdown syntax for **[Font Awesome](https://fontawesome.com/) icons** -* :(far fa-sticky-note): Extended markdown syntax for **ruby annotation** -* :(fas fa-percentage): Extended markdown syntax for **fraction** +* :(fab fa-font-awesome): Extended Markdown syntax for **[Font Awesome](https://fontawesome.com/) icons** +* :(far fa-sticky-note): Extended Markdown syntax for **ruby annotation** +* :(fas fa-percentage): Extended Markdown syntax for **fraction** * :(fas fa-square-root-alt): **Mathematical formula** supported by [$ \KaTeX $](https://katex.org/) * :(fas fa-project-diagram): **Diagrams** shortcode supported by [mermaid](https://github.com/knsv/mermaid) * :(fas fa-chart-pie): **Interactive data visualization** shortcode supported by [ECharts](https://echarts.apache.org/) @@ -82,9 +83,13 @@ Thanks to the authors of following resources included in the theme: * [Font Awesome](https://fontawesome.com/) * [Fork Awesome](https://forkaweso.me/Fork-Awesome/) * [Animate.css](https://daneden.github.io/animate.css/) +* [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll) +* [autocomplete.js](https://github.com/algolia/autocomplete.js) +* [Lunr.js](https://lunrjs.com/) +* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript) +* [Sharer.js](https://github.com/ellisonleao/sharer.js) * [lazysizes](https://github.com/aFarkas/lazysizes) * [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) -* [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll) * [TypeIt](https://typeitjs.com/) * [$ \KaTeX $](https://katex.org/) * [mermaid](https://github.com/knsv/mermaid) diff --git a/exampleSite/content/about.fr.md b/exampleSite/content/about.fr.md index 50e4c22d..bea1726c 100644 --- a/exampleSite/content/about.fr.md +++ b/exampleSite/content/about.fr.md @@ -59,11 +59,12 @@ It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) a #### Extended Features +* :(fas fa-search): **Search** supported by [Lunr.js](https://lunrjs.com/) or [algolia](https://www.algolia.com/) * :(fas fa-code): Automatically **highlighting** code * :(far fa-images): **Images gallery** supported by [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) -* :(fab fa-font-awesome): Extended markdown syntax for **[Font Awesome](https://fontawesome.com/) icons** -* :(far fa-sticky-note): Extended markdown syntax for **ruby annotation** -* :(fas fa-percentage): Extended markdown syntax for **fraction** +* :(fab fa-font-awesome): Extended Markdown syntax for **[Font Awesome](https://fontawesome.com/) icons** +* :(far fa-sticky-note): Extended Markdown syntax for **ruby annotation** +* :(fas fa-percentage): Extended Markdown syntax for **fraction** * :(fas fa-square-root-alt): **Mathematical formula** supported by [$ \KaTeX $](https://katex.org/) * :(fas fa-project-diagram): **Diagrams** shortcode supported by [mermaid](https://github.com/knsv/mermaid) * :(fas fa-chart-pie): **Interactive data visualization** shortcode supported by [ECharts](https://echarts.apache.org/) @@ -87,9 +88,13 @@ Thanks to the authors of following resources included in the theme: * [Font Awesome](https://fontawesome.com/) * [Fork Awesome](https://forkaweso.me/Fork-Awesome/) * [Animate.css](https://daneden.github.io/animate.css/) +* [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll) +* [autocomplete.js](https://github.com/algolia/autocomplete.js) +* [Lunr.js](https://lunrjs.com/) +* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript) +* [Sharer.js](https://github.com/ellisonleao/sharer.js) * [lazysizes](https://github.com/aFarkas/lazysizes) * [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) -* [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll) * [TypeIt](https://typeitjs.com/) * [$ \KaTeX $](https://katex.org/) * [mermaid](https://github.com/knsv/mermaid) diff --git a/exampleSite/content/about.zh-cn.md b/exampleSite/content/about.zh-cn.md index cb423fbe..ef508aae 100644 --- a/exampleSite/content/about.zh-cn.md +++ b/exampleSite/content/about.zh-cn.md @@ -54,6 +54,7 @@ lightgallery: true #### 扩展功能 +* :(fas fa-search): 支持基于 [Lunr.js](https://lunrjs.com/) 或 [algolia](https://www.algolia.com/) 的**搜索** * :(fas fa-code): 支持**代码高亮** * :(far fa-images): 支持基于 [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) 的**图片画廊** * :(fab fa-font-awesome): 支持 **[Font Awesome](https://fontawesome.com/) 图标**的扩展 Markdown 语法 @@ -82,9 +83,13 @@ LoveIt 主题中用到了以下项目,感谢它们的作者: * [Font Awesome](https://fontawesome.com/) * [Fork Awesome](https://forkaweso.me/Fork-Awesome/) * [Animate.css](https://daneden.github.io/animate.css/) +* [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll) +* [autocomplete.js](https://github.com/algolia/autocomplete.js) +* [Lunr.js](https://lunrjs.com/) +* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript) +* [Sharer.js](https://github.com/ellisonleao/sharer.js) * [lazysizes](https://github.com/aFarkas/lazysizes) * [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) -* [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll) * [TypeIt](https://typeitjs.com/) * [$ \KaTeX $](https://katex.org/) * [mermaid](https://github.com/knsv/mermaid) diff --git a/exampleSite/content/posts/theme-documentation-basics.en.md b/exampleSite/content/posts/theme-documentation-basics.en.md index 5f65b90c..317b4cf6 100644 --- a/exampleSite/content/posts/theme-documentation-basics.en.md +++ b/exampleSite/content/posts/theme-documentation-basics.en.md @@ -204,6 +204,17 @@ Note that some of these parameters are explained in details in other sections of # {{< version 0.1.1 new small >}} which hash function used for SRI, when empty, no SRI is used # ("sha256", "sha384", "sha512", "md5") fingerprint = "" + # {{< version 0.2.0 new small >}} Search + [params.search] + enable = true + # type of search engine ("lunr", "algolia") + type = "lunr" + # index length of the content + contentLength = 5000 + [params.search.algolia] + index = "" + appID = "" + searchKey = "" # Header info [params.header] # desktop header mode ("fixed", "normal", "auto") @@ -455,6 +466,12 @@ Note that some of these parameters are explained in details in other sections of animateCSS = '' # {{< link "https://github.com/cferdinandi/smooth-scroll" "smooth-scroll" >}}@16.1.2 smoothScrollJS = '' + # {{< version 0.2.0 new small >}} {{< link "https://github.com/algolia/autocomplete.js" "autocomplete.js" >}}@0.37.1 + autocompleteJS = '' + # {{< version 0.2.0 new small >}} {{< link "https://lunrjs.com/" "lunr.js" >}}@2.3.8 + lunrJS = '' + # {{< version 0.2.0 new small >}} {{< link "https://github.com/algolia/algoliasearch-client-javascript" "algoliasearch" >}}@4.1.0 + algoliasearchJS = '' # {{< link "https://github.com/ellisonleao/sharer.js" "sharer" >}}@0.4.0 sharerJS = '' # {{< link "https://github.com/aFarkas/lazysizes" "lazysizes" >}}@5.2.0 @@ -475,17 +492,17 @@ Note that some of these parameters are explained in details in other sections of katexMhchemJS = '' # {{< link "https://github.com/knsv/mermaid" "mermaid" >}}@8.4.8 mermaidJS = '' - # {{< link "https://github.com/MoePlayer/APlayer" "aplayer" >}}@1.10.1 - aplayerCSS = '' - aplayerJS = '' - # {{< link "https://github.com/metowolf/MetingJS" "meting" >}}@2.0.1 - metingJS = '' # {{< link "https://echarts.apache.org/" "echarts" >}}@4.6.0 echartsJS = '' echartsMacaronsJS = '' # {{< version 0.2.0 new small >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" mapbox-gl >}}@1.8.1 mapboxGLCSS = '' mapboxGLJS = '' + # {{< link "https://github.com/MoePlayer/APlayer" "aplayer" >}}@1.10.1 + aplayerCSS = '' + aplayerJS = '' + # {{< link "https://github.com/metowolf/MetingJS" "meting" >}}@2.0.1 + metingJS = '' # {{< link "https://github.com/gitalk/gitalk" "gitalk" >}}@1.6.2 gitalkCSS = '' gitalkJS = '' @@ -558,13 +575,24 @@ Note that some of these parameters are explained in details in other sections of # Options to make hugo output files [outputs] - home = ["HTML", "RSS"] + # {{< version 0.2.0 changed small >}} + home = ["HTML", "RSS", "JSON"] page = ["HTML", "MarkDown"] section = ["HTML", "RSS"] taxonomy = ["HTML", "RSS"] taxonomyTerm = ["HTML"] ``` +{{< admonition tip "Tips about CDN Configuration" >}} +Full HTML tags or URLs are supported for CDN configuration: + +```toml +smoothScrollJS = '' +# Or +smoothScrollJS = 'https://cdn.jsdelivr.net/npm/smooth-scroll@16/dist/smooth-scroll.min.js' +``` +{{< /admonition >}} + ![Complete configuration preview](/images/theme-documentation-basics/complete-configuration-preview.png "Complete configuration preview") ### 3.2 Favicons, Browserconfig, Manifest @@ -733,3 +761,50 @@ Translations strings are used for common default values used in the theme. Trans To override these values, create a new file in your local i18n folder `i18n/.toml` and inspire yourself from `themes/LoveIt/i18n/en.toml`. By the way, as these translations could be used by other people, please take the time to propose a translation by [making a PR](https://github.com/dillonzq/LoveIt/pulls) to the theme! + +## 5 Search + +{{< version 0.2.0 >}} + +Based on [Lunr.js](https://lunrjs.com/) or [algolia](https://www.algolia.com/), searching is supported in **LoveIt** theme. + +### 5.1 Output Configuration + +In order to generate `index.json` for searching, add `JSON` output file type to the `home` of the `outputs` part in your [site configuration](#site-configuration). + +```toml +[outputs] + home = ["HTML", "RSS", "JSON"] +``` + +### 5.2 Search Configuration + +Based on `index.json` generated by Hugo, you could activate searching. + +Here is the search configuration in your [site configuration](#site-configuration): + +```toml +[params.search] + enable = true + # type of search engine ("lunr", "algolia") + type = "lunr" + # index length of the content + contentLength = 5000 + [params.search.algolia] + index = "" + appID = "" + searchKey = "" +``` + +{{< admonition note "How to choose the type of search engine?" >}} +* `lunr`: simple, no need to synchronize `index.json`, no limit for `contentLength`, + but high bandwidth and low performance (Especially for Chinese which needs a large segmentit library) +* `algolia`: high performance and low bandwidth, but need to synchronize `index.json` and limit for `contentLength` +{{< /admonition >}} + +{{< admonition tip "Tips about algolia" >}} +You need to upload `index.json` files to algolia to activate searching. +You could upload the `index.json` files by browsers but a script may be a better choice. +To be compatible with Hugo multilingual mode, +you need to upload different `index.json` for each language to the different index of algolia, such as `zh-cn/index.json` or `fr/index.json`... +{{< /admonition >}} diff --git a/exampleSite/content/posts/theme-documentation-basics.fr.md b/exampleSite/content/posts/theme-documentation-basics.fr.md index 41c13dcc..7d2bbbba 100644 --- a/exampleSite/content/posts/theme-documentation-basics.fr.md +++ b/exampleSite/content/posts/theme-documentation-basics.fr.md @@ -209,6 +209,17 @@ Note that some of these parameters are explained in details in other sections of # {{< version 0.1.1 new small >}} which hash function used for SRI, when empty, no SRI is used # ("sha256", "sha384", "sha512", "md5") fingerprint = "" + # {{< version 0.2.0 new small >}} Search + [params.search] + enable = true + # type of search engine ("lunr", "algolia") + type = "lunr" + # index length of the content + contentLength = 5000 + [params.search.algolia] + index = "" + appID = "" + searchKey = "" # Header info [params.header] # desktop header mode ("fixed", "normal", "auto") @@ -460,6 +471,12 @@ Note that some of these parameters are explained in details in other sections of animateCSS = '' # {{< link "https://github.com/cferdinandi/smooth-scroll" "smooth-scroll" >}}@16.1.2 smoothScrollJS = '' + # {{< version 0.2.0 new small >}} {{< link "https://github.com/algolia/autocomplete.js" "autocomplete.js" >}}@0.37.1 + autocompleteJS = '' + # {{< version 0.2.0 new small >}} {{< link "https://lunrjs.com/" "lunr.js" >}}@2.3.8 + lunrJS = '' + # {{< version 0.2.0 new small >}} {{< link "https://github.com/algolia/algoliasearch-client-javascript" "algoliasearch" >}}@4.1.0 + algoliasearchJS = '' # {{< link "https://github.com/ellisonleao/sharer.js" "sharer" >}}@0.4.0 sharerJS = '' # {{< link "https://github.com/aFarkas/lazysizes" "lazysizes" >}}@5.2.0 @@ -480,17 +497,17 @@ Note that some of these parameters are explained in details in other sections of katexMhchemJS = '' # {{< link "https://github.com/knsv/mermaid" "mermaid" >}}@8.4.8 mermaidJS = '' - # {{< link "https://github.com/MoePlayer/APlayer" "aplayer" >}}@1.10.1 - aplayerCSS = '' - aplayerJS = '' - # {{< link "https://github.com/metowolf/MetingJS" "meting" >}}@2.0.1 - metingJS = '' # {{< link "https://echarts.apache.org/" "echarts" >}}@4.6.0 echartsJS = '' echartsMacaronsJS = '' # {{< version 0.2.0 new small >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" mapbox-gl >}}@1.8.1 mapboxGLCSS = '' mapboxGLJS = '' + # {{< link "https://github.com/MoePlayer/APlayer" "aplayer" >}}@1.10.1 + aplayerCSS = '' + aplayerJS = '' + # {{< link "https://github.com/metowolf/MetingJS" "meting" >}}@2.0.1 + metingJS = '' # {{< link "https://github.com/gitalk/gitalk" "gitalk" >}}@1.6.2 gitalkCSS = '' gitalkJS = '' @@ -563,13 +580,24 @@ Note that some of these parameters are explained in details in other sections of # Options to make hugo output files [outputs] - home = ["HTML", "RSS"] + # {{< version 0.2.0 changed small >}} + home = ["HTML", "RSS", "JSON"] page = ["HTML", "MarkDown"] section = ["HTML", "RSS"] taxonomy = ["HTML", "RSS"] taxonomyTerm = ["HTML"] ``` +{{< admonition tip "Tips about CDN Configuration" >}} +Full HTML tags or URLs are supported for CDN configuration: + +```toml +smoothScrollJS = '' +# Or +smoothScrollJS = 'https://cdn.jsdelivr.net/npm/smooth-scroll@16/dist/smooth-scroll.min.js' +``` +{{< /admonition >}} + ![Complete configuration preview](/images/theme-documentation-basics/complete-configuration-preview.png "Complete configuration preview") ### 3.2 Favicons, Browserconfig, Manifest @@ -738,3 +766,50 @@ Translations strings are used for common default values used in the theme. Trans To override these values, create a new file in your local i18n folder `i18n/.toml` and inspire yourself from `themes/LoveIt/i18n/en.toml`. By the way, as these translations could be used by other people, please take the time to propose a translation by [making a PR](https://github.com/dillonzq/LoveIt/pulls) to the theme! + +## 5 Search + +{{< version 0.2.0 >}} + +Based on [Lunr.js](https://lunrjs.com/) or [algolia](https://www.algolia.com/), searching is supported in **LoveIt** theme. + +### 5.1 Output Configuration + +In order to generate `index.json` for searching, add `JSON` output file type to the `home` of the `outputs` part in your [site configuration](#site-configuration). + +```toml +[outputs] + home = ["HTML", "RSS", "JSON"] +``` + +### 5.2 Search Configuration + +Based on `index.json` generated by Hugo, you could activate searching. + +Here is the search configuration in your [site configuration](#site-configuration): + +```toml +[params.search] + enable = true + # type of search engine ("lunr", "algolia") + type = "lunr" + # index length of the content + contentLength = 5000 + [params.search.algolia] + index = "" + appID = "" + searchKey = "" +``` + +{{< admonition note "How to choose the type of search engine?" >}} +* `lunr`: simple, no need to synchronize `index.json`, no limit for `contentLength`, + but high bandwidth and low performance (Especially for Chinese which needs a large segmentit library) +* `algolia`: high performance and low bandwidth, but need to synchronize `index.json` and limit for `contentLength` +{{< /admonition >}} + +{{< admonition tip "Tips about algolia" >}} +You need to upload `index.json` files to algolia to activate searching. +You could upload the `index.json` files by browsers but a script may be a better choice. +To be compatible with Hugo multilingual mode, +you need to upload different `index.json` for each language to the different index of algolia, such as `zh-cn/index.json` or `fr/index.json`... +{{< /admonition >}} diff --git a/exampleSite/content/posts/theme-documentation-basics.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics.zh-cn.md index aa6cc94a..d650424f 100644 --- a/exampleSite/content/posts/theme-documentation-basics.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-basics.zh-cn.md @@ -207,6 +207,17 @@ hugo # {{< version 0.1.1 new small >}} 哪种哈希函数用来 SRI, 为空时表示不使用 SRI # ("sha256", "sha384", "sha512", "md5") fingerprint = "" + # {{< version 0.2.0 new small >}} 搜索 + [params.search] + enable = true + # 搜索引擎的类型 ("lunr", "algolia") + type = "lunr" + # 文章内容索引长度 + contentLength = 5000 + [params.search.algolia] + index = "" + appID = "" + searchKey = "" # 页面头部导航栏信息 [params.header] # 桌面端导航栏模式 ("fixed", "normal", "auto") @@ -457,6 +468,12 @@ hugo animateCSS = '' # {{< link "https://github.com/cferdinandi/smooth-scroll" "smooth-scroll" >}}@16.1.2 smoothScrollJS = '' + # {{< version 0.2.0 new small >}} {{< link "https://github.com/algolia/autocomplete.js" "autocomplete.js" >}}@0.37.1 + autocompleteJS = '' + # {{< version 0.2.0 new small >}} {{< link "https://lunrjs.com/" "lunr.js" >}}@2.3.8 + lunrJS = '' + # {{< version 0.2.0 new small >}} {{< link "https://github.com/algolia/algoliasearch-client-javascript" "algoliasearch" >}}@4.1.0 + algoliasearchJS = '' # {{< link "https://github.com/ellisonleao/sharer.js" "sharer" >}}@0.4.0 sharerJS = '' # {{< link "https://github.com/aFarkas/lazysizes" "lazysizes" >}}@5.2.0 @@ -477,17 +494,17 @@ hugo katexMhchemJS = '' # {{< link "https://github.com/knsv/mermaid" "mermaid" >}}@8.4.8 mermaidJS = '' - # {{< link "https://github.com/MoePlayer/APlayer" "aplayer" >}}@1.10.1 - aplayerCSS = '' - aplayerJS = '' - # {{< link "https://github.com/metowolf/MetingJS" "meting" >}}@2.0.1 - metingJS = '' # {{< link "https://echarts.apache.org/" "echarts" >}}@4.6.0 echartsJS = '' echartsMacaronsJS = '' # {{< version 0.2.0 new small >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" mapbox-gl >}}@1.8.1 mapboxGLCSS = '' mapboxGLJS = '' + # {{< link "https://github.com/MoePlayer/APlayer" "aplayer" >}}@1.10.1 + aplayerCSS = '' + aplayerJS = '' + # {{< link "https://github.com/metowolf/MetingJS" "meting" >}}@2.0.1 + metingJS = '' # {{< link "https://github.com/gitalk/gitalk" "gitalk" >}}@1.6.2 gitalkCSS = '' gitalkJS = '' @@ -560,13 +577,24 @@ hugo # 用于 Hugo 输出文档的设置 [outputs] - home = ["HTML", "RSS"] + # {{< version 0.2.0 changed small >}} + home = ["HTML", "RSS", "JSON"] page = ["HTML", "MarkDown"] section = ["HTML", "RSS"] taxonomy = ["HTML", "RSS"] taxonomyTerm = ["HTML"] ``` +{{< admonition tip "关于 CDN 配置的技巧" >}} +在 CDN 的配置中, 完整的 HTML 标签和 URL 都是支持的: + +```toml +smoothScrollJS = '' +# 或者 +smoothScrollJS = 'https://cdn.jsdelivr.net/npm/smooth-scroll@16/dist/smooth-scroll.min.js' +``` +{{< /admonition >}} + ![完整配置下的预览](/images/theme-documentation-basics/complete-configuration-preview.zh-cn.png "完整配置下的预览") ### 3.2 网站图标, 浏览器配置, 网站清单 @@ -736,3 +764,47 @@ defaultContentLanguage = "zh-cn" 要覆盖默认值, 请在项目的 i18n 目录 `i18n/.toml` 中创建一个新文件,并从 `themes/LoveIt/i18n/en.toml` 中获得提示. 另外, 由于你的翻译可能会帮助到其他人, 请花点时间通过 [创建一个 PR](https://github.com/dillonzq/LoveIt/pulls) 来贡献主题翻译, 谢谢! + +## 5 搜索 + +{{< version 0.2.0 >}} + +基于 [Lunr.js](https://lunrjs.com/) 或 [algolia](https://www.algolia.com/), **LoveIt** 主支持搜索功能. + +### 5.1 输出配置 + +为了生成搜索功能所需要的 `index.json`, 请在你的 [网站配置](#site-configuration) 中添加 `JSON` 输出文件类型到 `outputs` 部分的 `home` 字段中. + +```toml +[outputs] + home = ["HTML", "RSS", "JSON"] +``` + +### 5.2 搜索配置 + +基于 Hugo 生成的 `index.json` 文件, 你可以激活搜索功能. + +这是你的 [网站配置](#site-configuration) 中的搜索部分: + +```toml +[params.search] + enable = true + # type of search engine ("lunr", "algolia") + type = "lunr" + # index length of the content + contentLength = 5000 + [params.search.algolia] + index = "" + appID = "" + searchKey = "" +``` + +{{< admonition note "怎样选择搜索引擎的类型?" >}} +* `lunr`: 简单, 无需同步 `index.json`, 没有 `contentLength` 的限制, 但占用带宽大且性能低 (特别是中文需要一个较大的分词依赖库) +* `algolia`: 高性能并且占用带宽低, 但需要同步 `index.json` 且有 `contentLength` 的限制 +{{< /admonition >}} + +{{< admonition tip "关于 algolia 的使用技巧" >}} +你需要上传 `index.json` 到 algolia 来激活搜索功能. 你可以使用浏览器来上传 `index.json` 文件但是一个自动化的脚本可能是更好的选择. +为了兼容 Hugo 的多语言模式, 你需要上传不同语言的 `index.json` 文件到对应的 algolia index, 例如 `zh-cn/index.json` 或 `fr/index.json`... +{{< /admonition >}} diff --git a/exampleSite/content/posts/theme-documentation-content.en.md b/exampleSite/content/posts/theme-documentation-content.en.md index 77e90b27..24212a92 100644 --- a/exampleSite/content/posts/theme-documentation-content.en.md +++ b/exampleSite/content/posts/theme-documentation-content.en.md @@ -68,6 +68,7 @@ license: "" tags: [] categories: [] hiddenFromHomePage: false +hiddenFromSearch: false featuredImage: "" featuredImagePreview: "" @@ -103,6 +104,7 @@ comment: true * **tags**: the tags for the content. * **categories**: the categories for the content. * **hiddenFromHomePage**: if `true`, the content will not be shown in the home page, but this behaviour is configurabl in the [site configuration](../theme-documentation-basics/#site-configuration). +* **hiddenFromSearch**: {{< version 0.2.0 >}} if `true`, the content will not be shown in the search results. * **featuredImage**: the featured image for the content. * **featuredImagePreview**: the featured image for the content preview in the home page. * **toc**: if `true`, the content will show the table of the contents. @@ -114,6 +116,10 @@ comment: true * **share**: the same as `params.share` in the [site configuration](../theme-documentation-basics/#site-configuration). * **comment**: if `true`, the comment will be used. +{{< admonition tip >}} +Not all of the above front matters need to be set in each of your posts. It is necessary only if the front matters and your [site configuration](../theme-documentation-basics/#site-configuration) are inconsistent. +{{< /admonition >}} + ## 3 Content Summaries **LoveIt** theme uses the summary of the content to display abstract information in the home page. Hugo can generate summaries of your content. diff --git a/exampleSite/content/posts/theme-documentation-content.fr.md b/exampleSite/content/posts/theme-documentation-content.fr.md index 77c9aeee..4d94f4af 100644 --- a/exampleSite/content/posts/theme-documentation-content.fr.md +++ b/exampleSite/content/posts/theme-documentation-content.fr.md @@ -73,6 +73,7 @@ license: "" tags: [] categories: [] hiddenFromHomePage: false +hiddenFromSearch: false featuredImage: "" featuredImagePreview: "" @@ -108,6 +109,7 @@ comment: true * **tags**: the tags for the content. * **categories**: the categories for the content. * **hiddenFromHomePage**: if `true`, the content will not be shown in the home page, but this behaviour is configurabl in the [site configuration](../theme-documentation-basics/#site-configuration). +* **hiddenFromSearch**: {{< version 0.2.0 >}} if `true`, the content will not be shown in the search results. * **featuredImage**: the featured image for the content. * **featuredImagePreview**: the featured image for the content preview in the home page. * **toc**: if `true`, the content will show the table of the contents. @@ -119,6 +121,10 @@ comment: true * **share**: the same as `params.share` in the [site configuration](../theme-documentation-basics/#site-configuration). * **comment**: if `true`, the comment will be used. +{{< admonition tip >}} +Not all of the above front matters need to be set in each of your posts. It is necessary only if the front matters and your [site configuration](../theme-documentation-basics/#site-configuration) are inconsistent. +{{< /admonition >}} + ## 3 Content Summaries **LoveIt** theme uses the summary of the content to display abstract information in the home page. Hugo can generate summaries of your content. diff --git a/exampleSite/content/posts/theme-documentation-content.zh-cn.md b/exampleSite/content/posts/theme-documentation-content.zh-cn.md index 892f5e19..7fcb812e 100644 --- a/exampleSite/content/posts/theme-documentation-content.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-content.zh-cn.md @@ -1,7 +1,6 @@ --- weight: 2 title: "主题文档 - 内容" -subtitle: "" date: 2020-03-05T16:30:05+08:00 lastmod: 2020-03-05T16:30:05+08:00 draft: false @@ -12,18 +11,13 @@ license: "" tags: ["内容", "markdown"] categories: ["documentation"] -hiddenFromHomePage: false featuredImage: "/images/theme-documentation-content/featured-image.jpg" -featuredImagePreview: "" toc: true autoCollapseToc: false math: true mapbox: - accessToken: "" - lightStyle: "" - darkStyle: "" navigation: true geolocate: true scale: true @@ -68,6 +62,7 @@ license: "" tags: [] categories: [] hiddenFromHomePage: false +hiddenFromSearch: false featuredImage: "" featuredImagePreview: "" @@ -103,6 +98,7 @@ comment: true * **tags**: 文章的标签. * **categories**: 文章所属的类别. * **hiddenFromHomePage**: 如果设为 `true`, 这篇文章将不会显示在主页上, 但是此行为可以在 [网站配置](../theme-documentation-basics/#site-configuration) 中设置的. +* **hiddenFromSearch**: {{< version 0.2.0 >}} 如果设为 `true`, 这篇文章将不会显示在搜索结果中. * **featuredImage**: 文章的特色图片. * **featuredImagePreview**: 用在主页预览的文章特色图片. * **toc**: 如果设为 `true`, 这篇文章会显示右侧目录. @@ -114,6 +110,11 @@ comment: true * **share**: 和 [网站配置](../theme-documentation-basics/#site-configuration) 中的 `params.share` 对象相同. * **comment**: 如果设为 `true`, 将启用评论系统. +{{< admonition tip >}} +不是所有的上述前置参数都必须在你的每篇文章中设置. +只有在文章的参数和你的 [网站设置](../theme-documentation-basics/#site-configuration) 不一致时才有必要这么做. +{{< /admonition >}} + ## 3 内容摘要 **LoveIt** 主题使用内容摘要在主页中显示大致文章信息。Hugo 支持生成文章的摘要. diff --git a/exampleSite/content/posts/theme-documentation-extended-shortcodes.zh-cn.md b/exampleSite/content/posts/theme-documentation-extended-shortcodes.zh-cn.md index df80bccc..51f57fff 100644 --- a/exampleSite/content/posts/theme-documentation-extended-shortcodes.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-extended-shortcodes.zh-cn.md @@ -12,7 +12,6 @@ license: "" tags: ["shortcodes"] categories: ["documentation"] -hiddenFromHomePage: false featuredImage: "/images/theme-documentation-extended-shortcodes/featured-image.jpg" featuredImagePreview: "/images/theme-documentation-extended-shortcodes/featured-image-preview.jpg" @@ -20,19 +19,6 @@ featuredImagePreview: "/images/theme-documentation-extended-shortcodes/featured- toc: true autoCollapseToc: true math: false -mapbox: - accessToken: "" - lightStyle: "" - darkStyle: "" - navigation: true - geolocate: true - scale: true - fullscreen: true -lightgallery: true -linkToMarkdown: true -share: - enable: true -comment: true --- **LoveIt** 主题在 Hugo 内置的 shortcode 的基础上提供多个扩展的 shortcode. diff --git a/i18n/en.toml b/i18n/en.toml index 6768b1ea..1a62316c 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -40,6 +40,21 @@ other = "More" [selectLanguage] other = "Select Language" +[search] +other = "Search" + +[searchPlaceholder] +other = "Search titles or contents..." + +[clear] +other = "Clear" + +[cancel] +other = "Cancel" + +[noResultsFound] +other = "No results found" + [switchTheme] other = "Switch Theme" # === partials/header.html === diff --git a/i18n/fr.toml b/i18n/fr.toml index 89f82951..349d862d 100644 --- a/i18n/fr.toml +++ b/i18n/fr.toml @@ -40,6 +40,21 @@ other = "Plus" [selectLanguage] other = "Choisir la langue" +[search] +other = "Chercher" + +[searchPlaceholder] +other = "Rechercher des titres, des contenus..." + +[clear] +other = "Clair" + +[cancel] +other = "Annuler" + +[noResultsFound] +other = "Aucun résultat trouvé" + [switchTheme] other = "Changer de Thème" # === partials/header.html === @@ -52,6 +67,14 @@ other = "Propulsé par %s" other = "Thème" # === partials/footer.html === +# === partials/assets.html === +[lunrLanguageLib] +other = "lib/lunr/lunr.fr.js" + +[lunrLanguageCode] +other = "fr" +# === partials/assets.html === + # === partials/plugin/share.html === [shareOn] other = "Partager sur" diff --git a/i18n/zh-CN.toml b/i18n/zh-CN.toml index 1ea516b0..1037e2bc 100644 --- a/i18n/zh-CN.toml +++ b/i18n/zh-CN.toml @@ -40,6 +40,21 @@ other = "更多" [selectLanguage] other = "选择语言" +[search] +other = "搜索" + +[searchPlaceholder] +other = "搜索文章标题或内容..." + +[clear] +other = "清空" + +[cancel] +other = "取消" + +[noResultsFound] +other = "没有找到结果" + [switchTheme] other = "切换主题" # === partials/header.html === @@ -52,6 +67,14 @@ other = "由 %s 强力驱动" other = "主题" # === partials/footer.html === +# === partials/assets.html === +[lunrLanguageLib] +other = "lib/lunr/lunr.zh.js" + +[lunrLanguageCode] +other = "zh" +# === partials/assets.html === + # === partials/plugin/share.html === [shareOn] other = "分享到" diff --git a/layouts/404.html b/layouts/404.html index fbc5d7ff..213fa92e 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -10,13 +10,10 @@

↩︎

- {{- end -}} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 4a945a04..d953768a 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -33,19 +33,10 @@ {{- /* Check theme isDark before body rendering */ -}} - + {{- $theme := .Site.Params.defaultTheme -}} + + +
{{- /* Body wrapper */ -}}
@@ -60,12 +51,12 @@
{{- /* top button */ -}} - + {{- /* comment button */ -}} - +
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 8687942e..4f19da8f 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -12,7 +12,7 @@

{{ . }}

{{- /* Content */ -}}
- {{- partial "single/content.html" .Content -}} + {{- partial "function/content.html" .Content | safeHTML -}}
{{- end -}} diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html index 0c75db25..df7ef025 100644 --- a/layouts/_default/summary.html +++ b/layouts/_default/summary.html @@ -45,7 +45,7 @@

{{- /* Summary content */ -}}
{{- with .Summary -}} - {{- partial "single/content.html" . -}} + {{- partial "function/content.html" . | safeHTML -}} {{- else -}} {{- .Description | safeHTML -}} {{- end -}} diff --git a/layouts/index.json b/layouts/index.json new file mode 100644 index 00000000..dc052dca --- /dev/null +++ b/layouts/index.json @@ -0,0 +1,15 @@ +{{- $index := slice -}} +{{- range where .Site.RegularPages ".Params.hiddenfromsearch" "!=" true -}} + {{- $one := dict "uri" .RelPermalink "title" .Title "description" (.Description | default "") -}} + {{- $tags := .Params.tags | default slice -}} + {{- $one = delimit $tags "\n" | dict "tags" | merge $one -}} + {{- $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}} + {{- $one = dict "date" $publish_date | merge $one -}} + {{- $content := partial "function/content.html" .Content | plainify -}} + {{- if gt .Site.Params.search.contentLength 0 -}} + {{- $content = substr $content 0 .Site.Params.search.contentLength -}} + {{- end -}} + {{- $one = dict "content" $content | merge $one -}} + {{- $index = $index | append $one -}} +{{- end -}} +{{- $index | jsonify | safeJS -}} diff --git a/layouts/partials/assets.html b/layouts/partials/assets.html index 27735b43..b4788afd 100644 --- a/layouts/partials/assets.html +++ b/layouts/partials/assets.html @@ -1,219 +1,241 @@ {{- $scratch := .Scratch.Get "scratch" -}} {{- $CDN := $scratch.Get "CDN" -}} +{{- $fingerprint := $scratch.Get "fingerprint" -}} +{{- $config := dict "desktopHeaderMode" .Site.Params.header.desktopMode "mobileHeaderMode" .Site.Params.header.mobileMode -}} +{{- with $scratch.Get "contentData" -}} + {{- $config = dict "content" . | merge $config -}} +{{- end -}} +{{- with $scratch.Get "comment" -}} + {{- $config = dict "comment" . | merge $config -}} +{{- end -}} {{- /* Fork Awesome */ -}} {{- if $scratch.Get "forkawesome" -}} - {{- slice "lib/forkawesome/fork-awesome.scss" | $scratch.Add "linkLocal" -}} + {{- $options := dict "targetPath" "lib/forkawesome/fork-awesome.min.css" -}} + {{- dict "source" "lib/forkawesome/fork-awesome.scss" "toCSS" $options "fingerprint" $fingerprint | slice | $scratch.Add "stylesheet" -}} {{- end -}} {{- /* iconfont */ -}} {{- if $scratch.Get "iconfont" -}} {{- with $CDN.iconfontCSS -}} - {{- slice . | $scratch.Add "linkCDN" -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "stylesheet" -}} {{- else -}} - {{- slice "lib/iconfont/iconfont.css" | $scratch.Add "linkLocal" -}} + {{- dict "source" "lib/iconfont/iconfont.css" "minify" true "fingerprint" $fingerprint | slice | $scratch.Add "stylesheet" -}} {{- end -}} {{- end -}} {{- /* Smooth Scroll */ -}} {{- with $CDN.smoothScrollJS -}} - {{- slice . | $scratch.Add "scriptCDN" -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}} {{- else -}} - {{- slice "lib/smooth-scroll/smooth-scroll.polyfills.min.js" | $scratch.Add "scriptLocal" -}} + {{- dict "source" "lib/smooth-scroll/smooth-scroll.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} {{- end -}} -{{- /* Sharer.js */ -}} -{{- if $scratch.Get "share" -}} - {{- with $CDN.sharerJS -}} - {{- slice . | $scratch.Add "scriptCDN" -}} +{{- /* Search */ -}} +{{- if .Site.Params.search.enable -}} + {{- with $CDN.autocompleteJS -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}} {{- else -}} - {{- slice "lib/sharer/sharer.min.js" | $scratch.Add "scriptLocal" -}} + {{- dict "source" "lib/autocomplete/autocomplete.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} + {{- end -}} + {{- $searchConfig := dict "noResultsFound" (T "noResultsFound") -}} + {{- if eq .Site.Params.search.type "lunr" -}} + {{- with .Site.Home.OutputFormats.Get "json" -}} + {{- $searchConfig = dict "type" "lunr" "lunrIndexURL" .RelPermalink | merge $searchConfig -}} + {{- end -}} + {{- with $CDN.lunrJS -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}} + {{- else -}} + {{- dict "source" "lib/lunr/lunr.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} + {{- end -}} + {{- if ne .Language.Lang "en" -}} + {{- $searchConfig = T "lunrLanguageCode" | dict "lunrLanguageCode" | merge $searchConfig -}} + {{- if eq .Language.Lang "zh-cn" -}} + {{- $searchConfig = dict "lunrSegmentitURL" (resources.Get "lib/lunr/lunr.segmentit.js").RelPermalink | merge $searchConfig -}} + {{- end -}} + {{- dict "source" "lib/lunr/lunr.stemmer.support.js" "minify" true "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} + {{- dict "source" (T "lunrLanguageLib") "minify" true "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} + {{- end -}} + {{- else if eq .Site.Params.search.type "algolia" -}} + {{- with $CDN.algoliasearchJS -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}} + {{- else -}} + {{- dict "source" "lib/algoliasearch/algoliasearch-lite.umd.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} + {{- end -}} + {{- $searchConfig = dict "type" "algolia" "algoliaIndex" .Site.Params.search.algolia.index "algoliaAppID" .Site.Params.search.algolia.appID "algoliaSearchKey" .Site.Params.search.algolia.searchKey | merge $searchConfig -}} {{- end -}} + {{- $config = dict "search" $searchConfig | merge $config -}} {{- end -}} {{- /* lazysizes */ -}} {{- with $CDN.lazysizesJS -}} - {{- slice . | $scratch.Add "scriptCDN" -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}} {{- else -}} - {{- slice "lib/lazysizes/lazysizes.min.js" | $scratch.Add "scriptLocal" -}} + {{- dict "source" "lib/lazysizes/lazysizes.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} {{- end -}} {{- /* lightgallery.js */ -}} {{- if ne .Site.Params.page.lightgallery false | and (ne .Params.lightgallery false) -}} {{- with $CDN.lightgalleryCSS -}} - {{- slice . | $scratch.Add "linkCDN" -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "stylesheet" -}} {{- else -}} - {{- slice "lib/lightgallery/lightgallery.min.css" | $scratch.Add "linkLocal" -}} + {{- dict "source" "lib/lightgallery/lightgallery.min.css" "fingerprint" $fingerprint | slice | $scratch.Add "stylesheet" -}} {{- end -}} {{- with $CDN.lightgalleryJS -}} - {{- slice . | $scratch.Add "scriptCDN" -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}} {{- else -}} - {{- slice "lib/lightgallery/lightgallery.min.js" | $scratch.Add "scriptLocal" -}} + {{- dict "source" "lib/lightgallery/lightgallery.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} {{- end -}} {{- with $CDN.lightgalleryThumbnailJS -}} - {{- slice . | $scratch.Add "scriptCDN" -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}} {{- else -}} - {{- slice "lib/lightgallery/lg-thumbnail.min.js" | $scratch.Add "scriptLocal" -}} + {{- dict "source" "lib/lightgallery/lg-thumbnail.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} {{- end -}} {{- with $CDN.lightgalleryZoomJS -}} - {{- slice . | $scratch.Add "scriptCDN" -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}} + {{- else -}} + {{- dict "source" "lib/lightgallery/lg-zoom.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} + {{- end -}} + {{- $lightGalleryConfig := dict "selector" ".lightgallery" "speed" 400 "hideBarsDelay" 2000 "thumbnail" true "exThumbImage" "data-thumbnail" "thumbWidth" 80 "thumbContHeight" 80 "actualSize" false -}} + {{- $config = dict "lightGallery" $lightGalleryConfig | merge $config -}} +{{- end -}} + +{{- /* Sharer.js */ -}} +{{- if $scratch.Get "share" -}} + {{- with $CDN.sharerJS -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}} {{- else -}} - {{- slice "lib/lightgallery/lg-zoom.min.js" | $scratch.Add "scriptLocal" -}} + {{- dict "source" "lib/sharer/sharer.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} {{- end -}} - {{- end -}} {{- /* TypeIt */ -}} {{- with $scratch.Get "typeitMap" -}} {{- with $CDN.typeitJS -}} - {{- slice . | $scratch.Add "scriptCDN" -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}} {{- else -}} - {{- slice "lib/typeit/typeit.min.js" | $scratch.Add "scriptLocal" -}} + {{- dict "source" "lib/typeit/typeit.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} {{- end -}} + {{- $typeitConfig := slice -}} {{- range $key, $val := . -}} - {{- slice $val | $scratch.Add "typeitArr" -}} + {{- $typeitConfig = $typeitConfig | append (slice $val) -}} {{- end -}} - + {{- $config = dict "typeit" $typeitConfig | merge $config -}} {{- end -}} {{- /* KaTeX */ -}} {{- if ne .Site.Params.math.enable false | and .Params.math -}} {{- with $CDN.katexCSS -}} - {{- slice . | $scratch.Add "linkCDN" -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "stylesheet" -}} {{- else -}} - {{- slice "lib/katex/katex.min.css" | $scratch.Add "linkLocal" -}} + {{- dict "source" "lib/katex/katex.min.css" "fingerprint" $fingerprint | slice | $scratch.Add "stylesheet" -}} {{- end -}} {{- with $CDN.katexJS -}} - {{- slice . | $scratch.Add "scriptCDN" -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}} {{- else -}} - {{- slice "lib/katex/katex.min.js" | $scratch.Add "scriptLocal" -}} + {{- dict "source" "lib/katex/katex.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} {{- end -}} {{- with $CDN.katexAutoRenderJS -}} - {{- slice . | $scratch.Add "scriptCDN" -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}} {{- else -}} - {{- slice "lib/katex/auto-render.min.js" | $scratch.Add "scriptLocal" -}} + {{- dict "source" "lib/katex/auto-render.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} {{- end -}} {{- $math := .Site.Params.math -}} {{- if $math.copyTex -}} {{- with $CDN.katexCopyTexCSS -}} - {{- slice . | $scratch.Add "linkCDN" -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "stylesheet" -}} {{- else -}} - {{- slice "lib/katex/copy-tex.min.css" | $scratch.Add "linkLocal" -}} + {{- dict "source" "lib/katex/copy-tex.min.css" "fingerprint" $fingerprint | slice | $scratch.Add "stylesheet" -}} {{- end -}} {{- with $CDN.katexCopyTexJS -}} - {{- slice . | $scratch.Add "scriptCDN" -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}} {{- else -}} - {{- slice "lib/katex/copy-tex.min.js" | $scratch.Add "scriptLocal" -}} + {{- dict "source" "lib/katex/copy-tex.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} {{- end -}} {{- end -}} {{- if $math.mhchem -}} {{- with $CDN.katexMhchemJS -}} - {{- slice . | $scratch.Add "scriptCDN" -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}} {{- else -}} - {{- slice "lib/katex/mhchem.min.js" | $scratch.Add "scriptLocal" -}} + {{- dict "source" "lib/katex/mhchem.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} {{- end -}} {{- end -}} - + {{- $mathConfig := dict "strict" false -}} + {{- $delimiters := slice (dict "left" "$$" "right" "$$" "display" true) (dict "left" "\\[" "right" "\\]" "display" true) -}} + {{- if and $math.blockLeftDelimiter $math.blockRightDelimiter -}} + {{- $delimiters = $delimiters | append (dict "left" $math.blockLeftDelimiter "right" $math.blockRightDelimiter "display" true) -}} + {{- end -}} + {{- $delimiters = $delimiters | append (dict "left" "$" "right" "$" "display" false) (dict "left" "\\(" "right" "\\)" "display" false) -}} + {{- if and $math.inlineLeftDelimiter $math.inlineRightDelimiter -}} + {{- $delimiters = $delimiters | append (dict "left" $math.inlineRightDelimiter "right" $math.inlineRightDelimiter "display" false) -}} + {{- end -}} + {{- $mathConfig = dict "delimiters" $delimiters | merge $mathConfig -}} + {{- $config = dict "math" $mathConfig | merge $config -}} {{- end -}} {{- /* mermaid */ -}} {{- if $scratch.Get "mermaid" -}} {{- with $CDN.mermaidJS -}} - {{- slice . | $scratch.Add "scriptCDN" -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}} {{- else -}} - {{- slice "lib/mermaid/mermaid.min.js" | $scratch.Add "scriptLocal" -}} + {{- dict "source" "lib/mermaid/mermaid.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} {{- end -}} - {{- slice "lib/mermaid/mermaid.scss" | $scratch.Add "linkLocal" -}} + {{- $options := dict "targetPath" "lib/mermaid/mermaid.min.css" -}} + {{- dict "source" "lib/mermaid/mermaid.scss" "toCSS" $options "fingerprint" $fingerprint | slice | $scratch.Add "stylesheet" -}} {{- end -}} {{- /* ECharts */ -}} {{- if $scratch.Get "echarts" -}} {{- with $CDN.echartsJS -}} - {{- slice . | $scratch.Add "scriptCDN" -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}} {{- else -}} - {{- slice "lib/echarts/echarts.min.js" | $scratch.Add "scriptLocal" -}} + {{- dict "source" "lib/echarts/echarts.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} {{- end -}} {{- with $CDN.echartsMacaronsJS -}} - {{- slice . | $scratch.Add "scriptCDN" -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}} {{- else -}} - {{- slice "lib/echarts/macarons.js" | $scratch.Add "scriptLocal" -}} + {{- dict "source" "lib/echarts/macarons.js" "minify" true "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} {{- end -}} {{- end -}} {{- /* Mapbox GL */ -}} {{- if $scratch.Get "mapbox" -}} {{- with $CDN.mapboxGLCSS -}} - {{- slice . | $scratch.Add "linkCDN" -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "stylesheet" -}} {{- else -}} - {{- slice "lib/mapbox-gl/mapbox-gl.min.css" | $scratch.Add "linkLocal" -}} + {{- dict "source" "lib/mapbox-gl/mapbox-gl.min.css" "fingerprint" $fingerprint | slice | $scratch.Add "stylesheet" -}} {{- end -}} {{- with $CDN.mapboxGLJS -}} - {{- slice . | $scratch.Add "scriptCDN" -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}} {{- else -}} - {{- slice "lib/mapbox-gl/mapbox-gl.min.js" | $scratch.Add "scriptLocal" -}} + {{- dict "source" "lib/mapbox-gl/mapbox-gl.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} {{- end -}} - {{- slice "lib/mapbox-gl/mapbox-gl-language.js" | $scratch.Add "scriptLocal" -}} - + {{- dict "source" "lib/mapbox-gl/mapbox-gl-language.js" "minify" true "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} + {{- $mapbox := dict "accessToken" (.Params.mapbox.accessToken | default .Site.Params.mapbox.accessToken) "RTLTextPlugin" "https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.0/mapbox-gl-rtl-text.js" -}} + {{- $config = dict "mapbox" $mapbox | merge $config -}} {{- end -}} {{- /* Music */ -}} {{- if $scratch.Get "music" -}} {{- /* APlayer */ -}} {{- with $CDN.aplayerCSS -}} - {{- slice . | $scratch.Add "linkCDN" -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "stylesheet" -}} {{- else -}} - {{- slice "lib/aplayer/APlayer.min.css" | $scratch.Add "linkLocal" -}} + {{- dict "source" "lib/aplayer/APlayer.min.css" "fingerprint" $fingerprint | slice | $scratch.Add "stylesheet" -}} {{- end -}} - {{- slice "lib/aplayer/dark.scss" | $scratch.Add "linkLocal" -}} + {{- $options := dict "targetPath" "lib/aplayer/dark.min.css" -}} + {{- dict "source" "lib/aplayer/dark.scss" "toCSS" $options "fingerprint" $fingerprint | slice | $scratch.Add "stylesheet" -}} {{- with $CDN.aplayerJS -}} - {{- slice . | $scratch.Add "scriptCDN" -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}} {{- else -}} - {{- slice "lib/aplayer/APlayer.min.js" | $scratch.Add "scriptLocal" -}} + {{- dict "source" "lib/aplayer/APlayer.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} {{- end -}} {{- /* MetingJS */ -}} {{- with $CDN.metingJS -}} - {{- slice . | $scratch.Add "scriptCDN" -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}} {{- else -}} - {{- slice "lib/meting/Meting.min.js" | $scratch.Add "scriptLocal" -}} + {{- dict "source" "lib/meting/Meting.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} {{- end -}} {{- end -}} @@ -221,41 +243,20 @@ {{- if .Params.dev -}} {{- end -}} -{{- with $scratch.Get "contentMap" -}} - -{{- end -}} - {{- /* Theme script */ -}} -{{- slice "js/theme.min.js" | $scratch.Add "scriptLocal" -}} +{{- dict "source" "js/theme.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} {{- $_ := (resources.Get "js/theme.min.js.map").RelPermalink -}} -{{- range $scratch.Get "linkCDN" -}} - {{- safeHTML . -}} -{{- end -}} -{{- range $scratch.Get "linkLocal" -}} - {{- $res := resources.Get . -}} - {{- if strings.HasSuffix . ".scss" -}} - {{- $options := dict "outputStyle" "compressed" "enableSourceMap" true -}} - {{- $res = toCSS $options $res -}} - {{- else if not (strings.HasSuffix . ".min.css") -}} - {{- $res = minify $res -}} - {{- end -}} - {{- $stylesheet := dict "resource" $res "fingerprint" ($scratch.Get "fingerprint") -}} - {{- partial "plugin/stylesheet.html" $stylesheet -}} +{{- range $scratch.Get "stylesheet" -}} + {{- partial "plugin/stylesheet.html" . -}} {{- end -}} -{{- range $scratch.Get "scriptCDN" -}} - {{- safeHTML . -}} -{{- end -}} -{{- range $scratch.Get "scriptLocal" -}} - {{- $res := resources.Get . -}} - {{- if not (strings.HasSuffix . ".min.js") -}} - {{- $res = minify $res -}} - {{- end -}} - {{- $script := dict "resource" $res "fingerprint" ($scratch.Get "fingerprint") -}} - {{- partial "plugin/script.html" $script -}} + + +{{- range $scratch.Get "script" -}} + {{- partial "plugin/script.html" . -}} {{- end -}} {{- /* Google analytics async */ -}} diff --git a/layouts/partials/comment.html b/layouts/partials/comment.html index 3abf75bc..d839174d 100644 --- a/layouts/partials/comment.html +++ b/layouts/partials/comment.html @@ -1,126 +1,112 @@ {{- $scratch := .Scratch.Get "scratch" -}} +{{- $CDN := $scratch.Get "CDN" -}} +{{- $fingerprint := $scratch.Get "fingerprint" -}} {{- if eq hugo.Environment "production" | and (ne .Site.Params.comment.enable false) | and (ne .Params.comment false) -}} - {{- $CDN := $scratch.Get "CDN" -}} - - {{- /* Disqus Comment System */ -}} - {{- if .Site.Params.comment.disqus.enable -}} -
- {{- $script := printf `` .Site.Params.comment.disqus.shortname -}} - {{- slice $script | $scratch.Add "scriptCDN" -}} - - {{- end -}} - - {{- /* Gitalk Comment System */ -}} - {{- if .Site.Params.comment.gitalk.enable -}} - {{- $gitalk := .Site.Params.comment.gitalk -}} -
- {{- with $CDN.gitalkCSS -}} - {{- slice . | $scratch.Add "linkCDN" -}} - {{- else -}} - {{- slice "lib/gitalk/gitalk.css" | $scratch.Add "linkLocal" -}} +
+ {{- /* Disqus Comment System */ -}} + {{- if .Site.Params.comment.disqus.enable -}} +
+ {{- $source := printf "https://%s.disqus.com/embed.js" .Site.Params.comment.disqus.shortname -}} + {{- dict "source" $source "defer" true "crossorigin" true | slice | $scratch.Add "script" -}} + {{- end -}} - {{- with $CDN.gitalkJS -}} - {{- slice . | $scratch.Add "scriptCDN" -}} - {{- else -}} - {{- slice "lib/gitalk/gitalk.min.js" | $scratch.Add "scriptLocal" -}} + + {{- /* Gitalk Comment System */ -}} + {{- if .Site.Params.comment.gitalk.enable -}} + {{- $gitalk := .Site.Params.comment.gitalk -}} +
+ {{- with $CDN.gitalkCSS -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "stylesheet" -}} + {{- else -}} + {{- dict "source" "lib/gitalk/gitalk.css" "minify" true "fingerprint" $fingerprint | slice | $scratch.Add "stylesheet" -}} + {{- end -}} + {{- with $CDN.gitalkJS -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}} + {{- else -}} + {{- dict "source" "lib/gitalk/gitalk.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} + {{- end -}} + {{- $gitalkConfig := dict "id" .Date "title" .Title "clientID" $gitalk.clientId "clientSecret" $gitalk.clientSecret "repo" $gitalk.repo "owner" $gitalk.owner "admin" (slice $gitalk.owner) -}} + {{- $scratch.SetInMap "comment" "gitalk" $gitalkConfig -}} + {{- end -}} - - - {{- end -}} - {{- /* Valine Comment System */ -}} - {{- if .Site.Params.comment.valine.enable -}} - {{- $valine := .Site.Params.comment.valine -}} -
- {{- slice "lib/valine/valine.scss" | $scratch.Add "linkLocal" -}} - {{- with $CDN.valineJS -}} - {{- slice . | $scratch.Add "scriptCDN" -}} - {{- else -}} - {{- slice "lib/valine/Valine.min.js" | $scratch.Add "scriptLocal" -}} + {{- /* Valine Comment System */ -}} + {{- if .Site.Params.comment.valine.enable -}} + {{- $valine := .Site.Params.comment.valine -}} +
+ {{- $options := dict "targetPath" "lib/valine/valine.min.css" -}} + {{- dict "source" "lib/valine/valine.scss" "toCSS" $options | slice | $scratch.Add "stylesheet" -}} + {{- with $CDN.valineJS -}} + {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}} + {{- else -}} + {{- dict "source" "lib/valine/Valine.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}} + {{- end -}} + {{- $valineConfig := dict "el" "#valine" "appId" $valine.appId "appKey" $valine.appKey "lang" ($valine.lang | default "en") "notify" $valine.notify "verify" $valine.verify "visitor" $valine.visitor "recordIP" $valine.recordIP -}} + {{- with $valine.placeholder -}} + {{- $valineConfig = dict "placeholder" . | merge $valineConfig -}} + {{- end -}} + {{- with $valine.avatar -}} + {{- $valineConfig = dict "avatar" . | merge $valineConfig -}} + {{- end -}} + {{- with $valine.meta -}} + {{- $valineConfig = dict "meta" . | merge $valineConfig -}} + {{- end -}} + {{- with $valine.pageSize -}} + {{- $valineConfig = dict "pageSize" . | merge $valineConfig -}} + {{- end -}} + {{- $scratch.SetInMap "comment" "valine" $valineConfig -}} + {{- end -}} - - - {{- end -}} - {{- /* Facebook Comment System */ -}} - {{- if .Site.Params.comment.facebook.enable -}} - {{- $facebook := .Site.Params.comment.facebook -}} -
-
- {{- $script := `` -}} - {{- $script = printf $script $facebook.languageCode $facebook.appId -}} - {{- slice $script | $scratch.Add "scriptCDN" -}} - - {{- end -}} + {{- /* Facebook Comment System */ -}} + {{- if .Site.Params.comment.facebook.enable -}} + {{- $facebook := .Site.Params.comment.facebook -}} +
+
+ {{- $source := printf "https://connect.facebook.net/%s/sdk.js#xfbml=1&version=v5.0&appId=%s&autoLogAppEvents=1" $facebook.languageCode $facebook.appId -}} + {{- dict "source" $source "defer" true "crossorigin" true | slice | $scratch.Add "script" -}} + + {{- end -}} - {{- /* Telegram Comments System */ -}} - {{- if .Site.Params.comment.telegram.enable -}} - {{- $telegram := .Site.Params.comment.telegram -}} -
- - - {{- end -}} + {{- /* Telegram Comments System */ -}} + {{- if .Site.Params.comment.telegram.enable -}} + {{- $telegram := .Site.Params.comment.telegram -}} +
+ {{- $attr := printf `data-comments-app-website="%s"` $telegram.siteID -}} + {{- $attr = printf `%s data-limit="%s"` $attr ($telegram.limit | default 5) -}} + {{- with $telegram.height -}} + {{- $attr = printf `%s data-height="%s"` $attr . -}} + {{- end -}} + {{- with $telegram.color -}} + {{- $attr = printf `%s data-color="%s"` $attr . -}} + {{- end -}} + {{- if $telegram.colorful -}} + {{- $attr = printf `%s data-colorful="1"` $attr -}} + {{- end -}} + {{- if $telegram.dislikes -}} + {{- $attr = printf `%s data-dislikes="1"` $attr -}} + {{- end -}} + {{- if $telegram.outlined -}} + {{- $attr = printf `%s data-outlined="1"` $attr -}} + {{- end -}} + {{- dict "source" "https://comments.app/js/widget.js?2" "defer" true "crossorigin" true "attr" $attr | slice | $scratch.Add "script" -}} + + {{- end -}} +
{{- end -}} diff --git a/layouts/partials/single/content.html b/layouts/partials/function/content.html similarity index 92% rename from layouts/partials/single/content.html rename to layouts/partials/function/content.html index 13373162..3b81be48 100644 --- a/layouts/partials/single/content.html +++ b/layouts/partials/function/content.html @@ -10,4 +10,4 @@ {{- $content = partial "function/escape.html" $content -}} -{{- $content | safeHTML -}} +{{- return $content -}} diff --git a/layouts/partials/function/id.html b/layouts/partials/function/id.html index c7029083..b9e15ff0 100644 --- a/layouts/partials/function/id.html +++ b/layouts/partials/function/id.html @@ -3,6 +3,6 @@ {{- /* shuffle md5 as id */ -}} {{- $id := delimit (split (md5 now.Unix) "" | shuffle | first 6) "" | printf "id-%s" -}} {{- with .scratch -}} - {{- .SetInMap "contentMap" $id $.content -}} + {{- .SetInMap "contentData" $id $.content -}} {{- end -}} {{- return $id -}} diff --git a/layouts/partials/head/link.html b/layouts/partials/head/link.html index cfec2850..c1d273a4 100644 --- a/layouts/partials/head/link.html +++ b/layouts/partials/head/link.html @@ -1,5 +1,6 @@ {{- $scratch := .Scratch.Get "scratch" -}} {{- $CDN := $scratch.Get "CDN" -}} +{{- $fingerprint := $scratch.Get "fingerprint" -}} @@ -22,29 +23,17 @@ {{- end -}} {{- /* Font Awesome */ -}} -{{- with $CDN.fontawesomeFreeCSS -}} - {{- . | safeHTML -}} -{{- else -}} - {{- $res := resources.Get "lib/fontawesome-free/all.min.css" -}} - {{- $stylesheet := dict "resource" $res "fingerprint" ($scratch.Get "fingerprint") -}} - {{- partial "plugin/stylesheet.html" $stylesheet -}} -{{- end -}} +{{- $source := $CDN.fontawesomeFreeCSS | default "lib/fontawesome-free/all.min.css" -}} +{{- $stylesheet := dict "source" $source "fingerprint" $fingerprint -}} +{{- partial "plugin/stylesheet.html" $stylesheet -}} {{- /* Animate.css */ -}} -{{- with $CDN.animateCSS -}} - {{- . | safeHTML -}} -{{- else -}} - {{- $res := resources.Get "lib/animate/animate.min.css" -}} - {{- $stylesheet := dict "resource" $res "fingerprint" ($scratch.Get "fingerprint") -}} - {{- partial "plugin/stylesheet.html" $stylesheet -}} -{{- end -}} +{{- $source := $CDN.animateCSS | default "lib/animate/animate.min.css" -}} +{{- $stylesheet := dict "source" $source "fingerprint" $fingerprint -}} +{{- partial "plugin/stylesheet.html" $stylesheet -}} {{- /* style.min.css */ -}} -{{- $res := resources.Get "css/style.template.scss" -}} -{{- $options := dict "targetPath" "css/style.min.css" -}} -{{- $options = dict "includePaths" (slice "config/css") | merge $options -}} -{{- $options = dict "outputStyle" "compressed" | merge $options -}} -{{- $options = dict "enableSourceMap" true | merge $options -}} -{{- $res = resources.ExecuteAsTemplate "style.scss" . $res | toCSS $options -}} -{{- $stylesheet := dict "resource" $res "fingerprint" ($scratch.Get "fingerprint") -}} +{{- $stylesheet := dict "source" "css/style.template.scss" "fingerprint" $fingerprint -}} +{{- $options := dict "targetPath" "css/style.min.css" "includePaths" (slice "config/css") -}} +{{- $stylesheet = dict "template" "style.scss" "context" . "toCSS" $options | merge $stylesheet -}} {{- partial "plugin/stylesheet.html" $stylesheet -}} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 1e4b0c89..e78a70a5 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -7,43 +7,59 @@
{{- /* Mobile header */ -}}
-
- - +
+
+
+
+
+
diff --git a/layouts/partials/plugin/script.html b/layouts/partials/plugin/script.html index 92a8bdc3..4e189f71 100644 --- a/layouts/partials/plugin/script.html +++ b/layouts/partials/plugin/script.html @@ -1,7 +1,21 @@ -{{- $res := .resource -}} -{{- with .fingerprint -}} - {{- $res = $res | resources.Fingerprint . -}} - +{{- if strings.HasPrefix .source " + {{- $src := .source -}} + {{- $integrity := .integrity -}} + {{- if strings.HasPrefix $src "http" | not -}} + {{- $res := resources.Get $src -}} + {{- with .template -}} + {{- $res = $res | resources.ExecuteAsTemplate . $.context -}} + {{- end -}} + {{- if .minify -}} + {{- $res = $res | minify -}} + {{- end -}} + {{- with .fingerprint -}} + {{- $res = $res | fingerprint . -}} + {{- $integrity = $res.Data.Integrity -}} + {{- end -}} + {{- $src = $res.RelPermalink -}} + {{- end -}} + {{- end -}} diff --git a/layouts/partials/plugin/stylesheet.html b/layouts/partials/plugin/stylesheet.html index 22db6d44..0a4dac3f 100644 --- a/layouts/partials/plugin/stylesheet.html +++ b/layouts/partials/plugin/stylesheet.html @@ -1,7 +1,25 @@ -{{- $res := .resource -}} -{{- with .fingerprint -}} - {{- $res = $res | resources.Fingerprint . -}} - +{{- if strings.HasPrefix .source " + {{- $href := .source -}} + {{- $integrity := .integrity -}} + {{- if strings.HasPrefix $href "http" | not -}} + {{- $res := resources.Get $href -}} + {{- with .template -}} + {{- $res = $res | resources.ExecuteAsTemplate . $.context -}} + {{- end -}} + {{- with .toCSS -}} + {{- $options := . | merge (dict "outputStyle" "compressed" "enableSourceMap" true) -}} + {{- $res = $res | toCSS $options -}} + {{- end -}} + {{- if .minify -}} + {{- $res = $res | minify -}} + {{- end -}} + {{- with .fingerprint -}} + {{- $res = $res | fingerprint . -}} + {{- $integrity = $res.Data.Integrity -}} + {{- end -}} + {{- $href = $res.RelPermalink -}} + {{- end -}} + {{- end -}} diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 8c79a84e..e1285894 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -2,6 +2,16 @@ {{- define "content" -}} {{- $scratch := .Scratch.Get "scratch" -}} + + {{- /* Auto TOC */ -}} + {{- if or .Params.toc (and .Site.Params.toc (ne .Params.toc false)) -}} +
+

{{ T "contents" }}

+ {{- $globalAutoCollapseToc := .Site.Params.autoCollapseToc | default true }} +
+
+ {{- end -}} +
{{- /* Title */ -}}

{{ .Title }}

@@ -52,13 +62,8 @@

{{ . }}

{{- end -}} - {{- /* TOC */ -}} + {{- /* Static TOC */ -}} {{- if or .Params.toc (and .Site.Params.toc (ne .Params.toc false)) -}} -
-

{{ T "contents" }}

- {{- $globalAutoCollapseToc := .Site.Params.autoCollapseToc | default true }} -
-
@@ -79,7 +84,7 @@

{{ T "contents" }}

{{- /* Content */ -}}
- {{- partial "single/content.html" .Content -}} + {{- partial "function/content.html" .Content | safeHTML -}}
{{- /* Footer */ -}} diff --git a/layouts/shortcodes/mapbox.html b/layouts/shortcodes/mapbox.html index fbe515c0..6aa2a795 100644 --- a/layouts/shortcodes/mapbox.html +++ b/layouts/shortcodes/mapbox.html @@ -27,7 +27,7 @@ {{- $darkStyle = .Get 5 | default $darkStyle -}} {{- end -}} {{- $darkStyle = $darkStyle | default $lightStyle -}} -{{- $options := dict "lng" $lng "lat" $lat "zoom" $zoom "marked" $marked "light-style" $lightStyle "dark-style" $darkStyle "geolocate" $geolocate "navigation" $navigation "scale" $scale "fullscreen" $fullscreen -}} +{{- $options := dict "lng" $lng "lat" $lat "zoom" $zoom "marked" $marked "lightStyle" $lightStyle "darkStyle" $darkStyle "geolocate" $geolocate "navigation" $navigation "scale" $scale "fullscreen" $fullscreen -}} {{- $id := partial "function/id.html" (dict "content" $options "scratch" $scratch) -}}
{{- $scratch.Set "mapbox" true -}} diff --git a/package-lock.json b/package-lock.json index e612757f..4802deb2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,39 +31,68 @@ } }, "@babel/compat-data": { - "version": "7.8.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.8.5.tgz", - "integrity": "sha512-jWYUqQX/ObOhG1UiEkbH5SANsE/8oKXiQWjj7p7xgj9Zmnt//aUvyz4dBkK0HNsS8/cbyC5NmmH87VekW+mXFg==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.9.0.tgz", + "integrity": "sha512-zeFQrr+284Ekvd9e7KAX954LkapWiOmQtsfHirhxqfdlX6MEC32iRE+pqUGlYIBchdevaCwvzxWGSy/YBNI85g==", "dev": true, "requires": { - "browserslist": "^4.8.5", + "browserslist": "^4.9.1", "invariant": "^2.2.4", "semver": "^5.5.0" } }, "@babel/core": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.8.4.tgz", - "integrity": "sha512-0LiLrB2PwrVI+a2/IEskBopDYSd8BCb3rOvH7D5tzoWd696TBEduBvuLVm4Nx6rltrLZqvI3MCalB2K2aVzQjA==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.9.0.tgz", + "integrity": "sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w==", "dev": true, "requires": { "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.8.4", - "@babel/helpers": "^7.8.4", - "@babel/parser": "^7.8.4", - "@babel/template": "^7.8.3", - "@babel/traverse": "^7.8.4", - "@babel/types": "^7.8.3", + "@babel/generator": "^7.9.0", + "@babel/helper-module-transforms": "^7.9.0", + "@babel/helpers": "^7.9.0", + "@babel/parser": "^7.9.0", + "@babel/template": "^7.8.6", + "@babel/traverse": "^7.9.0", + "@babel/types": "^7.9.0", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", - "json5": "^2.1.0", + "json5": "^2.1.2", "lodash": "^4.17.13", "resolve": "^1.3.2", "semver": "^5.4.1", "source-map": "^0.5.0" }, "dependencies": { + "@babel/parser": { + "version": "7.9.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.4.tgz", + "integrity": "sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA==", + "dev": true + }, + "@babel/template": { + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz", + "integrity": "sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.6", + "@babel/types": "^7.8.6" + } + }, + "@babel/types": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.0.tgz", + "integrity": "sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.9.0", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -82,15 +111,28 @@ } }, "@babel/generator": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.4.tgz", - "integrity": "sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA==", + "version": "7.9.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.4.tgz", + "integrity": "sha512-rjP8ahaDy/ouhrvCoU1E5mqaitWrxwuNGU+dy1EpaoK48jZay4MdkskKGIMHLZNewg8sAsqpGSREJwP0zH3YQA==", "dev": true, "requires": { - "@babel/types": "^7.8.3", + "@babel/types": "^7.9.0", "jsesc": "^2.5.1", "lodash": "^4.17.13", "source-map": "^0.5.0" + }, + "dependencies": { + "@babel/types": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.0.tgz", + "integrity": "sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.9.0", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/helper-annotate-as-pure": { @@ -112,38 +154,28 @@ "@babel/types": "^7.8.3" } }, - "@babel/helper-call-delegate": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.8.3.tgz", - "integrity": "sha512-6Q05px0Eb+N4/GTyKPPvnkig7Lylw+QzihMpws9iiZQv7ZImf84ZsZpQH7QoWN4n4tm81SnSzPgHw2qtO0Zf3A==", - "dev": true, - "requires": { - "@babel/helper-hoist-variables": "^7.8.3", - "@babel/traverse": "^7.8.3", - "@babel/types": "^7.8.3" - } - }, "@babel/helper-compilation-targets": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.4.tgz", - "integrity": "sha512-3k3BsKMvPp5bjxgMdrFyq0UaEO48HciVrOVF0+lon8pp95cyJ2ujAh0TrBHNMnJGT2rr0iKOJPFFbSqjDyf/Pg==", + "version": "7.8.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.7.tgz", + "integrity": "sha512-4mWm8DCK2LugIS+p1yArqvG1Pf162upsIsjE7cNBjez+NjliQpVhj20obE520nao0o14DaTnFJv+Fw5a0JpoUw==", "dev": true, "requires": { - "@babel/compat-data": "^7.8.4", - "browserslist": "^4.8.5", + "@babel/compat-data": "^7.8.6", + "browserslist": "^4.9.1", "invariant": "^2.2.4", "levenary": "^1.1.1", "semver": "^5.5.0" } }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.3.tgz", - "integrity": "sha512-Gcsm1OHCUr9o9TcJln57xhWHtdXbA2pgQ58S0Lxlks0WMGNXuki4+GLfX0p+L2ZkINUGZvfkz8rzoqJQSthI+Q==", + "version": "7.8.8", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.8.tgz", + "integrity": "sha512-LYVPdwkrQEiX9+1R29Ld/wTrmQu1SSKYnuOk3g0CkcZMA1p0gsNxJFj/3gBdaJ7Cg0Fnek5z0DsMULePP7Lrqg==", "dev": true, "requires": { + "@babel/helper-annotate-as-pure": "^7.8.3", "@babel/helper-regex": "^7.8.3", - "regexpu-core": "^4.6.0" + "regexpu-core": "^4.7.0" } }, "@babel/helper-define-map": { @@ -215,17 +247,48 @@ } }, "@babel/helper-module-transforms": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.8.3.tgz", - "integrity": "sha512-C7NG6B7vfBa/pwCOshpMbOYUmrYQDfCpVL/JCRu0ek8B5p8kue1+BCXpg2vOYs7w5ACB9GTOBYQ5U6NwrMg+3Q==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz", + "integrity": "sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.6", "@babel/helper-simple-access": "^7.8.3", "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/template": "^7.8.3", - "@babel/types": "^7.8.3", + "@babel/template": "^7.8.6", + "@babel/types": "^7.9.0", "lodash": "^4.17.13" + }, + "dependencies": { + "@babel/parser": { + "version": "7.9.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.4.tgz", + "integrity": "sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA==", + "dev": true + }, + "@babel/template": { + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz", + "integrity": "sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.6", + "@babel/types": "^7.8.6" + } + }, + "@babel/types": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.0.tgz", + "integrity": "sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.9.0", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/helper-optimise-call-expression": { @@ -266,15 +329,28 @@ } }, "@babel/helper-replace-supers": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.8.3.tgz", - "integrity": "sha512-xOUssL6ho41U81etpLoT2RTdvdus4VfHamCuAm4AHxGr+0it5fnwoVdwUJ7GFEqCsQYzJUhcbsN9wB9apcYKFA==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz", + "integrity": "sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA==", "dev": true, "requires": { "@babel/helper-member-expression-to-functions": "^7.8.3", "@babel/helper-optimise-call-expression": "^7.8.3", - "@babel/traverse": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/traverse": "^7.8.6", + "@babel/types": "^7.8.6" + }, + "dependencies": { + "@babel/types": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.0.tgz", + "integrity": "sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.9.0", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/helper-simple-access": { @@ -296,6 +372,12 @@ "@babel/types": "^7.8.3" } }, + "@babel/helper-validator-identifier": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz", + "integrity": "sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw==", + "dev": true + }, "@babel/helper-wrap-function": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz", @@ -309,14 +391,27 @@ } }, "@babel/helpers": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.8.4.tgz", - "integrity": "sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w==", + "version": "7.9.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.9.2.tgz", + "integrity": "sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA==", "dev": true, "requires": { "@babel/template": "^7.8.3", - "@babel/traverse": "^7.8.4", - "@babel/types": "^7.8.3" + "@babel/traverse": "^7.9.0", + "@babel/types": "^7.9.0" + }, + "dependencies": { + "@babel/types": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.0.tgz", + "integrity": "sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.9.0", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/highlight": { @@ -377,10 +472,20 @@ "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" } }, - "@babel/plugin-proposal-object-rest-spread": { + "@babel/plugin-proposal-numeric-separator": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-8qvuPwU/xxUCt78HocNlv0mXXo0wdh9VT1R04WU8HGOfaOob26pF+9P5/lYjN/q7DHOX1bvX60hnhOvuQUJdbA==", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.8.3.tgz", + "integrity": "sha512-jWioO1s6R/R+wEHizfaScNsAx+xKgwTLNXSh7tTC4Usj3ItsPEhYkEpU4h+lpnBwq7NBVOJXfO6cRFYcX69JUQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.0.tgz", + "integrity": "sha512-UgqBv6bjq4fDb8uku9f+wcm1J7YxJ5nT7WO/jBr0cl0PLKb7t1O6RNR1kZbjgx2LQtsDI9hwoQVmn0yhXeQyow==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.3", @@ -398,9 +503,9 @@ } }, "@babel/plugin-proposal-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.8.3.tgz", - "integrity": "sha512-QIoIR9abkVn+seDE3OjA08jWcs3eZ9+wJCKSRgo3WdEU2csFYgdScb+8qHB3+WXsGJD55u+5hWCISI7ejXS+kg==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.9.0.tgz", + "integrity": "sha512-NDn5tu3tcv4W30jNhmc2hyD5c56G6cXx4TesJubhxrJeCvuuMpttxr0OnNCqbZGhFjLrg+NIhxxC+BK5F6yS3w==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.3", @@ -408,12 +513,12 @@ } }, "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.3.tgz", - "integrity": "sha512-1/1/rEZv2XGweRwwSkLpY+s60za9OZ1hJs4YDqFHCw0kYWYwL5IFljVY1MYBL+weT1l9pokDO2uhSTLVxzoHkQ==", + "version": "7.8.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.8.tgz", + "integrity": "sha512-EVhjVsMpbhLw9ZfHWSx2iy13Q8Z/eg8e8ccVWt23sWQK5l1UdkoLJPN5w69UA4uITGBnEZD2JOe4QOHycYKv8A==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.8.3", + "@babel/helper-create-regexp-features-plugin": "^7.8.8", "@babel/helper-plugin-utils": "^7.8.3" } }, @@ -453,6 +558,15 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.8.3.tgz", + "integrity": "sha512-H7dCMAdN83PcCmqmkHB5dtp+Xa9a6LKSvA2hiFBC/5alSHxM5VgWZXFqDi0YFe8XNGT6iCa+z4V4zSt/PdZ7Dw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, "@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", @@ -529,9 +643,9 @@ } }, "@babel/plugin-transform-classes": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.8.3.tgz", - "integrity": "sha512-SjT0cwFJ+7Rbr1vQsvphAHwUHvSUPmMjMU/0P59G8U2HLFqSa082JO7zkbDNWs9kH/IUqpHI6xWNesGf8haF1w==", + "version": "7.9.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.9.2.tgz", + "integrity": "sha512-TC2p3bPzsfvSsqBZo0kJnuelnoK9O3welkUpqSqBQuBF6R5MN2rysopri8kNvtlGIb2jmUO7i15IooAZJjZuMQ==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.8.3", @@ -539,7 +653,7 @@ "@babel/helper-function-name": "^7.8.3", "@babel/helper-optimise-call-expression": "^7.8.3", "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-replace-supers": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.6", "@babel/helper-split-export-declaration": "^7.8.3", "globals": "^11.1.0" } @@ -554,9 +668,9 @@ } }, "@babel/plugin-transform-destructuring": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.3.tgz", - "integrity": "sha512-H4X646nCkiEcHZUZaRkhE2XVsoz0J/1x3VVujnn96pSoGCtKPA99ZZA+va+gK+92Zycd6OBKCD8tDb/731bhgQ==", + "version": "7.8.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.8.tgz", + "integrity": "sha512-eRJu4Vs2rmttFCdhPUM3bV0Yo/xPSdPw6ML9KHs/bjB4bLA5HXlbvYXPOD5yASodGod+krjYx21xm1QmL8dCJQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.3" @@ -592,9 +706,9 @@ } }, "@babel/plugin-transform-for-of": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.4.tgz", - "integrity": "sha512-iAXNlOWvcYUYoV8YIxwS7TxGRJcxyl8eQCfT+A5j8sKUzRFvJdcyjp97jL2IghWSRDaL2PU2O2tX8Cu9dTBq5A==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.9.0.tgz", + "integrity": "sha512-lTAnWOpMwOXpyDx06N+ywmF3jNbafZEqZ96CGYabxHrxNX8l5ny7dt4bK/rGwAh9utyP2b2Hv7PlZh1AAS54FQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.3" @@ -629,47 +743,47 @@ } }, "@babel/plugin-transform-modules-amd": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.8.3.tgz", - "integrity": "sha512-MadJiU3rLKclzT5kBH4yxdry96odTUwuqrZM+GllFI/VhxfPz+k9MshJM+MwhfkCdxxclSbSBbUGciBngR+kEQ==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.0.tgz", + "integrity": "sha512-vZgDDF003B14O8zJy0XXLnPH4sg+9X5hFBBGN1V+B2rgrB+J2xIypSN6Rk9imB2hSTHQi5OHLrFWsZab1GMk+Q==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.8.3", + "@babel/helper-module-transforms": "^7.9.0", "@babel/helper-plugin-utils": "^7.8.3", "babel-plugin-dynamic-import-node": "^2.3.0" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.8.3.tgz", - "integrity": "sha512-JpdMEfA15HZ/1gNuB9XEDlZM1h/gF/YOH7zaZzQu2xCFRfwc01NXBMHHSTT6hRjlXJJs5x/bfODM3LiCk94Sxg==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.0.tgz", + "integrity": "sha512-qzlCrLnKqio4SlgJ6FMMLBe4bySNis8DFn1VkGmOcxG9gqEyPIOzeQrA//u0HAKrWpJlpZbZMPB1n/OPa4+n8g==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.8.3", + "@babel/helper-module-transforms": "^7.9.0", "@babel/helper-plugin-utils": "^7.8.3", "@babel/helper-simple-access": "^7.8.3", "babel-plugin-dynamic-import-node": "^2.3.0" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.8.3.tgz", - "integrity": "sha512-8cESMCJjmArMYqa9AO5YuMEkE4ds28tMpZcGZB/jl3n0ZzlsxOAi3mC+SKypTfT8gjMupCnd3YiXCkMjj2jfOg==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.0.tgz", + "integrity": "sha512-FsiAv/nao/ud2ZWy4wFacoLOm5uxl0ExSQ7ErvP7jpoihLR6Cq90ilOFyX9UXct3rbtKsAiZ9kFt5XGfPe/5SQ==", "dev": true, "requires": { "@babel/helper-hoist-variables": "^7.8.3", - "@babel/helper-module-transforms": "^7.8.3", + "@babel/helper-module-transforms": "^7.9.0", "@babel/helper-plugin-utils": "^7.8.3", "babel-plugin-dynamic-import-node": "^2.3.0" } }, "@babel/plugin-transform-modules-umd": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.8.3.tgz", - "integrity": "sha512-evhTyWhbwbI3/U6dZAnx/ePoV7H6OUG+OjiJFHmhr9FPn0VShjwC2kdxqIuQ/+1P50TMrneGzMeyMTFOjKSnAw==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.9.0.tgz", + "integrity": "sha512-uTWkXkIVtg/JGRSIABdBoMsoIeoHQHPTL0Y2E7xf5Oj7sLqwVsNXOkNk0VJc7vF0IMBsPeikHxFjGe+qmwPtTQ==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.8.3", + "@babel/helper-module-transforms": "^7.9.0", "@babel/helper-plugin-utils": "^7.8.3" } }, @@ -702,12 +816,11 @@ } }, "@babel/plugin-transform-parameters": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.4.tgz", - "integrity": "sha512-IsS3oTxeTsZlE5KqzTbcC2sV0P9pXdec53SU+Yxv7o/6dvGM5AkTotQKhoSffhNgZ/dftsSiOoxy7evCYJXzVA==", + "version": "7.9.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.9.3.tgz", + "integrity": "sha512-fzrQFQhp7mIhOzmOtPiKffvCYQSK10NR8t6BBz2yPbeUHb9OLW8RZGtgDRBn8z2hGcwvKDL3vC7ojPTLNxmqEg==", "dev": true, "requires": { - "@babel/helper-call-delegate": "^7.8.3", "@babel/helper-get-function-arity": "^7.8.3", "@babel/helper-plugin-utils": "^7.8.3" } @@ -722,12 +835,12 @@ } }, "@babel/plugin-transform-regenerator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.3.tgz", - "integrity": "sha512-qt/kcur/FxrQrzFR432FGZznkVAjiyFtCOANjkAKwCbt465L6ZCiUQh2oMYGU3Wo8LRFJxNDFwWn106S5wVUNA==", + "version": "7.8.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.7.tgz", + "integrity": "sha512-TIg+gAl4Z0a3WmD3mbYSk+J9ZUH6n/Yc57rtKRnlA/7rcCvpekHXe0CMZHP1gYp7/KLe9GHTuIba0vXmls6drA==", "dev": true, "requires": { - "regenerator-transform": "^0.14.0" + "regenerator-transform": "^0.14.2" } }, "@babel/plugin-transform-reserved-words": { @@ -797,27 +910,29 @@ } }, "@babel/preset-env": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.8.4.tgz", - "integrity": "sha512-HihCgpr45AnSOHRbS5cWNTINs0TwaR8BS8xIIH+QwiW8cKL0llV91njQMpeMReEPVs+1Ao0x3RLEBLtt1hOq4w==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.9.0.tgz", + "integrity": "sha512-712DeRXT6dyKAM/FMbQTV/FvRCms2hPCx+3weRjZ8iQVQWZejWWk1wwG6ViWMyqb/ouBbGOl5b6aCk0+j1NmsQ==", "dev": true, "requires": { - "@babel/compat-data": "^7.8.4", - "@babel/helper-compilation-targets": "^7.8.4", + "@babel/compat-data": "^7.9.0", + "@babel/helper-compilation-targets": "^7.8.7", "@babel/helper-module-imports": "^7.8.3", "@babel/helper-plugin-utils": "^7.8.3", "@babel/plugin-proposal-async-generator-functions": "^7.8.3", "@babel/plugin-proposal-dynamic-import": "^7.8.3", "@babel/plugin-proposal-json-strings": "^7.8.3", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-proposal-object-rest-spread": "^7.8.3", + "@babel/plugin-proposal-numeric-separator": "^7.8.3", + "@babel/plugin-proposal-object-rest-spread": "^7.9.0", "@babel/plugin-proposal-optional-catch-binding": "^7.8.3", - "@babel/plugin-proposal-optional-chaining": "^7.8.3", + "@babel/plugin-proposal-optional-chaining": "^7.9.0", "@babel/plugin-proposal-unicode-property-regex": "^7.8.3", "@babel/plugin-syntax-async-generators": "^7.8.0", "@babel/plugin-syntax-dynamic-import": "^7.8.0", "@babel/plugin-syntax-json-strings": "^7.8.0", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", + "@babel/plugin-syntax-numeric-separator": "^7.8.0", "@babel/plugin-syntax-object-rest-spread": "^7.8.0", "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", "@babel/plugin-syntax-optional-chaining": "^7.8.0", @@ -826,26 +941,26 @@ "@babel/plugin-transform-async-to-generator": "^7.8.3", "@babel/plugin-transform-block-scoped-functions": "^7.8.3", "@babel/plugin-transform-block-scoping": "^7.8.3", - "@babel/plugin-transform-classes": "^7.8.3", + "@babel/plugin-transform-classes": "^7.9.0", "@babel/plugin-transform-computed-properties": "^7.8.3", "@babel/plugin-transform-destructuring": "^7.8.3", "@babel/plugin-transform-dotall-regex": "^7.8.3", "@babel/plugin-transform-duplicate-keys": "^7.8.3", "@babel/plugin-transform-exponentiation-operator": "^7.8.3", - "@babel/plugin-transform-for-of": "^7.8.4", + "@babel/plugin-transform-for-of": "^7.9.0", "@babel/plugin-transform-function-name": "^7.8.3", "@babel/plugin-transform-literals": "^7.8.3", "@babel/plugin-transform-member-expression-literals": "^7.8.3", - "@babel/plugin-transform-modules-amd": "^7.8.3", - "@babel/plugin-transform-modules-commonjs": "^7.8.3", - "@babel/plugin-transform-modules-systemjs": "^7.8.3", - "@babel/plugin-transform-modules-umd": "^7.8.3", + "@babel/plugin-transform-modules-amd": "^7.9.0", + "@babel/plugin-transform-modules-commonjs": "^7.9.0", + "@babel/plugin-transform-modules-systemjs": "^7.9.0", + "@babel/plugin-transform-modules-umd": "^7.9.0", "@babel/plugin-transform-named-capturing-groups-regex": "^7.8.3", "@babel/plugin-transform-new-target": "^7.8.3", "@babel/plugin-transform-object-super": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.8.4", + "@babel/plugin-transform-parameters": "^7.8.7", "@babel/plugin-transform-property-literals": "^7.8.3", - "@babel/plugin-transform-regenerator": "^7.8.3", + "@babel/plugin-transform-regenerator": "^7.8.7", "@babel/plugin-transform-reserved-words": "^7.8.3", "@babel/plugin-transform-shorthand-properties": "^7.8.3", "@babel/plugin-transform-spread": "^7.8.3", @@ -853,12 +968,39 @@ "@babel/plugin-transform-template-literals": "^7.8.3", "@babel/plugin-transform-typeof-symbol": "^7.8.4", "@babel/plugin-transform-unicode-regex": "^7.8.3", - "@babel/types": "^7.8.3", - "browserslist": "^4.8.5", + "@babel/preset-modules": "^0.1.3", + "@babel/types": "^7.9.0", + "browserslist": "^4.9.1", "core-js-compat": "^3.6.2", "invariant": "^2.2.2", "levenary": "^1.1.1", "semver": "^5.5.0" + }, + "dependencies": { + "@babel/types": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.0.tgz", + "integrity": "sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.9.0", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } + } + }, + "@babel/preset-modules": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.3.tgz", + "integrity": "sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" } }, "@babel/runtime": { @@ -882,22 +1024,39 @@ } }, "@babel/traverse": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.4.tgz", - "integrity": "sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.0.tgz", + "integrity": "sha512-jAZQj0+kn4WTHO5dUZkZKhbFrqZE7K5LAQ5JysMnmvGij+wOdr+8lWqPeW0BcF4wFwrEXXtdGO7wcV6YPJcf3w==", "dev": true, "requires": { "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.8.4", + "@babel/generator": "^7.9.0", "@babel/helper-function-name": "^7.8.3", "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/parser": "^7.8.4", - "@babel/types": "^7.8.3", + "@babel/parser": "^7.9.0", + "@babel/types": "^7.9.0", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" }, "dependencies": { + "@babel/parser": { + "version": "7.9.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.4.tgz", + "integrity": "sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA==", + "dev": true + }, + "@babel/types": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.0.tgz", + "integrity": "sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.9.0", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -938,6 +1097,39 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dev": true, + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, + "acorn": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "dev": true + }, + "acorn-node": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", + "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", + "dev": true, + "requires": { + "acorn": "^7.0.0", + "acorn-walk": "^7.0.0", + "xtend": "^4.0.2" + } + }, + "acorn-walk": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.1.1.tgz", + "integrity": "sha512-wdlPY2tm/9XBr7QkKlq0WQVgiuGTX6YWPyRyBviSoScBuLfTVQhvwg6wJ369GJ/1nPfTLMfnrFIfjqVg6d+jQQ==", + "dev": true + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -998,6 +1190,44 @@ "dev": true, "optional": true }, + "asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "assert": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", + "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "dev": true, + "requires": { + "object-assign": "^4.1.1", + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, "assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", @@ -1070,6 +1300,17 @@ "object.assign": "^4.1.0" } }, + "babel-plugin-macros": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz", + "integrity": "sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.7.2", + "cosmiconfig": "^6.0.0", + "resolve": "^1.12.0" + } + }, "babel-plugin-minify-builtins": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/babel-plugin-minify-builtins/-/babel-plugin-minify-builtins-0.5.0.tgz", @@ -1164,6 +1405,17 @@ "babel-helper-is-void-0": "^0.4.3" } }, + "babel-plugin-preval": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-preval/-/babel-plugin-preval-4.0.0.tgz", + "integrity": "sha512-fZI/4cYneinlj2k/FsXw0/lTWSC5KKoepUueS1g25Gb5vx3GrRyaVwxWCshYqx11GEU4mZnbbFhee8vpquFS2w==", + "dev": true, + "requires": { + "@babel/runtime": "^7.7.2", + "babel-plugin-macros": "^2.6.1", + "require-from-string": "^2.0.2" + } + }, "babel-plugin-transform-inline-consecutive-adds": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.4.3.tgz", @@ -1267,6 +1519,12 @@ "lodash": "^4.17.11" } }, + "babelify": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/babelify/-/babelify-10.0.0.tgz", + "integrity": "sha512-X40FaxyH7t3X+JFAKvb1H9wooWKLRCi8pg3m8poqtdZaIng+bjzp9RvKQCvRjF9isHiPkXspbbXT/zwXLtwgwg==", + "dev": true + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -1333,6 +1591,12 @@ } } }, + "base64-js": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", + "dev": true + }, "binary-extensions": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", @@ -1350,6 +1614,12 @@ "file-uri-to-path": "1.0.0" } }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1391,17 +1661,210 @@ } } }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browser-pack": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", + "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "combine-source-map": "~0.8.0", + "defined": "^1.0.0", + "safe-buffer": "^5.1.1", + "through2": "^2.0.0", + "umd": "^3.0.0" + } + }, + "browser-resolve": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", + "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", + "dev": true, + "requires": { + "resolve": "1.1.7" + }, + "dependencies": { + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + } + } + }, + "browserify": { + "version": "16.5.0", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-16.5.0.tgz", + "integrity": "sha512-6bfI3cl76YLAnCZ75AGu/XPOsqUhRyc0F/olGIJeCxtfxF2HvPKEcmjU9M8oAPxl4uBY1U7Nry33Q6koV3f2iw==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "assert": "^1.4.0", + "browser-pack": "^6.0.1", + "browser-resolve": "^1.11.0", + "browserify-zlib": "~0.2.0", + "buffer": "^5.0.2", + "cached-path-relative": "^1.0.0", + "concat-stream": "^1.6.0", + "console-browserify": "^1.1.0", + "constants-browserify": "~1.0.0", + "crypto-browserify": "^3.0.0", + "defined": "^1.0.0", + "deps-sort": "^2.0.0", + "domain-browser": "^1.2.0", + "duplexer2": "~0.1.2", + "events": "^2.0.0", + "glob": "^7.1.0", + "has": "^1.0.0", + "htmlescape": "^1.1.0", + "https-browserify": "^1.0.0", + "inherits": "~2.0.1", + "insert-module-globals": "^7.0.0", + "labeled-stream-splicer": "^2.0.0", + "mkdirp": "^0.5.0", + "module-deps": "^6.0.0", + "os-browserify": "~0.3.0", + "parents": "^1.0.1", + "path-browserify": "~0.0.0", + "process": "~0.11.0", + "punycode": "^1.3.2", + "querystring-es3": "~0.2.0", + "read-only-stream": "^2.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.1.4", + "shasum": "^1.0.0", + "shell-quote": "^1.6.1", + "stream-browserify": "^2.0.0", + "stream-http": "^3.0.0", + "string_decoder": "^1.1.1", + "subarg": "^1.0.0", + "syntax-error": "^1.1.1", + "through2": "^2.0.0", + "timers-browserify": "^1.0.1", + "tty-browserify": "0.0.1", + "url": "~0.11.0", + "util": "~0.10.1", + "vm-browserify": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "dev": true, + "requires": { + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "requires": { + "pako": "~1.0.5" + } + }, "browserslist": { - "version": "4.8.7", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.8.7.tgz", - "integrity": "sha512-gFOnZNYBHrEyUML0xr5NJ6edFaaKbTFX9S9kQHlYfCP0Rit/boRIz4G+Avq6/4haEKJXdGGUnoolx+5MWW2BoA==", + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.11.0.tgz", + "integrity": "sha512-WqEC7Yr5wUH5sg6ruR++v2SGOQYpyUdYYd4tZoAq1F7y+QXoLoYGXVbxhtaIqWmAJjtNTRjVD3HuJc1OXTel2A==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001035", + "electron-to-chromium": "^1.3.380", + "node-releases": "^1.1.52", + "pkg-up": "^3.1.0" + } + }, + "buffer": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.5.0.tgz", + "integrity": "sha512-9FTEDjLjwoAkEwyMGDjYJQN2gfRgOKBKRfiglhvibGbpeeU/pQn1bJxQqm32OD/AIeEuHxU9roxXxg34Byp/Ww==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001027", - "electron-to-chromium": "^1.3.349", - "node-releases": "^1.1.49" + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" } }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", @@ -1420,6 +1883,12 @@ "unset-value": "^1.0.0" } }, + "cached-path-relative": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.2.tgz", + "integrity": "sha512-5r2GqsoEb4qMTTN9J+WzXfjov+hjxT+j3u5K+kIVNIwAd99DLCJE9pBIMP1qVeybV6JiijL385Oz0DcYxfbOIg==", + "dev": true + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1427,9 +1896,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001027", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001027.tgz", - "integrity": "sha512-7xvKeErvXZFtUItTHgNtLgS9RJpVnwBlWX8jSo/BO8VsF6deszemZSkJJJA1KOKrXuzZH4WALpAJdq5EyfgMLg==", + "version": "1.0.30001038", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001038.tgz", + "integrity": "sha512-zii9quPo96XfOiRD4TrfYGs+QsGZpb2cGiMAzPjtf/hpFgB6zCPZgJb7I1+EATeMw/o+lG8FyRAnI+CWStHcaQ==", "dev": true }, "chalk": { @@ -1470,6 +1939,16 @@ "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", "dev": true }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", @@ -1521,6 +2000,26 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, + "combine-source-map": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", + "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=", + "dev": true, + "requires": { + "convert-source-map": "~1.1.0", + "inline-source-map": "~0.6.0", + "lodash.memoize": "~3.0.3", + "source-map": "~0.5.3" + }, + "dependencies": { + "convert-source-map": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", + "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", + "dev": true + } + } + }, "commander": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", @@ -1546,6 +2045,30 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "console-browserify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", + "dev": true + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, "convert-source-map": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", @@ -1562,6 +2085,12 @@ "dev": true, "optional": true }, + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==", + "dev": true + }, "core-js-compat": { "version": "3.6.4", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.4.tgz", @@ -1584,8 +2113,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true, - "optional": true + "dev": true }, "cosmiconfig": { "version": "6.0.0", @@ -1600,12 +2128,74 @@ "yaml": "^1.7.2" } }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "create-ecdh": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", "dev": true, - "optional": true, + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "dash-ast": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dash-ast/-/dash-ast-1.0.0.tgz", + "integrity": "sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA==", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "optional": true, "requires": { "ms": "2.0.0" } @@ -1671,12 +2261,100 @@ } } }, + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", + "dev": true + }, + "deps-sort": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.1.tgz", + "integrity": "sha512-1orqXQr5po+3KI6kQb9A4jnXT1PBwggGl2d7Sq2xsnOeI9GPcE/tGcF9UiSZtZBM7MukY4cAh7MemS6tZYipfw==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "shasum-object": "^1.0.0", + "subarg": "^1.0.0", + "through2": "^2.0.0" + } + }, + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "detective": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.0.tgz", + "integrity": "sha512-6SsIx+nUUbuK0EthKjv0zrdnajCCXVYGmbYYiYjFVpzcjwEs/JMDZ8tPRG29J/HhN56t3GJp2cGSWDRjjot8Pg==", + "dev": true, + "requires": { + "acorn-node": "^1.6.1", + "defined": "^1.0.0", + "minimist": "^1.1.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + } + } + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true + }, + "duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, "electron-to-chromium": { - "version": "1.3.352", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.352.tgz", - "integrity": "sha512-dL/RyoueFG3UMhG0q3weAQvr+Tbqx/axAnOXYIIOsoYnV+2i+nRvX2S6msEo2+JARbBP8MFkkSYQ8AoY9Bh4Og==", + "version": "1.3.386", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.386.tgz", + "integrity": "sha512-M7JHfp32Bq6Am59AWgglh2d3nqe6y8Y94Vcb/AXUsO3DGvKUHYI5ML9+U5oNShfdOEfurrrjKSoSgFt2mz7mpw==", "dev": true }, + "elliptic": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", + "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", + "dev": true, + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -1698,6 +2376,22 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, + "events": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/events/-/events-2.1.0.tgz", + "integrity": "sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg==", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, "expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", @@ -1830,6 +2524,12 @@ } } }, + "fast-safe-stringify": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", + "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==", + "dev": true + }, "file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", @@ -2139,10 +2839,9 @@ } }, "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true, - "optional": true + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, "minipass": { "version": "2.9.0", @@ -2170,6 +2869,15 @@ "optional": true, "requires": { "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true, + "optional": true + } } }, "ms": { @@ -2322,8 +3030,9 @@ }, "dependencies": { "minimist": { - "version": "1.2.0", - "bundled": true, + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true, "optional": true } @@ -2480,6 +3189,12 @@ "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", "dev": true }, + "get-assigned-identifiers": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", + "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==", + "dev": true + }, "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", @@ -2537,6 +3252,15 @@ "dev": true, "optional": true }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -2584,6 +3308,49 @@ } } }, + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "htmlescape": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", + "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=", + "dev": true + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, "husky": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/husky/-/husky-4.2.3.tgz", @@ -2660,6 +3427,12 @@ } } }, + "ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", + "dev": true + }, "import-fresh": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", @@ -2686,6 +3459,33 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "inline-source-map": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", + "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", + "dev": true, + "requires": { + "source-map": "~0.5.3" + } + }, + "insert-module-globals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.0.tgz", + "integrity": "sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "acorn-node": "^1.5.2", + "combine-source-map": "^0.8.0", + "concat-stream": "^1.6.1", + "is-buffer": "^1.1.0", + "path-is-absolute": "^1.0.1", + "process": "~0.11.0", + "through2": "^2.0.0", + "undeclared-identifiers": "^1.1.2", + "xtend": "^4.0.0" + } + }, "invariant": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", @@ -2737,8 +3537,7 @@ "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true, - "optional": true + "dev": true }, "is-data-descriptor": { "version": "0.1.4", @@ -2850,8 +3649,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true, - "optional": true + "dev": true }, "isobject": { "version": "3.0.1", @@ -2878,15 +3676,44 @@ "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "dev": true }, + "json-stable-stringify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", + "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", + "dev": true, + "requires": { + "jsonify": "~0.0.0" + } + }, "json5": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.1.tgz", - "integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.2.tgz", + "integrity": "sha512-MoUOQ4WdiN3yxhm7NEVJSJrieAo5hNSLQ5sj05OTRHPL9HOBy8u4Bu88jsC1jvqAdN+E1bJmsUcZH+1HQxliqQ==", "dev": true, "requires": { - "minimist": "^1.2.0" + "minimist": "^1.2.5" + }, + "dependencies": { + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + } } }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "dev": true + }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -2894,6 +3721,16 @@ "dev": true, "optional": true }, + "labeled-stream-splicer": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.2.tgz", + "integrity": "sha512-Ca4LSXFFZUjPScRaqOcFxneA0VpKZr4MMYCljyQr4LIewTLb3Y0IUTIsnBBsVubIeEfxeSZpSjSsRM8APEQaAw==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "stream-splicer": "^2.0.0" + } + }, "leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -2930,6 +3767,12 @@ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", "dev": true }, + "lodash.memoize": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", + "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", + "dev": true + }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -2966,6 +3809,17 @@ "object-visit": "^1.0.0" } }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -2988,6 +3842,28 @@ "to-regex": "^3.0.2" } }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -2998,9 +3874,9 @@ } }, "minimist": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.2.tgz", - "integrity": "sha512-rIqbOrKb8GJmx/5bc2M0QchhUouMXSpd1RTclXsB41JdL+VtnojfaJR+h7F9k18/4kHUsBFgk80Uk+q569vjPA==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, "mixin-deep": { @@ -3026,6 +3902,46 @@ } } }, + "mkdirp": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz", + "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + }, + "dependencies": { + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + } + } + }, + "module-deps": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.2.tgz", + "integrity": "sha512-a9y6yDv5u5I4A+IPHTnqFxcaKr4p50/zxTjcQJaX2ws9tN/W6J6YXnEKhqRyPhl494dkcxx951onSKVezmI+3w==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "browser-resolve": "^1.7.0", + "cached-path-relative": "^1.0.2", + "concat-stream": "~1.6.0", + "defined": "^1.0.0", + "detective": "^5.2.0", + "duplexer2": "^0.1.2", + "inherits": "^2.0.1", + "parents": "^1.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.4.0", + "stream-combiner2": "^1.1.1", + "subarg": "^1.0.0", + "through2": "^2.0.0", + "xtend": "^4.0.0" + } + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -3061,9 +3977,9 @@ } }, "node-releases": { - "version": "1.1.49", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.49.tgz", - "integrity": "sha512-xH8t0LS0disN0mtRCh+eByxFPie+msJUBL/lJDBuap53QGiYPa9joh83K4pCZgWJ+2L4b9h88vCVdXQ60NO2bg==", + "version": "1.1.52", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.52.tgz", + "integrity": "sha512-snSiT1UypkgGt2wxPqS6ImEUICbNCMb31yaxWrOLXjhlt2z2/IBpaOxzONExqSm4y5oLnAqjjRWu+wsDzK5yNQ==", "dev": true, "requires": { "semver": "^6.3.0" @@ -3084,6 +4000,12 @@ "dev": true, "optional": true }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, "object-copy": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", @@ -3171,6 +4093,12 @@ "integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==", "dev": true }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, "p-limit": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", @@ -3195,6 +4123,12 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -3204,6 +4138,29 @@ "callsites": "^3.0.0" } }, + "parents": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", + "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", + "dev": true, + "requires": { + "path-platform": "~0.11.15" + } + }, + "parse-asn1": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz", + "integrity": "sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ==", + "dev": true, + "requires": { + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, "parse-json": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", @@ -3223,6 +4180,12 @@ "dev": true, "optional": true }, + "path-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", + "dev": true + }, "path-dirname": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", @@ -3248,12 +4211,31 @@ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, + "path-platform": { + "version": "0.11.15", + "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", + "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", + "dev": true + }, "path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true }, + "pbkdf2": { + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", + "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", + "dev": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, "pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", @@ -3269,6 +4251,51 @@ "find-up": "^4.0.0" } }, + "pkg-up": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", + "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, "please-upgrade-node": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", @@ -3285,25 +4312,98 @@ "dev": true, "optional": true }, + "preval.macro": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/preval.macro/-/preval.macro-4.0.0.tgz", + "integrity": "sha512-sJJnE71X+MPr64CVD2AurmUj4JEDqbudYbStav3L9Xjcqm4AR0ymMm6sugw1mUmfI/7gw4JWA4JXo/k6w34crw==", + "dev": true, + "requires": { + "babel-plugin-preval": "^4.0.0" + } + }, "private": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", "dev": true }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", "dev": true, - "optional": true + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "read-only-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", + "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } }, "readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "dev": true, - "optional": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -3333,9 +4433,9 @@ "dev": true }, "regenerate-unicode-properties": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz", - "integrity": "sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", + "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", "dev": true, "requires": { "regenerate": "^1.4.0" @@ -3348,12 +4448,13 @@ "dev": true }, "regenerator-transform": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.1.tgz", - "integrity": "sha512-flVuee02C3FKRISbxhXl9mGzdbWUVHubl1SMaknjxkFB1/iqpJhArQUvRxOOPEc/9tAiX0BaQ28FJH10E4isSQ==", + "version": "0.14.4", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.4.tgz", + "integrity": "sha512-EaJaKPBI9GvKpvUz2mz4fhx7WPgvwRLY9v3hlNHWmAuJHI13T4nwKnNvm5RWJzEdnI5g5UwtOww+S8IdoUC2bw==", "dev": true, "requires": { - "private": "^0.1.6" + "@babel/runtime": "^7.8.4", + "private": "^0.1.8" } }, "regex-not": { @@ -3368,17 +4469,17 @@ } }, "regexpu-core": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.6.0.tgz", - "integrity": "sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.0.tgz", + "integrity": "sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==", "dev": true, "requires": { "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^8.1.0", - "regjsgen": "^0.5.0", - "regjsparser": "^0.6.0", + "regenerate-unicode-properties": "^8.2.0", + "regjsgen": "^0.5.1", + "regjsparser": "^0.6.4", "unicode-match-property-ecmascript": "^1.0.4", - "unicode-match-property-value-ecmascript": "^1.1.0" + "unicode-match-property-value-ecmascript": "^1.2.0" } }, "regjsgen": { @@ -3388,9 +4489,9 @@ "dev": true }, "regjsparser": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.3.tgz", - "integrity": "sha512-8uZvYbnfAtEm9Ab8NTb3hdLwL4g/LQzEYP7Xs27T96abJCCE2d6r3cPZPQEsLKy0vRSGVNG+/zVGtLr86HQduA==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz", + "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==", "dev": true, "requires": { "jsesc": "~0.5.0" @@ -3425,6 +4526,12 @@ "dev": true, "optional": true }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, "resolve": { "version": "1.15.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", @@ -3454,6 +4561,16 @@ "dev": true, "optional": true }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -3470,6 +4587,15 @@ "ret": "~0.1.10" } }, + "segmentit": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/segmentit/-/segmentit-2.0.3.tgz", + "integrity": "sha512-7mn2XL3OdTUQ+AhHz7SbgyxLTaQRzTWQNVwiK+UlTO8aePGbSwvKUzTwE4238+OUY9MoR6ksAg35zl8sfTunQQ==", + "dev": true, + "requires": { + "preval.macro": "^4.0.0" + } + }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", @@ -3513,6 +4639,47 @@ } } }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shasum": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", + "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", + "dev": true, + "requires": { + "json-stable-stringify": "~0.0.0", + "sha.js": "~2.4.4" + } + }, + "shasum-object": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shasum-object/-/shasum-object-1.0.0.tgz", + "integrity": "sha512-Iqo5rp/3xVi6M4YheapzZhhGPVs0yZwHj7wvwQ1B9z8H6zk+FEnI7y3Teq7qwnekfEhu8WmG2z0z4iWZaxLWVg==", + "dev": true, + "requires": { + "fast-safe-stringify": "^2.0.7" + } + }, + "shell-quote": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", + "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", + "dev": true + }, + "simple-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", + "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=", + "dev": true + }, "slash": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", @@ -3696,16 +4863,87 @@ } } }, + "stream-browserify": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-combiner2": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", + "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", + "dev": true, + "requires": { + "duplexer2": "~0.1.0", + "readable-stream": "^2.0.2" + } + }, + "stream-http": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.1.0.tgz", + "integrity": "sha512-cuB6RgO7BqC4FBYzmnvhob5Do3wIdIsXAgGycHJnW+981gHqoYcYz9lqjJrk8WXRddbwPuqPYRl+bag6mYv4lw==", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^3.0.6", + "xtend": "^4.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "stream-splicer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.1.tgz", + "integrity": "sha512-Xizh4/NPuYSyAXyT7g8IvdJ9HJpxIGL9PjyhtywCZvvP0OPIdqyrr4dMikeuvY8xahpdKEBlBTySe583totajg==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.2" + } + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, - "optional": true, "requires": { "safe-buffer": "~5.1.0" } }, + "subarg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", + "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", + "dev": true, + "requires": { + "minimist": "^1.1.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + } + } + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -3715,6 +4953,40 @@ "has-flag": "^3.0.0" } }, + "syntax-error": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", + "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", + "dev": true, + "requires": { + "acorn-node": "^1.2.0" + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "timers-browserify": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", + "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", + "dev": true, + "requires": { + "process": "~0.11.0" + } + }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -3767,6 +5039,37 @@ "repeat-string": "^1.6.1" } }, + "tty-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", + "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", + "dev": true + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "umd": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", + "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", + "dev": true + }, + "undeclared-identifiers": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.3.tgz", + "integrity": "sha512-pJOW4nxjlmfwKApE4zvxLScM/njmwj/DiUBv7EabwE4O8kRUy+HIwxQtZLBPll/jx1LJyBcqNfB3/cpv9EZwOw==", + "dev": true, + "requires": { + "acorn-node": "^1.3.0", + "dash-ast": "^1.0.0", + "get-assigned-identifiers": "^1.2.0", + "simple-concat": "^1.0.0", + "xtend": "^4.0.1" + } + }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", @@ -3784,15 +5087,15 @@ } }, "unicode-match-property-value-ecmascript": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz", - "integrity": "sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", + "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", "dev": true }, "unicode-property-aliases-ecmascript": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz", - "integrity": "sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", + "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", "dev": true }, "union-value": { @@ -3866,6 +5169,24 @@ "dev": true, "optional": true }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", @@ -3873,12 +5194,34 @@ "dev": true, "optional": true }, + "util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "dev": true, + "requires": { + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + } + } + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true, - "optional": true + "dev": true + }, + "vm-browserify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", + "dev": true }, "which-pm-runs": { "version": "1.0.0", @@ -3892,6 +5235,12 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, "yaml": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.7.2.tgz", diff --git a/package.json b/package.json index 0cf376da..2641bc62 100644 --- a/package.json +++ b/package.json @@ -2,22 +2,32 @@ "name": "loveit-src", "version": "0.2.0", "description": "LoveIt theme source file", - "main": "index.js", + "private": true, "dependencies": {}, "devDependencies": { "@babel/cli": "^7.8.4", - "@babel/core": "^7.8.4", - "@babel/preset-env": "^7.8.4", + "@babel/core": "^7.9.0", + "@babel/preset-env": "^7.9.0", "babel-preset-minify": "^0.5.1", - "minimist": ">=1.2.2", - "husky": "^4.2.3" + "babelify": "^10.0.0", + "browserify": "^16.5.0", + "core-js": "^3.6.4", + "husky": "^4.2.3", + "minimist": "^1.2.5", + "segmentit": "^2.0.3" }, "scripts": { - "build": "npx babel src --out-file assets/js/theme.min.js --source-maps && hugo -v --source=exampleSite --themesDir=../.. -D --gc", - "start": "npm run build && hugo server --source=exampleSite --themesDir=../.. --disableFastRender", + "preinstall": "npx npm-force-resolutions", + "babel": "npx babel src/js --out-file assets/js/theme.min.js --source-maps", + "build": "npm run babel && hugo -v --source=exampleSite --themesDir=../.. -D --gc", + "build-lunr-segmentit": "browserify src/lib/lunr.segmentit.js -o assets/lib/lunr/lunr.segmentit.js -t babelify --presets @babel/preset-env --presets minify", + "start": "npm run babel && hugo server --source=exampleSite --themesDir=../.. --disableFastRender", "check": "htmlproofer exampleSite/public --check-html --allow-hash-href --empty-alt-ignore --disable-external", "copy": "rm -rf resources && cp -rf exampleSite/resources resources" }, + "resolutions": { + "minimist": "^1.2.5" + }, "husky": { "hooks": { "pre-commit": "npm run build && npm run copy && git add .", diff --git a/resources/_gen/assets/scss/css/style.template.scss_90197bdac482216ecaaaae0fb88517c1.content b/resources/_gen/assets/scss/css/style.template.scss_90197bdac482216ecaaaae0fb88517c1.content deleted file mode 100644 index 16df6be9..00000000 --- a/resources/_gen/assets/scss/css/style.template.scss_90197bdac482216ecaaaae0fb88517c1.content +++ /dev/null @@ -1,3 +0,0 @@ -@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@800&display=swap");/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace, monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html{font-family:system,-apple-system,BlinkMacSystemFont,"PingFang SC","Segoe UI","Microsoft YaHei","wenquanyi micro hei","Hiragino Sans GB","Hiragino Sans GB W3","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;font-display:swap;font-size:16px;line-height:1.5rem;width:100%}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-thumb{background-color:#87878d}::-webkit-scrollbar-thumb:hover{background-color:#a9a9b3}::selection{background:rgba(38,139,211,0.2)}.dark-theme ::selection{background:rgba(38,139,211,0.3)}body{-webkit-font-smoothing:subpixel-antialiased;background-color:#fff;color:#161209;overflow-wrap:break-word}body::before{content:"";background-repeat:no-repeat;background-position:center;opacity:0.05;position:fixed;top:0;left:0;width:100%;height:100%;z-index:-1;-webkit-filter:grayscale(100%);-moz-filter:grayscale(100%);-ms-filter:grayscale(100%);-o-filter:grayscale(100%);filter:grayscale(100%);filter:gray}body.dark-theme{color:#a9a9b3;background-color:#292a2d}a{text-decoration:none}a{color:#161209}.dark-theme a{color:#a9a9b3}a:active,a:hover{color:#2d96bd}.dark-theme a:active,.dark-theme a:hover{color:#fff}#fixed-buttons{display:none}.fixed-button{display:none;z-index:100;position:fixed;right:1.5rem;font-size:1rem;line-height:1.3rem;padding:.6rem .6rem;color:#a9a9b3;background:#f8f8f8;border:1px solid #c3c3c3;border-radius:2rem}.fixed-button:hover,.fixed-button:active{color:#161209;cursor:pointer}.fixed-button:active,.fixed-button:focus,.fixed-button:hover{outline:none}.dark-theme .fixed-button{color:#5d5d5f;background:#252627;border-color:#313236}.dark-theme .fixed-button:hover,.dark-theme .fixed-button:active{color:#a9a9b3}#top-button{display:block;bottom:1.5rem}#comment-button{bottom:4.5rem}.wrapper{display:flex;flex-direction:column;min-height:97.5vh;width:100%}.wrapper main{flex:1 0 auto}.wrapper main .container{padding-left:1rem;padding-right:1rem}.footer{height:2rem;width:100%;text-align:center;line-height:1.5rem;padding-top:2rem}.page{position:relative;width:100%;max-width:60%;margin:0 auto;padding-top:3.5rem}.single .single-title{margin:1rem 0 .5rem;font-size:1.6rem;line-height:140%}.single .single-subtitle{margin:.4rem 0;font-size:1.2rem;font-weight:normal;font-style:italic;line-height:100%}.single .post-meta{font-size:.875rem;color:#a9a9b3}.single .post-meta span{display:inline-block}.dark-theme .single .post-meta{color:#5d5d5f}.single .post-meta a{color:#2d96bd}.dark-theme .single .post-meta a{color:#a9a9b3}.single .post-meta a:active,.single .post-meta a:hover{color:#ef3982}.dark-theme .single .post-meta a:active,.dark-theme .single .post-meta a:hover{color:#fff}.single .post-meta .author{font-size:1.05rem}.single .featured-image{margin:.5rem 0}.single .featured-image img{display:block;width:100%;height:auto;margin:0 auto;overflow:hidden}.single #toc-auto{display:block;position:absolute;width:1000px;padding:0 .8rem;border-left:1px solid #dcdcdc;overflow-wrap:break-word;box-sizing:border-box;top:10rem;left:10000px}.dark-theme .single #toc-auto{border-left:1px solid #4a4b50}.single #toc-auto .toc-title{font-weight:400;margin:.8rem 0;text-transform:uppercase}.single #toc-auto .toc-content.always-active ul{display:block}.single #toc-auto .toc-content>nav>ul{margin:.625rem 0}.single #toc-auto .toc-content ul{text-indent:-0.85rem;padding-left:.625rem;list-style:none}.single #toc-auto .toc-content ul a::before{content:"|";font-weight:bolder;margin-right:.5rem;color:#2d96bd}.dark-theme .single #toc-auto .toc-content ul a::before{color:#55bde2}.single #toc-auto .toc-content ul ul{padding-left:1.25rem;display:none}.single #toc-auto .toc-content ul .has-active>ul{display:block}.single #toc-auto .toc-content a.active{font-weight:bold;color:#2d96bd}.dark-theme .single #toc-auto .toc-content a.active{color:#55bde2}.single #toc-auto .toc-content a.active::before{color:#ef3982}.dark-theme .single #toc-auto .toc-content a.active::before{color:#bdebfc}.single #toc-static{display:none;margin:.8rem 0}.single #toc-static details summary{list-style:none;background:#ededed}.dark-theme .single #toc-static details summary{background:#20252b}.single #toc-static details summary .toc-title{display:block;display:flex;justify-content:space-between;font-weight:bold;line-height:2em;padding:0 .625rem}.single #toc-static details summary .toc-title i.details{line-height:2em}.single #toc-static details summary .toc-title:hover{cursor:pointer}.single #toc-static details summary::-webkit-details-marker{display:none}.single #toc-static details[open] i.details{transform:rotate(180deg)}.single #toc-static .toc-content{background-color:#f5f5f5}.single #toc-static .toc-content>nav>ul{margin:0;padding:.4rem .8rem}.single #toc-static .toc-content ul{list-style:none}.single #toc-static .toc-content ul ul{padding-left:1.25rem}.dark-theme .single #toc-static .toc-content{background-color:#272C34}.single .toc .toc-title{font-size:1.2rem}.single .toc .toc-content{font-size:.9rem}.single .toc ruby{background:#f5f5f5}.single .toc ruby rt{color:#a9a9b3}.dark-theme .single .toc ruby{background:#272C34}.dark-theme .single .toc ruby rt{color:#5d5d5f}.single .content>h2{font-size:1.5rem}.single .content>h2 code{font-size:1.25rem}.single .content>h3{font-size:1.375rem}.single .content>h3 code{font-size:1.125rem}.single .content>h4{font-size:1.25rem}.single .content>h4 code{font-size:1rem}.single .content>h5{font-size:1.125rem}.single .content>h6{font-size:1rem}.single .content h2,.single .content h3,.single .content h4,.single .content h5,.single .content h6{font-weight:bold;margin:1.2rem 0}.dark-theme .single .content h2,.dark-theme .single .content h3,.dark-theme .single .content h4,.dark-theme .single .content h5,.dark-theme .single .content h6{font-weight:bolder}.single .content>h2>.header-mark::before,.single .content>h3>.header-mark::before,.single .content>h4>.header-mark::before,.single .content>h5>.header-mark::before,.single .content>h6>.header-mark::before{content:"|";margin-right:.3125rem;color:#2d96bd}.dark-theme .single .content>h2>.header-mark::before,.dark-theme .single .content>h3>.header-mark::before,.dark-theme .single .content>h4>.header-mark::before,.dark-theme .single .content>h5>.header-mark::before,.dark-theme .single .content>h6>.header-mark::before{color:#55bde2}.single .content>h2>.header-mark::before{content:"#"}.single .content p{margin:.5rem 0}.single .content b,.single .content strong{font-weight:bold}.dark-theme .single .content b,.dark-theme .single .content strong{color:#ddd}.single .content a{color:#2d96bd}.dark-theme .single .content a{color:#55bde2}.single .content a:active,.single .content a:hover{color:#ef3982}.dark-theme .single .content a:active,.dark-theme .single .content a:hover{color:#bdebfc}.single .content a{word-break:break-all;word-break:break-word}.dark-theme .single .content a b,.dark-theme .single .content a strong{color:#55bde2}.single .content .dark-theme a:hover b,.single .content .dark-theme a:hover strong{color:#bdebfc}.single .content ul{margin:.5rem 0;padding-left:2rem;list-style-type:disc}.single .content ruby{background:#f5f5f5}.single .content ruby rt{color:#a9a9b3}.dark-theme .single .content ruby{background:#272C34}.dark-theme .single .content ruby rt{color:#5d5d5f}.single .content .table-wrapper{overflow-x:auto}.single .content .table-wrapper::-webkit-scrollbar{background-color:#fff}.dark-theme .single .content .table-wrapper::-webkit-scrollbar{background-color:#272c34}.single .content .table-wrapper>table{width:100%;max-width:100%;margin:.625rem 0;border-spacing:0;background:#fff;border-collapse:collapse}.dark-theme .single .content .table-wrapper>table{background:#272c34}.single .content .table-wrapper>table thead{background:#ededed}.dark-theme .single .content .table-wrapper>table thead{background-color:#20252b}.single .content .table-wrapper>table th,.single .content .table-wrapper>table td{padding:.3rem 1rem;border:1px double #dcdcdc}.dark-theme .single .content .table-wrapper>table th,.dark-theme .single .content .table-wrapper>table td{border:1px double #4a4b50}.single .content img{max-width:100%;min-height:1.2rem}.single .content figure{text-align:center}.single .content figure .image-caption:not(:empty){min-width:20%;max-width:80%;display:inline-block;padding:.5rem;margin:0 auto;font-size:.875rem;color:#969696}.single .content figure img{display:block;height:auto;margin:0 auto;overflow:hidden}.single .content .lazyloading{object-fit:none}.single .content blockquote{font-size:1rem;display:block;border-width:1px 0;border-style:solid;border-color:#dcdcdc;padding:1.5em 1.2em 0.5em 1.2em;margin:0 0 2em 0;position:relative}.single .content blockquote::before{content:'\201C';position:absolute;top:0em;left:50%;transform:translate(-50%, -50%);width:3rem;height:2rem;font:6em/1.08em 'PT Sans', sans-serif;color:#2d96bd;text-align:center}.dark-theme .single .content blockquote::before{color:#55bde2}.single .content blockquote::after{content:"#blockquote" attr(cite);display:block;text-align:right;font-size:0.875em;color:#2d96bd}.dark-theme .single .content blockquote::after{color:#55bde2}.dark-theme .single .content blockquote{border-color:#4a4b50}.single .content .footnotes{color:#a9a9b3}.dark-theme .single .content .footnotes{color:#5d5d5f}.single .content .footnotes p{margin:.25rem 0}.single .content code{font-size:13px;font-family:Source Code Pro,Menlo,Consolas,Monaco,monospace;padding:.2rem .4rem;color:#E74C3C}.dark-theme .single .content code{color:#E5BF78}.single .content code,.single .content pre,.single .content .highlight table,.single .content .highlight tr,.single .content .highlight td{background:#f5f5f5}.dark-theme .single .content code,.dark-theme .single .content pre,.dark-theme .single .content .highlight table,.dark-theme .single .content .highlight tr,.dark-theme .single .content .highlight td{background:#272C34}.single .content .highlight>.chroma{margin:.5rem 0}.single .content .highlight>.chroma code,.single .content .highlight>.chroma pre{margin:0;padding:0}.single .content .highlight>.chroma::before{display:block;padding:.4rem;font-family:system,-apple-system,BlinkMacSystemFont,"PingFang SC","Segoe UI","Microsoft YaHei","wenquanyi micro hei","Hiragino Sans GB","Hiragino Sans GB W3","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:bold;color:#b1b0b0;background:#ededed;content:'Code'}.dark-theme .single .content .highlight>.chroma::before{color:#b1b0b0;background:#20252b}.single .content .highlight>.chroma.language-bash::before{content:"Bash"}.single .content .highlight>.chroma.language-c::before{content:"C"}.single .content .highlight>.chroma.language-cs::before{content:"C#"}.single .content .highlight>.chroma.language-cpp::before{content:"C++"}.single .content .highlight>.chroma.language-clojure::before{content:"Clojure"}.single .content .highlight>.chroma.language-coffeescript::before{content:"CoffeeScript"}.single .content .highlight>.chroma.language-css::before{content:"CSS"}.single .content .highlight>.chroma.language-dart::before{content:"Dart"}.single .content .highlight>.chroma.language-diff::before{content:"Diff"}.single .content .highlight>.chroma.language-erlang::before{content:"Erlang"}.single .content .highlight>.chroma.language-go::before{content:"Go"}.single .content .highlight>.chroma.language-go-html-template::before{content:"Go HTML Template"}.single .content .highlight>.chroma.language-groovy::before{content:"Groovy"}.single .content .highlight>.chroma.language-haskell::before{content:"Haskell"}.single .content .highlight>.chroma.language-html::before{content:"HTML"}.single .content .highlight>.chroma.language-http::before{content:"HTTP"}.single .content .highlight>.chroma.language-xml::before{content:"XML"}.single .content .highlight>.chroma.language-java::before{content:"Java"}.single .content .highlight>.chroma.language-js::before{content:"JavaScript"}.single .content .highlight>.chroma.language-javascript::before{content:"JavaScript"}.single .content .highlight>.chroma.language-json::before{content:"JSON"}.single .content .highlight>.chroma.language-kotlin::before{content:"Kotlin"}.single .content .highlight>.chroma.language-latex::before{content:"LaTeX"}.single .content .highlight>.chroma.language-less::before{content:"Less"}.single .content .highlight>.chroma.language-lisp::before{content:"Lisp"}.single .content .highlight>.chroma.language-lua::before{content:"Lua"}.single .content .highlight>.chroma.language-makefile::before{content:"Makefile"}.single .content .highlight>.chroma.language-markdown::before{content:"Markdown"}.single .content .highlight>.chroma.language-matlab::before{content:"Matlab"}.single .content .highlight>.chroma.language-objectivec::before{content:"Objective-C"}.single .content .highlight>.chroma.language-php::before{content:"PHP"}.single .content .highlight>.chroma.language-perl::before{content:"Perl"}.single .content .highlight>.chroma.language-python::before{content:"Python"}.single .content .highlight>.chroma.language-r::before{content:"R"}.single .content .highlight>.chroma.language-ruby::before{content:"Ruby"}.single .content .highlight>.chroma.language-rust::before{content:"Rust"}.single .content .highlight>.chroma.language-scala::before{content:"Scala"}.single .content .highlight>.chroma.language-scss::before{content:"Scss"}.single .content .highlight>.chroma.language-shell::before{content:"Shell"}.single .content .highlight>.chroma.language-sql::before{content:"SQL"}.single .content .highlight>.chroma.language-swift::before{content:"Swift"}.single .content .highlight>.chroma.language-tex::before{content:"TeX"}.single .content .highlight>.chroma.language-toml::before{content:"TOML"}.single .content .highlight>.chroma.language-ts::before{content:"TypeScript"}.single .content .highlight>.chroma.language-typescript::before{content:"TypeScript"}.single .content .highlight>.chroma.language-vue::before{content:"Vue"}.single .content .highlight>.chroma.language-yml::before{content:"YAML"}.single .content .highlight>.chroma.language-yaml::before{content:"YAML"}.single .content .highlight>.chroma .ln{padding-right:.8rem}.single .content .highlight>.chroma .lntd:last-child .hl{display:block;background-color:#e8e8e8}.dark-theme .single .content .highlight>.chroma .lntd:last-child .hl{background-color:#1c2025}.single .content .highlight>.chroma .ln,.single .content .highlight>.chroma .lnt{color:#a9a9b3}.dark-theme .single .content .highlight>.chroma .ln,.dark-theme .single .content .highlight>.chroma .lnt{color:#5d5d5f}.single .content .highlight{font-family:Source Code Pro,Menlo,Consolas,Monaco,monospace;font-size:13px;line-height:18px}.single .content .highlight .c,.single .content .highlight .ch,.single .content .highlight .cm,.single .content .highlight .c1,.single .content .highlight .cs,.single .content .highlight .cp,.single .content .highlight .cpf{font-style:italic}.single .content .highlight .gl{text-decoration:underline}.single .content .highlight .p{color:#a9a9b3}.single .content .highlight .k{color:#b501a9}.single .content .highlight .kc{color:#b501a9}.single .content .highlight .kd{color:#b501a9}.single .content .highlight .kn{color:#b501a9}.single .content .highlight .kp{color:#b501a9}.single .content .highlight .kr{color:#b501a9}.single .content .highlight .kt{color:#b501a9}.single .content .highlight .n{color:#333}.single .content .highlight .na{color:#2b77fa}.single .content .highlight .nb{color:#f74840}.single .content .highlight .bp{color:#f74840}.single .content .highlight .nc{color:#cb8100}.single .content .highlight .no{color:#2b77fa}.single .content .highlight .nd{color:#0086c1}.single .content .highlight .ni{color:#2b77fa}.single .content .highlight .ne{color:#2b77fa}.single .content .highlight .nf{color:#2b77fa}.single .content .highlight .fm{color:#1ccad6}.single .content .highlight .nl{color:#2b77fa}.single .content .highlight .nn{color:#2b77fa}.single .content .highlight .nx{color:#333}.single .content .highlight .py{color:#2b77fa}.single .content .highlight .nt{color:#2b77fa}.single .content .highlight .nv{color:#2b77fa}.single .content .highlight .vc{color:#2b77fa}.single .content .highlight .vg{color:#2b77fa}.single .content .highlight .vi{color:#2b77fa}.single .content .highlight .vm{color:#2b77fa}.single .content .highlight .l{color:#2aa198}.single .content .highlight .ld{color:#2aa198}.single .content .highlight .s{color:#24a443}.single .content .highlight .sa{color:#24a443}.single .content .highlight .sb{color:#24a443}.single .content .highlight .sc{color:#24a443}.single .content .highlight .dl{color:#24a443}.single .content .highlight .sd{color:#24a443}.single .content .highlight .s2{color:#24a443}.single .content .highlight .se{color:#24a443}.single .content .highlight .sh{color:#24a443}.single .content .highlight .si{color:#24a443}.single .content .highlight .sx{color:#24a443}.single .content .highlight .sr{color:#24a443}.single .content .highlight .s1{color:#24a443}.single .content .highlight .ss{color:#24a443}.single .content .highlight .m{color:#e2893c}.single .content .highlight .mb{color:#e2893c}.single .content .highlight .mf{color:#e2893c}.single .content .highlight .mh{color:#e2893c}.single .content .highlight .mi{color:#e2893c}.single .content .highlight .il{color:#e2893c}.single .content .highlight .mo{color:#e2893c}.single .content .highlight .o{color:#f19b04}.single .content .highlight .ow{color:#b501a9}.single .content .highlight .c{color:#a0a1a8}.single .content .highlight .ch{color:#a0a1a8}.single .content .highlight .cm{color:#a0a1a8}.single .content .highlight .c1{color:#a0a1a8}.single .content .highlight .cs{color:#a0a1a8}.single .content .highlight .cp{color:#a0a1a8}.single .content .highlight .cpf{color:#a0a1a8}.single .content .highlight .g{color:#e72d40}.single .content .highlight .gd{color:#e72d40}.single .content .highlight .ge{color:#e72d40}.single .content .highlight .gr{color:#e72d40}.single .content .highlight .gh{color:#e72d40}.single .content .highlight .gi{color:#e72d40}.single .content .highlight .go{color:#e72d40}.single .content .highlight .gp{color:#e72d40}.single .content .highlight .gs{color:#e72d40}.single .content .highlight .gu{color:#e72d40}.single .content .highlight .gt{color:#e72d40}.single .content .highlight .w{color:#bbb}.dark-theme .single .content .highlight .p{color:#a9a9b3}.dark-theme .single .content .highlight .k{color:#d371e3}.dark-theme .single .content .highlight .kc{color:#d371e3}.dark-theme .single .content .highlight .kd{color:#d371e3}.dark-theme .single .content .highlight .kn{color:#d371e3}.dark-theme .single .content .highlight .kp{color:#d371e3}.dark-theme .single .content .highlight .kr{color:#d371e3}.dark-theme .single .content .highlight .kt{color:#d371e3}.dark-theme .single .content .highlight .n{color:#a9b2c0}.dark-theme .single .content .highlight .na{color:#41b0f5}.dark-theme .single .content .highlight .nb{color:#19b9c4}.dark-theme .single .content .highlight .bp{color:#ecbf6f}.dark-theme .single .content .highlight .nc{color:#ecbf6f}.dark-theme .single .content .highlight .no{color:#41b0f5}.dark-theme .single .content .highlight .nd{color:#ecbf6f}.dark-theme .single .content .highlight .ni{color:#41b0f5}.dark-theme .single .content .highlight .ne{color:#41b0f5}.dark-theme .single .content .highlight .nf{color:#41b0f5}.dark-theme .single .content .highlight .fm{color:#19b9c4}.dark-theme .single .content .highlight .nl{color:#41b0f5}.dark-theme .single .content .highlight .nn{color:#41b0f5}.dark-theme .single .content .highlight .nx{color:#a9a9b3}.dark-theme .single .content .highlight .py{color:#41b0f5}.dark-theme .single .content .highlight .nt{color:#41b0f5}.dark-theme .single .content .highlight .nv{color:#41b0f5}.dark-theme .single .content .highlight .vc{color:#41b0f5}.dark-theme .single .content .highlight .vg{color:#41b0f5}.dark-theme .single .content .highlight .vi{color:#41b0f5}.dark-theme .single .content .highlight .vm{color:#41b0f5}.dark-theme .single .content .highlight .l{color:#2aa198}.dark-theme .single .content .highlight .ld{color:#2aa198}.dark-theme .single .content .highlight .s{color:#8cc570}.dark-theme .single .content .highlight .sa{color:#8cc570}.dark-theme .single .content .highlight .sb{color:#8cc570}.dark-theme .single .content .highlight .sc{color:#8cc570}.dark-theme .single .content .highlight .dl{color:#8cc570}.dark-theme .single .content .highlight .sd{color:#8cc570}.dark-theme .single .content .highlight .s2{color:#8cc570}.dark-theme .single .content .highlight .se{color:#8cc570}.dark-theme .single .content .highlight .sh{color:#8cc570}.dark-theme .single .content .highlight .si{color:#8cc570}.dark-theme .single .content .highlight .sx{color:#8cc570}.dark-theme .single .content .highlight .sr{color:#8cc570}.dark-theme .single .content .highlight .s1{color:#8cc570}.dark-theme .single .content .highlight .ss{color:#8cc570}.dark-theme .single .content .highlight .m{color:#db985c}.dark-theme .single .content .highlight .mb{color:#db985c}.dark-theme .single .content .highlight .mf{color:#db985c}.dark-theme .single .content .highlight .mh{color:#db985c}.dark-theme .single .content .highlight .mi{color:#db985c}.dark-theme .single .content .highlight .il{color:#db985c}.dark-theme .single .content .highlight .mo{color:#db985c}.dark-theme .single .content .highlight .o{color:#ecbf6f}.dark-theme .single .content .highlight .ow{color:#d371e3}.dark-theme .single .content .highlight .c{color:#7e848f}.dark-theme .single .content .highlight .ch{color:#7e848f}.dark-theme .single .content .highlight .cm{color:#7e848f}.dark-theme .single .content .highlight .c1{color:#7e848f}.dark-theme .single .content .highlight .cs{color:#7e848f}.dark-theme .single .content .highlight .cp{color:#7e848f}.dark-theme .single .content .highlight .cpf{color:#7e848f}.dark-theme .single .content .highlight .g{color:#f16372}.dark-theme .single .content .highlight .gd{color:#f16372}.dark-theme .single .content .highlight .ge{color:#f16372}.dark-theme .single .content .highlight .gr{color:#f16372}.dark-theme .single .content .highlight .gh{color:#f16372}.dark-theme .single .content .highlight .gi{color:#f16372}.dark-theme .single .content .highlight .go{color:#f16372}.dark-theme .single .content .highlight .gp{color:#f16372}.dark-theme .single .content .highlight .gs{color:#f16372}.dark-theme .single .content .highlight .gu{color:#f16372}.dark-theme .single .content .highlight .gt{color:#f16372}.dark-theme .single .content .highlight .w{color:#bbb}.single .content .highlight>.chroma table,.single .content .highlight>.chroma tr,.single .content .highlight>.chroma td,.single .content .gist table,.single .content .gist tr,.single .content .gist td{margin:0;border:none !important;white-space:nowrap}.single .content .highlight>.chroma td,.single .content .gist td{padding:.2rem .4rem}.single .content .gist .gist-file,.single .content .gist .gist-data,.single .content .gist .gist-meta{border:none}.single .content .gist .gist-meta{padding:.4rem .8rem;background-color:#e8e8e8}.single .content .gist .gist-meta a{color:#2d96bd}.dark-theme .single .content .gist .gist-meta a{color:#55bde2}.single .content .gist .gist-meta a:active,.single .content .gist .gist-meta a:hover{color:#ef3982}.dark-theme .single .content .gist .gist-meta a:active,.dark-theme .single .content .gist .gist-meta a:hover{color:#bdebfc}.dark-theme .single .content .gist .gist-meta{background-color:#1c2025}.dark-theme .single .content .gist .highlight{background:#141414}.dark-theme .single .content .gist .blob-num,.dark-theme .single .content .gist .blob-code-inner,.dark-theme .single .content .gist .highlight,.dark-theme .single .content .gist .pl-enm,.dark-theme .single .content .gist .pl-ko,.dark-theme .single .content .gist .pl-mo,.dark-theme .single .content .gist .pl-mp1 .pl-sf,.dark-theme .single .content .gist .pl-ms,.dark-theme .single .content .gist .pl-pdc1,.dark-theme .single .content .gist .pl-scp,.dark-theme .single .content .gist .pl-smc,.dark-theme .single .content .gist .pl-som,.dark-theme .single .content .gist .pl-va,.dark-theme .single .content .gist .pl-vpf,.dark-theme .single .content .gist .pl-vpu,.dark-theme .single .content .gist .pl-mdr{color:#aab1bf}.dark-theme .single .content .gist .pl-mb,.dark-theme .single .content .gist .pl-pdb{font-weight:700}.dark-theme .single .content .gist .pl-c,.dark-theme .single .content .gist .pl-c span,.dark-theme .single .content .gist .pl-pdc{color:#5b6270;font-style:italic}.dark-theme .single .content .gist .pl-sr .pl-cce{color:#56b5c2;font-weight:400}.dark-theme .single .content .gist .pl-ef,.dark-theme .single .content .gist .pl-en,.dark-theme .single .content .gist .pl-enf,.dark-theme .single .content .gist .pl-eoai,.dark-theme .single .content .gist .pl-kos,.dark-theme .single .content .gist .pl-mh .pl-pdh,.dark-theme .single .content .gist .pl-mr{color:#61afef}.dark-theme .single .content .gist .pl-ens,.dark-theme .single .content .gist .pl-vi{color:#be5046}.dark-theme .single .content .gist .pl-enti,.dark-theme .single .content .gist .pl-mai .pl-sf,.dark-theme .single .content .gist .pl-ml,.dark-theme .single .content .gist .pl-sf,.dark-theme .single .content .gist .pl-sr,.dark-theme .single .content .gist .pl-sr .pl-sra,.dark-theme .single .content .gist .pl-src,.dark-theme .single .content .gist .pl-st,.dark-theme .single .content .gist .pl-vo{color:#56b5c2}.dark-theme .single .content .gist .pl-eoi,.dark-theme .single .content .gist .pl-mri,.dark-theme .single .content .gist .pl-pds,.dark-theme .single .content .gist .pl-pse .pl-s1,.dark-theme .single .content .gist .pl-s,.dark-theme .single .content .gist .pl-s1{color:#97c279}.dark-theme .single .content .gist .pl-k,.dark-theme .single .content .gist .pl-kolp,.dark-theme .single .content .gist .pl-mc,.dark-theme .single .content .gist .pl-pde{color:#c578dd}.dark-theme .single .content .gist .pl-mi,.dark-theme .single .content .gist .pl-pdi{color:#c578dd;font-style:italic}.dark-theme .single .content .gist .pl-mp,.dark-theme .single .content .gist .pl-stp{color:#818896}.dark-theme .single .content .gist .pl-mdh,.dark-theme .single .content .gist .pl-mdi,.dark-theme .single .content .gist .pl-mdr{font-weight:400}.dark-theme .single .content .gist .pl-mdht,.dark-theme .single .content .gist .pl-mi1{color:#97c279;background:#020}.dark-theme .single .content .gist .pl-md,.dark-theme .single .content .gist .pl-mdhf{color:#df6b75;background:#200}.dark-theme .single .content .gist .pl-corl{color:#df6b75;text-decoration:underline}.dark-theme .single .content .gist .pl-ib{background:#df6b75}.dark-theme .single .content .gist .pl-ii{background:#e0c184;color:#fff}.dark-theme .single .content .gist .pl-iu{background:#e05151}.dark-theme .single .content .gist .pl-ms1{color:#aab1bf;background:#373b41}.dark-theme .single .content .gist .pl-c1,.dark-theme .single .content .gist .pl-cn,.dark-theme .single .content .gist .pl-e,.dark-theme .single .content .gist .pl-eoa,.dark-theme .single .content .gist .pl-eoac,.dark-theme .single .content .gist .pl-eoac .pl-pde,.dark-theme .single .content .gist .pl-kou,.dark-theme .single .content .gist .pl-mm,.dark-theme .single .content .gist .pl-mp .pl-s3,.dark-theme .single .content .gist .pl-mq,.dark-theme .single .content .gist .pl-s3,.dark-theme .single .content .gist .pl-sok,.dark-theme .single .content .gist .pl-sv,.dark-theme .single .content .gist .pl-mb{color:#d19965}.dark-theme .single .content .gist .pl-enc,.dark-theme .single .content .gist .pl-entc,.dark-theme .single .content .gist .pl-pse .pl-s2,.dark-theme .single .content .gist .pl-s2,.dark-theme .single .content .gist .pl-sc,.dark-theme .single .content .gist .pl-smp,.dark-theme .single .content .gist .pl-sr .pl-sre,.dark-theme .single .content .gist .pl-stj,.dark-theme .single .content .gist .pl-v,.dark-theme .single .content .gist .pl-pdb{color:#e4bf7a}.dark-theme .single .content .gist .pl-ent,.dark-theme .single .content .gist .pl-entl,.dark-theme .single .content .gist .pl-entm,.dark-theme .single .content .gist .pl-mh,.dark-theme .single .content .gist .pl-pdv,.dark-theme .single .content .gist .pl-smi,.dark-theme .single .content .gist .pl-sol,.dark-theme .single .content .gist .pl-mdh,.dark-theme .single .content .gist .pl-mdi{color:#df6b75}.dark-theme .single .content iframe.instagram-media{border:none !important}.single .content .admonition{position:relative;margin:.9765em 0;padding:0 .75rem;background-color:rgba(68,138,255,0.1);border-left:0.25rem solid #448aff;overflow:auto}.single .content .admonition .admonition-title{margin:0 -0.75rem;padding:.2rem .75rem .2rem 1.8rem;border-bottom:0.05rem solid rgba(68,138,255,0.1);background-color:rgba(68,138,255,0.1)}.single .content .admonition .admonition-content{margin:.5rem 0}.single .content .admonition i.icon{font-size:0.85rem;color:#448aff;cursor:auto;position:absolute;left:.6rem;top:.6rem}.single .content .admonition.note{border-left-color:#448aff}.single .content .admonition.note i.icon{color:#448aff}.single .content .admonition.abstract{border-left-color:#00b0ff}.single .content .admonition.abstract i.icon{color:#00b0ff}.single .content .admonition.info{border-left-color:#00b8d4}.single .content .admonition.info i.icon{color:#00b8d4}.single .content .admonition.tip{border-left-color:#00bfa5}.single .content .admonition.tip i.icon{color:#00bfa5}.single .content .admonition.success{border-left-color:#00c853}.single .content .admonition.success i.icon{color:#00c853}.single .content .admonition.question{border-left-color:#64dd17}.single .content .admonition.question i.icon{color:#64dd17}.single .content .admonition.warning{border-left-color:#ff9100}.single .content .admonition.warning i.icon{color:#ff9100}.single .content .admonition.failure{border-left-color:#ff5252}.single .content .admonition.failure i.icon{color:#ff5252}.single .content .admonition.danger{border-left-color:#ff1744}.single .content .admonition.danger i.icon{color:#ff1744}.single .content .admonition.bug{border-left-color:#f50057}.single .content .admonition.bug i.icon{color:#f50057}.single .content .admonition.example{border-left-color:#651fff}.single .content .admonition.example i.icon{color:#651fff}.single .content .admonition.quote{border-left-color:#9e9e9e}.single .content .admonition.quote i.icon{color:#9e9e9e}.single .content .admonition.note{background-color:rgba(68,138,255,0.1)}.single .content .admonition.note .admonition-title{border-bottom-color:rgba(68,138,255,0.1);background-color:rgba(68,138,255,0.1)}.single .content .admonition.abstract{background-color:rgba(0,176,255,0.1)}.single .content .admonition.abstract .admonition-title{border-bottom-color:rgba(0,176,255,0.1);background-color:rgba(0,176,255,0.1)}.single .content .admonition.info{background-color:rgba(0,184,212,0.1)}.single .content .admonition.info .admonition-title{border-bottom-color:rgba(0,184,212,0.1);background-color:rgba(0,184,212,0.1)}.single .content .admonition.tip{background-color:rgba(0,191,165,0.1)}.single .content .admonition.tip .admonition-title{border-bottom-color:rgba(0,191,165,0.1);background-color:rgba(0,191,165,0.1)}.single .content .admonition.success{background-color:rgba(0,200,83,0.1)}.single .content .admonition.success .admonition-title{border-bottom-color:rgba(0,200,83,0.1);background-color:rgba(0,200,83,0.1)}.single .content .admonition.question{background-color:rgba(100,221,23,0.1)}.single .content .admonition.question .admonition-title{border-bottom-color:rgba(100,221,23,0.1);background-color:rgba(100,221,23,0.1)}.single .content .admonition.warning{background-color:rgba(255,145,0,0.1)}.single .content .admonition.warning .admonition-title{border-bottom-color:rgba(255,145,0,0.1);background-color:rgba(255,145,0,0.1)}.single .content .admonition.failure{background-color:rgba(255,82,82,0.1)}.single .content .admonition.failure .admonition-title{border-bottom-color:rgba(255,82,82,0.1);background-color:rgba(255,82,82,0.1)}.single .content .admonition.danger{background-color:rgba(255,23,68,0.1)}.single .content .admonition.danger .admonition-title{border-bottom-color:rgba(255,23,68,0.1);background-color:rgba(255,23,68,0.1)}.single .content .admonition.bug{background-color:rgba(245,0,87,0.1)}.single .content .admonition.bug .admonition-title{border-bottom-color:rgba(245,0,87,0.1);background-color:rgba(245,0,87,0.1)}.single .content .admonition.example{background-color:rgba(101,31,255,0.1)}.single .content .admonition.example .admonition-title{border-bottom-color:rgba(101,31,255,0.1);background-color:rgba(101,31,255,0.1)}.single .content .admonition.quote{background-color:rgba(158,158,158,0.1)}.single .content .admonition.quote .admonition-title{border-bottom-color:rgba(158,158,158,0.1);background-color:rgba(158,158,158,0.1)}.single .content .admonition:last-child{margin-bottom:.75rem}.single .content details.admonition summary{display:block;outline:none;cursor:pointer}.single .content details.admonition summary::-webkit-details-marker{display:none}.single .content details.admonition summary i.details{position:absolute;top:.5rem;right:.5rem;color:#161209}.dark-theme .single .content details.admonition summary i.details{color:#a9a9b3}.single .content details.admonition[open] i.details{transform:rotate(180deg)}.single .content .echarts{margin:.5rem 0;text-align:center}.single .content .mapbox{margin:.5rem 0;padding:.5rem 0}.single .content meting-js{margin:.5rem 0}.single .content .bilibili{position:relative;width:100%;height:0;padding-bottom:75%;margin:3% auto;text-align:center}.single .content .bilibili iframe{position:absolute;width:100%;height:100%;left:0;top:0}.single .content hr{margin:1rem 0;position:relative;border-top:1px dashed #dcdcdc;border-bottom:none}.dark-theme .single .content hr{border-top:1px dashed #4a4b50}.single .content kbd{display:inline-block;padding:.25rem;background-color:#fff;border:1px solid #dcdcdc;border-bottom-color:#dcdcdc;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 #dcdcdc;box-shadow:inset 0 -1px 0 #dcdcdc;font-size:.8rem;font-family:Source Code Pro,Menlo,Consolas,Monaco,monospace;color:#E74C3C}.dark-theme .single .content kbd{background-color:#292a2d;border:1px solid #4a4b50;border-bottom-color:#4a4b50;-webkit-box-shadow:inset 0 -1px 0 #4a4b50;box-shadow:inset 0 -1px 0 #4a4b50;color:#E5BF78}.single .content .typeit .code{padding:.375rem;font-size:.875rem;font-family:Source Code Pro,Menlo,Consolas,Monaco,monospace;font-weight:bold;word-break:break-all}.single .content .version img{min-height:1.2rem;vertical-align:sub}.single .content .version.small img{min-height:1rem}.single .post-footer{margin-top:3rem}.single .post-footer .post-info{border-bottom:1px solid #dcdcdc;padding:1rem 0 0.3rem}.dark-theme .single .post-footer .post-info{border-bottom:1px solid #4a4b50}.single .post-footer .post-info .post-info-line{display:flex;justify-content:space-between}.single .post-footer .post-info .post-info-line .post-info-mod{font-size:0.8em;color:#a9a9b3}.dark-theme .single .post-footer .post-info .post-info-line .post-info-mod{color:#5d5d5f}.single .post-footer .post-info .post-info-line .post-info-mod a{color:#2d96bd}.dark-theme .single .post-footer .post-info .post-info-line .post-info-mod a{color:#55bde2}.single .post-footer .post-info .post-info-line .post-info-mod a:active,.single .post-footer .post-info .post-info-line .post-info-mod a:hover{color:#ef3982}.dark-theme .single .post-footer .post-info .post-info-line .post-info-mod a:active,.dark-theme .single .post-footer .post-info .post-info-line .post-info-mod a:hover{color:#bdebfc}.single .post-footer .post-info .post-info-line .post-info-license{font-size:0.8em;color:#a9a9b3}.dark-theme .single .post-footer .post-info .post-info-line .post-info-license{color:#5d5d5f}.single .post-footer .post-info .post-info-line .post-info-md{font-size:0.8rem;width:8rem}.single .post-footer .post-info .post-info-line .post-info-md a{color:#2d96bd}.dark-theme .single .post-footer .post-info .post-info-line .post-info-md a{color:#55bde2}.single .post-footer .post-info .post-info-line .post-info-md a:active,.single .post-footer .post-info .post-info-line .post-info-md a:hover{color:#ef3982}.dark-theme .single .post-footer .post-info .post-info-line .post-info-md a:active,.dark-theme .single .post-footer .post-info .post-info-line .post-info-md a:hover{color:#bdebfc}.single .post-footer .post-info-more{padding:0.3rem 0 1rem;display:flex;justify-content:space-between;font-size:0.9rem}.single .post-footer .post-tags{max-width:65%}.single .post-footer .post-tags *{display:inline}.single .post-footer .post-nav::before,.single .post-footer .post-nav::after{content:' ';display:table}.single .post-footer .post-nav a.prev,.single .post-footer .post-nav a.next{font-size:1rem;font-weight:600;-webkit-transition:all ease-out .3s;-moz-transition:all ease-out .3s;-o-transition:all ease-out .3s;transition:all ease-out .3s}.single .post-footer .post-nav a.prev{float:left}.single .post-footer .post-nav a.prev:hover{-webkit-transform:translateX(-4px);-moz-transform:translateX(-4px);-ms-transform:translateX(-4px);-o-transform:translateX(-4px);transform:translateX(-4px)}.single .post-footer .post-nav a.next{float:right}.single .post-footer .post-nav a.next:hover{-webkit-transform:translateX(4px);-moz-transform:translateX(4px);-ms-transform:translateX(4px);-o-transform:translateX(4px);transform:translateX(4px)}.single .comment{padding:4rem 0}.special .single-title,.special .single-subtitle{text-align:right}.archive .single-title{text-align:right}.archive .archive-item{margin-left:2rem}.archive .categories-card{margin:0 auto;margin-top:3rem;display:flex;align-items:center;justify-content:space-between;flex-direction:row;flex-wrap:wrap;padding:0 2.5rem;line-height:1.6rem}.archive .categories-card .card-item{font-size:.875rem;text-align:left;width:45%;display:flex;align-items:flex-start;margin-top:2rem;min-height:10rem;padding:0 2%;position:relative}.archive .categories-card .card-item .card-item-wrapper{width:100%;overflow:hidden}.archive .categories-card .card-item .card-item-wrapper .card-item-title{font-size:1.2rem;font-weight:bold;display:inline-block}.archive .categories-card .card-item .card-item-wrapper span{float:right;padding-right:1rem}.archive .archive-item-link{display:inline-block;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:95%}.archive .archive-item-link:hover{color:#2d96bd;background-color:transparent}.dark-theme .archive .archive-item-link{color:#a9a9b3;text-decoration:none;transition:color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease}.dark-theme .archive .archive-item-link:hover{color:#fff;text-decoration:none;transition:color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease}.archive .archive-item-date{float:right;text-align:right;color:#a9a9b3}.dark-theme .archive .archive-item-date{color:#5d5d5f}.archive .more-post{text-align:right}.archive .tag-cloud-tags{margin:10px 0}.archive .tag-cloud-tags a{color:#161209}.dark-theme .archive .tag-cloud-tags a{color:#a9a9b3}.archive .tag-cloud-tags a:active,.archive .tag-cloud-tags a:hover{color:#2d96bd}.dark-theme .archive .tag-cloud-tags a:active,.dark-theme .archive .tag-cloud-tags a:hover{color:#fff}.archive .tag-cloud-tags a{display:inline-block;position:relative;margin:5px 10px;overflow-wrap:break-word;-webkit-transition:all ease-out .3s;-moz-transition:all ease-out .3s;-o-transition:all ease-out .3s;transition:all ease-out .3s}.archive .tag-cloud-tags a:active,.archive .tag-cloud-tags a:focus,.archive .tag-cloud-tags a:hover{-webkit-transform:scale(1.2);-moz-transform:scale(1.2);-ms-transform:scale(1.2);-o-transform:scale(1.2);transform:scale(1.2)}.archive .tag-cloud-tags a sup{color:#a9a9b3}.dark-theme .archive .tag-cloud-tags a sup{color:#5d5d5f}.home .home-profile{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0);padding:2rem 0 0.5rem;text-align:center}.home .home-profile .home-avatar{padding:0.6rem}.home .home-profile .home-avatar img{width:6rem;height:auto;display:inline-block;-webkit-border-radius:100%;border-radius:100%;-webkit-box-shadow:0 0 0 0.3618em rgba(0,0,0,0.05);box-shadow:0 0 0 0.3618em rgba(0,0,0,0.05);margin:0 auto;-webkit-transition:all ease 0.4s;-moz-transition:all ease 0.4s;-o-transition:all ease 0.4s;transition:all ease 0.4s;cursor:pointer}.home .home-profile .home-avatar img:hover{position:relative;-webkit-transform:translateY(-0.75rem);-moz-transform:translateY(-0.75rem);-ms-transform:translateY(-0.75rem);-o-transform:translateY(-0.75rem);transform:translateY(-0.75rem);cursor:pointer}.home .home-profile .home-subtitle{font-size:1rem;font-weight:normal;margin:0;padding:.4rem}.home .home-profile .social-links{padding:.4rem 0}.home .home-profile .social-links a,.home .home-profile .social-links i{font-size:1.6rem;line-height:2rem}.home .home-profile .social-links img{height:1.4rem;padding:0 .25rem}.home .home-profile .home-disclaimer{font-size:1rem;line-height:1.4rem;font-weight:normal;margin:0;padding:.4rem;color:#a9a9b3}.dark-theme .home .home-profile .home-disclaimer{color:#5d5d5f}.home .summary{padding-top:1rem;padding-bottom:.8rem;color:#161209;border-bottom:1px dashed #dcdcdc}.dark-theme .home .summary{color:#a9a9b3;border-bottom:1px dashed #4a4b50}.home .summary .featured-image-preview{width:100%;padding:30% 0 0;position:relative;margin:0.6rem auto}.home .summary .featured-image-preview img{position:absolute;width:100%;height:100%;left:0;top:0;object-fit:cover}.home .summary .single-title{font-size:1.4rem;line-height:140%;margin:0.4rem 0}.home .summary .content{display:-moz-box;display:-webkit-box;-moz-box-orient:vertical;-webkit-box-orient:vertical;-webkit-line-clamp:3;margin-top:.3rem;width:100%;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word;color:#a9a9b3}.dark-theme .home .summary .content{color:#5d5d5f}.home .summary .content h2,.home .summary .content h3,.home .summary .content h4,.home .summary .content h5,.home .summary .content h6,.home .summary .content p{font-size:1rem;display:inline}.home .summary .content h2::after,.home .summary .content h3::after,.home .summary .content h4::after,.home .summary .content h5::after,.home .summary .content h6::after,.home .summary .content p::after{content:"\A";white-space:pre}.home .summary .content h2,.home .summary .content h3,.home .summary .content h4,.home .summary .content h5,.home .summary .content h6{line-height:2}.home .summary .content h2::before,.home .summary .content h3::before,.home .summary .content h4::before,.home .summary .content h5::before,.home .summary .content h6::before{content:"|";margin-right:.3125rem;color:#161209}.dark-theme .home .summary .content h2::before,.dark-theme .home .summary .content h3::before,.dark-theme .home .summary .content h4::before,.dark-theme .home .summary .content h5::before,.dark-theme .home .summary .content h6::before{color:#a9a9b3}.home .summary .content h2{font-size:1.2rem}.home .summary .content h2::before{content:"#"}.home .summary .content a{color:#161209}.dark-theme .home .summary .content a{color:#a9a9b3}.home .summary .content a:active,.home .summary .content a:hover{color:#2d96bd}.dark-theme .home .summary .content a:active,.dark-theme .home .summary .content a:hover{color:#fff}.dark-theme .home .summary .content b,.dark-theme .home .summary .content strong{color:#5d5d5f}.home .summary .post-footer{margin-top:.4rem;display:flex;justify-content:space-between;align-items:center;font-size:.875rem}.home .summary .post-footer a{color:#2d96bd}.dark-theme .home .summary .post-footer a{color:#55bde2}.home .summary .post-footer a:active,.home .summary .post-footer a:hover{color:#ef3982}.dark-theme .home .summary .post-footer a:active,.dark-theme .home .summary .post-footer a:hover{color:#bdebfc}.home .summary .post-footer .post-tags{padding:0}.home .summary .post-footer .post-tags a{color:#161209}.dark-theme .home .summary .post-footer .post-tags a{color:#a9a9b3}.home .summary .post-footer .post-tags a:active,.home .summary .post-footer .post-tags a:hover{color:#2d96bd}.dark-theme .home .summary .post-footer .post-tags a:active,.dark-theme .home .summary .post-footer .post-tags a:hover{color:#fff}#content-404{font-size:1.8rem;line-height:3rem;transform:translateY(30vh);text-align:center}header{width:100%;z-index:100;background-color:#f8f8f8}.dark-theme header{background-color:#252627}header .header-title{font-family:"Nunito",system,-apple-system,BlinkMacSystemFont,"PingFang SC","Segoe UI","Microsoft YaHei","wenquanyi micro hei","Hiragino Sans GB","Hiragino Sans GB W3","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:bold;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}header .menu .menu-item{position:relative}header .language-select{position:absolute;opacity:0;left:0;top:0;width:100%;height:100%}header .language-select:hover{cursor:pointer}header .theme-switch i{-webkit-transform:rotate(225deg);-moz-transform:rotate(225deg);-ms-transform:rotate(225deg);-o-transform:rotate(225deg);transform:rotate(225deg)}#header-desktop{display:block;position:fixed;height:3.5rem;line-height:3.5rem}#header-desktop .header-wrapper{width:auto;text-align:center;padding:0 3%;display:flex;justify-content:space-between}#header-desktop .header-wrapper .header-title{font-size:1.5rem;max-width:30%}#header-desktop .header-wrapper .menu{overflow:hidden;white-space:nowrap}#header-desktop .header-wrapper .menu .menu-item{margin:0 .5rem}#header-desktop .header-wrapper .menu .menu-item.theme-switch{margin:0 .3rem}#header-desktop .header-wrapper .menu a.active{font-weight:900;color:#161209}.dark-theme #header-desktop .header-wrapper .menu a.active{color:#fff}#header-mobile{display:none;position:fixed;height:3.5rem;line-height:3.5rem}#header-mobile .header-wrapper{padding:0;margin:0;transition:all 0.3s ease 0s}#header-mobile .header-wrapper .header-container{display:flex;justify-content:space-between;align-items:center;width:100%;font-size:1.125rem;padding-right:1rem;padding-left:1rem;box-sizing:border-box}#header-mobile .header-wrapper .header-container .header-title{max-width:80%;font-size:1.5rem}#header-mobile .header-wrapper .header-container .menu-toggle{cursor:pointer;line-height:4rem}#header-mobile .header-wrapper .header-container .menu-toggle span{display:block;background:#161209;width:1.5rem;height:2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-transition:.1s margin .1s, .1s transform;-moz-transition:.1s margin .1s, .1s transform;-o-transition:.1s margin .1s, .1s transform;transition:.1s margin .1s, .1s transform}.dark-theme #header-mobile .header-wrapper .header-container .menu-toggle span{background:#a9a9b3}#header-mobile .header-wrapper .header-container .menu-toggle span:nth-child(1){margin-bottom:.5rem}#header-mobile .header-wrapper .header-container .menu-toggle span:nth-child(3){margin-top:.5rem}#header-mobile .header-wrapper .header-container .menu-toggle.active span{-webkit-transition:.1s margin, .1s transform .1s;-moz-transition:.1s margin, .1s transform .1s;-o-transition:.1s margin, .1s transform .1s;transition:.1s margin, .1s transform .1s}#header-mobile .header-wrapper .header-container .menu-toggle.active span:nth-child(1){-webkit-transform:rotate(45deg) translate(0.4rem, 0.5rem);-moz-transform:rotate(45deg) translate(0.4rem, 0.5rem);-ms-transform:rotate(45deg) translate(0.4rem, 0.5rem);-o-transform:rotate(45deg) translate(0.4rem, 0.5rem);transform:rotate(45deg) translate(0.4rem, 0.5rem)}#header-mobile .header-wrapper .header-container .menu-toggle.active span:nth-child(2){opacity:0}#header-mobile .header-wrapper .header-container .menu-toggle.active span:nth-child(3){-moz-transform:rotate(-45deg) translate(0.4rem, -0.5rem);-ms-transform:rotate(-45deg) translate(0.4rem, -0.5rem);-webkit-transform:rotate(-45deg) translate(0.4rem, -0.5rem);-o-transform:rotate(-45deg) translate(0.4rem, -0.5rem);transform:rotate(-45deg) translate(0.4rem, -0.5rem)}#header-mobile .header-wrapper .menu{text-align:center;background:#fff;border-top:2px solid #161209;display:none;box-shadow:0px 2px 4px rgba(0,0,0,0.1),0px 4px 8px rgba(0,0,0,0.1)}#header-mobile .header-wrapper .menu a{display:block;line-height:2.5rem}#header-mobile .header-wrapper .menu.active{display:block}.dark-theme #header-mobile .header-wrapper .menu{background:#292a2d;border-top:2px solid #a9a9b3}.copyright{font-size:.875rem}.copyright .copyright-line{width:100%}.copyright .copyright-line .icp-br{display:none}.pagination{display:flex;flex-direction:row;justify-content:center;list-style:none;white-space:nowrap;width:100%;padding:1rem 0 0}.pagination a{-webkit-font-smoothing:antialiased;font-size:.8rem;color:#bfbfbf;letter-spacing:.1rem;font-weight:700;padding:5px 5px;text-decoration:none;transition:0.3s}.pagination li{padding-bottom:3px;margin:0 20px;box-sizing:border-box;position:relative;display:inline}.pagination li.disabled{display:none}.pagination li:hover a{color:#000}.dark-theme .pagination li:hover a{color:#fff}.pagination li:before,.pagination li:after{position:absolute;content:"";width:0;height:3px;background:#000;transition:0.3s;bottom:0px}.dark-theme .pagination li:before,.dark-theme .pagination li:after{background:#fff}.pagination li:before .active,.pagination li:after .active{width:100%}.pagination li:before{left:50%}.pagination li:after{right:50%}.pagination li:hover:before,.pagination li:hover:after{width:50%}.pagination li.active a{color:#000}.dark-theme .pagination li.active a{color:#fff}.pagination li.active:before,.pagination li.active:after{width:60%}@media only screen and (max-width: 1440px){.page{max-width:56%}}@media only screen and (max-width: 1200px){.page{max-width:52%}}@media only screen and (max-width: 960px){.page{max-width:80%}.page #toc-auto{display:none}.page #toc-static{display:block}}@media only screen and (max-width: 680px){#header-desktop{display:none}#header-mobile{display:block}.page{max-width:100%;padding-top:3.5rem}.page .categories-card .card-item{width:100%}.copyright .copyright-line .icp-splitter{display:none}.copyright .copyright-line .icp-br{display:block}} - -/*# sourceMappingURL=style.min.css.map */ \ No newline at end of file diff --git a/resources/_gen/assets/scss/css/style.template.scss_b8ba9a60a151126bfcde1421dc0b972d.content b/resources/_gen/assets/scss/css/style.template.scss_b8ba9a60a151126bfcde1421dc0b972d.content new file mode 100644 index 00000000..8ffd1c4a --- /dev/null +++ b/resources/_gen/assets/scss/css/style.template.scss_b8ba9a60a151126bfcde1421dc0b972d.content @@ -0,0 +1,3 @@ +@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@800&display=swap");/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace, monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html{font-family:system,-apple-system,BlinkMacSystemFont,"PingFang SC","Segoe UI","Microsoft YaHei","wenquanyi micro hei","Hiragino Sans GB","Hiragino Sans GB W3","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;font-display:swap;font-size:16px;line-height:1.5rem;width:100%}::-webkit-scrollbar{width:.5rem;height:.5rem}::-webkit-scrollbar-thumb{background-color:#87878d}::-webkit-scrollbar-thumb:hover{background-color:#a9a9b3}::selection{background-color:rgba(53,166,247,0.25)}.dark ::selection{background-color:rgba(50,112,194,0.4)}body{background-color:#fff;color:#161209;overflow-wrap:break-word}body.dark{color:#a9a9b3;background-color:#292a2d}#mask{background-repeat:no-repeat;background-position:center;position:fixed;top:0;left:0;width:100%;height:100%;z-index:-1;background-color:rgba(0,0,0,0)}.blur #mask{z-index:100;background-color:rgba(0,0,0,0.25)}a{text-decoration:none}a{color:#161209}.dark a{color:#a9a9b3}a:active,a:hover{color:#2d96bd}.dark a:active,.dark a:hover{color:#fff}#fixed-buttons{display:none}.fixed-button{display:none;z-index:100;position:fixed;right:1.5rem;font-size:1rem;line-height:1.3rem;padding:.6rem .6rem;color:#a9a9b3;background:#f8f8f8;border:1px solid #b1b1b1;-webkit-border-radius:2rem;-moz-border-radius:2rem;border-radius:2rem}.blur .fixed-button{-webkit-filter:blur(1.5px);-moz-filter:blur(1.5px);-ms-filter:blur(1.5px);filter:blur(1.5px)}.fixed-button:hover,.fixed-button:active{color:#161209;cursor:pointer}.fixed-button:active,.fixed-button:focus,.fixed-button:hover{outline:none}.dark .fixed-button{color:#5d5d5f;background:#252627;border-color:#313236}.dark .fixed-button:hover,.dark .fixed-button:active{color:#a9a9b3}#back-to-top{display:block;bottom:1.5rem}#view-comments{bottom:4.5rem}.wrapper{display:flex;flex-direction:column;min-height:97.5vh;width:100%}.wrapper main{flex:1 0 auto}.wrapper main .container{padding-left:1rem;padding-right:1rem}.page{position:relative;width:100%;max-width:60%;margin:0 auto;padding-top:3.5rem}.blur .page{-webkit-filter:blur(1.5px);-moz-filter:blur(1.5px);-ms-filter:blur(1.5px);filter:blur(1.5px)}#toc-auto{display:block;position:absolute;width:1000px;padding:0 .8rem;border-left:1px solid #cacaca;overflow-wrap:break-word;box-sizing:border-box;top:10rem;left:10000px}.blur #toc-auto{-webkit-filter:blur(1.5px);-moz-filter:blur(1.5px);-ms-filter:blur(1.5px);filter:blur(1.5px)}.dark #toc-auto{border-left:1px solid #4a4b50}#toc-auto .toc-title{font-weight:400;margin:.8rem 0;text-transform:uppercase}#toc-auto .toc-content.always-active ul{display:block}#toc-auto .toc-content>nav>ul{margin:.625rem 0}#toc-auto .toc-content ul{text-indent:-0.85rem;padding-left:.625rem;list-style:none}#toc-auto .toc-content ul a::before{content:"|";font-weight:bolder;margin-right:.5rem;color:#2d96bd}.dark #toc-auto .toc-content ul a::before{color:#55bde2}#toc-auto .toc-content ul ul{padding-left:1.25rem;display:none}#toc-auto .toc-content ul .has-active>ul{display:block}#toc-auto .toc-content a.active{font-weight:bold;color:#2d96bd}.dark #toc-auto .toc-content a.active{color:#55bde2}#toc-auto .toc-content a.active::before{color:#ef3982}.dark #toc-auto .toc-content a.active::before{color:#bdebfc}#toc-static{display:none;margin:.8rem 0}#toc-static details summary{list-style:none;background:#ededed}.dark #toc-static details summary{background:#20252b}#toc-static details summary .toc-title{display:block;display:flex;justify-content:space-between;font-weight:bold;line-height:2em;padding:0 .625rem}#toc-static details summary .toc-title i.details{line-height:2em}#toc-static details summary .toc-title:hover{cursor:pointer}#toc-static details summary::-webkit-details-marker{display:none}#toc-static details[open] i.details{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}#toc-static .toc-content{background-color:#f5f5f5}#toc-static .toc-content>nav>ul{margin:0;padding:.4rem .8rem}#toc-static .toc-content ul{list-style:none}#toc-static .toc-content ul ul{padding-left:1.25rem}.dark #toc-static .toc-content{background-color:#272C34}.toc .toc-title{font-size:1.2rem}.toc .toc-content{font-size:.9rem}.toc ruby{background:#f5f5f5}.toc ruby rt{color:#a9a9b3}.dark .toc ruby{background:#272C34}.dark .toc ruby rt{color:#5d5d5f}.single .single-title{margin:1rem 0 .5rem;font-size:1.6rem;line-height:140%}.single .single-subtitle{margin:.4rem 0;font-size:1.2rem;font-weight:normal;font-style:italic;line-height:100%}.single .post-meta{font-size:.875rem;color:#a9a9b3}.single .post-meta span{display:inline-block}.dark .single .post-meta{color:#5d5d5f}.single .post-meta a{color:#2d96bd}.dark .single .post-meta a{color:#a9a9b3}.single .post-meta a:active,.single .post-meta a:hover{color:#ef3982}.dark .single .post-meta a:active,.dark .single .post-meta a:hover{color:#fff}.single .post-meta .author{font-size:1.05rem}.single .featured-image{margin:.5rem 0}.single .featured-image img{display:block;width:100%;height:auto;margin:0 auto;overflow:hidden}.single .content>h2{font-size:1.5rem}.single .content>h2 code{font-size:1.25rem}.single .content>h3{font-size:1.375rem}.single .content>h3 code{font-size:1.125rem}.single .content>h4{font-size:1.25rem}.single .content>h4 code{font-size:1rem}.single .content>h5{font-size:1.125rem}.single .content>h6{font-size:1rem}.single .content h2,.single .content h3,.single .content h4,.single .content h5,.single .content h6{font-weight:bold;margin:1.2rem 0}.dark .single .content h2,.dark .single .content h3,.dark .single .content h4,.dark .single .content h5,.dark .single .content h6{font-weight:bolder}.single .content>h2>.header-mark::before,.single .content>h3>.header-mark::before,.single .content>h4>.header-mark::before,.single .content>h5>.header-mark::before,.single .content>h6>.header-mark::before{content:"|";margin-right:.3125rem;color:#2d96bd}.dark .single .content>h2>.header-mark::before,.dark .single .content>h3>.header-mark::before,.dark .single .content>h4>.header-mark::before,.dark .single .content>h5>.header-mark::before,.dark .single .content>h6>.header-mark::before{color:#55bde2}.single .content>h2>.header-mark::before{content:"#"}.single .content p{margin:.5rem 0}.single .content b,.single .content strong{font-weight:bold}.dark .single .content b,.dark .single .content strong{color:#ddd}.single .content a{color:#2d96bd}.dark .single .content a{color:#55bde2}.single .content a:active,.single .content a:hover{color:#ef3982}.dark .single .content a:active,.dark .single .content a:hover{color:#bdebfc}.single .content a{word-break:break-all;word-break:break-word}.dark .single .content a b,.dark .single .content a strong{color:#55bde2}.single .content .dark a:hover b,.single .content .dark a:hover strong{color:#bdebfc}.single .content ul{margin:.5rem 0;padding-left:2rem;list-style-type:disc}.single .content ruby{background:#f5f5f5}.single .content ruby rt{color:#a9a9b3}.dark .single .content ruby{background:#272C34}.dark .single .content ruby rt{color:#5d5d5f}.single .content .table-wrapper{overflow-x:auto}.single .content .table-wrapper::-webkit-scrollbar{background-color:#fff}.dark .single .content .table-wrapper::-webkit-scrollbar{background-color:#272c34}.single .content .table-wrapper>table{width:100%;max-width:100%;margin:.625rem 0;border-spacing:0;background:#fff;border-collapse:collapse}.dark .single .content .table-wrapper>table{background:#272c34}.single .content .table-wrapper>table thead{background:#ededed}.dark .single .content .table-wrapper>table thead{background-color:#20252b}.single .content .table-wrapper>table th,.single .content .table-wrapper>table td{padding:.3rem 1rem;border:1px double #cacaca}.dark .single .content .table-wrapper>table th,.dark .single .content .table-wrapper>table td{border:1px double #4a4b50}.single .content img{max-width:100%;min-height:1.2rem}.single .content figure{text-align:center}.single .content figure .image-caption:not(:empty){min-width:20%;max-width:80%;display:inline-block;padding:.5rem;margin:0 auto;font-size:.875rem;color:#969696}.single .content figure img{display:block;height:auto;margin:0 auto;overflow:hidden}.single .content .lazyloading{object-fit:none}.single .content blockquote{font-size:1rem;display:block;border-width:1px 0;border-style:solid;border-color:#cacaca;padding:1.5em 1.2em 0.5em 1.2em;margin:0 0 2em 0;position:relative}.single .content blockquote::before{content:'\201C';position:absolute;top:0em;left:50%;-webkit-transform:translate(-50%, -50%);-moz-transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%);-o-transform:translate(-50%, -50%);transform:translate(-50%, -50%);width:3rem;height:2rem;font:6em/1.08em 'PT Sans', sans-serif;color:#2d96bd;text-align:center}.dark .single .content blockquote::before{color:#55bde2}.single .content blockquote::after{content:"#blockquote" attr(cite);display:block;text-align:right;font-size:0.875em;color:#2d96bd}.dark .single .content blockquote::after{color:#55bde2}.dark .single .content blockquote{border-color:#4a4b50}.single .content .footnotes{color:#a9a9b3}.dark .single .content .footnotes{color:#5d5d5f}.single .content .footnotes p{margin:.25rem 0}.single .content code{font-size:13px;font-family:Source Code Pro,Menlo,Consolas,Monaco,monospace;padding:.2rem .4rem;color:#E74C3C}.dark .single .content code{color:#E5BF78}.single .content code,.single .content pre,.single .content .highlight table,.single .content .highlight tr,.single .content .highlight td{background:#f5f5f5}.dark .single .content code,.dark .single .content pre,.dark .single .content .highlight table,.dark .single .content .highlight tr,.dark .single .content .highlight td{background:#272C34}.single .content .highlight>.chroma{margin:.5rem 0}.single .content .highlight>.chroma code,.single .content .highlight>.chroma pre{margin:0;padding:0}.single .content .highlight>.chroma::before{display:block;padding:.2rem .4rem;font-family:system,-apple-system,BlinkMacSystemFont,"PingFang SC","Segoe UI","Microsoft YaHei","wenquanyi micro hei","Hiragino Sans GB","Hiragino Sans GB W3","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:bold;color:#b1b0b0;background:#ededed;content:'Code'}.dark .single .content .highlight>.chroma::before{color:#b1b0b0;background:#20252b}.single .content .highlight>.chroma.language-bash::before{content:"Bash"}.single .content .highlight>.chroma.language-c::before{content:"C"}.single .content .highlight>.chroma.language-cs::before{content:"C#"}.single .content .highlight>.chroma.language-cpp::before{content:"C++"}.single .content .highlight>.chroma.language-clojure::before{content:"Clojure"}.single .content .highlight>.chroma.language-coffeescript::before{content:"CoffeeScript"}.single .content .highlight>.chroma.language-css::before{content:"CSS"}.single .content .highlight>.chroma.language-dart::before{content:"Dart"}.single .content .highlight>.chroma.language-diff::before{content:"Diff"}.single .content .highlight>.chroma.language-erlang::before{content:"Erlang"}.single .content .highlight>.chroma.language-go::before{content:"Go"}.single .content .highlight>.chroma.language-go-html-template::before{content:"Go HTML Template"}.single .content .highlight>.chroma.language-groovy::before{content:"Groovy"}.single .content .highlight>.chroma.language-haskell::before{content:"Haskell"}.single .content .highlight>.chroma.language-html::before{content:"HTML"}.single .content .highlight>.chroma.language-http::before{content:"HTTP"}.single .content .highlight>.chroma.language-xml::before{content:"XML"}.single .content .highlight>.chroma.language-java::before{content:"Java"}.single .content .highlight>.chroma.language-js::before{content:"JavaScript"}.single .content .highlight>.chroma.language-javascript::before{content:"JavaScript"}.single .content .highlight>.chroma.language-json::before{content:"JSON"}.single .content .highlight>.chroma.language-kotlin::before{content:"Kotlin"}.single .content .highlight>.chroma.language-latex::before{content:"LaTeX"}.single .content .highlight>.chroma.language-less::before{content:"Less"}.single .content .highlight>.chroma.language-lisp::before{content:"Lisp"}.single .content .highlight>.chroma.language-lua::before{content:"Lua"}.single .content .highlight>.chroma.language-makefile::before{content:"Makefile"}.single .content .highlight>.chroma.language-markdown::before{content:"Markdown"}.single .content .highlight>.chroma.language-matlab::before{content:"Matlab"}.single .content .highlight>.chroma.language-objectivec::before{content:"Objective-C"}.single .content .highlight>.chroma.language-php::before{content:"PHP"}.single .content .highlight>.chroma.language-perl::before{content:"Perl"}.single .content .highlight>.chroma.language-python::before{content:"Python"}.single .content .highlight>.chroma.language-r::before{content:"R"}.single .content .highlight>.chroma.language-ruby::before{content:"Ruby"}.single .content .highlight>.chroma.language-rust::before{content:"Rust"}.single .content .highlight>.chroma.language-scala::before{content:"Scala"}.single .content .highlight>.chroma.language-scss::before{content:"Scss"}.single .content .highlight>.chroma.language-shell::before{content:"Shell"}.single .content .highlight>.chroma.language-sql::before{content:"SQL"}.single .content .highlight>.chroma.language-swift::before{content:"Swift"}.single .content .highlight>.chroma.language-tex::before{content:"TeX"}.single .content .highlight>.chroma.language-toml::before{content:"TOML"}.single .content .highlight>.chroma.language-ts::before{content:"TypeScript"}.single .content .highlight>.chroma.language-typescript::before{content:"TypeScript"}.single .content .highlight>.chroma.language-vue::before{content:"Vue"}.single .content .highlight>.chroma.language-yml::before{content:"YAML"}.single .content .highlight>.chroma.language-yaml::before{content:"YAML"}.single .content .highlight>.chroma .ln{padding-right:.8rem}.single .content .highlight>.chroma .lntd:last-child .hl{display:block;background-color:#e8e8e8}.dark .single .content .highlight>.chroma .lntd:last-child .hl{background-color:#1c2025}.single .content .highlight>.chroma .ln,.single .content .highlight>.chroma .lnt{color:#a9a9b3}.dark .single .content .highlight>.chroma .ln,.dark .single .content .highlight>.chroma .lnt{color:#5d5d5f}.single .content .highlight{font-family:Source Code Pro,Menlo,Consolas,Monaco,monospace;font-size:13px;line-height:18px}.single .content .highlight .c,.single .content .highlight .ch,.single .content .highlight .cm,.single .content .highlight .c1,.single .content .highlight .cs,.single .content .highlight .cp,.single .content .highlight .cpf{font-style:italic}.single .content .highlight .gl{text-decoration:underline}.single .content .highlight .p{color:#a9a9b3}.single .content .highlight .k{color:#b501a9}.single .content .highlight .kc{color:#b501a9}.single .content .highlight .kd{color:#b501a9}.single .content .highlight .kn{color:#b501a9}.single .content .highlight .kp{color:#b501a9}.single .content .highlight .kr{color:#b501a9}.single .content .highlight .kt{color:#b501a9}.single .content .highlight .n{color:#333}.single .content .highlight .na{color:#2b77fa}.single .content .highlight .nb{color:#f74840}.single .content .highlight .bp{color:#f74840}.single .content .highlight .nc{color:#cb8100}.single .content .highlight .no{color:#2b77fa}.single .content .highlight .nd{color:#0086c1}.single .content .highlight .ni{color:#2b77fa}.single .content .highlight .ne{color:#2b77fa}.single .content .highlight .nf{color:#2b77fa}.single .content .highlight .fm{color:#1ccad6}.single .content .highlight .nl{color:#2b77fa}.single .content .highlight .nn{color:#2b77fa}.single .content .highlight .nx{color:#333}.single .content .highlight .py{color:#2b77fa}.single .content .highlight .nt{color:#2b77fa}.single .content .highlight .nv{color:#2b77fa}.single .content .highlight .vc{color:#2b77fa}.single .content .highlight .vg{color:#2b77fa}.single .content .highlight .vi{color:#2b77fa}.single .content .highlight .vm{color:#2b77fa}.single .content .highlight .l{color:#2aa198}.single .content .highlight .ld{color:#2aa198}.single .content .highlight .s{color:#24a443}.single .content .highlight .sa{color:#24a443}.single .content .highlight .sb{color:#24a443}.single .content .highlight .sc{color:#24a443}.single .content .highlight .dl{color:#24a443}.single .content .highlight .sd{color:#24a443}.single .content .highlight .s2{color:#24a443}.single .content .highlight .se{color:#24a443}.single .content .highlight .sh{color:#24a443}.single .content .highlight .si{color:#24a443}.single .content .highlight .sx{color:#24a443}.single .content .highlight .sr{color:#24a443}.single .content .highlight .s1{color:#24a443}.single .content .highlight .ss{color:#24a443}.single .content .highlight .m{color:#e2893c}.single .content .highlight .mb{color:#e2893c}.single .content .highlight .mf{color:#e2893c}.single .content .highlight .mh{color:#e2893c}.single .content .highlight .mi{color:#e2893c}.single .content .highlight .il{color:#e2893c}.single .content .highlight .mo{color:#e2893c}.single .content .highlight .o{color:#f19b04}.single .content .highlight .ow{color:#b501a9}.single .content .highlight .c{color:#a0a1a8}.single .content .highlight .ch{color:#a0a1a8}.single .content .highlight .cm{color:#a0a1a8}.single .content .highlight .c1{color:#a0a1a8}.single .content .highlight .cs{color:#a0a1a8}.single .content .highlight .cp{color:#a0a1a8}.single .content .highlight .cpf{color:#a0a1a8}.single .content .highlight .g{color:#e72d40}.single .content .highlight .gd{color:#e72d40}.single .content .highlight .ge{color:#e72d40}.single .content .highlight .gr{color:#e72d40}.single .content .highlight .gh{color:#e72d40}.single .content .highlight .gi{color:#e72d40}.single .content .highlight .go{color:#e72d40}.single .content .highlight .gp{color:#e72d40}.single .content .highlight .gs{color:#e72d40}.single .content .highlight .gu{color:#e72d40}.single .content .highlight .gt{color:#e72d40}.single .content .highlight .w{color:#bbb}.dark .single .content .highlight .p{color:#a9a9b3}.dark .single .content .highlight .k{color:#d371e3}.dark .single .content .highlight .kc{color:#d371e3}.dark .single .content .highlight .kd{color:#d371e3}.dark .single .content .highlight .kn{color:#d371e3}.dark .single .content .highlight .kp{color:#d371e3}.dark .single .content .highlight .kr{color:#d371e3}.dark .single .content .highlight .kt{color:#d371e3}.dark .single .content .highlight .n{color:#a9b2c0}.dark .single .content .highlight .na{color:#41b0f5}.dark .single .content .highlight .nb{color:#19b9c4}.dark .single .content .highlight .bp{color:#ecbf6f}.dark .single .content .highlight .nc{color:#ecbf6f}.dark .single .content .highlight .no{color:#41b0f5}.dark .single .content .highlight .nd{color:#ecbf6f}.dark .single .content .highlight .ni{color:#41b0f5}.dark .single .content .highlight .ne{color:#41b0f5}.dark .single .content .highlight .nf{color:#41b0f5}.dark .single .content .highlight .fm{color:#19b9c4}.dark .single .content .highlight .nl{color:#41b0f5}.dark .single .content .highlight .nn{color:#41b0f5}.dark .single .content .highlight .nx{color:#a9a9b3}.dark .single .content .highlight .py{color:#41b0f5}.dark .single .content .highlight .nt{color:#41b0f5}.dark .single .content .highlight .nv{color:#41b0f5}.dark .single .content .highlight .vc{color:#41b0f5}.dark .single .content .highlight .vg{color:#41b0f5}.dark .single .content .highlight .vi{color:#41b0f5}.dark .single .content .highlight .vm{color:#41b0f5}.dark .single .content .highlight .l{color:#2aa198}.dark .single .content .highlight .ld{color:#2aa198}.dark .single .content .highlight .s{color:#8cc570}.dark .single .content .highlight .sa{color:#8cc570}.dark .single .content .highlight .sb{color:#8cc570}.dark .single .content .highlight .sc{color:#8cc570}.dark .single .content .highlight .dl{color:#8cc570}.dark .single .content .highlight .sd{color:#8cc570}.dark .single .content .highlight .s2{color:#8cc570}.dark .single .content .highlight .se{color:#8cc570}.dark .single .content .highlight .sh{color:#8cc570}.dark .single .content .highlight .si{color:#8cc570}.dark .single .content .highlight .sx{color:#8cc570}.dark .single .content .highlight .sr{color:#8cc570}.dark .single .content .highlight .s1{color:#8cc570}.dark .single .content .highlight .ss{color:#8cc570}.dark .single .content .highlight .m{color:#db985c}.dark .single .content .highlight .mb{color:#db985c}.dark .single .content .highlight .mf{color:#db985c}.dark .single .content .highlight .mh{color:#db985c}.dark .single .content .highlight .mi{color:#db985c}.dark .single .content .highlight .il{color:#db985c}.dark .single .content .highlight .mo{color:#db985c}.dark .single .content .highlight .o{color:#ecbf6f}.dark .single .content .highlight .ow{color:#d371e3}.dark .single .content .highlight .c{color:#7e848f}.dark .single .content .highlight .ch{color:#7e848f}.dark .single .content .highlight .cm{color:#7e848f}.dark .single .content .highlight .c1{color:#7e848f}.dark .single .content .highlight .cs{color:#7e848f}.dark .single .content .highlight .cp{color:#7e848f}.dark .single .content .highlight .cpf{color:#7e848f}.dark .single .content .highlight .g{color:#f16372}.dark .single .content .highlight .gd{color:#f16372}.dark .single .content .highlight .ge{color:#f16372}.dark .single .content .highlight .gr{color:#f16372}.dark .single .content .highlight .gh{color:#f16372}.dark .single .content .highlight .gi{color:#f16372}.dark .single .content .highlight .go{color:#f16372}.dark .single .content .highlight .gp{color:#f16372}.dark .single .content .highlight .gs{color:#f16372}.dark .single .content .highlight .gu{color:#f16372}.dark .single .content .highlight .gt{color:#f16372}.dark .single .content .highlight .w{color:#bbb}.single .content .highlight>.chroma table,.single .content .highlight>.chroma tr,.single .content .highlight>.chroma td,.single .content .gist table,.single .content .gist tr,.single .content .gist td{margin:0;border:none !important;white-space:nowrap}.single .content .highlight>.chroma td,.single .content .gist td{padding:.2rem .4rem}.single .content .gist .gist-file,.single .content .gist .gist-data,.single .content .gist .gist-meta{border:none}.single .content .gist .gist-meta{padding:.4rem .8rem;background-color:#e8e8e8}.single .content .gist .gist-meta a{color:#2d96bd}.dark .single .content .gist .gist-meta a{color:#55bde2}.single .content .gist .gist-meta a:active,.single .content .gist .gist-meta a:hover{color:#ef3982}.dark .single .content .gist .gist-meta a:active,.dark .single .content .gist .gist-meta a:hover{color:#bdebfc}.dark .single .content .gist .gist-meta{background-color:#1c2025}.dark .single .content .gist .highlight{background:#141414}.dark .single .content .gist .blob-num,.dark .single .content .gist .blob-code-inner,.dark .single .content .gist .highlight,.dark .single .content .gist .pl-enm,.dark .single .content .gist .pl-ko,.dark .single .content .gist .pl-mo,.dark .single .content .gist .pl-mp1 .pl-sf,.dark .single .content .gist .pl-ms,.dark .single .content .gist .pl-pdc1,.dark .single .content .gist .pl-scp,.dark .single .content .gist .pl-smc,.dark .single .content .gist .pl-som,.dark .single .content .gist .pl-va,.dark .single .content .gist .pl-vpf,.dark .single .content .gist .pl-vpu,.dark .single .content .gist .pl-mdr{color:#aab1bf}.dark .single .content .gist .pl-mb,.dark .single .content .gist .pl-pdb{font-weight:700}.dark .single .content .gist .pl-c,.dark .single .content .gist .pl-c span,.dark .single .content .gist .pl-pdc{color:#5b6270;font-style:italic}.dark .single .content .gist .pl-sr .pl-cce{color:#56b5c2;font-weight:400}.dark .single .content .gist .pl-ef,.dark .single .content .gist .pl-en,.dark .single .content .gist .pl-enf,.dark .single .content .gist .pl-eoai,.dark .single .content .gist .pl-kos,.dark .single .content .gist .pl-mh .pl-pdh,.dark .single .content .gist .pl-mr{color:#61afef}.dark .single .content .gist .pl-ens,.dark .single .content .gist .pl-vi{color:#be5046}.dark .single .content .gist .pl-enti,.dark .single .content .gist .pl-mai .pl-sf,.dark .single .content .gist .pl-ml,.dark .single .content .gist .pl-sf,.dark .single .content .gist .pl-sr,.dark .single .content .gist .pl-sr .pl-sra,.dark .single .content .gist .pl-src,.dark .single .content .gist .pl-st,.dark .single .content .gist .pl-vo{color:#56b5c2}.dark .single .content .gist .pl-eoi,.dark .single .content .gist .pl-mri,.dark .single .content .gist .pl-pds,.dark .single .content .gist .pl-pse .pl-s1,.dark .single .content .gist .pl-s,.dark .single .content .gist .pl-s1{color:#97c279}.dark .single .content .gist .pl-k,.dark .single .content .gist .pl-kolp,.dark .single .content .gist .pl-mc,.dark .single .content .gist .pl-pde{color:#c578dd}.dark .single .content .gist .pl-mi,.dark .single .content .gist .pl-pdi{color:#c578dd;font-style:italic}.dark .single .content .gist .pl-mp,.dark .single .content .gist .pl-stp{color:#818896}.dark .single .content .gist .pl-mdh,.dark .single .content .gist .pl-mdi,.dark .single .content .gist .pl-mdr{font-weight:400}.dark .single .content .gist .pl-mdht,.dark .single .content .gist .pl-mi1{color:#97c279;background:#020}.dark .single .content .gist .pl-md,.dark .single .content .gist .pl-mdhf{color:#df6b75;background:#200}.dark .single .content .gist .pl-corl{color:#df6b75;text-decoration:underline}.dark .single .content .gist .pl-ib{background:#df6b75}.dark .single .content .gist .pl-ii{background:#e0c184;color:#fff}.dark .single .content .gist .pl-iu{background:#e05151}.dark .single .content .gist .pl-ms1{color:#aab1bf;background:#373b41}.dark .single .content .gist .pl-c1,.dark .single .content .gist .pl-cn,.dark .single .content .gist .pl-e,.dark .single .content .gist .pl-eoa,.dark .single .content .gist .pl-eoac,.dark .single .content .gist .pl-eoac .pl-pde,.dark .single .content .gist .pl-kou,.dark .single .content .gist .pl-mm,.dark .single .content .gist .pl-mp .pl-s3,.dark .single .content .gist .pl-mq,.dark .single .content .gist .pl-s3,.dark .single .content .gist .pl-sok,.dark .single .content .gist .pl-sv,.dark .single .content .gist .pl-mb{color:#d19965}.dark .single .content .gist .pl-enc,.dark .single .content .gist .pl-entc,.dark .single .content .gist .pl-pse .pl-s2,.dark .single .content .gist .pl-s2,.dark .single .content .gist .pl-sc,.dark .single .content .gist .pl-smp,.dark .single .content .gist .pl-sr .pl-sre,.dark .single .content .gist .pl-stj,.dark .single .content .gist .pl-v,.dark .single .content .gist .pl-pdb{color:#e4bf7a}.dark .single .content .gist .pl-ent,.dark .single .content .gist .pl-entl,.dark .single .content .gist .pl-entm,.dark .single .content .gist .pl-mh,.dark .single .content .gist .pl-pdv,.dark .single .content .gist .pl-smi,.dark .single .content .gist .pl-sol,.dark .single .content .gist .pl-mdh,.dark .single .content .gist .pl-mdi{color:#df6b75}.dark .single .content iframe.instagram-media{border:none !important}.single .content .admonition{position:relative;margin:.9765em 0;padding:0 .75rem;background-color:rgba(68,138,255,0.1);border-left:0.25rem solid #448aff;overflow:auto}.single .content .admonition .admonition-title{margin:0 -0.75rem;padding:.2rem .75rem .2rem 1.8rem;border-bottom:0.05rem solid rgba(68,138,255,0.1);background-color:rgba(68,138,255,0.1)}.single .content .admonition .admonition-content{margin:.5rem 0}.single .content .admonition i.icon{font-size:0.85rem;color:#448aff;cursor:auto;position:absolute;left:.6rem;top:.6rem}.single .content .admonition.note{border-left-color:#448aff}.single .content .admonition.note i.icon{color:#448aff}.single .content .admonition.abstract{border-left-color:#00b0ff}.single .content .admonition.abstract i.icon{color:#00b0ff}.single .content .admonition.info{border-left-color:#00b8d4}.single .content .admonition.info i.icon{color:#00b8d4}.single .content .admonition.tip{border-left-color:#00bfa5}.single .content .admonition.tip i.icon{color:#00bfa5}.single .content .admonition.success{border-left-color:#00c853}.single .content .admonition.success i.icon{color:#00c853}.single .content .admonition.question{border-left-color:#64dd17}.single .content .admonition.question i.icon{color:#64dd17}.single .content .admonition.warning{border-left-color:#ff9100}.single .content .admonition.warning i.icon{color:#ff9100}.single .content .admonition.failure{border-left-color:#ff5252}.single .content .admonition.failure i.icon{color:#ff5252}.single .content .admonition.danger{border-left-color:#ff1744}.single .content .admonition.danger i.icon{color:#ff1744}.single .content .admonition.bug{border-left-color:#f50057}.single .content .admonition.bug i.icon{color:#f50057}.single .content .admonition.example{border-left-color:#651fff}.single .content .admonition.example i.icon{color:#651fff}.single .content .admonition.quote{border-left-color:#9e9e9e}.single .content .admonition.quote i.icon{color:#9e9e9e}.single .content .admonition.note{background-color:rgba(68,138,255,0.1)}.single .content .admonition.note .admonition-title{border-bottom-color:rgba(68,138,255,0.1);background-color:rgba(68,138,255,0.1)}.single .content .admonition.abstract{background-color:rgba(0,176,255,0.1)}.single .content .admonition.abstract .admonition-title{border-bottom-color:rgba(0,176,255,0.1);background-color:rgba(0,176,255,0.1)}.single .content .admonition.info{background-color:rgba(0,184,212,0.1)}.single .content .admonition.info .admonition-title{border-bottom-color:rgba(0,184,212,0.1);background-color:rgba(0,184,212,0.1)}.single .content .admonition.tip{background-color:rgba(0,191,165,0.1)}.single .content .admonition.tip .admonition-title{border-bottom-color:rgba(0,191,165,0.1);background-color:rgba(0,191,165,0.1)}.single .content .admonition.success{background-color:rgba(0,200,83,0.1)}.single .content .admonition.success .admonition-title{border-bottom-color:rgba(0,200,83,0.1);background-color:rgba(0,200,83,0.1)}.single .content .admonition.question{background-color:rgba(100,221,23,0.1)}.single .content .admonition.question .admonition-title{border-bottom-color:rgba(100,221,23,0.1);background-color:rgba(100,221,23,0.1)}.single .content .admonition.warning{background-color:rgba(255,145,0,0.1)}.single .content .admonition.warning .admonition-title{border-bottom-color:rgba(255,145,0,0.1);background-color:rgba(255,145,0,0.1)}.single .content .admonition.failure{background-color:rgba(255,82,82,0.1)}.single .content .admonition.failure .admonition-title{border-bottom-color:rgba(255,82,82,0.1);background-color:rgba(255,82,82,0.1)}.single .content .admonition.danger{background-color:rgba(255,23,68,0.1)}.single .content .admonition.danger .admonition-title{border-bottom-color:rgba(255,23,68,0.1);background-color:rgba(255,23,68,0.1)}.single .content .admonition.bug{background-color:rgba(245,0,87,0.1)}.single .content .admonition.bug .admonition-title{border-bottom-color:rgba(245,0,87,0.1);background-color:rgba(245,0,87,0.1)}.single .content .admonition.example{background-color:rgba(101,31,255,0.1)}.single .content .admonition.example .admonition-title{border-bottom-color:rgba(101,31,255,0.1);background-color:rgba(101,31,255,0.1)}.single .content .admonition.quote{background-color:rgba(158,158,158,0.1)}.single .content .admonition.quote .admonition-title{border-bottom-color:rgba(158,158,158,0.1);background-color:rgba(158,158,158,0.1)}.single .content .admonition:last-child{margin-bottom:.75rem}.single .content details.admonition summary{display:block;outline:none;cursor:pointer}.single .content details.admonition summary::-webkit-details-marker{display:none}.single .content details.admonition summary i.details{position:absolute;top:.5rem;right:.5rem;color:#161209}.dark .single .content details.admonition summary i.details{color:#a9a9b3}.single .content details.admonition[open] i.details{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.single .content .echarts{margin:.5rem 0;text-align:center}.single .content .mapbox{margin:.5rem 0;padding:.5rem 0}.single .content meting-js{margin:.5rem 0}.single .content .bilibili{position:relative;width:100%;height:0;padding-bottom:75%;margin:3% auto;text-align:center}.single .content .bilibili iframe{position:absolute;width:100%;height:100%;left:0;top:0}.single .content hr{margin:1rem 0;position:relative;border-top:1px dashed #cacaca;border-bottom:none}.dark .single .content hr{border-top:1px dashed #4a4b50}.single .content kbd{display:inline-block;padding:.25rem;background-color:#fff;border:1px solid #cacaca;border-bottom-color:#cacaca;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 #cacaca;box-shadow:inset 0 -1px 0 #cacaca;font-size:.8rem;font-family:Source Code Pro,Menlo,Consolas,Monaco,monospace;color:#E74C3C}.dark .single .content kbd{background-color:#292a2d;border:1px solid #4a4b50;border-bottom-color:#4a4b50;-webkit-box-shadow:inset 0 -1px 0 #4a4b50;box-shadow:inset 0 -1px 0 #4a4b50;color:#E5BF78}.single .content .typeit .code{padding:.375rem;font-size:.875rem;font-family:Source Code Pro,Menlo,Consolas,Monaco,monospace;font-weight:bold;word-break:break-all}.single .content .version img{min-height:1.2rem;vertical-align:sub}.single .content .version.small img{min-height:1rem}.single .post-footer{margin-top:3rem}.single .post-footer .post-info{border-bottom:1px solid #cacaca;padding:1rem 0 0.3rem}.dark .single .post-footer .post-info{border-bottom:1px solid #4a4b50}.single .post-footer .post-info .post-info-line{display:flex;justify-content:space-between}.single .post-footer .post-info .post-info-line .post-info-mod{font-size:0.8em;color:#a9a9b3}.dark .single .post-footer .post-info .post-info-line .post-info-mod{color:#5d5d5f}.single .post-footer .post-info .post-info-line .post-info-mod a{color:#2d96bd}.dark .single .post-footer .post-info .post-info-line .post-info-mod a{color:#55bde2}.single .post-footer .post-info .post-info-line .post-info-mod a:active,.single .post-footer .post-info .post-info-line .post-info-mod a:hover{color:#ef3982}.dark .single .post-footer .post-info .post-info-line .post-info-mod a:active,.dark .single .post-footer .post-info .post-info-line .post-info-mod a:hover{color:#bdebfc}.single .post-footer .post-info .post-info-line .post-info-license{font-size:0.8em;color:#a9a9b3}.dark .single .post-footer .post-info .post-info-line .post-info-license{color:#5d5d5f}.single .post-footer .post-info .post-info-line .post-info-md{font-size:0.8rem;width:8rem}.single .post-footer .post-info .post-info-line .post-info-md a{color:#2d96bd}.dark .single .post-footer .post-info .post-info-line .post-info-md a{color:#55bde2}.single .post-footer .post-info .post-info-line .post-info-md a:active,.single .post-footer .post-info .post-info-line .post-info-md a:hover{color:#ef3982}.dark .single .post-footer .post-info .post-info-line .post-info-md a:active,.dark .single .post-footer .post-info .post-info-line .post-info-md a:hover{color:#bdebfc}.single .post-footer .post-info-more{padding:0.3rem 0 1rem;display:flex;justify-content:space-between;font-size:0.9rem}.single .post-footer .post-tags{max-width:65%}.single .post-footer .post-tags *{display:inline}.single .post-footer .post-nav::before,.single .post-footer .post-nav::after{content:' ';display:table}.single .post-footer .post-nav a.prev,.single .post-footer .post-nav a.next{font-size:1rem;font-weight:600;-webkit-transition:all 0.3s ease-out;-moz-transition:all 0.3s ease-out;-o-transition:all 0.3s ease-out;transition:all 0.3s ease-out}.single .post-footer .post-nav a.prev{float:left}.single .post-footer .post-nav a.prev:hover{-webkit-transform:translateX(-4px);-moz-transform:translateX(-4px);-ms-transform:translateX(-4px);-o-transform:translateX(-4px);transform:translateX(-4px)}.single .post-footer .post-nav a.next{float:right}.single .post-footer .post-nav a.next:hover{-webkit-transform:translateX(4px);-moz-transform:translateX(4px);-ms-transform:translateX(4px);-o-transform:translateX(4px);transform:translateX(4px)}.single .comment{padding:4rem 0}.special .single-title,.special .single-subtitle{text-align:right}.archive .single-title{text-align:right}.archive .archive-item{margin-left:2rem}.archive .categories-card{margin:0 auto;margin-top:3rem;display:flex;align-items:center;justify-content:space-between;flex-direction:row;flex-wrap:wrap;padding:0 2.5rem;line-height:1.6rem}.archive .categories-card .card-item{font-size:.875rem;text-align:left;width:45%;display:flex;align-items:flex-start;margin-top:2rem;min-height:10rem;padding:0 2%;position:relative}.archive .categories-card .card-item .card-item-wrapper{width:100%;overflow:hidden}.archive .categories-card .card-item .card-item-wrapper .card-item-title{font-size:1.2rem;font-weight:bold;display:inline-block}.archive .categories-card .card-item .card-item-wrapper span{float:right;padding-right:1rem}.archive .archive-item-link{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:95%}.archive .archive-item-link:hover{color:#2d96bd;background-color:transparent}.dark .archive .archive-item-link{color:#a9a9b3}.dark .archive .archive-item-link:hover{color:#fff}.archive .archive-item-date{float:right;text-align:right;color:#a9a9b3}.dark .archive .archive-item-date{color:#5d5d5f}.archive .more-post{text-align:right}.archive .tag-cloud-tags{margin:10px 0}.archive .tag-cloud-tags a{color:#161209}.dark .archive .tag-cloud-tags a{color:#a9a9b3}.archive .tag-cloud-tags a:active,.archive .tag-cloud-tags a:hover{color:#2d96bd}.dark .archive .tag-cloud-tags a:active,.dark .archive .tag-cloud-tags a:hover{color:#fff}.archive .tag-cloud-tags a{display:inline-block;position:relative;margin:5px 10px;overflow-wrap:break-word;-webkit-transition:all ease-out 0.3s;-moz-transition:all ease-out 0.3s;-o-transition:all ease-out 0.3s;transition:all ease-out 0.3s}.archive .tag-cloud-tags a:active,.archive .tag-cloud-tags a:focus,.archive .tag-cloud-tags a:hover{-webkit-transform:scale(1.2);-moz-transform:scale(1.2);-ms-transform:scale(1.2);-o-transform:scale(1.2);transform:scale(1.2)}.archive .tag-cloud-tags a sup{color:#a9a9b3}.dark .archive .tag-cloud-tags a sup{color:#5d5d5f}.home .home-profile{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0);padding:2rem 0 0.5rem;text-align:center}.home .home-profile .home-avatar{padding:0.6rem}.home .home-profile .home-avatar img{display:inline-block;width:6rem;height:auto;margin:0 auto;-webkit-border-radius:100%;-moz-border-radius:100%;border-radius:100%;-webkit-box-shadow:0 0 0 0.3618em rgba(0,0,0,0.05);box-shadow:0 0 0 0.3618em rgba(0,0,0,0.05);-webkit-transition:all 0.4s ease;-moz-transition:all 0.4s ease;-o-transition:all 0.4s ease;transition:all 0.4s ease;cursor:pointer}.home .home-profile .home-avatar img:hover{position:relative;-webkit-transform:translateY(-0.75rem);-moz-transform:translateY(-0.75rem);-ms-transform:translateY(-0.75rem);-o-transform:translateY(-0.75rem);transform:translateY(-0.75rem);cursor:pointer}.home .home-profile .home-subtitle{font-size:1rem;font-weight:normal;margin:0;padding:.4rem}.home .home-profile .social-links{padding:.4rem 0}.home .home-profile .social-links a,.home .home-profile .social-links i{font-size:1.6rem;line-height:2rem}.home .home-profile .social-links img{height:1.4rem;padding:0 .25rem}.home .home-profile .home-disclaimer{font-size:1rem;line-height:1.4rem;font-weight:normal;margin:0;padding:.4rem;color:#a9a9b3}.dark .home .home-profile .home-disclaimer{color:#5d5d5f}.home .summary{padding-top:1rem;padding-bottom:.8rem;color:#161209;border-bottom:1px dashed #cacaca}.dark .home .summary{color:#a9a9b3;border-bottom:1px dashed #4a4b50}.home .summary .featured-image-preview{width:100%;padding:30% 0 0;position:relative;margin:0.6rem auto}.home .summary .featured-image-preview img{position:absolute;width:100%;height:100%;left:0;top:0;object-fit:cover}.home .summary .single-title{font-size:1.4rem;line-height:140%;margin:0.4rem 0}.home .summary .content{display:-moz-box;display:-webkit-box;display:box;-moz-box-orient:vertical;-webkit-box-orient:vertical;box-orient:vertical;-webkit-line-clamp:3;margin-top:.3rem;width:100%;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word;color:#a9a9b3}.dark .home .summary .content{color:#5d5d5f}.home .summary .content h2,.home .summary .content h3,.home .summary .content h4,.home .summary .content h5,.home .summary .content h6,.home .summary .content p{font-size:1rem;display:inline}.home .summary .content h2::after,.home .summary .content h3::after,.home .summary .content h4::after,.home .summary .content h5::after,.home .summary .content h6::after,.home .summary .content p::after{content:"\A";white-space:pre}.home .summary .content h2,.home .summary .content h3,.home .summary .content h4,.home .summary .content h5,.home .summary .content h6{line-height:2}.home .summary .content h2::before,.home .summary .content h3::before,.home .summary .content h4::before,.home .summary .content h5::before,.home .summary .content h6::before{content:"|";margin-right:.3125rem;color:#161209}.dark .home .summary .content h2::before,.dark .home .summary .content h3::before,.dark .home .summary .content h4::before,.dark .home .summary .content h5::before,.dark .home .summary .content h6::before{color:#a9a9b3}.home .summary .content h2{font-size:1.2rem}.home .summary .content h2::before{content:"#"}.home .summary .content a{color:#161209}.dark .home .summary .content a{color:#a9a9b3}.home .summary .content a:active,.home .summary .content a:hover{color:#2d96bd}.dark .home .summary .content a:active,.dark .home .summary .content a:hover{color:#fff}.dark .home .summary .content b,.dark .home .summary .content strong{color:#5d5d5f}.home .summary .post-footer{margin-top:.4rem;display:flex;justify-content:space-between;align-items:center;font-size:.875rem}.home .summary .post-footer a{color:#2d96bd}.dark .home .summary .post-footer a{color:#55bde2}.home .summary .post-footer a:active,.home .summary .post-footer a:hover{color:#ef3982}.dark .home .summary .post-footer a:active,.dark .home .summary .post-footer a:hover{color:#bdebfc}.home .summary .post-footer .post-tags{padding:0}.home .summary .post-footer .post-tags a{color:#161209}.dark .home .summary .post-footer .post-tags a{color:#a9a9b3}.home .summary .post-footer .post-tags a:active,.home .summary .post-footer .post-tags a:hover{color:#2d96bd}.dark .home .summary .post-footer .post-tags a:active,.dark .home .summary .post-footer .post-tags a:hover{color:#fff}#content-404{font-size:1.8rem;line-height:3rem;-webkit-transform:translateY(30vh);-moz-transform:translateY(30vh);-ms-transform:translateY(30vh);-o-transform:translateY(30vh);transform:translateY(30vh);text-align:center}header{width:100%;z-index:150;background-color:#f8f8f8}.dark header{background-color:#252627}.header-wrapper{display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;width:100%}.header-title{font-family:"Nunito",system,-apple-system,BlinkMacSystemFont,"PingFang SC","Segoe UI","Microsoft YaHei","wenquanyi micro hei","Hiragino Sans GB","Hiragino Sans GB W3","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:bold;margin-right:.5rem;min-width:10%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-flex:10;flex:10}.menu .menu-item{position:relative}.language-select{position:absolute;opacity:0;left:0;top:0;width:100%;height:100%}.language-select:hover{cursor:pointer}.search{position:relative}.search input{color:transparent;box-sizing:border-box;height:2.5rem;width:2.5rem;-webkit-border-radius:.5rem;-moz-border-radius:.5rem;border-radius:.5rem;border:none;outline:none;background-color:#f8f8f8;vertical-align:baseline !important;-webkit-transition:width 0.3s ease 0s;-moz-transition:width 0.3s ease 0s;-o-transition:width 0.3s ease 0s;transition:width 0.3s ease 0s}.dark .search input{background-color:#252627}.search input::-webkit-input-placeholder{color:rgba(0,0,0,0)}.search input:-moz-placeholder{color:rgba(0,0,0,0)}.search input::-moz-placeholder{color:rgba(0,0,0,0)}.search input:-ms-input-placeholder{color:rgba(0,0,0,0)}.search input::placeholder{color:rgba(0,0,0,0)}.search .search-button{margin:0;position:absolute;left:auto;right:1rem}.search .search-toggle{left:.5rem;right:auto}.search .search-loading{display:none}.search .search-clear{display:none}.open .search input,.search.mobile input{color:#161209;background-color:#e9e9e9;padding:0 2rem 0 2rem}.dark .open .search input,.dark .search.mobile input{color:#a9a9b3;background-color:#363636}.dark .open .search input::-webkit-input-placeholder,.dark .search.mobile input::-webkit-input-placeholder{color:#5d5d5f}.dark .open .search input:-moz-placeholder,.dark .search.mobile input:-moz-placeholder{color:#5d5d5f}.dark .open .search input::-moz-placeholder,.dark .search.mobile input::-moz-placeholder{color:#5d5d5f}.dark .open .search input:-ms-input-placeholder,.dark .search.mobile input:-ms-input-placeholder{color:#5d5d5f}.dark .open .search input::placeholder,.dark .search.mobile input::placeholder{color:#5d5d5f}.open .search input::-webkit-input-placeholder,.search.mobile input::-webkit-input-placeholder{color:#a9a9b3}.open .search input:-moz-placeholder,.search.mobile input:-moz-placeholder{color:#a9a9b3}.open .search input::-moz-placeholder,.search.mobile input::-moz-placeholder{color:#a9a9b3}.open .search input:-ms-input-placeholder,.search.mobile input:-ms-input-placeholder{color:#a9a9b3}.open .search input::placeholder,.search.mobile input::placeholder{color:#a9a9b3}.open .search .search-button,.search.mobile .search-button{color:#a9a9b3}.dark .open .search .search-button,.dark .search.mobile .search-button{color:#5d5d5f}.open .search .search-clear:hover,.search.mobile .search-clear:hover{color:#ff6b6b}.open .search .search-toggle:hover,.search.mobile .search-toggle:hover{cursor:default}.theme-switch i{-webkit-transform:rotate(225deg);-moz-transform:rotate(225deg);-ms-transform:rotate(225deg);-o-transform:rotate(225deg);transform:rotate(225deg)}#header-desktop{display:block;position:fixed;height:3.5rem;line-height:3.5rem}#header-desktop .header-wrapper{padding:0 1.5rem}#header-desktop .header-wrapper .header-title{font-size:1.5rem}#header-desktop .header-wrapper .menu{overflow:hidden;white-space:nowrap}#header-desktop .header-wrapper .menu .menu-inner{float:right}#header-desktop .header-wrapper .menu .menu-item{margin:0 .5rem}#header-desktop .header-wrapper .menu .menu-item.delimiter{border-left:1.5px solid #161209}.dark #header-desktop .header-wrapper .menu .menu-item.delimiter{border-left-color:#4a4b50}#header-desktop .header-wrapper .menu .menu-item.language{margin-right:0}#header-desktop .header-wrapper .menu .menu-item.search{margin:0 -.5rem 0 0}#header-desktop .header-wrapper .menu a.active{font-weight:900;color:#161209}.dark #header-desktop .header-wrapper .menu a.active{color:#fff}#header-desktop.open .header-wrapper .menu .menu-item.search{margin:0 .25rem 0 .5rem}#header-desktop.open .header-wrapper .menu .menu-item.search input{width:24rem}#header-mobile{display:none;position:fixed;height:3.5rem;line-height:3.5rem}#header-mobile .header-container{padding:0;margin:0}#header-mobile .header-container .header-wrapper{padding:0 1rem;font-size:1.125rem;-webkit-transition:margin-top 0.3s ease 0s;-moz-transition:margin-top 0.3s ease 0s;-o-transition:margin-top 0.3s ease 0s;transition:margin-top 0.3s ease 0s}#header-mobile .header-container .header-wrapper .header-title{font-size:1.5rem;max-width:80%}#header-mobile .header-container .header-wrapper .menu-toggle{line-height:4rem;cursor:pointer;-webkit-transition:width 0.3s ease 0s;-moz-transition:width 0.3s ease 0s;-o-transition:width 0.3s ease 0s;transition:width 0.3s ease 0s}#header-mobile .header-container .header-wrapper .menu-toggle span{display:block;background:#161209;width:1.5rem;height:2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-transition:all 0.3s ease-in-out;-moz-transition:all 0.3s ease-in-out;-o-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}.dark #header-mobile .header-container .header-wrapper .menu-toggle span{background:#a9a9b3}#header-mobile .header-container .header-wrapper .menu-toggle span:nth-child(1){margin-bottom:.5rem}#header-mobile .header-container .header-wrapper .menu-toggle span:nth-child(3){margin-top:.5rem}#header-mobile .header-container .header-wrapper .menu-toggle.active span:nth-child(1){-webkit-transform:rotate(45deg) translate(0.4rem, 0.5rem);-moz-transform:rotate(45deg) translate(0.4rem, 0.5rem);-ms-transform:rotate(45deg) translate(0.4rem, 0.5rem);-o-transform:rotate(45deg) translate(0.4rem, 0.5rem);transform:rotate(45deg) translate(0.4rem, 0.5rem)}#header-mobile .header-container .header-wrapper .menu-toggle.active span:nth-child(2){opacity:0}#header-mobile .header-container .header-wrapper .menu-toggle.active span:nth-child(3){-webkit-transform:rotate(-45deg) translate(0.4rem, -0.5rem);-moz-transform:rotate(-45deg) translate(0.4rem, -0.5rem);-ms-transform:rotate(-45deg) translate(0.4rem, -0.5rem);-o-transform:rotate(-45deg) translate(0.4rem, -0.5rem);transform:rotate(-45deg) translate(0.4rem, -0.5rem)}#header-mobile .header-container .menu{text-align:center;background:#f8f8f8;border-top:2px solid #cacaca;display:none;padding-top:.5rem;-webkit-box-shadow:0 0.125rem 0.25rem rgba(0,0,0,0.1);box-shadow:0 0.125rem 0.25rem rgba(0,0,0,0.1)}#header-mobile .header-container .menu .search-wrapper{display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;padding:.5rem 1rem;line-height:2.5rem}#header-mobile .header-container .menu .search{flex-grow:10}#header-mobile .header-container .menu .search .algolia-autocomplete,#header-mobile .header-container .menu .search input{width:100%}#header-mobile .header-container .menu .search-cancel{display:none;margin-left:.75rem}#header-mobile .header-container .menu .menu-item{display:block;line-height:2.5rem}#header-mobile .header-container .menu.active{display:block}.dark #header-mobile .header-container .menu{background:#252627;border-top-color:#4a4b50}#header-mobile.open .header-wrapper{margin-top:-3.5rem}#header-mobile.open .menu{padding-top:0;border-top:none}#header-mobile.open .menu .menu-item{display:none}#header-mobile.open .menu .search-cancel{display:inline}.search-dropdown{position:fixed;z-index:200;top:3.5rem;-webkit-box-shadow:0 0.125rem 0.25rem rgba(0,0,0,0.1);box-shadow:0 0.125rem 0.25rem rgba(0,0,0,0.1)}.search-dropdown.desktop{right:1.5rem;width:30rem}.search-dropdown.mobile{right:0;width:100%}.search-dropdown .dropdown-menu{right:0 !important;background-color:#fff}.dark .search-dropdown .dropdown-menu{background-color:#292a2d}.search-dropdown .dropdown-menu .suggestions{overflow-y:auto;max-height:calc(100vh - 3.5rem)}.search-dropdown .dropdown-menu .suggestions .suggestion{padding:.75rem 1rem}.search-dropdown .dropdown-menu .suggestions .suggestion .suggestion-title{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:1rem;font-weight:bold;max-width:75%}.search-dropdown .dropdown-menu .suggestions .suggestion .suggestion-date{font-size:.875rem;float:right;text-align:right;color:#a9a9b3}.dark .search-dropdown .dropdown-menu .suggestions .suggestion .suggestion-date{color:#5d5d5f}.search-dropdown .dropdown-menu .suggestions .suggestion .suggestion-context{line-height:1.25rem;display:-moz-box;display:-webkit-box;display:box;-moz-box-orient:vertical;-webkit-box-orient:vertical;box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word;color:#a9a9b3}.dark .search-dropdown .dropdown-menu .suggestions .suggestion .suggestion-context{color:#5d5d5f}.search-dropdown .dropdown-menu .suggestions .suggestion em{font-style:normal;background-color:rgba(53,166,247,0.25)}.dark .search-dropdown .dropdown-menu .suggestions .suggestion em{background-color:rgba(50,112,194,0.4)}.search-dropdown .dropdown-menu .suggestions .suggestion.cursor{background:#e8e8e8}.dark .search-dropdown .dropdown-menu .suggestions .suggestion.cursor{background:#323843}.search-dropdown .dropdown-menu .suggestions .suggestion:hover{cursor:pointer}.search-dropdown .dropdown-menu .search-empty{padding:1rem;text-align:center}.search-dropdown .dropdown-menu .search-empty .search-query{font-weight:bold}.dark .search-dropdown .dropdown-menu .search-empty .search-query{color:#ddd}.search-dropdown .dropdown-menu .search-footer{padding:.5rem 1rem;float:right;font-size:.8rem;color:#a9a9b3}.search-dropdown .dropdown-menu .search-footer .dark{color:#5d5d5f}.search-dropdown .dropdown-menu .search-footer a{color:#2d96bd}.dark .search-dropdown .dropdown-menu .search-footer a{color:#55bde2}.search-dropdown .dropdown-menu .search-footer a:active,.search-dropdown .dropdown-menu .search-footer a:hover{color:#ef3982}.dark .search-dropdown .dropdown-menu .search-footer a:active,.dark .search-dropdown .dropdown-menu .search-footer a:hover{color:#bdebfc}.search-dropdown .dropdown-menu .search-footer a{font-size:1rem}footer{height:2rem;width:100%;text-align:center;line-height:1.5rem;padding-top:2rem}footer .copyright{font-size:.875rem}footer .copyright .copyright-line{width:100%}footer .copyright .copyright-line .icp-br{display:none}.blur footer{-webkit-filter:blur(1.5px);-moz-filter:blur(1.5px);-ms-filter:blur(1.5px);filter:blur(1.5px)}.pagination{display:flex;flex-direction:row;justify-content:center;list-style:none;white-space:nowrap;width:100%;padding:1rem 0 0}.pagination a{font-size:.8rem;color:#bfbfbf;letter-spacing:.1rem;font-weight:700;padding:5px 5px;text-decoration:none;-webkit-transition:0.3s;-moz-transition:0.3s;-o-transition:0.3s;transition:0.3s}.pagination li{padding-bottom:3px;margin:0 20px;box-sizing:border-box;position:relative;display:inline}.pagination li.disabled{display:none}.pagination li:hover a{color:#000}.dark .pagination li:hover a{color:#fff}.pagination li:before,.pagination li:after{position:absolute;content:"";width:0;height:3px;background:#000;-webkit-transition:0.3s;-moz-transition:0.3s;-o-transition:0.3s;transition:0.3s;bottom:0px}.dark .pagination li:before,.dark .pagination li:after{background:#fff}.pagination li:before .active,.pagination li:after .active{width:100%}.pagination li:before{left:50%}.pagination li:after{right:50%}.pagination li:hover:before,.pagination li:hover:after{width:50%}.pagination li.active a{color:#000}.dark .pagination li.active a{color:#fff}.pagination li.active:before,.pagination li.active:after{width:60%}@media only screen and (max-width: 1440px){.page{max-width:56%}}@media only screen and (max-width: 1200px){.page{max-width:52%}}@media only screen and (max-width: 960px){#toc-auto{display:none}#toc-static{display:block}.page{max-width:80%}}@media only screen and (max-width: 680px){#header-desktop{display:none}#header-mobile{display:block}body.blur{overflow:hidden}.page{max-width:100%;padding-top:3.5rem}.page .categories-card .card-item{width:100%}.copyright .copyright-line .icp-splitter{display:none}.copyright .copyright-line .icp-br{display:block}} + +/*# sourceMappingURL=style.min.css.map */ \ No newline at end of file diff --git a/resources/_gen/assets/scss/css/style.template.scss_90197bdac482216ecaaaae0fb88517c1.json b/resources/_gen/assets/scss/css/style.template.scss_b8ba9a60a151126bfcde1421dc0b972d.json similarity index 100% rename from resources/_gen/assets/scss/css/style.template.scss_90197bdac482216ecaaaae0fb88517c1.json rename to resources/_gen/assets/scss/css/style.template.scss_b8ba9a60a151126bfcde1421dc0b972d.json diff --git a/resources/_gen/assets/scss/lib/aplayer/dark.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.content b/resources/_gen/assets/scss/lib/aplayer/dark.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.content deleted file mode 100644 index e5e02168..00000000 --- a/resources/_gen/assets/scss/lib/aplayer/dark.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.content +++ /dev/null @@ -1,3 +0,0 @@ -.dark-theme .aplayer{background:#212121}.dark-theme .aplayer.aplayer-withlist .aplayer-info{border-bottom-color:#5c5c5c}.dark-theme .aplayer.aplayer-fixed .aplayer-list{border-color:#5c5c5c}.dark-theme .aplayer .aplayer-body{background-color:#212121}.dark-theme .aplayer .aplayer-info{border-top-color:#212121}.dark-theme .aplayer .aplayer-info .aplayer-music .aplayer-title{color:#fff}.dark-theme .aplayer .aplayer-info .aplayer-music .aplayer-author{color:#fff}.dark-theme .aplayer .aplayer-info .aplayer-controller .aplayer-time{color:#eee}.dark-theme .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon path{fill:#eee}.dark-theme .aplayer .aplayer-list{background-color:#212121}.dark-theme .aplayer .aplayer-list::-webkit-scrollbar-thumb{background-color:#999}.dark-theme .aplayer .aplayer-list::-webkit-scrollbar-thumb:hover{background-color:#bbb}.dark-theme .aplayer .aplayer-list li{color:#fff;border-top-color:#666}.dark-theme .aplayer .aplayer-list li:hover{background:#4e4e4e}.dark-theme .aplayer .aplayer-list li.aplayer-list-light{background:#6c6c6c}.dark-theme .aplayer .aplayer-list li .aplayer-list-index{color:#ddd}.dark-theme .aplayer .aplayer-list li .aplayer-list-author{color:#ddd}.dark-theme .aplayer .aplayer-lrc{text-shadow:-1px -1px 0 #666}.dark-theme .aplayer .aplayer-lrc:before{background:-moz-linear-gradient(top, #212121 0%, rgba(33,33,33,0) 100%);background:-webkit-linear-gradient(top, #212121 0%, rgba(33,33,33,0) 100%);background:linear-gradient(to bottom, #212121 0%, rgba(33,33,33,0) 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#212121', endColorstr='#00212121',GradientType=0 )}.dark-theme .aplayer .aplayer-lrc:after{background:-moz-linear-gradient(top, rgba(33,33,33,0) 0%, rgba(33,33,33,0.8) 100%);background:-webkit-linear-gradient(top, rgba(33,33,33,0) 0%, rgba(33,33,33,0.8) 100%);background:linear-gradient(to bottom, rgba(33,33,33,0) 0%, rgba(33,33,33,0.8) 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#00212121', endColorstr='#cc212121',GradientType=0 )}.dark-theme .aplayer .aplayer-lrc p{color:#fff}.dark-theme .aplayer .aplayer-miniswitcher{background:#484848}.dark-theme .aplayer .aplayer-miniswitcher .aplayer-icon path{fill:#eee} - -/*# sourceMappingURL=dark.css.map */ \ No newline at end of file diff --git a/resources/_gen/assets/scss/lib/aplayer/dark.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.json b/resources/_gen/assets/scss/lib/aplayer/dark.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.json deleted file mode 100644 index 0f0de786..00000000 --- a/resources/_gen/assets/scss/lib/aplayer/dark.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.json +++ /dev/null @@ -1 +0,0 @@ -{"Target":"lib/aplayer/dark.css","MediaType":"text/css","Data":{}} \ No newline at end of file diff --git a/resources/_gen/assets/scss/lib/aplayer/dark.scss_be0d6bec1a51ff037db8cc74d6ec1271.content b/resources/_gen/assets/scss/lib/aplayer/dark.scss_be0d6bec1a51ff037db8cc74d6ec1271.content new file mode 100644 index 00000000..a8ee0036 --- /dev/null +++ b/resources/_gen/assets/scss/lib/aplayer/dark.scss_be0d6bec1a51ff037db8cc74d6ec1271.content @@ -0,0 +1,3 @@ +.dark .aplayer{background:#212121}.dark .aplayer.aplayer-withlist .aplayer-info{border-bottom-color:#5c5c5c}.dark .aplayer.aplayer-fixed .aplayer-list{border-color:#5c5c5c}.dark .aplayer .aplayer-body{background-color:#212121}.dark .aplayer .aplayer-info{border-top-color:#212121}.dark .aplayer .aplayer-info .aplayer-music .aplayer-title{color:#fff}.dark .aplayer .aplayer-info .aplayer-music .aplayer-author{color:#fff}.dark .aplayer .aplayer-info .aplayer-controller .aplayer-time{color:#eee}.dark .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon path{fill:#eee}.dark .aplayer .aplayer-list{background-color:#212121}.dark .aplayer .aplayer-list::-webkit-scrollbar-thumb{background-color:#999}.dark .aplayer .aplayer-list::-webkit-scrollbar-thumb:hover{background-color:#bbb}.dark .aplayer .aplayer-list li{color:#fff;border-top-color:#666}.dark .aplayer .aplayer-list li:hover{background:#4e4e4e}.dark .aplayer .aplayer-list li.aplayer-list-light{background:#6c6c6c}.dark .aplayer .aplayer-list li .aplayer-list-index{color:#ddd}.dark .aplayer .aplayer-list li .aplayer-list-author{color:#ddd}.dark .aplayer .aplayer-lrc{text-shadow:-1px -1px 0 #666}.dark .aplayer .aplayer-lrc:before{background:-moz-linear-gradient(top, #212121 0%, rgba(33,33,33,0) 100%);background:-webkit-linear-gradient(top, #212121 0%, rgba(33,33,33,0) 100%);background:linear-gradient(to bottom, #212121 0%, rgba(33,33,33,0) 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#212121', endColorstr='#00212121',GradientType=0 )}.dark .aplayer .aplayer-lrc:after{background:-moz-linear-gradient(top, rgba(33,33,33,0) 0%, rgba(33,33,33,0.8) 100%);background:-webkit-linear-gradient(top, rgba(33,33,33,0) 0%, rgba(33,33,33,0.8) 100%);background:linear-gradient(to bottom, rgba(33,33,33,0) 0%, rgba(33,33,33,0.8) 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#00212121', endColorstr='#cc212121',GradientType=0 )}.dark .aplayer .aplayer-lrc p{color:#fff}.dark .aplayer .aplayer-miniswitcher{background:#484848}.dark .aplayer .aplayer-miniswitcher .aplayer-icon path{fill:#eee} + +/*# sourceMappingURL=dark.min.css.map */ \ No newline at end of file diff --git a/resources/_gen/assets/scss/lib/aplayer/dark.scss_be0d6bec1a51ff037db8cc74d6ec1271.json b/resources/_gen/assets/scss/lib/aplayer/dark.scss_be0d6bec1a51ff037db8cc74d6ec1271.json new file mode 100644 index 00000000..d2c9d760 --- /dev/null +++ b/resources/_gen/assets/scss/lib/aplayer/dark.scss_be0d6bec1a51ff037db8cc74d6ec1271.json @@ -0,0 +1 @@ +{"Target":"lib/aplayer/dark.min.css","MediaType":"text/css","Data":{}} \ No newline at end of file diff --git a/resources/_gen/assets/scss/lib/mermaid/mermaid.scss_43d09a0fb297c4cc88d4122515a2e889.content b/resources/_gen/assets/scss/lib/mermaid/mermaid.scss_43d09a0fb297c4cc88d4122515a2e889.content new file mode 100644 index 00000000..578151f5 --- /dev/null +++ b/resources/_gen/assets/scss/lib/mermaid/mermaid.scss_43d09a0fb297c4cc88d4122515a2e889.content @@ -0,0 +1,3 @@ +.page .mermaid{width:100%;margin:3% auto;text-align:center}.page .mermaid>svg{max-width:100%}.page .mermaid .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);color:#333}.page .mermaid .label text{fill:#333}.page .mermaid .node rect,.page .mermaid .node circle,.page .mermaid .node ellipse,.page .mermaid .node polygon,.page .mermaid .node path{fill:#eee;stroke:#999;stroke-width:1px}.page .mermaid .node .label{text-align:center}.page .mermaid .node.clickable{cursor:pointer}.page .mermaid .arrowheadPath{fill:#333}.page .mermaid .edgePath .path{stroke:#666;stroke-width:1.5px}.page .mermaid .edgeLabel{background-color:#fff;text-align:center}.page .mermaid .cluster rect{fill:#eaf2fb;stroke:#26a;stroke-width:1px}.page .mermaid .cluster text{fill:#333}.page .mermaid div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#eaf2fb;border:1px solid #26a;border-radius:2px;pointer-events:none;z-index:100}.page .mermaid .actor{stroke:#999;fill:#eee}.page .mermaid text.actor{fill:#333;stroke:none}.page .mermaid .actor-line{stroke:#666}.page .mermaid .messageLine0{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#333}.page .mermaid .messageLine1{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#333}.page .mermaid #arrowhead{fill:#333}.page .mermaid .sequenceNumber{fill:#fff}.page .mermaid #sequencenumber{fill:#333}.page .mermaid #crosshead path{fill:#333 !important;stroke:#333 !important}.page .mermaid .messageText{fill:#333;stroke:none}.page .mermaid .labelBox{stroke:#999;fill:#eee}.page .mermaid .labelText{fill:#333;stroke:none}.page .mermaid .loopText{fill:#333;stroke:none}.page .mermaid .loopLine{stroke-width:2;stroke-dasharray:'2 2';stroke:#999}.page .mermaid .note{stroke:#770;fill:#ffa}.page .mermaid .noteText{fill:black;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:14px}.page .mermaid .activation0{fill:#f4f4f4;stroke:#666}.page .mermaid .activation1{fill:#f4f4f4;stroke:#666}.page .mermaid .activation2{fill:#f4f4f4;stroke:#666}.page .mermaid .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .section{stroke:none;opacity:0.2}.page .mermaid .section0{fill:#80b3e6}.page .mermaid .section2{fill:#80b3e6}.page .mermaid .section1,.page .mermaid .section3{fill:#fff;opacity:0.2}.page .mermaid .sectionTitle0{fill:#333}.page .mermaid .sectionTitle1{fill:#333}.page .mermaid .sectionTitle2{fill:#333}.page .mermaid .sectionTitle3{fill:#333}.page .mermaid .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .grid .tick{stroke:#e6e6e6;opacity:0.8;shape-rendering:crispEdges}.page .mermaid .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333}.page .mermaid .grid path{stroke-width:0}.page .mermaid .today{fill:none;stroke:#d42;stroke-width:2px}.page .mermaid .task{stroke-width:2}.page .mermaid .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .taskText:not([font-size]){font-size:11px}.page .mermaid .taskTextOutsideRight{fill:#333;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .taskTextOutsideLeft{fill:#333;text-anchor:end;font-size:11px}.page .mermaid .task.clickable{cursor:pointer}.page .mermaid .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.page .mermaid .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.page .mermaid .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.page .mermaid .taskText0,.page .mermaid .taskText1,.page .mermaid .taskText2,.page .mermaid .taskText3{fill:#fff}.page .mermaid .task0,.page .mermaid .task1,.page .mermaid .task2,.page .mermaid .task3{fill:#26a;stroke:#1a4d80}.page .mermaid .taskTextOutside0,.page .mermaid .taskTextOutside2{fill:#333 !important}.page .mermaid .taskTextOutside1,.page .mermaid .taskTextOutside3{fill:#333 !important}.page .mermaid .active0,.page .mermaid .active1,.page .mermaid .active2,.page .mermaid .active3{fill:#eee;stroke:#1a4d80}.page .mermaid .activeText0,.page .mermaid .activeText1,.page .mermaid .activeText2,.page .mermaid .activeText3{fill:#333}.page .mermaid .done0,.page .mermaid .done1,.page .mermaid .done2,.page .mermaid .done3{stroke:#666;fill:#bbb;stroke-width:2}.page .mermaid .doneText0,.page .mermaid .doneText1,.page .mermaid .doneText2,.page .mermaid .doneText3{fill:#333}.page .mermaid .crit0,.page .mermaid .crit1,.page .mermaid .crit2,.page .mermaid .crit3{stroke:#b1361b;fill:#d42;stroke-width:2}.page .mermaid .activeCrit0,.page .mermaid .activeCrit1,.page .mermaid .activeCrit2,.page .mermaid .activeCrit3{stroke:#b1361b;fill:#eee;stroke-width:2}.page .mermaid .doneCrit0,.page .mermaid .doneCrit1,.page .mermaid .doneCrit2,.page .mermaid .doneCrit3{stroke:#b1361b;fill:#bbb;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}.page .mermaid .milestone{transform:rotate(45deg) scale(0.8, 0.8)}.page .mermaid .milestoneText{font-style:italic}.page .mermaid .doneCritText0,.page .mermaid .doneCritText1,.page .mermaid .doneCritText2,.page .mermaid .doneCritText3{fill:#333}.page .mermaid .activeCritText0,.page .mermaid .activeCritText1,.page .mermaid .activeCritText2,.page .mermaid .activeCritText3{fill:#333}.page .mermaid .titleText{text-anchor:middle;font-size:18px;fill:#333;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid g.classGroup text{fill:#999;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}.page .mermaid g.classGroup text .title{font-weight:bolder}.page .mermaid g.clickable{cursor:pointer}.page .mermaid g.classGroup rect{fill:#eee;stroke:#999}.page .mermaid g.classGroup line{stroke:#999;stroke-width:1}.page .mermaid .classLabel .box{stroke:none;stroke-width:0;fill:#eee;opacity:0.5}.page .mermaid .classLabel .label{fill:#999;font-size:10px}.page .mermaid .relation{stroke:#999;stroke-width:1;fill:none}.page .mermaid .dashed-line{stroke-dasharray:3}.page .mermaid #compositionStart{fill:#999;stroke:#999;stroke-width:1}.page .mermaid #compositionEnd{fill:#999;stroke:#999;stroke-width:1}.page .mermaid #aggregationStart{fill:#eee;stroke:#999;stroke-width:1}.page .mermaid #aggregationEnd{fill:#eee;stroke:#999;stroke-width:1}.page .mermaid #dependencyStart{fill:#999;stroke:#999;stroke-width:1}.page .mermaid #dependencyEnd{fill:#999;stroke:#999;stroke-width:1}.page .mermaid #extensionStart{fill:#999;stroke:#999;stroke-width:1}.page .mermaid #extensionEnd{fill:#999;stroke:#999;stroke-width:1}.page .mermaid .commit-id,.page .mermaid .commit-msg,.page .mermaid .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .pieTitleText{text-anchor:middle;font-size:25px;fill:#333;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid g.stateGroup text{fill:#999;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid g.stateGroup text{fill:#999;stroke:none;font-size:10px}.page .mermaid g.stateGroup .state-title{font-weight:bolder;fill:#000}.page .mermaid g.stateGroup rect{fill:#eee;stroke:#999}.page .mermaid g.stateGroup line{stroke:#999;stroke-width:1}.page .mermaid .transition{stroke:#999;stroke-width:1;fill:none}.page .mermaid .stateGroup .composit{fill:white;border-bottom:1px}.page .mermaid .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}.page .mermaid .state-note{stroke:#770;fill:#ffa}.page .mermaid .state-note text{fill:black;stroke:none;font-size:10px}.page .mermaid .stateLabel .box{stroke:none;stroke-width:0;fill:#eee;opacity:0.5}.page .mermaid .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid :root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}.dark .page .mermaid .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);color:#333}.dark .page .mermaid .label text{fill:#333}.dark .page .mermaid .node rect,.dark .page .mermaid .node circle,.dark .page .mermaid .node ellipse,.dark .page .mermaid .node polygon,.dark .page .mermaid .node path{fill:#BDD5EA;stroke:purple;stroke-width:1px}.dark .page .mermaid .node .label{text-align:center}.dark .page .mermaid .node.clickable{cursor:pointer}.dark .page .mermaid .arrowheadPath{fill:#d3d3d3}.dark .page .mermaid .edgePath .path{stroke:#d3d3d3;stroke-width:1.5px}.dark .page .mermaid .edgeLabel{background-color:#e8e8e8;text-align:center}.dark .page .mermaid .cluster rect{fill:#6D6D65;stroke:rgba(255,255,255,0.25);stroke-width:1px}.dark .page .mermaid .cluster text{fill:#F9FFFE}.dark .page .mermaid div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#6D6D65;border:1px solid rgba(255,255,255,0.25);border-radius:2px;pointer-events:none;z-index:100}.dark .page .mermaid .actor{stroke:#81B1DB;fill:#BDD5EA}.dark .page .mermaid text.actor{fill:#000;stroke:none}.dark .page .mermaid .actor-line{stroke:#d3d3d3}.dark .page .mermaid .messageLine0{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#d3d3d3}.dark .page .mermaid .messageLine1{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#d3d3d3}.dark .page .mermaid #arrowhead{fill:#d3d3d3}.dark .page .mermaid .sequenceNumber{fill:#fff}.dark .page .mermaid #sequencenumber{fill:#d3d3d3}.dark .page .mermaid #crosshead path{fill:#d3d3d3 !important;stroke:#d3d3d3 !important}.dark .page .mermaid .messageText{fill:#d3d3d3;stroke:none}.dark .page .mermaid .labelBox{stroke:#81B1DB;fill:#BDD5EA}.dark .page .mermaid .labelText{fill:#323D47;stroke:none}.dark .page .mermaid .loopText{fill:#d3d3d3;stroke:none}.dark .page .mermaid .loopLine{stroke-width:2;stroke-dasharray:'2 2';stroke:#81B1DB}.dark .page .mermaid .note{stroke:rgba(255,255,255,0.25);fill:#fff5ad}.dark .page .mermaid .noteText{fill:black;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:14px}.dark .page .mermaid .activation0{fill:#f4f4f4;stroke:#666}.dark .page .mermaid .activation1{fill:#f4f4f4;stroke:#666}.dark .page .mermaid .activation2{fill:#f4f4f4;stroke:#666}.dark .page .mermaid .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}.dark .page .mermaid .section{stroke:none;opacity:0.2}.dark .page .mermaid .section0{fill:rgba(255,255,255,0.3)}.dark .page .mermaid .section2{fill:#EAE8B9}.dark .page .mermaid .section1,.dark .page .mermaid .section3{fill:#fff;opacity:0.2}.dark .page .mermaid .sectionTitle0{fill:#F9FFFE}.dark .page .mermaid .sectionTitle1{fill:#F9FFFE}.dark .page .mermaid .sectionTitle2{fill:#F9FFFE}.dark .page .mermaid .sectionTitle3{fill:#F9FFFE}.dark .page .mermaid .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.dark .page .mermaid .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}.dark .page .mermaid .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#d3d3d3}.dark .page .mermaid .grid path{stroke-width:0}.dark .page .mermaid .today{fill:none;stroke:#DB5757;stroke-width:2px}.dark .page .mermaid .task{stroke-width:2}.dark .page .mermaid .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.dark .page .mermaid .taskText:not([font-size]){font-size:11px}.dark .page .mermaid .taskTextOutsideRight{fill:#323D47;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.dark .page .mermaid .taskTextOutsideLeft{fill:#323D47;text-anchor:end;font-size:11px}.dark .page .mermaid .task.clickable{cursor:pointer}.dark .page .mermaid .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.dark .page .mermaid .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.dark .page .mermaid .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.dark .page .mermaid .taskText0,.dark .page .mermaid .taskText1,.dark .page .mermaid .taskText2,.dark .page .mermaid .taskText3{fill:#323D47}.dark .page .mermaid .task0,.dark .page .mermaid .task1,.dark .page .mermaid .task2,.dark .page .mermaid .task3{fill:#BDD5EA;stroke:rgba(255,255,255,0.5)}.dark .page .mermaid .taskTextOutside0,.dark .page .mermaid .taskTextOutside2{fill:#d3d3d3 !important}.dark .page .mermaid .taskTextOutside1,.dark .page .mermaid .taskTextOutside3{fill:#d3d3d3 !important}.dark .page .mermaid .active0,.dark .page .mermaid .active1,.dark .page .mermaid .active2,.dark .page .mermaid .active3{fill:#81B1DB;stroke:rgba(255,255,255,0.5)}.dark .page .mermaid .activeText0,.dark .page .mermaid .activeText1,.dark .page .mermaid .activeText2,.dark .page .mermaid .activeText3{fill:#323D47}.dark .page .mermaid .done0,.dark .page .mermaid .done1,.dark .page .mermaid .done2,.dark .page .mermaid .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}.dark .page .mermaid .doneText0,.dark .page .mermaid .doneText1,.dark .page .mermaid .doneText2,.dark .page .mermaid .doneText3{fill:#323D47}.dark .page .mermaid .crit0,.dark .page .mermaid .crit1,.dark .page .mermaid .crit2,.dark .page .mermaid .crit3{stroke:#E83737;fill:#E83737;stroke-width:2}.dark .page .mermaid .activeCrit0,.dark .page .mermaid .activeCrit1,.dark .page .mermaid .activeCrit2,.dark .page .mermaid .activeCrit3{stroke:#E83737;fill:#81B1DB;stroke-width:2}.dark .page .mermaid .doneCrit0,.dark .page .mermaid .doneCrit1,.dark .page .mermaid .doneCrit2,.dark .page .mermaid .doneCrit3{stroke:#E83737;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}.dark .page .mermaid .milestone{transform:rotate(45deg) scale(0.8, 0.8)}.dark .page .mermaid .milestoneText{font-style:italic}.dark .page .mermaid .doneCritText0,.dark .page .mermaid .doneCritText1,.dark .page .mermaid .doneCritText2,.dark .page .mermaid .doneCritText3{fill:#323D47}.dark .page .mermaid .activeCritText0,.dark .page .mermaid .activeCritText1,.dark .page .mermaid .activeCritText2,.dark .page .mermaid .activeCritText3{fill:#323D47}.dark .page .mermaid .titleText{text-anchor:middle;font-size:18px;fill:#d3d3d3;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.dark .page .mermaid g.classGroup text{fill:purple;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}.dark .page .mermaid g.classGroup text .title{font-weight:bolder}.dark .page .mermaid g.clickable{cursor:pointer}.dark .page .mermaid g.classGroup rect{fill:#BDD5EA;stroke:purple}.dark .page .mermaid g.classGroup line{stroke:purple;stroke-width:1}.dark .page .mermaid .classLabel .box{stroke:none;stroke-width:0;fill:#BDD5EA;opacity:0.5}.dark .page .mermaid .classLabel .label{fill:purple;font-size:10px}.dark .page .mermaid .relation{stroke:purple;stroke-width:1;fill:none}.dark .page .mermaid .dashed-line{stroke-dasharray:3}.dark .page .mermaid #compositionStart{fill:purple;stroke:purple;stroke-width:1}.dark .page .mermaid #compositionEnd{fill:purple;stroke:purple;stroke-width:1}.dark .page .mermaid #aggregationStart{fill:#BDD5EA;stroke:purple;stroke-width:1}.dark .page .mermaid #aggregationEnd{fill:#BDD5EA;stroke:purple;stroke-width:1}.dark .page .mermaid #dependencyStart{fill:purple;stroke:purple;stroke-width:1}.dark .page .mermaid #dependencyEnd{fill:purple;stroke:purple;stroke-width:1}.dark .page .mermaid #extensionStart{fill:purple;stroke:purple;stroke-width:1}.dark .page .mermaid #extensionEnd{fill:purple;stroke:purple;stroke-width:1}.dark .page .mermaid .commit-id,.dark .page .mermaid .commit-msg,.dark .page .mermaid .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.dark .page .mermaid .pieTitleText{text-anchor:middle;font-size:25px;fill:#323D47;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.dark .page .mermaid .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.dark .page .mermaid g.stateGroup text{fill:purple;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.dark .page .mermaid g.stateGroup text{fill:purple;stroke:none;font-size:10px}.dark .page .mermaid g.stateGroup .state-title{font-weight:bolder;fill:#000}.dark .page .mermaid g.stateGroup rect{fill:#BDD5EA;stroke:purple}.dark .page .mermaid g.stateGroup line{stroke:purple;stroke-width:1}.dark .page .mermaid .transition{stroke:purple;stroke-width:1;fill:none}.dark .page .mermaid .stateGroup .composit{fill:white;border-bottom:1px}.dark .page .mermaid .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}.dark .page .mermaid .state-note{stroke:rgba(255,255,255,0.25);fill:#fff5ad}.dark .page .mermaid .state-note text{fill:black;stroke:none;font-size:10px}.dark .page .mermaid .stateLabel .box{stroke:none;stroke-width:0;fill:#BDD5EA;opacity:0.5}.dark .page .mermaid .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.dark .page .mermaid :root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive} + +/*# sourceMappingURL=mermaid.min.css.map */ \ No newline at end of file diff --git a/resources/_gen/assets/scss/lib/mermaid/mermaid.scss_43d09a0fb297c4cc88d4122515a2e889.json b/resources/_gen/assets/scss/lib/mermaid/mermaid.scss_43d09a0fb297c4cc88d4122515a2e889.json new file mode 100644 index 00000000..16fb7670 --- /dev/null +++ b/resources/_gen/assets/scss/lib/mermaid/mermaid.scss_43d09a0fb297c4cc88d4122515a2e889.json @@ -0,0 +1 @@ +{"Target":"lib/mermaid/mermaid.min.css","MediaType":"text/css","Data":{}} \ No newline at end of file diff --git a/resources/_gen/assets/scss/lib/mermaid/mermaid.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.content b/resources/_gen/assets/scss/lib/mermaid/mermaid.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.content deleted file mode 100644 index 89d5edfc..00000000 --- a/resources/_gen/assets/scss/lib/mermaid/mermaid.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.content +++ /dev/null @@ -1,3 +0,0 @@ -.page .mermaid{width:100%;margin:3% auto;text-align:center}.page .mermaid>svg{max-width:100%}.page .mermaid .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);color:#333}.page .mermaid .label text{fill:#333}.page .mermaid .node rect,.page .mermaid .node circle,.page .mermaid .node ellipse,.page .mermaid .node polygon,.page .mermaid .node path{fill:#eee;stroke:#999;stroke-width:1px}.page .mermaid .node .label{text-align:center}.page .mermaid .node.clickable{cursor:pointer}.page .mermaid .arrowheadPath{fill:#333}.page .mermaid .edgePath .path{stroke:#666;stroke-width:1.5px}.page .mermaid .edgeLabel{background-color:#fff;text-align:center}.page .mermaid .cluster rect{fill:#eaf2fb;stroke:#26a;stroke-width:1px}.page .mermaid .cluster text{fill:#333}.page .mermaid div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#eaf2fb;border:1px solid #26a;border-radius:2px;pointer-events:none;z-index:100}.page .mermaid .actor{stroke:#999;fill:#eee}.page .mermaid text.actor{fill:#333;stroke:none}.page .mermaid .actor-line{stroke:#666}.page .mermaid .messageLine0{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#333}.page .mermaid .messageLine1{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#333}.page .mermaid #arrowhead{fill:#333}.page .mermaid .sequenceNumber{fill:#fff}.page .mermaid #sequencenumber{fill:#333}.page .mermaid #crosshead path{fill:#333 !important;stroke:#333 !important}.page .mermaid .messageText{fill:#333;stroke:none}.page .mermaid .labelBox{stroke:#999;fill:#eee}.page .mermaid .labelText{fill:#333;stroke:none}.page .mermaid .loopText{fill:#333;stroke:none}.page .mermaid .loopLine{stroke-width:2;stroke-dasharray:'2 2';stroke:#999}.page .mermaid .note{stroke:#770;fill:#ffa}.page .mermaid .noteText{fill:black;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:14px}.page .mermaid .activation0{fill:#f4f4f4;stroke:#666}.page .mermaid .activation1{fill:#f4f4f4;stroke:#666}.page .mermaid .activation2{fill:#f4f4f4;stroke:#666}.page .mermaid .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .section{stroke:none;opacity:0.2}.page .mermaid .section0{fill:#80b3e6}.page .mermaid .section2{fill:#80b3e6}.page .mermaid .section1,.page .mermaid .section3{fill:#fff;opacity:0.2}.page .mermaid .sectionTitle0{fill:#333}.page .mermaid .sectionTitle1{fill:#333}.page .mermaid .sectionTitle2{fill:#333}.page .mermaid .sectionTitle3{fill:#333}.page .mermaid .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .grid .tick{stroke:#e6e6e6;opacity:0.8;shape-rendering:crispEdges}.page .mermaid .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333}.page .mermaid .grid path{stroke-width:0}.page .mermaid .today{fill:none;stroke:#d42;stroke-width:2px}.page .mermaid .task{stroke-width:2}.page .mermaid .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .taskText:not([font-size]){font-size:11px}.page .mermaid .taskTextOutsideRight{fill:#333;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .taskTextOutsideLeft{fill:#333;text-anchor:end;font-size:11px}.page .mermaid .task.clickable{cursor:pointer}.page .mermaid .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.page .mermaid .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.page .mermaid .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.page .mermaid .taskText0,.page .mermaid .taskText1,.page .mermaid .taskText2,.page .mermaid .taskText3{fill:#fff}.page .mermaid .task0,.page .mermaid .task1,.page .mermaid .task2,.page .mermaid .task3{fill:#26a;stroke:#1a4d80}.page .mermaid .taskTextOutside0,.page .mermaid .taskTextOutside2{fill:#333 !important}.page .mermaid .taskTextOutside1,.page .mermaid .taskTextOutside3{fill:#333 !important}.page .mermaid .active0,.page .mermaid .active1,.page .mermaid .active2,.page .mermaid .active3{fill:#eee;stroke:#1a4d80}.page .mermaid .activeText0,.page .mermaid .activeText1,.page .mermaid .activeText2,.page .mermaid .activeText3{fill:#333}.page .mermaid .done0,.page .mermaid .done1,.page .mermaid .done2,.page .mermaid .done3{stroke:#666;fill:#bbb;stroke-width:2}.page .mermaid .doneText0,.page .mermaid .doneText1,.page .mermaid .doneText2,.page .mermaid .doneText3{fill:#333}.page .mermaid .crit0,.page .mermaid .crit1,.page .mermaid .crit2,.page .mermaid .crit3{stroke:#b1361b;fill:#d42;stroke-width:2}.page .mermaid .activeCrit0,.page .mermaid .activeCrit1,.page .mermaid .activeCrit2,.page .mermaid .activeCrit3{stroke:#b1361b;fill:#eee;stroke-width:2}.page .mermaid .doneCrit0,.page .mermaid .doneCrit1,.page .mermaid .doneCrit2,.page .mermaid .doneCrit3{stroke:#b1361b;fill:#bbb;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}.page .mermaid .milestone{transform:rotate(45deg) scale(0.8, 0.8)}.page .mermaid .milestoneText{font-style:italic}.page .mermaid .doneCritText0,.page .mermaid .doneCritText1,.page .mermaid .doneCritText2,.page .mermaid .doneCritText3{fill:#333}.page .mermaid .activeCritText0,.page .mermaid .activeCritText1,.page .mermaid .activeCritText2,.page .mermaid .activeCritText3{fill:#333}.page .mermaid .titleText{text-anchor:middle;font-size:18px;fill:#333;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid g.classGroup text{fill:#999;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}.page .mermaid g.classGroup text .title{font-weight:bolder}.page .mermaid g.clickable{cursor:pointer}.page .mermaid g.classGroup rect{fill:#eee;stroke:#999}.page .mermaid g.classGroup line{stroke:#999;stroke-width:1}.page .mermaid .classLabel .box{stroke:none;stroke-width:0;fill:#eee;opacity:0.5}.page .mermaid .classLabel .label{fill:#999;font-size:10px}.page .mermaid .relation{stroke:#999;stroke-width:1;fill:none}.page .mermaid .dashed-line{stroke-dasharray:3}.page .mermaid #compositionStart{fill:#999;stroke:#999;stroke-width:1}.page .mermaid #compositionEnd{fill:#999;stroke:#999;stroke-width:1}.page .mermaid #aggregationStart{fill:#eee;stroke:#999;stroke-width:1}.page .mermaid #aggregationEnd{fill:#eee;stroke:#999;stroke-width:1}.page .mermaid #dependencyStart{fill:#999;stroke:#999;stroke-width:1}.page .mermaid #dependencyEnd{fill:#999;stroke:#999;stroke-width:1}.page .mermaid #extensionStart{fill:#999;stroke:#999;stroke-width:1}.page .mermaid #extensionEnd{fill:#999;stroke:#999;stroke-width:1}.page .mermaid .commit-id,.page .mermaid .commit-msg,.page .mermaid .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .pieTitleText{text-anchor:middle;font-size:25px;fill:#333;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid g.stateGroup text{fill:#999;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid g.stateGroup text{fill:#999;stroke:none;font-size:10px}.page .mermaid g.stateGroup .state-title{font-weight:bolder;fill:#000}.page .mermaid g.stateGroup rect{fill:#eee;stroke:#999}.page .mermaid g.stateGroup line{stroke:#999;stroke-width:1}.page .mermaid .transition{stroke:#999;stroke-width:1;fill:none}.page .mermaid .stateGroup .composit{fill:white;border-bottom:1px}.page .mermaid .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}.page .mermaid .state-note{stroke:#770;fill:#ffa}.page .mermaid .state-note text{fill:black;stroke:none;font-size:10px}.page .mermaid .stateLabel .box{stroke:none;stroke-width:0;fill:#eee;opacity:0.5}.page .mermaid .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid :root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}.dark-theme .page .mermaid .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);color:#333}.dark-theme .page .mermaid .label text{fill:#333}.dark-theme .page .mermaid .node rect,.dark-theme .page .mermaid .node circle,.dark-theme .page .mermaid .node ellipse,.dark-theme .page .mermaid .node polygon,.dark-theme .page .mermaid .node path{fill:#BDD5EA;stroke:purple;stroke-width:1px}.dark-theme .page .mermaid .node .label{text-align:center}.dark-theme .page .mermaid .node.clickable{cursor:pointer}.dark-theme .page .mermaid .arrowheadPath{fill:#d3d3d3}.dark-theme .page .mermaid .edgePath .path{stroke:#d3d3d3;stroke-width:1.5px}.dark-theme .page .mermaid .edgeLabel{background-color:#e8e8e8;text-align:center}.dark-theme .page .mermaid .cluster rect{fill:#6D6D65;stroke:rgba(255,255,255,0.25);stroke-width:1px}.dark-theme .page .mermaid .cluster text{fill:#F9FFFE}.dark-theme .page .mermaid div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#6D6D65;border:1px solid rgba(255,255,255,0.25);border-radius:2px;pointer-events:none;z-index:100}.dark-theme .page .mermaid .actor{stroke:#81B1DB;fill:#BDD5EA}.dark-theme .page .mermaid text.actor{fill:#000;stroke:none}.dark-theme .page .mermaid .actor-line{stroke:#d3d3d3}.dark-theme .page .mermaid .messageLine0{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#d3d3d3}.dark-theme .page .mermaid .messageLine1{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#d3d3d3}.dark-theme .page .mermaid #arrowhead{fill:#d3d3d3}.dark-theme .page .mermaid .sequenceNumber{fill:#fff}.dark-theme .page .mermaid #sequencenumber{fill:#d3d3d3}.dark-theme .page .mermaid #crosshead path{fill:#d3d3d3 !important;stroke:#d3d3d3 !important}.dark-theme .page .mermaid .messageText{fill:#d3d3d3;stroke:none}.dark-theme .page .mermaid .labelBox{stroke:#81B1DB;fill:#BDD5EA}.dark-theme .page .mermaid .labelText{fill:#323D47;stroke:none}.dark-theme .page .mermaid .loopText{fill:#d3d3d3;stroke:none}.dark-theme .page .mermaid .loopLine{stroke-width:2;stroke-dasharray:'2 2';stroke:#81B1DB}.dark-theme .page .mermaid .note{stroke:rgba(255,255,255,0.25);fill:#fff5ad}.dark-theme .page .mermaid .noteText{fill:black;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:14px}.dark-theme .page .mermaid .activation0{fill:#f4f4f4;stroke:#666}.dark-theme .page .mermaid .activation1{fill:#f4f4f4;stroke:#666}.dark-theme .page .mermaid .activation2{fill:#f4f4f4;stroke:#666}.dark-theme .page .mermaid .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}.dark-theme .page .mermaid .section{stroke:none;opacity:0.2}.dark-theme .page .mermaid .section0{fill:rgba(255,255,255,0.3)}.dark-theme .page .mermaid .section2{fill:#EAE8B9}.dark-theme .page .mermaid .section1,.dark-theme .page .mermaid .section3{fill:#fff;opacity:0.2}.dark-theme .page .mermaid .sectionTitle0{fill:#F9FFFE}.dark-theme .page .mermaid .sectionTitle1{fill:#F9FFFE}.dark-theme .page .mermaid .sectionTitle2{fill:#F9FFFE}.dark-theme .page .mermaid .sectionTitle3{fill:#F9FFFE}.dark-theme .page .mermaid .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.dark-theme .page .mermaid .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}.dark-theme .page .mermaid .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#d3d3d3}.dark-theme .page .mermaid .grid path{stroke-width:0}.dark-theme .page .mermaid .today{fill:none;stroke:#DB5757;stroke-width:2px}.dark-theme .page .mermaid .task{stroke-width:2}.dark-theme .page .mermaid .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.dark-theme .page .mermaid .taskText:not([font-size]){font-size:11px}.dark-theme .page .mermaid .taskTextOutsideRight{fill:#323D47;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.dark-theme .page .mermaid .taskTextOutsideLeft{fill:#323D47;text-anchor:end;font-size:11px}.dark-theme .page .mermaid .task.clickable{cursor:pointer}.dark-theme .page .mermaid .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.dark-theme .page .mermaid .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.dark-theme .page .mermaid .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.dark-theme .page .mermaid .taskText0,.dark-theme .page .mermaid .taskText1,.dark-theme .page .mermaid .taskText2,.dark-theme .page .mermaid .taskText3{fill:#323D47}.dark-theme .page .mermaid .task0,.dark-theme .page .mermaid .task1,.dark-theme .page .mermaid .task2,.dark-theme .page .mermaid .task3{fill:#BDD5EA;stroke:rgba(255,255,255,0.5)}.dark-theme .page .mermaid .taskTextOutside0,.dark-theme .page .mermaid .taskTextOutside2{fill:#d3d3d3 !important}.dark-theme .page .mermaid .taskTextOutside1,.dark-theme .page .mermaid .taskTextOutside3{fill:#d3d3d3 !important}.dark-theme .page .mermaid .active0,.dark-theme .page .mermaid .active1,.dark-theme .page .mermaid .active2,.dark-theme .page .mermaid .active3{fill:#81B1DB;stroke:rgba(255,255,255,0.5)}.dark-theme .page .mermaid .activeText0,.dark-theme .page .mermaid .activeText1,.dark-theme .page .mermaid .activeText2,.dark-theme .page .mermaid .activeText3{fill:#323D47}.dark-theme .page .mermaid .done0,.dark-theme .page .mermaid .done1,.dark-theme .page .mermaid .done2,.dark-theme .page .mermaid .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}.dark-theme .page .mermaid .doneText0,.dark-theme .page .mermaid .doneText1,.dark-theme .page .mermaid .doneText2,.dark-theme .page .mermaid .doneText3{fill:#323D47}.dark-theme .page .mermaid .crit0,.dark-theme .page .mermaid .crit1,.dark-theme .page .mermaid .crit2,.dark-theme .page .mermaid .crit3{stroke:#E83737;fill:#E83737;stroke-width:2}.dark-theme .page .mermaid .activeCrit0,.dark-theme .page .mermaid .activeCrit1,.dark-theme .page .mermaid .activeCrit2,.dark-theme .page .mermaid .activeCrit3{stroke:#E83737;fill:#81B1DB;stroke-width:2}.dark-theme .page .mermaid .doneCrit0,.dark-theme .page .mermaid .doneCrit1,.dark-theme .page .mermaid .doneCrit2,.dark-theme .page .mermaid .doneCrit3{stroke:#E83737;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}.dark-theme .page .mermaid .milestone{transform:rotate(45deg) scale(0.8, 0.8)}.dark-theme .page .mermaid .milestoneText{font-style:italic}.dark-theme .page .mermaid .doneCritText0,.dark-theme .page .mermaid .doneCritText1,.dark-theme .page .mermaid .doneCritText2,.dark-theme .page .mermaid .doneCritText3{fill:#323D47}.dark-theme .page .mermaid .activeCritText0,.dark-theme .page .mermaid .activeCritText1,.dark-theme .page .mermaid .activeCritText2,.dark-theme .page .mermaid .activeCritText3{fill:#323D47}.dark-theme .page .mermaid .titleText{text-anchor:middle;font-size:18px;fill:#d3d3d3;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.dark-theme .page .mermaid g.classGroup text{fill:purple;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}.dark-theme .page .mermaid g.classGroup text .title{font-weight:bolder}.dark-theme .page .mermaid g.clickable{cursor:pointer}.dark-theme .page .mermaid g.classGroup rect{fill:#BDD5EA;stroke:purple}.dark-theme .page .mermaid g.classGroup line{stroke:purple;stroke-width:1}.dark-theme .page .mermaid .classLabel .box{stroke:none;stroke-width:0;fill:#BDD5EA;opacity:0.5}.dark-theme .page .mermaid .classLabel .label{fill:purple;font-size:10px}.dark-theme .page .mermaid .relation{stroke:purple;stroke-width:1;fill:none}.dark-theme .page .mermaid .dashed-line{stroke-dasharray:3}.dark-theme .page .mermaid #compositionStart{fill:purple;stroke:purple;stroke-width:1}.dark-theme .page .mermaid #compositionEnd{fill:purple;stroke:purple;stroke-width:1}.dark-theme .page .mermaid #aggregationStart{fill:#BDD5EA;stroke:purple;stroke-width:1}.dark-theme .page .mermaid #aggregationEnd{fill:#BDD5EA;stroke:purple;stroke-width:1}.dark-theme .page .mermaid #dependencyStart{fill:purple;stroke:purple;stroke-width:1}.dark-theme .page .mermaid #dependencyEnd{fill:purple;stroke:purple;stroke-width:1}.dark-theme .page .mermaid #extensionStart{fill:purple;stroke:purple;stroke-width:1}.dark-theme .page .mermaid #extensionEnd{fill:purple;stroke:purple;stroke-width:1}.dark-theme .page .mermaid .commit-id,.dark-theme .page .mermaid .commit-msg,.dark-theme .page .mermaid .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.dark-theme .page .mermaid .pieTitleText{text-anchor:middle;font-size:25px;fill:#323D47;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.dark-theme .page .mermaid .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.dark-theme .page .mermaid g.stateGroup text{fill:purple;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.dark-theme .page .mermaid g.stateGroup text{fill:purple;stroke:none;font-size:10px}.dark-theme .page .mermaid g.stateGroup .state-title{font-weight:bolder;fill:#000}.dark-theme .page .mermaid g.stateGroup rect{fill:#BDD5EA;stroke:purple}.dark-theme .page .mermaid g.stateGroup line{stroke:purple;stroke-width:1}.dark-theme .page .mermaid .transition{stroke:purple;stroke-width:1;fill:none}.dark-theme .page .mermaid .stateGroup .composit{fill:white;border-bottom:1px}.dark-theme .page .mermaid .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}.dark-theme .page .mermaid .state-note{stroke:rgba(255,255,255,0.25);fill:#fff5ad}.dark-theme .page .mermaid .state-note text{fill:black;stroke:none;font-size:10px}.dark-theme .page .mermaid .stateLabel .box{stroke:none;stroke-width:0;fill:#BDD5EA;opacity:0.5}.dark-theme .page .mermaid .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.dark-theme .page .mermaid :root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive} - -/*# sourceMappingURL=mermaid.css.map */ \ No newline at end of file diff --git a/resources/_gen/assets/scss/lib/mermaid/mermaid.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.json b/resources/_gen/assets/scss/lib/mermaid/mermaid.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.json deleted file mode 100644 index bfc9c3ca..00000000 --- a/resources/_gen/assets/scss/lib/mermaid/mermaid.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.json +++ /dev/null @@ -1 +0,0 @@ -{"Target":"lib/mermaid/mermaid.css","MediaType":"text/css","Data":{}} \ No newline at end of file diff --git a/resources/_gen/assets/scss/lib/valine/valine.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.content b/resources/_gen/assets/scss/lib/valine/valine.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.content deleted file mode 100644 index 9048cd3b..00000000 --- a/resources/_gen/assets/scss/lib/valine/valine.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.content +++ /dev/null @@ -1,3 +0,0 @@ -.dark-theme .v *,.dark-theme .v .vwrap .vheader .vinput,.dark-theme .v .vlist .vcard .vh,.dark-theme .v .vlist .vcard .vquote{border-color:#4a4b50}.dark-theme .v blockquote{border-left:.25rem solid #00bfa5}.dark-theme .v *,.dark-theme .v .vwrap input,.dark-theme .v .vwrap input::placeholder,.dark-theme .v .veditor,.dark-theme .v .veditor::placeholder,.dark-theme .v a,.dark-theme .v a:hover{color:#a9a9b3}.dark-theme .v .vbtn{color:#a9a9b3;background:#222325;border-color:#292a2d}.dark-theme .v .vbtn:hover{color:#55bde2;border-color:#55bde2}.dark-theme .v .vlist .vcard .vhead .vsys{background:#20252b}.dark-theme .v code,.dark-theme .v pre{background:#272C34}.dark-theme .v .vmark .vinput{color:#222325}.v blockquote{border-left:.25rem solid #00bfa5}.v code,.v pre{text-align:left} - -/*# sourceMappingURL=valine.css.map */ \ No newline at end of file diff --git a/resources/_gen/assets/scss/lib/valine/valine.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.json b/resources/_gen/assets/scss/lib/valine/valine.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.json deleted file mode 100644 index b66e3b81..00000000 --- a/resources/_gen/assets/scss/lib/valine/valine.scss_4fddb88d50abca04f2e7ef77f0bb1c3b.json +++ /dev/null @@ -1 +0,0 @@ -{"Target":"lib/valine/valine.css","MediaType":"text/css","Data":{}} \ No newline at end of file diff --git a/resources/_gen/assets/scss/lib/valine/valine.scss_c443f4e76f09daefa6d3fafd13c88b9c.content b/resources/_gen/assets/scss/lib/valine/valine.scss_c443f4e76f09daefa6d3fafd13c88b9c.content new file mode 100644 index 00000000..948e5b85 --- /dev/null +++ b/resources/_gen/assets/scss/lib/valine/valine.scss_c443f4e76f09daefa6d3fafd13c88b9c.content @@ -0,0 +1,3 @@ +.dark .v *,.dark .v .vwrap .vheader .vinput,.dark .v .vlist .vcard .vh,.dark .v .vlist .vcard .vquote{border-color:#4a4b50}.dark .v blockquote{border-left:.25rem solid #00bfa5}.dark .v *,.dark .v .vwrap input,.dark .v .vwrap input::placeholder,.dark .v .veditor,.dark .v .veditor::placeholder,.dark .v a,.dark .v a:hover{color:#a9a9b3}.dark .v .vbtn{color:#a9a9b3;background:#222325;border-color:#292a2d}.dark .v .vbtn:hover{color:#55bde2;border-color:#55bde2}.dark .v .vlist .vcard .vhead .vsys{background:#20252b}.dark .v code,.dark .v pre{background:#272C34}.dark .v .vmark .vinput{color:#222325}.v blockquote{border-left:.25rem solid #00bfa5}.v code,.v pre{text-align:left} + +/*# sourceMappingURL=valine.min.css.map */ \ No newline at end of file diff --git a/resources/_gen/assets/scss/lib/valine/valine.scss_c443f4e76f09daefa6d3fafd13c88b9c.json b/resources/_gen/assets/scss/lib/valine/valine.scss_c443f4e76f09daefa6d3fafd13c88b9c.json new file mode 100644 index 00000000..f830c05c --- /dev/null +++ b/resources/_gen/assets/scss/lib/valine/valine.scss_c443f4e76f09daefa6d3fafd13c88b9c.json @@ -0,0 +1 @@ +{"Target":"lib/valine/valine.min.css","MediaType":"text/css","Data":{}} \ No newline at end of file diff --git a/src/js/theme.js b/src/js/theme.js index f28d29f3..4f177636 100644 --- a/src/js/theme.js +++ b/src/js/theme.js @@ -1,234 +1,445 @@ -(() => { - 'use strict'; - - class Util { - forEach(elements, handler) { - elements = elements || []; - for (let i = 0; i < elements.length; i++) { - handler(elements[i]); - } +class Util { + forEach(elements, handler) { + elements = elements || []; + for (let i = 0; i < elements.length; i++) { + handler(elements[i]); } + } - getScrollTop() { - return (document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop; - } + getScrollTop() { + return (document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop; + } - isMobile() { - return window.matchMedia('only screen and (max-width: 680px)').matches; - } + isMobile() { + return window.matchMedia('only screen and (max-width: 680px)').matches; + } - isTocStatic() { - return window.matchMedia('only screen and (max-width: 960px)').matches; - } + isTocStatic() { + return window.matchMedia('only screen and (max-width: 960px)').matches; } +} - class Theme { - constructor() { - this.util = new Util(); - this.newScrollTop = this.util.getScrollTop(); - this.oldScrollTop = this.newScrollTop; - this.scrollEventSet = new Set(); - this.resizeEventSet = new Set(); - this.switchThemeEventSet = new Set(); +class Theme { + constructor() { + this.config = window.config; + this.contentData = this.config.content; + this.isDark = document.body.classList.contains('dark'); + this.util = new Util(); + this.newScrollTop = this.util.getScrollTop(); + this.oldScrollTop = this.newScrollTop; + this.scrollEventSet = new Set(); + this.resizeEventSet = new Set(); + this.switchThemeEventSet = new Set(); + this.clickMaskEventSet = new Set(); + } + + initMenuMobile() { + const $menuToggleMobile = document.getElementById('menu-toggle-mobile'); + const $menuMobile = document.getElementById('menu-mobile'); + $menuToggleMobile.addEventListener('click', () => { + document.body.classList.toggle('blur'); + $menuToggleMobile.classList.toggle('active'); + $menuMobile.classList.toggle('active'); + }, false); + this._menuMobileOnClickMask = this._menuMobileOnClickMask || (() => { + $menuToggleMobile.classList.remove('active'); + $menuMobile.classList.remove('active'); + }); + this.clickMaskEventSet.add(this._menuMobileOnClickMask); + } + + initSwitchTheme() { + this.util.forEach(document.getElementsByClassName('theme-switch'), $themeSwitch => { + $themeSwitch.addEventListener('click', () => { + document.body.classList.toggle('dark'); + this.isDark = !this.isDark; + window.localStorage && localStorage.setItem('theme', this.isDark ? 'dark' : 'light'); + for (let event of this.switchThemeEventSet) event(); + }, false); + }); + } + + initSearch() { + const searchConfig = this.config.search; + const isMobile = this.util.isMobile(); + if (!searchConfig || isMobile && this._searchMobileOnce || !isMobile && this._searchDesktopOnce) return; + const classSuffix = isMobile ? 'mobile' : 'desktop'; + const $header = document.getElementById(`header-${classSuffix}`); + const $searchInput = document.getElementById(`search-input-${classSuffix}`); + const $searchToggle = document.getElementById(`search-toggle-${classSuffix}`); + const $searchLoading = document.getElementById(`search-loading-${classSuffix}`); + const $searchClear = document.getElementById(`search-clear-${classSuffix}`); + if (isMobile) { + this._searchMobileOnce = true; + $searchInput.addEventListener('focus', () => { + document.body.classList.add('blur'); + $header.classList.add('open'); + }, false); + document.getElementById('search-cancel-mobile').addEventListener('click', () => { + $header.classList.remove('open'); + document.body.classList.remove('blur'); + document.getElementById('menu-toggle-mobile').classList.remove('active'); + document.getElementById('menu-mobile').classList.remove('active'); + $searchLoading.style.display = 'none'; + $searchClear.style.display = 'none'; + this._searchMobile && this._searchMobile.autocomplete.setVal(''); + }, false); + $searchClear.addEventListener('click', () => { + $searchClear.style.display = 'none'; + this._searchMobile && this._searchMobile.autocomplete.setVal(''); + }, false); + this._searchMobileOnClickMask = this._searchMobileOnClickMask || (() => { + $header.classList.remove('open'); + $searchLoading.style.display = 'none'; + $searchClear.style.display = 'none'; + this._searchMobile && this._searchMobile.autocomplete.setVal(''); + }); + this.clickMaskEventSet.add(this._searchMobileOnClickMask); + } else { + this._searchDesktopOnce = true; + $searchToggle.addEventListener('click', () => { + document.body.classList.add('blur'); + $header.classList.add('open'); + $searchInput.focus(); + }, false); + $searchClear.addEventListener('click', () => { + $searchClear.style.display = 'none'; + this._searchDesktop && this._searchDesktop.autocomplete.setVal(''); + }, false); + this._searchDesktopOnClickMask = this._searchDesktopOnClickMask || (() => { + $header.classList.remove('open'); + $searchLoading.style.display = 'none'; + $searchClear.style.display = 'none'; + this._searchDesktop && this._searchDesktop.autocomplete.setVal(''); + }); + this.clickMaskEventSet.add(this._searchDesktopOnClickMask); } + $searchInput.addEventListener('input', () => { + if ($searchInput.value === '') $searchClear.style.display = 'none'; + else $searchClear.style.display = 'inline'; + }, false); - initMenuMobile() { - const menuToggleMobile = document.getElementById('menu-toggle-mobile'); - const menuMobile = document.getElementById('menu-mobile'); - this._menuMobileOnScroll = this._menuMobileOnScroll || (() => { - menuToggleMobile.classList.remove('active'); - menuMobile.classList.remove('active'); + const CONTEXT_LENGTH = 200; + const initAutosearch = () => { + const autosearch = autocomplete(`#search-input-${classSuffix}`, { + hint: false, + autoselect: true, + dropdownMenuContainer: `#search-dropdown-${classSuffix}`, + clearOnSelected: true, + cssClasses: { noPrefix: true }, + // debug: true, + }, { + name: 'search', + source: (query, callback) => { + $searchLoading.style.display = 'inline'; + $searchClear.style.display = 'none'; + const finish = (results) => { + $searchLoading.style.display = 'none'; + $searchClear.style.display = 'inline'; + callback(results); + }; + if (searchConfig.type === 'lunr') { + const search = () => { + if (lunr.queryHandler) query = lunr.queryHandler(query); + return this._index.search(query).slice(0, 12).map(({ ref, matchData: { metadata } }) => { + const matchData = this._indexData[ref]; + let { title, content: context } = matchData; + let position = 0; + Object.values(metadata).forEach(({ description, content }) => { + if (description) { + context = matchData.description; + position = -1; + } else if (content) { + const matchPosition = content.position[0][0]; + if (matchPosition < position || position === 0) position = matchPosition; + } + }); + position -= CONTEXT_LENGTH / 5; + if (position > 0) { + position += context.substr(position, 25).lastIndexOf(' ') + 1; + context = '...' + context.substr(position, CONTEXT_LENGTH); + } else { + context = context.substr(0, CONTEXT_LENGTH); + } + Object.keys(metadata).forEach(key => { + title = title.replace(new RegExp(`(${key})`, 'gi'), '$1'); + context = context.replace(new RegExp(`(${key})`, 'gi'), '$1'); + }); + return { + 'uri': matchData.uri, + 'title' : title, + 'date' : matchData.date, + 'context' : context, + }; + }); + } + if (!this._index) { + fetch(searchConfig.lunrIndexURL) + .then(response => response.json()) + .then(data => { + const indexData = {}; + this._index = lunr(function () { + if (searchConfig.lunrLanguageCode) this.use(lunr[searchConfig.lunrLanguageCode]); + this.ref('uri'); + this.field('title', { boost: 50 }); + this.field('tags', { boost: 20 }); + this.field('description', { boost: 10 }); + this.field('content', { boost: 5 }); + this.metadataWhitelist = ['position']; + data.forEach((record) => { + indexData[record.uri] = record; + this.add(record); + }); + }); + this._indexData = indexData; + finish(search()); + }).catch(err => { + console.error(err); + finish([]); + }); + } else finish(search()); + } else if (searchConfig.type === 'algolia') { + $searchLoading.style.display = 'inline'; + $searchClear.style.display = 'none'; + this._algoliaIndex = this._algoliaIndex || algoliasearch(searchConfig.algoliaAppID, searchConfig.algoliaSearchKey).initIndex(searchConfig.algoliaIndex); + this._algoliaIndex + .search(query, { offset: 0, length: 12, attributesToHighlight: ['title', 'content'] }) + .then(({ hits }) => { + finish(hits.map(({ uri, date, _highlightResult: { title, content } }) => ({ + uri: uri, + title: title.value, + date: date, + context: content.value, + }))); + }) + .catch(err => { + console.error(err); + finish([]); + }); + } + }, + templates: { + suggestion: ({ title, date, context }) => `
${title}${date}
${context}
`, + empty: ({ query }) => `
${searchConfig.noResultsFound}: "${query}"
`, + footer: ({}) => { + const { searchType, icon, href } = searchConfig.type === 'algolia' ? { + searchType: 'algolia', + icon: '', + href: 'https://www.algolia.com/', + } : { + searchType: 'Lunr.js', + icon: '', + href: 'https://lunrjs.com/', + }; + return `
`;}, + }, + }); + autosearch.on('autocomplete:selected', (event, suggestion, dataset, context) => { + window.location.assign(suggestion.uri); }); - if (this.util.isMobile()) { - menuToggleMobile.onclick = () => { - menuToggleMobile.classList.toggle('active'); - menuMobile.classList.toggle('active'); + if (isMobile) this._searchMobile = autosearch; + else this._searchDesktop = autosearch; + }; + if (searchConfig.lunrSegmentitURL && !document.getElementById('lunr-segmentit')) { + const script = document.createElement('script'); + script.id = 'lunr-segmentit'; + script.type = 'text/javascript'; + script.src = searchConfig.lunrSegmentitURL; + script.async = true; + if (script.readyState) { + script.onreadystatechange = () => { + if (script.readyState == 'loaded' || script.readyState == 'complete'){ + script.onreadystatechange = null; + initAutosearch(); + } }; - this.scrollEventSet.add(this._menuMobileOnScroll); } else { - this.scrollEventSet.delete(this._menuMobileOnScroll); + script.onload = () => { + initAutosearch(); + }; } - } + document.body.appendChild(script); + } else initAutosearch(); + } - initSwitchTheme() { - this.util.forEach(document.getElementsByClassName('theme-switch'), (button) => { - button.onclick = () => { - document.body.classList.toggle('dark-theme'); - window.isDark = !window.isDark; - window.localStorage && window.localStorage.setItem('theme', window.isDark ? 'dark' : 'light'); - for (let event of this.switchThemeEventSet) event(); - }; - }); - } + initLightGallery() { + if (this.config.lightGallery) lightGallery(document.getElementById('content'), this.config.lightGallery); + } - initHighlight() { - this.util.forEach(document.querySelectorAll('.highlight > .chroma'), (block) => { - const codes = block.querySelectorAll('pre.chroma > code'); - const code = codes[codes.length - 1]; - const lang = code ? code.className.toLowerCase() : ''; - block.className += ' ' + lang; - }); - this.util.forEach(document.querySelectorAll('.highlight > pre.chroma'), (block) => { - const chroma = document.createElement('div'); - chroma.className = block.className; - const table = document.createElement('table'); - chroma.appendChild(table); - const tbody = document.createElement('tbody'); - table.appendChild(tbody); - const tr = document.createElement('tr'); - tbody.appendChild(tr); - const td = document.createElement('td'); - tr.appendChild(td); - block.parentElement.replaceChild(chroma, block); - td.appendChild(block); - }); - } + initHighlight() { + this.util.forEach(document.querySelectorAll('.highlight > .chroma'), $chroma => { + const $codes = $chroma.querySelectorAll('pre.chroma > code'); + const $code = $codes[$codes.length - 1]; + const lang = $code ? $code.className.toLowerCase() : ''; + $chroma.className += ' ' + lang; + }); + this.util.forEach(document.querySelectorAll('.highlight > pre.chroma'), $preChroma => { + const $chroma = document.createElement('div'); + $chroma.className = $preChroma.className; + const $table = document.createElement('table'); + $chroma.appendChild($table); + const $tbody = document.createElement('tbody'); + $table.appendChild($tbody); + const $tr = document.createElement('tr'); + $tbody.appendChild($tr); + const $td = document.createElement('td'); + $tr.appendChild($td); + $preChroma.parentElement.replaceChild($chroma, $preChroma); + $td.appendChild($preChroma); + }); + } + + initTable() { + this.util.forEach(document.querySelectorAll('.content table'), $table => { + const $wrapper = document.createElement('div'); + $wrapper.className = 'table-wrapper'; + $table.parentElement.replaceChild($wrapper, $table); + $wrapper.appendChild($table); + }); + } - initTable() { - this.util.forEach(document.querySelectorAll('.content table'), (table) => { - const wrapper = document.createElement('div'); - wrapper.className = 'table-wrapper'; - table.parentElement.replaceChild(wrapper, table); - wrapper.appendChild(table); + initHeaderLink() { + for (let num = 1; num <= 6; num++) { + this.util.forEach(document.querySelectorAll('.page.single .content > h' + num), $header => { + $header.classList.add('headerLink'); + $header.innerHTML = `${$header.innerHTML}`; }); } + } - initHeaderLink() { - for (let num = 1; num <= 6; num++) { - this.util.forEach(document.querySelectorAll('.page.single .content > h' + num), (header) => { - header.classList.add('headerLink'); - header.innerHTML = `${header.innerHTML}`; - }); + initToc() { + const $tocCore = document.getElementById('TableOfContents'); + if ($tocCore === null) return; + if (this.util.isTocStatic()) { + const $tocContentStatic = document.getElementById('toc-content-static'); + if ($tocCore.parentElement !== $tocContentStatic) { + $tocCore.parentElement.removeChild($tocCore); + $tocContentStatic.appendChild($tocCore); } - } - - initToc() { - const tocCore = document.getElementById('TableOfContents'); - if (tocCore === null) return; - if (this.util.isTocStatic()) { - const tocContentStatic = document.getElementById('toc-content-static'); - if (tocCore.parentElement !== tocContentStatic) { - tocCore.parentElement.removeChild(tocCore); - tocContentStatic.appendChild(tocCore); - } - if (this._tocOnScroll) this.scrollEventSet.delete(this._tocOnScroll); - } else { - const tocContentAuto = document.getElementById('toc-content-auto'); - if (tocCore.parentElement !== tocContentAuto) { - tocCore.parentElement.removeChild(tocCore); - tocContentAuto.appendChild(tocCore); + if (this._tocOnScroll) this.scrollEventSet.delete(this._tocOnScroll); + } else { + const $tocContentAuto = document.getElementById('toc-content-auto'); + if ($tocCore.parentElement !== $tocContentAuto) { + $tocCore.parentElement.removeChild($tocCore); + $tocContentAuto.appendChild($tocCore); + } + const $toc = document.getElementById('toc-auto'); + const $page = document.getElementsByClassName('page')[0]; + const rect = $page.getBoundingClientRect(); + $toc.style.left = `${rect.left + rect.width + 20}px`; + $toc.style.maxWidth = `${$page.getBoundingClientRect().left - 20}px`; + const $tocLinkElements = $tocCore.getElementsByTagName('a'); + const $tocLiElements = $tocCore.getElementsByTagName('li'); + const $headerLinkElements = document.getElementsByClassName('headerLink'); + const headerIsFixed = this.config.desktopHeaderMode !== 'normal'; + const headerHeight = document.getElementById('header-desktop').offsetHeight; + const TOP_SPACING = 20 + (headerIsFixed ? headerHeight : 0); + const minTocTop = $toc.offsetTop; + const minScrollTop = minTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight); + this._tocOnScroll = this._tocOnScroll || (() => { + const footerTop = document.getElementById('post-footer').offsetTop; + const maxTocTop = footerTop - $toc.getBoundingClientRect().height; + const maxScrollTop = maxTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight); + if (this.newScrollTop < minScrollTop) { + $toc.style.position = 'absolute'; + $toc.style.top = `${minTocTop}px`; + } else if (this.newScrollTop > maxScrollTop) { + $toc.style.position = 'absolute'; + $toc.style.top = `${maxTocTop}px`; + } else { + $toc.style.position = 'fixed'; + $toc.style.top = `${TOP_SPACING}px`; } - const toc = document.getElementById('toc-auto'); - const page = document.getElementsByClassName('page')[0]; - toc.style.maxWidth = `${page.getBoundingClientRect().left - 20}px`; - this._tocLinks = this._tocLinks || tocCore.getElementsByTagName('a'); - this._tocLis = this._tocLis || tocCore.getElementsByTagName('li'); - this._headerLinks = this._headerLinks || document.getElementsByClassName('headerLink'); - const headerIsFixed = window.desktopHeaderMode !== 'normal'; - const headerHeight = document.getElementById('header-desktop').offsetHeight; - const TOP_SPACING = 20 + (headerIsFixed ? headerHeight : 0); - const minTocTop = toc.offsetTop; - const minScrollTop = minTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight); - this._tocOnScroll = this._tocOnScroll || (() => { - const footerTop = document.getElementById('post-footer').offsetTop; - const maxTocTop = footerTop - toc.getBoundingClientRect().height; - const maxScrollTop = maxTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight); - const rect = page.getBoundingClientRect(); - if (this.newScrollTop < minScrollTop) { - toc.style.position = 'absolute'; - toc.style.top = `${minTocTop}px`; - toc.style.left = `${rect.width + 20}px`; - } else if (this.newScrollTop > maxScrollTop) { - toc.style.position = 'absolute'; - toc.style.top = `${maxTocTop}px`; - toc.style.left = `${rect.width + 20}px`; - } else { - toc.style.position = 'fixed'; - toc.style.top = `${TOP_SPACING}px`; - toc.style.left = `${rect.left + rect.width + 20}px`; - } - this.util.forEach(this._tocLinks, (link) => { link.classList.remove('active'); }); - this.util.forEach(this._tocLis, (link) => { link.classList.remove('has-active'); }); - const INDEX_SPACING = 20 + (headerIsFixed ? headerHeight : 0); - let activeTocIndex = this._headerLinks.length - 1; - for (let i = 0; i < this._headerLinks.length - 1; i++) { - const thisTop = this._headerLinks[i].getBoundingClientRect().top; - const nextTop = this._headerLinks[i + 1].getBoundingClientRect().top; - if ((i == 0 && thisTop > INDEX_SPACING) - || (thisTop <= INDEX_SPACING && nextTop > INDEX_SPACING)) { - activeTocIndex = i; - break; - } + this.util.forEach($tocLinkElements, link => { link.classList.remove('active'); }); + this.util.forEach($tocLiElements, link => { link.classList.remove('has-active'); }); + const INDEX_SPACING = 20 + (headerIsFixed ? headerHeight : 0); + let activeTocIndex = $headerLinkElements.length - 1; + for (let i = 0; i < $headerLinkElements.length - 1; i++) { + const thisTop = $headerLinkElements[i].getBoundingClientRect().top; + const nextTop = $headerLinkElements[i + 1].getBoundingClientRect().top; + if ((i == 0 && thisTop > INDEX_SPACING) + || (thisTop <= INDEX_SPACING && nextTop > INDEX_SPACING)) { + activeTocIndex = i; + break; } - if (activeTocIndex !== -1) { - this._tocLinks[activeTocIndex].classList.add('active'); - let parent = this._tocLinks[activeTocIndex].parentElement; - while (parent !== tocCore) { - parent.classList.add('has-active'); - parent = parent.parentElement.parentElement; - } + } + if (activeTocIndex !== -1) { + $tocLinkElements[activeTocIndex].classList.add('active'); + let $parent = $tocLinkElements[activeTocIndex].parentElement; + while ($parent !== $tocCore) { + $parent.classList.add('has-active'); + $parent = $parent.parentElement.parentElement; } - }); - this._tocOnScroll(); - this.scrollEventSet.add(this._tocOnScroll); - } + } + }); + this._tocOnScroll(); + this.scrollEventSet.add(this._tocOnScroll); } + } - initMermaid() { - const elements = document.getElementsByClassName('mermaid'); - if (elements.length) { - mermaid.initialize({startOnLoad: false, theme: 'null'}); - this.util.forEach(elements, (element) => { - mermaid.mermaidAPI.render('svg-' + element.id, window.contentMap[element.id], (svgCode) => { - element.innerHTML = svgCode; - }, element); - }); - } - } + initMath() { + if (this.config.math) renderMathInElement(document.body, this.config.math); + } - initEcharts() { - this._echartsOnSwitchTheme = this._echartsOnSwitchTheme || (() => { - this._echartsArr = this._echartsArr || []; - for (let i = 0; i < this._echartsArr.length; i++) { - this._echartsArr[i].dispose(); - } - this._echartsArr = []; - this.util.forEach(document.getElementsByClassName('echarts'), (element) => { - const chart = echarts.init(element, window.isDark ? 'dark' : 'macarons', {renderer: 'svg'}); - chart.setOption(JSON.parse(window.contentMap[element.id])); - this._echartsArr.push(chart); - }); + initMermaid() { + const $mermaidElements = document.getElementsByClassName('mermaid'); + if ($mermaidElements.length) { + mermaid.initialize({startOnLoad: false, theme: 'null'}); + this.util.forEach($mermaidElements, element => { + mermaid.mermaidAPI.render('svg-' + element.id, this.contentData[element.id], svgCode => { + element.innerHTML = svgCode; + }, element); }); - this.switchThemeEventSet.add(this._echartsOnSwitchTheme); - this._echartsOnSwitchTheme(); - this._echartsOnResize = this._echartsOnResize || (() => { - for (let i = 0; i < this._echartsArr.length; i++) { - this._echartsArr[i].resize(); - } - }); - this.resizeEventSet.add(this._echartsOnResize); } + } - initMapbox() { + initEcharts() { + this._echartsOnSwitchTheme = this._echartsOnSwitchTheme || (() => { + this._echartsArr = this._echartsArr || []; + for (let i = 0; i < this._echartsArr.length; i++) { + this._echartsArr[i].dispose(); + } + this._echartsArr = []; + this.util.forEach(document.getElementsByClassName('echarts'), element => { + const chart = echarts.init(element, this.isDark ? 'dark' : 'macarons', {renderer: 'svg'}); + chart.setOption(JSON.parse(this.contentData[element.id])); + this._echartsArr.push(chart); + }); + }); + this.switchThemeEventSet.add(this._echartsOnSwitchTheme); + this._echartsOnSwitchTheme(); + this._echartsOnResize = this._echartsOnResize || (() => { + for (let i = 0; i < this._echartsArr.length; i++) { + this._echartsArr[i].resize(); + } + }); + this.resizeEventSet.add(this._echartsOnResize); + } + + initMapbox() { + if (this.config.mapbox) { + mapboxgl.accessToken = this.config.mapbox.accessToken; + mapboxgl.setRTLTextPlugin(this.config.mapbox.RTLTextPlugin); this._mapboxArr = this._mapboxArr || []; - this.util.forEach(document.getElementsByClassName('mapbox'), (element) => { - const options = window.contentMap[element.id]; + this.util.forEach(document.getElementsByClassName('mapbox'), element => { + const { lng, lat, zoom, lightStyle, darkStyle, marked, navigation, geolocate, scale, fullscreen } = this.contentData[element.id]; + const options = this.contentData[element.id]; const mapbox = new mapboxgl.Map({ container: element, - center: [options['lng'], options['lat']], - zoom: options['zoom'], + center: [lng, lat], + zoom: zoom, minZoom: .2, - style: window.isDark ? options['dark-style'] : options['light-style'], + style: this.isDark ? darkStyle : lightStyle, attributionControl: false, }); - if (options['marked']) { - new mapboxgl.Marker().setLngLat([options['lng'], options['lat']]).addTo(mapbox); + if (marked) { + new mapboxgl.Marker().setLngLat([lng, lat]).addTo(mapbox); } - if (options['navigation']) { + if (navigation) { mapbox.addControl(new mapboxgl.NavigationControl(), 'bottom-right'); } - if (options['geolocate']) { + if (geolocate) { mapbox.addControl(new mapboxgl.GeolocateControl({ positionOptions: { enableHighAccuracy: true, @@ -237,150 +448,166 @@ trackUserLocation: true, }), 'bottom-right'); } - if (options['scale']) { + if (scale) { mapbox.addControl(new mapboxgl.ScaleControl()); } - if (options['fullscreen']) { + if (fullscreen) { mapbox.addControl(new mapboxgl.FullscreenControl()); } mapbox.addControl(new MapboxLanguage()); this._mapboxArr.push(mapbox); }); this._mapboxOnSwitchTheme = this._mapboxOnSwitchTheme || (() => { - this.util.forEach(this._mapboxArr, (mapbox) => { + this.util.forEach(this._mapboxArr, mapbox => { const element = mapbox.getContainer(); - const options = window.contentMap[element.id]; - mapbox.setStyle(window.isDark ? options['dark-style'] : options['light-style']); + const { lightStyle, darkStyle } = this.contentData[element.id]; + mapbox.setStyle(this.isDark ? darkStyle : lightStyle); mapbox.addControl(new MapboxLanguage()); }); }); this.switchThemeEventSet.add(this._mapboxOnSwitchTheme); } + } - initTypeit() { - if (window.typeitArr) { - for (let i = 0; i < window.typeitArr.length; i++) { - const group = window.typeitArr[i]; - (function typeone(i) { - const id = group[i]; - if (i === group.length - 1) { - new TypeIt(`#${id}`, { - strings: window.contentMap[id], - }).go(); - return; - } - let instance = new TypeIt(`#${id}`, { - strings: window.contentMap[id], - afterComplete: () => { - instance.destroy(); - typeone(i + 1); - }, + initTypeit() { + if (this.config.typeit) { + const typeitData = this.config.typeit; + for (let i = 0; i < typeitData.length; i++) { + const group = typeitData[i]; + ((i) => { + const id = group[i]; + if (i === group.length - 1) { + new TypeIt(`#${id}`, { + strings: this.contentData[id], }).go(); - })(0); - } + return; + } + let instance = new TypeIt(`#${id}`, { + strings: this.contentData[id], + afterComplete: () => { + instance.destroy(); + typeone(i + 1); + }, + }).go(); + })(0); } } + } - initSmoothScroll() { - if ((!this.util.isMobile() && window.desktopHeaderMode === 'normal') - || (this.util.isMobile() && window.mobileHeaderMode === 'normal')) { - new SmoothScroll('[href^="#"]', {speed: 300, speedAsDuration: true}); - } else { - new SmoothScroll('[href^="#"]', {speed: 300, speedAsDuration: true, header: '#header-desktop'}); - } + initComment() { + if (this.config.comment && this.config.comment.gitalk) { + this.config.comment.gitalk.body = decodeURI(window.location.href); + const gitalk = new Gitalk(this.config.comment.gitalk.body); + gitalk.render('gitalk'); } + if (this.config.comment && this.config.comment.valine) new Valine(this.config.comment.valine); + } - onScroll() { - const headers = []; - if (window.desktopHeaderMode === 'auto') headers.push(document.getElementById('header-desktop')); - if (window.mobileHeaderMode === 'auto') headers.push(document.getElementById('header-mobile')); - this.util.forEach(headers, (header) => { - header.classList.add('animated'); - header.classList.add('faster'); - }); - const comments = document.getElementsByClassName('comment'); - if (comments.length) { - const button = document.getElementById('comment-button'); - button.href = `#${comments[0].id}`; - button.style.display = 'block'; - } - const fixedButtons = document.getElementById('fixed-buttons'); - const MIN_SCROLL = 10; - window.addEventListener('scroll', () => { - this.newScrollTop = this.util.getScrollTop(); - const scroll = this.newScrollTop - this.oldScrollTop; - this.util.forEach(headers, (header) => { - if (scroll > MIN_SCROLL) { - header.classList.remove('fadeInDown'); - header.classList.add('fadeOutUp'); - } else if (scroll < - MIN_SCROLL) { - header.classList.remove('fadeOutUp'); - header.classList.add('fadeInDown'); - } - }); - if (this.newScrollTop > 20) { - if (scroll > MIN_SCROLL) { - fixedButtons.classList.remove('fadeIn'); - fixedButtons.classList.add('fadeOut'); - } else if (scroll < - MIN_SCROLL) { - fixedButtons.style.display = 'block'; - fixedButtons.classList.remove('fadeOut'); - fixedButtons.classList.add('fadeIn'); - } - } else { - fixedButtons.style.display = 'none'; - } - if (!this._scrollTimeout) { - this._scrollTimeout = window.setTimeout(() => { - this._scrollTimeout = null; - for (let event of this.scrollEventSet) event(); - }, 10); - } - this.oldScrollTop = this.newScrollTop; - }, false); + initSmoothScroll() { + if ((!this.util.isMobile() && this.config.desktopHeaderMode === 'normal') + || (this.util.isMobile() && this.config.mobileHeaderMode === 'normal')) { + new SmoothScroll('[href^="#"]', {speed: 300, speedAsDuration: true}); + } else { + new SmoothScroll('[href^="#"]', {speed: 300, speedAsDuration: true, header: '#header-desktop'}); } + } - onResize() { - window.addEventListener('resize', () => { - if (!this._resizeTimeout) { - this._resizeTimeout = window.setTimeout(() => { - this._resizeTimeout = null; - for (let event of this.resizeEventSet) event(); - this.initMenuMobile(); - this.initToc(); - this.initSmoothScroll(); - this.initMermaid() - }, 100); - } - }, false); + onScroll() { + const $headers = []; + if (this.config.desktopHeaderMode === 'auto') $headers.push(document.getElementById('header-desktop')); + if (this.config.mobileHeaderMode === 'auto') $headers.push(document.getElementById('header-mobile')); + this.util.forEach($headers, $header => { + $header.classList.add('animated'); + $header.classList.add('faster'); + }); + if (document.getElementById('comments')) { + const $viewComments = document.getElementById('view-comments'); + $viewComments.href = `#comments`; + $viewComments.style.display = 'block'; } + const $fixedButtons = document.getElementById('fixed-buttons'); + const MIN_SCROLL = 20; + window.addEventListener('scroll', () => { + this.newScrollTop = this.util.getScrollTop(); + const scroll = this.newScrollTop - this.oldScrollTop; + this.util.forEach($headers, header => { + if (scroll > MIN_SCROLL) { + header.classList.remove('fadeInDown'); + header.classList.add('fadeOutUp'); + } else if (scroll < - MIN_SCROLL) { + header.classList.remove('fadeOutUp'); + header.classList.add('fadeInDown'); + } + }); + if (this.newScrollTop > MIN_SCROLL) { + if (scroll > MIN_SCROLL) { + $fixedButtons.classList.remove('fadeIn'); + $fixedButtons.classList.add('fadeOut'); + } else if (scroll < - MIN_SCROLL) { + $fixedButtons.style.display = 'block'; + $fixedButtons.classList.remove('fadeOut'); + $fixedButtons.classList.add('fadeIn'); + } + } else { + $fixedButtons.style.display = 'none'; + } + for (let event of this.scrollEventSet) event(); + this.oldScrollTop = this.newScrollTop; + }, false); + } - init() { - this.initMenuMobile(); - this.initSwitchTheme(); - this.initHighlight(); - this.initTable(); - this.initHeaderLink(); - this.initMermaid(); - this.initEcharts(); - this.initMapbox(); - this.initTypeit(); - this.initToc(); - this.initSmoothScroll(); + onResize() { + window.addEventListener('resize', () => { + if (!this._resizeTimeout) { + this._resizeTimeout = window.setTimeout(() => { + this._resizeTimeout = null; + for (let event of this.resizeEventSet) event(); + this.initToc(); + this.initSmoothScroll(); + this.initMermaid(); + this.initSearch(); + }, 100); + } + }, false); + } - this.onScroll(); - this.onResize(); - } + onClickMask() { + document.getElementById('mask').addEventListener('click', () => { + for (let event of this.clickMaskEventSet) event(); + document.body.classList.remove('blur'); + }, false); } - const themeInit = () => { - const theme = new Theme(); - theme.init(); - }; + init() { + this.initMenuMobile(); + this.initSwitchTheme(); + this.initSearch(); + this.initLightGallery(); + this.initHighlight(); + this.initTable(); + this.initHeaderLink(); + this.initMath(); + this.initMermaid(); + this.initEcharts(); + this.initMapbox(); + this.initTypeit(); + this.initToc(); + this.initComment(); + this.initSmoothScroll(); - if (document.readyState !== 'loading') { - themeInit(); - } else { - document.addEventListener('DOMContentLoaded', themeInit, false); + this.onScroll(); + this.onResize(); + this.onClickMask(); } -})(); +} + +const themeInit = () => { + const theme = new Theme(); + theme.init(); +}; + +if (document.readyState !== 'loading') { + themeInit(); +} else { + document.addEventListener('DOMContentLoaded', themeInit, false); +} diff --git a/src/lib/lunr.segmentit.js b/src/lib/lunr.segmentit.js new file mode 100644 index 00000000..570274c4 --- /dev/null +++ b/src/lib/lunr.segmentit.js @@ -0,0 +1,8 @@ +import { Segment, useDefault } from 'segmentit'; + +const segmentit = useDefault(new Segment()); +lunr.segmentit = segmentit; +lunr.queryHandler = query => { + if (/^[\u4e00-\u9fa5]+$/.test(query)) query = lunr.segmentit.doSegment(query).map(seg => '+' + seg.w).join(' '); + return query; +};