From 70a0a72f79da663b19e856fa04e30c3bd5823e3d Mon Sep 17 00:00:00 2001 From: zyh Date: Fri, 19 Mar 2021 17:41:05 +0800 Subject: [PATCH] add dark-mode & add shadow --- layout/_partial/footer.ejs | 19 ++--- layout/_partial/head.ejs | 16 ++++- layout/_partial/header.ejs | 2 +- source/dist/build.css | 138 ++++++++++++++++++++++--------------- source/dist/dark.js | 2 + 5 files changed, 110 insertions(+), 67 deletions(-) create mode 100644 source/dist/dark.js diff --git a/layout/_partial/footer.ejs b/layout/_partial/footer.ejs index 3c3082d..e32d49c 100644 --- a/layout/_partial/footer.ejs +++ b/layout/_partial/footer.ejs @@ -1,18 +1,19 @@ - <% if (config.aomori_gitalk){ %> <% } %> + <%- js('dist/build.js?' + theme.version) %> <%- js('dist/custom.js?' + theme.version) %> diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs index e4f6285..bf5eb66 100644 --- a/layout/_partial/head.ejs +++ b/layout/_partial/head.ejs @@ -57,6 +57,20 @@ window.aomori_logo_typed_animated = <%= config.aomori_logo_typed_animated || false %> window.aomori_search_algolia = <%= config.aomori_search_algolia || false %> - + diff --git a/layout/_partial/header.ejs b/layout/_partial/header.ejs index 317c7cb..3658a11 100644 --- a/layout/_partial/header.ejs +++ b/layout/_partial/header.ejs @@ -3,7 +3,7 @@
<% if (config.aomori_logo){ %>
- <%= config.author %> + <%= config.author %>
<% } %>
diff --git a/source/dist/build.css b/source/dist/build.css index a689ff7..380c57f 100644 --- a/source/dist/build.css +++ b/source/dist/build.css @@ -42,7 +42,7 @@ progress,sub,sup { } .form-input,body,mark { - color: #3b4351 + color: var(--text-title); } ol,ol ol,ol ul,ul,ul ol,ul ul { @@ -64,14 +64,16 @@ ol,ol ol,ol ul,ul,ul ol,ul ul { } :root { - --color-bg: #f0f3f6; - --color-light: #119da4; - --color-main: #13505b; - --color-shadow: #dadee4; - --color-white: #66758c; - --color-white-light: #fff; - --color-black: #292525; - --color-post-main: #4c4e4d; + --body-background: #f0f3f6; /*网页背景*/ + --color-primary: #119da4; /*时间,标签,分类中间的小杠杠*/ + --color-main: #13505b; /*鼠标指向标签时的颜色*/ + --color-shadow: #a5a5b4; /*组件下方的阴影*/ + --color-white: #66758c; /*搜索标签小工具上的字体颜色*/ + --card-background: #fff; /*文章的背景*/ + --color-black: #292525; /*鼠标指向标题时的颜色*/ + --text-title: #353535; /*文章标题的颜色*/ + --text: #4c4e4d; /*文章正文的颜色*/ + --code-background: #f8f8f8; /*代码块背景的颜色*/ --color-post-mark: #ff0; --plyr-color-main: #119da4; --swiper-theme-color: #007aff; @@ -94,6 +96,26 @@ ol,ol ol,ol ul,ul,ul ol,ul ul { }[type=search],[type=search] { -webkit-appearance: textfield; outline-offset: -2px +}[data-theme=dark] { + --body-background: #424242; + --card-background: #353535; + --footer-background: var(--card-background); + --text-title: rgba(255, 255, 255, 0.86); + --text: var(--text-title); + --code-background: #bcbcbc; + --text-lighter: rgba(255, 255, 255, 0.3); + --text-light: rgba(255, 255, 255, 0.66); + --text-strong: rgba(255, 255, 255, 0.9); + --color-main: rgba(255, 255, 255, 0.5); + --mask-color: rgba(0, 0, 0, 0.3); + --scroll-track: #646464; + --scroll-background: var(--body-background); + --color-shadow: #211e2a; + --color-primary: #46aaff; + --color-white: #ccc; + --color-black: #040404 +}[data-theme=dark] img { + opacity: .8 } .btn,a,summary { @@ -606,7 +628,7 @@ dl dd { } .form-input,.form-select { - background: #fff; + background: var(--card-background); outline: 0; -moz-appearance: none } @@ -5406,8 +5428,8 @@ a.text-error:visited { display: block; overflow-x: auto; padding: .5em; - color: #333; - background: #f8f8f8 + color: var(--color-black); + background: var(--code-background) } .hljs-comment,.hljs-quote { @@ -8265,7 +8287,7 @@ a.plyr__control { .post-inner-html { line-height: 1.8; - color: var(--color-post-main); + color: var(--text); word-wrap: break-word; -webkit-font-smoothing: antialiased } @@ -8309,7 +8331,7 @@ a.plyr__control { margin-bottom: 10px; padding: 0; font-weight: inherit; - color: var(--color-post-main); + color: var(--text); background-color: transparent } @@ -8327,11 +8349,11 @@ a.plyr__control { } .post-inner-html h1 a,.post-inner-html h2 a,.post-inner-html h3 a,.post-inner-html h4 a,.post-inner-html h5 a,.post-inner-html h6 a { - color: var(--color-post-main) + color: var(--text) } .post-inner-html h1 a,.post-inner-html h1 abbr[title],.post-inner-html h1 em,.post-inner-html h1 u,.post-inner-html h2 a,.post-inner-html h2 abbr[title],.post-inner-html h2 em,.post-inner-html h2 u,.post-inner-html h3 a,.post-inner-html h3 abbr[title],.post-inner-html h3 em,.post-inner-html h3 u,.post-inner-html h4 a,.post-inner-html h4 abbr[title],.post-inner-html h4 em,.post-inner-html h4 u,.post-inner-html h5 a,.post-inner-html h5 abbr[title],.post-inner-html h5 em,.post-inner-html h5 u,.post-inner-html h6 a,.post-inner-html h6 abbr[title],.post-inner-html h6 em,.post-inner-html h6 u { - border-bottom-color: var(--color-post-main) + border-bottom-color: var(--text) } .post-inner-html h1 { @@ -8386,7 +8408,7 @@ a.plyr__control { .post-inner-html p code { padding: 3px 5px; - background: var(--color-bg); + background: var(--body-background); font-size: 13px; border-radius: 3px } @@ -8462,7 +8484,7 @@ a.plyr__control { } .post-inner-html table tbody tr:nth-child(odd) td,.post-inner-html table tbody tr:nth-child(odd) th { - background-color: var(--color-bg) + background-color: var(--body-background) } .post-inner-html table tbody tr:last-child td,.post-inner-html table tbody tr:last-child th { @@ -8475,8 +8497,8 @@ a.plyr__control { } .post-inner-html a,.post-inner-html a:visited { - color: var(--color-light); - border-bottom-color: var(--color-light) + color: var(--color-primary); + border-bottom-color: var(--color-primary) } .post-inner-html a { @@ -8558,7 +8580,7 @@ a.plyr__control { .post-inner-html abbr[title] { padding-bottom: .05em; cursor: help; - border-bottom: 1px dotted var(--color-post-main) + border-bottom: 1px dotted var(--text) } .post-inner-html dfn { @@ -8567,7 +8589,7 @@ a.plyr__control { .post-inner-html mark { background: var(--color-post-mark); - color: var(--color-post-main) + color: var(--text) } .post-inner-html q { @@ -8590,7 +8612,7 @@ a.plyr__control { } body { - background-color: var(--color-bg); + background-color: var(--body-background); font: 14px/1 PingFangSC,'Microsoft Yahei',Microsoft Sans Serif,sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; @@ -8611,7 +8633,7 @@ a,a:visited { } a:hover { - color: var(--color-light) + color: var(--color-primary) } button { @@ -8722,14 +8744,15 @@ button { .header .header-menu-inner a { /* margin:0 20px 0 0; *//* color:var(--color-type); *//* font-size:14px; *//* letter-spacing:0; */ border-radius: 8px; - color: #171321; + color: var(--text); font-size: 16px; padding: 0 10px; } .header .header-menu-inner a:active,.header .header-menu-inner a:hover { /* letter-spacing:1px */ - background: #ffffff; + background: var(--card-background); + box-shadow: 0 8px 12px var(--color-shadow); } .header .header-menu-inner a::after,.header .header-menu-inner a::before { @@ -8779,7 +8802,7 @@ button { } .header .header-menu-social a:hover { - fill: var(--color-light) + fill: var(--color-primary) } .header .header-menu-mobile { @@ -8815,7 +8838,7 @@ button { } .header-menu-mobile-menu-bg { - background: var(--color-white-light); + background: var(--card-background); height: 100vh; left: 0; position: absolute; @@ -8915,7 +8938,7 @@ button { height: auto; max-height: calc(100vh - 140px); margin-bottom: 20px; - border: 2px solid var(--color-white-light); + border: 2px solid var(--card-background); border-radius: 8px; overflow: hidden; z-index: 10; @@ -8974,7 +8997,7 @@ button { } .sidebar .search-result,.sidebar .widget { - background: var(--color-white-light); + background: var(--card-background); width: 100% } @@ -9009,7 +9032,8 @@ button { margin-bottom: 20px; max-height: calc(100vh - 210px); overflow-y: scroll; - padding: 20px + padding: 20px; + box-shadow: 0 8px 12px var(--color-shadow) } .sidebar .widget .widget-wrap:first-child { @@ -9089,7 +9113,7 @@ button { } .sidebar .widget .widget-recent-posts li::before { - background: var(--color-light); + background: var(--color-primary); border-radius: 2px; content: ''; height: 5px; @@ -9100,7 +9124,7 @@ button { } #backtop,.index .article { - background: var(--color-white-light); + background: var(--card-background); border-radius: 8px } @@ -9114,13 +9138,13 @@ button { display: flex } -.index .article,.tools div { +.index .article, .tools div, .search { -webkit-box-shadow: 0 8px 12px var(--color-shadow); box-shadow: 0 8px 12px var(--color-shadow) } #backtop,#change-mode { - background: var(--color-white-light); + background: var(--card-background); border-radius: 8px; cursor: pointer; display: none; @@ -9167,8 +9191,8 @@ button { width: 40px; height: 20px; line-height: 20px; - color: var(--color-white-light); - background-color: var(--color-light); + color: var(--card-background); + background-color: var(--color-primary); font-size: 12px; font-weight: 700; text-align: center; @@ -9283,7 +9307,7 @@ button { -webkit-box-align: center; -ms-flex-align: center; align-items: center; - border-left: 3px solid var(--color-light); + border-left: 3px solid var(--color-primary); color: var(--color-white); display: -webkit-box; display: -ms-flexbox; @@ -9296,7 +9320,7 @@ button { -webkit-box-align: center; -ms-flex-align: center; align-items: center; - border-left: 3px solid var(--color-light); + border-left: 3px solid var(--color-primary); display: -webkit-box; display: -ms-flexbox; display: flex; @@ -9368,7 +9392,7 @@ button { -webkit-box-align: center; -ms-flex-align: center; align-items: center; - border-left: 3px solid var(--color-light); + border-left: 3px solid var(--color-primary); display: -webkit-box; display: -ms-flexbox; display: flex; @@ -9386,7 +9410,7 @@ button { } .post .article,.tweet .article { - background: var(--color-white-light); + background: var(--card-background); border-radius: 8px; margin-bottom: 20px; padding: 20px; @@ -9440,7 +9464,7 @@ button { -webkit-box-align: center; -ms-flex-align: center; align-items: center; - border-left: 3px solid var(--color-light); + border-left: 3px solid var(--color-primary); color: var(--color-white); display: -webkit-box; display: -ms-flexbox; @@ -9453,7 +9477,7 @@ button { -webkit-box-align: center; -ms-flex-align: center; align-items: center; - border-left: 3px solid var(--color-light); + border-left: 3px solid var(--color-primary); display: -webkit-box; display: -ms-flexbox; display: flex; @@ -9477,7 +9501,7 @@ button { -webkit-box-align: center; -ms-flex-align: center; align-items: center; - border-left: 3px solid var(--color-light); + border-left: 3px solid var(--color-primary); color: var(--color-white); display: -webkit-box; display: -ms-flexbox; @@ -9521,7 +9545,7 @@ button { } .post .article .article-copyright p,.tweet .article .article-copyright p { - border-left: 3px solid var(--color-light); + border-left: 3px solid var(--color-primary); font-size: 13px; line-height: 1.6; margin: 0; @@ -9534,7 +9558,7 @@ button { } .post .article .article-refer p,.post .article .article-reprint p,.tweet .article .article-refer p,.tweet .article .article-reprint p { - border-left: 3px solid var(--color-light); + border-left: 3px solid var(--color-primary); font-size: 13px; line-height: 1.6; margin-bottom: 10px; @@ -9574,7 +9598,7 @@ button { -webkit-box-align: center; -ms-flex-align: center; align-items: center; - background-color: var(--color-white-light); + background-color: var(--card-background); border-radius: 50%; -webkit-box-shadow: 0 2px 4px 0 rgba(0,0,0,.04); box-shadow: 0 2px 4px 0 rgba(0,0,0,.04); @@ -9598,11 +9622,11 @@ button { } .post .article .share .share-item:hover,.tweet .article .share .share-item:hover { - fill: var(--color-light) + fill: var(--color-primary) } .archives-wrap { - background: var(--color-white-light); + background: var(--card-background); border-radius: 8px; margin-bottom: 20px; padding: 20px @@ -9632,7 +9656,7 @@ button { .footer { font-size: 13px; width: 100%; - position: fixed; + /* position: fixed; */ left: 0; bottom: 0; z-index: 1 @@ -9660,7 +9684,7 @@ button { } .footer-inner a:hover { - color: var(--color-white-light) + color: var(--card-background) } .pagination { @@ -9674,7 +9698,8 @@ button { .pagination .extend,.pagination .page-number { padding: 10px; margin: 0 5px; - background: var(--color-white-light); + background: var(--card-background); + box-shadow: 0 8px 12px var(--color-shadow); border-radius: 8px } @@ -9683,7 +9708,7 @@ button { } .pagination .page-number:hover { - color: var(--color-light) + color: var(--color-primary) } .pagination .page-number.current { @@ -9696,11 +9721,11 @@ button { } .pagination .extend:hover { - color: var(--color-light) + color: var(--color-primary) } .comments { - background: var(--color-white-light); + background: var(--card-background); border-radius: 8px; position: relative } @@ -9710,9 +9735,10 @@ button { } .friends .article,.friends-links a { - background: var(--color-white-light); + background: var(--card-background); border-radius: 8px; margin-bottom: 20px; + box-shadow: 0 8px 12px var(--color-shadow); position: relative } diff --git a/source/dist/dark.js b/source/dist/dark.js new file mode 100644 index 0000000..786affc --- /dev/null +++ b/source/dist/dark.js @@ -0,0 +1,2 @@ +function _createForOfIteratorHelperLoose(e,t){var n;if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator])return(n=e[Symbol.iterator]()).next.bind(n);if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n
'+r+'
'+t+'
'+n+"
"},h='如需完整体验请针对 disq.us | disquscdn.com | disqus.com 启用代理并 尝试完整 Disqus 模式 | 强制完整 Disqus 模式',m=function(e){return o(e,{method:"GET"}).then((function(e){return i.all([e.ok,e.status,e.json(),e.headers])})).then((function(e){var t=e[0],n=e[1],r=e[2],o=e[3];if(t)return{ok:t,status:n,data:r,headers:o};throw new Error})).catch((function(e){throw e}))},g=function(e,t){try{r.setItem(e,t)}catch(e){}},v=function(e){function t(e){return e<10?"0"+e:e}return e=Date.parse(new Date(e)),(e=new Date(e+288e5)).getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())+" "+t(e.getHours())+":"+t(e.getMinutes())};function y(){var e;t.DISQUS?t.DISQUS.reset({reload:!0,config:function(){this.page.identifier=C.config.identifier,this.page.url=C.config.url,this.page.title=C.config.title}}):(e=n.createElement("script"),a(u).innerHTML='
评论完整模式加载中... 如果长时间无法加载,请针对 disq.us | disquscdn.com | disqus.com 启用代理,或切换至 评论基础模式
',a("dsqjs-force-dsqjs").addEventListener(l,E),e.src="https://"+C.config.shortname+".disqus.com/embed.js",e.setAttribute("data-timestamp",+new Date),(n.head||n.body).appendChild(e))}function b(){function e(){t.length===n&&n===r?T():t.length===n&&E()}a(u).innerHTML='
正在检查 Disqus 能否访问...
';for(var t=["disqus.com",C.config.shortname+".disqus.com"],n=0,r=0,o=0,i=t;o
评论基础模式加载中... '+h+"
"+function(e,t){return'
'}(d,C.config.siteName)+'

    评论列表加载中...

加载更多评论
',x(),a("dsqjs-order-"+C.sortType).setAttribute("checked","true"),t()}else{if(0!==n.code||1===n.response.length)throw new Error;c('当前 Thread 尚未创建。是否切换至 完整 Disqus 模式?'),a("dsqjs-force-disqus").addEventListener(l,T)}})).catch(S);var t=function e(t){function o(){for(var e,t=_createForOfIteratorHelperLoose(s);!(e=t()).done;)e.value.removeEventListener("change",p);i.removeEventListener(l,f);for(var n,r=_createForOfIteratorHelperLoose(u);!(n=r()).done;)n.value.removeEventListener(l,b)}void 0===t&&(t="");var i=a("dsqjs-load-more"),s=n.getElementsByClassName("dsqjs-order-radio"),u=n.getElementsByClassName("dsqjs-has-more-btn"),f=function(){o(),e(C.page.next)},p=function(t){var n=t.target;C.sortType=n.getAttribute("value"),g(d,C.sortType),o(),C.page.comment=[],C.page.next="",a("dsqjs-post-container").innerHTML='

正在切换排序方式...

',i.classList.add("dsqjs-hide"),e()},v=""===t?"":"&cursor="+t;function y(e){var t=e.createdAt;return Date.parse(new Date(t))}function w(e,t){return e.parent&&t.parent?y(e)-y(t):0}i.classList.add("dsqjs-disabled");var T=C.config.api+"3.0/threads/listPostsThreaded?forum="+C.config.shortname+"&thread="+C.page.id+v+"&api_key="+k()+"&order="+C.sortType;m(T).then((function(e){var t,n=e.data;if(0===n.code&&0",x(),a("dsqjs-force-disqus").addEventListener(l,E)}})).catch((function(){""===t?S():(i.classList.remove("dsqjs-disabled"),i.innerHTML="加载更多评论失败,点击重试",i.addEventListener(l,f))}))},r=function(e){function t(e){return e.comment.author.profileUrl?(e.comment.avatarEl='",e.comment.authorEl='"):(e.comment.avatarEl='',e.comment.authorEl='"),C.config.adminLabel&&e.isPrimary&&(e.comment.authorEl+=''+C.config.adminLabel+""),e}function r(e){var t="",r=e.isDeleted?"此评论已被删除":(t=e.authorEl+'',function(e){var t=n.createElement("div");t.innerHTML=e;for(var r,o=_createForOfIteratorHelperLoose(t.getElementsByTagName("a"));!(r=o()).done;){var i=r.value,s=decodeURIComponent(i.href.replace(/https:\/\/disq.us\/url\?url=/g,"")).replace(/(.*):.+cuid=.*/,"$1");i.href=s,i.innerHTML=s,i.rel="external noopener nofollow noreferrer",i.target="_blank"}return t.innerHTML}(o(e.message)));return p(e,t,r)}function o(e){return e.replace("/a.disquscdn.com/ig","c.disquscdn.com")}var i,s,l,u="";function d(e){return{comment:e,author:e.author.name,isPrimary:!!C.config.admin&&e.author.username===C.config.admin,children:l(+e.id),hasMore:e.hasMore}}i=[],s=[],l=function(e){if(0===s.length)return null;for(var t,n=[],r=_createForOfIteratorHelperLoose(s);!(t=r()).done;){var o=t.value;o.parent===e&&n.unshift(d(o))}return n.length?n:null},e.forEach((function(e){(e.parent?s:i).push(e)})),i.map(d).map((function(e){e.children&&(e.nesting=1);var n="";(e=t(e)).hasMore&&(n='

切换至 完整 Disqus 模式 显示更多回复

'),u+='
  • '+r(e.comment)+function e(n){var o=n.nesting,i=n.children||[];if(i){var s="";s=o':'
      ';return i.map((function(n){(n=t(n)).nesting=o+1;var i="";n.hasMore&&(i='

      切换至 完整 Disqus 模式 显示更多回复

      '),s+='
    • '+r(n.comment)+e(n)+i+"
    • "})),0!==(s+="
    ").length?s:void 0}}(e)+n+"
  • "})),c("你可能无法访问 Disqus,已启用评论基础模式。"+h),a("dsqjs-post-container").innerHTML=u,x()}}function S(e){console.log(e),c('评论基础模式加载失败,是否 重载尝试完整 Disqus 模式 ?'),a("dsqjs-reload-dsqjs").addEventListener(l,w),a("dsqjs-reload-disqus").addEventListener(l,b)}function E(){g("dsqjs_mode","dsqjs"),w()}function T(){g("dsqjs_mode","disqus"),y()}var C={},j=n.location.origin+n.location.pathname+n.location.search;C.config=s({api:"https://disqus.skk.moe/disqus/",identifier:j,url:j,title:n.title,siteName:"",nesting:parseInt(e.nesting)||4,nocomment:"这里冷冷清清的,一条评论都没有"},e),C.page={};var q=C.config.apikey,k=function(){return Array.isArray(q)?q[Math.floor(Math.random()*q.length)]:q};t.disqus_config=function(){this.page.url=C.config.url,this.page.identifier=C.config.identifier,this.page.title=C.config.title},a(u).innerHTML='
    ',o&&r&&i?(C.mode=r.getItem("dsqjs_mode"),C.sortType=r.getItem(d)||r.getItem("disqus.sort"),C.sortType||(g(d,"desc"),C.sortType="desc"),("disqus"===C.mode?y:"dsqjs"===C.mode?w:b)()):(c("你的浏览器版本过低,不兼容评论基础模式。"+h),x())}(window,document,localStorage,fetch,Promise)}!function(e,t,n){function r(e){return isNaN(e)||e==1/0||e<0?void 0:e}function o(e){return Math.random().toString(36).slice(-e)}function i(e){return Math.ceil(Math.random()*(e-1))+1}var s=e.screen,a=encodeURIComponent,c=Math.max,l=e.performance,u=l&&l.timing;function d(){var l=[o(i(4))+"="+o(i(6)),"ga="+e.ga_tid,"dt="+a(t.title),"de="+a(t.characterSet||t.charset),"dr="+a(t.referrer),"ul="+(n.language||n.browserLanguage||n.userLanguage),"sd="+s.colorDepth+"-bit","sr="+s.width+"x"+s.height,"vp="+c(t.documentElement.clientWidth,e.innerWidth||0)+"x"+c(t.documentElement.clientHeight,e.innerHeight||0),"plt="+r(u.loadEventStart-u.navigationStart||0),"dns="+r(u.domainLookupEnd-u.domainLookupStart||0),"pdt="+r(u.responseEnd-u.responseStart||0),"rrt="+r(u.redirectEnd-u.redirectStart||0),"tcp="+r(u.connectEnd-u.connectStart||0),"srt="+r(u.responseStart-u.requestStart||0),"dit="+r(u.domInteractive-u.domLoading||0),"clt="+r(u.domContentLoadedEventStart-u.navigationStart||0),"z="+Date.now()];e.__ga_img=new Image,e.__ga_img.src=e.ga_api+"?"+l.join("&")}e.cfga=d,"complete"===t.readyState?d():e.addEventListener("load",d)}(window,document,navigator) +/*! DisqusJS v1.3.0 | Sukka (https://skk.moe) | https://disqusjs.skk.moe | MIT License */;try{module.exports=DisqusJS}catch(e){}!function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.NProgress=t()}(this,(function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[class="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
    '};function o(e,t,n){return ee.fixedSidebarOffset?-1===c.className.indexOf(e.positionFixedClass)&&(c.className+=s+e.positionFixedClass):c.className=c.className.split(s+e.positionFixedClass).join(""));var u,d,f,p,h,m,g=t;i&&null!==document.querySelector(e.tocSelector)&&0l+e.headingsOffset+10?(u=g[0===n?n:n-1],!0):n===g.length-1?(u=g[g.length-1],!0):void 0})),d=document.querySelector(e.tocSelector).querySelectorAll("."+e.linkClass),n.call(d,(function(t){t.className=t.className.split(s+e.activeLinkClass).join("")})),f=document.querySelector(e.tocSelector).querySelectorAll("."+e.listItemClass),n.call(f,(function(t){t.className=t.className.split(s+e.activeListItemClass).join("")})),-1===(p=document.querySelector(e.tocSelector).querySelector("."+e.linkClass+".node-name--"+u.nodeName+'[href="#'+u.id+'"]')).className.indexOf(e.activeLinkClass)&&(p.className+=s+e.activeLinkClass),(h=p.parentNode)&&-1===h.className.indexOf(e.activeListItemClass)&&(h.className+=s+e.activeListItemClass),m=document.querySelector(e.tocSelector).querySelectorAll("."+e.listClass+"."+e.collapsibleClass),n.call(m,(function(t){-1===t.className.indexOf(e.isCollapsedClass)&&(t.className+=s+e.isCollapsedClass)})),p.nextSibling&&-1!==p.nextSibling.className.indexOf(e.isCollapsedClass)&&(p.nextSibling.className=p.nextSibling.className.split(s+e.isCollapsedClass).join("")),function t(n){return-1!==n.className.indexOf(e.collapsibleClass)&&-1!==n.className.indexOf(e.isCollapsedClass)?(n.className=n.className.split(s+e.isCollapsedClass).join(""),t(n.parentNode.parentNode)):n}(p.parentNode.parentNode))}}}},function(e,t){e.exports=function(e){function t(e){return e[e.length-1]}function n(e){return+e.nodeName.split("H").join("")}function r(t){var r={id:t.id,children:[],nodeName:t.nodeName,headingLevel:n(t),textContent:t.textContent.trim()};return e.includeHtml&&(r.childNodes=t.childNodes),r}var o=[].reduce;return{nestHeadingsArray:function(i){return o.call(i,(function(o,i){return function(o,i){for(var s=r(o),a=n(o),c=i,l=t(c),u=a-(l?l.headingLevel:0);0=e.collapseDepth&&(s.isCollapsed=!0),c.push(s)}(r(i),o.nest),o}),{nest:[]})},selectHeadings:function(t,n){var r=n;e.ignoreSelector&&(r=n.split(",").map((function(t){return t.trim()+":not("+e.ignoreSelector+")"})));try{return document.querySelector(t).querySelectorAll(r)}catch(t){return}}}}},function(e,t){t.initSmoothScrolling=function(e){function t(e){return e.slice(0,e.lastIndexOf("#"))}document.documentElement.style;var n=e.duration,r=location.hash?t(location.href):location.href;document.body.addEventListener("click",(function(o){function i(e){l=e-c,window.scrollTo(0,d.easing(l,u,p,h)),le.length)&&(t=e.length);for(var n=0,r=new Array(t);n>10|55296,1023&n|56320))}function n(){h()}var r,o,i,s,a,c,l,u,d,f,p,h,m,g,v,y,b,x,w,S="sizzle"+ +new Date,E=e.document,T=0,C=0,j=ce(),q=ce(),k=ce(),N=ce(),A=function(e,t){return e===t&&(p=!0),0},L={}.hasOwnProperty,D=[],O=D.pop,H=D.push,M=D.push,I=D.slice,P=function(e,t){for(var n=0,r=e.length;n+~]|"+_+")"+_+"*"),X=new RegExp(_+"|>"),G=new RegExp($),Y=new RegExp("^"+F+"$"),J={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+B),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},K=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,ee=/^[^{]+\{\s*\[native \w/,te=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ne=/[+~]/,re=new RegExp("\\\\[\\da-fA-F]{1,6}"+_+"?|\\\\([^\\r\\n\\f])","g"),oe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},se=ye((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{M.apply(D=I.call(E.childNodes),E.childNodes),D[E.childNodes.length].nodeType}catch(r){M={apply:D.length?function(e,t){H.apply(e,I.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function ae(e,t,n,r){var i,s,a,l,d,f,p,g=t&&t.ownerDocument,b=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==b&&9!==b&&11!==b)return n;if(!r&&(h(t),t=t||m,v)){if(11!==b&&(d=te.exec(e)))if(i=d[1]){if(9===b){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(g&&(a=g.getElementById(i))&&w(t,a)&&a.id===i)return n.push(a),n}else{if(d[2])return M.apply(n,t.getElementsByTagName(e)),n;if((i=d[3])&&o.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(i)),n}if(o.qsa&&!N[e+" "]&&(!y||!y.test(e))&&(1!==b||"object"!==t.nodeName.toLowerCase())){if(p=e,g=t,1===b&&(X.test(e)||z.test(e))){for((g=ne.test(e)&&me(t.parentNode)||t)===t&&o.scope||((l=t.getAttribute("id"))?l=l.replace(oe,ie):t.setAttribute("id",l=S)),s=(f=c(e)).length;s--;)f[s]=(l?"#"+l:":scope")+" "+ve(f[s]);p=f.join(",")}try{return M.apply(n,g.querySelectorAll(p)),n}catch(t){N(e,!0)}finally{l===S&&t.removeAttribute("id")}}}return u(e.replace(U,"$1"),t,n,r)}function ce(){var e=[];return function t(n,r){return e.push(n+" ")>i.cacheLength&&delete t[e.shift()],t[n+" "]=r}}function le(e){return e[S]=!0,e}function ue(e){var t=m.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),r=n.length;r--;)i.attrHandle[n[r]]=t}function fe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&se(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return le((function(t){return t=+t,le((function(n,r){for(var o,i=e([],n.length,t),s=i.length;s--;)n[o=i[s]]&&(n[o]=!(r[o]=n[o]))}))}))}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(r in o=ae.support={},a=ae.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!K.test(t||n&&n.nodeName||"HTML")},h=ae.setDocument=function(e){var r,s,c=e?e.ownerDocument||e:E;return c!=m&&9===c.nodeType&&c.documentElement&&(g=(m=c).documentElement,v=!a(m),E!=m&&(s=m.defaultView)&&s.top!==s&&(s.addEventListener?s.addEventListener("unload",n,!1):s.attachEvent&&s.attachEvent("onunload",n)),o.scope=ue((function(e){return g.appendChild(e).appendChild(m.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),o.attributes=ue((function(e){return e.className="i",!e.getAttribute("className")})),o.getElementsByTagName=ue((function(e){return e.appendChild(m.createComment("")),!e.getElementsByTagName("*").length})),o.getElementsByClassName=ee.test(m.getElementsByClassName),o.getById=ue((function(e){return g.appendChild(e).id=S,!m.getElementsByName||!m.getElementsByName(S).length})),o.getById?(i.filter.ID=function(e){var n=e.replace(re,t);return function(e){return e.getAttribute("id")===n}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&v){var n=t.getElementById(e);return n?[n]:[]}}):(i.filter.ID=function(e){var n=e.replace(re,t);return function(e){var t=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&v){var n,r,o,i=t.getElementById(e);if(i){if((n=i.getAttributeNode("id"))&&n.value===e)return[i];for(o=t.getElementsByName(e),r=0;i=o[r++];)if((n=i.getAttributeNode("id"))&&n.value===e)return[i]}return[]}}),i.find.TAG=o.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):o.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"!==e)return i;for(;n=i[o++];)1===n.nodeType&&r.push(n);return r},i.find.CLASS=o.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&v)return t.getElementsByClassName(e)},b=[],y=[],(o.qsa=ee.test(m.querySelectorAll))&&(ue((function(e){var t;g.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+_+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+_+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||y.push("~="),(t=m.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+_+"*name"+_+"*="+_+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")})),ue((function(e){e.innerHTML="";var t=m.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+_+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),g.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")}))),(o.matchesSelector=ee.test(x=g.matches||g.webkitMatchesSelector||g.mozMatchesSelector||g.oMatchesSelector||g.msMatchesSelector))&&ue((function(e){o.disconnectedMatch=x.call(e,"*"),x.call(e,"[s!='']:x"),b.push("!=",$)})),y=y.length&&new RegExp(y.join("|")),b=b.length&&new RegExp(b.join("|")),r=ee.test(g.compareDocumentPosition),w=r||ee.test(g.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},A=r?function(e,t){if(e===t)return p=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!o.sortDetached&&t.compareDocumentPosition(e)===n?e==m||e.ownerDocument==E&&w(E,e)?-1:t==m||t.ownerDocument==E&&w(E,t)?1:f?P(f,e)-P(f,t):0:4&n?-1:1)}:function(e,t){if(e===t)return p=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,s=[e],a=[t];if(!o||!i)return e==m?-1:t==m?1:o?-1:i?1:f?P(f,e)-P(f,t):0;if(o===i)return fe(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[r]===a[r];)r++;return r?fe(s[r],a[r]):s[r]==E?-1:a[r]==E?1:0}),m},ae.matches=function(e,t){return ae(e,null,null,t)},ae.matchesSelector=function(e,t){if(h(e),o.matchesSelector&&v&&!N[t+" "]&&(!b||!b.test(t))&&(!y||!y.test(t)))try{var n=x.call(e,t);if(n||o.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(re,t),e[3]=(e[3]||e[4]||e[5]||"").replace(re,t),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ae.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ae.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return J.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&G.test(n)&&(t=c(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var n=e.replace(re,t).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===n}},CLASS:function(e){var t=j[e+" "];return t||(t=new RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&j(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var o=ae.attr(r,e);return null==o?"!="===t:!t||(o+="","="===t?o===n:"!="===t?o!==n:"^="===t?n&&0===o.indexOf(n):"*="===t?n&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function k(e,t,n){return m(t)?x.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?x.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?x.grep(e,(function(e){return-1)[^>]*|#([\w-]+))$/;(x.fn.init=function(e,t,n){var r,o;if(!e)return this;if(n=n||N,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(x):x.makeArray(e,this);if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:A.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof x?t[0]:t,x.merge(this,x.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:g,!0)),q.test(r[1])&&x.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(o=g.getElementById(r[2]))&&(this[0]=o,this.length=1),this}).prototype=x.fn,N=x(g);var L=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}x.fn.extend({has:function(e){var t=x(e,this),n=t.length;return this.filter((function(){for(var e=0;e\x20\t\r\n\f]*)/i,fe=/^$|^module$|\/(?:java|ecma)script/i,pe=g.createDocumentFragment().appendChild(g.createElement("div"));(le=g.createElement("input")).setAttribute("type","radio"),le.setAttribute("checked","checked"),le.setAttribute("name","t"),pe.appendChild(le),h.checkClone=pe.cloneNode(!0).cloneNode(!0).lastChild.checked,pe.innerHTML="",h.noCloneChecked=!!pe.cloneNode(!0).lastChild.defaultValue,pe.innerHTML="",h.option=!!pe.lastChild;var he={thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function me(e,t){var n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&j(e,t)?x.merge([e],n):n}function ge(e,t){for(var n=0,r=e.length;n",""]);var ve=/<|&#?\w+;/;function ye(e,t,n,r,o){for(var i,s,a,c,l,u,d=t.createDocumentFragment(),f=[],p=0,h=e.length;p\s*$/g;function Ae(e,t){return j(e,"table")&&j(11!==t.nodeType?t:t.firstChild,"tr")&&x(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function De(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,o,i,s,a;if(1===t.nodeType){if(G.hasData(e)&&(a=G.get(e).events))for(o in G.remove(t,"handle events"),a)for(n=0,r=a[o].length;n").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),g.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Zt,en=[],tn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=en.pop()||x.expando+"_"+Dt.guid++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",(function(t,n,r){var o,i,s,a=!1!==t.jsonp&&(tn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&tn.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return o=t.jsonpCallback=m(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(tn,"$1"+o):!1!==t.jsonp&&(t.url+=(Ot.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},t.dataTypes[0]="json",i=e[o],e[o]=function(){s=arguments},r.always((function(){void 0===i?x(e).removeProp(o):e[o]=i,t[o]&&(t.jsonpCallback=n.jsonpCallback,en.push(o)),s&&m(i)&&i(s[0]),s=i=void 0})),"script"})),h.createHTMLDocument=((Zt=g.implementation.createHTMLDocument("").body).innerHTML="
    ",2===Zt.childNodes.length),x.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(h.createHTMLDocument?((r=(t=g.implementation.createHTMLDocument("")).createElement("base")).href=g.location.href,t.head.appendChild(r)):t=g),i=!n&&[],(o=q.exec(e))?[t.createElement(o[1])]:(o=ye([e],t,i),i&&i.length&&x(i).remove(),x.merge([],o.childNodes)));var r,o,i},x.fn.load=function(e,t,n){var r,o,i,s=this,a=e.indexOf(" ");return-1").append(x.parseHTML(e)).find(r):e)})).always(n&&function(e,t){s.each((function(){n.apply(this,i||[e.responseText,t,e])}))}),this},x.expr.pseudos.animated=function(e){return x.grep(x.timers,(function(t){return e===t.elem})).length},x.offset={setOffset:function(e,t,n){var r,o,i,s,a,c,l=x.css(e,"position"),u=x(e),d={};"static"===l&&(e.style.position="relative"),a=u.offset(),i=x.css(e,"top"),c=x.css(e,"left"),o=("absolute"===l||"fixed"===l)&&-1<(i+c).indexOf("auto")?(s=(r=u.position()).top,r.left):(s=parseFloat(i)||0,parseFloat(c)||0),m(t)&&(t=t.call(e,n,x.extend({},a))),null!=t.top&&(d.top=t.top-a.top+s),null!=t.left&&(d.left=t.left-a.left+o),"using"in t?t.using.call(e,d):("number"==typeof d.top&&(d.top+="px"),"number"==typeof d.left&&(d.left+="px"),u.css(d))}},x.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){x.offset.setOffset(this,e,t)}));var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],o={top:0,left:0};if("fixed"===x.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===x.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((o=x(e).offset()).top+=x.css(e,"borderTopWidth",!0),o.left+=x.css(e,"borderLeftWidth",!0))}return{top:t.top-o.top-x.css(r,"marginTop",!0),left:t.left-o.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===x.css(e,"position");)e=e.offsetParent;return e||ne}))}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var r="pageYOffset"===t;x.fn[e]=function(o){return B(this,(function(e,o,i){var s;return n(e)?s=e:9===e.nodeType&&(s=e.defaultView),void 0===i?s?s[t]:e[o]:void(s?s.scrollTo(r?s.pageXOffset:i,r?i:s.pageYOffset):e[o]=i)}),e,o,arguments.length)}})),x.each(["top","left"],(function(e,t){x.cssHooks[t]=Ke(h.pixelPosition,(function(e,n){if(n)return n=Je(e,t),Ve.test(n)?x(e).position()[t]+"px":n}))})),x.each({Height:"height",Width:"width"},(function(e,t){x.each({padding:"inner"+e,content:t,"":"outer"+e},(function(r,o){x.fn[o]=function(i,s){var a=arguments.length&&(r||"boolean"!=typeof i),c=r||(!0===i||!0===s?"margin":"border");return B(this,(function(t,r,i){var s;return n(t)?0===o.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(s=t.documentElement,Math.max(t.body["scroll"+e],s["scroll"+e],t.body["offset"+e],s["offset"+e],s["client"+e])):void 0===i?x.css(t,r,c):x.style(t,r,i,c)}),t,a?i:void 0,a)}}))})),x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){x.fn[t]=function(e){return this.on(t,e)}})),x.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),x.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){x.fn[t]=function(e,n){return 0",{method:"GET"===r?"GET":"POST",action:n,style:"display:none"});"GET"!==r&&"POST"!==r&&o.append(e("",{type:"hidden",name:"_method",value:r.toLowerCase()}));var i,s=t.data;if("string"==typeof s)e.each(s.split("&"),(function(t,n){var r=n.split("=");o.append(e("",{type:"hidden",name:r[0],value:r[1]}))}));else if(e.isArray(s))e.each(s,(function(t,n){o.append(e("",{type:"hidden",name:n.name,value:n.value}))}));else if("object"==typeof s)for(i in s)o.append(e("",{type:"hidden",name:i,value:s[i]}));e(document.body).append(o),o.submit()}function f(t){t&&t.readyState<4&&(t.onreadystatechange=e.noop,t.abort())}function p(){return(new Date).getTime()}function h(t){var n=t.clone();return n.find("script").each((function(){this.src||e._data(this,"globalEval",!1)})),n.contents()}function m(e){return e.search=e.search.replace(/([?&])(_pjax|_)=[^&]*/g,"").replace(/^&/,""),e.href.replace(/\?($|#)/,"$1")}function g(e){var t=document.createElement("a");return t.href=e,t}function v(e){return e.href.replace(/#.*/,"")}function y(t,n){return t&&n?((n=e.extend({},n)).container=t,n):e.isPlainObject(t)?t:{container:t}}function b(e,t){return e.filter(t).add(e.find(t))}function x(t){return e.parseHTML(t,document,!0)}function w(t,n,r){var o,i,s,a,c={},l=/]*>([\s\S.]*)<\/body>/i)[0])),null!=(i=t.match(/]*>([\s\S.]*)<\/head>/i))?e(x(i[0])):o):o=e(x(t)),0===o.length||(c.title=b(s,"title").last().text(),r.fragment?(a=o,"body"!==r.fragment&&(a=b(a,r.fragment).first()),a.length&&(c.contents="body"===r.fragment?a:a.contents(),c.title||(c.title=a.attr("title")||a.data("title")))):l||(c.contents=o),c.contents&&(c.contents=c.contents.not((function(){return e(this).is("title")})),c.contents.find("title").remove(),c.scripts=b(c.contents,"script[src]").remove(),c.contents=c.contents.not(c.scripts)),c.title&&(c.title=e.trim(c.title))),c}l&&l.container&&(o.state=l),"state"in window.history&&(a=!1);var S={},E=[],T=[];function C(e,t){for(;e.length>t;)delete S[e.shift()]}function j(){return e("meta").filter((function(){var t=e(this).attr("http-equiv");return t&&"X-PJAX-VERSION"===t.toUpperCase()})).attr("content")}function q(){e.fn.pjax=t,e.pjax=o,e.pjax.enable=e.noop,e.pjax.disable=k,e.pjax.click=n,e.pjax.submit=r,e.pjax.reload=i,e.pjax.defaults={timeout:650,push:!0,replace:!1,type:"GET",dataType:"html",scrollTo:0,maxCacheLength:20,version:j},e(window).on("popstate.pjax",u)}function k(){e.fn.pjax=function(){return this},e.pjax=d,e.pjax.enable=q,e.pjax.disable=e.noop,e.pjax.click=e.noop,e.pjax.submit=e.noop,e.pjax.reload=function(){window.location.reload()},e(window).off("popstate.pjax",u)}e.event.props&&e.inArray("state",e.event.props)<0?e.event.props.push("state"):"state"in e.Event.prototype||e.event.addProp("state"),e.support.pjax=window.history&&window.history.pushState&&window.history.replaceState&&!navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]\D|WebApps\/.+CFNetwork)/),(e.support.pjax?q:k)()}(jQuery),s.lib=s.prototype={toastify:"1.9.2",constructor:s,init:function(e){return e=e||{},this.options={},this.toastElement=null,this.options.text=e.text||"Hi there!",this.options.node=e.node,this.options.duration=0===e.duration?0:e.duration||3e3,this.options.selector=e.selector,this.options.callback=e.callback||function(){},this.options.destination=e.destination,this.options.newWindow=e.newWindow||!1,this.options.close=e.close||!1,this.options.gravity="bottom"===e.gravity?"toastify-bottom":"toastify-top",this.options.positionLeft=e.positionLeft||!1,this.options.position=e.position||"",this.options.backgroundColor=e.backgroundColor,this.options.avatar=e.avatar||"",this.options.className=e.className||"",this.options.stopOnFocus=void 0===e.stopOnFocus||e.stopOnFocus,this.options.onClick=e.onClick,this.options.offset=e.offset||{x:0,y:0},this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var e,t,n,r,o,s,c,l,u=document.createElement("div");return u.className="toastify on "+this.options.className,this.options.position?u.className+=" toastify-"+this.options.position:!0===this.options.positionLeft?(u.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):u.className+=" toastify-right",u.className+=" "+this.options.gravity,this.options.backgroundColor&&(u.style.background=this.options.backgroundColor),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE?u.appendChild(this.options.node):(u.innerHTML=this.options.text,""!==this.options.avatar&&((e=document.createElement("img")).src=this.options.avatar,e.className="toastify-avatar","left"==this.options.position||!0===this.options.positionLeft?u.appendChild(e):u.insertAdjacentElement("afterbegin",e))),!0===this.options.close&&((t=document.createElement("span")).innerHTML="✖",t.className="toast-close",t.addEventListener("click",function(e){e.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}.bind(this)),n=0Object.keys(i).length||Boolean(Object.keys(i).length&&Object.keys(q.job).some((function(e){return q.job[e]!==i[e]})))))I(s.rootElement),O(s);else{var f=[],p=[],h=!1;if(s.updateDOM&&T.job++,o.forEach((function(e,n){var r=!e.__cssVars;if(e.__cssVars)try{w(e.__cssVars.tree,l({},s,{variables:q.job,onWarning:c}));var o,i,u,d,m,g=x(e.__cssVars.tree);s.updateDOM?(o=t[n],i=j.cssVarFunc.test(o),e.getAttribute("data-cssvars")||e.setAttribute("data-cssvars","src"),g.length&&i&&(u=e.getAttribute("data-cssvars-group")||++T.group,d=g.replace(/\s/g,""),m=s.rootElement.querySelector('[data-cssvars="out"][data-cssvars-group="'.concat(u,'"]'))||document.createElement("style"),h=h||j.cssKeyframes.test(g),s.preserveStatic&&(e.sheet.disabled=!0),m.hasAttribute("data-cssvars")||m.setAttribute("data-cssvars","out"),d===e.textContent.replace(/\s/g,"")?(r=!0,m&&m.parentNode&&(e.removeAttribute("data-cssvars-group"),m.parentNode.removeChild(m))):d!==m.textContent.replace(/\s/g,"")&&([e,m].forEach((function(e){e.setAttribute("data-cssvars-job",T.job),e.setAttribute("data-cssvars-group",u)})),m.textContent=g,f.push(g),p.push(m),m.parentNode||e.parentNode.insertBefore(m,e.nextSibling)))):e.textContent.replace(/\s/g,"")!==g&&f.push(g)}catch(n){a(n.message,e)}r&&e.setAttribute("data-cssvars","skip"),e.hasAttribute("data-cssvars-job")||e.setAttribute("data-cssvars-job",T.job)})),A=s.rootElement.querySelectorAll('[data-cssvars]:not([data-cssvars="out"])').length,s.shadowDOM)for(var m,g=[s.rootElement].concat(function(e){if(Array.isArray(e))return u(e)}(r=s.rootElement.querySelectorAll("*"))||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(r)||function(e){if(e){if("string"==typeof e)return u(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?u(e,void 0):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),v=0;m=g[v];++v)m.shadowRoot&&m.shadowRoot.querySelector("style")&&O(l({},s,{rootElement:m.shadowRoot}));s.updateDOM&&h&&function(e){var t=["animation-name","-moz-animation-name","-webkit-animation-name"].filter((function(e){return getComputedStyle(document.body)[e]}))[0];if(t){for(var n=e.getElementsByTagName("*"),r=[],o="__CSSVARSPONYFILL-KEYFRAMES__",i=0,s=n.length;i