1const throttle=(e,t)=>{let s,o,n;return function(){const i=this,a=arguments;s?(clearTimeout(o),o=setTimeout(function(){Date.now()-n>=t&&(e.apply(i,a),n=Date.now())},Math.max(t-(Date.now()-n),0))):(e.apply(i,a),n=Date.now(),s=!0)}},delayTime=420;window.addEventListener("DOMContentLoaded",e=>{const t=document.querySelector(".header");if(t){const e=window.getComputedStyle(t,null).getPropertyValue("height");document.documentElement.style.setProperty("--header-height",e)}},{once:!0}),window.addEventListener("DOMContentLoaded",e=>{const n=document.querySelector(".nav-toggle"),o=document.createElement("div");o.className="nav-toggle-inner",n.appendChild(o);for(let e=0;e<3;e++){const t=document.createElement("span");o.appendChild(t)}const s=document.getElementById("nav-toggle"),t=document.querySelector(".header"),i=document.querySelector(".nav-curtain");s.addEventListener("change",e=>{e.target.checked?(t.classList.add("open"),n.classList.add("open"),t.classList.remove("fade"),i.style="display: block"):(t.classList.remove("open"),n.classList.remove("open"),t.classList.add("fade"))}),i.addEventListener("animationend",e=>{s.checked||e.target.removeAttribute("style")}),window.addEventListener("scroll",throttle(function(){l()},delayTime));const r=window.getComputedStyle(document.documentElement,null).getPropertyValue("--max-width");let c=window.matchMedia(`(max-width: ${r})`);c.addListener(e=>{e.matches||a(!0)});function l(){const e=document.getElementById("search-input");if(e&&e===document.activeElement)return;a()}function a(e){s.checked&&(s.checked=!1,t.classList.remove("open"),n.classList.remove("open"),e?i.removeAttribute("style"):t.classList.add("fade"))}},{once:!0}),window.addEventListener("DOMContentLoaded",e=>{const t=document.getElementById("back-to-top");t!==null&&window.addEventListener("scroll",throttle(function(){window.scrollY>100?t.classList.add("show"):t.classList.remove("show")},delayTime))},{once:!0});const userPrefers=localStorage.getItem("theme");userPrefers==="dark"?changeModeMeta("dark"):userPrefers==="light"&&changeModeMeta("light"),window.matchMedia("(prefers-color-scheme: dark)").addListener(e=>{changeMode()}),window.addEventListener("DOMContentLoaded",e=>{changeMode();const t=document.getElementById("theme-switcher");t&&t.addEventListener("click",e=>{e.preventDefault(),changeModeMeta(getCurrentTheme()=="dark"?"light":"dark"),changeMode(),storePrefers()})},{once:!0}),window.addEventListener("storage",function(e){if(e.key!=="theme")return;changeModeMeta(e.newValue==="dark"?"dark":"light"),changeMode()});function getCurrentTheme(){return JSON.parse(window.getComputedStyle(document.documentElement,null).getPropertyValue("--theme-name"))}function changeModeMeta(e){document.documentElement.setAttribute("data-theme",e)}function changeMode(){const e=getCurrentTheme()==="dark",t=e?"#16171d":"#fff";if(document.querySelector('meta[name="theme-color"]').setAttribute("content",t),typeof mermaidConfig!="undefined"){const t=document.querySelectorAll(".mermaid");t.forEach(e=>{e.getAttribute("data-processed")?(e.removeAttribute("data-processed"),e.innerHTML=e.getAttribute("data-graph")):e.setAttribute("data-graph",e.textContent)}),e?(mermaidConfig.theme="dark",mermaid.initialize(mermaidConfig),mermaid.init()):(mermaidConfig.theme="default",mermaid.initialize(mermaidConfig),mermaid.init())}}function storePrefers(){window.localStorage.setItem("theme",getCurrentTheme())}window.addEventListener("DOMContentLoaded",e=>{const t="å¤å¶",s="å·²å¤å¶";document.querySelectorAll(".post-body > pre").forEach(e=>{let t=document.createElement("div");e.parentNode.replaceChild(t,e),t.appendChild(e)});function n(e){const n=document.querySelectorAll("table.lntable, .highlight > pre, .post-body > div > pre");n.forEach(n=>{n.parentNode.style.position="relative";const o=document.createElement("button");if(o.className="copy-button",o.type="button",o.innerText=t,n.classList.contains("lntable"))var i=n.querySelectorAll(".lntd")[1];else i=n.querySelector("code");o.addEventListener("click",()=>{e.writeText(i.innerText).then(()=>{o.blur(),o.innerText=s,setTimeout(()=>{o.innerText=t},1e3)}).catch(e=>{o.innerText="Error",console.error(e)})}),n.appendChild(o),n.parentNode.addEventListener("mouseover",()=>{o.style="visibility: visible; opacity: 1"}),n.parentNode.addEventListener("mouseout",()=>{o.style="visibility: hidden; opacity: 0"})})}if(navigator&&navigator.clipboard)n(navigator.clipboard);else{const e=document.createElement("script");e.src="https://cdn.jsdelivr.net/npm/[email protected]/dist/clipboard-polyfill.min.js",e.defer=!0,e.onload=function(){n(clipboard)},document.head.appendChild(e)}},{once:!0}),window.addEventListener("DOMContentLoaded",e=>{let o=null,i=null,t=null,s=!1,n=null;const a=document.getElementById("search"),r=document.getElementById("search-input");a.addEventListener("submit",function(e){e.preventDefault();let t=r.value.trim();if(!t)return;c(t,!1)},!1),history.state&&history.state.type=="search"&&c(history.state.term,!0),window.addEventListener("popstate",function(e){if(e.state&&e.state.type=="search")c(e.state.term,!0);else if(!e.state&&n){let e=document.querySelector(".main-inner");for(;e.firstChild;)e.removeChild(e.firstChild);for(let t of n)e.appendChild(t);n=null}},!1);function c(e,n){r.value=e,a.setAttribute("data-running","true"),o?d(e,n):t?(t=e,s=n):(t=e,s=n,u())}function l(){a.removeAttribute("data-running");const e=document.querySelector(".header");e&&e.classList.contains("fade")&&r.blur(),t=null,s=!1}function u(){let e=new XMLHttpRequest;e.open("GET","../../search.json"),e.responseType="json",e.addEventListener("load",function(){let a=e.response;if(!a){console.error("Search index could not be downloaded, was it generated?"),l();return}i={},o=lunr(function(){const e="zh";e!="en"&&lunr.hasOwnProperty(e)&&this.use(lunr[e]),this.ref("uri"),this.field("title"),this.field("subtitle"),this.field("content"),this.field("description"),this.field("categories"),this.field("tags");for(let e of a)this.add(e),i[e.uri]=e}),d(t,s)},!1),e.addEventListener("error",l,!1),e.send(null)}function d(e,t){try{let r=o.search(e),a=document.querySelector(".main-inner")||document.querySelector("main.home"),l=[];for(;a.firstChild;)l.push(a.firstChild),a.removeChild(a.firstChild);n||(n=l);let s=document.createElement("h1");s.id="search-results",s.className="list-title",r.length==0?s.textContent="æ²¡ææ¾å°å ³äºã{}ãçç»æ".replace("{}",e):r.length==1?s.textContent="æ¾å° 1 æ¡å ³äºã{}ãçç»æ".replace("{}",e):s.textContent="æ¾å° 13579 æ¡å ³äºã{}ãçç»æ".replace("{}",e).replace("13579",r.length),a.appendChild(s),document.title=s.textContent;let d=document.getElementById("search-result");for(let n of r){let t=i[n.ref],e=d.content.cloneNode(!0);e.querySelector(".summary-title-link").href=e.querySelector(".read-more-link").href=t.uri,e.querySelector(".summary-title-link").textContent=t.title,e.querySelector(".summary").textContent=h(t.content,70),a.appendChild(e)}s.scrollIntoView(!0),t||history.pushState({type:"search",term:e},s.textContent,"#search="+encodeURIComponent(e));let c=document.querySelector(".nav-toggle");c&&c.classList.contains("open")&&document.getElementById(c.getAttribute("for")).click()}finally{l()}}function h(e,t){let n,s="",o=0,i=/(\S+)(\s*)/g;for(;n=i.exec(e);)if(o++,o<=t)s+=n[0];else{let e=n[1][n[1].length-1],t=n[2][0];if(/[.?!"]/.test(e)||t==` 2`){s+=n[1];break}s+=n[0]}return s}},{once:!0})
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.