/*! For license information please see page.js.LICENSE.txt */ (globalThis.webpackChunksakurairo_scripts=globalThis.webpackChunksakurairo_scripts||[]).push([[9768],{3258:(e,t)=>{t.Z=function(e,t=166){let n;function o(...o){clearTimeout(n),n=setTimeout((()=>{e.apply(this,o)}),t)}return o.clear=()=>{clearTimeout(n)},o}},782:()=>{const e=[".bili",".menhera",".tieba"];window.motionSwitch=function(t){for(let t=0;t{var o=n(8487),a=n(845),r=n(7472);let i;function s(){!function(){const e=document.getElementsByClassName("collapseButton");if(e.length>0){const t=e=>{(0,a.wy)(e.target.parentNode.parentNode.parentNode.querySelector(".xContent"))};for(const n of e)n.addEventListener("click",t)}}(),async function(){if(_iro.baguetteBoxON){i||(i=(0,o.loadCSS)((0,r.i)("dist/baguetteBox.min.css","baguettebox.js","1.11.1")));const{default:e}=await n.e(5731).then(n.t.bind(n,5731,23));e.run(".entry-content",{captions:function(e){return e.getElementsByTagName("img")[0].alt},ignoreClass:"fancybox"})}else if(_iro.fancybox){if(i||(i=(0,o.loadCSS)((0,r.i)("dist/jquery.fancybox.min.css","@fancyapps/fancybox","3.5.7"))),!(window.jQuery instanceof Function||window.$ instanceof Function))if(_iro.ext_shared_lib)(0,r.V)("dist/jquery.slim.min.js","jquery"),(0,r.V)("dist/jquery.fancybox.min.js","@fancyapps/fancybox");else{const{default:e}=await n.e(9755).then(n.t.bind(n,9755,23));window.$=e,window.jQuery=e,n.e(4155).then(n.t.bind(n,4155,23))}}else if(_iro.lightGallery){const{default:e}=await Promise.all([n.e(114),n.e(5138)]).then(n.bind(n,114));e()}}(),async function(){document.getElementsByTagName("math").length>0&&("MathJax"in window||(window.MathJax={svg:{fontCache:"global"},startup:{typeset:!1},chtml:{fontURL:(0,r.i)("es5/output/chtml/fonts/woff-v2","mathjax","2.3.0"),mathmlSpacing:!0}}),await n.e(2490).then(n.t.bind(n,2490,23)),window.MathJax.typeset())}()}var l=n(4637),c=n(5482),u=(n(782),n(2568)),m=n.n(u);const d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:80;return"https://"+_iro.gravatar_url+"/"+m()(e)+".jpg?s="+t+"&d=mm"};function g(){let e=!1;const t=document.querySelector("input#author"),n=document.querySelector("input#qq"),o=document.querySelector("input#email"),r=document.querySelector("input#url"),i=document.querySelector(".qq-check"),s=document.querySelector(".gravatar-check"),l=document.querySelector("div.comment-user-avatar img");if(null==t)return;localStorage.getItem("user_qq")||localStorage.getItem("user_qq_email")||localStorage.getItem("user_author")||(n.value=t.value=o.value=r.value=""),localStorage.getItem("user_avatar")&&localStorage.getItem("user_qq")&&localStorage.getItem("user_qq_email")&&(l.setAttribute("src",localStorage.getItem("user_avatar")),t.value=localStorage.getItem("user_author"),o.value=localStorage.getItem("user_qq")+"@qq.com",n.value=localStorage.getItem("user_qq"),_iro.qzone_autocomplete&&(r.value="https://user.qzone.qq.com/"+localStorage.getItem("user_qq")),n.value&&(i.style.display="block",s.style.display="none"));let c=o.value;t.addEventListener("blur",(()=>{const u=t.value;if(/^[1-9]\d{4,9}$/.test(u)){const m=()=>{n.value="",i.style.display="none",s.style.display="block",l.setAttribute("src",d(o.value,80)),localStorage.setItem("user_qq",""),localStorage.setItem("user_email",o.value),localStorage.setItem("user_avatar",d(o.value,80))};fetch((0,a.bf)(_iro.qq_api_url,{qq:u})).then((async a=>{if(a.ok)try{const m=await a.json();t.value=m.name,o.value=u.trim()+"@qq.com",_iro.qzone_autocomplete&&(r.value="https://user.qzone.qq.com/"+u.trim()),l.setAttribute("src","https://q2.qlogo.cn/headimg_dl?dst_uin="+u+"&spec=100"),e=!0,n.value=u.trim(),n.value&&(i.style.display="block",s.style.display="none"),localStorage.setItem("user_author",m.name),localStorage.setItem("user_qq",u),localStorage.setItem("is_user_qq","yes"),localStorage.setItem("user_qq_email",u+"@qq.com"),localStorage.setItem("user_email",u+"@qq.com"),c=o.value,l.setAttribute("src",m.avatar),localStorage.setItem("user_avatar",m.avatar)}catch(e){console.warn(e),m()}else m()}))}})),localStorage.getItem("user_avatar")&&localStorage.getItem("user_email")&&"no"==localStorage.getItem("is_user_qq")&&!localStorage.getItem("user_qq_email")&&(l.setAttribute("src",localStorage.getItem("user_avatar")),o.value=localStorage.getItem("user_mail"),n.value="",n.value||(i.style.display="none",s.style.display="block")),o.addEventListener("blur",(function(){let t=o.value;0!=e&&c==t||""==t||(l.setAttribute("src",d(t,80)),localStorage.setItem("user_avatar",d(t,80)),localStorage.setItem("user_email",t),localStorage.setItem("user_qq_email",""),localStorage.setItem("is_user_qq","no"),n.value="",n.value||(i.style.display="none",s.style.display="block"))})),localStorage.getItem("user_url")&&(r.value=localStorage.getItem("user_url")),r.addEventListener("blur",(function(){let e=r.value;r.value=e,localStorage.setItem("user_url",e)})),localStorage.getItem("user_author")&&(t.value=localStorage.getItem("user_author")),t.addEventListener("blur",(function(){let e=t.value;t.value=e,localStorage.setItem("user_author",e)}))}const p={respondId:"",moveForm:function(e,t,n){const o=document.getElementById(e),a=document.getElementById(n),r=document.getElementById("cancel-comment-reply-link"),i=document.getElementById("comment_parent");if(this.respondId=n,!document.getElementById("wp-temp-form-div")){const e=document.createElement("div");e.id="wp-temp-form-div",e.style.display="none",a.parentNode.insertBefore(e,a)}if(o)o.parentNode.insertBefore(a,o.nextSibling);else{const e=document.getElementById("wp-temp-form-div");document.getElementById("comment_parent").value="0",e.parentNode.insertBefore(a,e),e.remove()}const s=document.getElementById("respond");window.scrollTo({top:s.getBoundingClientRect().top+window.pageYOffset-s.clientTop-100,behavior:"smooth"}),i.value=t,r.style.display="",r.onclick=function(e){var t=p,n=document.getElementById("wp-temp-form-div"),o=document.getElementById(t.respondId);return document.getElementById("comment_parent").value="0",n&&o&&(n.parentNode.insertBefore(o,n),n.remove()),this.style.display="none",this.onclick=null,!1};try{document.getElementById("comment").focus()}catch(e){}return!1}},f=p;var h,y=n(4160);const v="1.28.0",_={autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",contenteditable:"false",design:"by Mashiro"};function b(e,t){if(!e.children[0])return;let n="text";const o=e.children[0].className.match(/language-(\w+)/i);o&&(n=o[1]),e.classList.add("highlight-wrap");for(const t in _)e.setAttribute(t,_[t]);t.setAttribute("data-rel",n.toUpperCase())}const w=e=>{const t=e.target;if(t.classList.contains("highlight-wrap")){if(t.classList.contains("code-block-fullscreen"))t.remove();else{const e=t.cloneNode(!0);e.classList.toggle("code-block-fullscreen"),document.body.append(e)}document.documentElement.classList.toggle("code-block-fullscreen-html-scroll")}};async function S(e,t){try{await async function(){try{window.hljs||(window.hljs=(await Promise.all([n.e(1857),n.e(8128),n.e(9980),n.e(49),n.e(9148),n.e(4930),n.e(9529),n.e(8420),n.e(5223),n.e(3302),n.e(587)]).then(n.bind(n,637))).default,await n.e(5241).then(n.t.bind(n,5241,23)))}catch(e){console.warn(e)}}();for(let e=0;e{var e;const{light:t,dark:n}=(null==(e=_iro.code_highlight_prism)?void 0:e.theme)||{},o={light:t||"themes/prism.min.css",dark:n||"themes/prism-tomorrow.min.css"};for(const e in o)o[e]=new URL(o[e],E).toString();return o})();function I(e){const t=e?L.dark:L.light;if(q){if(q.href!==t){const e=(0,o.loadCSS)(t);e.addEventListener("load",(()=>{q.remove(),q=e}))}}else q=(0,o.loadCSS)(t)}const B=e=>{I(e.detail)};async function T(){try{window.Prism||(I((0,y.N2)()),document.addEventListener("darkmode",B),(0,o.loadCSS)(new URL("plugins/toolbar/prism-toolbar.min.css",E).toString()),(0,o.loadCSS)(new URL("plugins/previewers/prism-previewers.min.css",E).toString()),_iro.ext_shared_lib?await Promise.all([(0,r.V)("components/prism-core.min.js","prismjs",v),(0,r.V)("plugins/autoloader/prism-autoloader.min.js","prismjs",v),(0,r.V)("plugins/toolbar/prism-toolbar.min.js","prismjs",v),(0,r.V)("plugins/previewers/prism-previewers.min.js","prismjs",v),(0,r.V)("plugins/show-language/prism-show-language.min.js","prismjs",v)]):await n.e(5027).then(n.bind(n,5027)),Prism.plugins.autoloader.languages_path=new URL("components/",E).toString())}catch(e){console.warn(e)}}var k=n(1431);n(1703);const j=e=>{const t=e.target;if(t===document.querySelector("#bangumi-pagination a")){if(e.preventDefault(),e.stopPropagation(),t.classList.contains("loading"))return;t.classList.add("loading"),t.textContent="",fetch(t.dataset.href+"&_wpnonce="+_iro.nonce,{method:"POST"}).then((async e=>{const t=await e.json();if(!e.ok)throw Error(`Error,Status:${e.status}`);document.getElementById("bangumi-pagination").remove(),document.querySelector(".row").insertAdjacentHTML("beforeend",t),(0,l.m)()})).catch((e=>{console.error(e),(0,c.f)(e),t.classList.remove("loading"),t.innerHTML=' ERROR '}))}};function x(){const e=document.getElementsByTagName("section");let t=!1;for(let n=0;n0){for(let e=0;e');if(_iro.ext_shared_lib)await(0,r.V)("dist/clipboard.min.js","clipboard"),new ClipboardJS(".copy-code");else{new(0,(await n.e(2152).then(n.t.bind(n,2152,23))).default)(".copy-code")}}}function N(){document.getElementsByClassName("comment_inline_img").length&&document.getElementsByClassName("comments-main")[0].addEventListener("click",(function(e){e.target.classList.contains("comment_inline_img")&&window.open(e.target.src)}))}function M(){document.getElementsByClassName("emoji-item").length&&document.querySelector(".menhera-container").addEventListener("click",(function(e){e.target.classList.contains("emoji-item")&&grin(e.target.innerText,"custom","`","` ")}))}function H(){const e="commentwrap",t=document.getElementById("commentform");if(t){let n=!1;t.addEventListener("submit",(function(t){if(t.stopPropagation(),t.preventDefault(),n)return;const o=(0,c.f)((0,k.__)("提交中...."),!0),a=new FormData(this);a.append("action","ajax_comment"),n=!0,fetch(_iro.ajaxurl,{method:this.attributes.method.value,body:a}).then((async t=>{const n=await t.text();if(t.ok){Array.from(document.getElementsByTagName("textarea")).forEach((e=>e.value=""));const t=document.getElementById("cancel-comment-reply-link"),o=document.getElementById("wp-temp-form-div"),a=document.getElementById(f.respondId);"0"!=document.getElementById("comment_parent").value?document.getElementById("respond").insertAdjacentHTML("beforebegin",'
    '+n+"
"):document.getElementsByClassName(e).length?"asc"==_iro.order?document.getElementsByClassName("commentwrap")[1].insertAdjacentHTML("beforeend",n):document.getElementsByClassName("commentwrap")[1].insertAdjacentHTML("afterbegin",n):"bottom"==_iro.formpostion?document.getElementById("respond").insertAdjacentHTML("beforebegin",'
    '+n+"
"):document.getElementById("respond").insertAdjacentHTML("afterend",'
    '+n+"
"),(0,c.f)((0,k.__)("提交成功")),document.dispatchEvent(new CustomEvent("ajax_comment_complete")),t.style.display="none",t.onclick=null,document.getElementById("comment_parent").value="0",o&&a&&(o.parentNode.insertBefore(a,o),o.remove())}else(0,c.f)(n||"HTTP"+t.status+":"+t.statusText)})).catch((e=>{(0,c.f)(e)})).finally((()=>{o.remove(),n=!1}))}))}}function R(){let e=document.getElementsByClassName("sm"),t=document.querySelector(".comments-main");e.length&&t&&(t.addEventListener("click",(function(e){if(e.target.classList.contains("comment-reply-link")){e.preventDefault(),e.stopPropagation();let t=e.target.getAttribute("data-commentid");f.moveForm("comment-"+t,t,"respond",this.getAttribute("data-postid"))}})),t.addEventListener("click",(e=>{let t=e.target.parentNode;if(t.classList.contains("sm")){let e=(0,k.__)("您真的要设为私密吗?");if(1==confirm(e)){if(t.classList.contains("private_now"))return alert((0,k.__)("您之前已设过私密评论")),!1;{t.classList.add("private_now");let e=t.getAttribute("data-idp"),n=t.getAttribute("data-actionp"),o=t.getElementsByClassName("has_set_private")[0],a="action=siren_private&p_id="+e+"&p_action="+n,r=new XMLHttpRequest;return r.onreadystatechange=function(){4==this.readyState&&200==this.status&&(o.innerHTML=r.responseText)},r.open("POST","/wp-admin/admin-ajax.php",!0),r.setRequestHeader("Content-type","application/x-www-form-urlencoded"),r.send(a),!1}}}})))}function P(){const e=document.querySelector(".toc-container"),t=document.querySelector(".site-content");if(e&&t){const n=()=>{e.style.height=Math.min(t.getBoundingClientRect().height,document.documentElement.offsetHeight-e.offsetTop)+"px"};n(),window.addEventListener("resize",(0,C.Z)(n),{passive:!0}),document.addEventListener("scroll",function(e,t,n){let o=null,a=Date.parse(new Date);return function(){null!==o&&clearTimeout(o);let r=Date.parse(new Date);r-a>=n?(e(),a=r):o=setTimeout(e,t)}}(n,200,1e3))}}function O(e){if(!(document.body.clientWidth<=1200))if(document.querySelector("div.have-toc")||document.querySelector("div.has-toc")){if(e&&document.getElementsByClassName("toc").length>0){n.e(2866).then(n.t.bind(n,2866,23)).then((t=>{let{default:n}=t;n.init({tocSelector:".toc",contentSelector:[".entry-content",".links"],headingSelector:"h1,h2,h3,h4,h5",headingsOffset:e-window.innerHeight/2,onClick:null})}));const e="sakurairo"==_iro.entry_content_style?document.querySelector("article.type-post")?document.querySelector("div.pattern-attachment")?-75:200:375:window.innerHeight/2,t=document.querySelectorAll(".entry-content,.links"),o=new Set;let a=1;for(let e=0;e上传图片'),function(){let e=document.getElementsByClassName("insert-image-tips")[0],t=document.getElementById("upload-img-file");t&&t.addEventListener("change",(function(){if(this.files.length>10)return(0,c.f)((0,k.__)("每次上传上限为10张")),0;for(let e=0;e=5242880)return void alert((0,k._$)("图片上传大小限制为5 MB\n\n「{0}」\n\n这张图太大啦~请重新上传噢!",this.files[e].name));for(let t=0;t