From 8595c99c0bb44e24065be60635967fb500aca6f2 Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Tue, 30 May 2017 11:54:37 +0800 Subject: [PATCH 1/4] docs(ssr): add ssr --- docs/de-de/ssr.md | 121 +++++++++++++++++++++ docs/index.html | 6 +- docs/ssr.html | 10 +- docs/ssr.md | 118 ++++++++++++++++++++ docs/zh-cn/ssr.md | 121 +++++++++++++++++++++ packages/docsify-server-renderer/README.md | 2 +- packages/docsify-server-renderer/index.js | 6 +- src/core/router/history/html5.js | 4 +- 8 files changed, 375 insertions(+), 13 deletions(-) create mode 100644 docs/de-de/ssr.md create mode 100644 docs/zh-cn/ssr.md diff --git a/docs/de-de/ssr.md b/docs/de-de/ssr.md new file mode 100644 index 000000000..ab5179359 --- /dev/null +++ b/docs/de-de/ssr.md @@ -0,0 +1,121 @@ +# Server client renderer + +See https://docsify.now.sh + +## Why SSR? +- Better SEO +- Feeling cool + +## Quick start + +Install `now` and `docsify-cli` in your project. + +```bash +npm i now -g +npm i docsify-cli -D +``` + +Edit `package.json`. If the documentation in `./docs` subdirectory. + +```json +{ + "name": "my-project", + "scripts": { + "start": "docsify start docs" + }, + "files": [ + "docs" + ], + "docsify": { + "config": { + "basePath": "/docs/", + "loadSidebar": true, + "loadNavbar": true, + "coverpage": true, + "name": "docsify" + } + } +} +``` + +!> The `basePath` just like webpack `publicPath`. You should config it if your docs is in the subdirectory. + +We can preview in the local to see if it works. + +```bash +npm start + +# open http://localhost:4000 +``` + +Publish it! + +```bash +now -p +``` + +Now, You have a support for SSR the docs site. + +## Custom template + +You can provide a templte for entire page's HTML. such as + +```html + + + + + docsify + + + + + + + + + + + + + +``` + +The template should contain these comments for rendered app content. + - `` + - `` + +## Configuration + +You can configure it in a special config file, or `package.json`. + +```js +module.exports = { + tempate: './ssr.html', + config: { + // docsify config + } +} +``` + +## Deploy for your VPS + +You can run `docsify start` directly on your Node server, or write your own server app with `docsify-server-renderer`. + +```js +var Renderer = require('docsify-server-renderer') +var readFileSync = require('fs').readFileSync + +// init +var renderer = new Renderer({ + template: readFileSync('./docs/index.template.html', 'utf-8')., + config: { + name: 'docsify', + repo: 'qingwei-li/docsify' + } +}) + +renderer.renderToString(url) + .then(html => {}) + .catch(err => {}) +``` diff --git a/docs/index.html b/docs/index.html index 703bfb8ae..2113a1f12 100644 --- a/docs/index.html +++ b/docs/index.html @@ -36,6 +36,8 @@ maxLevel: 4, subMaxLevel: 2, name: 'docsify', + // basePath: '/docs/', + routerMode: 'history', search: { noData: { '/de-de/': 'Keine Ergebnisse!', @@ -59,8 +61,8 @@ ] } - - + + diff --git a/docs/ssr.html b/docs/ssr.html index 1b24b897c..fec852886 100644 --- a/docs/ssr.html +++ b/docs/ssr.html @@ -7,7 +7,7 @@ - + @@ -22,8 +22,8 @@ - - - - + + + + diff --git a/docs/ssr.md b/docs/ssr.md index 39ce90428..ab5179359 100644 --- a/docs/ssr.md +++ b/docs/ssr.md @@ -1,3 +1,121 @@ # Server client renderer See https://docsify.now.sh + +## Why SSR? +- Better SEO +- Feeling cool + +## Quick start + +Install `now` and `docsify-cli` in your project. + +```bash +npm i now -g +npm i docsify-cli -D +``` + +Edit `package.json`. If the documentation in `./docs` subdirectory. + +```json +{ + "name": "my-project", + "scripts": { + "start": "docsify start docs" + }, + "files": [ + "docs" + ], + "docsify": { + "config": { + "basePath": "/docs/", + "loadSidebar": true, + "loadNavbar": true, + "coverpage": true, + "name": "docsify" + } + } +} +``` + +!> The `basePath` just like webpack `publicPath`. You should config it if your docs is in the subdirectory. + +We can preview in the local to see if it works. + +```bash +npm start + +# open http://localhost:4000 +``` + +Publish it! + +```bash +now -p +``` + +Now, You have a support for SSR the docs site. + +## Custom template + +You can provide a templte for entire page's HTML. such as + +```html + + + + + docsify + + + + + + + + + + + + + +``` + +The template should contain these comments for rendered app content. + - `` + - `` + +## Configuration + +You can configure it in a special config file, or `package.json`. + +```js +module.exports = { + tempate: './ssr.html', + config: { + // docsify config + } +} +``` + +## Deploy for your VPS + +You can run `docsify start` directly on your Node server, or write your own server app with `docsify-server-renderer`. + +```js +var Renderer = require('docsify-server-renderer') +var readFileSync = require('fs').readFileSync + +// init +var renderer = new Renderer({ + template: readFileSync('./docs/index.template.html', 'utf-8')., + config: { + name: 'docsify', + repo: 'qingwei-li/docsify' + } +}) + +renderer.renderToString(url) + .then(html => {}) + .catch(err => {}) +``` diff --git a/docs/zh-cn/ssr.md b/docs/zh-cn/ssr.md new file mode 100644 index 000000000..ab5179359 --- /dev/null +++ b/docs/zh-cn/ssr.md @@ -0,0 +1,121 @@ +# Server client renderer + +See https://docsify.now.sh + +## Why SSR? +- Better SEO +- Feeling cool + +## Quick start + +Install `now` and `docsify-cli` in your project. + +```bash +npm i now -g +npm i docsify-cli -D +``` + +Edit `package.json`. If the documentation in `./docs` subdirectory. + +```json +{ + "name": "my-project", + "scripts": { + "start": "docsify start docs" + }, + "files": [ + "docs" + ], + "docsify": { + "config": { + "basePath": "/docs/", + "loadSidebar": true, + "loadNavbar": true, + "coverpage": true, + "name": "docsify" + } + } +} +``` + +!> The `basePath` just like webpack `publicPath`. You should config it if your docs is in the subdirectory. + +We can preview in the local to see if it works. + +```bash +npm start + +# open http://localhost:4000 +``` + +Publish it! + +```bash +now -p +``` + +Now, You have a support for SSR the docs site. + +## Custom template + +You can provide a templte for entire page's HTML. such as + +```html + + + + + docsify + + + + + + + + + + + + + +``` + +The template should contain these comments for rendered app content. + - `` + - `` + +## Configuration + +You can configure it in a special config file, or `package.json`. + +```js +module.exports = { + tempate: './ssr.html', + config: { + // docsify config + } +} +``` + +## Deploy for your VPS + +You can run `docsify start` directly on your Node server, or write your own server app with `docsify-server-renderer`. + +```js +var Renderer = require('docsify-server-renderer') +var readFileSync = require('fs').readFileSync + +// init +var renderer = new Renderer({ + template: readFileSync('./docs/index.template.html', 'utf-8')., + config: { + name: 'docsify', + repo: 'qingwei-li/docsify' + } +}) + +renderer.renderToString(url) + .then(html => {}) + .catch(err => {}) +``` diff --git a/packages/docsify-server-renderer/README.md b/packages/docsify-server-renderer/README.md index e620f141c..8b02dd249 100644 --- a/packages/docsify-server-renderer/README.md +++ b/packages/docsify-server-renderer/README.md @@ -21,7 +21,7 @@ var renderer = new Renderer({ } }) -renderer.renderToString({ url }) +renderer.renderToString(url) .then(html => {}) .catch(err => {}) ``` diff --git a/packages/docsify-server-renderer/index.js b/packages/docsify-server-renderer/index.js index 0b667b6ff..d790a0f84 100644 --- a/packages/docsify-server-renderer/index.js +++ b/packages/docsify-server-renderer/index.js @@ -64,13 +64,13 @@ export default class Renderer { if (loadSidebar) { const name = loadSidebar === true ? '_sidebar.md' : loadSidebar - const sidebarFile = this._getPath(resolve(url, `../${name}`)) + const sidebarFile = this._getPath(resolve(url, `./${name}`)) this._renderHtml('sidebar', await this._render(sidebarFile, 'sidebar')) } if (loadNavbar) { const name = loadNavbar === true ? '_navbar.md' : loadNavbar - const navbarFile = this._getPath(resolve(url, `../${name}`)) + const navbarFile = this._getPath(resolve(url, `./${name}`)) this._renderHtml('navbar', await this._render(navbarFile, 'navbar')) } @@ -131,7 +131,7 @@ export default class Renderer { const fileName = basename(filePath) - await this._loadFile(cwd(filePath, '../..', fileName)) + return await this._loadFile(cwd(filePath, '../..', fileName)) } } } diff --git a/src/core/router/history/html5.js b/src/core/router/history/html5.js index fc9170353..89cc70001 100644 --- a/src/core/router/history/html5.js +++ b/src/core/router/history/html5.js @@ -51,11 +51,11 @@ export class HTML5History extends History { path = path.slice(0, queryIndex) } - const base = getPath(location.origin, this.getBasePath()) + const base = getPath(location.origin) const baseIndex = path.indexOf(base) if (baseIndex > -1) { - path = path.slice(baseIndex + base.length - 1) + path = path.slice(baseIndex + base.length) } return { From 7e169ad1540a08af12ade6345b2004a150ade501 Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Tue, 30 May 2017 12:05:25 +0800 Subject: [PATCH 2/4] docs(changelog): 4.1.0 --- CHANGELOG.md | 7 +++++++ docs/_sidebar.md | 1 + docs/configuration.md | 9 ++++++++- docs/de-de/_sidebar.md | 1 + docs/zh-cn/_sidebar.md | 1 + 5 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 497db0364..80eeb1b88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 4.1.0 / 2017-05-30 + + + * feat: Support server client renderer [See detail](//docsify.js.org/#/ssr) + * feat: Support HTML5 history API. `$docsify.routerMode = 'history'` + * Breaking change: Clean global API + ## 3.7.3 / 2017-05-22 * fix(render): find => filter, Compatible with old browser diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 60374a5e9..b4b3ebd98 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -18,5 +18,6 @@ - [Vue compatibility](vue.md) - [CDN](cdn.md) - [Offline Mode(PWA)](pwa.md) + - [(Server-client renderer(SSR)](ssr.md) - [Changelog](changelog.md) diff --git a/docs/configuration.md b/docs/configuration.md index 985391416..250d0b7a2 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -317,7 +317,7 @@ window.$docsify = { ``` ## format-updated -We can display the file update date through **{docsify-updated}** variable. And format it by `formatUpdated`. +We can display the file update date through **{docsify-updated}** variable. And format it by `formatUpdated`. See https://github.com/lukeed/tinydate#patterns ```js window.$docsify = { @@ -340,3 +340,10 @@ window.$docsify = { externalLinkTarget: '_self' // default: '_blank' } ``` + +## router-mode +```js +window.$docsify = { + routerMode: 'history' // default: 'hash' +} +``` diff --git a/docs/de-de/_sidebar.md b/docs/de-de/_sidebar.md index dac8531ca..f992cca14 100644 --- a/docs/de-de/_sidebar.md +++ b/docs/de-de/_sidebar.md @@ -18,5 +18,6 @@ - [Vue Kompatibilität](de-de/vue.md) - [CDN](de-de/cdn.md) - [Offline Modus (PWA)](de-de/pwa.md) + - [Server-client renderer (SSR)](de-de/ssr.md) - [Changelog](de-de/changelog.md) diff --git a/docs/zh-cn/_sidebar.md b/docs/zh-cn/_sidebar.md index f03656654..2a6cdc7fc 100644 --- a/docs/zh-cn/_sidebar.md +++ b/docs/zh-cn/_sidebar.md @@ -18,5 +18,6 @@ - [兼容 Vue](zh-cn/vue.md) - [CDN](zh-cn/cdn.md) - [离线模式(PWA)](zh-cn/pwa.md) + - [服务端渲染 (SSR)](zh-cn/ssr.md) - [Changelog](zh-cn/changelog.md) From 1ae0a9a845e8fdeac19bcf665c23e5fa760cab85 Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Tue, 30 May 2017 12:14:33 +0800 Subject: [PATCH 3/4] [build] 4.1.0 --- lib/docsify.js | 4 ++-- lib/docsify.min.js | 4 ++-- packages/docsify-server-renderer/package.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/docsify.js b/lib/docsify.js index 5ac16b895..6bd7fc924 100644 --- a/lib/docsify.js +++ b/lib/docsify.js @@ -3493,11 +3493,11 @@ var HTML5History = (function (History$$1) { path = path.slice(0, queryIndex); } - var base = getPath(location.origin, this.getBasePath()); + var base = getPath(location.origin); var baseIndex = path.indexOf(base); if (baseIndex > -1) { - path = path.slice(baseIndex + base.length - 1); + path = path.slice(baseIndex + base.length); } return { diff --git a/lib/docsify.min.js b/lib/docsify.min.js index 3e5717137..3719edef8 100644 --- a/lib/docsify.min.js +++ b/lib/docsify.min.js @@ -1,2 +1,2 @@ -!function(){"use strict";function e(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}function t(e){return"string"==typeof e||"number"==typeof e}function n(){}function r(e){return"function"==typeof e}function i(e){var t=["init","mounted","beforeEach","afterEach","doneEach","ready"];e._hooks={},e._lifecycle={},t.forEach(function(t){var n=e._hooks[t]=[];e._lifecycle[t]=function(e){return n.push(e)}})}function o(e,t,r,i){void 0===i&&(i=n);var o=r,a=e._hooks[t],s=function(e){var t=a[e];if(e>=a.length)i(o);else if("function"==typeof t)if(2===t.length)t(r,function(t){o=t,s(e+1)});else{var n=t(r);o=void 0!==n?n:o,s(e+1)}else s(e+1)};s(0)}function a(e,t){if(void 0===t&&(t=!1),"string"==typeof e){if(void 0!==window.Vue)return s(e);e=t?s(e):se[e]||(se[e]=s(e))}return e}function s(e,t){return t?e.querySelector(t):le.querySelector(e)}function l(e,t){return[].slice.call(t?e.querySelectorAll(t):le.querySelectorAll(e))}function c(e,t){return e=le.createElement(e),t&&(e.innerHTML=t),e}function u(e,t){return e.appendChild(t)}function p(e,t){return e.insertBefore(t,e.children[0])}function h(e,t,n){r(t)?window.addEventListener(e,t):e.addEventListener(t,n)}function g(e,t,n){r(t)?window.removeEventListener(e,t):e.removeEventListener(t,n)}function d(e,t,n){e&&e.classList[n?t:"toggle"](n||t)}function f(e){return e?(/\/\//.test(e)||(e="https://github.com/"+e),''):""}function m(e){var t='';return(ge?t+"
":"
"+t)+'
\x3c!--main--\x3e
'}function v(){var e=", 100%, 85%";return'
'}function y(e,t){return void 0===t&&(t=""),e&&e.length?(e.forEach(function(e){t+='
  • '+e.title+"
  • ",e.children&&(t+='
    • '+y(e.children)+"
    ")}),t):""}function b(e,t){return'

    '+t.slice(5).trim()+"

    "}function k(e){return""}function w(){var e=c("div");e.classList.add("progress"),u(ce,e),oe=e}function x(e,t){void 0===t&&(t=!1);var r=new XMLHttpRequest,i=function(){r.addEventListener.apply(r,arguments)},o=me[e];return o?{then:function(e){return e(o.content,o.opt)},abort:n}:(r.open("GET",e),r.send(),{then:function(o,a){if(void 0===a&&(a=n),t){var s=setInterval(function(e){return fe({step:Math.floor(5*Math.random()+1)})},500);i("progress",fe),i("loadend",function(e){fe(e),clearInterval(s)})}i("error",a),i("load",function(t){var n=t.target;if(n.status>=400)a(n);else{var i=me[e]={content:n.response,opt:{updatedAt:r.getResponseHeader("last-modified")}};o(i.content,i.opt)}})},abort:function(e){return 4!==r.readyState&&r.abort()}})}function _(e,t){e.innerHTML=e.innerHTML.replace(/var\(\s*--theme-color.*?\)/g,t)}function S(e,t){return t={exports:{}},e(t,t.exports),t.exports}function L(e,t){var n=[],r={};return e.forEach(function(e){var i=e.level||1,o=i-1;i>t||(r[o]?r[o].children=(r[o].children||[]).concat(e):n.push(e),r[i]=e)}),n}function C(e){if("string"!=typeof e)return"";var t=e.toLowerCase().trim().replace(/<[^>\d]+>/g,"").replace(Se,"").replace(/\s/g,"-").replace(/-+/g,"-").replace(/^(\d)/,"_$1"),n=_e[t];return n=_e.hasOwnProperty(t)?n+1:0,_e[t]=n,n&&(t=t+"-"+n),t}function E(e,t){return''+t+''}function $(e){return e.replace(/<(pre|template|code)[^>]*?>[\s\S]+?<\/(pre|template|code)>/g,function(e){return e.replace(/:/g,"__colon__")}).replace(/:(\w+?):/gi,he&&window.emojify||E).replace(/__colon__/g,":")}function T(e){var t={};return(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach(function(e){var n=e.replace(/\+/g," ").split("=");t[n[0]]=Le(n[1])}),t):t}function A(e){var t=[];for(var n in e)t.push((Ce(n)+"="+Ce(e[n])).toLowerCase());return t.length?"?"+t.join("&"):""}function P(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Te(e.join("/"))}function O(e,t){var n=function(e){return ce.classList.toggle("close")};e=a(e),h(e,"click",function(e){e.stopPropagation(),n()});var r=a(".sidebar");ge&&h(ce,"click",function(e){return ce.classList.contains("close")&&n()}),h(r,"click",function(e){return setTimeout(0)})}function j(){var e=a("section.cover");if(e){var t=e.getBoundingClientRect().height;window.pageYOffset>=t||e.classList.contains("hidden")?d(ce,"add","sticky"):d(ce,"remove","sticky")}}function M(e,t,n,r){t=a(t);var i,o=l(t,"a"),s=e.toURL(e.getCurrentPath());return o.sort(function(e,t){return t.href.length-e.href.length}).forEach(function(e){var t=e.getAttribute("href"),r=n?e.parentNode:e;0!==s.indexOf(t)||i?d(r,"remove","active"):(i=e,d(r,"add","active"))}),r&&(le.title=i?i.innerText+" - "+Pe:Pe),i}function q(){for(var e,t=a(".sidebar"),n=l(".anchor"),r=s(t,".sidebar-nav"),i=s(t,"li.active"),o=ce.scrollTop,c=0,u=n.length;co){e||(e=p);break}e=p}if(e){var h=Oe[e.getAttribute("data-id")];if(h&&h!==i&&(i&&i.classList.remove("active"),h.classList.add("active"),i=h,!je&&ce.classList.contains("sticky"))){var g=t.clientHeight,d=i.offsetTop+i.clientHeight+40,f=i.offsetTop>=r.scrollTop&&d<=r.scrollTop+g,m=d-0script").filter(function(e){return!/template/.test(e.type)})[0];if(!e)return!1;var t=e.innerText.trim();if(!t)return!1;setTimeout(function(e){window.__EXECUTE_RESULT__=new Function(t)()},0)}function B(e,t,n){return t="function"==typeof n?n(t):"string"==typeof n?be(n)(new Date(t)):t,e.replace(/{docsify-updated}/g,t)}function I(e){e||(e="not found"),this._renderTo(".markdown-section",e),!this.config.loadSidebar&&this._renderSidebar(),!1===this.config.executeScript||void 0===window.Vue||H()?this.config.executeScript&&H():setTimeout(function(e){var t=window.__EXECUTE_RESULT__;t&&t.$destroy&&t.$destroy(),window.__EXECUTE_RESULT__=(new window.Vue).$mount("#main")},0)}function z(e){var n=a(".app-name-link"),r=e.config.nameLink,i=e.route.path;if(n)if(t(e.config.nameLink))n.setAttribute("href",r);else if("object"==typeof r){var o=Object.keys(r).filter(function(e){return i.indexOf(e)>-1})[0];n.setAttribute("href",r[o])}}function D(e){var t=e.config;e.compiler=new Ae(t,e.router);var n=t.el||"#app",r=s("nav")||c("nav"),i=s(n),o="",a=ce;i?(t.repo&&(o+=f(t.repo)),t.coverpage&&(o+=v()),o+=m(t),e._renderTo(i,o,!0)):e.rendered=!0,t.mergeNavbar&&ge?a=s(".sidebar"):(r.classList.add("app-nav"),t.repo||r.classList.add("no-badge")),p(a,r),t.themeColor&&(le.head.innerHTML+=k(t.themeColor),ve(t.themeColor)),d(ce,"ready")}function W(e,t){return t[e]?W(t[e],t):e}function U(e){return/\.(md|html)$/g.test(e)?e:/\/$/g.test(e)?e+"README.md":e+".md"}function Y(e){var t=location.href.indexOf("#");location.replace(location.href.slice(0,t>=0?t:0)+"#"+e)}function G(e){var t,n=e.config,r=n.routerMode||"hash";t="history"===r&&de?new Fe(n):new Re(n),e.router=t,t.normalize(),He=e.route=t.parse(),e._updateRender(),t.onchange(function(n){if(t.normalize(),e.route=t.parse(),e._updateRender(),He.path===e.route.path)return void e.$resetEvents();e.$fetch(),He=e.route})}function V(e){O("button.sidebar-toggle",e.router),e.config.coverpage?!ge&&h("scroll",j):ce.classList.add("sticky")}function X(e,t,n,r,i){e=i?e:e.replace(/\/$/,""),(e=$e(e))&&x(r.router.getFile(e+t)).then(n,function(i){return X(e,t,n,r)})}function Z(e){var t=e.config,n=t.loadSidebar;if(e.rendered){var r=M(e.router,".sidebar-nav",!0,!0);n&&r&&(r.parentNode.innerHTML+=window.__SUB_SIDEBAR__),e._bindEventOnRendered(r),e._fetchCover(),e.$resetEvents(),o(e,"doneEach"),o(e,"ready")}else e.$fetch(function(t){return o(e,"ready")})}function J(e){[].concat(e.config.plugins).forEach(function(t){return r(t)&&t(e._lifecycle,e)})}function Q(){this._init()}var K=e(function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),ee=Object.assign||function(e){for(var t=arguments,n=Object.prototype.hasOwnProperty,r=1;r80?80:t):t=Math.floor(n/r*100),oe.style.opacity=1,oe.style.width=t>=95?"100%":t+"%",t>=95&&(clearTimeout(ae),ae=setTimeout(function(e){oe.style.opacity=0,oe.style.width="0%"},200))},me={},ve=function(e){if(!(window.CSS&&window.CSS.supports&&window.CSS.supports("(--v:red)"))){var t=l("style:not(.inserted),link");[].forEach.call(t,function(t){if("STYLE"===t.nodeName)_(t,e);else if("LINK"===t.nodeName){var n=t.getAttribute("href");if(!/\.css$/.test(n))return;x(n).then(function(t){var n=c("style",t);ue.appendChild(n),_(n,e)})}})}},ye={YYYY:"getFullYear",YY:"getYear",MM:function(e){return e.getMonth()+1},DD:"getDate",HH:"getHours",mm:"getMinutes",ss:"getSeconds"},be=function(e){var t=[],n=0;return e.replace(/([^{]*?)\w(?=\})/g,function(r,i,o){t.push(e.substring(n,o-1)),n=o+=r.length+1,t.push(function(e){return("00"+("string"==typeof ye[r]?e[ye[r]]():ye[r](e))).slice(-r.length)})}),n!==e.length&&t.push(e.substring(n)),function(e){for(var n="",r=0,i=e||new Date;r/g,">").replace(/"/g,""").replace(/'/g,"'")}function a(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function s(e,t){return e=e.source,t=t||"",function n(r,i){return r?(i=i.source||i,i=i.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(r,i),n):new RegExp(e,t)}}function l(){}function c(e){for(var t,n,r=arguments,i=1;iAn error occured:

    "+o(e.message+"",!0)+"
    ";throw e}}var p={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:l,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:l,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:l,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};p.bullet=/(?:[*+-]|\d+\.)/,p.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,p.item=s(p.item,"gm")(/bull/g,p.bullet)(),p.list=s(p.list)(/bull/g,p.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+p.def.source+")")(),p.blockquote=s(p.blockquote)("def",p.def)(),p._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",p.html=s(p.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,p._tag)(),p.paragraph=s(p.paragraph)("hr",p.hr)("heading",p.heading)("lheading",p.lheading)("blockquote",p.blockquote)("tag","<"+p._tag)("def",p.def)(),p.normal=c({},p),p.gfm=c({},p.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),p.gfm.paragraph=s(p.paragraph)("(?!","(?!"+p.gfm.fences.source.replace("\\1","\\2")+"|"+p.list.source.replace("\\1","\\3")+"|")(),p.tables=c({},p.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),t.rules=p,t.lex=function(e,n){return new t(n).lex(e)},t.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},t.prototype.token=function(e,t,n){for(var r,i,o,a,s,l,c,u,h,g=this,e=e.replace(/^ +$/gm,"");e;)if((o=g.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&g.tokens.push({type:"space"})),o=g.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),g.tokens.push({type:"code",text:g.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=g.rules.fences.exec(e))e=e.substring(o[0].length),g.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=g.rules.heading.exec(e))e=e.substring(o[0].length),g.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(t&&(o=g.rules.nptable.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},u=0;u ?/gm,""),g.token(o,t,!0),g.tokens.push({type:"blockquote_end"});else if(o=g.rules.list.exec(e)){for(e=e.substring(o[0].length),a=o[2],g.tokens.push({type:"list_start",ordered:a.length>1}),o=o[0].match(g.rules.item),r=!1,h=o.length,u=0;u1&&s.length>1||(e=o.slice(u+1).join("\n")+e,u=h-1)),i=r||/\n\n(?!\s*$)/.test(l),u!==h-1&&(r="\n"===l.charAt(l.length-1),i||(i=r)),g.tokens.push({type:i?"loose_item_start":"list_item_start"}),g.token(l,!1,n),g.tokens.push({type:"list_item_end"});g.tokens.push({type:"list_end"})}else if(o=g.rules.html.exec(e))e=e.substring(o[0].length),g.tokens.push({type:g.options.sanitize?"paragraph":"html",pre:!g.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(!n&&t&&(o=g.rules.def.exec(e)))e=e.substring(o[0].length),g.tokens.links[o[1].toLowerCase()]={href:o[2],title:o[3]};else if(t&&(o=g.rules.table.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},u=0;u])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:l,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:l,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,h.link=s(h.link)("inside",h._inside)("href",h._href)(),h.reflink=s(h.reflink)("inside",h._inside)(),h.normal=c({},h),h.pedantic=c({},h.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),h.gfm=c({},h.normal,{escape:s(h.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:s(h.text)("]|","~]|")("|","|https?://|")()}),h.breaks=c({},h.gfm,{br:s(h.br)("{2,}","*")(),text:s(h.gfm.text)("{2,}","*")()}),n.rules=h,n.output=function(e,t,r){return new n(t,r).output(e)},n.prototype.output=function(e){for(var t,n,r,i,a=this,s="";e;)if(i=a.rules.escape.exec(e))e=e.substring(i[0].length),s+=i[1];else if(i=a.rules.autolink.exec(e))e=e.substring(i[0].length),"@"===i[2]?(n=":"===i[1].charAt(6)?a.mangle(i[1].substring(7)):a.mangle(i[1]),r=a.mangle("mailto:")+n):(n=o(i[1]),r=n),s+=a.renderer.link(r,null,n);else if(a.inLink||!(i=a.rules.url.exec(e))){if(i=a.rules.tag.exec(e))!a.inLink&&/^/i.test(i[0])&&(a.inLink=!1),e=e.substring(i[0].length),s+=a.options.sanitize?a.options.sanitizer?a.options.sanitizer(i[0]):o(i[0]):i[0];else if(i=a.rules.link.exec(e))e=e.substring(i[0].length),a.inLink=!0,s+=a.outputLink(i,{href:i[2],title:i[3]}),a.inLink=!1;else if((i=a.rules.reflink.exec(e))||(i=a.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),!(t=a.links[t.toLowerCase()])||!t.href){s+=i[0].charAt(0),e=i[0].substring(1)+e;continue}a.inLink=!0,s+=a.outputLink(i,t),a.inLink=!1}else if(i=a.rules.strong.exec(e))e=e.substring(i[0].length),s+=a.renderer.strong(a.output(i[2]||i[1]));else if(i=a.rules.em.exec(e))e=e.substring(i[0].length),s+=a.renderer.em(a.output(i[2]||i[1]));else if(i=a.rules.code.exec(e))e=e.substring(i[0].length),s+=a.renderer.codespan(o(i[2],!0));else if(i=a.rules.br.exec(e))e=e.substring(i[0].length),s+=a.renderer.br();else if(i=a.rules.del.exec(e))e=e.substring(i[0].length),s+=a.renderer.del(a.output(i[1]));else if(i=a.rules.text.exec(e))e=e.substring(i[0].length),s+=a.renderer.text(o(a.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(i[0].length),n=o(i[1]),r=n,s+=a.renderer.link(r,null,n);return s},n.prototype.outputLink=function(e,t){var n=o(t.href),r=t.title?o(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,o(e[1]))},n.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},n.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;i.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},r.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'
    '+(n?e:o(e,!0))+"\n
    \n":"
    "+(n?e:o(e,!0))+"\n
    "},r.prototype.blockquote=function(e){return"
    \n"+e+"
    \n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n){return"'+e+"\n"},r.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},r.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"\n"},r.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},r.prototype.paragraph=function(e){return"

    "+e+"

    \n"},r.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
    \n"},r.prototype.tablerow=function(e){return"\n"+e+"\n"},r.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">")+e+"\n"},r.prototype.strong=function(e){return""+e+""},r.prototype.em=function(e){return""+e+""},r.prototype.codespan=function(e){return""+e+""},r.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},r.prototype.del=function(e){return""+e+""},r.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(a(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:"))return""}var i='
    "},r.prototype.image=function(e,t,n){var r=''+n+'":">"},r.prototype.text=function(e){return e},i.parse=function(e,t,n){return new i(t,n).parse(e)},i.prototype.parse=function(e){var t=this;this.inline=new n(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var r="";this.next();)r+=t.tok();return r},i.prototype.next=function(){return this.token=this.tokens.pop()},i.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},i.prototype.parseText=function(){for(var e=this,t=this.token.text;"text"===this.peek().type;)t+="\n"+e.next().text;return this.inline.output(t)},i.prototype.tok=function(){var e=this;switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var t,n,r,i,o="",a="";for(r="",t=0;te.length)break e;if(!(b instanceof i)){u.lastIndex=0;var k=u.exec(b),w=1;if(!k&&g&&v!=o.length-1){if(u.lastIndex=y,!(k=u.exec(e)))break;for(var x=k.index+(h?k[1].length:0),_=k.index+k[0].length,S=v,L=y,C=o.length;S=L&&(++v,y=L);if(o[v]instanceof i||o[S-1].greedy)continue;w=S-v, -b=e.slice(y,L),k.index-=y}if(k){h&&(d=k[1].length);var x=k.index+d,k=k[0].slice(d),_=x+k.length,E=b.slice(0,x),$=b.slice(_),T=[v,w];E&&T.push(E);var A=new i(s,p?r.tokenize(k,p):k,f,k,g);T.push(A),$&&T.push($),Array.prototype.splice.apply(o,T)}}}}}return o},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var i,o=0;i=n[o++];)i(t)}}},i=r.Token=function(e,t,n,r,i){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!i};if(i.stringify=function(e,t,n){if("string"==typeof e)return e;if("Array"===r.util.type(e))return e.map(function(n){return i.stringify(n,t,e)}).join("");var o={type:e.type,content:i.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n};if("comment"==o.type&&(o.attributes.spellcheck="true"),e.alias){var a="Array"===r.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(o.classes,a)}r.hooks.run("wrap",o);var s=Object.keys(o.attributes).map(function(e){return e+'="'+(o.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+(s?" "+s:"")+">"+o.content+""},!t.document)return t.addEventListener?(t.addEventListener("message",function(e){var n=JSON.parse(e.data),i=n.language,o=n.code,a=n.immediateClose;t.postMessage(r.highlight(o,r.languages[i],i)),a&&t.close()},!1),t.Prism):t.Prism;var o=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return o&&(r.filename=o.src,document.addEventListener&&!o.hasAttribute("data-manual")&&("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(r.highlightAll):window.setTimeout(r.highlightAll,16):document.addEventListener("DOMContentLoaded",r.highlightAll))),t.Prism}();e.exports&&(e.exports=n),void 0!==ke&&(ke.Prism=n),n.languages.markup={comment://,prolog:/<\?[\w\W]+?\?>/,doctype://i,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},n.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),n.languages.xml=n.languages.markup,n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:{pattern:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},n.languages.css.atrule.inside.rest=n.util.clone(n.languages.css),n.languages.markup&&(n.languages.insertBefore("markup","tag",{style:{pattern:/()[\w\W]*?(?=<\/style>)/i,lookbehind:!0,inside:n.languages.css,alias:"language-css"}}),n.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:n.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:n.languages.css}},alias:"language-css"}},n.languages.markup.tag)),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(true|false)\b/,function:/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,function:/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*\*?|\/|~|\^|%|\.{3}/}),n.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}}),n.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\\\|\\?[^\\])*?`/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}}}),n.languages.markup&&n.languages.insertBefore("markup","tag",{script:{pattern:/()[\w\W]*?(?=<\/script>)/i,lookbehind:!0,inside:n.languages.javascript,alias:"language-javascript"}}),n.languages.js=n.languages.javascript,function(){"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(){var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"};Array.prototype.forEach&&Array.prototype.slice.call(document.querySelectorAll("pre[data-src]")).forEach(function(t){for(var r,i=t.getAttribute("data-src"),o=t,a=/\blang(?:uage)?-(?!\*)(\w+)\b/i;o&&!a.test(o.className);)o=o.parentNode;if(o&&(r=(t.className.match(a)||[,""])[1]),!r){var s=(i.match(/\.(\w+)$/)||[,""])[1];r=e[s]||s}var l=document.createElement("code");l.className="language-"+r,t.textContent="",l.textContent="Loading…",t.appendChild(l);var c=new XMLHttpRequest;c.open("GET",i,!0),c.onreadystatechange=function(){4==c.readyState&&(c.status<400&&c.responseText?(l.textContent=c.responseText,n.highlightElement(l)):c.status>=400?l.textContent="✖ Error "+c.status+" while fetching file: "+c.statusText:l.textContent="✖ Error: File does not exist or is empty")},c.send(null)})},document.addEventListener("DOMContentLoaded",self.Prism.fileHighlight))}()}),_e={},Se=/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,.\/:;<=>?@\[\]^`{|}~]/g;C.clear=function(){_e={}};var Le=decodeURIComponent,Ce=encodeURIComponent,Ee=e(function(e){return/(:|(\/{2}))/.test(e)}),$e=e(function(e){return/\/$/g.test(e)?e:(e=e.match(/(\S*\/)[^\/]+$/))?e[1]:""}),Te=e(function(e){return e.replace(/^\/+/,"/").replace(/([^:])\/{2,}/g,"$1/")}),Ae=function(t,n){this.config=t,this.router=n,this.cacheTree={},this.toc=[],this.linkTarget=t.externalLinkTarget||"_blank",this.contentBase=n.getBasePath();var i,o=this._initRenderer(),a=t.markdown||{};r(a)?i=a(we,o):(we.setOptions(ee(a,{renderer:ee(o,a.renderer)})),i=we),this.compile=e(function(e){var n="";return e?(n=i(e),n=t.noEmoji?n:$(n),C.clear(),n):e})};Ae.prototype._initRenderer=function(){var e=new we.Renderer,t=this,n=t.linkTarget,r=t.router,i=t.toc,o=t.contentBase;return e.heading=function(e,t){var n={level:t,title:e};/{docsify-ignore}/g.test(e)&&(e=e.replace("{docsify-ignore}",""),n.title=e,n.ignoreSubHeading=!0),/{docsify-ignore-all}/g.test(e)&&(e=e.replace("{docsify-ignore-all}",""),n.title=e,n.ignoreAllSubs=!0);var o=C(e),a=r.toURL(r.getCurrentPath(),{id:o});return n.slug=a,i.push(n),"'+e+""},e.code=function(e,t){return void 0===t&&(t=""),'
    '+xe.highlight(e,xe.languages[t]||xe.languages.markup)+"
    "},e.link=function(e,t,i){var o="";return/:|(\/{2})/.test(e)?o=' target="'+n+'"':e=r.toURL(e,null,r.getCurrentPath()),t&&(t=' title="'+t+'"'),'"+i+""},e.paragraph=function(e){return/^!>/.test(e)?b("tip",e):/^\?>/.test(e)?b("warn",e):"

    "+e+"

    "},e.image=function(e,t,n){var r=e,i=t?' title="'+t+'"':"";return Ee(e)||(r=P(o,e)),''+n+'"},e},Ae.prototype.sidebar=function(e,t){var n=this.router.getCurrentPath(),r="";if(e)r=this.compile(e),r=r&&r.match(/]*>([\s\S]+)<\/ul>/g)[0];else{var i=this.cacheTree[n]||L(this.toc,t);r=y(i,"