1import{d as t,e as c,f as a,g as u}from"../chunks/chunk-FP42CUVE.js";var s,d,l,r,o,g,m,k,f=class extends HTMLElement{constructor(){super(...arguments);c(this,o);c(this,s,[]);c(this,d,null);c(this,l,0);c(this,r,null)}connectedCallback(){let n=Array.from(this.querySelectorAll(".article-toc__link"));if(n.length!==0&&(a(this,s,n.map(i=>{var v;let e=(v=i.getAttribute("href"))==null?void 0:v.slice(1),h=e?document.getElementById(e):null;return h?{id:e,el:h,link:i}:null}).filter(Boolean)),t(this,s).length!==0)){for(let{link:i}of t(this,s))i.addEventListener("click",()=>{requestAnimationFrame(()=>i.blur())});a(this,r,()=>{t(this,l)||a(this,l,requestAnimationFrame(()=>{a(this,l,0),u(this,o,m).call(this)}))}),window.addEventListener("scroll",t(this,r),{passive:!0}),window.addEventListener("resize",t(this,r),{passive:!0}),u(this,o,m).call(this)}}disconnectedCallback(){t(this,r)&&(window.removeEventListener("scroll",t(this,r)),window.removeEventListener("resize",t(this,r))),t(this,l)&&cancelAnimationFrame(t(this,l))}};s=new WeakMap,d=new WeakMap,l=new WeakMap,r=new WeakMap,o=new WeakSet,g=function(){var e;let n=document.getElementById("tt-header"),i=(e=n==null?void 0:n.offsetHeight)!=null?e:0;return Math.max(i+24,100)},m=function(){let n=u(this,o,g).call(this),i=t(this,s)[0];for(let e of t(this,s)){if(e.el.getBoundingClientRect().top<=n){
1i=e;continue}break}i.id!==t(this,d)&&(a(this,d,i.id),u(this,o,k).call(this,i))},k=function({id:n,link:i}){for(let e of t(this,s)){let h=e.id===n;if(e.link.classList.toggle("article-toc__link--active",h),h){e.link.setAttribute("aria-current","location");continue}e.link.removeAttribute("aria-current")}};customElements.define("article-toc",f); 2//# sourceMappingURL=article-toc-UEU2MEBA.js.map
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.