sinzmise-cetastories 2.0.0-1733575149562 → 2.0.0-1733582957416

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. package/404/index.html +1 -1
  2. package/404.html +1 -1
  3. package/about/index.html +1 -1
  4. package/album/index.html +1 -1
  5. package/archives/2021/12/index.html +1 -1
  6. package/archives/2021/index.html +1 -1
  7. package/archives/2022/12/index.html +1 -1
  8. package/archives/2022/index.html +1 -1
  9. package/archives/2023/01/index.html +1 -1
  10. package/archives/2023/02/index.html +1 -1
  11. package/archives/2023/03/index.html +1 -1
  12. package/archives/2023/04/index.html +1 -1
  13. package/archives/2023/07/index.html +1 -1
  14. package/archives/2023/08/index.html +1 -1
  15. package/archives/2023/09/index.html +1 -1
  16. package/archives/2023/10/index.html +1 -1
  17. package/archives/2023/11/index.html +1 -1
  18. package/archives/2023/12/index.html +1 -1
  19. package/archives/2023/index.html +1 -1
  20. package/archives/2023/page/2/index.html +1 -1
  21. package/archives/2023/page/3/index.html +1 -1
  22. package/archives/2024/01/index.html +1 -1
  23. package/archives/2024/02/index.html +1 -1
  24. package/archives/2024/03/index.html +1 -1
  25. package/archives/2024/04/index.html +1 -1
  26. package/archives/2024/05/index.html +1 -1
  27. package/archives/2024/06/index.html +1 -1
  28. package/archives/2024/07/index.html +1 -1
  29. package/archives/2024/08/index.html +1 -1
  30. package/archives/2024/09/index.html +1 -1
  31. package/archives/2024/10/index.html +1 -1
  32. package/archives/2024/11/index.html +1 -1
  33. package/archives/2024/index.html +1 -1
  34. package/archives/2024/page/2/index.html +1 -1
  35. package/archives/index.html +1 -1
  36. package/archives/page/2/index.html +1 -1
  37. package/archives/page/3/index.html +1 -1
  38. package/archives/page/4/index.html +1 -1
  39. package/archives/page/5/index.html +1 -1
  40. package/atom.xml +21 -21
  41. package/baidusitemap.xml +28 -28
  42. package/bbs/index.html +1 -1
  43. package/categories/index.html +1 -1
  44. package/categories//344/270/252/344/272/272/345/260/217/350/256/260/index.html +1 -1
  45. package/categories//344/270/252/344/272/272/345/260/217/350/256/260/page/2/index.html +1 -1
  46. package/categories//344/270/252/344/272/272/345/260/217/350/256/260/page/3/index.html +1 -1
  47. package/categories//346/255/214/346/233/262/346/224/266/351/233/206/index.html +1 -1
  48. package/categories//346/270/270/346/210/217/347/233/270/345/205/263/index.html +1 -1
  49. package/categories//347/253/231/347/202/271/346/212/230/350/205/276/index.html +1 -1
  50. package/categories//347/253/231/347/202/271/346/212/230/350/205/276/page/2/index.html +1 -1
  51. package/categories//351/241/271/347/233/256/346/212/230/350/205/276/index.html +1 -1
  52. package/charts/index.html +1 -1
  53. package/comments/index.html +1 -1
  54. package/css/index.css +1 -1
  55. package/cw.js +1 -1
  56. package/essay/index.html +1 -1
  57. package/essay/memos.js +1 -0
  58. package/fcircle/index.html +1 -1
  59. package/index.html +1 -1
  60. package/js/essay.js +1 -0
  61. package/js/main.js +1 -1
  62. package/js/waterfall.js +1 -0
  63. package/link/index.html +1 -1
  64. package/music/index.html +1 -1
  65. package/package.json +1 -1
  66. package/page/2/index.html +1 -1
  67. package/page/3/index.html +1 -1
  68. package/page/4/index.html +1 -1
  69. package/page/5/index.html +1 -1
  70. package/posts/10021/index.html +1 -1
  71. package/posts/10045/index.html +1 -1
  72. package/posts/10733/index.html +1 -1
  73. package/posts/10996/index.html +1 -1
  74. package/posts/12779/index.html +1 -1
  75. package/posts/13624/index.html +1 -1
  76. package/posts/15688/index.html +1 -1
  77. package/posts/15748/index.html +1 -1
  78. package/posts/15799/index.html +1 -1
  79. package/posts/15842/index.html +1 -1
  80. package/posts/16107/index.html +1 -1
  81. package/posts/18063/index.html +1 -1
  82. package/posts/20412/index.html +1 -1
  83. package/posts/21375/index.html +1 -1
  84. package/posts/22945/index.html +1 -1
  85. package/posts/23021/index.html +1 -1
  86. package/posts/27531/index.html +1 -1
  87. package/posts/27762/index.html +1 -1
  88. package/posts/28536/index.html +1 -1
  89. package/posts/28733/index.html +1 -1
  90. package/posts/29196/index.html +1 -1
  91. package/posts/38917/index.html +1 -1
  92. package/posts/38964/index.html +1 -1
  93. package/posts/42487/index.html +1 -1
  94. package/posts/42580/index.html +1 -1
  95. package/posts/45875/index.html +1 -1
  96. package/posts/46640/index.html +1 -1
  97. package/posts/48762/index.html +1 -1
  98. package/posts/50710/index.html +1 -1
  99. package/posts/52677/index.html +1 -1
  100. package/posts/53662/index.html +1 -1
  101. package/posts/54386/index.html +1 -1
  102. package/posts/54481/index.html +1 -1
  103. package/posts/54787/index.html +1 -1
  104. package/posts/56467/index.html +1 -1
  105. package/posts/57692/index.html +1 -1
  106. package/posts/58203/index.html +1 -1
  107. package/posts/61417/index.html +1 -1
  108. package/posts/61712/index.html +1 -1
  109. package/posts/61713/index.html +1 -1
  110. package/posts/646/index.html +1 -1
  111. package/posts/64856/index.html +1 -1
  112. package/posts/64935/index.html +1 -1
  113. package/seas/index.html +1 -1
  114. package/sitemap.xml +45 -45
  115. package/swpp/update.json +1 -1
  116. package/tags/Flash/347/233/270/345/205/263/index.html +1 -1
  117. package/tags/Steam/346/270/270/346/210/217/index.html +1 -1
  118. package/tags/Windows/350/275/257/344/273/266/index.html +1 -1
  119. package/tags/index.html +1 -1
  120. package/tags//344/270/252/344/272/272/345/260/217/350/256/260/index.html +1 -1
  121. package/tags//344/270/252/344/272/272/345/260/217/350/256/260/page/2/index.html +1 -1
  122. package/tags//344/270/252/344/272/272/345/260/217/350/256/260/page/3/index.html +1 -1
  123. package/tags//345/205/266/345/256/203/346/270/270/346/210/217/index.html +1 -1
  124. package/tags//345/212/240/350/275/275/345/212/250/347/224/273/index.html +1 -1
  125. package/tags//346/202/254/346/265/256/345/256/240/347/211/251-/347/234/213/346/235/277/345/250/230/index.html +1 -1
  126. package/tags//346/255/214/346/233/262/346/224/266/351/233/206/index.html +1 -1
  127. package/tags//346/270/270/346/210/217/347/233/270/345/205/263/index.html +1 -1
  128. package/tags//347/253/231/347/202/271/345/272/225/351/203/250/351/255/224/346/224/271/index.html +1 -1
  129. package/tags//347/253/231/347/202/271/346/212/230/350/205/276/index.html +1 -1
  130. package/tags//347/253/231/347/202/271/346/212/230/350/205/276/page/2/index.html +1 -1
  131. package/tags//350/207/252/345/273/272/351/203/250/347/275/262/index.html +1 -1
  132. package/tags//351/241/265/351/235/242/351/255/224/346/224/271/index.html +1 -1
  133. package/tags//351/241/271/347/233/256/346/212/230/350/205/276/index.html +1 -1
  134. package/update/index.html +1 -1
package/js/essay.js ADDED
@@ -0,0 +1 @@
1
+ function whenDOMReady(){"/essay/"==location.pathname&&document.addEventListener("DOMContentLoaded",(function(){setTimeout((()=>{changeTime(),btf.loadLightbox(document.querySelectorAll("#icat-bber img")),window.lazyLoadInstance&&window.lazyLoadInstance.update(),reflashWaterFall()}),300)}))}function timeDiff(e,t){const n=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),a=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())-n;return Math.floor(a/864e5)}function changeTime(){const e=Array.from(document.getElementsByTagName("time")),t=new Date;e.forEach((e=>{const n=e.getAttribute("datetime"),a=new Date(n),l=timeDiff(a,t);let o;o=0===l?"最近":1===l?"昨天":2===l?"前天":l<=7?`${l}天前`:a.getFullYear()!==t.getFullYear()?`${a.getFullYear()}/${a.getMonth()+1}/${a.getDate()}`:`${a.getMonth()+1}/${a.getDate()}`,e.textContent=o}))}function reflashWaterFall(){document.querySelector("#waterfall")&&setTimeout((function(){waterfall("#waterfall"),document.getElementById("waterfall").classList.add("show")}),500)}function commentText(e){const t=["#wl-edit",".el-textarea__inner"];for(let n=0;n<t.length;n++){let a=document.querySelector(t[n]);null!=a&&(a.dispatchEvent(new Event("input",{bubble:!0,cancelable:!0})),a.value="> "+e.replace(/\n/g,"\n> ")+"\n\n",a.focus(),a.setSelectionRange(-1,-1))}}function whenDOMReady(){initEssay()}function initEssay(){if(document.querySelector("#essay-mini")){new Swiper(".swiper-container",{direction:"vertical",loop:!0,autoplay:{delay:3e3,pauseOnMouseEnter:!0}})}}whenDOMReady(),document.addEventListener("pjax:complete",whenDOMReady),window.onresize=()=>{waterfall("#waterfall")},whenDOMReady(),document.addEventListener("pjax:complete",whenDOMReady);
package/js/main.js CHANGED
@@ -1 +1 @@
1
- document.addEventListener("DOMContentLoaded",(function(){let t,e,n,o,i=!1;const c=i=>{if(i){t=document.getElementById("site-name").offsetWidth;const i=document.querySelectorAll("#menus .menus_item");e=0,i.length&&i.forEach((t=>{e+=t.offsetWidth}));const c=document.querySelector("#search-button");n=c?c.offsetWidth:0,o=document.getElementById("nav")}let c="";window.innerWidth<=800&&(c=!0),c?o.classList.add("hide-menu"):o.classList.remove("hide-menu")},s=()=>{btf.sidebarPaddingR(),document.body.style.overflow="hidden",btf.animateIn(document.getElementById("menu-mask"),"to_show 0.5s"),document.getElementById("sidebar-menus").classList.add("open"),i=!0},a=()=>{const t=document.body;t.style.overflow="",t.style.paddingRight="",btf.animateOut(document.getElementById("menu-mask"),"to_hide 0.5s"),document.getElementById("sidebar-menus").classList.remove("open"),i=!1},l=function(){const t=GLOBAL_CONFIG.highlight;if(!t)return;const e=t.highlightCopy,n=t.highlightLang,o=GLOBAL_CONFIG_SITE.isHighlightShrink,i=t.highlightHeightLimit,c=e||n||void 0!==o,s="highlighjs"===t.plugin?document.querySelectorAll("figure.highlight"):document.querySelectorAll('pre[class*="language-"]');if(!c&&!i||!s.length)return;const a="prismjs"===t.plugin;let l="",d="";const r=!0===o?"closed":"";void 0!==o&&(l=`<i class="fas fa-angle-down expand ${r}"></i>`),e&&(d='<div class="copy-notice"></div><i class="fas fa-paste copy-button"></i>');const u=t=>{const e=t.parentNode;e.classList.add("copy-true");const n=window.getSelection(),o=document.createRange();a?o.selectNodeContents(e.querySelectorAll("pre code")[0]):o.selectNodeContents(e.querySelectorAll("table .code pre")[0]),n.removeAllRanges(),n.addRange(o);n.toString();((t,e)=>{if(document.queryCommandSupported&&document.queryCommandSupported("copy"))if(document.execCommand("copy"),void 0!==GLOBAL_CONFIG.Snackbar);else{const t=e.previousElementSibling;t.innerText=GLOBAL_CONFIG.copy.success,t.style.opacity=1,setTimeout((()=>{t.style.opacity=0}),700)}else void 0!==GLOBAL_CONFIG.Snackbar||(e.previousElementSibling.innerText=GLOBAL_CONFIG.copy.noSupport)})(0,t.lastChild),n.removeAllRanges(),e.classList.remove("copy-true")},m=function(t){const e=t.target.classList;e.contains("expand")?(t=>{const e=[...t.parentNode.children].slice(1);t.firstChild.classList.toggle("closed"),btf.isHidden(e[e.length-1])?e.forEach((t=>{t.style.display="block"})):e.forEach((t=>{t.style.display="none"}))})(this):e.contains("copy-button")&&u(this)},f=function(){this.classList.toggle("expand-done")};function g(t,e,n){const o=document.createDocumentFragment();if(c){const e=document.createElement("div");e.className=`highlight-tools ${r}`,e.innerHTML=l+t+d,e.addEventListener("click",m),o.appendChild(e)}if(i&&e.offsetHeight>i+30){const t=document.createElement("div");t.className="code-expand-btn",t.innerHTML='<i class="fas fa-angle-double-down"></i>',t.addEventListener("click",f),o.appendChild(t)}"hl"===n?e.insertBefore(o,e.firstChild):e.parentNode.insertBefore(o,e)}n?a?s.forEach((function(t){const e=`<div class="code-lang">${t.getAttribute("data-language")?t.getAttribute("data-language"):"Code"}</div>`;btf.wrap(t,"figure",{class:"highlight"}),g(e,t)})):s.forEach((function(t){let e=t.getAttribute("class").split(" ")[1];"plain"!==e&&void 0!==e||(e="Code");g(`<div class="code-lang">${e}</div>`,t,"hl")})):a?s.forEach((function(t){btf.wrap(t,"figure",{class:"highlight"}),g("",t)})):s.forEach((function(t){g("",t,"hl")}))};const d=function(){const t=document.getElementById("rightside"),e=window.innerHeight+56;if(document.body.scrollHeight<=e)return void(t.style.cssText="opacity: 1; transform: translateX(-58px)");let n=0,o=!0;const i=document.getElementById("page-header"),c="function"==typeof chatBtnHide,s="function"==typeof chatBtnShow;window.scrollCollect=()=>btf.throttle((function(a){const l=window.scrollY||document.documentElement.scrollTop,d=function(t){const e=t>n;return n=t,e}(l);l>56?(i.classList.add("is-top-bar"),d?(i.classList.contains("nav-visible")&&i.classList.remove("is-top-bar"),s&&!0===o&&(chatBtnHide(),o=!1)):(i.classList.contains("nav-visible")||i.classList.add("is-top-bar"),c&&!1===o&&(chatBtnShow(),o=!0)),i.classList.add("nav-fixed"),"0"===window.getComputedStyle(t).getPropertyValue("opacity")&&(t.style.cssText="opacity: 0.8; transform: translateX(-58px)")):(0===l&&i.classList.add("is-top-bar"),t.style.cssText="opacity: ''; transform: ''"),document.body.scrollHeight<=e&&(t.style.cssText="opacity: 0.8; transform: translateX(-58px)")}),200)(),window.addEventListener("scroll",scrollCollect)},r=function(){const t=GLOBAL_CONFIG_SITE.isToc,e=GLOBAL_CONFIG.isAnchor,n=document.getElementById("article-container");if(!n||!t&&!e)return;let o,i,c,s,a;if(t){const t=document.getElementById("card-toc");i=t.getElementsByClassName("toc-content")[0],o=i.querySelectorAll(".toc-link");const e=t.querySelector(".toc-percentage");a=i.classList.contains("is-expand"),c=t=>{const o=n.clientHeight,i=document.documentElement.clientHeight,c=(t-n.offsetTop)/(o>i?o-i:document.documentElement.scrollHeight-i),s=Math.round(100*c),a=s>100?100:s<=0?0:s;e.textContent=a},window.mobileToc={open:()=>{t.style.cssText="animation: toc-open .3s; opacity: 1; right: 55px"},close:()=>{t.style.animation="toc-close .2s",setTimeout((()=>{t.style.cssText="opacity:''; animation: ''; right: ''"}),100)}},i.addEventListener("click",(t=>{t.preventDefault();const e=t.target.classList;if(e.contains("toc-content"))return;const n=e.contains("toc-link")?t.target:t.target.parentElement;btf.scrollToDest(btf.getEleTop(document.getElementById(decodeURI(n.getAttribute("href")).replace("#",""))),300),window.innerWidth<900&&window.mobileToc.close()})),s=t=>{const e=t.getBoundingClientRect().top,n=i.scrollTop;e>document.documentElement.clientHeight-100&&(i.scrollTop=n+150),e<100&&(i.scrollTop=n-150)}}const l=n.querySelectorAll("h1,h2,h3,h4,h5,h6");let d="";window.tocScrollFn=function(){return btf.throttle((function(){const n=window.scrollY||document.documentElement.scrollTop;t&&c(n),function(n){if(0===n)return!1;let c="",r="";if(l.forEach((function(t,e){if(n>btf.getEleTop(t)-80){const n=t.id;c=n?"#"+encodeURI(n):"",r=e}})),d!==r&&(e&&btf.updateAnchor(c),d=r,t)){if(i.querySelectorAll(".active").forEach((t=>{t.classList.remove("active")})),""===c)return;const t=o[r];if(t.classList.add("active"),setTimeout((()=>{s(t)}),0),a)return;let e=t.parentNode;for(;!e.matches(".toc");e=e.parentNode)e.matches("li")&&e.classList.add("active")}}(n)}),100)()},window.addEventListener("scroll",tocScrollFn)},u=()=>{const t=document.body;t.classList.add("read-mode");const e=document.createElement("button");e.type="button",e.className="fas fa-sign-out-alt exit-readmode",t.appendChild(e),e.addEventListener("click",(function n(){t.classList.remove("read-mode"),e.remove(),e.removeEventListener("click",n)}))},m=()=>{"light"===("dark"===document.documentElement.getAttribute("data-theme")?"dark":"light")?(activateDarkMode(),saveToLocal.set("theme","dark",2)):(activateLightMode(),saveToLocal.set("theme","light",2)),"function"==typeof utterancesTheme&&utterancesTheme(),"function"==typeof changeGiscusTheme&&changeGiscusTheme(),"object"==typeof FB&&window.loadFBComment(),"function"==typeof runMermaid&&window.runMermaid()},f=t=>{const e=document.getElementById("rightside-config-hide").classList;e.toggle("show"),t.classList.contains("show")&&(e.add("status"),setTimeout((()=>{e.remove("status")}),300)),t.classList.toggle("show")},g=()=>{btf.scrollToDest(0,500)},h=()=>{const t=document.documentElement.classList;t.contains("hide-aside")?saveToLocal.set("aside-status","show",2):saveToLocal.set("aside-status","hide",2),t.toggle("hide-aside")},p=()=>{"0"===window.getComputedStyle(document.getElementById("card-toc")).getPropertyValue("opacity")?window.mobileToc.open():window.mobileToc.close()};document.getElementById("rightside").addEventListener("click",(function(t){const e=t.target.id?t.target:t.target.parentNode;switch(e.id){case"go-up":g();break;case"rightside_config":f(e);break;case"mobile-toc-button":p();break;case"readmode":u();break;case"darkmode":m();break;case"hide-aside-btn":h()}}));const y=()=>{document.querySelectorAll("#sidebar-menus .site-page.group").forEach((function(t){t.addEventListener("click",(function(){this.classList.toggle("hide")}))}))},L=function(){document.querySelectorAll("#article-container .tab > button").forEach((function(t){t.addEventListener("click",(function(t){const e=this,n=e.parentNode;if(!n.classList.contains("active")){const t=n.parentNode.nextElementSibling,o=btf.siblings(n,".active")[0];o&&o.classList.remove("active"),n.classList.add("active");const i=e.getAttribute("data-href").replace("#","");[...t.children].forEach((t=>{t.id===i?t.classList.add("active"):t.classList.remove("active")}));const c=t.querySelectorAll(`#${i} .fj-gallery`);c.length>0&&btf.initJustifiedGallery(c)}}))}))},b=()=>{document.querySelectorAll("#article-container .tabs .tab-to-top").forEach((function(t){t.addEventListener("click",(function(){btf.scrollToDest(btf.getEleTop(btf.getParents(this,".tabs")),300)}))}))},E=function(t){t.forEach((t=>{const e=t,n=e.getAttribute("datetime");e.innerText=btf.diffDate(n,!0),e.style.display="inline"}))};window.refreshFn=function(){c(!0),o.classList.add("show"),GLOBAL_CONFIG_SITE.isPost?(void 0!==GLOBAL_CONFIG.noticeOutdate&&function(){const t=GLOBAL_CONFIG.noticeOutdate,e=btf.diffDate(GLOBAL_CONFIG_SITE.postUpdate);if(e>=t.limitDay){const n=document.createElement("div");n.className="post-outdate-notice",n.textContent=t.messagePrev+" "+e+" "+t.messageNext;const o=document.getElementById("article-container");"top"===t.position?o.insertBefore(n,o.firstChild):o.appendChild(n)}}(),GLOBAL_CONFIG.relativeDate.post&&E(document.querySelectorAll("#post-meta time"))):(GLOBAL_CONFIG.relativeDate.homepage&&E(document.querySelectorAll("#recent-posts time")),GLOBAL_CONFIG.runtime&&(()=>{const t=document.getElementById("runtimeshow");if(t){const e=t.getAttribute("data-publishDate");t.innerText=btf.diffDate(e)+" "+GLOBAL_CONFIG.runtime}})(),(()=>{const t=document.getElementById("last-push-date");if(t){const e=t.getAttribute("data-lastPushDate");t.innerText=btf.diffDate(e,!0)}})(),function(){const t=document.querySelectorAll("#aside-cat-list .card-category-list-item.parent i");t.length&&t.forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault(),this.classList.toggle("expand");const e=this.parentNode.nextElementSibling;btf.isHidden(e)?e.style.display="block":e.style.display="none"}))}))}()),r(),GLOBAL_CONFIG_SITE.isHome&&(()=>{const t=document.getElementById("scroll-down");t&&t.addEventListener("click",(function(){btf.scrollToDest(document.getElementById("content-inner").offsetTop,300)}))})(),l(),GLOBAL_CONFIG.isPhotoFigcaption&&document.querySelectorAll("#article-container img").forEach((function(t){const e=t.parentNode,n=t.title||t.alt;if(n&&!e.parentNode.classList.contains("justified-gallery")){const o=document.createElement("div");o.className="img-alt is-center",o.textContent=n,e.insertBefore(o,t.nextSibling)}})),d();const t=document.querySelectorAll("#article-container .fj-gallery");t.length&&function(t){if(t.forEach((t=>{t.querySelectorAll("img").forEach((t=>{const e=t.getAttribute("data-lazy-src");e&&(t.src=e),btf.wrap(t,"div",{class:"fj-gallery-item"})}))})),window.fjGallery)return void setTimeout((()=>{btf.initJustifiedGallery(t)}),100);const e=document.createElement("link");e.rel="stylesheet",e.href=GLOBAL_CONFIG.source.justifiedGallery.css,document.body.appendChild(e),getScript(`${GLOBAL_CONFIG.source.justifiedGallery.js}`).then((()=>{btf.initJustifiedGallery(t)}))}(t),btf.loadLightbox(document.querySelectorAll("#article-container img:not(.no-lightbox)")),(()=>{const t=document.querySelectorAll("#article-container :not(.highlight) > table, #article-container > table");t.length&&t.forEach((t=>{btf.wrap(t,"div",{class:"table-wrap"})}))})(),function(){const t=document.querySelectorAll("#article-container .hide-button");t.length&&t.forEach((function(t){t.addEventListener("click",(function(t){this.classList.add("open");const e=this.nextElementSibling.querySelectorAll(".fj-gallery");e.length&&btf.initJustifiedGallery(e)}))}))}(),L(),b(),function(){let t=!1;const e=document.querySelector("#comment-switch > .switch-btn");e&&e.addEventListener("click",(function(){this.classList.toggle("move"),document.querySelectorAll("#post-comment > .comment-wrap > div").forEach((function(t){btf.isHidden(t)?t.style.cssText="display: block;animation: tabshow .5s":t.style.cssText="display: none;animation: ''"})),t||"function"!=typeof loadOtherComment||(t=!0,loadOtherComment())}))}(),document.getElementById("toggle-menu").addEventListener("click",(()=>{s()}))},refreshFn(),window.addEventListener("resize",(()=>{c(!1),btf.isHidden(document.getElementById("toggle-menu"))&&i&&a()})),document.getElementById("menu-mask").addEventListener("click",(t=>{a()})),y(),GLOBAL_CONFIG.islazyload&&(window.lazyLoadInstance=new LazyLoad({elements_selector:"img",threshold:0,data_src:"lazy-src"})),void 0!==GLOBAL_CONFIG.copyright&&(()=>{const t=GLOBAL_CONFIG.copyright;document.body.oncopy=e=>{let n;e.preventDefault();const o=window.getSelection(0).toString();return n=o.length>t.limitCount?o+"\n\n\n"+t.languages.author+"\n"+t.languages.link+window.location.href+"\n"+t.languages.source+"\n"+t.languages.info:o,e.clipboardData?e.clipboardData.setData("text",n):window.clipboardData.setData("text",n)}})()}));
1
+ document.addEventListener("DOMContentLoaded",(function(){let t,e,n,o,i=!1;const c=i=>{if(i){t=document.getElementById("site-name").offsetWidth;const i=document.querySelectorAll("#menus .menus_item");e=0,i.length&&i.forEach((t=>{e+=t.offsetWidth}));const c=document.querySelector("#search-button");n=c?c.offsetWidth:0,o=document.getElementById("nav")}let c="";window.innerWidth<=800&&(c=!0),c?o.classList.add("hide-menu"):o.classList.remove("hide-menu")},s=()=>{btf.sidebarPaddingR(),document.body.style.overflow="hidden",btf.animateIn(document.getElementById("menu-mask"),"to_show 0.5s"),document.getElementById("sidebar-menus").classList.add("open"),i=!0},a=()=>{const t=document.body;t.style.overflow="",t.style.paddingRight="",btf.animateOut(document.getElementById("menu-mask"),"to_hide 0.5s"),document.getElementById("sidebar-menus").classList.remove("open"),i=!1},l=function(){const t=GLOBAL_CONFIG.highlight;if(!t)return;const e=t.highlightCopy,n=t.highlightLang,o=GLOBAL_CONFIG_SITE.isHighlightShrink,i=t.highlightHeightLimit,c=e||n||void 0!==o,s="highlighjs"===t.plugin?document.querySelectorAll("figure.highlight"):document.querySelectorAll('pre[class*="language-"]');if(!c&&!i||!s.length)return;const a="prismjs"===t.plugin;let l="",d="";const r=!0===o?"closed":"";void 0!==o&&(l=`<i class="fas fa-angle-down expand ${r}"></i>`),e&&(d='<div class="copy-notice"></div><i class="fas fa-paste copy-button"></i>');const u=t=>{const e=t.parentNode;e.classList.add("copy-true");const n=window.getSelection(),o=document.createRange();a?o.selectNodeContents(e.querySelectorAll("pre code")[0]):o.selectNodeContents(e.querySelectorAll("table .code pre")[0]),n.removeAllRanges(),n.addRange(o);n.toString();((t,e)=>{if(document.queryCommandSupported&&document.queryCommandSupported("copy"))if(document.execCommand("copy"),void 0!==GLOBAL_CONFIG.Snackbar);else{const t=e.previousElementSibling;t.innerText=GLOBAL_CONFIG.copy.success,t.style.opacity=1,setTimeout((()=>{t.style.opacity=0}),700)}else void 0!==GLOBAL_CONFIG.Snackbar||(e.previousElementSibling.innerText=GLOBAL_CONFIG.copy.noSupport)})(0,t.lastChild),n.removeAllRanges(),e.classList.remove("copy-true")},m=function(t){const e=t.target.classList;e.contains("expand")?(t=>{const e=[...t.parentNode.children].slice(1);t.firstChild.classList.toggle("closed"),btf.isHidden(e[e.length-1])?e.forEach((t=>{t.style.display="block"})):e.forEach((t=>{t.style.display="none"}))})(this):e.contains("copy-button")&&u(this)},f=function(){this.classList.toggle("expand-done")};function g(t,e,n){const o=document.createDocumentFragment();if(c){const e=document.createElement("div");e.className=`highlight-tools ${r}`,e.innerHTML=l+t+d,e.addEventListener("click",m),o.appendChild(e)}if(i&&e.offsetHeight>i+30){const t=document.createElement("div");t.className="code-expand-btn",t.innerHTML='<i class="fas fa-angle-double-down"></i>',t.addEventListener("click",f),o.appendChild(t)}"hl"===n?e.insertBefore(o,e.firstChild):e.parentNode.insertBefore(o,e)}n?a?s.forEach((function(t){const e=`<div class="code-lang">${t.getAttribute("data-language")?t.getAttribute("data-language"):"Code"}</div>`;btf.wrap(t,"figure",{class:"highlight"}),g(e,t)})):s.forEach((function(t){let e=t.getAttribute("class").split(" ")[1];"plain"!==e&&void 0!==e||(e="Code");g(`<div class="code-lang">${e}</div>`,t,"hl")})):a?s.forEach((function(t){btf.wrap(t,"figure",{class:"highlight"}),g("",t)})):s.forEach((function(t){g("",t,"hl")}))};const d=function(){const t=document.getElementById("rightside"),e=window.innerHeight+56;if(document.body.scrollHeight<=e)return void(t.style.cssText="opacity: 1; transform: translateX(-58px)");let n=0,o=!0;const i=document.getElementById("page-header"),c="function"==typeof chatBtnHide,s="function"==typeof chatBtnShow;window.scrollCollect=()=>btf.throttle((function(a){const l=window.scrollY||document.documentElement.scrollTop,d=function(t){const e=t>n;return n=t,e}(l);l>56?(i.classList.add("is-top-bar"),d?(i.classList.contains("nav-visible")&&i.classList.remove("is-top-bar"),s&&!0===o&&(chatBtnHide(),o=!1)):(i.classList.contains("nav-visible")||i.classList.add("is-top-bar"),c&&!1===o&&(chatBtnShow(),o=!0)),i.classList.add("nav-fixed"),"0"===window.getComputedStyle(t).getPropertyValue("opacity")&&(t.style.cssText="opacity: 0.8; transform: translateX(-58px)")):(0===l&&i.classList.add("is-top-bar"),t.style.cssText="opacity: ''; transform: ''"),document.body.scrollHeight<=e&&(t.style.cssText="opacity: 0.8; transform: translateX(-58px)")}),200)(),window.addEventListener("scroll",scrollCollect)},r=function(){const t=GLOBAL_CONFIG_SITE.isToc,e=GLOBAL_CONFIG.isAnchor,n=document.getElementById("article-container");if(!n||!t&&!e)return;let o,i,c,s,a;if(t){const t=document.getElementById("card-toc");i=t.getElementsByClassName("toc-content")[0],o=i.querySelectorAll(".toc-link");const e=t.querySelector(".toc-percentage");a=i.classList.contains("is-expand"),c=t=>{const o=n.clientHeight,i=document.documentElement.clientHeight,c=(t-n.offsetTop)/(o>i?o-i:document.documentElement.scrollHeight-i),s=Math.round(100*c),a=s>100?100:s<=0?0:s;e.textContent=a},window.mobileToc={open:()=>{t.style.cssText="animation: toc-open .3s; opacity: 1; right: 55px"},close:()=>{t.style.animation="toc-close .2s",setTimeout((()=>{t.style.cssText="opacity:''; animation: ''; right: ''"}),100)}},i.addEventListener("click",(t=>{t.preventDefault();const e=t.target.classList;if(e.contains("toc-content"))return;const n=e.contains("toc-link")?t.target:t.target.parentElement;btf.scrollToDest(btf.getEleTop(document.getElementById(decodeURI(n.getAttribute("href")).replace("#",""))),300),window.innerWidth<900&&window.mobileToc.close()})),s=t=>{const e=t.getBoundingClientRect().top,n=i.scrollTop;e>document.documentElement.clientHeight-100&&(i.scrollTop=n+150),e<100&&(i.scrollTop=n-150)}}const l=n.querySelectorAll("h1,h2,h3,h4,h5,h6");let d="";window.tocScrollFn=function(){return btf.throttle((function(){const n=window.scrollY||document.documentElement.scrollTop;t&&c(n),function(n){if(0===n)return!1;let c="",r="";if(l.forEach((function(t,e){if(n>btf.getEleTop(t)-80){const n=t.id;c=n?"#"+encodeURI(n):"",r=e}})),d!==r&&(e&&btf.updateAnchor(c),d=r,t)){if(i.querySelectorAll(".active").forEach((t=>{t.classList.remove("active")})),""===c)return;const t=o[r];if(t.classList.add("active"),setTimeout((()=>{s(t)}),0),a)return;let e=t.parentNode;for(;!e.matches(".toc");e=e.parentNode)e.matches("li")&&e.classList.add("active")}}(n)}),100)()},window.addEventListener("scroll",tocScrollFn)},u=()=>{const t=document.body;t.classList.add("read-mode");const e=document.createElement("button");e.type="button",e.className="fas fa-sign-out-alt exit-readmode",t.appendChild(e),e.addEventListener("click",(function n(){t.classList.remove("read-mode"),e.remove(),e.removeEventListener("click",n)}))},m=()=>{"light"===("dark"===document.documentElement.getAttribute("data-theme")?"dark":"light")?(activateDarkMode(),saveToLocal.set("theme","dark",2)):(activateLightMode(),saveToLocal.set("theme","light",2)),"function"==typeof utterancesTheme&&utterancesTheme(),"function"==typeof changeGiscusTheme&&changeGiscusTheme(),"object"==typeof FB&&window.loadFBComment(),"function"==typeof runMermaid&&window.runMermaid()},f=t=>{const e=document.getElementById("rightside-config-hide").classList;e.toggle("show"),t.classList.contains("show")&&(e.add("status"),setTimeout((()=>{e.remove("status")}),300)),t.classList.toggle("show")},g=()=>{btf.scrollToDest(0,500)},h=()=>{const t=document.documentElement.classList;t.contains("hide-aside")?saveToLocal.set("aside-status","show",2):saveToLocal.set("aside-status","hide",2),t.toggle("hide-aside")},p=()=>{"0"===window.getComputedStyle(document.getElementById("card-toc")).getPropertyValue("opacity")?window.mobileToc.open():window.mobileToc.close()};document.getElementById("rightside").addEventListener("click",(function(t){const e=t.target.id?t.target:t.target.parentNode;switch(e.id){case"go-up":g();break;case"rightside_config":f(e);break;case"mobile-toc-button":p();break;case"readmode":u();break;case"darkmode":m();break;case"hide-aside-btn":h()}}));const y=()=>{document.querySelectorAll("#sidebar-menus .site-page.group").forEach((function(t){t.addEventListener("click",(function(){this.classList.toggle("hide")}))}))},L=function(){document.querySelectorAll("#article-container .tab > button").forEach((function(t){t.addEventListener("click",(function(t){const e=this,n=e.parentNode;if(!n.classList.contains("active")){const t=n.parentNode.nextElementSibling,o=btf.siblings(n,".active")[0];o&&o.classList.remove("active"),n.classList.add("active");const i=e.getAttribute("data-href").replace("#","");[...t.children].forEach((t=>{t.id===i?t.classList.add("active"):t.classList.remove("active")}));const c=t.querySelectorAll(`#${i} .fj-gallery`);c.length>0&&btf.initJustifiedGallery(c)}}))}))},b=()=>{document.querySelectorAll("#article-container .tabs .tab-to-top").forEach((function(t){t.addEventListener("click",(function(){btf.scrollToDest(btf.getEleTop(btf.getParents(this,".tabs")),300)}))}))},E=function(t){t.forEach((t=>{const e=t,n=e.getAttribute("datetime");e.innerText=btf.diffDate(n,!0),e.style.display="inline"}))};window.refreshFn=function(){c(!0),o.classList.add("show"),GLOBAL_CONFIG_SITE.isPost?(void 0!==GLOBAL_CONFIG.noticeOutdate&&function(){const t=GLOBAL_CONFIG.noticeOutdate,e=btf.diffDate(GLOBAL_CONFIG_SITE.postUpdate);if(e>=t.limitDay){const n=document.createElement("div");n.className="post-outdate-notice",n.textContent=t.messagePrev+" "+e+" "+t.messageNext;const o=document.getElementById("article-container");"top"===t.position?o.insertBefore(n,o.firstChild):o.appendChild(n)}}(),GLOBAL_CONFIG.relativeDate.post&&E(document.querySelectorAll("#post-meta time"))):(GLOBAL_CONFIG.relativeDate.homepage&&E(document.querySelectorAll("#recent-posts time")),GLOBAL_CONFIG.runtime&&(()=>{const t=document.getElementById("runtimeshow");if(t){const e=t.getAttribute("data-publishDate");t.innerText=btf.diffDate(e)+" "+GLOBAL_CONFIG.runtime}})(),(()=>{const t=document.getElementById("last-push-date");if(t){const e=t.getAttribute("data-lastPushDate");t.innerText=btf.diffDate(e,!0)}})(),function(){const t=document.querySelectorAll("#aside-cat-list .card-category-list-item.parent i");t.length&&t.forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault(),this.classList.toggle("expand");const e=this.parentNode.nextElementSibling;btf.isHidden(e)?e.style.display="block":e.style.display="none"}))}))}(),v()),r(),GLOBAL_CONFIG_SITE.isHome&&(()=>{const t=document.getElementById("scroll-down");t&&t.addEventListener("click",(function(){btf.scrollToDest(document.getElementById("content-inner").offsetTop,300)}))})(),l(),GLOBAL_CONFIG.isPhotoFigcaption&&document.querySelectorAll("#article-container img").forEach((function(t){const e=t.parentNode,n=t.title||t.alt;if(n&&!e.parentNode.classList.contains("justified-gallery")){const o=document.createElement("div");o.className="img-alt is-center",o.textContent=n,e.insertBefore(o,t.nextSibling)}})),d();const t=document.querySelectorAll("#article-container .fj-gallery");t.length&&function(t){if(t.forEach((t=>{t.querySelectorAll("img").forEach((t=>{const e=t.getAttribute("data-lazy-src");e&&(t.src=e),btf.wrap(t,"div",{class:"fj-gallery-item"})}))})),window.fjGallery)return void setTimeout((()=>{btf.initJustifiedGallery(t)}),100);const e=document.createElement("link");e.rel="stylesheet",e.href=GLOBAL_CONFIG.source.justifiedGallery.css,document.body.appendChild(e),getScript(`${GLOBAL_CONFIG.source.justifiedGallery.js}`).then((()=>{btf.initJustifiedGallery(t)}))}(t),btf.loadLightbox(document.querySelectorAll("#article-container img:not(.no-lightbox)")),(()=>{const t=document.querySelectorAll("#article-container :not(.highlight) > table, #article-container > table");t.length&&t.forEach((t=>{btf.wrap(t,"div",{class:"table-wrap"})}))})(),function(){const t=document.querySelectorAll("#article-container .hide-button");t.length&&t.forEach((function(t){t.addEventListener("click",(function(t){this.classList.add("open");const e=this.nextElementSibling.querySelectorAll(".fj-gallery");e.length&&btf.initJustifiedGallery(e)}))}))}(),L(),b(),function(){let t=!1;const e=document.querySelector("#comment-switch > .switch-btn");e&&e.addEventListener("click",(function(){this.classList.toggle("move"),document.querySelectorAll("#post-comment > .comment-wrap > div").forEach((function(t){btf.isHidden(t)?t.style.cssText="display: block;animation: tabshow .5s":t.style.cssText="display: none;animation: ''"})),t||"function"!=typeof loadOtherComment||(t=!0,loadOtherComment())}))}(),document.getElementById("toggle-menu").addEventListener("click",(()=>{s()}))};const v=()=>{const t=document.querySelector("#category-bar"),e=decodeURIComponent(window.location.pathname),n=e===GLOBAL_CONFIG.root;if(t){t.querySelectorAll(".category-bar-item").forEach((t=>t.classList.remove("select")));const o=n?"category-bar-home":e.split("/").slice(-2,-1)[0],i=document.getElementById(o);i&&i.classList.add("select")}};refreshFn(),window.addEventListener("resize",(()=>{c(!1),btf.isHidden(document.getElementById("toggle-menu"))&&i&&a()})),document.getElementById("menu-mask").addEventListener("click",(t=>{a()})),y(),GLOBAL_CONFIG.islazyload&&(window.lazyLoadInstance=new LazyLoad({elements_selector:"img",threshold:0,data_src:"lazy-src"})),void 0!==GLOBAL_CONFIG.copyright&&(()=>{const t=GLOBAL_CONFIG.copyright;document.body.oncopy=e=>{let n;e.preventDefault();const o=window.getSelection(0).toString();return n=o.length>t.limitCount?o+"\n\n\n"+t.languages.author+"\n"+t.languages.link+window.location.href+"\n"+t.languages.source+"\n"+t.languages.info:o,e.clipboardData?e.clipboardData.setData("text",n):window.clipboardData.setData("text",n)}})()}));
@@ -0,0 +1 @@
1
+ function waterfall(t){function e(t,e){var n=window.getComputedStyle(e);return parseFloat(n["margin"+t])||0}function n(t){return t+"px"}function r(t){return parseFloat(t.style.left)}function o(t){return t.clientWidth}function l(t){return function(t){return parseFloat(t.style.top)}(t)+function(t){return t.clientHeight}(t)+e("Bottom",t)}function i(t){return r(t)+o(t)+e("Right",t)}function u(t){t=t.sort((function(t,e){return l(t)===l(e)?r(e)-r(t):l(e)-l(t)}))}function a(e){o(t)!=h&&(e.target.removeEventListener(e.type,arguments.callee),waterfall(t))}"string"==typeof t&&(t=document.querySelector(t));var s=[].map.call(t.children,(function(t){return t.style.position="absolute",t}));t.style.position="relative";var f=[];s.length&&(s[0].style.top="0px",s[0].style.left=n(e("Left",s[0])),f.push(s[0]));for(var p=1;p<s.length;p++){var c=s[p-1],y=s[p];if(!(i(c)+o(y)<=o(t)))break;y.style.top=c.style.top,y.style.left=n(i(c)+e("Left",y)),f.push(y)}for(;p<s.length;p++){u(f);y=s[p];var d=f.pop();y.style.top=n(l(d)+e("Top",y)),y.style.left=n(r(d)),f.push(y)}u(f);var v=f[0];t.style.height=n(l(v)+e("Bottom",v));var h=o(t);window.addEventListener?window.addEventListener("resize",a):document.body.onresize=a}