PageSourceSearch

https://shagun.xyz/js/toc.min.3ab3676e8de8ca507a2b0868d83e42f48b1e…b97de9d26bf3872dbb6b37eeb1aee7888120c270.js

js shagun.xyz collected 2026-10-02 02:11:20 UTC 2,046 bytes, 1 lines download raw bytes

1(function(){"use strict";const e=document.getElementById("toc-sidebar");if(!e)return;const a=e.querySelector("#TableOfContents");if(!a)return;const r=a.querySelectorAll("a");if(!r.length)return;const y=Array.from(r).map(e=>{const t=e.getAttribute("href");return t?t.slice(1):null}).filter(Boolean),n=y.map(e=>document.getElementById(e)).filter(Boolean);if(!n.length)return;const u=120,l=80,m=5e3;let t=null,o=!1;function s(){o&&(e.classList.remove("toc-hidden"),o=!1),i()}function h(){o||(e.classList.add("toc-hidden"),o=!0)}function i(){t&&clearTimeout(t),t=setTimeout(h,m)}function d(){const t=window.scrollY+u;let e=-1;for(let s=n.length-1;s>=0;s--){const o=n[s];if(o&&o.offsetTop<=t){e=s;break}}e===-1&&n[0]&&window.scrollY<n[0].offsetTop&&(e=0),r.forEach((t,n)=>{const s=t.closest("li");s&&(n===e?s.classList.add("active"):s.classList.remove("active"))}),f()}function f(){const t=document.documentElement.scrollHeight-window.innerHeight;if(t>0){const n=window.scrollY/t*100;e.style.setProperty("--reading-progress",`${Math.min(n,100)}%`)}}function p(e){const n=e.target.closest("a");if(!n)return;const t=n.getAttribute("href");if(!t||!t.startsWith("#"))return;e.preventDefault();const o=t.slice(1),s=document.getElementById(o);if(s){const e=s.offsetTop-l;window.scrollTo({top:e,behavior:"smooth"}),history.pushState(null,null,t)}}function g(){s(),d()}function v(){s()}function b(){t&&(clearTimeout(t),t=null),s()}function j(){i()}function c(e,t){let n;return function(...s){n||(e.apply(this,s),n=!0,setTimeout(()=>n=!1,t))}}window.addEventListener("scroll",c(g,50),{passive:!0}),document.addEventListener("mousemove",c(v,500),{passive:!0}),document.addEventListener("keydown",s,{passive:!0}),document.addEventListener("touchstart",s,{passive:!0}),e.addEventListener("mouseenter",b),e.addEventListener("mouseleave",j),a.addEventListener("click",p),d(),i(),window.location.hash&&setTimeout(()=>{const t=window.location.hash.slice(1),e=document.getElementById(t);if(e){const t=e.offsetTop-l;window.scrollTo({top:t,behavior:"smooth"})}},100)})()

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.