1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[589],{6757:(e,t,s)=>{s.r(t),s.d(t,{default:()=>i}),s(4962),s(2367);const i=class{constructor(e){this.element=e,this.toggle=e.querySelector(".content-blocks__jump-toggle"),this.list=e.querySelector(".content-blocks__jump-list"),this.toggle&&this.list&&(this.mediaQuery=window.matchMedia("(max-width: 47.99em)"),this.toggle.addEventListener("click",(()=>this.handleToggle())),this.list.querySelectorAll("a").forEach((e=>{e.addEventListener("click",(()=>{this.mediaQuery.matches&&this.collapse()}))})),this.element.addEventListener("keydown",(e=>{"Escape"===e.key&&this.isExpanded()&&(this.collapse(),this.toggle.focus())})),this.mediaQuery.addEventListener("change",(()=>this.syncToViewport())),this.syncToViewport(),this.initScrollSpy())}initScrollSpy(){if("IntersectionObserver"in window){this.linksByHash=new Map;var e=[];this.list.querySelectorAll('a[href^="#"]').forEach((t=>{var s=t.getAttribute("href"),i=document.querySelector(s);i&&(this.linksByHash.set(s,t),e.push(i))})),e.length&&(this.observer=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&this.setActive("#"+e.target.id)}))}),{rootMargin:"-96px 0px -70% 0px",threshold:0}),e.forEach((e=>this.observer.observe(e))))}}setActive(e){this.linksByHash.forEach(((t,s)=>{var i=s===e;t.classList.toggle("is-active",i),i?t.setAttribute("aria-current","true"):t.removeAttribute("aria-current")}))}isExpanded(){return"true"===this.toggle.getAttribute("aria-expanded")}handleToggle(){this.isExpanded()?this.collapse():this.expand()}expand(){this.toggle.setAttribute("aria-expanded","true"),this.list.classList.add("is-expanded")}collapse(){this.toggle.setAttribute("aria-expanded","false"),this.list.classList.remove("is-expanded")}needsToggle(){this.list.classList.remove("is-collapsible","is-expanded");var e=this.list.scrollHeight;return this.list.classList.add("is-collapsible"),e>this.list.clientHeight+1}syncToViewport(){if(!this.mediaQuery.matches)return this.list.classList.remove("is-collapsible","is-expanded"),this.toggle.hidden=!0,void this.toggle.setAttribute("aria-expanded","true");this.needsToggle()?(this.toggle.hidden=!1,this.collapse()):(this.list.classList.remove("is-collapsible"),this.toggle.hidden=!0,this.toggle.setAttribute("aria-expanded","true"))}}}}]); 2//# sourceMappingURL=76e02533a58066bc3c06.jump-menu.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.