!function(){"use strict";console.log(" \nThis blog is using hexo-theme-kaze based on MIT license\nSee theme at https://github.com/theme-kaze/hexo-theme-kaze\n");conste=document.body.scrollWidth||document.documentElement.scrollWidth;lett=null;functiono(e){constt=e.target,n=document.getElementById("mobiletoc");n&&t&&!n.contains(t)&&(n.style.display="none",window.mask.remove(),document.removeEventListener("click",o))}window.searchControlButton=null,e<=742?(t=document.getElementsByClassName("darkwidget")[0],window.searchControlButton=document.getElementsByClassName("searchwidget")[0]):(t=document.getElementsByClassName("darknavbar")[0],window.searchControlButton=document.getElementsByClassName("searchnavbar")[0]),t.addEventListener("click",(()=>{window.setDarkmode(window.reverseDarkModeSetting())}));constn=()=>{conste=document.getElementById("mobiletoc");if(!e)return;e.style.display="block";constt=document.createElement("div");t.id="mask",document.body.append(t),setTimeout((()=>{document.addEventListener("click",o)}),0)};setTimeout((()=>{conste=document.getElementById("menubutton");e&&(e.onclick=n)}),0);constl=()=>{conste=document.getElementById("scrollbutton"),t=document.getElementById("menubutton"),o=document.getElementById("popbutton"),n=document.body.scrollWidth||document.documentElement.scrollWidth;"1"===e.style.opacity?(e.style.bottom="32px",e.style.opacity="0",o.style.transform="none"):(o.style.transform="rotate(90deg)",e.style.bottom="85px",e.style.opacity="1");constl=document.getElementById("mobiletoc");n<=862&&l&&("1"===t.style.opacity?(t.style.right="32px",t.style.opacity="0"):(t.style.right="85px",t.style.opacity="1"));consts=document.querySelector(".darkwidget"),c=document.querySelector(".searchwidget");n<=742&&("1"===s.style.opacity?(s.style.bottom="32px",s.style.opacity="0",s.style.transform="none"):(s.style.display="flex",o.style.transform="rotate(90deg)",s.style.bottom="138px",s.style.opacity="1"),"1"===c.style.opacity?(c.style.bottom="32px",c.style.opacity="0",c.style.transform="none"):(c.style.display="flex",c.style.transform="rotate(90deg)",c.style.bottom="191px",c.style.opacity="1"))};setTimeout((()=>{document.getElementById("popbutton").addEventListener("click",l)}),0);consts=()=>{lete=window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop;e>1?(window.requestAnimationFrame(s),scrollTo(0,Math.floor(.85*e))):scrollTo(0,0)};functionc(e){constt=document.querySelector("#local-search");if(!t.contains(e.target)){conste=document.querySelector("#search-input"),o=document.querySelector("#search-content");e.value="",t.style.display="none",o.innerHTML="",window.mask.remove(),document.removeEventListener("click",c)}}setTimeout((()=>{conste=document.getElementById("scrollbutton");e&&(e.onclick=s)}),0),setTimeout((()=>{window.searchControlButton&&window.searchControlButton.addEventListener("click",(()=>{conste=document.createElement("div");e.id="mask",document.body.append(e);document.querySelector("#local-search").style.display="block",setTimeout((()=>{document.addEventListener("click",c)}),0)}))})),window.localSearch=function(e){fetch(e).then((e=>e.json())).then((e=>{lett=document.getElementById("search-input"),o=document.getElementById("search-content");t.addEventListener("input",(function(){lett='<ul class="search-result-list">',n=this.value.trim().toLowerCase().replace(/[<>&"]/g,(e=>({"<":"<",">":">","&":"&",'"':"""}[e])));if(o.innerHTML="",!(this.value.trim().length<=0)){if(e.forEach((function(e){leto=!0;e.title&&""!==e.title.trim()||(e.title="Untitled");letl=e.title.trim().toLowerCase();consts=e.content.trim().replace(/<[^>]+>/g,"").toLowerCase();letc=-1;consti=l.indexOf(n);letr=0;if(""!==s&&(r=s.indexOf(n),c=r),i<0&&r<0&&(o=!1),r<0&&(c=0),o){t+=`<li><a href="${e.url}" class="search-result-title" >'${l}</a>`;consto=e.content;if(c>=0){conste=Math.max(0,c-12),l=Math.min(o.length,c+12);lets=o.substr(e,l);s=s.replace(newRegExp(n,"gi"),'<em class="search-keyword">'+n+"</em>"),t+='<p class="search-result">'+s+"...</p>"}t+="</li>"}})),t+="</ul>