mycpen-blog 0.0.0-wjbrdpunvk → 0.0.0-wjdcuicfya
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index.css +1 -1
- package/js/APlayer.js +1 -1
- package/js/Meting.js +1 -1
- package/js/ali_font.js +1 -1
- package/js/custom.js +1 -1
- package/js/fcircle.js +1 -1
- package/js/fcircle_manage_panel.js +4 -6
- package/js/home_page_swiper.js +1 -1
- package/js/main.js +1 -1
- package/js/people.js +1 -1
- package/js/random.js +1 -1
- package/js/random_friends_post.js +1 -1
- package/js/search/algolia.js +1 -1
- package/js/search/local-search.js +1 -1
- package/js/tianli_gpt.js +1 -1
- package/js/tw_cn.js +1 -1
- package/js/ua_parser.js +1 -1
- package/js/utils.js +1 -1
- package/js/waterfall.js +1 -1
- package/json/friend.json +1 -1
- package/json/link.json +1 -1
- package/lib/hbe.js +1 -1
- package/manifest.json +1 -1
- package/music1/js/APlayer.min.js +1 -1
- package/music1/js/Meting2.min.js +1 -1
- package/music1/js/main.js +1 -1
- package/music1/main.css +1 -1
- package/music1/manifest.json +2 -2
- package/package.json +1 -1
- package/search.xml +47 -47
- package/sitemap.xml +78 -78
- package/wechatOA/main.css +1 -1
- package/wechatOA/main.js +1 -1
package/js/home_page_swiper.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
function butterfly_swiper_injector_config(){document.getElementById("recent-posts").insertAdjacentHTML("afterbegin",'<div class="recent-post-item swiper_container_card" style="height: auto;width: 100%"><div class="blog-slider swiper-container-fade swiper-container-horizontal" id="swiper_container"><div class="blog-slider__wrp swiper-wrapper" style="transition-duration: 0ms;"><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("posts/16589f92.html");" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.jsdmirror.com/npm/mycpen-image-bed@0.0.0-fyuqcoacxh/image/blog/logo/zhuanzai160px.png" alt="" onerror="this.onerror=null,this.src="/img/404.jpg""/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-12-03</span><a class="blog-slider__title" onclick="pjax.loadUrl("posts/16589f92.html");" href="javascript:void(0);" alt="">01_转载-图床搭建 Backblaze B2 + Cloudflare CDN</a><div class="blog-slider__text">文章转载</div><a class="blog-slider__button" onclick="pjax.loadUrl("posts/16589f92.html");" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("posts/88a726.html");" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.jsdmirror.com/npm/mycpen-image-bed@0.0.0-fyuqcoacxh/image/blog/logo/other-logo2.png" alt="" onerror="this.onerror=null,this.src="/img/404.jpg""/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-10-10</span><a class="blog-slider__title" onclick="pjax.loadUrl("posts/88a726.html");" href="javascript:void(0);" alt="">01_Other-Supervisor管理进程-Twikoo版本升级</a><div class="blog-slider__text">其他分类</div><a class="blog-slider__button" onclick="pjax.loadUrl("posts/88a726.html");" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("posts/5552.html");" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.jsdmirror.com/npm/mycpen-image-bed@0.0.0-fyuqcoacxh/image/blog/logo/error-logo2.png" alt="" onerror="this.onerror=null,this.src="/img/404.jpg""/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-10-09</span><a class="blog-slider__title" onclick="pjax.loadUrl("posts/5552.html");" href="javascript:void(0);" alt="">01_Error-Nginx 反代后端接口报错</a><div class="blog-slider__text">Troubleshooting</div><a class="blog-slider__button" onclick="pjax.loadUrl("posts/5552.html");" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("posts/63259.html");" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.jsdmirror.com/npm/mycpen-image-bed@0.0.0-fyuqcoacxh/image/blog/logo/php-logo2.png" alt="" onerror="this.onerror=null,this.src="/img/404.jpg""/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-10-08</span><a class="blog-slider__title" onclick="pjax.loadUrl("posts/63259.html");" href="javascript:void(0);" alt="">01_PHP-CentOS8.2 编译安装 PHP8.1.10</a><div class="blog-slider__text">一种开源的通用计算机脚本语言</div><a class="blog-slider__button" onclick="pjax.loadUrl("posts/63259.html");" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("posts/16756.html");" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.jsdmirror.com/npm/mycpen-image-bed@0.0.0-fyuqcoacxh/image/blog/logo/python-logo3.png" alt="" onerror="this.onerror=null,this.src="/img/404.jpg""/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-09-28</span><a class="blog-slider__title" onclick="pjax.loadUrl("posts/16756.html");" href="javascript:void(0);" alt="">01_Python-CSDN_环境搭建</a><div class="blog-slider__text">一种广泛使用的解释型、高级和通用的编程语言</div><a class="blog-slider__button" onclick="pjax.loadUrl("posts/16756.html");" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("posts/14763.html");" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.jsdmirror.com/npm/mycpen-image-bed@0.0.0-fyuqcoacxh/image/blog/logo/django-logo2.png" alt="" onerror="this.onerror=null,this.src="/img/404.jpg""/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-09-24</span><a class="blog-slider__title" onclick="pjax.loadUrl("posts/14763.html");" href="javascript:void(0);" alt="">01_Django-介绍-项目结构-URL和视图函数</a><div class="blog-slider__text">一个开放源代码的 Web 应用框架</div><a class="blog-slider__button" onclick="pjax.loadUrl("posts/14763.html");" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("posts/12907.html");" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.jsdmirror.com/npm/mycpen-image-bed@0.0.0-fyuqcoacxh/image/blog/logo/java-logo3.png" alt="" onerror="this.onerror=null,this.src="/img/404.jpg""/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-09-21</span><a class="blog-slider__title" onclick="pjax.loadUrl("posts/12907.html");" href="javascript:void(0);" alt="">01_Java-特性-jdk-运行机制-转义字符-注释-代码规范</a><div class="blog-slider__text">一种广泛使用的计算机编程语言</div><a class="blog-slider__button" onclick="pjax.loadUrl("posts/12907.html");" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("posts/8236.html");" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.jsdmirror.com/npm/mycpen-image-bed@0.0.0-fyuqcoacxh/image/blog/logo/hexo-logo2.png" alt="" onerror="this.onerror=null,this.src="/img/404.jpg""/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-09-20</span><a class="blog-slider__title" onclick="pjax.loadUrl("posts/8236.html");" href="javascript:void(0);" alt="">01_Hexo-Hexo + Pure搭建博客-自定义</a><div class="blog-slider__text">一个快速、简洁且高效的博客框架</div><a class="blog-slider__button" onclick="pjax.loadUrl("posts/8236.html");" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("posts/48860.html");" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.jsdmirror.com/npm/mycpen-image-bed@0.0.0-fyuqcoacxh/image/blog/logo/linux-logo2.png" alt="" onerror="this.onerror=null,this.src="/img/404.jpg""/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-08-28</span><a class="blog-slider__title" onclick="pjax.loadUrl("posts/48860.html");" href="javascript:void(0);" alt="">01_Linux基础-部署-VMware-Xshell-Xftp-内核-安迪比尔定理</a><div class="blog-slider__text">一种自由和开放源码的类 UNIX 操作系统</div><a class="blog-slider__button" onclick="pjax.loadUrl("posts/48860.html");" href="javascript:void(0);" alt="">详情 </a></div></div></div><div class="blog-slider__pagination swiper-pagination-clickable swiper-pagination-bullets"></div></div><div id="random"><div id="random-banner"><canvas id="peoplecanvas"></canvas></div><a id="random-hover" style="width:100%;height:auto;" href="javascript:toRandomPost()" rel="external nofollow noreferrer" one-link-mark="yes"><i class="fa fa-paper-plane" style="margin-left:13px"></i><div style="margin-left:13px;-webkit-line-clamp: 1;overflow: hidden;-webkit-box-orient: vertical;display: -webkit-box;word-break: break-all;">随便逛逛</div><i class="fa-solid fa-arrow-right" style="margin-left:107px"></i></a></div></div>')}function whenDOMReadyHomePageSwiper(){for(var l="undefined".split(","),t=location.pathname,o=0;o<l.length;o++)t.includes(l[o])&&0;document.getElementById("mycpen1-home-first-page-tag")&&butterfly_swiper_injector_config();var a=new Swiper(".blog-slider",{passiveListeners:!0,spaceBetween:30,effect:"fade",loop:!0,autoplay:{disableOnInteraction:!0,delay:3e3},mousewheel:!0,pagination:{el:".blog-slider__pagination",clickable:!0}}),s=document.getElementById("swiper_container");null!==s&&(s.onmouseenter=function(){a.autoplay.stop()},s.onmouseleave=function(){a.autoplay.start()})}whenDOMReadyHomePageSwiper(),document.addEventListener("pjax:complete",whenDOMReadyHomePageSwiper);
|
1
|
+
function butterfly_swiper_injector_config(){document.getElementById("recent-posts").insertAdjacentHTML("afterbegin",'<div class="recent-post-item swiper_container_card" style="height: auto;width: 100%"><div class="blog-slider swiper-container-fade swiper-container-horizontal" id="swiper_container"><div class="blog-slider__wrp swiper-wrapper" style="transition-duration: 0ms;"><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("posts/16589f92.html");" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.cbd.int/mycpen-image-bed@0.0.0-fyvcuicfgn/image/blog/logo/zhuanzai160px.png" alt="" onerror="this.onerror=null,this.src="/img/404.jpg""/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-12-03</span><a class="blog-slider__title" onclick="pjax.loadUrl("posts/16589f92.html");" href="javascript:void(0);" alt="">01_转载-图床搭建 Backblaze B2 + Cloudflare CDN</a><div class="blog-slider__text">文章转载</div><a class="blog-slider__button" onclick="pjax.loadUrl("posts/16589f92.html");" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("posts/88a726.html");" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.cbd.int/mycpen-image-bed@0.0.0-fyvcuicfgn/image/blog/logo/other-logo2.png" alt="" onerror="this.onerror=null,this.src="/img/404.jpg""/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-10-10</span><a class="blog-slider__title" onclick="pjax.loadUrl("posts/88a726.html");" href="javascript:void(0);" alt="">01_Other-Supervisor管理进程-Twikoo版本升级</a><div class="blog-slider__text">其他分类</div><a class="blog-slider__button" onclick="pjax.loadUrl("posts/88a726.html");" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("posts/5552.html");" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.cbd.int/mycpen-image-bed@0.0.0-fyvcuicfgn/image/blog/logo/error-logo2.png" alt="" onerror="this.onerror=null,this.src="/img/404.jpg""/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-10-09</span><a class="blog-slider__title" onclick="pjax.loadUrl("posts/5552.html");" href="javascript:void(0);" alt="">01_Error-Nginx 反代后端接口报错</a><div class="blog-slider__text">Troubleshooting</div><a class="blog-slider__button" onclick="pjax.loadUrl("posts/5552.html");" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("posts/63259.html");" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.cbd.int/mycpen-image-bed@0.0.0-fyvcuicfgn/image/blog/logo/php-logo2.png" alt="" onerror="this.onerror=null,this.src="/img/404.jpg""/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-10-08</span><a class="blog-slider__title" onclick="pjax.loadUrl("posts/63259.html");" href="javascript:void(0);" alt="">01_PHP-CentOS8.2 编译安装 PHP8.1.10</a><div class="blog-slider__text">一种开源的通用计算机脚本语言</div><a class="blog-slider__button" onclick="pjax.loadUrl("posts/63259.html");" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("posts/16756.html");" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.cbd.int/mycpen-image-bed@0.0.0-fyvcuicfgn/image/blog/logo/python-logo3.png" alt="" onerror="this.onerror=null,this.src="/img/404.jpg""/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-09-28</span><a class="blog-slider__title" onclick="pjax.loadUrl("posts/16756.html");" href="javascript:void(0);" alt="">01_Python-CSDN_环境搭建</a><div class="blog-slider__text">一种广泛使用的解释型、高级和通用的编程语言</div><a class="blog-slider__button" onclick="pjax.loadUrl("posts/16756.html");" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("posts/14763.html");" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.cbd.int/mycpen-image-bed@0.0.0-fyvcuicfgn/image/blog/logo/django-logo2.png" alt="" onerror="this.onerror=null,this.src="/img/404.jpg""/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-09-24</span><a class="blog-slider__title" onclick="pjax.loadUrl("posts/14763.html");" href="javascript:void(0);" alt="">01_Django-介绍-项目结构-URL和视图函数</a><div class="blog-slider__text">一个开放源代码的 Web 应用框架</div><a class="blog-slider__button" onclick="pjax.loadUrl("posts/14763.html");" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("posts/12907.html");" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.cbd.int/mycpen-image-bed@0.0.0-fyvcuicfgn/image/blog/logo/java-logo3.png" alt="" onerror="this.onerror=null,this.src="/img/404.jpg""/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-09-21</span><a class="blog-slider__title" onclick="pjax.loadUrl("posts/12907.html");" href="javascript:void(0);" alt="">01_Java-特性-jdk-运行机制-转义字符-注释-代码规范</a><div class="blog-slider__text">一种广泛使用的计算机编程语言</div><a class="blog-slider__button" onclick="pjax.loadUrl("posts/12907.html");" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("posts/8236.html");" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.cbd.int/mycpen-image-bed@0.0.0-fyvcuicfgn/image/blog/logo/hexo-logo2.png" alt="" onerror="this.onerror=null,this.src="/img/404.jpg""/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-09-20</span><a class="blog-slider__title" onclick="pjax.loadUrl("posts/8236.html");" href="javascript:void(0);" alt="">01_Hexo-Hexo + Pure搭建博客-自定义</a><div class="blog-slider__text">一个快速、简洁且高效的博客框架</div><a class="blog-slider__button" onclick="pjax.loadUrl("posts/8236.html");" href="javascript:void(0);" alt="">详情 </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl("posts/48860.html");" href="javascript:void(0);" alt=""><img class="nolazyload" width="48" height="48" src="https://cdn.cbd.int/mycpen-image-bed@0.0.0-fyvcuicfgn/image/blog/logo/linux-logo2.png" alt="" onerror="this.onerror=null,this.src="/img/404.jpg""/></a><div class="blog-slider__content"><span class="blog-slider__code">2022-08-28</span><a class="blog-slider__title" onclick="pjax.loadUrl("posts/48860.html");" href="javascript:void(0);" alt="">01_Linux基础-部署-VMware-Xshell-Xftp-内核-安迪比尔定理</a><div class="blog-slider__text">一种自由和开放源码的类 UNIX 操作系统</div><a class="blog-slider__button" onclick="pjax.loadUrl("posts/48860.html");" href="javascript:void(0);" alt="">详情 </a></div></div></div><div class="blog-slider__pagination swiper-pagination-clickable swiper-pagination-bullets"></div></div><div id="random"><div id="random-banner"><canvas id="peoplecanvas"></canvas></div><a id="random-hover" style="width:100%;height:auto;" href="javascript:toRandomPost()" rel="external nofollow noreferrer" one-link-mark="yes"><i class="fa fa-paper-plane" style="margin-left:13px"></i><div style="margin-left:13px;-webkit-line-clamp: 1;overflow: hidden;-webkit-box-orient: vertical;display: -webkit-box;word-break: break-all;">随便逛逛</div><i class="fa-solid fa-arrow-right" style="margin-left:107px"></i></a></div></div>')}function whenDOMReadyHomePageSwiper(){for(var l="undefined".split(","),t=location.pathname,o=0;o<l.length;o++)t.includes(l[o])&&0;document.getElementById("mycpen1-home-first-page-tag")&&butterfly_swiper_injector_config();var a=new Swiper(".blog-slider",{passiveListeners:!0,spaceBetween:30,effect:"fade",loop:!0,autoplay:{disableOnInteraction:!0,delay:3e3},mousewheel:!0,pagination:{el:".blog-slider__pagination",clickable:!0}}),s=document.getElementById("swiper_container");null!==s&&(s.onmouseenter=function(){a.autoplay.stop()},s.onmouseleave=function(){a.autoplay.start()})}whenDOMReadyHomePageSwiper(),document.addEventListener("pjax:complete",whenDOMReadyHomePageSwiper);logo/hexo-logo2.png\x22\x20alt=\x22\x22\x20onerror=\x22this.onerror=null,this.src="/img/404.jpg"\x22/></a><div\x20class=\x22blog-slider__content\x22><span\x20class=\x22blog-slider__code\x22>2022-09-20</span><a\x20class=\x22blog-slider__title\x22\x20onclick=\x22pjax.loadUrl("posts/8236.html");\x22\x20href=\x22javascript:void(0);\x22\x20alt=\x22\x22>01_Hexo-Hexo\x20+\x20Pure搭建博客-自定义</a><div\x20class=\x22blog-slider__text\x22>一个快速、简洁且高效的博客框架</div><a\x20class=\x22blog-slider__button\x22\x20onclick=\x22pjax.loadUrl("posts/8236.html");\x22\x20href=\x22javascript:void(0);\x22\x20alt=\x22\x22>详情\x20\x20\x20\x20\x20\x20\x20</a></div></div><div\x20class=\x22blog-slider__item\x20swiper-slide\x22\x20style=\x22width:\x20750px;\x20opacity:\x201;\x20transform:\x20translate3d(0px,\x200px,\x200px);\x20transition-duration:\x200ms;\x22><a\x20class=\x22blog-slider__img\x22\x20onclick=\x22pjax.loadUrl("posts/48860.html");\x22\x20href=\x22javascript:void(0);\x22\x20alt=\x22\x22><img\x20class=\x22nolazyload\x22\x20width=\x2248\x22\x20height=\x2248\x22\x20src=\x22https://cdn.cbd.int/mycpen-image-bed@0.0.0-fyvcuicfgn/image/blog/logo/linux-logo2.png\x22\x20alt=\x22\x22\x20onerror=\x22this.onerror=null,this.src="/img/404.jpg"\x22/></a><div\x20class=\x22blog-slider__content\x22><span\x20class=\x22blog-slider__code\x22>2022-08-28</span><a\x20class=\x22blog-slider__title\x22\x20onclick=\x22pjax.loadUrl("posts/48860.html");\x22\x20href=\x22javascript:void(0);\x22\x20alt=\x22\x22>01_Linux基础-部署-VMware-Xshell-Xftp-内核-安迪比尔定理</a><div\x20class=\x22blog-slider__text\x22>一种自由和开放源码的类\x20UNIX\x20操作系统</div><a\x20class=\x22blog-slider__button\x22\x20onclick=\x22pjax.loadUrl("posts/48860.html");\x22\x20href=\x22javascript:void(0);\x22\x20alt=\x22\x22>详情\x20\x20\x20\x20\x20\x20\x20</a></div></div></div><div\x20class=\x22blog-slider__pagination\x20swiper-pagination-clickable\x20swiper-pagination-bullets\x22></div></div><div\x20id=\x22random\x22><div\x20id=\x22random-banner\x22><canvas\x20id=\x22peoplecanvas\x22></canvas></div><a\x20id=\x22random-hover\x22\x20style=\x22width:100%;height:auto;\x22\x20href=\x22javascript:toRandomPost()\x22\x20rel=\x22external\x20nofollow\x20noreferrer\x22\x20one-link-mark=\x22yes\x22><i\x20class=\x22fa\x20fa-paper-plane\x22\x20style=\x22margin-left:13px\x22></i><div\x20style=\x22margin-left:13px;-webkit-line-clamp:\x201;overflow:\x20hidden;-webkit-box-orient:\x20vertical;display:\x20-webkit-box;word-break:\x20break-all;\x22>随便逛逛</div><i\x20class=\x22fa-solid\x20fa-arrow-right\x22\x20style=\x22margin-left:107px\x22></i></a></div></div>';_0x565d36['insertAdjacentHTML'](_0x4107d5(0x17a),_0x3daa64);}function whenDOMReadyHomePageSwiper(){var _0x47cdb1=_0x4674,_0x351b89=_0x47cdb1(0x18b)[_0x47cdb1(0x188)](','),_0x12dc92=location[_0x47cdb1(0x187)],_0x472619='/',_0x561688=0x0;for(var _0x2964a5=0x0;_0x2964a5<_0x351b89['length'];_0x2964a5++){_0x12dc92[_0x47cdb1(0x181)](_0x351b89[_0x2964a5])&&_0x561688++;}document[_0x47cdb1(0x17f)](_0x47cdb1(0x178))&&butterfly_swiper_injector_config();var _0x4add27=new Swiper(_0x47cdb1(0x185),{'passiveListeners':!0x0,'spaceBetween':0x1e,'effect':'fade','loop':!0x0,'autoplay':{'disableOnInteraction':!0x0,'delay':0xbb8},'mousewheel':!0x0,'pagination':{'el':_0x47cdb1(0x18a),'clickable':!0x0}}),_0xdde76b=document[_0x47cdb1(0x17f)](_0x47cdb1(0x180));null!==_0xdde76b&&(_0xdde76b[_0x47cdb1(0x18c)]=function(){var _0xe92fe2=_0x47cdb1;_0x4add27[_0xe92fe2(0x186)][_0xe92fe2(0x17c)]();},_0xdde76b[_0x47cdb1(0x183)]=function(){var _0x258299=_0x47cdb1;_0x4add27['autoplay'][_0x258299(0x189)]();});}function _0x20a7(){var _0x8ecc8f=['1095752LhZjQs','stop','186741FCOVIR','addEventListener','getElementById','swiper_container','includes','233379AGxFnf','onmouseleave','16dCqylD','.blog-slider','autoplay','pathname','split','start','.blog-slider__pagination','undefined','onmouseenter','1341036LOrcOj','1457340NcpEpF','484530mNPQtP','1521621FngGDm','recent-posts','mycpen1-home-first-page-tag','7RHEFDo','afterbegin'];_0x20a7=function(){return _0x8ecc8f;};return _0x20a7();}whenDOMReadyHomePageSwiper(),document[_0xd8fdc2(0x17e)]('pjax:complete',whenDOMReadyHomePageSwiper);
|
package/js/main.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
document.addEventListener("DOMContentLoaded",(function(){let e,t,n=!1;const o=n=>{const o=e=>Array.from(e).reduce(((e,t)=>e+t.offsetWidth),0);if(n){const n=o(document.querySelector("#blog-info > a").children),s=o(document.getElementById("menus").children);e=n+s,t=document.getElementById("nav")}const s=window.innerWidth<=768||e>t.offsetWidth-120;t.classList.toggle("hide-menu",s)},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"),n=!0},i=()=>{const e=document.body;e.style.overflow="",e.style.paddingRight="",btf.animateOut(document.getElementById("menu-mask"),"to_hide 0.5s"),document.getElementById("sidebar-menus").classList.remove("open"),n=!1},c=()=>{const e=GLOBAL_CONFIG.highlight;if(!e)return;const{highlightCopy:t,highlightLang:n,highlightHeightLimit:o,plugin:s}=e,i=GLOBAL_CONFIG_SITE.isHighlightShrink,c=t||n||void 0!==i,a="highlight.js"===s?document.querySelectorAll("figure.highlight"):document.querySelectorAll('pre[class*="language-"]');if(!c&&!o||!a.length)return;const l="prismjs"===s,d=!0===i?"closed":"",r=void 0!==i?'<i class="fas fa-angle-down expand"></i>':"",u=t?'<div class="copy-notice"></div><i class="fas fa-paste copy-button"></i>':"",m=(e,t)=>{if(void 0!==GLOBAL_CONFIG.Snackbar)btf.snackbarShow(t);else{const n=e.previousElementSibling;n.textContent=t,n.style.opacity=1,setTimeout((()=>{n.style.opacity=0}),800)}},g=e=>{const t=e.parentNode;t.classList.add("copy-true");const n=window.getSelection(),o=document.createRange(),s=l?"pre code":"table .code pre";var i;o.selectNodeContents(t.querySelectorAll(`${s}`)[0]),n.removeAllRanges(),n.addRange(o),i=e.lastChild,document.queryCommandSupported&&document.queryCommandSupported("copy")?(document.execCommand("copy"),m(i,GLOBAL_CONFIG.copy.success)):m(i,GLOBAL_CONFIG.copy.noSupport),n.removeAllRanges(),t.classList.remove("copy-true")},h=function(e){const t=e.target.classList;t.contains("expand")?this.classList.toggle("closed"):t.contains("copy-button")&&g(this)},f=function(){this.classList.toggle("expand-done")},L=(e,t,n)=>{const s=document.createDocumentFragment();if(c){const t=document.createElement("div");t.className=`highlight-tools ${d}`,t.innerHTML=r+e+u,btf.addEventListenerPjax(t,"click",h),s.appendChild(t)}if(o&&t.offsetHeight>o+30){const e=document.createElement("div");e.className="code-expand-btn",e.innerHTML='<i class="fas fa-angle-double-down"></i>',btf.addEventListenerPjax(e,"click",f),s.appendChild(e)}"hl"===n?t.insertBefore(s,t.firstChild):t.parentNode.insertBefore(s,t)};l?a.forEach((e=>{if(n){const t=`<div class="code-lang">${e.getAttribute("data-language")||"Code"}</div>`;btf.wrap(e,"figure",{class:"highlight"}),L(t,e)}else btf.wrap(e,"figure",{class:"highlight"}),L("",e)})):a.forEach((e=>{if(n){let t=e.getAttribute("class").split(" ")[1];"plain"!==t&&void 0!==t||(t="Code");L(`<div class="code-lang">${t}</div>`,e,"hl")}else L("",e,"hl")}))},a=async e=>{const t=await fetch(e);return await t.json()},l=(e,t,n=!1,o)=>{const s=t.length,i=new InfiniteGrid.JustifiedInfiniteGrid(e,{gap:5,isConstantSize:!0,sizeRange:[150,600],useResizeObserver:!0,observeChildren:!0,useTransform:!0});o&&btf.addGlobalFn("igOfTabs",(()=>{i.destroy()}),!1,o);const c=e=>e.replace(/"/g,"""),a=GLOBAL_CONFIG.infinitegrid.buttonText,l=(e,n)=>{i.append(((e,n)=>{const o=[],i=(e-1)*n;for(let e=0;e<n;++e){const n=i+e;if(n>=s)break;const a=t[n],l=a.alt?`alt="${c(a.alt)}"`:"",d=a.title?`title="${c(a.title)}"`:"";o.push(`<div class="item ">\n <img src="${a.url}" data-grid-maintained-target="true" ${l+d} />\n </div>`)}return o})(e,n),e)},d=Math.ceil(s/10),r=t=>{const{updated:o,isResize:s,mounted:c}=t;if(o.length&&c.length&&!s){if(btf.loadLightbox(e.querySelectorAll("img:not(.medium-zoom-image)")),i.getGroups().length===d)return btf.setLoading.remove(e),void i.off("renderComplete",r);n&&(btf.setLoading.remove(e),(e=>{const t=document.createElement("button");t.textContent=a;const n=t=>{t.target.removeEventListener("click",n),t.target.remove(),btf.setLoading.add(e),l(i.getGroups().length+1,10)};t.addEventListener("click",n),e.insertAdjacentElement("afterend",t)})(e))}},u=btf.debounce((e=>{const t=(+e.groupKey||0)+1;l(t,10),t===d&&i.off("requestAppend",u)}),300);btf.setLoading.add(e),i.on("renderComplete",r),n?l(1,10):(i.on("requestAppend",u),i.renderItems()),btf.addGlobalFn("justifiedGallery",(()=>{i.destroy()}))},d=async(e,t=!1)=>{const n=async()=>{for(const n of e){if(btf.isHidden(n))continue;if(t&&n.classList.contains("loaded")){n.querySelector(".gallery-items").innerHTML="";const e=n.querySelector(":scope > button"),t=n.querySelector(":scope > .loading-container");e&&e.remove(),t&&t.remove()}const e="true"===n.getAttribute("data-button"),o=n.firstElementChild.textContent;n.classList.add("loaded");const s="url"===n.getAttribute("data-type")?await a(o):JSON.parse(o);l(n.lastElementChild,s,e,t)}};"function"==typeof InfiniteGrid||await getScript(`${GLOBAL_CONFIG.infinitegrid.js}`),n()},r=()=>{const e=document.getElementById("rightside"),t=window.innerHeight+56;let n=0;const o=document.getElementById("page-header"),s="undefined"!=typeof chatBtn,i=GLOBAL_CONFIG.percent.rightside;if(document.body.scrollHeight<=t)return void e.classList.add("rightside-show");let c="";const a=btf.throttle((()=>{const a=window.scrollY||document.documentElement.scrollTop,l=(e=>{const t=e>n;return n=e,t})(a);a>56?(o.classList.add("is-top-bar"),""===c&&(o.classList.add("nav-fixed"),e.classList.add("rightside-show")),l?"down"!==c&&(o.classList.remove("nav-visible"),s&&window.chatBtn.hide(),c="down"):"up"!==c&&(o.classList.add("nav-visible"),s&&window.chatBtn.show(),c="up")):(c="",0===a&&(o.classList.remove("is-top-bar"),o.classList.remove("nav-fixed","nav-visible")),e.classList.remove("rightside-show")),i&&(e=>{const t=btf.getScrollPercent(e,document.body),n=document.getElementById("go-up");t<95?(n.classList.add("show-percent"),n.querySelector(".scroll-percent").textContent=t):n.classList.remove("show-percent")})(a),document.body.scrollHeight<=t&&e.classList.add("rightside-show")}),50);btf.addEventListenerPjax(window,"scroll",a,{passive:!0})},u=()=>{const e=GLOBAL_CONFIG_SITE.isToc,t=GLOBAL_CONFIG.isAnchor,n=document.getElementById("article-container");if(!n||!e&&!t)return;let o,s,i,c,a;if(e){const e=document.getElementById("card-toc");s=e.querySelector(".toc-content"),o=s.querySelectorAll(".toc-link"),c=e.querySelector(".toc-percentage"),a=s.classList.contains("is-expand");const t=t=>{const n=t.target.closest(".toc-link");n&&(t.preventDefault(),btf.scrollToDest(btf.getEleTop(document.getElementById(decodeURI(n.getAttribute("href")).replace("#",""))),300),window.innerWidth<900&&e.classList.remove("open"))};btf.addEventListenerPjax(s,"click",t),i=e=>{const t=e.getBoundingClientRect().top,n=s.scrollTop;t>document.documentElement.clientHeight-100&&(s.scrollTop=n+150),t<100&&(s.scrollTop=n-150)}}const l=n.querySelectorAll("h1,h2,h3,h4,h5,h6");let d="";const r=btf.throttle((()=>{const r=window.scrollY||document.documentElement.scrollTop;e&&GLOBAL_CONFIG.percent.toc&&(c.textContent=btf.getScrollPercent(r,n)),(n=>{if(0===n)return!1;let c="",r="";if(l.forEach(((e,t)=>{if(n>btf.getEleTop(e)-80){const n=e.id;c=n?"#"+encodeURI(n):"",r=t}})),d!==r&&(t&&btf.updateAnchor(c),d=r,e)){if(s.querySelectorAll(".active").forEach((e=>{e.classList.remove("active")})),""===c)return;const e=o[r];if(e.classList.add("active"),setTimeout((()=>{i(e)}),0),a)return;let t=e.parentNode;for(;!t.matches(".toc");t=t.parentNode)t.matches("li")&&t.classList.add("active")}})(r)}),50);btf.addEventListenerPjax(window,"scroll",r,{passive:!0})},m=e=>{const t=(window.globalFn||{}).themeChange||{};t&&Object.keys(t).forEach((n=>{const o=t[n];["disqus","disqusjs"].includes(n)?setTimeout((()=>o(e)),300):o(e)}))},g={readmode:()=>{const e=document.body;e.classList.add("read-mode");const t=document.createElement("button");t.type="button",t.className="fas fa-sign-out-alt exit-readmode",e.appendChild(t);const n=()=>{e.classList.remove("read-mode"),t.remove(),t.removeEventListener("click",n)};t.addEventListener("click",n)},darkmode:()=>{const e="dark"===document.documentElement.getAttribute("data-theme")?"light":"dark";"dark"===e?(activateDarkMode(),void 0!==GLOBAL_CONFIG.Snackbar&&btf.snackbarShow(GLOBAL_CONFIG.Snackbar.day_to_night)):(activateLightMode(),void 0!==GLOBAL_CONFIG.Snackbar&&btf.snackbarShow(GLOBAL_CONFIG.Snackbar.night_to_day)),saveToLocal.set("theme",e,2),m(e)},"rightside-config":e=>{const t=e.firstElementChild;t.classList.contains("show")&&(t.classList.add("status"),setTimeout((()=>{t.classList.remove("status")}),300)),t.classList.toggle("show")},"go-up":()=>{btf.scrollToDest(0,500)},"hide-aside-btn":()=>{const e=document.documentElement.classList,t=e.contains("hide-aside")?"show":"hide";saveToLocal.set("aside-status",t,2),e.toggle("hide-aside")},"mobile-toc-button":e=>{const t=document.getElementById("card-toc");t.style.transition="transform 0.3s ease-in-out",t.classList.toggle("open"),t.addEventListener("transitionend",(()=>{t.style.transition=""}),{once:!0})},"chat-btn":()=>{window.chatBtnFn()},translateLink:()=>{window.translateFn.translatePage()}};document.getElementById("rightside").addEventListener("click",(function(e){const t=e.target.closest("[id]");t&&g[t.id]&&g[t.id](this)}));const h=()=>{const e=document.querySelectorAll("#article-container .hide-button");if(!e.length)return;const t=function(e){this.classList.add("open");const t=this.nextElementSibling.querySelectorAll(".gallery-container");t.length&&d(t)};e.forEach((e=>{e.addEventListener("click",t,{once:!0})}))},f=()=>{const e=document.querySelectorAll("#article-container .tabs");if(!e.length)return;const t=(e,t)=>{Array.from(e).forEach((e=>{e.classList.remove("active"),e!==t&&e.id!==t||e.classList.add("active")}))},n=(e,n)=>{btf.addEventListenerPjax(e.firstElementChild,"click",(function(e){const o=e.target.closest("button");if(o.classList.contains("active"))return;t(this.children,o),this.classList.remove("no-default");const s=o.getAttribute("data-href"),i=this.nextElementSibling;if(t(i.children,s),n){btf.removeGlobalFnEvent("igOfTabs",this);const e=i.querySelectorAll(`:scope > #${s} .gallery-container`);e.length&&d(e,this)}}))};e.forEach((e=>{const t=!!e.querySelectorAll(".gallery-container");n(e,t),(e=>{btf.addEventListenerPjax(e.lastElementChild,"click",(t=>{t.target.closest("button")&&btf.scrollToDest(btf.getEleTop(e),300)}))})(e)}))},L=function(e){e.forEach((e=>{const t=e.getAttribute("datetime");e.textContent=btf.diffDate(t,!0),e.style.display="inline"}))};window.refreshFn=function(){o(!0),t.classList.add("show"),GLOBAL_CONFIG_SITE.isPost?(void 0!==GLOBAL_CONFIG.noticeOutdate&&(()=>{const{limitDay:e,messagePrev:t,messageNext:n,position:o}=GLOBAL_CONFIG.noticeOutdate,s=btf.diffDate(GLOBAL_CONFIG_SITE.postUpdate);if(s>=e){const e=document.createElement("div");e.className="post-outdate-notice",e.textContent=`${t} ${s} ${n}`;const i=document.getElementById("article-container");"top"===o?i.insertBefore(e,i.firstChild):i.appendChild(e)}})(),GLOBAL_CONFIG.relativeDate.post&&L(document.querySelectorAll("#post-meta time"))):(GLOBAL_CONFIG.relativeDate.homepage&&L(document.querySelectorAll("#recent-posts time")),GLOBAL_CONFIG.runtime&&(()=>{const e=document.getElementById("runtimeshow");if(e){const t=e.getAttribute("data-publishDate");e.textContent=`${btf.diffDate(t)} ${GLOBAL_CONFIG.runtime}`}})(),(()=>{const e=document.getElementById("last-push-date");if(e){const t=e.getAttribute("data-lastPushDate");e.textContent=btf.diffDate(t,!0)}})(),(()=>{const e=document.querySelector("#aside-cat-list.expandBtn");if(!e)return;btf.addEventListenerPjax(e,"click",(e=>{const t=e.target;"I"===t.nodeName&&(e.preventDefault(),t.parentNode.classList.toggle("expand"))}),!0)})()),u(),GLOBAL_CONFIG_SITE.isHome&&(()=>{const e=document.getElementById("scroll-down");e&&btf.addEventListenerPjax(e,"click",(()=>{btf.scrollToDest(document.getElementById("content-inner").offsetTop,300)}))})(),c(),GLOBAL_CONFIG.isPhotoFigcaption&&document.querySelectorAll("#article-container img").forEach((e=>{const t=e.title||e.alt;if(!t)return;const n=document.createElement("div");n.className="img-alt is-center",n.textContent=t,e.insertAdjacentElement("afterend",n)})),r(),btf.removeGlobalFnEvent("justifiedGallery");const e=document.querySelectorAll("#article-container .gallery-container");e.length&&d(e),btf.loadLightbox(document.querySelectorAll("#article-container img:not(.no-lightbox)")),(()=>{const e=document.querySelectorAll("#article-container table");e.length&&e.forEach((e=>{e.closest(".highlight")||btf.wrap(e,"div",{class:"table-wrap"})}))})(),h(),f(),(()=>{const e=document.getElementById("switch-btn");if(!e)return;let t=!1;const n=document.getElementById("post-comment");btf.addEventListenerPjax(e,"click",(()=>{n.classList.toggle("move"),t||"function"!=typeof loadOtherComment||(t=!0,loadOtherComment())}))})(),btf.addEventListenerPjax(document.getElementById("toggle-menu"),"click",(()=>{s()}))},refreshFn(),window.addEventListener("resize",(()=>{o(!1),n&&btf.isHidden(document.getElementById("toggle-menu"))&&i()})),document.getElementById("menu-mask").addEventListener("click",(e=>{i()})),document.querySelector("#sidebar-menus .menus_items").addEventListener("click",(e=>{const t=e.target.closest(".site-page.group");t&&t.classList.toggle("hide")})),GLOBAL_CONFIG.islazyload&&(window.lazyLoadInstance=new LazyLoad({elements_selector:"img",threshold:0,data_src:"lazy-src"})),void 0!==GLOBAL_CONFIG.copyright&&(()=>{const{limitCount:e,languages:t}=GLOBAL_CONFIG.copyright;document.body.addEventListener("copy",(n=>{n.preventDefault();const o=window.getSelection(0).toString();let s=o;return o.length>e&&(s=`${o}\n\n\n${t.author}\n${t.link}${window.location.href}\n${t.source}\n${t.info}`),n.clipboardData?n.clipboardData.setData("text",s):window.clipboardData.setData("text",s)}))})(),GLOBAL_CONFIG.autoDarkmode&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(e=>{void 0===saveToLocal.get("theme")&&(e.matches?m("dark"):m("light"))}))}));
|
1
|
+
document.addEventListener("DOMContentLoaded",(function(){let e,t,n=!1;const o=n=>{const o=e=>Array.from(e).reduce(((e,t)=>e+t.offsetWidth),0);if(n){const n=o(document.querySelector("#blog-info > a").children),s=o(document.getElementById("menus").children);e=n+s,t=document.getElementById("nav")}const s=window.innerWidth<=768||e>t.offsetWidth-120;t.classList.toggle("hide-menu",s)},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"),n=!0},i=()=>{const e=document.body;e.style.overflow="",e.style.paddingRight="",btf.animateOut(document.getElementById("menu-mask"),"to_hide 0.5s"),document.getElementById("sidebar-menus").classList.remove("open"),n=!1},c=()=>{const e=GLOBAL_CONFIG.highlight;if(!e)return;const{highlightCopy:t,highlightLang:n,highlightHeightLimit:o,plugin:s}=e,i=GLOBAL_CONFIG_SITE.isHighlightShrink,c=t||n||void 0!==i,a="highlight.js"===s?document.querySelectorAll("figure.highlight"):document.querySelectorAll('pre[class*="language-"]');if(!c&&!o||!a.length)return;const l="prismjs"===s,d=!0===i?"closed":"",r=void 0!==i?'<i class="fas fa-angle-down expand"></i>':"",u=t?'<div class="copy-notice"></div><i class="fas fa-paste copy-button"></i>':"",m=(e,t)=>{if(void 0!==GLOBAL_CONFIG.Snackbar)btf.snackbarShow(t);else{const n=e.previousElementSibling;n.textContent=t,n.style.opacity=1,setTimeout((()=>{n.style.opacity=0}),800)}},g=e=>{const t=e.parentNode;t.classList.add("copy-true");const n=window.getSelection(),o=document.createRange(),s=l?"pre code":"table .code pre";var i;o.selectNodeContents(t.querySelectorAll(`${s}`)[0]),n.removeAllRanges(),n.addRange(o),i=e.lastChild,document.queryCommandSupported&&document.queryCommandSupported("copy")?(document.execCommand("copy"),m(i,GLOBAL_CONFIG.copy.success)):m(i,GLOBAL_CONFIG.copy.noSupport),n.removeAllRanges(),t.classList.remove("copy-true")},h=function(e){const t=e.target.classList;t.contains("expand")?this.classList.toggle("closed"):t.contains("copy-button")&&g(this)},f=function(){this.classList.toggle("expand-done")},L=(e,t,n)=>{const s=document.createDocumentFragment();if(c){const t=document.createElement("div");t.className=`highlight-tools ${d}`,t.innerHTML=r+e+u,btf.addEventListenerPjax(t,"click",h),s.appendChild(t)}if(o&&t.offsetHeight>o+30){const e=document.createElement("div");e.className="code-expand-btn",e.innerHTML='<i class="fas fa-angle-double-down"></i>',btf.addEventListenerPjax(e,"click",f),s.appendChild(e)}"hl"===n?t.insertBefore(s,t.firstChild):t.parentNode.insertBefore(s,t)};l?a.forEach((e=>{if(n){const t=`<div class="code-lang">${e.getAttribute("data-language")||"Code"}</div>`;btf.wrap(e,"figure",{class:"highlight"}),L(t,e)}else btf.wrap(e,"figure",{class:"highlight"}),L("",e)})):a.forEach((e=>{if(n){let t=e.getAttribute("class").split(" ")[1];"plain"!==t&&void 0!==t||(t="Code");L(`<div class="code-lang">${t}</div>`,e,"hl")}else L("",e,"hl")}))},a=async e=>{const t=await fetch(e);return await t.json()},l=(e,t,n=!1,o)=>{const s=t.length,i=new InfiniteGrid.JustifiedInfiniteGrid(e,{gap:5,isConstantSize:!0,sizeRange:[150,600],useResizeObserver:!0,observeChildren:!0,useTransform:!0});o&&btf.addGlobalFn("igOfTabs",(()=>{i.destroy()}),!1,o);const c=e=>e.replace(/"/g,"""),a=GLOBAL_CONFIG.infinitegrid.buttonText,l=(e,n)=>{i.append(((e,n)=>{const o=[],i=(e-1)*n;for(let e=0;e<n;++e){const n=i+e;if(n>=s)break;const a=t[n],l=a.alt?`alt="${c(a.alt)}"`:"",d=a.title?`title="${c(a.title)}"`:"";o.push(`<div class="item ">\n <img src="${a.url}" data-grid-maintained-target="true" ${l+d} />\n </div>`)}return o})(e,n),e)},d=Math.ceil(s/10),r=t=>{const{updated:o,isResize:s,mounted:c}=t;if(o.length&&c.length&&!s){if(btf.loadLightbox(e.querySelectorAll("img:not(.medium-zoom-image)")),i.getGroups().length===d)return btf.setLoading.remove(e),void i.off("renderComplete",r);n&&(btf.setLoading.remove(e),(e=>{const t=document.createElement("button");t.textContent=a;const n=t=>{t.target.removeEventListener("click",n),t.target.remove(),btf.setLoading.add(e),l(i.getGroups().length+1,10)};t.addEventListener("click",n),e.insertAdjacentElement("afterend",t)})(e))}},u=btf.debounce((e=>{const t=(+e.groupKey||0)+1;l(t,10),t===d&&i.off("requestAppend",u)}),300);btf.setLoading.add(e),i.on("renderComplete",r),n?l(1,10):(i.on("requestAppend",u),i.renderItems()),btf.addGlobalFn("justifiedGallery",(()=>{i.destroy()}))},d=async(e,t=!1)=>{const n=async()=>{for(const n of e){if(btf.isHidden(n))continue;if(t&&n.classList.contains("loaded")){n.querySelector(".gallery-items").innerHTML="";const e=n.querySelector(":scope > button"),t=n.querySelector(":scope > .loading-container");e&&e.remove(),t&&t.remove()}const e="true"===n.getAttribute("data-button"),o=n.firstElementChild.textContent;n.classList.add("loaded");const s="url"===n.getAttribute("data-type")?await a(o):JSON.parse(o);l(n.lastElementChild,s,e,t)}};"function"==typeof InfiniteGrid||await getScript(`${GLOBAL_CONFIG.infinitegrid.js}`),n()},r=()=>{const e=document.getElementById("rightside"),t=window.innerHeight+56;let n=0;const o=document.getElementById("page-header"),s="undefined"!=typeof chatBtn,i=GLOBAL_CONFIG.percent.rightside;if(document.body.scrollHeight<=t)return void e.classList.add("rightside-show");let c="";const a=btf.throttle((()=>{const a=window.scrollY||document.documentElement.scrollTop,l=(e=>{const t=e>n;return n=e,t})(a);a>56?(o.classList.add("is-top-bar"),""===c&&(o.classList.add("nav-fixed"),e.classList.add("rightside-show")),l?"down"!==c&&(o.classList.remove("nav-visible"),s&&window.chatBtn.hide(),c="down"):"up"!==c&&(o.classList.add("nav-visible"),s&&window.chatBtn.show(),c="up")):(c="",0===a&&(o.classList.remove("is-top-bar"),o.classList.remove("nav-fixed","nav-visible")),e.classList.remove("rightside-show")),i&&(e=>{const t=btf.getScrollPercent(e,document.body),n=document.getElementById("go-up");t<95?(n.classList.add("show-percent"),n.querySelector(".scroll-percent").textContent=t):n.classList.remove("show-percent")})(a),document.body.scrollHeight<=t&&e.classList.add("rightside-show")}),50);btf.addEventListenerPjax(window,"scroll",a,{passive:!0})},u=()=>{const e=GLOBAL_CONFIG_SITE.isToc,t=GLOBAL_CONFIG.isAnchor,n=document.getElementById("article-container");if(!n||!e&&!t)return;let o,s,i,c,a;if(e){const e=document.getElementById("card-toc");s=e.querySelector(".toc-content"),o=s.querySelectorAll(".toc-link"),c=e.querySelector(".toc-percentage"),a=s.classList.contains("is-expand");const t=t=>{const n=t.target.closest(".toc-link");n&&(t.preventDefault(),btf.scrollToDest(btf.getEleTop(document.getElementById(decodeURI(n.getAttribute("href")).replace("#",""))),300),window.innerWidth<900&&e.classList.remove("open"))};btf.addEventListenerPjax(s,"click",t),i=e=>{const t=e.getBoundingClientRect().top,n=s.scrollTop;t>document.documentElement.clientHeight-100&&(s.scrollTop=n+150),t<100&&(s.scrollTop=n-150)}}const l=n.querySelectorAll("h1,h2,h3,h4,h5,h6");let d="";const r=btf.throttle((()=>{const r=window.scrollY||document.documentElement.scrollTop;e&&GLOBAL_CONFIG.percent.toc&&(c.textContent=btf.getScrollPercent(r,n)),(n=>{if(0===n)return!1;let c="",r="";if(l.forEach(((e,t)=>{if(n>btf.getEleTop(e)-80){const n=e.id;c=n?"#"+encodeURI(n):"",r=t}})),d!==r&&(t&&btf.updateAnchor(c),d=r,e)){if(s.querySelectorAll(".active").forEach((e=>{e.classList.remove("active")})),""===c)return;const e=o[r];if(e.classList.add("active"),setTimeout((()=>{i(e)}),0),a)return;let t=e.parentNode;for(;!t.matches(".toc");t=t.parentNode)t.matches("li")&&t.classList.add("active")}})(r)}),50);btf.addEventListenerPjax(window,"scroll",r,{passive:!0})},m=e=>{const t=(window.globalFn||{}).themeChange||{};t&&Object.keys(t).forEach((n=>{const o=t[n];["disqus","disqusjs"].includes(n)?setTimeout((()=>o(e)),300):o(e)}))},g={readmode:()=>{const e=document.body;e.classList.add("read-mode");const t=document.createElement("button");t.type="button",t.className="fas fa-sign-out-alt exit-readmode",e.appendChild(t);const n=()=>{e.classList.remove("read-mode"),t.remove(),t.removeEventListener("click",n)};t.addEventListener("click",n)},darkmode:()=>{const e="dark"===document.documentElement.getAttribute("data-theme")?"light":"dark";"dark"===e?(activateDarkMode(),void 0!==GLOBAL_CONFIG.Snackbar&&btf.snackbarShow(GLOBAL_CONFIG.Snackbar.day_to_night)):(activateLightMode(),void 0!==GLOBAL_CONFIG.Snackbar&&btf.snackbarShow(GLOBAL_CONFIG.Snackbar.night_to_day)),saveToLocal.set("theme",e,2),m(e)},"rightside-config":e=>{const t=e.firstElementChild;t.classList.contains("show")&&(t.classList.add("status"),setTimeout((()=>{t.classList.remove("status")}),300)),t.classList.toggle("show")},"go-up":()=>{btf.scrollToDest(0,500)},"hide-aside-btn":()=>{const e=document.documentElement.classList,t=e.contains("hide-aside")?"show":"hide";saveToLocal.set("aside-status",t,2),e.toggle("hide-aside")},"mobile-toc-button":e=>{const t=document.getElementById("card-toc");t.style.transition="transform 0.3s ease-in-out",t.classList.toggle("open"),t.addEventListener("transitionend",(()=>{t.style.transition=""}),{once:!0})},"chat-btn":()=>{window.chatBtnFn()},translateLink:()=>{window.translateFn.translatePage()}};document.getElementById("rightside").addEventListener("click",(function(e){const t=e.target.closest("[id]");t&&g[t.id]&&g[t.id](this)}));const h=()=>{const e=document.querySelectorAll("#article-container .hide-button");if(!e.length)return;const t=function(e){this.classList.add("open");const t=this.nextElementSibling.querySelectorAll(".gallery-container");t.length&&d(t)};e.forEach((e=>{e.addEventListener("click",t,{once:!0})}))},f=()=>{const e=document.querySelectorAll("#article-container .tabs");if(!e.length)return;const t=(e,t)=>{Array.from(e).forEach((e=>{e.classList.remove("active"),e!==t&&e.id!==t||e.classList.add("active")}))},n=(e,n)=>{btf.addEventListenerPjax(e.firstElementChild,"click",(function(e){const o=e.target.closest("button");if(o.classList.contains("active"))return;t(this.children,o),this.classList.remove("no-default");const s=o.getAttribute("data-href"),i=this.nextElementSibling;if(t(i.children,s),n){btf.removeGlobalFnEvent("igOfTabs",this);const e=i.querySelectorAll(`:scope > #${s} .gallery-container`);e.length&&d(e,this)}}))};e.forEach((e=>{const t=!!e.querySelectorAll(".gallery-container");n(e,t),(e=>{btf.addEventListenerPjax(e.lastElementChild,"click",(t=>{t.target.closest("button")&&btf.scrollToDest(btf.getEleTop(e),300)}))})(e)}))},L=function(e){e.forEach((e=>{const t=e.getAttribute("datetime");e.textContent=btf.diffDate(t,!0),e.style.display="inline"}))};window.refreshFn=function(){o(!0),t.classList.add("show"),GLOBAL_CONFIG_SITE.isPost?(void 0!==GLOBAL_CONFIG.noticeOutdate&&(()=>{const{limitDay:e,messagePrev:t,messageNext:n,position:o}=GLOBAL_CONFIG.noticeOutdate,s=btf.diffDate(GLOBAL_CONFIG_SITE.postUpdate);if(s>=e){const e=document.createElement("div");e.className="post-outdate-notice",e.textContent=`${t} ${s} ${n}`;const i=document.getElementById("article-container");"top"===o?i.insertBefore(e,i.firstChild):i.appendChild(e)}})(),GLOBAL_CONFIG.relativeDate.post&&L(document.querySelectorAll("#post-meta time"))):(GLOBAL_CONFIG.relativeDate.homepage&&L(document.querySelectorAll("#recent-posts time")),GLOBAL_CONFIG.runtime&&(()=>{const e=document.getElementById("runtimeshow");if(e){const t=e.getAttribute("data-publishDate");e.textContent=`${btf.diffDate(t)} ${GLOBAL_CONFIG.runtime}`}})(),(()=>{const e=document.getElementById("last-push-date");if(e){const t=e.getAttribute("data-lastPushDate");e.textContent=btf.diffDate(t,!0)}})(),(()=>{const e=document.querySelector("#aside-cat-list.expandBtn");if(!e)return;btf.addEventListenerPjax(e,"click",(e=>{const t=e.target;"I"===t.nodeName&&(e.preventDefault(),t.parentNode.classList.toggle("expand"))}),!0)})()),u(),GLOBAL_CONFIG_SITE.isHome&&(()=>{const e=document.getElementById("scroll-down");e&&btf.addEventListenerPjax(e,"click",(()=>{btf.scrollToDest(document.getElementById("content-inner").offsetTop,300)}))})(),c(),GLOBAL_CONFIG.isPhotoFigcaption&&document.querySelectorAll("#article-container img").forEach((e=>{const t=e.title||e.alt;if(!t)return;const n=document.createElement("div");n.className="img-alt is-center",n.textContent=t,e.insertAdjacentElement("afterend",n)})),r(),btf.removeGlobalFnEvent("justifiedGallery");const e=document.querySelectorAll("#article-container .gallery-container");e.length&&d(e),btf.loadLightbox(document.querySelectorAll("#article-container img:not(.no-lightbox)")),(()=>{const e=document.querySelectorAll("#article-container table");e.length&&e.forEach((e=>{e.closest(".highlight")||btf.wrap(e,"div",{class:"table-wrap"})}))})(),h(),f(),(()=>{const e=document.getElementById("switch-btn");if(!e)return;let t=!1;const n=document.getElementById("post-comment");btf.addEventListenerPjax(e,"click",(()=>{n.classList.toggle("move"),t||"function"!=typeof loadOtherComment||(t=!0,loadOtherComment())}))})(),btf.addEventListenerPjax(document.getElementById("toggle-menu"),"click",(()=>{s()}))},refreshFn(),window.addEventListener("resize",(()=>{o(!1),n&&btf.isHidden(document.getElementById("toggle-menu"))&&i()})),document.getElementById("menu-mask").addEventListener("click",(e=>{i()})),document.querySelector("#sidebar-menus .menus_items").addEventListener("click",(e=>{const t=e.target.closest(".site-page.group");t&&t.classList.toggle("hide")})),GLOBAL_CONFIG.islazyload&&(window.lazyLoadInstance=new LazyLoad({elements_selector:"img",threshold:0,data_src:"lazy-src"})),void 0!==GLOBAL_CONFIG.copyright&&(()=>{const{limitCount:e,languages:t}=GLOBAL_CONFIG.copyright;document.body.addEventListener("copy",(n=>{n.preventDefault();const o=window.getSelection(0).toString();let s=o;return o.length>e&&(s=`${o}\n\n\n${t.author}\n${t.link}${window.location.href}\n${t.source}\n${t.info}`),n.clipboardData?n.clipboardData.setData("text",s):window.clipboardData.setData("text",s)}))})(),GLOBAL_CONFIG.autoDarkmode&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(e=>{void 0===saveToLocal.get("theme")&&(e.matches?m("dark"):m("light"))}))}));[_0x48bd07(0x261)]()),btf[_0x48bd07(0x248)]('justifiedGallery',()=>{const _0x2c2d35=_0x48bd07;_0x57b17b[_0x2c2d35(0x1f7)]();});},_0x43b241=async(_0x16ae0a,_0x25c4ee=![])=>{const _0x4c7268=_0x4297,_0x18f650=async()=>{const _0x327e70=_0x4297;for(const _0x3a2549 of _0x16ae0a){if(btf[_0x327e70(0x1d7)](_0x3a2549))continue;if(_0x25c4ee&&_0x3a2549[_0x327e70(0x27d)]['contains']('loaded')){_0x3a2549[_0x327e70(0x21b)](_0x327e70(0x1b5))[_0x327e70(0x210)]='';const _0x4ddae5=_0x3a2549['querySelector'](_0x327e70(0x220)),_0x1230b7=_0x3a2549['querySelector'](':scope\x20>\x20.loading-container');_0x4ddae5&&_0x4ddae5[_0x327e70(0x23e)](),_0x1230b7&&_0x1230b7[_0x327e70(0x23e)]();}const _0x5dc00d=_0x3a2549[_0x327e70(0x262)](_0x327e70(0x21d))==='true',_0x4339a5=_0x3a2549['firstElementChild']['textContent'];_0x3a2549[_0x327e70(0x27d)][_0x327e70(0x25c)](_0x327e70(0x22f));const _0x11c3cf=_0x3a2549[_0x327e70(0x262)](_0x327e70(0x1cb))===_0x327e70(0x1b6)?await _0x43fcde(_0x4339a5):JSON['parse'](_0x4339a5);_0x19dd52(_0x3a2549['lastElementChild'],_0x11c3cf,_0x5dc00d,_0x25c4ee);}};typeof InfiniteGrid===_0x4c7268(0x245)?_0x18f650():(await getScript(''+GLOBAL_CONFIG['infinitegrid']['js']),_0x18f650());},_0x5d4c37=_0x1c1c29=>{const _0x3d698a=_0x4297,_0x47891a=btf['getScrollPercent'](_0x1c1c29,document['body']),_0x4c3f6e=document[_0x3d698a(0x19e)](_0x3d698a(0x240));_0x47891a<0x5f?(_0x4c3f6e[_0x3d698a(0x27d)]['add'](_0x3d698a(0x215)),_0x4c3f6e['querySelector'](_0x3d698a(0x1a7))[_0x3d698a(0x230)]=_0x47891a):_0x4c3f6e[_0x3d698a(0x27d)][_0x3d698a(0x23e)](_0x3d698a(0x215));},_0x56b2cb=()=>{const _0x860b3b=_0x4297,_0x35f5a3=document['getElementById'](_0x860b3b(0x23b)),_0x2d1f2a=window[_0x860b3b(0x275)]+0x38;let _0x1100ee=0x0;const _0x84d176=document[_0x860b3b(0x19e)]('page-header'),_0x5aad6c=typeof chatBtn!==_0x860b3b(0x269),_0x41964b=GLOBAL_CONFIG['percent'][_0x860b3b(0x23b)];if(document[_0x860b3b(0x1f0)][_0x860b3b(0x1ea)]<=_0x2d1f2a){_0x35f5a3[_0x860b3b(0x27d)][_0x860b3b(0x25c)](_0x860b3b(0x251));return;}const _0x4ab31e=_0x362019=>{const _0x247d22=_0x362019>_0x1100ee;return _0x1100ee=_0x362019,_0x247d22;};let _0x575ceb='';const _0xa489c6=btf[_0x860b3b(0x299)](()=>{const _0x2078f3=_0x860b3b,_0x24d44b=window[_0x2078f3(0x283)]||document['documentElement'][_0x2078f3(0x26e)],_0x4deb2f=_0x4ab31e(_0x24d44b);_0x24d44b>0x38?(_0x84d176[_0x2078f3(0x27d)]['add'](_0x2078f3(0x1b0)),_0x575ceb===''&&(_0x84d176['classList'][_0x2078f3(0x25c)]('nav-fixed'),_0x35f5a3[_0x2078f3(0x27d)][_0x2078f3(0x25c)](_0x2078f3(0x251))),_0x4deb2f?_0x575ceb!=='down'&&(_0x84d176['classList'][_0x2078f3(0x23e)](_0x2078f3(0x260)),_0x5aad6c&&window[_0x2078f3(0x20d)][_0x2078f3(0x25f)](),_0x575ceb=_0x2078f3(0x1c2)):_0x575ceb!=='up'&&(_0x84d176['classList'][_0x2078f3(0x25c)](_0x2078f3(0x260)),_0x5aad6c&&window[_0x2078f3(0x20d)][_0x2078f3(0x225)](),_0x575ceb='up')):(_0x575ceb='',_0x24d44b===0x0&&(_0x84d176[_0x2078f3(0x27d)]['remove'](_0x2078f3(0x1b0)),_0x84d176[_0x2078f3(0x27d)][_0x2078f3(0x23e)](_0x2078f3(0x1c6),_0x2078f3(0x260))),_0x35f5a3[_0x2078f3(0x27d)][_0x2078f3(0x23e)]('rightside-show')),_0x41964b&&_0x5d4c37(_0x24d44b),document[_0x2078f3(0x1f0)][_0x2078f3(0x1ea)]<=_0x2d1f2a&&_0x35f5a3[_0x2078f3(0x27d)][_0x2078f3(0x25c)](_0x2078f3(0x251));},0x32);btf[_0x860b3b(0x219)](window,_0x860b3b(0x1b1),_0xa489c6,{'passive':!![]});},_0x468590=()=>{const _0x549736=_0x4297,_0x541625=GLOBAL_CONFIG_SITE[_0x549736(0x28a)],_0x27d346=GLOBAL_CONFIG['isAnchor'],_0x5b0906=document[_0x549736(0x19e)](_0x549736(0x1f8));if(!(_0x5b0906&&(_0x541625||_0x27d346)))return;let _0x3dd1ae,_0x2260f8,_0x282a96,_0x3dead3,_0x5588c1;if(_0x541625){const _0x19740e=document[_0x549736(0x19e)](_0x549736(0x1ee));_0x2260f8=_0x19740e[_0x549736(0x21b)](_0x549736(0x25b)),_0x3dd1ae=_0x2260f8[_0x549736(0x280)](_0x549736(0x1b9)),_0x3dead3=_0x19740e[_0x549736(0x21b)](_0x549736(0x26c)),_0x5588c1=_0x2260f8['classList'][_0x549736(0x24f)]('is-expand');const _0xc7efb8=_0x476513=>{const _0x514549=_0x549736,_0x141b38=_0x476513[_0x514549(0x22b)][_0x514549(0x227)](_0x514549(0x1b9));if(!_0x141b38)return;_0x476513[_0x514549(0x1ad)](),btf[_0x514549(0x247)](btf[_0x514549(0x1eb)](document['getElementById'](decodeURI(_0x141b38[_0x514549(0x262)](_0x514549(0x19f)))[_0x514549(0x279)]('#',''))),0x12c),window[_0x514549(0x1f2)]<0x384&&_0x19740e[_0x514549(0x27d)]['remove'](_0x514549(0x1d4));};btf[_0x549736(0x219)](_0x2260f8,'click',_0xc7efb8),_0x282a96=_0x22a457=>{const _0x432dff=_0x549736,_0x58cfaa=_0x22a457[_0x432dff(0x235)]()[_0x432dff(0x1d5)],_0x50a784=_0x2260f8[_0x432dff(0x26e)];_0x58cfaa>document[_0x432dff(0x1dc)][_0x432dff(0x1f5)]-0x64&&(_0x2260f8[_0x432dff(0x26e)]=_0x50a784+0x96),_0x58cfaa<0x64&&(_0x2260f8[_0x432dff(0x26e)]=_0x50a784-0x96);};}const _0x397524=_0x5b0906[_0x549736(0x280)](_0x549736(0x1ec));let _0x38970e='';const _0x542ecb=_0x2db3cf=>{const _0x49ecb5=_0x549736;if(_0x2db3cf===0x0)return![];let _0x36c6cc='',_0x1df670='';_0x397524[_0x49ecb5(0x1ca)]((_0xe61a5b,_0x2eea3c)=>{if(_0x2db3cf>btf['getEleTop'](_0xe61a5b)-0x50){const _0x422328=_0xe61a5b['id'];_0x36c6cc=_0x422328?'#'+encodeURI(_0x422328):'',_0x1df670=_0x2eea3c;}});if(_0x38970e===_0x1df670)return;if(_0x27d346)btf[_0x49ecb5(0x28d)](_0x36c6cc);_0x38970e=_0x1df670;if(_0x541625){_0x2260f8[_0x49ecb5(0x280)]('.active')[_0x49ecb5(0x1ca)](_0x269f2a=>{const _0x287bd0=_0x49ecb5;_0x269f2a['classList'][_0x287bd0(0x23e)](_0x287bd0(0x236));});if(_0x36c6cc==='')return;const _0xb37c91=_0x3dd1ae[_0x1df670];_0xb37c91[_0x49ecb5(0x27d)]['add'](_0x49ecb5(0x236)),setTimeout(()=>{_0x282a96(_0xb37c91);},0x0);if(_0x5588c1)return;let _0x558d9f=_0xb37c91['parentNode'];for(;!_0x558d9f[_0x49ecb5(0x1e7)](_0x49ecb5(0x25e));_0x558d9f=_0x558d9f[_0x49ecb5(0x1f9)]){if(_0x558d9f['matches']('li'))_0x558d9f[_0x49ecb5(0x27d)][_0x49ecb5(0x25c)]('active');}}},_0x3a1983=btf['throttle'](()=>{const _0x316a0a=_0x549736,_0x4dcfcc=window[_0x316a0a(0x283)]||document[_0x316a0a(0x1dc)][_0x316a0a(0x26e)];_0x541625&&GLOBAL_CONFIG[_0x316a0a(0x287)][_0x316a0a(0x21a)]&&(_0x3dead3[_0x316a0a(0x230)]=btf[_0x316a0a(0x25a)](_0x4dcfcc,_0x5b0906)),_0x542ecb(_0x4dcfcc);},0x32);btf[_0x549736(0x219)](window,'scroll',_0x3a1983,{'passive':!![]});},_0x119f68=_0x8f923f=>{const _0x4c9523=_0x4297,_0x3f801f=window[_0x4c9523(0x1a0)]||{},_0x26989a=_0x3f801f[_0x4c9523(0x26b)]||{};if(!_0x26989a)return;Object[_0x4c9523(0x281)](_0x26989a)['forEach'](_0x3bbe10=>{const _0x2fe603=_0x4c9523,_0x5c984d=_0x26989a[_0x3bbe10];['disqus',_0x2fe603(0x264)][_0x2fe603(0x1e9)](_0x3bbe10)?setTimeout(()=>_0x5c984d(_0x8f923f),0x12c):_0x5c984d(_0x8f923f);});},_0xc7fc8c={'readmode':()=>{const _0x24b828=_0x4297,_0x4c4367=document[_0x24b828(0x1f0)];_0x4c4367[_0x24b828(0x27d)]['add'](_0x24b828(0x201));const _0x3b43ec=document[_0x24b828(0x277)](_0x24b828(0x228));_0x3b43ec[_0x24b828(0x272)]='button',_0x3b43ec[_0x24b828(0x1be)]=_0x24b828(0x268),_0x4c4367[_0x24b828(0x1c3)](_0x3b43ec);const _0x167876=()=>{const _0x3c6498=_0x24b828;_0x4c4367[_0x3c6498(0x27d)]['remove'](_0x3c6498(0x201)),_0x3b43ec[_0x3c6498(0x23e)](),_0x3b43ec[_0x3c6498(0x1d1)]('click',_0x167876);};_0x3b43ec[_0x24b828(0x28b)](_0x24b828(0x1ff),_0x167876);},'darkmode':()=>{const _0x3ab24b=_0x4297,_0x5492e2=document[_0x3ab24b(0x1dc)][_0x3ab24b(0x262)]('data-theme')===_0x3ab24b(0x263)?'light':_0x3ab24b(0x263);_0x5492e2===_0x3ab24b(0x263)?(activateDarkMode(),GLOBAL_CONFIG[_0x3ab24b(0x291)]!==undefined&&btf[_0x3ab24b(0x200)](GLOBAL_CONFIG['Snackbar'][_0x3ab24b(0x274)])):(activateLightMode(),GLOBAL_CONFIG[_0x3ab24b(0x291)]!==undefined&&btf['snackbarShow'](GLOBAL_CONFIG[_0x3ab24b(0x291)][_0x3ab24b(0x1ed)])),saveToLocal[_0x3ab24b(0x1b7)](_0x3ab24b(0x242),_0x5492e2,0x2),_0x119f68(_0x5492e2);},'rightside-config':_0x58a21f=>{const _0x35be07=_0x4297,_0xdc2481=_0x58a21f[_0x35be07(0x1db)];_0xdc2481[_0x35be07(0x27d)][_0x35be07(0x24f)](_0x35be07(0x225))&&(_0xdc2481[_0x35be07(0x27d)]['add'](_0x35be07(0x28e)),setTimeout(()=>{const _0x4aa121=_0x35be07;_0xdc2481['classList']['remove'](_0x4aa121(0x28e));},0x12c)),_0xdc2481[_0x35be07(0x27d)][_0x35be07(0x294)](_0x35be07(0x225));},'go-up':()=>{btf['scrollToDest'](0x0,0x1f4);},'hide-aside-btn':()=>{const _0x2fcbf9=_0x4297,_0x24cc0b=document[_0x2fcbf9(0x1dc)][_0x2fcbf9(0x27d)],_0x5297d3=_0x24cc0b[_0x2fcbf9(0x24f)]('hide-aside')?_0x2fcbf9(0x225):_0x2fcbf9(0x25f);saveToLocal[_0x2fcbf9(0x1b7)]('aside-status',_0x5297d3,0x2),_0x24cc0b['toggle'](_0x2fcbf9(0x229));},'mobile-toc-button':_0x4bd5f5=>{const _0x1d35be=_0x4297,_0x2db387=document[_0x1d35be(0x19e)](_0x1d35be(0x1ee));_0x2db387[_0x1d35be(0x1cd)][_0x1d35be(0x23d)]=_0x1d35be(0x292),_0x2db387[_0x1d35be(0x27d)][_0x1d35be(0x294)]('open'),_0x2db387['addEventListener']('transitionend',()=>{const _0xf55f8b=_0x1d35be;_0x2db387['style'][_0xf55f8b(0x23d)]='';},{'once':!![]});},'chat-btn':()=>{const _0x33a76c=_0x4297;window[_0x33a76c(0x202)]();},'translateLink':()=>{const _0x4c9f87=_0x4297;window[_0x4c9f87(0x243)]['translatePage']();}};document[_0xf7fdb5(0x19e)](_0xf7fdb5(0x23b))[_0xf7fdb5(0x28b)](_0xf7fdb5(0x1ff),function(_0x5e66a9){const _0x48fba2=_0xf7fdb5,_0x3ccade=_0x5e66a9[_0x48fba2(0x22b)][_0x48fba2(0x227)](_0x48fba2(0x24e));_0x3ccade&&_0xc7fc8c[_0x3ccade['id']]&&_0xc7fc8c[_0x3ccade['id']](this);});const _0x44e64d=()=>{const _0x11c357=_0xf7fdb5,_0x1e6416=_0x1396b7=>{const _0x13fa48=_0x4297,_0x1b1305=_0x1396b7[_0x13fa48(0x22b)]['closest']('.site-page.group');if(!_0x1b1305)return;_0x1b1305['classList']['toggle'](_0x13fa48(0x25f));};document[_0x11c357(0x21b)]('#sidebar-menus\x20.menus_items')[_0x11c357(0x28b)](_0x11c357(0x1ff),_0x1e6416);},_0x12cd33=()=>{const _0x449cc4=_0xf7fdb5,_0x3d5a6c=()=>{_0x4a7eac['open']();};btf[_0x449cc4(0x219)](document['getElementById'](_0x449cc4(0x1a2)),_0x449cc4(0x1ff),_0x3d5a6c);},_0x579c70=()=>{const _0xd5e386=_0xf7fdb5,{limitCount:_0x518a7f,languages:_0x57dde4}=GLOBAL_CONFIG[_0xd5e386(0x208)],_0x5284f1=_0x12ad95=>{const _0xd721e2=_0xd5e386;_0x12ad95[_0xd721e2(0x1ad)]();const _0x1a32b1=window[_0xd721e2(0x216)](0x0)[_0xd721e2(0x24d)]();let _0x132e8c=_0x1a32b1;return _0x1a32b1[_0xd721e2(0x1e0)]>_0x518a7f&&(_0x132e8c=_0x1a32b1+_0xd721e2(0x241)+_0x57dde4[_0xd721e2(0x1c7)]+'\x0a'+_0x57dde4['link']+window['location']['href']+'\x0a'+_0x57dde4[_0xd721e2(0x1d3)]+'\x0a'+_0x57dde4['info']),_0x12ad95[_0xd721e2(0x1bb)]?_0x12ad95['clipboardData']['setData'](_0xd721e2(0x1e1),_0x132e8c):window[_0xd721e2(0x1bb)]['setData'](_0xd721e2(0x1e1),_0x132e8c);};document['body']['addEventListener']('copy',_0x5284f1);},_0x4fabe=()=>{const _0x5bcb06=_0xf7fdb5,_0x47d0c7=document[_0x5bcb06(0x19e)]('runtimeshow');if(_0x47d0c7){const _0x25f989=_0x47d0c7[_0x5bcb06(0x262)](_0x5bcb06(0x1fd));_0x47d0c7['textContent']=btf[_0x5bcb06(0x1ab)](_0x25f989)+'\x20'+GLOBAL_CONFIG['runtime'];}},_0x74b6b1=()=>{const _0x3b507d=_0xf7fdb5,_0x3f1a7e=document[_0x3b507d(0x19e)](_0x3b507d(0x1cf));if(_0x3f1a7e){const _0x23b5b9=_0x3f1a7e['getAttribute'](_0x3b507d(0x22c));_0x3f1a7e[_0x3b507d(0x230)]=btf[_0x3b507d(0x1ab)](_0x23b5b9,!![]);}},_0x3b360b=()=>{const _0x4002a1=_0xf7fdb5,_0x144554=document['querySelectorAll'](_0x4002a1(0x23c));if(!_0x144554[_0x4002a1(0x1e0)])return;_0x144554[_0x4002a1(0x1ca)](_0x55090d=>{const _0x726350=_0x4002a1;!_0x55090d[_0x726350(0x227)](_0x726350(0x1a6))&&btf[_0x726350(0x20a)](_0x55090d,_0x726350(0x209),{'class':_0x726350(0x231)});});},_0x463094=()=>{const _0x53a7fe=_0xf7fdb5,_0x37ab06=document['querySelectorAll'](_0x53a7fe(0x1d0));if(!_0x37ab06[_0x53a7fe(0x1e0)])return;const _0x4c5965=function(_0x1fbaaf){const _0x3a3fbe=_0x53a7fe,_0x1b94b=this;_0x1b94b[_0x3a3fbe(0x27d)]['add'](_0x3a3fbe(0x1d4));const _0x548f83=_0x1b94b[_0x3a3fbe(0x204)][_0x3a3fbe(0x280)]('.gallery-container');_0x548f83[_0x3a3fbe(0x1e0)]&&_0x43b241(_0x548f83);};_0x37ab06[_0x53a7fe(0x1ca)](_0x6eb75c=>{const _0x37fff8=_0x53a7fe;_0x6eb75c[_0x37fff8(0x28b)](_0x37fff8(0x1ff),_0x4c5965,{'once':!![]});});},_0x47d137=()=>{const _0x34266a=_0xf7fdb5,_0xcb4489=document[_0x34266a(0x280)](_0x34266a(0x222));if(!_0xcb4489[_0x34266a(0x1e0)])return;const _0x3b1878=(_0x330789,_0x4455a6)=>{const _0x13ab67=_0x34266a;Array[_0x13ab67(0x1f3)](_0x330789)['forEach'](_0x11d156=>{const _0x125bfc=_0x13ab67;_0x11d156[_0x125bfc(0x27d)][_0x125bfc(0x23e)]('active'),(_0x11d156===_0x4455a6||_0x11d156['id']===_0x4455a6)&&_0x11d156[_0x125bfc(0x27d)][_0x125bfc(0x25c)]('active');});},_0x47a322=(_0x11df2a,_0x2582e0)=>{const _0x46e195=_0x34266a,_0x5b7e14=function(_0x33ec6f){const _0x25117c=_0x4297,_0x45c0b4=_0x33ec6f[_0x25117c(0x22b)][_0x25117c(0x227)](_0x25117c(0x228));if(_0x45c0b4[_0x25117c(0x27d)][_0x25117c(0x24f)](_0x25117c(0x236)))return;_0x3b1878(this[_0x25117c(0x203)],_0x45c0b4),this[_0x25117c(0x27d)][_0x25117c(0x23e)](_0x25117c(0x1b2));const _0x5a135b=_0x45c0b4[_0x25117c(0x262)](_0x25117c(0x252)),_0x14b742=this[_0x25117c(0x204)];_0x3b1878(_0x14b742['children'],_0x5a135b);if(_0x2582e0){btf['removeGlobalFnEvent']('igOfTabs',this);const _0x35b844=_0x14b742[_0x25117c(0x280)](_0x25117c(0x21e)+_0x5a135b+_0x25117c(0x28f));_0x35b844[_0x25117c(0x1e0)]&&_0x43b241(_0x35b844,this);}};btf[_0x46e195(0x219)](_0x11df2a['firstElementChild'],'click',_0x5b7e14);},_0x442f67=_0x65fc7a=>{const _0xca4093=_0x34266a,_0x2fa094=_0x14d768=>{const _0x1e03bb=_0x4297,_0x10266c=_0x14d768['target'][_0x1e03bb(0x227)]('button');if(!_0x10266c)return;btf['scrollToDest'](btf[_0x1e03bb(0x1eb)](_0x65fc7a),0x12c);};btf[_0xca4093(0x219)](_0x65fc7a[_0xca4093(0x1e4)],'click',_0x2fa094);};_0xcb4489[_0x34266a(0x1ca)](_0xa795d6=>{const _0x50fd16=_0x34266a,_0x3a4075=!!_0xa795d6[_0x50fd16(0x280)](_0x50fd16(0x27f));_0x47a322(_0xa795d6,_0x3a4075),_0x442f67(_0xa795d6);});},_0x4040aa=()=>{const _0xf47de3=_0xf7fdb5,_0x54f167=document[_0xf47de3(0x21b)](_0xf47de3(0x1b8));if(!_0x54f167)return;const _0x592d0f=_0x406883=>{const _0x4ada59=_0xf47de3,_0x3410da=_0x406883[_0x4ada59(0x22b)];_0x3410da[_0x4ada59(0x26f)]==='I'&&(_0x406883[_0x4ada59(0x1ad)](),_0x3410da[_0x4ada59(0x1f9)][_0x4ada59(0x27d)]['toggle'](_0x4ada59(0x1d8)));};btf[_0xf47de3(0x219)](_0x54f167,'click',_0x592d0f,!![]);},_0x21a8b6=()=>{const _0x46bd26=_0xf7fdb5,_0x55bfba=document[_0x46bd26(0x19e)](_0x46bd26(0x22a));if(!_0x55bfba)return;let _0x52489a=![];const _0x382c61=document[_0x46bd26(0x19e)](_0x46bd26(0x1aa)),_0xc37ba2=()=>{const _0x4ceab8=_0x46bd26;_0x382c61['classList'][_0x4ceab8(0x294)](_0x4ceab8(0x1e2)),!_0x52489a&&typeof loadOtherComment===_0x4ceab8(0x245)&&(_0x52489a=!![],loadOtherComment());};btf[_0x46bd26(0x219)](_0x55bfba,_0x46bd26(0x1ff),_0xc37ba2);},_0x17bf3f=()=>{const _0x4e0f02=_0xf7fdb5,{limitDay:_0x748e65,messagePrev:_0x429b60,messageNext:_0x30ca04,position:_0x3d53df}=GLOBAL_CONFIG[_0x4e0f02(0x1ce)],_0x423cba=btf[_0x4e0f02(0x1ab)](GLOBAL_CONFIG_SITE['postUpdate']);if(_0x423cba>=_0x748e65){const _0x232d69=document[_0x4e0f02(0x277)](_0x4e0f02(0x209));_0x232d69[_0x4e0f02(0x1be)]=_0x4e0f02(0x258),_0x232d69['textContent']=_0x429b60+'\x20'+_0x423cba+'\x20'+_0x30ca04;const _0x1d2c2c=document[_0x4e0f02(0x19e)]('article-container');_0x3d53df==='top'?_0x1d2c2c[_0x4e0f02(0x298)](_0x232d69,_0x1d2c2c[_0x4e0f02(0x285)]):_0x1d2c2c[_0x4e0f02(0x1c3)](_0x232d69);}},_0x298938=()=>{const _0x3338a1=_0xf7fdb5;window[_0x3338a1(0x1de)]=new LazyLoad({'elements_selector':_0x3338a1(0x1ef),'threshold':0x0,'data_src':_0x3338a1(0x271)});},_0x19445d=function(_0x1fc8ae){_0x1fc8ae['forEach'](_0x11f6bf=>{const _0x1936aa=_0x4297,_0x4cd4a9=_0x11f6bf['getAttribute'](_0x1936aa(0x1d9));_0x11f6bf[_0x1936aa(0x230)]=btf[_0x1936aa(0x1ab)](_0x4cd4a9,!![]),_0x11f6bf['style'][_0x1936aa(0x1fa)]=_0x1936aa(0x21f);});},_0x1b7ba0=function(){const _0x786471=_0xf7fdb5;window['addEventListener'](_0x786471(0x256),()=>{_0x3da333(![]),_0x53a915&&btf['isHidden'](document['getElementById']('toggle-menu'))&&_0x4a7eac['close']();}),document[_0x786471(0x19e)](_0x786471(0x1da))[_0x786471(0x28b)](_0x786471(0x1ff),_0x5cb10a=>{const _0x37d2a3=_0x786471;_0x4a7eac[_0x37d2a3(0x295)]();}),_0x44e64d(),GLOBAL_CONFIG[_0x786471(0x257)]&&_0x298938(),GLOBAL_CONFIG[_0x786471(0x208)]!==undefined&&_0x579c70(),GLOBAL_CONFIG[_0x786471(0x282)]&&window[_0x786471(0x1a4)]('(prefers-color-scheme:\x20dark)')[_0x786471(0x28b)](_0x786471(0x1ac),_0x33e9ad=>{const _0x1ff60a=_0x786471;if(saveToLocal[_0x1ff60a(0x29b)](_0x1ff60a(0x242))!==undefined)return;_0x33e9ad['matches']?_0x119f68('dark'):_0x119f68(_0x1ff60a(0x20b));});};window[_0xf7fdb5(0x1fc)]=function(){const _0xd1209c=_0xf7fdb5;_0x503892();GLOBAL_CONFIG_SITE[_0xd1209c(0x23f)]?(GLOBAL_CONFIG[_0xd1209c(0x1ce)]!==undefined&&_0x17bf3f(),GLOBAL_CONFIG[_0xd1209c(0x1bd)][_0xd1209c(0x254)]&&_0x19445d(document[_0xd1209c(0x280)](_0xd1209c(0x288)))):(GLOBAL_CONFIG[_0xd1209c(0x1bd)][_0xd1209c(0x284)]&&_0x19445d(document[_0xd1209c(0x280)](_0xd1209c(0x217))),GLOBAL_CONFIG[_0xd1209c(0x1e3)]&&_0x4fabe(),_0x74b6b1(),_0x4040aa());_0x468590(),GLOBAL_CONFIG_SITE['isHome']&&_0x150c51(),_0x208291(),GLOBAL_CONFIG[_0xd1209c(0x246)]&&_0x542dbc(),_0x56b2cb(),btf[_0xd1209c(0x223)](_0xd1209c(0x221));const _0xec1c9e=document['querySelectorAll'](_0xd1209c(0x1a3));_0xec1c9e['length']&&_0x43b241(_0xec1c9e),_0x5b9624(),_0x3b360b(),_0x463094(),_0x47d137(),_0x21a8b6(),_0x12cd33();},refreshFn(),_0x1b7ba0();}));
|
package/js/people.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,r){if(e){if("string"==typeof e)return _arrayLikeToArray(e,r);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)?_arrayLikeToArray(e,r):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t<r;t++)a[t]=e[t];return a}function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var a=r[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),e}var peoplejs_mycpen1_config={src:"https://cdn.jsdmirror.com/npm/mycpen-blog@0.0.0-wjbrdpunvk/img/open-peeps-sheet.png",rows:15,cols:7},randomRange=function(e,r){return e+Math.random()*(r-e)},randomIndex=function(e){return 0|randomRange(0,e.length)},removeFromArray=function(e,r){return e.splice(r,1)[0]},removeItemFromArray=function(e,r){return removeFromArray(e,e.indexOf(r))},removeRandomFromArray=function(e){return removeFromArray(e,randomIndex(e))},getRandomFromArray=function(e){return e[0|randomIndex(e)]},resetPeep=function(e){var r,t,a=e.stage,n=e.peep,o=.5<Math.random()?1:-1,i=100-250*gsap.parseEase("power2.in")(Math.random()),s=a.height-n.height+i;return 1==o?(r=-n.width,t=a.width,n.scaleX=1):(r=a.width+n.width,t=0,n.scaleX=-1),n.x=r,n.y=s,{startX:r,startY:n.anchorY=s,endX:t}},normalWalk=function(e){var r=e.peep,t=e.props,a=(t.startX,t.startY),n=t.endX,o=gsap.timeline();return o.timeScale(randomRange(.5,1.5)),o.to(r,{duration:10,x:n,ease:"none"},0),o.to(r,{duration:.25,repeat:40,yoyo:!0,y:a-10},0),o},walks=[normalWalk],Peep=function(){function e(r){var t=r.image,a=r.rect;_classCallCheck(this,e),this.image=t,this.setRect(a),this.x=0,this.y=0,this.anchorY=0,this.scaleX=1,this.walk=null}return _createClass(e,[{key:"setRect",value:function(e){this.rect=e,this.width=e[2],this.height=e[3],this.drawArgs=[this.image].concat(_toConsumableArray(e),[0,0,this.width,this.height])}},{key:"render",value:function(e){e.save(),e.translate(this.x,this.y),e.scale(this.scaleX,1),e.drawImage.apply(e,_toConsumableArray(this.drawArgs)),e.restore()}}]),e}(),img=document.createElement("img");img.onload=init,img.src=peoplejs_mycpen1_config.src;let canvas=document.querySelector("#peoplecanvas"),ctx=canvas?canvas.getContext("2d"):void 0,stage={width:0,height:0},allPeeps=[],availablePeeps=[],crowd=[];function init(){canvas&&(createPeeps(),resize(),gsap.ticker.add(render),window.addEventListener("resize",resize))}function createPeeps(){for(var e=peoplejs_mycpen1_config.rows,r=peoplejs_mycpen1_config.cols,t=e*r,a=img.naturalWidth/e,n=img.naturalHeight/r,o=0;o<t;o++)allPeeps.push(new Peep({image:img,rect:[o%e*a,(o/e|0)*n,a,n]}))}function resize(){canvas&&0!=canvas.clientWidth&&(stage.width=canvas.clientWidth,stage.height=canvas.clientHeight,canvas.width=stage.width*devicePixelRatio,canvas.height=stage.height*devicePixelRatio,crowd.forEach((function(e){e.walk.kill()})),crowd.length=0,availablePeeps.length=0,availablePeeps.push.apply(availablePeeps,allPeeps),initCrowd())}function initCrowd(){for(;availablePeeps.length;)addPeepToCrowd().walk.progress(Math.random())}function addPeepToCrowd(){var e=removeRandomFromArray(availablePeeps),r=getRandomFromArray(walks)({peep:e,props:resetPeep({peep:e,stage:stage})}).eventCallback("onComplete",(function(){removePeepFromCrowd(e),addPeepToCrowd()}));return e.walk=r,crowd.push(e),crowd.sort((function(e,r){return e.anchorY-r.anchorY})),e}function removePeepFromCrowd(e){removeItemFromArray(crowd,e),availablePeeps.push(e)}function render(){canvas&&(canvas.width=canvas.width,ctx.save(),ctx.scale(devicePixelRatio,devicePixelRatio),crowd.forEach((function(e){e.render(ctx)})),ctx.restore())}document.addEventListener("pjax:success",(e=>{canvas=document.querySelector("#peoplecanvas"),ctx=canvas?canvas.getContext("2d"):void 0,window.removeEventListener("resize",resize),gsap.ticker.remove(render),setTimeout((()=>{init()}),300)}));
|
1
|
+
"use strict";function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,r){if(e){if("string"==typeof e)return _arrayLikeToArray(e,r);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)?_arrayLikeToArray(e,r):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t<r;t++)a[t]=e[t];return a}function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var a=r[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),e}var peoplejs_mycpen1_config={src:"https://cdn.cbd.int/mycpen-blog@0.0.0-wjdcuicfya/img/open-peeps-sheet.png",rows:15,cols:7},randomRange=function(e,r){return e+Math.random()*(r-e)},randomIndex=function(e){return 0|randomRange(0,e.length)},removeFromArray=function(e,r){return e.splice(r,1)[0]},removeItemFromArray=function(e,r){return removeFromArray(e,e.indexOf(r))},removeRandomFromArray=function(e){return removeFromArray(e,randomIndex(e))},getRandomFromArray=function(e){return e[0|randomIndex(e)]},resetPeep=function(e){var r,t,a=e.stage,n=e.peep,o=.5<Math.random()?1:-1,i=100-250*gsap.parseEase("power2.in")(Math.random()),s=a.height-n.height+i;return 1==o?(r=-n.width,t=a.width,n.scaleX=1):(r=a.width+n.width,t=0,n.scaleX=-1),n.x=r,n.y=s,{startX:r,startY:n.anchorY=s,endX:t}},normalWalk=function(e){var r=e.peep,t=e.props,a=(t.startX,t.startY),n=t.endX,o=gsap.timeline();return o.timeScale(randomRange(.5,1.5)),o.to(r,{duration:10,x:n,ease:"none"},0),o.to(r,{duration:.25,repeat:40,yoyo:!0,y:a-10},0),o},walks=[normalWalk],Peep=function(){function e(r){var t=r.image,a=r.rect;_classCallCheck(this,e),this.image=t,this.setRect(a),this.x=0,this.y=0,this.anchorY=0,this.scaleX=1,this.walk=null}return _createClass(e,[{key:"setRect",value:function(e){this.rect=e,this.width=e[2],this.height=e[3],this.drawArgs=[this.image].concat(_toConsumableArray(e),[0,0,this.width,this.height])}},{key:"render",value:function(e){e.save(),e.translate(this.x,this.y),e.scale(this.scaleX,1),e.drawImage.apply(e,_toConsumableArray(this.drawArgs)),e.restore()}}]),e}(),img=document.createElement("img");img.onload=init,img.src=peoplejs_mycpen1_config.src;let canvas=document.querySelector("#peoplecanvas"),ctx=canvas?canvas.getContext("2d"):void 0,stage={width:0,height:0},allPeeps=[],availablePeeps=[],crowd=[];function init(){canvas&&(createPeeps(),resize(),gsap.ticker.add(render),window.addEventListener("resize",resize))}function createPeeps(){for(var e=peoplejs_mycpen1_config.rows,r=peoplejs_mycpen1_config.cols,t=e*r,a=img.naturalWidth/e,n=img.naturalHeight/r,o=0;o<t;o++)allPeeps.push(new Peep({image:img,rect:[o%e*a,(o/e|0)*n,a,n]}))}function resize(){canvas&&0!=canvas.clientWidth&&(stage.width=canvas.clientWidth,stage.height=canvas.clientHeight,canvas.width=stage.width*devicePixelRatio,canvas.height=stage.height*devicePixelRatio,crowd.forEach((function(e){e.walk.kill()})),crowd.length=0,availablePeeps.length=0,availablePeeps.push.apply(availablePeeps,allPeeps),initCrowd())}function initCrowd(){for(;availablePeeps.length;)addPeepToCrowd().walk.progress(Math.random())}function addPeepToCrowd(){var e=removeRandomFromArray(availablePeeps),r=getRandomFromArray(walks)({peep:e,props:resetPeep({peep:e,stage:stage})}).eventCallback("onComplete",(function(){removePeepFromCrowd(e),addPeepToCrowd()}));return e.walk=r,crowd.push(e),crowd.sort((function(e,r){return e.anchorY-r.anchorY})),e}function removePeepFromCrowd(e){removeItemFromArray(crowd,e),availablePeeps.push(e)}function render(){canvas&&(canvas.width=canvas.width,ctx.save(),ctx.scale(devicePixelRatio,devicePixelRatio),crowd.forEach((function(e){e.render(ctx)})),ctx.restore())}document.addEventListener("pjax:success",(e=>{canvas=document.querySelector("#peoplecanvas"),ctx=canvas?canvas.getContext("2d"):void 0,window.removeEventListener("resize",resize),gsap.ticker.remove(render),setTimeout((()=>{init()}),300)}));_0xaea01b){var _0x4d6075=_0x5afe98,_0x28e34a,_0x244983,_0x2e7684=_0xaea01b['stage'],_0x50bd28=_0xaea01b[_0x4d6075(0xd4)],_0x165613=0.5<Math[_0x4d6075(0xe1)]()?0x1:-0x1,_0x9b4703=0x64-0xfa*gsap[_0x4d6075(0xfb)](_0x4d6075(0xea))(Math['random']()),_0x2e9689=_0x2e7684[_0x4d6075(0xc4)]-_0x50bd28[_0x4d6075(0xc4)]+_0x9b4703;return 0x1==_0x165613?(_0x28e34a=-_0x50bd28[_0x4d6075(0xb1)],_0x244983=_0x2e7684[_0x4d6075(0xb1)],_0x50bd28[_0x4d6075(0xec)]=0x1):(_0x28e34a=_0x2e7684['width']+_0x50bd28[_0x4d6075(0xb1)],_0x244983=0x0,_0x50bd28[_0x4d6075(0xec)]=-0x1),_0x50bd28['x']=_0x28e34a,_0x50bd28['y']=_0x2e9689,{'startX':_0x28e34a,'startY':_0x50bd28[_0x4d6075(0xd1)]=_0x2e9689,'endX':_0x244983};},normalWalk=function(_0x290406){var _0x1b96fd=_0x5afe98,_0x595d56=_0x290406[_0x1b96fd(0xd4)],_0x3d96f1=_0x290406[_0x1b96fd(0xbc)],_0x455e6e=(_0x3d96f1['startX'],_0x3d96f1[_0x1b96fd(0xc2)]),_0x589e69=_0x3d96f1[_0x1b96fd(0xeb)],_0x5c37a0=gsap['timeline']();return _0x5c37a0['timeScale'](randomRange(0.5,1.5)),_0x5c37a0['to'](_0x595d56,{'duration':0xa,'x':_0x589e69,'ease':_0x1b96fd(0xf1)},0x0),_0x5c37a0['to'](_0x595d56,{'duration':0.25,'repeat':0x28,'yoyo':!0x0,'y':_0x455e6e-0xa},0x0),_0x5c37a0;},walks=[normalWalk],Peep=(function(){var _0x3ac117=_0x5afe98;function _0x12ffc0(_0x216992){var _0x59c156=_0x5714,_0x3e81fe=_0x216992[_0x59c156(0xee)],_0x3d3161=_0x216992[_0x59c156(0xe4)];_classCallCheck(this,_0x12ffc0),this[_0x59c156(0xee)]=_0x3e81fe,this[_0x59c156(0xb9)](_0x3d3161),this['x']=0x0,this['y']=0x0,this[_0x59c156(0xd1)]=0x0,this[_0x59c156(0xec)]=0x1,this[_0x59c156(0xf8)]=null;}return _createClass(_0x12ffc0,[{'key':_0x3ac117(0xb9),'value':function(_0x21d04d){var _0x2559be=_0x3ac117;this[_0x2559be(0xe4)]=_0x21d04d,this[_0x2559be(0xb1)]=_0x21d04d[0x2],this['height']=_0x21d04d[0x3],this['drawArgs']=[this['image']][_0x2559be(0xe5)](_toConsumableArray(_0x21d04d),[0x0,0x0,this[_0x2559be(0xb1)],this['height']]);}},{'key':_0x3ac117(0xd6),'value':function(_0x8a0b55){var _0x1254dc=_0x3ac117;_0x8a0b55['save'](),_0x8a0b55[_0x1254dc(0xed)](this['x'],this['y']),_0x8a0b55['scale'](this['scaleX'],0x1),_0x8a0b55[_0x1254dc(0xf7)][_0x1254dc(0xd9)](_0x8a0b55,_toConsumableArray(this[_0x1254dc(0xc8)])),_0x8a0b55['restore']();}}]),_0x12ffc0;}()),img=document['createElement']('img');function _0x5714(_0x276b68,_0x3c2911){var _0x3c2cd5=_0x3c2c();return _0x5714=function(_0x5714e3,_0x43de18){_0x5714e3=_0x5714e3-0xb1;var _0x5d96d8=_0x3c2cd5[_0x5714e3];return _0x5d96d8;},_0x5714(_0x276b68,_0x3c2911);}img['onload']=init,img['src']=peoplejs_mycpen1_config['src'];let canvas=document[_0x5afe98(0xb5)](_0x5afe98(0xde)),ctx=canvas?canvas[_0x5afe98(0xd8)]('2d'):void 0x0,stage={'width':0x0,'height':0x0},allPeeps=[],availablePeeps=[],crowd=[];function init(){var _0x31c49a=_0x5afe98;canvas&&(createPeeps(),resize(),gsap[_0x31c49a(0xda)]['add'](render),window['addEventListener'](_0x31c49a(0xf2),resize));}function createPeeps(){var _0x1c023b=_0x5afe98;for(var _0x29ef8a=peoplejs_mycpen1_config[_0x1c023b(0xc3)],_0x11079b=peoplejs_mycpen1_config['cols'],_0x54076c=_0x29ef8a*_0x11079b,_0x387adb=img[_0x1c023b(0xcf)]/_0x29ef8a,_0x55a1ac=img[_0x1c023b(0xe9)]/_0x11079b,_0x251348=0x0;_0x251348<_0x54076c;_0x251348++)allPeeps['push'](new Peep({'image':img,'rect':[_0x251348%_0x29ef8a*_0x387adb,(_0x251348/_0x29ef8a|0x0)*_0x55a1ac,_0x387adb,_0x55a1ac]}));}function resize(){var _0x1cb7f7=_0x5afe98;canvas&&0x0!=canvas[_0x1cb7f7(0xe8)]&&(stage[_0x1cb7f7(0xb1)]=canvas[_0x1cb7f7(0xe8)],stage[_0x1cb7f7(0xc4)]=canvas[_0x1cb7f7(0xd2)],canvas[_0x1cb7f7(0xb1)]=stage['width']*devicePixelRatio,canvas[_0x1cb7f7(0xc4)]=stage[_0x1cb7f7(0xc4)]*devicePixelRatio,crowd[_0x1cb7f7(0xf3)](function(_0x199559){var _0x4624a1=_0x1cb7f7;_0x199559[_0x4624a1(0xf8)][_0x4624a1(0xf9)]();}),crowd[_0x1cb7f7(0xdf)]=0x0,availablePeeps['length']=0x0,availablePeeps[_0x1cb7f7(0xc1)][_0x1cb7f7(0xd9)](availablePeeps,allPeeps),initCrowd());}function initCrowd(){var _0x84ac6b=_0x5afe98;for(;availablePeeps[_0x84ac6b(0xdf)];)addPeepToCrowd()['walk'][_0x84ac6b(0xf6)](Math['random']());}function addPeepToCrowd(){var _0x17bcb3=_0x5afe98,_0x11eeae=removeRandomFromArray(availablePeeps),_0x41c396=getRandomFromArray(walks)({'peep':_0x11eeae,'props':resetPeep({'peep':_0x11eeae,'stage':stage})})[_0x17bcb3(0xbd)](_0x17bcb3(0xfd),function(){removePeepFromCrowd(_0x11eeae),addPeepToCrowd();});return _0x11eeae[_0x17bcb3(0xf8)]=_0x41c396,crowd[_0x17bcb3(0xc1)](_0x11eeae),crowd[_0x17bcb3(0xfc)](function(_0x6e9415,_0x8144f9){var _0x238b8d=_0x17bcb3;return _0x6e9415['anchorY']-_0x8144f9[_0x238b8d(0xd1)];}),_0x11eeae;}function removePeepFromCrowd(_0x1b8b7b){var _0x58a818=_0x5afe98;removeItemFromArray(crowd,_0x1b8b7b),availablePeeps[_0x58a818(0xc1)](_0x1b8b7b);}function render(){var _0x482e8e=_0x5afe98;canvas&&(canvas[_0x482e8e(0xb1)]=canvas[_0x482e8e(0xb1)],ctx[_0x482e8e(0xbe)](),ctx[_0x482e8e(0xba)](devicePixelRatio,devicePixelRatio),crowd[_0x482e8e(0xf3)](function(_0x4dc86c){var _0x44a577=_0x482e8e;_0x4dc86c[_0x44a577(0xd6)](ctx);}),ctx[_0x482e8e(0xc7)]());}document['addEventListener'](_0x5afe98(0xb4),_0x45e912=>{var _0x31ed3d=_0x5afe98;canvas=document['querySelector']('#peoplecanvas'),ctx=canvas?canvas[_0x31ed3d(0xd8)]('2d'):void 0x0,window[_0x31ed3d(0xe3)](_0x31ed3d(0xf2),resize),gsap[_0x31ed3d(0xda)]['remove'](render),setTimeout(()=>{init();},0x12c);});
|
package/js/random.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var
|
1
|
+
var _0x54a851=_0x1054;function _0x38fc(){var _0x4f91a8=['posts/46.html','posts/5276.html','402126ccyWYW','1082980cOoKlN','posts/fe8dbc73.html','4RxPhkp','posts/45562d6f.html','posts/34556.html','posts/314.html','posts/29955.html','posts/583c5c34.html','floor','19200tzuXBt','posts/14763.html','posts/47697.html','posts/5162.html','68365vmpIGs','posts/38874.html','posts/88a726.html','posts/62964.html','85344FlgtBZ','posts/35184.html','posts/61496.html','posts/16756.html','posts/37069.html','posts/42935.html','posts/43746.html','posts/49827.html','posts/3ae7567f.html','posts/57095.html','135xVovUA','posts/285c50ae.html','posts/13683.html','343lgyWQq','posts/6f7759e0.html','posts/9132.html','posts/4979.html','posts/43579.html','posts/9b5a2768.html','posts/29e2641c.html','posts/51a9ee30.html','posts/3e42a4ef.html','posts/6a2caa19.html','posts/8236.html','posts/65154.html','46688IwfZyu','posts/8b765f7a.html','posts/33033.html','posts/30664.html','posts/beb8baf2.html','posts/27addd89.html','posts/b0a8892b.html','posts/33188.html','posts/dd4b1092.html','posts/57976.html','posts/5637.html','posts/48860.html','posts/b7f58a40.html','3262GLWkHI','posts/10d5063.html','posts/4c16ee73.html','posts/9186.html','loadUrl','length','posts/22091.html','random','posts/5552.html','posts/63259.html','posts/16589f92.html'];_0x38fc=function(){return _0x4f91a8;};return _0x38fc();}function _0x1054(_0x128090,_0x61e04){var _0x38fceb=_0x38fc();return _0x1054=function(_0x1054f1,_0x38e1ea){_0x1054f1=_0x1054f1-0x65;var _0x36224b=_0x38fceb[_0x1054f1];return _0x36224b;},_0x1054(_0x128090,_0x61e04);}(function(_0x3d1f24,_0xff42e2){var _0x53e68a=_0x1054,_0x50a3fd=_0x3d1f24();while(!![]){try{var _0x223fdd=parseInt(_0x53e68a(0x69))/0x1+parseInt(_0x53e68a(0x88))/0x2+-parseInt(_0x53e68a(0x76))/0x3+-parseInt(_0x53e68a(0x79))/0x4*(-parseInt(_0x53e68a(0x84))/0x5)+-parseInt(_0x53e68a(0x80))/0x6*(-parseInt(_0x53e68a(0x95))/0x7)+parseInt(_0x53e68a(0xa1))/0x8*(-parseInt(_0x53e68a(0x92))/0x9)+parseInt(_0x53e68a(0x77))/0xa;if(_0x223fdd===_0xff42e2)break;else _0x50a3fd['push'](_0x50a3fd['shift']());}catch(_0x45eb5a){_0x50a3fd['push'](_0x50a3fd['shift']());}}}(_0x38fc,0x192d3));var posts=[_0x54a851(0x81),_0x54a851(0x91),_0x54a851(0x8d),_0x54a851(0xa0),_0x54a851(0x71),'posts/cb0ae693.html',_0x54a851(0x78),_0x54a851(0x9f),_0x54a851(0x83),'posts/43907.html',_0x54a851(0x85),_0x54a851(0x9c),_0x54a851(0x9a),_0x54a851(0x6b),'posts/df249111.html',_0x54a851(0xa6),_0x54a851(0x96),_0x54a851(0xa2),'posts/8d01af11.html','posts/12907.html',_0x54a851(0x82),'posts/62652.html',_0x54a851(0x67),_0x54a851(0x7b),'posts/43225.html',_0x54a851(0x87),_0x54a851(0x99),'posts/10149.html',_0x54a851(0x7d),'posts/33007.html',_0x54a851(0x75),_0x54a851(0xa4),_0x54a851(0x89),_0x54a851(0x8a),_0x54a851(0x97),'posts/10588.html',_0x54a851(0x8e),_0x54a851(0x66),'posts/14777.html',_0x54a851(0x65),_0x54a851(0xa3),'posts/46092.html','posts/57744.html',_0x54a851(0x6f),_0x54a851(0xa7),'posts/ecc378ee.html','posts/317b0311.html',_0x54a851(0xa9),_0x54a851(0x7a),_0x54a851(0x9b),_0x54a851(0x90),'posts/4cb758ea.html',_0x54a851(0x86),_0x54a851(0x9e),_0x54a851(0x7e),'posts/4f5c6419.html','posts/3ffec809.html',_0x54a851(0x68),'posts/cee83196.html','posts/acb8c062.html',_0x54a851(0x72),_0x54a851(0x8b),_0x54a851(0x98),_0x54a851(0x8c),_0x54a851(0xa8),_0x54a851(0x8f),_0x54a851(0x7c),_0x54a851(0x74),_0x54a851(0x94),_0x54a851(0x6c),'posts/62975.html',_0x54a851(0x73),_0x54a851(0x6a),_0x54a851(0x9d),_0x54a851(0xa5),_0x54a851(0x93),'posts/85a8374a.html'];function toRandomPost(){var _0x4bb438=_0x54a851;pjax[_0x4bb438(0x6d)]('/'+posts[Math[_0x4bb438(0x7f)](Math[_0x4bb438(0x70)]()*posts[_0x4bb438(0x6e)])]);};
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
'use strict';var _0x471a53=_0x5130;(function(_0x4f31f2,_0xad3193){var _0x446ef7=_0x5130,_0x5f4e59=_0x4f31f2();while(!![]){try{var _0xa88f1=-parseInt(_0x446ef7(0x1a9))/0x1+-parseInt(_0x446ef7(0x188))/0x2+parseInt(_0x446ef7(0x18f))/0x3*(parseInt(_0x446ef7(0x16a))/0x4)+parseInt(_0x446ef7(0x1c3))/0x5+-parseInt(_0x446ef7(0x162))/0x6*(parseInt(_0x446ef7(0x1bf))/0x7)+parseInt(_0x446ef7(0x17e))/0x8*(parseInt(_0x446ef7(0x161))/0x9)+parseInt(_0x446ef7(0x18b))/0xa;if(_0xa88f1===_0xad3193)break;else _0x5f4e59['push'](_0x5f4e59['shift']());}catch(_0x41990c){_0x5f4e59['push'](_0x5f4e59['shift']());}}}(_0x464b,0x9780b));var frdata={'apiurl':_0x471a53(0x17f),'defaultFish':0x64,'hungryFish':0x64};if(_0x471a53(0x196)!=typeof frdataUser){for(var key in frdataUser)frdataUser[key]&&(frdata[key]=frdataUser[key]);}var randomPostTimes=0x0,randomPostWorking=!0x1,randomPostTips=[_0x471a53(0x178),_0x471a53(0x15b),_0x471a53(0x15e),_0x471a53(0x18d),'挖掘秦始皇坟时找到了',_0x471a53(0x1c2),_0x471a53(0x1a2),_0x471a53(0x1c1),_0x471a53(0x181),'外星人降临地球学习地球文化,落地时被你塞了','从图书馆顶层的隐秘角落里发现了闪着金光的','徒弟修炼走火入魔,为师立刻掏出了',_0x471a53(0x179),_0x471a53(0x185),_0x471a53(0x170),'小米研发了全新一代MIX手机,据说灵感',_0x471a53(0x15d),'库克坐上了苹果CEO的宝座,因为他面试的时候看了',_0x471a53(0x1b5),_0x471a53(0x1ba),'科考队在南极大陆发现了被冰封的',_0x471a53(0x157),_0x471a53(0x1be),_0x471a53(0x171),_0x471a53(0x155),_0x471a53(0x176),_0x471a53(0x1ae),_0x471a53(0x1a5),'科学家发现能够解决衰老的秘密,就是每日研读',_0x471a53(0x18c),_0x471a53(0x182),_0x471a53(0x177),_0x471a53(0x180),_0x471a53(0x160),'上卫生间没带纸,直接提裤跑路也不愿意玷污手中',_0x471a53(0x153),_0x471a53(0x1a8),'踏破铁血无觅处,得来全靠','今日双色球中了两千万,预测全靠',_0x471a53(0x19d),_0x471a53(0x195),_0x471a53(0x1b1),_0x471a53(0x164),'今日被一篇文章顶上了微博热搜,它是',_0x471a53(0x159),_0x471a53(0x1ad),'科学家解刨了第一个感染丧尸病毒的人,发现丧尸抗体存在于','如果你有梦想的话,就要努力去看',_0x471a53(0x16d),_0x471a53(0x19a),_0x471a53(0x198),_0x471a53(0x166),_0x471a53(0x1ac),_0x471a53(0x1a0),_0x471a53(0x1b4),'我就是神奇宝贝大师!我这只皮卡丘可是',_0x471a53(0x192),'我就是神奇宝贝大师!我这只可达鸭可是',_0x471a53(0x189),_0x471a53(0x190),_0x471a53(0x15f),_0x471a53(0x1b9),'我是云南的,云南怒江的,怒江芦水市,芦水市六库,六库傈僳族,傈僳族是','我真的栓Q了,我真的会谢如果你看',_0x471a53(0x1b2),_0x471a53(0x1a1),_0x471a53(0x17c),_0x471a53(0x17b),_0x471a53(0x17a),_0x471a53(0x19e),_0x471a53(0x1a6),_0x471a53(0x1a7),_0x471a53(0x18a),_0x471a53(0x1b3),_0x471a53(0x175),_0x471a53(0x1af),_0x471a53(0x187),_0x471a53(0x1ab),_0x471a53(0x18e),'游戏的规则就是这么的简单,你听懂了吗?管你听没听懂,快去看'],randomPostClick=0x0;function fetchRandomPost(){var _0x23a24e=_0x471a53;if(document['getElementById'](_0x23a24e(0x158))){var _0x2216e2,_0x1e4ff2,_0x437919,_0x5ea1c7;0x0==randomPostWorking&&document[_0x23a24e(0x1c0)](_0x23a24e(0x167))&&(randomPostWorking=!0x0,_0x2216e2=randomPostTips[Math[_0x23a24e(0x1bd)](Math[_0x23a24e(0x1bb)]()*randomPostTips[_0x23a24e(0x15a)])],_0x1e4ff2='',_0x1e4ff2=0x2710<randomPostTimes?'愿者上钩':0x3e8<randomPostTimes?_0x23a24e(0x174):0x3e8<randomPostTimes?_0x23a24e(0x172):0x64<randomPostTimes?_0x23a24e(0x1b6):0x4b<randomPostTimes?_0x23a24e(0x15c):0x32<randomPostTimes?'钓鱼宗师':0x14<randomPostTimes?_0x23a24e(0x1aa):0x5<randomPostTimes?'钓鱼高手':'钓鱼新手',document[_0x23a24e(0x1c0)](_0x23a24e(0x167))[_0x23a24e(0x197)]=0x5<=randomPostTimes?'随机筛选...\x20(Lv.'+randomPostTimes+_0x23a24e(0x191)+_0x1e4ff2+')':_0x23a24e(0x156),_0x437919=randomNum(0x3e8,0xbb8),0x0==randomPostTimes&&(_0x437919=0x0),document[_0x23a24e(0x173)](_0x23a24e(0x183))[_0x23a24e(0x19c)][_0x23a24e(0x16c)]=_0x23a24e(0x1b8),randomPostWorking=(randomPostClick*frdata[_0x23a24e(0x16f)]+frdata[_0x23a24e(0x168)]<randomPostTimes&&0x0==Math[_0x23a24e(0x17d)](Math[_0x23a24e(0x1bb)]())?document[_0x23a24e(0x1c0)](_0x23a24e(0x167))[_0x23a24e(0x197)]=_0x23a24e(0x1bc):(_0x5ea1c7=frdata[_0x23a24e(0x1b7)]+_0x23a24e(0x186),fetch(_0x5ea1c7)['then'](function(_0x2d567e){var _0x581cbc=_0x23a24e;return _0x2d567e[_0x581cbc(0x165)]();})['then'](function(_0x264256){var _0x409e69=_0x23a24e,_0xe88b07=_0x264256[_0x409e69(0x1b0)],_0x276689=_0x264256[_0x409e69(0x19f)],_0x2b920a=_0x264256[_0x409e69(0x19b)];document[_0x409e69(0x173)](_0x409e69(0x163))&&window[_0x409e69(0x199)](function(){var _0x5383c1=_0x409e69;document[_0x5383c1(0x1c0)](_0x5383c1(0x167))['innerHTML']=_0x2216e2+'来自友链\x20<b>'+_0x2b920a+_0x5383c1(0x154)+_0x276689+_0x5383c1(0x16e)+_0xe88b07+_0x5383c1(0x1a3),randomPostTimes+=0x1,localStorage[_0x5383c1(0x184)](_0x5383c1(0x1c4),randomPostTimes),document[_0x5383c1(0x173)](_0x5383c1(0x183))[_0x5383c1(0x19c)]['opacity']='1';},_0x437919);})),!0x1));}}function initRandomPost(){var _0x2eb2ee=_0x471a53;document[_0x2eb2ee(0x173)]('.random-post-start')&&localStorage[_0x2eb2ee(0x1c4)]&&(randomPostTimes=parseInt(localStorage[_0x2eb2ee(0x1c4)]),randomPostClick=parseInt(localStorage['randomPostClick']),document[_0x2eb2ee(0x173)](_0x2eb2ee(0x183))['style']['transitionDuration']=_0x2eb2ee(0x16b),document[_0x2eb2ee(0x173)](_0x2eb2ee(0x183))[_0x2eb2ee(0x19c)][_0x2eb2ee(0x193)]='rotate('+0x168*randomPostTimes+_0x2eb2ee(0x169)),fetchRandomPost();}function _0x464b(){var _0x2192f6=['addEventListener','为了抗议世间的不公,割破手指写下了','undefined','innerHTML','你真正是谁并不重要,重要的是你看没看过','setTimeout','有信心不一定会成功,没信心就去看','author','style','因为卷子上没写名字,老师罚抄','你抽到了金色稀有文章,它是','link','这化仙池水乃上古真仙对后人的考校,要求熟读并背诵','人生无常大肠包小肠,小肠包住了','从学校班主任那拿来了孩子上课偷偷看的','</a>','randomPostClick','唐僧揭开了佛祖压在五指山上的','你抽到了传说文章!它是','哇!金色传说!你抽到了金色传说文章,它是','三十年河东,三十年河西,莫欺我没有看过','434468FfZcjq','钓鱼专家','你要尽全力保护你的梦想。那些嘲笑你的人,他们必定会失败,他们想把你变成和他们一样的人。如果你有梦想的话,就要努力去读','上百祖境高手在天威湖大战三天三夜为了抢夺','UZI一个走A拿下五杀,在事后采访时说他当时回想起了','今年的高考满分作文是','读什么才能增智慧?当然是读','title','在艺术大街上被贴满了相同的纸,走近一看是','你已经习得退退退神功,接下来的心法已经被记录在','芷莲姑娘大摆擂台,谁若是能读完此书,便可娶了她。然后从背后掏出了','庆氏三千年根基差点竟被你小子毁于一旦,能够被我拯救全是因为我看了','阿里巴巴大喊芝麻开门,映入眼帘的就是','绝世渔夫','apiurl','0.2','你的背景太假了,我的就逼真多了,学到这个技术全是因为看了','师傅说练武要先炼心,然后让我好生研读','random','因为只钓鱼不吃鱼,过分饥饿导致本次钓鱼失败...(点击任意一篇钓鱼获得的文章即可恢复)','floor','历史上满写的仁义道德四个字,透过字缝里却全是','8456399pjJFwZ','getElementById','你的同桌无情的从你的语文书中撕下了那篇你最喜欢的','在路边闲逛的时候随手买了一个','5864510JpGjdq','randomPostTimes','种下一篇文章就会产生很多很多文章,我种下了','</b>\x20的文章:<a\x20class=\x22random-friends-post\x22\x20onclick=\x22randomClickLink()\x22\x20target=\x22_blank\x22\x20href=\x22','新版语文书拟增加一篇熟读并背诵的','随机筛选...','飞机窗户似乎被一张纸糊上了,仔细一看是','mycpen1-fcircle-page-tag','你送给乞丐一个暴富秘籍,它是','length','在河边打了个喷嚏,吓跑了','钓鱼王者','修炼渡劫成功,还好提前看了','你和小伙伴抢夺着','奶奶的,玩阴的是吧,我就是双料特工代号穿山甲,','黑钻风跟白钻风说道,吃了唐僧肉能长生不老,他知道是因为看了','10035063MpmEgB','6foJrsl','#random-post','这区区迷阵岂能难得住我?其实能走出来多亏了','json','玄天境重要的是锻体,为师赠你此书,好好修炼去吧,这是','random-post','defaultFish','deg)','451208NKYmwv','0.3s','opacity','决定我们成为什么样人的,不是我们的能力,而是是否看过','\x22\x20rel=\x22external\x20nofollow\x22>','hungryFish','隔壁家的孩子英语考了满分,都是因为看了','十几年前的录音机似乎还能够使用,插上电发现正在播的是','超越神了','querySelector','俯览天下','请问你的梦想是什么?我的梦想是能读到','经调查,99%的受访者都没有背诵过','今年亩产突破了八千万斤,多亏了','钓到了绝世好文!','在大山中唱山歌,隔壁的阿妹跑来了,带着','你抽到了金色普通文章,它是','你收到了稀有文章,它是','你抽到了普通文章,它是','round','8rjvqqX','https://www.cpen.top:8002/','陆隐一统天上宗,在无数祖境高手的目光下宣读了','考古学家近日发现了','新的iPhone产能很足,新的进货渠道是','.random-post-start','setItem','隔壁家的孩子数学考了满分,都是因为看了','randompost','纳兰嫣然掏出了退婚书,可是发现出门带错了,结果拿出了一本','1933028WqbFng','我就是神奇宝贝大师!我这只杰尼龟可是','报告!侦察兵说在前往300米有一个男子在偷偷看一本书,上面赫然写着','8288830uIMlTD','英特尔发布了全新的至强处理器,其芯片的制造原理都是','你击败了巨龙,在巢穴中发现了','走人生的路就像爬山一样,看起来走了许多冤枉的路,崎岖的路,但终究需要读完','3qSCjIg','上古遗迹中写道,只要习得此书,便得成功。你定睛一看,原来是','\x20当前称号:','我就是神奇宝贝大师!我这只小火龙可是','transform'];_0x464b=function(){return _0x2192f6;};return _0x464b();}function randomClickLink(){var _0x29aab1=_0x471a53;randomPostClick+=0x1,localStorage[_0x29aab1(0x184)](_0x29aab1(0x1a4),randomPostClick);}function _0x5130(_0xf1919b,_0x7e9ec7){var _0x464bed=_0x464b();return _0x5130=function(_0x51307e,_0x194738){_0x51307e=_0x51307e-0x153;var _0x367110=_0x464bed[_0x51307e];return _0x367110;},_0x5130(_0xf1919b,_0x7e9ec7);}function randomNum(_0x5a4920,_0xb54ab6){var _0x1742dd=_0x471a53;switch(arguments[_0x1742dd(0x15a)]){case 0x1:return parseInt(Math[_0x1742dd(0x1bb)]()*_0x5a4920+0x1,0xa);case 0x2:return parseInt(Math['random']()*(_0xb54ab6-_0x5a4920+0x1)+_0x5a4920,0xa);default:return 0x0;}}function whenDOMReadyRandomFriendsPostJS(){var _0x556aa8=_0x471a53;document[_0x556aa8(0x1c0)](_0x556aa8(0x158))&&initRandomPost();}whenDOMReadyRandomFriendsPostJS(),document[_0x471a53(0x194)]('pjax:complete',whenDOMReadyRandomFriendsPostJS);
|
package/js/search/algolia.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
window.addEventListener("load",(()=>{const e=document.getElementById("search-mask"),t=document.querySelector("#algolia-search .search-dialog"),a=()=>{const a=document.body.style;a.width="100%",a.overflow="hidden",btf.animateIn(e,"to_show 0.5s"),btf.animateIn(t,"titleScale 0.5s"),setTimeout((()=>{document.querySelector("#algolia-search .ais-SearchBox-input").focus()}),100),document.addEventListener("keydown",(function e(t){"Escape"===t.code&&(n(),document.removeEventListener("keydown",e))})),i(),window.addEventListener("resize",i)},n=()=>{const a=document.body.style;a.width="",a.overflow="",btf.animateOut(t,"search_close .5s"),btf.animateOut(e,"to_hide 0.5s"),window.removeEventListener("resize",i)},i=()=>{window.innerWidth<768&&t.style.setProperty("--search-height",window.innerHeight+"px")},s=()=>{btf.addEventListenerPjax(document.querySelector("#search-button > .search"),"click",a)},o=e=>{if(""===e)return"";const t=e.indexOf("<mark>");let a=t-30,n=t+120,i="",s="";a<=0?(a=0,n=140):i="...",n>e.length?n=e.length:s="...";return i+e.substring(a,n)+s},l=GLOBAL_CONFIG.algolia;if(!(l.appId&&l.apiKey&&l.indexName))return console.error("Algolia setting is invalid!");const r=instantsearch({indexName:l.indexName,searchClient:algoliasearch(l.appId,l.apiKey),searchFunction(e){e.state.query&&e.search()}}),c=instantsearch.widgets.configure({hitsPerPage:5}),d=instantsearch.widgets.searchBox({container:"#algolia-search-input",showReset:!1,showSubmit:!1,placeholder:GLOBAL_CONFIG.algolia.languages.input_placeholder,showLoadingIndicator:!0}),h=instantsearch.widgets.hits({container:"#algolia-hits",templates:{item(e){const t=e.permalink?e.permalink:GLOBAL_CONFIG.root+e.path,a=e._highlightResult,n=a.contentStripTruncate?o(a.contentStripTruncate.value):a.contentStrip?o(a.contentStrip.value):a.content?o(a.content.value):"";return`\n <a href="${t}" class="algolia-hit-item-link">\n <span class="algolia-hits-item-title">${a.title.value||"no-title"}</span>\n <p class="algolia-hit-item-content">${n}</p>\n </a>`},empty:function(e){return'<div id="algolia-hits-empty">'+GLOBAL_CONFIG.algolia.languages.hits_empty.replace(/\$\{query}/,e.query)+"</div>"}}}),g=instantsearch.widgets.stats({container:"#algolia-info > .algolia-stats",templates:{text:function(e){return`<hr>${GLOBAL_CONFIG.algolia.languages.hits_stats.replace(/\$\{hits}/,e.nbHits).replace(/\$\{time}/,e.processingTimeMS)}`}}}),u=instantsearch.widgets.poweredBy({container:"#algolia-info > .algolia-poweredBy"}),p=instantsearch.widgets.pagination({container:"#algolia-pagination",totalPages:5,templates:{first:'<i class="fas fa-angle-double-left"></i>',last:'<i class="fas fa-angle-double-right"></i>',previous:'<i class="fas fa-angle-left"></i>',next:'<i class="fas fa-angle-right"></i>'}});r.addWidgets([c,d,h,g,u,p]),r.start(),s(),e.addEventListener("click",n),document.querySelector("#algolia-search .search-close-button").addEventListener("click",n),window.addEventListener("pjax:complete",(()=>{!btf.isHidden(e)&&n(),s()})),window.pjax&&r.on("render",(()=>{window.pjax.refresh(document.getElementById("algolia-hits"))}))}));
|
1
|
+
window.addEventListener("load",(()=>{const e=document.getElementById("search-mask"),t=document.querySelector("#algolia-search .search-dialog"),a=()=>{const a=document.body.style;a.width="100%",a.overflow="hidden",btf.animateIn(e,"to_show 0.5s"),btf.animateIn(t,"titleScale 0.5s"),setTimeout((()=>{document.querySelector("#algolia-search .ais-SearchBox-input").focus()}),100),document.addEventListener("keydown",(function e(t){"Escape"===t.code&&(n(),document.removeEventListener("keydown",e))})),i(),window.addEventListener("resize",i)},n=()=>{const a=document.body.style;a.width="",a.overflow="",btf.animateOut(t,"search_close .5s"),btf.animateOut(e,"to_hide 0.5s"),window.removeEventListener("resize",i)},i=()=>{window.innerWidth<768&&t.style.setProperty("--search-height",window.innerHeight+"px")},s=()=>{btf.addEventListenerPjax(document.querySelector("#search-button > .search"),"click",a)},o=e=>{if(""===e)return"";const t=e.indexOf("<mark>");let a=t-30,n=t+120,i="",s="";a<=0?(a=0,n=140):i="...",n>e.length?n=e.length:s="...";return i+e.substring(a,n)+s},l=GLOBAL_CONFIG.algolia;if(!(l.appId&&l.apiKey&&l.indexName))return console.error("Algolia setting is invalid!");const r=instantsearch({indexName:l.indexName,searchClient:algoliasearch(l.appId,l.apiKey),searchFunction(e){e.state.query&&e.search()}}),c=instantsearch.widgets.configure({hitsPerPage:5}),d=instantsearch.widgets.searchBox({container:"#algolia-search-input",showReset:!1,showSubmit:!1,placeholder:GLOBAL_CONFIG.algolia.languages.input_placeholder,showLoadingIndicator:!0}),h=instantsearch.widgets.hits({container:"#algolia-hits",templates:{item(e){const t=e.permalink?e.permalink:GLOBAL_CONFIG.root+e.path,a=e._highlightResult,n=a.contentStripTruncate?o(a.contentStripTruncate.value):a.contentStrip?o(a.contentStrip.value):a.content?o(a.content.value):"";return`\n <a href="${t}" class="algolia-hit-item-link">\n <span class="algolia-hits-item-title">${a.title.value||"no-title"}</span>\n <p class="algolia-hit-item-content">${n}</p>\n </a>`},empty:function(e){return'<div id="algolia-hits-empty">'+GLOBAL_CONFIG.algolia.languages.hits_empty.replace(/\$\{query}/,e.query)+"</div>"}}}),g=instantsearch.widgets.stats({container:"#algolia-info > .algolia-stats",templates:{text:function(e){return`<hr>${GLOBAL_CONFIG.algolia.languages.hits_stats.replace(/\$\{hits}/,e.nbHits).replace(/\$\{time}/,e.processingTimeMS)}`}}}),u=instantsearch.widgets.poweredBy({container:"#algolia-info > .algolia-poweredBy"}),p=instantsearch.widgets.pagination({container:"#algolia-pagination",totalPages:5,templates:{first:'<i class="fas fa-angle-double-left"></i>',last:'<i class="fas fa-angle-double-right"></i>',previous:'<i class="fas fa-angle-left"></i>',next:'<i class="fas fa-angle-right"></i>'}});r.addWidgets([c,d,h,g,u,p]),r.start(),s(),e.addEventListener("click",n),document.querySelector("#algolia-search .search-close-button").addEventListener("click",n),window.addEventListener("pjax:complete",(()=>{!btf.isHidden(e)&&n(),s()})),window.pjax&&r.on("render",(()=>{window.pjax.refresh(document.getElementById("algolia-hits"))}))}));2(0x129)](_0x30d31a,_0x2d6d22(0x180)),setTimeout(()=>{const _0x46be41=_0x2d6d22;document[_0x46be41(0x142)](_0x46be41(0x135))[_0x46be41(0x186)]();},0x64),document['addEventListener']('keydown',function _0x14683c(_0x1f7e77){const _0x8e9fb=_0x2d6d22;_0x1f7e77[_0x8e9fb(0x16b)]==='Escape'&&(_0x398827(),document[_0x8e9fb(0x175)]('keydown',_0x14683c));}),_0x4700e2(),window['addEventListener'](_0x2d6d22(0x16a),_0x4700e2);},_0x398827=()=>{const _0x10b9e7=_0x283aec,_0x5d2163=document['body'][_0x10b9e7(0x144)];_0x5d2163[_0x10b9e7(0x13b)]='',_0x5d2163[_0x10b9e7(0x13d)]='',btf[_0x10b9e7(0x15c)](_0x30d31a,_0x10b9e7(0x17a)),btf[_0x10b9e7(0x15c)](_0x330f0d,_0x10b9e7(0x149)),window['removeEventListener'](_0x10b9e7(0x16a),_0x4700e2);},_0x4700e2=()=>{const _0x14e2ba=_0x283aec;window[_0x14e2ba(0x15e)]<0x300&&_0x30d31a[_0x14e2ba(0x144)][_0x14e2ba(0x16c)](_0x14e2ba(0x161),window[_0x14e2ba(0x130)]+'px');},_0xd1467=()=>{const _0x5d91b1=_0x283aec;btf[_0x5d91b1(0x183)](document['querySelector'](_0x5d91b1(0x176)),_0x5d91b1(0x14d),_0x6d2dd5);},_0x4e845f=()=>{const _0x3172b9=_0x283aec;_0x330f0d[_0x3172b9(0x134)](_0x3172b9(0x14d),_0x398827),document[_0x3172b9(0x142)](_0x3172b9(0x16e))[_0x3172b9(0x134)](_0x3172b9(0x14d),_0x398827);},_0x4588bb=_0x3e14e9=>{const _0xd7b060=_0x283aec;if(_0x3e14e9==='')return'';const _0x6fd7b0=_0x3e14e9[_0xd7b060(0x167)](_0xd7b060(0x132));let _0xb7f77b=_0x6fd7b0-0x1e,_0x4c2479=_0x6fd7b0+0x78,_0x13a431='',_0x2b8477='';_0xb7f77b<=0x0?(_0xb7f77b=0x0,_0x4c2479=0x8c):_0x13a431=_0xd7b060(0x13a);_0x4c2479>_0x3e14e9[_0xd7b060(0x156)]?_0x4c2479=_0x3e14e9[_0xd7b060(0x156)]:_0x2b8477=_0xd7b060(0x13a);const _0x411a40=_0x13a431+_0x3e14e9[_0xd7b060(0x166)](_0xb7f77b,_0x4c2479)+_0x2b8477;return _0x411a40;},_0x178f08=GLOBAL_CONFIG[_0x283aec(0x17d)],_0x242666=_0x178f08[_0x283aec(0x131)]&&_0x178f08['apiKey']&&_0x178f08[_0x283aec(0x151)];if(!_0x242666)return console[_0x283aec(0x14e)](_0x283aec(0x133));const _0x530640=instantsearch({'indexName':_0x178f08[_0x283aec(0x151)],'searchClient':algoliasearch(_0x178f08[_0x283aec(0x131)],_0x178f08[_0x283aec(0x12d)]),'searchFunction'(_0x3173a5){const _0x52b513=_0x283aec;_0x3173a5[_0x52b513(0x14b)][_0x52b513(0x137)]&&_0x3173a5[_0x52b513(0x17e)]();}}),_0x5eb49a=instantsearch['widgets'][_0x283aec(0x146)]({'hitsPerPage':0x5}),_0x36d6c9=instantsearch[_0x283aec(0x14f)][_0x283aec(0x154)]({'container':_0x283aec(0x182),'showReset':![],'showSubmit':![],'placeholder':GLOBAL_CONFIG[_0x283aec(0x17d)][_0x283aec(0x13f)][_0x283aec(0x153)],'showLoadingIndicator':!![]}),_0xb72c39=instantsearch[_0x283aec(0x14f)]['hits']({'container':_0x283aec(0x172),'templates':{'item'(_0x1068c8){const _0x28d40b=_0x283aec,_0x48c29b=_0x1068c8[_0x28d40b(0x168)]?_0x1068c8[_0x28d40b(0x168)]:GLOBAL_CONFIG[_0x28d40b(0x15d)]+_0x1068c8[_0x28d40b(0x15a)],_0x1ef6dc=_0x1068c8[_0x28d40b(0x147)],_0x4738eb=_0x1ef6dc[_0x28d40b(0x145)]?_0x4588bb(_0x1ef6dc['contentStripTruncate'][_0x28d40b(0x174)]):_0x1ef6dc['contentStrip']?_0x4588bb(_0x1ef6dc[_0x28d40b(0x12c)][_0x28d40b(0x174)]):_0x1ef6dc[_0x28d40b(0x188)]?_0x4588bb(_0x1ef6dc[_0x28d40b(0x188)]['value']):'';return _0x28d40b(0x181)+_0x48c29b+_0x28d40b(0x185)+(_0x1ef6dc[_0x28d40b(0x157)][_0x28d40b(0x174)]||'no-title')+_0x28d40b(0x162)+_0x4738eb+'</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</a>';},'empty':function(_0x56c249){const _0x307b66=_0x283aec;return _0x307b66(0x16f)+GLOBAL_CONFIG[_0x307b66(0x17d)]['languages'][_0x307b66(0x160)]['replace'](/\$\{query}/,_0x56c249[_0x307b66(0x137)])+'</div>';}}}),_0x4b5410=instantsearch[_0x283aec(0x14f)][_0x283aec(0x177)]({'container':'#algolia-info\x20>\x20.algolia-stats','templates':{'text':function(_0x2e5702){const _0x1673b9=_0x283aec,_0x4268e5=GLOBAL_CONFIG['algolia'][_0x1673b9(0x13f)][_0x1673b9(0x12b)][_0x1673b9(0x179)](/\$\{hits}/,_0x2e5702[_0x1673b9(0x187)])[_0x1673b9(0x179)](/\$\{time}/,_0x2e5702['processingTimeMS']);return _0x1673b9(0x139)+_0x4268e5;}}}),_0x18dcf5=instantsearch[_0x283aec(0x14f)][_0x283aec(0x13c)]({'container':_0x283aec(0x158)}),_0x3ee337=instantsearch['widgets'][_0x283aec(0x14a)]({'container':_0x283aec(0x17b),'totalPages':0x5,'templates':{'first':'<i\x20class=\x22fas\x20fa-angle-double-left\x22></i>','last':_0x283aec(0x155),'previous':_0x283aec(0x171),'next':_0x283aec(0x14c)}});_0x530640[_0x283aec(0x15f)]([_0x5eb49a,_0x36d6c9,_0xb72c39,_0x4b5410,_0x18dcf5,_0x3ee337]),_0x530640[_0x283aec(0x148)](),_0xd1467(),_0x4e845f(),window[_0x283aec(0x134)](_0x283aec(0x159),()=>{const _0x2de152=_0x283aec;!btf[_0x2de152(0x17c)](_0x330f0d)&&_0x398827(),_0xd1467();}),window[_0x283aec(0x12f)]&&_0x530640['on'](_0x283aec(0x143),()=>{const _0xc7e7a9=_0x283aec;window['pjax'][_0xc7e7a9(0x141)](document[_0xc7e7a9(0x16d)](_0xc7e7a9(0x170)));});}));
|
@@ -1 +1 @@
|
|
1
|
-
class LocalSearch{constructor({path:e="",unescape:t=!1,top_n_per_article:n=1}){this.path=e,this.unescape=t,this.top_n_per_article=n,this.isfetched=!1,this.datas=null}getIndexByWord(e,t,n=!1){const s=[],o=new Set;return n||(t=t.toLowerCase()),e.forEach((e=>{if(this.unescape){const t=document.createElement("div");t.innerText=e,e=t.innerHTML}const i=e.length;if(0===i)return;let r=0,a=-1;for(n||(e=e.toLowerCase());(a=t.indexOf(e,r))>-1;)s.push({position:a,word:e}),o.add(e),r=a+i})),s.sort(((e,t)=>e.position!==t.position?e.position-t.position:t.word.length-e.word.length)),[s,o]}mergeIntoSlice(e,t,n){let s=n[0],{position:o,word:i}=s;const r=[],a=new Set;for(;o+i.length<=t&&0!==n.length;){a.add(i),r.push({position:o,length:i.length});const e=o+i.length;for(n.shift();0!==n.length&&(s=n[0],o=s.position,i=s.word,e>o);)n.shift()}return{hits:r,start:e,end:t,count:a.size}}highlightKeyword(e,t){let n="",s=t.start;for(const{position:o,length:i}of t.hits)n+=e.substring(s,o),s=o+i,n+=`<mark class="search-keyword">${e.substr(o,i)}</mark>`;return n+=e.substring(s,t.end),n}getResultItems(e){const t=[];return this.datas.forEach((({title:n,content:s,url:o})=>{const[i,r]=this.getIndexByWord(e,n),[a,c]=this.getIndexByWord(e,s),l=new Set([...r,...c]).size,h=i.length+a.length;if(0===h)return;const d=[];0!==i.length&&d.push(this.mergeIntoSlice(0,n.length,i));let u=[];for(;0!==a.length;){const e=a[0],{position:t}=e,n=Math.max(0,t-20),o=Math.min(s.length,t+100);u.push(this.mergeIntoSlice(n,o,a))}u.sort(((e,t)=>e.count!==t.count?t.count-e.count:e.hits.length!==t.hits.length?t.hits.length-e.hits.length:e.start-t.start));const g=parseInt(this.top_n_per_article,10);g>=0&&(u=u.slice(0,g));let p="";(o=new URL(o,location.origin)).searchParams.append("highlight",e.join(" ")),0!==d.length?p+=`<div class="local-search-hit-item"><a href="${o.href}"><span class="search-result-title">${this.highlightKeyword(n,d[0])}</span>`:p+=`<div class="local-search-hit-item"><a href="${o.href}"><span class="search-result-title">${n}</span>`,u.forEach((e=>{p+=`<p class="search-result">${this.highlightKeyword(s,e)}...</p></a>`})),p+="</div>",t.push({item:p,id:t.length,hitCount:h,includedCount:l})})),t}fetchData(){const e=!this.path.endsWith("json");fetch(this.path).then((e=>e.text())).then((t=>{this.isfetched=!0,this.datas=e?[...(new DOMParser).parseFromString(t,"text/xml").querySelectorAll("entry")].map((e=>({title:e.querySelector("title").textContent,content:e.querySelector("content").textContent,url:e.querySelector("url").textContent}))):JSON.parse(t),this.datas=this.datas.filter((e=>e.title)).map((e=>(e.title=e.title.trim(),e.content=e.content?e.content.trim().replace(/<[^>]+>/g,""):"",e.url=decodeURIComponent(e.url).replace(/\/{2,}/g,"/"),e))),window.dispatchEvent(new Event("search:loaded"))}))}highlightText(e,t,n){const s=e.nodeValue;let o=t.start;const i=[];for(const{position:e,length:r}of t.hits){const t=document.createTextNode(s.substring(o,e));o=e+r;const a=document.createElement("mark");a.className=n,a.appendChild(document.createTextNode(s.substr(e,r))),i.push(t,a)}e.nodeValue=s.substring(o,t.end),i.forEach((t=>{e.parentNode.insertBefore(t,e)}))}highlightSearchWords(e){const t=new URL(location.href).searchParams.get("highlight"),n=t?t.split(" "):[];if(!n.length||!e)return;const s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),o=[];for(;s.nextNode();)s.currentNode.parentNode.matches("button, select, textarea, .mermaid")||o.push(s.currentNode);o.forEach((e=>{const[t]=this.getIndexByWord(n,e.nodeValue);if(!t.length)return;const s=this.mergeIntoSlice(0,e.nodeValue.length,t);this.highlightText(e,s,"search-keyword")}))}}window.addEventListener("load",(()=>{const{path:e,top_n_per_article:t,unescape:n,languages:s}=GLOBAL_CONFIG.localSearch,o=new LocalSearch({path:e,top_n_per_article:t,unescape:n}),i=document.querySelector("#local-search-input input"),r=document.getElementById("local-search-stats-wrap"),a=document.getElementById("loading-status"),c=!e.endsWith("json"),l=()=>{if(!o.isfetched)return;let e=i.value.trim().toLowerCase();c&&(e=e.replace(/</g,"<").replace(/>/g,">")),""!==e&&(a.innerHTML='<i class="fas fa-spinner fa-pulse"></i>');const t=e.split(/[-\s]+/),n=document.getElementById("local-search-results");let l=[];if(e.length>0&&(l=o.getResultItems(t)),1===t.length&&""===t[0])n.textContent="",r.textContent="";else if(0===l.length){n.textContent="";const t=document.createElement("div");t.className="search-result-stats",t.textContent=s.hits_empty.replace(/\$\{query}/,e),r.innerHTML=t.outerHTML}else{l.sort(((e,t)=>e.includedCount!==t.includedCount?t.includedCount-e.includedCount:e.hitCount!==t.hitCount?t.hitCount-e.hitCount:t.id-e.id));const e=s.hits_stats.replace(/\$\{hits}/,l.length);n.innerHTML=`<div class="search-result-list">${l.map((e=>e.item)).join("")}</div>`,r.innerHTML=`<hr><div class="search-result-stats">${e}</div>`,window.pjax&&window.pjax.refresh(n)}a.textContent=""};let h=!1;const d=document.getElementById("search-mask"),u=document.querySelector("#local-search .search-dialog"),g=()=>{window.innerWidth<768&&u.style.setProperty("--search-height",window.innerHeight+"px")},p=()=>{const e=document.body.style;e.width="100%",e.overflow="hidden",btf.animateIn(d,"to_show 0.5s"),btf.animateIn(u,"titleScale 0.5s"),setTimeout((()=>{i.focus()}),300),h||(!o.isfetched&&o.fetchData(),i.addEventListener("input",l),h=!0),document.addEventListener("keydown",(function e(t){"Escape"===t.code&&(m(),document.removeEventListener("keydown",e))})),g(),window.addEventListener("resize",g)},m=()=>{const e=document.body.style;e.width="",e.overflow="",btf.animateOut(u,"search_close .5s"),btf.animateOut(d,"to_hide 0.5s"),window.removeEventListener("resize",g)},f=()=>{btf.addEventListenerPjax(document.querySelector("#search-button > .search"),"click",p)};window.addEventListener("search:loaded",(()=>{const e=document.getElementById("loading-database");e.nextElementSibling.style.display="block",e.remove()})),f(),document.querySelector("#local-search .search-close-button").addEventListener("click",m),d.addEventListener("click",m),GLOBAL_CONFIG.localSearch.preload&&o.fetchData(),o.highlightSearchWords(document.getElementById("article-container")),window.addEventListener("pjax:complete",(()=>{!btf.isHidden(d)&&m(),o.highlightSearchWords(document.getElementById("article-container")),f()}))}));
|
1
|
+
class LocalSearch{constructor({path:e="",unescape:t=!1,top_n_per_article:n=1}){this.path=e,this.unescape=t,this.top_n_per_article=n,this.isfetched=!1,this.datas=null}getIndexByWord(e,t,n=!1){const s=[],o=new Set;return n||(t=t.toLowerCase()),e.forEach((e=>{if(this.unescape){const t=document.createElement("div");t.innerText=e,e=t.innerHTML}const i=e.length;if(0===i)return;let r=0,a=-1;for(n||(e=e.toLowerCase());(a=t.indexOf(e,r))>-1;)s.push({position:a,word:e}),o.add(e),r=a+i})),s.sort(((e,t)=>e.position!==t.position?e.position-t.position:t.word.length-e.word.length)),[s,o]}mergeIntoSlice(e,t,n){let s=n[0],{position:o,word:i}=s;const r=[],a=new Set;for(;o+i.length<=t&&0!==n.length;){a.add(i),r.push({position:o,length:i.length});const e=o+i.length;for(n.shift();0!==n.length&&(s=n[0],o=s.position,i=s.word,e>o);)n.shift()}return{hits:r,start:e,end:t,count:a.size}}highlightKeyword(e,t){let n="",s=t.start;for(const{position:o,length:i}of t.hits)n+=e.substring(s,o),s=o+i,n+=`<mark class="search-keyword">${e.substr(o,i)}</mark>`;return n+=e.substring(s,t.end),n}getResultItems(e){const t=[];return this.datas.forEach((({title:n,content:s,url:o})=>{const[i,r]=this.getIndexByWord(e,n),[a,c]=this.getIndexByWord(e,s),l=new Set([...r,...c]).size,h=i.length+a.length;if(0===h)return;const d=[];0!==i.length&&d.push(this.mergeIntoSlice(0,n.length,i));let u=[];for(;0!==a.length;){const e=a[0],{position:t}=e,n=Math.max(0,t-20),o=Math.min(s.length,t+100);u.push(this.mergeIntoSlice(n,o,a))}u.sort(((e,t)=>e.count!==t.count?t.count-e.count:e.hits.length!==t.hits.length?t.hits.length-e.hits.length:e.start-t.start));const g=parseInt(this.top_n_per_article,10);g>=0&&(u=u.slice(0,g));let p="";(o=new URL(o,location.origin)).searchParams.append("highlight",e.join(" ")),0!==d.length?p+=`<div class="local-search-hit-item"><a href="${o.href}"><span class="search-result-title">${this.highlightKeyword(n,d[0])}</span>`:p+=`<div class="local-search-hit-item"><a href="${o.href}"><span class="search-result-title">${n}</span>`,u.forEach((e=>{p+=`<p class="search-result">${this.highlightKeyword(s,e)}...</p></a>`})),p+="</div>",t.push({item:p,id:t.length,hitCount:h,includedCount:l})})),t}fetchData(){const e=!this.path.endsWith("json");fetch(this.path).then((e=>e.text())).then((t=>{this.isfetched=!0,this.datas=e?[...(new DOMParser).parseFromString(t,"text/xml").querySelectorAll("entry")].map((e=>({title:e.querySelector("title").textContent,content:e.querySelector("content").textContent,url:e.querySelector("url").textContent}))):JSON.parse(t),this.datas=this.datas.filter((e=>e.title)).map((e=>(e.title=e.title.trim(),e.content=e.content?e.content.trim().replace(/<[^>]+>/g,""):"",e.url=decodeURIComponent(e.url).replace(/\/{2,}/g,"/"),e))),window.dispatchEvent(new Event("search:loaded"))}))}highlightText(e,t,n){const s=e.nodeValue;let o=t.start;const i=[];for(const{position:e,length:r}of t.hits){const t=document.createTextNode(s.substring(o,e));o=e+r;const a=document.createElement("mark");a.className=n,a.appendChild(document.createTextNode(s.substr(e,r))),i.push(t,a)}e.nodeValue=s.substring(o,t.end),i.forEach((t=>{e.parentNode.insertBefore(t,e)}))}highlightSearchWords(e){const t=new URL(location.href).searchParams.get("highlight"),n=t?t.split(" "):[];if(!n.length||!e)return;const s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),o=[];for(;s.nextNode();)s.currentNode.parentNode.matches("button, select, textarea, .mermaid")||o.push(s.currentNode);o.forEach((e=>{const[t]=this.getIndexByWord(n,e.nodeValue);if(!t.length)return;const s=this.mergeIntoSlice(0,e.nodeValue.length,t);this.highlightText(e,s,"search-keyword")}))}}window.addEventListener("load",(()=>{const{path:e,top_n_per_article:t,unescape:n,languages:s}=GLOBAL_CONFIG.localSearch,o=new LocalSearch({path:e,top_n_per_article:t,unescape:n}),i=document.querySelector("#local-search-input input"),r=document.getElementById("local-search-stats-wrap"),a=document.getElementById("loading-status"),c=!e.endsWith("json"),l=()=>{if(!o.isfetched)return;let e=i.value.trim().toLowerCase();c&&(e=e.replace(/</g,"<").replace(/>/g,">")),""!==e&&(a.innerHTML='<i class="fas fa-spinner fa-pulse"></i>');const t=e.split(/[-\s]+/),n=document.getElementById("local-search-results");let l=[];if(e.length>0&&(l=o.getResultItems(t)),1===t.length&&""===t[0])n.textContent="",r.textContent="";else if(0===l.length){n.textContent="";const t=document.createElement("div");t.className="search-result-stats",t.textContent=s.hits_empty.replace(/\$\{query}/,e),r.innerHTML=t.outerHTML}else{l.sort(((e,t)=>e.includedCount!==t.includedCount?t.includedCount-e.includedCount:e.hitCount!==t.hitCount?t.hitCount-e.hitCount:t.id-e.id));const e=s.hits_stats.replace(/\$\{hits}/,l.length);n.innerHTML=`<div class="search-result-list">${l.map((e=>e.item)).join("")}</div>`,r.innerHTML=`<hr><div class="search-result-stats">${e}</div>`,window.pjax&&window.pjax.refresh(n)}a.textContent=""};let h=!1;const d=document.getElementById("search-mask"),u=document.querySelector("#local-search .search-dialog"),g=()=>{window.innerWidth<768&&u.style.setProperty("--search-height",window.innerHeight+"px")},p=()=>{const e=document.body.style;e.width="100%",e.overflow="hidden",btf.animateIn(d,"to_show 0.5s"),btf.animateIn(u,"titleScale 0.5s"),setTimeout((()=>{i.focus()}),300),h||(!o.isfetched&&o.fetchData(),i.addEventListener("input",l),h=!0),document.addEventListener("keydown",(function e(t){"Escape"===t.code&&(m(),document.removeEventListener("keydown",e))})),g(),window.addEventListener("resize",g)},m=()=>{const e=document.body.style;e.width="",e.overflow="",btf.animateOut(u,"search_close .5s"),btf.animateOut(d,"to_hide 0.5s"),window.removeEventListener("resize",g)},f=()=>{btf.addEventListenerPjax(document.querySelector("#search-button > .search"),"click",p)};window.addEventListener("search:loaded",(()=>{const e=document.getElementById("loading-database");e.nextElementSibling.style.display="block",e.remove()})),f(),document.querySelector("#local-search .search-close-button").addEventListener("click",m),d.addEventListener("click",m),GLOBAL_CONFIG.localSearch.preload&&o.fetchData(),o.highlightSearchWords(document.getElementById("article-container")),window.addEventListener("pjax:complete",(()=>{!btf.isHidden(d)&&m(),o.highlightSearchWords(document.getElementById("article-container")),f()}))}));x5457bd(0x162)])return _0x3f65e5['count']-_0x5d3afc[_0x5457bd(0x162)];else{if(_0x5d3afc['hits'][_0x5457bd(0x14b)]!==_0x3f65e5['hits'][_0x5457bd(0x14b)])return _0x3f65e5['hits'][_0x5457bd(0x14b)]-_0x5d3afc[_0x5457bd(0x161)][_0x5457bd(0x14b)];}return _0x5d3afc[_0x5457bd(0x164)]-_0x3f65e5[_0x5457bd(0x164)];});const _0x1bf9e8=parseInt(this[_0xc18865(0x107)],0xa);_0x1bf9e8>=0x0&&(_0x10a9f8=_0x10a9f8[_0xc18865(0xf0)](0x0,_0x1bf9e8));let _0xc13e2a='';_0x356707=new URL(_0x356707,location[_0xc18865(0xf8)]),_0x356707['searchParams'][_0xc18865(0x115)](_0xc18865(0x112),_0x4e8460[_0xc18865(0x14a)]('\x20')),_0x12ff91[_0xc18865(0x14b)]!==0x0?_0xc13e2a+=_0xc18865(0x11b)+_0x356707[_0xc18865(0x150)]+_0xc18865(0x13c)+this[_0xc18865(0x119)](_0x121e67,_0x12ff91[0x0])+'</span>':_0xc13e2a+='<div\x20class=\x22local-search-hit-item\x22><a\x20href=\x22'+_0x356707[_0xc18865(0x150)]+_0xc18865(0x13c)+_0x121e67+'</span>',_0x10a9f8['forEach'](_0x4ad165=>{const _0x1679dc=_0xc18865;_0xc13e2a+='<p\x20class=\x22search-result\x22>'+this[_0x1679dc(0x119)](_0x580aec,_0x4ad165)+_0x1679dc(0x12a);}),_0xc13e2a+='</div>',_0x31c0da[_0xc18865(0x155)]({'item':_0xc13e2a,'id':_0x31c0da['length'],'hitCount':_0x38259e,'includedCount':_0xb8409a});}),_0x31c0da;}[_0x5b0fe9(0x12c)](){const _0x4e7c86=_0x5b0fe9,_0x49a82b=!this[_0x4e7c86(0xfa)][_0x4e7c86(0x13d)](_0x4e7c86(0x11f));fetch(this['path'])['then'](_0x2aa7fa=>_0x2aa7fa[_0x4e7c86(0x160)]())[_0x4e7c86(0x129)](_0x180026=>{const _0x4fe2d1=_0x4e7c86;this['isfetched']=!![],this[_0x4fe2d1(0x143)]=_0x49a82b?[...new DOMParser()[_0x4fe2d1(0xe7)](_0x180026,_0x4fe2d1(0x165))['querySelectorAll'](_0x4fe2d1(0x138))][_0x4fe2d1(0xeb)](_0x7dd74e=>({'title':_0x7dd74e['querySelector'](_0x4fe2d1(0x13f))['textContent'],'content':_0x7dd74e[_0x4fe2d1(0x158)](_0x4fe2d1(0xe2))['textContent'],'url':_0x7dd74e[_0x4fe2d1(0x158)](_0x4fe2d1(0x10c))[_0x4fe2d1(0x105)]})):JSON[_0x4fe2d1(0x148)](_0x180026),this['datas']=this[_0x4fe2d1(0x143)][_0x4fe2d1(0x10d)](_0x4c102f=>_0x4c102f[_0x4fe2d1(0x13f)])[_0x4fe2d1(0xeb)](_0x4ff2fb=>{const _0x3f08b4=_0x4fe2d1;return _0x4ff2fb[_0x3f08b4(0x13f)]=_0x4ff2fb[_0x3f08b4(0x13f)][_0x3f08b4(0x10f)](),_0x4ff2fb[_0x3f08b4(0xe2)]=_0x4ff2fb[_0x3f08b4(0xe2)]?_0x4ff2fb[_0x3f08b4(0xe2)][_0x3f08b4(0x10f)]()['replace'](/<[^>]+>/g,''):'',_0x4ff2fb[_0x3f08b4(0x10c)]=decodeURIComponent(_0x4ff2fb[_0x3f08b4(0x10c)])[_0x3f08b4(0x14d)](/\/{2,}/g,'/'),_0x4ff2fb;}),window[_0x4fe2d1(0x128)](new Event('search:loaded'));});}[_0x5b0fe9(0xf4)](_0x49c4f9,_0x564427,_0x3734e3){const _0x571e23=_0x5b0fe9,_0x404e19=_0x49c4f9[_0x571e23(0x133)];let _0x403449=_0x564427['start'];const _0x596554=[];for(const {position:_0x92e580,length:_0x2db7cd}of _0x564427[_0x571e23(0x161)]){const _0x2af95b=document[_0x571e23(0x106)](_0x404e19['substring'](_0x403449,_0x92e580));_0x403449=_0x92e580+_0x2db7cd;const _0x219246=document['createElement']('mark');_0x219246[_0x571e23(0x15b)]=_0x3734e3,_0x219246[_0x571e23(0x146)](document[_0x571e23(0x106)](_0x404e19[_0x571e23(0x136)](_0x92e580,_0x2db7cd))),_0x596554[_0x571e23(0x155)](_0x2af95b,_0x219246);}_0x49c4f9[_0x571e23(0x133)]=_0x404e19[_0x571e23(0x12d)](_0x403449,_0x564427[_0x571e23(0xe5)]),_0x596554['forEach'](_0x219163=>{_0x49c4f9['parentNode']['insertBefore'](_0x219163,_0x49c4f9);});}[_0x5b0fe9(0x147)](_0x371ba6){const _0x3ad998=_0x5b0fe9,_0x1ea66b=new URL(location[_0x3ad998(0x150)])[_0x3ad998(0x123)]['get'](_0x3ad998(0x112)),_0x2e08f8=_0x1ea66b?_0x1ea66b[_0x3ad998(0xe1)]('\x20'):[];if(!_0x2e08f8['length']||!_0x371ba6)return;const _0x39f332=document[_0x3ad998(0x12f)](_0x371ba6,NodeFilter[_0x3ad998(0x113)],null),_0x1bcb41=[];while(_0x39f332['nextNode']()){if(!_0x39f332[_0x3ad998(0xea)]['parentNode'][_0x3ad998(0x126)](_0x3ad998(0x142)))_0x1bcb41[_0x3ad998(0x155)](_0x39f332[_0x3ad998(0xea)]);}_0x1bcb41[_0x3ad998(0x134)](_0x44dcfa=>{const _0x154029=_0x3ad998,[_0x5cbf78]=this[_0x154029(0x12e)](_0x2e08f8,_0x44dcfa['nodeValue']);if(!_0x5cbf78[_0x154029(0x14b)])return;const _0x2c8b64=this[_0x154029(0x124)](0x0,_0x44dcfa[_0x154029(0x133)][_0x154029(0x14b)],_0x5cbf78);this[_0x154029(0xf4)](_0x44dcfa,_0x2c8b64,_0x154029(0xee));});}}window[_0x5b0fe9(0x145)](_0x5b0fe9(0x13b),()=>{const _0x4de00d=_0x5b0fe9,{path:_0x13ac67,top_n_per_article:_0x354730,unescape:_0xa743cf,languages:_0x7e601}=GLOBAL_CONFIG[_0x4de00d(0x159)],_0xd31f0c=new LocalSearch({'path':_0x13ac67,'top_n_per_article':_0x354730,'unescape':_0xa743cf}),_0x2476c0=document[_0x4de00d(0x158)](_0x4de00d(0x11d)),_0x40d2c7=document['getElementById'](_0x4de00d(0x111)),_0x272232=document['getElementById'](_0x4de00d(0x125)),_0xd04d1c=!_0x13ac67[_0x4de00d(0x13d)](_0x4de00d(0x11f)),_0x2c6aff=()=>{const _0x5a43f2=_0x4de00d;if(!_0xd31f0c[_0x5a43f2(0xef)])return;let _0x33b374=_0x2476c0[_0x5a43f2(0x151)]['trim']()[_0x5a43f2(0x137)]();_0xd04d1c&&(_0x33b374=_0x33b374['replace'](/</g,_0x5a43f2(0x14e))[_0x5a43f2(0x14d)](/>/g,_0x5a43f2(0x10b)));if(_0x33b374!=='')_0x272232[_0x5a43f2(0x15a)]=_0x5a43f2(0x108);const _0x3a5291=_0x33b374[_0x5a43f2(0xe1)](/[-\s]+/),_0x4ebf0d=document[_0x5a43f2(0xe3)](_0x5a43f2(0x100));let _0x4c556e=[];_0x33b374[_0x5a43f2(0x14b)]>0x0&&(_0x4c556e=_0xd31f0c[_0x5a43f2(0x166)](_0x3a5291));if(_0x3a5291[_0x5a43f2(0x14b)]===0x1&&_0x3a5291[0x0]==='')_0x4ebf0d[_0x5a43f2(0x105)]='',_0x40d2c7[_0x5a43f2(0x105)]='';else{if(_0x4c556e['length']===0x0){_0x4ebf0d[_0x5a43f2(0x105)]='';const _0x3af84b=document[_0x5a43f2(0x163)](_0x5a43f2(0xfc));_0x3af84b[_0x5a43f2(0x15b)]=_0x5a43f2(0x132),_0x3af84b[_0x5a43f2(0x105)]=_0x7e601['hits_empty'][_0x5a43f2(0x14d)](/\$\{query}/,_0x33b374),_0x40d2c7[_0x5a43f2(0x15a)]=_0x3af84b['outerHTML'];}else{_0x4c556e['sort']((_0x2f72f7,_0x150a02)=>{const _0x1dcbbc=_0x5a43f2;if(_0x2f72f7[_0x1dcbbc(0xf2)]!==_0x150a02['includedCount'])return _0x150a02[_0x1dcbbc(0xf2)]-_0x2f72f7[_0x1dcbbc(0xf2)];else{if(_0x2f72f7['hitCount']!==_0x150a02[_0x1dcbbc(0xf7)])return _0x150a02[_0x1dcbbc(0xf7)]-_0x2f72f7['hitCount'];}return _0x150a02['id']-_0x2f72f7['id'];});const _0x47261d=_0x7e601[_0x5a43f2(0xf9)]['replace'](/\$\{hits}/,_0x4c556e[_0x5a43f2(0x14b)]);_0x4ebf0d[_0x5a43f2(0x15a)]='<div\x20class=\x22search-result-list\x22>'+_0x4c556e['map'](_0x1963ea=>_0x1963ea[_0x5a43f2(0xfe)])['join']('')+'</div>',_0x40d2c7[_0x5a43f2(0x15a)]='<hr><div\x20class=\x22search-result-stats\x22>'+_0x47261d+_0x5a43f2(0xe9),window['pjax']&&window[_0x5a43f2(0xf3)]['refresh'](_0x4ebf0d);}}_0x272232[_0x5a43f2(0x105)]='';};let _0x17353e=![];const _0x5a3d11=document[_0x4de00d(0xe3)]('search-mask'),_0x4c5381=document['querySelector'](_0x4de00d(0x152)),_0xd48679=()=>{const _0x28696d=_0x4de00d;window[_0x28696d(0xfb)]<0x300&&_0x4c5381[_0x28696d(0x11c)][_0x28696d(0x135)]('--search-height',window[_0x28696d(0x116)]+'px');},_0x1d825e=()=>{const _0x28d9dd=_0x4de00d,_0x11f475=document[_0x28d9dd(0x153)]['style'];_0x11f475[_0x28d9dd(0x14f)]=_0x28d9dd(0x13a),_0x11f475['overflow']=_0x28d9dd(0x127),btf[_0x28d9dd(0xec)](_0x5a3d11,_0x28d9dd(0x154)),btf[_0x28d9dd(0xec)](_0x4c5381,_0x28d9dd(0x130)),setTimeout(()=>{const _0x5c34fd=_0x28d9dd;_0x2476c0[_0x5c34fd(0x13e)]();},0x12c),!_0x17353e&&(!_0xd31f0c[_0x28d9dd(0xef)]&&_0xd31f0c[_0x28d9dd(0x12c)](),_0x2476c0[_0x28d9dd(0x145)](_0x28d9dd(0x10a),_0x2c6aff),_0x17353e=!![]),document[_0x28d9dd(0x145)](_0x28d9dd(0x144),function _0x2f0073(_0x49dc3d){const _0x4a8c60=_0x28d9dd;_0x49dc3d[_0x4a8c60(0x157)]===_0x4a8c60(0xf1)&&(_0x5d9d66(),document[_0x4a8c60(0x109)]('keydown',_0x2f0073));}),_0xd48679(),window[_0x28d9dd(0x145)](_0x28d9dd(0x101),_0xd48679);},_0x5d9d66=()=>{const _0x4d32b5=_0x4de00d,_0x30ef4a=document[_0x4d32b5(0x153)]['style'];_0x30ef4a[_0x4d32b5(0x14f)]='',_0x30ef4a[_0x4d32b5(0x121)]='',btf[_0x4d32b5(0x14c)](_0x4c5381,_0x4d32b5(0xed)),btf['animateOut'](_0x5a3d11,_0x4d32b5(0x114)),window[_0x4d32b5(0x109)]('resize',_0xd48679);},_0x397d96=()=>{const _0x5db0b1=_0x4de00d;btf['addEventListenerPjax'](document[_0x5db0b1(0x158)](_0x5db0b1(0x15c)),'click',_0x1d825e);},_0x43eac6=()=>{const _0xf7b268=_0x4de00d;document[_0xf7b268(0x158)](_0xf7b268(0x120))[_0xf7b268(0x145)]('click',_0x5d9d66),_0x5a3d11[_0xf7b268(0x145)](_0xf7b268(0x104),_0x5d9d66),GLOBAL_CONFIG[_0xf7b268(0x159)][_0xf7b268(0x15e)]&&_0xd31f0c[_0xf7b268(0x12c)](),_0xd31f0c[_0xf7b268(0x147)](document[_0xf7b268(0xe3)](_0xf7b268(0xe4)));};window[_0x4de00d(0x145)](_0x4de00d(0xfd),()=>{const _0x186aa1=_0x4de00d,_0x5ddf51=document['getElementById']('loading-database');_0x5ddf51['nextElementSibling']['style']['display']=_0x186aa1(0x122),_0x5ddf51[_0x186aa1(0x11a)]();}),_0x397d96(),_0x43eac6(),window[_0x4de00d(0x145)](_0x4de00d(0xe6),()=>{const _0x38cae7=_0x4de00d;!btf[_0x38cae7(0x15d)](_0x5a3d11)&&_0x5d9d66(),_0xd31f0c['highlightSearchWords'](document[_0x38cae7(0xe3)](_0x38cae7(0xe4))),_0x397d96();});});
|
package/js/tianli_gpt.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
function whenDOMReadyTianliGPT(){function t(t){!function(){const t=document.querySelector(".post-TianliGPT");t&&t.parentElement.removeChild(t)}();const n=document.querySelector(t);if(!n)return;const e=document.createElement("div");e.className="post-TianliGPT";const i=document.createElement("div");i.className="tianliGPT-title",e.appendChild(i);const o=document.createElement("i");o.className="tianliGPT-title-icon",i.appendChild(o),o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48px" height="48px" viewBox="0 0 48 48">\n <title>机器人</title>\n <g id="机器人" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <path d="M34.717885,5.03561087 C36.12744,5.27055371 37.079755,6.60373651 36.84481,8.0132786 L35.7944,14.3153359 L38.375,14.3153359 C43.138415,14.3153359 47,18.1768855 47,22.9402569 L47,34.4401516 C47,39.203523 43.138415,43.0650727 38.375,43.0650727 L9.625,43.0650727 C4.861585,43.0650727 1,39.203523 1,34.4401516 L1,22.9402569 C1,18.1768855 4.861585,14.3153359 9.625,14.3153359 L12.2056,14.3153359 L11.15519,8.0132786 C10.920245,6.60373651 11.87256,5.27055371 13.282115,5.03561087 C14.69167,4.80066802 16.024865,5.7529743 16.25981,7.16251639 L17.40981,14.0624532 C17.423955,14.1470924 17.43373,14.2315017 17.43948,14.3153359 L30.56052,14.3153359 C30.56627,14.2313867 30.576045,14.1470924 30.59019,14.0624532 L31.74019,7.16251639 C31.975135,5.7529743 33.30833,4.80066802 34.717885,5.03561087 Z M38.375,19.4902885 L9.625,19.4902885 C7.719565,19.4902885 6.175,21.0348394 6.175,22.9402569 L6.175,34.4401516 C6.175,36.3455692 7.719565,37.89012 9.625,37.89012 L38.375,37.89012 C40.280435,37.89012 41.825,36.3455692 41.825,34.4401516 L41.825,22.9402569 C41.825,21.0348394 40.280435,19.4902885 38.375,19.4902885 Z M14.8575,23.802749 C16.28649,23.802749 17.445,24.9612484 17.445,26.3902253 L17.445,28.6902043 C17.445,30.1191812 16.28649,31.2776806 14.8575,31.2776806 C13.42851,31.2776806 12.27,30.1191812 12.27,28.6902043 L12.27,26.3902253 C12.27,24.9612484 13.42851,23.802749 14.8575,23.802749 Z M33.1425,23.802749 C34.57149,23.802749 35.73,24.9612484 35.73,26.3902253 L35.73,28.6902043 C35.73,30.1191812 34.57149,31.2776806 33.1425,31.2776806 C31.71351,31.2776806 30.555,30.1191812 30.555,28.6902043 L30.555,26.3902253 C30.555,24.9612484 31.71351,23.802749 33.1425,23.802749 Z" id="形状结合" fill="#444444" fill-rule="nonzero"></path>\n </g>\n </svg>';const l=document.createElement("div");l.className="tianliGPT-title-text",l.textContent="文章摘要",i.appendChild(l);const a=document.createElement("div");a.className="tianliGPT-tag",a.id="tianliGPT-tag",a.textContent="TianliGPT",i.appendChild(a);const s=document.createElement("div");s.className="tianliGPT-explanation",s.innerHTML='生成中...<span class="blinking-cursor"></span>',e.appendChild(s),n.insertBefore(e,n.firstChild)}tianliGPT_postSelector="#post #article-container",tianliGPT_key_list=["6NnrHU4xKAPwwYxZr8WB","FbXpqokdh8qY61bdJEme","PKgVCDRcgwtP4X7bIBBB","OVWfZmDbf1jqsE0OXW4C","WF6NSQdXy7nBmc6BaiFo"],tianliGPT_randomIndex=Math.floor(Math.random()*tianliGPT_key_list.length),tianliGPT_key=tianliGPT_key_list[tianliGPT_randomIndex],tianliGPTIsRunning=!1,tianliGPT_postURL="*/posts/*",tianliGPT_typingAnimate=!1;var n={getTitleAndContent:function(){try{const t=document.title,n=document.querySelector(tianliGPT_postSelector);if(!n)return console.warn("TianliGPT:找不到文章容器。请尝试将引入的代码放入到文章容器之后。如果本身没有打算使用摘要功能可以忽略此提示。"),"";const e=n.getElementsByTagName("p"),i=n.querySelectorAll("h1, h2, h3, h4, h5");let o="";for(let t of i)o+=t.innerText+" ";for(let t of e){o+=t.innerText.replace(/https?:\/\/[^\s]+/g,"")}let l=1e3;"undefined"!=typeof tianliGPT_wordLimit&&(l=tianliGPT_wordLimit);return(t+" "+o).slice(0,l)}catch(t){return console.error("TianliGPT错误:可能由于一个或多个错误导致没有正常运行,原因出在获取文章容器中的内容失败,或者可能是在文章转换过程中失败。",t),""}},fetchTianliGPT:async function(t){if("blog.cpen.top"!==window.location.host)return"获取文章摘要失败,请访问 blog.cpen.top";if(!tianliGPT_key)return"没有获取到key,代码可能没有安装正确。如果你需要在tianli_gpt文件引用前定义tianliGPT_key变量。详细请查看文档。";if("5Q5mpqRK5DkwT1X9Gi5e"===tianliGPT_key)return"请购买 key 使用,如果你能看到此条内容,则说明代码安装正确。";var n=window.location.href;const e=document.title,i=`https://summary.tianli0.top/?content=${encodeURIComponent(t)}&key=${encodeURIComponent(tianliGPT_key)}&url=${encodeURIComponent(n)}&title=${encodeURIComponent(e)}`;try{const t=new AbortController,n=(setTimeout((()=>t.abort()),2e4),await fetch(i,{signal:t.signal}));if(n.ok){return(await n.json()).summary}throw 402===n.status&&document.querySelectorAll(".post-TianliGPT").forEach((t=>{t.style.display="none"})),new Error("TianliGPT:余额不足,请充值后请求新的文章")}catch(t){return"AbortError"===t.name?"localhost"===window.location.hostname?(console.warn("警告:请勿在本地主机上测试 API 密钥。"),"获取文章摘要超时。请勿在本地主机上测试 API 密钥。"):(console.error("请求超时"),"获取文章摘要超时。当你出现这个问题时,可能是key或者绑定的域名不正确。也可能是因为文章过长导致的 AI 运算量过大,你可以稍等一下然后刷新页面重试。"):(console.error("请求失败:",t),"获取文章摘要失败,请稍后再试。")}},aiShowAnimation:function(t){const n=document.querySelector(".tianliGPT-explanation");if(!n)return;if(tianliGPTIsRunning)return;if("undefined"!=typeof tianliGPT_typingAnimate&&!tianliGPT_typingAnimate)return void(n.innerHTML=t);tianliGPTIsRunning=!0;n.style.display="block",n.innerHTML='生成中...<span class="blinking-cursor"></span>';let e=!0,i=0,o=performance.now();const l=()=>{if(i<t.length&&e){const e=performance.now(),s=e-o,r=t.slice(i,i+1);s>=(/[,。!、?,.!?]/.test(r)?150:25)&&(n.innerText=t.slice(0,i+1),o=e,i++,i<t.length?n.innerHTML=t.slice(0,i)+'<span class="blinking-cursor"></span>':(n.innerHTML=t,n.style.display="block",tianliGPTIsRunning=!1,a.disconnect())),requestAnimationFrame(l)}},a=new IntersectionObserver((t=>{let n=t[0].isIntersecting;e=n,e&&setTimeout((()=>{requestAnimationFrame(l)}),200)}),{threshold:0});let s=document.querySelector(".post-TianliGPT");a.observe(s)}};function e(){t(tianliGPT_postSelector);const e=n.getTitleAndContent();postUrlIsContained=null,tianligptJsonData&&(postHref=window.location.href,postRegex=/\/+posts\/+([\w-]+)(\.html)?/,postMatch=postHref.match(postRegex),postFilteredValue=postMatch?postMatch[1]:null,postUrl="https://blog.cpen.top/posts/"+postFilteredValue+".html",postUrlIsContained=postsUrls.includes(postUrl)),postUrlIsContained?(postMatchedSummary=tianligptJsonData.summaries.find((t=>t.url===postUrl)),postSummary=postMatchedSummary.summary,n.aiShowAnimation(postSummary)):n.fetchTianliGPT(e).then((t=>{n.aiShowAnimation(t)}))}!function(){if("undefined"!=typeof tianliGPT_postURL)try{const t=t=>new RegExp("^"+t.split(/\*+/).map(n).join(".*")+"$"),n=t=>t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"),i=t(tianliGPT_postURL),o=window.location.href;i.test(o)&&e()}catch(t){console.error("TianliGPT:我没有看懂你编写的自定义链接规则,所以我决定不执行摘要功能",t)}else e()}()}if(xhr=new XMLHttpRequest,xhr.open("GET","https://cdn.jsdmirror.com/npm/mycpen-blog@0.0.0-wjbrdpunvk/json/tianli_gpt.json",!1),xhr.send(),200===xhr.status)try{tianligptJsonData=JSON.parse(xhr.responseText),postsUrls=tianligptJsonData.summaries.map((t=>t.url))}catch(t){console.error("解析JSON数据出错:",t),tianligptJsonData=null}else console.error("加载文件失败:",xhr.statusText),tianligptJsonData=null;whenDOMReadyTianliGPT(),document.addEventListener("pjax:complete",whenDOMReadyTianliGPT);
|
1
|
+
const _0xbb4a5=_0x12b7;(function(_0x169026,_0x1a08e3){const _0x2be5fc=_0x12b7,_0x2f6365=_0x169026();while(!![]){try{const _0x1bc6e7=-parseInt(_0x2be5fc(0x102))/0x1+-parseInt(_0x2be5fc(0xf0))/0x2*(parseInt(_0x2be5fc(0xdb))/0x3)+-parseInt(_0x2be5fc(0xd7))/0x4+parseInt(_0x2be5fc(0xd0))/0x5+parseInt(_0x2be5fc(0xca))/0x6*(parseInt(_0x2be5fc(0xee))/0x7)+parseInt(_0x2be5fc(0xf6))/0x8*(-parseInt(_0x2be5fc(0xc9))/0x9)+parseInt(_0x2be5fc(0x106))/0xa;if(_0x1bc6e7===_0x1a08e3)break;else _0x2f6365['push'](_0x2f6365['shift']());}catch(_0x5b88cf){_0x2f6365['push'](_0x2f6365['shift']());}}}(_0xf81d,0x2b16c));function whenDOMReadyTianliGPT(){const _0x113b80=_0x12b7;tianliGPT_postSelector=_0x113b80(0x10c),tianliGPT_key_list=[_0x113b80(0x10e),_0x113b80(0xcd),'PKgVCDRcgwtP4X7bIBBB',_0x113b80(0xe3),'WF6NSQdXy7nBmc6BaiFo'],tianliGPT_randomIndex=Math[_0x113b80(0xd5)](Math[_0x113b80(0x10b)]()*tianliGPT_key_list[_0x113b80(0xe8)]),tianliGPT_key=tianliGPT_key_list[tianliGPT_randomIndex],tianliGPTIsRunning=![],tianliGPT_postURL=_0x113b80(0xc8),tianliGPT_typingAnimate=![];function _0x14df01(_0x3cfeb7){const _0xf76211=_0x113b80;_0x29537d();const _0x5990c5=document[_0xf76211(0x105)](_0x3cfeb7);if(!_0x5990c5)return;const _0x590797=document['createElement']('div');_0x590797[_0xf76211(0x116)]=_0xf76211(0xc7);const _0x58e743=document[_0xf76211(0xef)]('div');_0x58e743['className']=_0xf76211(0x11e),_0x590797['appendChild'](_0x58e743);const _0x26c4a7=document['createElement']('i');_0x26c4a7[_0xf76211(0x116)]=_0xf76211(0xea),_0x58e743['appendChild'](_0x26c4a7),_0x26c4a7['innerHTML']=_0xf76211(0x115);const _0x5e39f8=document[_0xf76211(0xef)]('div');_0x5e39f8[_0xf76211(0x116)]=_0xf76211(0xbf),_0x5e39f8[_0xf76211(0xda)]='文章摘要',_0x58e743[_0xf76211(0xd3)](_0x5e39f8);const _0x570027=document[_0xf76211(0xef)]('div');_0x570027[_0xf76211(0x116)]=_0xf76211(0x104),_0x570027['id']=_0xf76211(0x104),_0x570027[_0xf76211(0xda)]=_0xf76211(0xf2),_0x58e743[_0xf76211(0xd3)](_0x570027);const _0x7d2bd=document[_0xf76211(0xef)](_0xf76211(0x108));_0x7d2bd['className']=_0xf76211(0x11c),_0x7d2bd[_0xf76211(0xbc)]=_0xf76211(0x103)+'<span\x20class=\x22blinking-cursor\x22></span>',_0x590797[_0xf76211(0xd3)](_0x7d2bd),_0x5990c5['insertBefore'](_0x590797,_0x5990c5['firstChild']);}function _0x29537d(){const _0x252e94=_0x113b80,_0x502e4d=document['querySelector'](_0x252e94(0xb9));_0x502e4d&&_0x502e4d[_0x252e94(0x118)][_0x252e94(0xf1)](_0x502e4d);}var _0x310289={'getTitleAndContent':function(){const _0x1b6790=_0x113b80;try{const _0x430482=document[_0x1b6790(0xd8)],_0x143a9a=document[_0x1b6790(0x105)](tianliGPT_postSelector);if(!_0x143a9a)return console[_0x1b6790(0xf9)](_0x1b6790(0x101)),'';const _0x471887=_0x143a9a[_0x1b6790(0xe9)]('p'),_0x2101b3=_0x143a9a[_0x1b6790(0xd4)](_0x1b6790(0xd1));let _0x49875a='';for(let _0x3aa3d6 of _0x2101b3){_0x49875a+=_0x3aa3d6[_0x1b6790(0xdf)]+'\x20';}for(let _0x240c23 of _0x471887){const _0x41191d=_0x240c23['innerText']['replace'](/https?:\/\/[^\s]+/g,'');_0x49875a+=_0x41191d;}const _0x1032aa=_0x430482+'\x20'+_0x49875a;let _0x1927ea=0x3e8;typeof tianliGPT_wordLimit!==_0x1b6790(0x119)&&(_0x1927ea=tianliGPT_wordLimit);const _0x30e483=_0x1032aa[_0x1b6790(0xe6)](0x0,_0x1927ea);return _0x30e483;}catch(_0x516339){return console['error'](_0x1b6790(0xc2),_0x516339),'';}},'fetchTianliGPT':async function(_0x2ea703){const _0x13fcdc=_0x113b80;if(window[_0x13fcdc(0xed)]['host']!=='blog.cpen.top')return'获取文章摘要失败,请访问\x20blog.cpen.top';if(!tianliGPT_key)return _0x13fcdc(0xf4);if(tianliGPT_key===_0x13fcdc(0xde))return _0x13fcdc(0xce);var _0x295095=window[_0x13fcdc(0xed)][_0x13fcdc(0x110)];const _0xa631c4=document[_0x13fcdc(0xd8)],_0x3bbc2f=_0x13fcdc(0xc0)+encodeURIComponent(_0x2ea703)+_0x13fcdc(0xc4)+encodeURIComponent(tianliGPT_key)+_0x13fcdc(0xcb)+encodeURIComponent(_0x295095)+'&title='+encodeURIComponent(_0xa631c4),_0x4d7cc1=0x4e20;try{const _0x239841=new AbortController(),_0x1ac941=setTimeout(()=>_0x239841[_0x13fcdc(0x10d)](),_0x4d7cc1),_0x558ade=await fetch(_0x3bbc2f,{'signal':_0x239841[_0x13fcdc(0xe0)]});if(_0x558ade['ok']){const _0x11e995=await _0x558ade[_0x13fcdc(0xd9)]();return _0x11e995[_0x13fcdc(0xfa)];}else{_0x558ade[_0x13fcdc(0xd6)]===0x192&&document[_0x13fcdc(0xd4)](_0x13fcdc(0xb9))[_0x13fcdc(0x11a)](_0x10233a=>{const _0xf3742e=_0x13fcdc;_0x10233a[_0xf3742e(0xeb)][_0xf3742e(0xd2)]=_0xf3742e(0x10f);});throw new Error('TianliGPT:余额不足,请充值后请求新的文章');}}catch(_0x2e6b75){return _0x2e6b75[_0x13fcdc(0xf7)]===_0x13fcdc(0xc3)?window[_0x13fcdc(0xed)][_0x13fcdc(0xff)]===_0x13fcdc(0xcf)?(console[_0x13fcdc(0xf9)](_0x13fcdc(0xe2)),'获取文章摘要超时。请勿在本地主机上测试\x20API\x20密钥。'):(console[_0x13fcdc(0xdd)](_0x13fcdc(0x11f)),'获取文章摘要超时。当你出现这个问题时,可能是key或者绑定的域名不正确。也可能是因为文章过长导致的\x20AI\x20运算量过大,你可以稍等一下然后刷新页面重试。'):(console[_0x13fcdc(0xdd)](_0x13fcdc(0xfd),_0x2e6b75),_0x13fcdc(0xe1));}},'aiShowAnimation':function(_0x3b720b){const _0x3247fb=_0x113b80,_0x55ab0f=document[_0x3247fb(0x105)](_0x3247fb(0x100));if(!_0x55ab0f)return;if(tianliGPTIsRunning)return;if(typeof tianliGPT_typingAnimate!==_0x3247fb(0x119)&&!tianliGPT_typingAnimate){_0x55ab0f['innerHTML']=_0x3b720b;return;}tianliGPTIsRunning=!![];const _0x4c7f8c=0x19,_0x113c68=0x3e8,_0x584aee=0x6;_0x55ab0f[_0x3247fb(0xeb)][_0x3247fb(0xd2)]='block',_0x55ab0f[_0x3247fb(0xbc)]=_0x3247fb(0x103)+_0x3247fb(0x112);let _0xd8675c=!![],_0x576864=0x0,_0x4a0d2c=!![],_0x597777=performance[_0x3247fb(0xf3)]();const _0x37e400=()=>{const _0x80f1e9=_0x3247fb;if(_0x576864<_0x3b720b[_0x80f1e9(0xe8)]&&_0xd8675c){const _0x5b44b5=performance['now'](),_0x40fe80=_0x5b44b5-_0x597777,_0x192e9e=_0x3b720b[_0x80f1e9(0xe6)](_0x576864,_0x576864+0x1),_0x54a10f=/[,。!、?,.!?]/['test'](_0x192e9e),_0x21d663=_0x54a10f?_0x4c7f8c*_0x584aee:_0x4c7f8c;_0x40fe80>=_0x21d663&&(_0x55ab0f[_0x80f1e9(0xdf)]=_0x3b720b[_0x80f1e9(0xe6)](0x0,_0x576864+0x1),_0x597777=_0x5b44b5,_0x576864++,_0x576864<_0x3b720b[_0x80f1e9(0xe8)]?_0x55ab0f[_0x80f1e9(0xbc)]=_0x3b720b[_0x80f1e9(0xe6)](0x0,_0x576864)+_0x80f1e9(0x112):(_0x55ab0f[_0x80f1e9(0xbc)]=_0x3b720b,_0x55ab0f[_0x80f1e9(0xeb)]['display']=_0x80f1e9(0xe5),tianliGPTIsRunning=![],_0x9e30c9[_0x80f1e9(0x120)]())),requestAnimationFrame(_0x37e400);}},_0x9e30c9=new IntersectionObserver(_0x18266e=>{const _0x4ba12d=_0x3247fb;let _0x3abd7c=_0x18266e[0x0][_0x4ba12d(0xc5)];_0xd8675c=_0x3abd7c,_0xd8675c&&_0x4a0d2c&&setTimeout(()=>{requestAnimationFrame(_0x37e400);},0xc8);},{'threshold':0x0});let _0x3a4392=document[_0x3247fb(0x105)]('.post-TianliGPT');_0x9e30c9['observe'](_0x3a4392);}};function _0x410d8c(){const _0x4bf3e7=_0x113b80;_0x14df01(tianliGPT_postSelector);const _0x9d25be=_0x310289[_0x4bf3e7(0x111)]();if(_0x9d25be){}postUrlIsContained=null,tianligptJsonData&&(postHref=window[_0x4bf3e7(0xed)]['href'],postRegex=/\/+posts\/+([\w-]+)(\.html)?/,postMatch=postHref[_0x4bf3e7(0x114)](postRegex),postFilteredValue=postMatch?postMatch[0x1]:null,postUrl=_0x4bf3e7(0xbb)+_0x4bf3e7(0xbd)+postFilteredValue+_0x4bf3e7(0xcc),postUrlIsContained=postsUrls[_0x4bf3e7(0xc1)](postUrl)),postUrlIsContained?(postMatchedSummary=tianligptJsonData[_0x4bf3e7(0xfe)][_0x4bf3e7(0x117)](_0x5295ef=>_0x5295ef['url']===postUrl),postSummary=postMatchedSummary[_0x4bf3e7(0xfa)],_0x310289['aiShowAnimation'](postSummary)):_0x310289[_0x4bf3e7(0x113)](_0x9d25be)[_0x4bf3e7(0xbe)](_0x23e259=>{const _0x5c3d88=_0x4bf3e7;_0x310289[_0x5c3d88(0xfc)](_0x23e259);});}function _0x1441b2(){const _0x36b649=_0x113b80;if(typeof tianliGPT_postURL==='undefined'){_0x410d8c();return;}try{const _0x44dc60=_0x5d65d1=>{const _0x1ade53=_0x12b7;return new RegExp('^'+_0x5d65d1[_0x1ade53(0xb8)](/\*+/)['map'](_0x4a55de)[_0x1ade53(0x107)]('.*')+'$');},_0x4a55de=_0x43a683=>{const _0x4b7c16=_0x12b7;return _0x43a683[_0x4b7c16(0xb7)](/[|\\{}()[\]^$+*?.]/g,_0x4b7c16(0xec));},_0x548ed5=_0x44dc60(tianliGPT_postURL),_0x213dac=window[_0x36b649(0xed)][_0x36b649(0x110)];if(_0x548ed5['test'](_0x213dac))_0x410d8c();else{}}catch(_0x16e7f5){console[_0x36b649(0xdd)](_0x36b649(0x11b),_0x16e7f5);}}_0x1441b2();}function _0xf81d(){const _0x5549c1=['1038oTDkPi','&url=','.html','FbXpqokdh8qY61bdJEme','请购买\x20key\x20使用,如果你能看到此条内容,则说明代码安装正确。','localhost','1076545ZoZYGp','h1,\x20h2,\x20h3,\x20h4,\x20h5','display','appendChild','querySelectorAll','floor','status','1012960uvKmiz','title','json','textContent','33828UVAOOV','加载文件失败:','error','5Q5mpqRK5DkwT1X9Gi5e','innerText','signal','获取文章摘要失败,请稍后再试。','警告:请勿在本地主机上测试\x20API\x20密钥。','OVWfZmDbf1jqsE0OXW4C','map','block','slice','statusText','length','getElementsByTagName','tianliGPT-title-icon','style','\x5c$&','location','12243kXXbBT','createElement','22EyIOsz','removeChild','TianliGPT','now','没有获取到key,代码可能没有安装正确。如果你需要在tianli_gpt文件引用前定义tianliGPT_key变量。详细请查看文档。','/json/tianli_gpt.json','120WbBHQM','name','url','warn','summary','pjax:complete','aiShowAnimation','请求失败:','summaries','hostname','.tianliGPT-explanation','TianliGPT:找不到文章容器。请尝试将引入的代码放入到文章容器之后。如果本身没有打算使用摘要功能可以忽略此提示。','155439Yofeiv','生成中...','tianliGPT-tag','querySelector','3313760BssOcG','join','div','responseText','GET','random','#post\x20#article-container','abort','6NnrHU4xKAPwwYxZr8WB','none','href','getTitleAndContent','<span\x20class=\x22blinking-cursor\x22></span>','fetchTianliGPT','match','<svg\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22\x20width=\x2248px\x22\x20height=\x2248px\x22\x20viewBox=\x220\x200\x2048\x2048\x22>\x0a\x20\x20\x20\x20<title>机器人</title>\x0a\x20\x20\x20\x20<g\x20id=\x22机器人\x22\x20stroke=\x22none\x22\x20stroke-width=\x221\x22\x20fill=\x22none\x22\x20fill-rule=\x22evenodd\x22>\x0a\x20\x20\x20\x20\x20\x20<path\x20d=\x22M34.717885,5.03561087\x20C36.12744,5.27055371\x2037.079755,6.60373651\x2036.84481,8.0132786\x20L35.7944,14.3153359\x20L38.375,14.3153359\x20C43.138415,14.3153359\x2047,18.1768855\x2047,22.9402569\x20L47,34.4401516\x20C47,39.203523\x2043.138415,43.0650727\x2038.375,43.0650727\x20L9.625,43.0650727\x20C4.861585,43.0650727\x201,39.203523\x201,34.4401516\x20L1,22.9402569\x20C1,18.1768855\x204.861585,14.3153359\x209.625,14.3153359\x20L12.2056,14.3153359\x20L11.15519,8.0132786\x20C10.920245,6.60373651\x2011.87256,5.27055371\x2013.282115,5.03561087\x20C14.69167,4.80066802\x2016.024865,5.7529743\x2016.25981,7.16251639\x20L17.40981,14.0624532\x20C17.423955,14.1470924\x2017.43373,14.2315017\x2017.43948,14.3153359\x20L30.56052,14.3153359\x20C30.56627,14.2313867\x2030.576045,14.1470924\x2030.59019,14.0624532\x20L31.74019,7.16251639\x20C31.975135,5.7529743\x2033.30833,4.80066802\x2034.717885,5.03561087\x20Z\x20M38.375,19.4902885\x20L9.625,19.4902885\x20C7.719565,19.4902885\x206.175,21.0348394\x206.175,22.9402569\x20L6.175,34.4401516\x20C6.175,36.3455692\x207.719565,37.89012\x209.625,37.89012\x20L38.375,37.89012\x20C40.280435,37.89012\x2041.825,36.3455692\x2041.825,34.4401516\x20L41.825,22.9402569\x20C41.825,21.0348394\x2040.280435,19.4902885\x2038.375,19.4902885\x20Z\x20M14.8575,23.802749\x20C16.28649,23.802749\x2017.445,24.9612484\x2017.445,26.3902253\x20L17.445,28.6902043\x20C17.445,30.1191812\x2016.28649,31.2776806\x2014.8575,31.2776806\x20C13.42851,31.2776806\x2012.27,30.1191812\x2012.27,28.6902043\x20L12.27,26.3902253\x20C12.27,24.9612484\x2013.42851,23.802749\x2014.8575,23.802749\x20Z\x20M33.1425,23.802749\x20C34.57149,23.802749\x2035.73,24.9612484\x2035.73,26.3902253\x20L35.73,28.6902043\x20C35.73,30.1191812\x2034.57149,31.2776806\x2033.1425,31.2776806\x20C31.71351,31.2776806\x2030.555,30.1191812\x2030.555,28.6902043\x20L30.555,26.3902253\x20C30.555,24.9612484\x2031.71351,23.802749\x2033.1425,23.802749\x20Z\x22\x20id=\x22形状结合\x22\x20fill=\x22#444444\x22\x20fill-rule=\x22nonzero\x22></path>\x0a\x20\x20\x20\x20</g>\x0a\x20\x20\x20\x20</svg>','className','find','parentElement','undefined','forEach','TianliGPT:我没有看懂你编写的自定义链接规则,所以我决定不执行摘要功能','tianliGPT-explanation','addEventListener','tianliGPT-title','请求超时','disconnect','replace','split','.post-TianliGPT','解析JSON数据出错:','https://blog.cpen.top/','innerHTML','posts/','then','tianliGPT-title-text','https://summary.tianli0.top/?content=','includes','TianliGPT错误:可能由于一个或多个错误导致没有正常运行,原因出在获取文章容器中的内容失败,或者可能是在文章转换过程中失败。','AbortError','&key=','isIntersecting','send','post-TianliGPT','*/posts/*','84033fftosD'];_0xf81d=function(){return _0x5549c1;};return _0xf81d();}xhr=new XMLHttpRequest(),xhr['open'](_0xbb4a5(0x10a),_0xbb4a5(0xf5),![]),xhr[_0xbb4a5(0xc6)]();if(xhr[_0xbb4a5(0xd6)]===0xc8)try{tianligptJsonData=JSON['parse'](xhr[_0xbb4a5(0x109)]),postsUrls=tianligptJsonData['summaries'][_0xbb4a5(0xe4)](_0x13b413=>_0x13b413[_0xbb4a5(0xf8)]);}catch(_0x2156bb){console[_0xbb4a5(0xdd)](_0xbb4a5(0xba),_0x2156bb),tianligptJsonData=null;}else console[_0xbb4a5(0xdd)](_0xbb4a5(0xdc),xhr[_0xbb4a5(0xe7)]),tianligptJsonData=null;function _0x12b7(_0x5512b1,_0xd2a224){const _0xf81d4b=_0xf81d();return _0x12b7=function(_0x12b726,_0x3da94c){_0x12b726=_0x12b726-0xb7;let _0x56fe49=_0xf81d4b[_0x12b726];return _0x56fe49;},_0x12b7(_0x5512b1,_0xd2a224);}whenDOMReadyTianliGPT(),document[_0xbb4a5(0x11d)](_0xbb4a5(0xfb),whenDOMReadyTianliGPT);
|