1(()=>{var M=(e,t=500)=>{e.classList.add("transiting"),e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=t+"ms",e.style.height=e.offsetHeight+"px",e.offsetHeight,e.style.overflow="hidden",e.style.height="0",e.style.paddingTop="0",e.style.paddingBottom="0",e.style.marginTop="0",e.style.marginBottom="0",window.setTimeout(()=>{e.classList.remove("show"),e.style.removeProperty("height"),e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property"),e.classList.remove("transiting")},t)},P=(e,t=500)=>{e.classList.add("transiting"),e.style.removeProperty("display"),e.classList.add("show");let n=e.offsetHeight;e.style.overflow="hidden",e.style.height="0",e.style.paddingTop="0",e.style.paddingBottom="0",e.style.marginTop="0",e.style.marginBottom="0",e.offsetHeight,e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=t+"ms",e.style.height=n+"px",e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),window.setTimeout(()=>{e.style.removeProperty("height"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property"),e.classList.remove("transiting")},t)},H=(e,t=500)=>window.getComputedStyle(e).display==="none"?P(e,t):M(e,t);function p(){let e=document.getElementById("toggle-menu");e&&e.addEventListener("click",()=>{document.getElementById("main-menu").classList.contains("transiting")||(document.body.classList.toggle("show-menu"),H(document.getElementById("main-menu"),300),e.classList.toggle("is-active"))})}function C(e,t,n){var s=document.createElement(e);for(let i in t)if(i&&t.hasOwnProperty(i)){let o=t[i];i=="dangerouslySetInnerHTML"?s.innerHTML=o.__html:o===!0?s.setAttribute(i,i):o!==!1&&o!=null&&s.setAttribute(i,o.toString())}for(let i=2;i<arguments.length;i++){let o=arguments[i];o&&s.appendChild(o.nodeType==null?document.createTextNode(o.toString()):o)}return s}var v=C;var a=class{localStorageKey="StackColorScheme";currentScheme;systemPreferScheme;constructor(t){this.bindMatchMedia(),this.currentScheme=this.getSavedScheme(),window.matchMedia("(prefers-color-scheme: dark)").matches===!0?this.systemPreferScheme="dark":this.systemPreferScheme="light",this.dispatchEvent(document.documentElement.dataset.scheme),t&&this.bindClick(t),document.body.style.transition==""&&document.body.style.setProperty("transition","background-color .3s ease")}saveScheme(){localStorage.setItem(this.localStorageKey,this.currentScheme)}bindClick(t){t.addEventListener("click",n=>{this.isDark()?this.currentScheme="light":this.currentScheme="dark",this.setBodyClass(),this.currentScheme==this.systemPreferScheme&&(this.currentScheme="auto"),this.saveScheme()})}isDark(){return this.currentScheme=="dark"||this.currentScheme=="auto"&&this.systemPreferScheme=="dark"}dispatchEvent(t){let n=new CustomEvent("onColorSchemeChange",{detail:t});window.dispatchEvent(n)}setBodyClass(){this.isDark()?document.documentElement.dataset.scheme="dark":document.documentElement.dataset.scheme="light",this.dispatchEvent(document.documentElement.dataset.scheme)}getSavedScheme(){let t=localStorage.getItem(this.localStorageKey);return t=="light"||t=="dark"||t=="auto"?t:"auto"}bindMatchMedia(){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{t.matches?this.systemPreferScheme="dark":this.systemPreferScheme="light",this.setBodyClass()})}},S=a;function d(e){let t;return()=>{t&&window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>e())}}var B=".article-content h1[id], .article-content h2[id], .article-content h3[id], .article-content h4[id], .article-content h5[id], .article-content h6[id]",g="#TableOfContents",E="#TableOfContents li",w="active-class";function A(e,t){let n=e.querySelector("a").offsetHeight,s=e.offsetTop-t.offsetHeight/2+n/2-t.offsetTop;s<0&&(s=0),t.scrollTo({top:s,behavior:"smooth"})}function I(e){let t={};return e.forEach(n=>{let s=n.querySelector("a");if(s){let i=s.getAttribute("href");i.startsWith("#")&&(t[i.slice(1)]=n)}}),t}function T(e){let t=[];return e.forEach(n=>{t.push({id:n.id,offset:n.offsetTop})}),t.sort((n,s)=>n.offset-s.offset),t}function L(){let e=document.querySelectorAll(B);if(!e){console.warn("No header matched query",e);return}let t=document.querySelector(g);if(!t){console.warn("No toc matched query",g);return}let n=document.querySelectorAll(E);if(!n){console.warn("No navigation matched query",E);return}let s=T(e),i=!1;t.addEventListener("mouseenter",d(()=>i=!0)),t.addEventListener("mouseleave",d(()=>i=!1));let o,m=I(n);function l(){let f=document.documentElement.scrollTop||document.body.scrollTop,c;
1s.forEach(y=>{f>=y.offset-20&&(c=document.getElementById(y.id))});let r;c&&(r=m[c.id]),c&&!r?console.debug("No link found for section",c):r!==o&&(o&&o.classList.remove(w),r&&(r.classList.add(w),i||A(r,t)),o=r)}window.addEventListener("scroll",d(l));function h(){s=T(e),l()}let u=document.querySelector(".article-content");u&&new ResizeObserver(d(h)).observe(u),window.addEventListener("resize",d(h))}var x="a[href]";function b(){document.querySelectorAll(x).forEach(e=>{e.getAttribute("href").startsWith("#")&&e.addEventListener("click",n=>{n.preventDefault();let s=decodeURI(e.getAttribute("href").substring(1)),i=document.getElementById(s),o=i.getBoundingClientRect().top-document.documentElement.getBoundingClientRect().top;window.history.pushState({},"",e.getAttribute("href")),scrollTo({top:o,behavior:"smooth"})})})}var k={init:()=>{p(),document.querySelector(".article-content")&&(b(),L());let t=document.querySelectorAll(".article-content div.highlight"),n="Copy",s="Copied!";t.forEach(i=>{let o=document.createElement("button");o.innerHTML=n,o.classList.add("copyCodeButton"),i.appendChild(o);let m=i.querySelector("code[data-lang]");m&&o.addEventListener("click",()=>{navigator.clipboard.writeText(m.textContent).then(()=>{o.textContent=s,setTimeout(()=>{o.textContent=n},1e3)}).catch(l=>{alert(l),console.log("Something went wrong",l)})})}),new S(document.getElementById("dark-mode-toggle"))}};window.addEventListener("load",()=>{setTimeout(function(){k.init()},0)});window.Stack=k;window.createElement=v;})(); 2/*! 3* Hugo Theme Stack 4* 5* @author: Jimmy Cai 6* @website: https://jimmycai.com 7* @link: https://github.com/CaiJimmy/hugo-theme-stack 8*/
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.