PageSourceSearch

https://www.lw.com/assets/scripts/9686.bundle.js?54e32d

js lw.com collected 2026-09-24 08:29:57 UTC 6,507 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9686],{28179:(t,e,i)=>{i.r(e),i.d(e,{default:()=>s});i(39393),i(96083),i(72254);const s=class{constructor(t){var e,i,s;s=t=>{t.preventDefault();let e=document.querySelector(t.target.hash),i=e.style.position,s=e.style.top,r=this.$el.offsetHeight;this.mql.matches?r=this.$el.offsetHeight:(r=this.$el.offsetHeight-10,this.closeMobileNavList()),e.style.position="relative",e.style.top="-"+r+"px",e.scrollIntoView({behavior:this.noMotion.matches?"auto":"smooth",block:"start"}),e.style.top=s,e.style.position=i},(i="clickHandler")in(e=this)?Object.defineProperty(e,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[i]=s,this.$el=t,this.$header=document.querySelectorAll(".global-header"),this.$sections=document.querySelectorAll("section[id]"),this.$activeMobileBtn=this.$el.querySelector(".sticky-navigation__active-btn"),this.$stickyNavigationList=this.$el.querySelector(".sticky-navigation__list"),this.$anchorLinksList=document.querySelector(".anchor-links__list"),this.sectionsArray=[],this.headerHeight=this.$header[0].offsetHeight,this.stickyNavHeight=this.$el.offsetHeight,this.visibleClass="visible",this.activeClass="active",this.mql=window.matchMedia("(min-width: 1200px)"),this.noMotion=window.matchMedia("(prefers-reduced-motion: reduce)"),this.$sections.forEach((t=>{var e;let i=null===(e=t.querySelector(".section-title"))||void 0===e?void 0:e.textContent;i&&this.sectionsArray.push({id:t.id,title:i})})),this.minSections=this.sectionsArray.length>=3,this.handleInit()}handleInit(){this.$el.style.display="block",this.minSections&&(this.buildLinks("anchor-links"),this.buildLinks("sticky-navigation")),this.handleSectionPrepend(),this.setStickyAriaAttribute(),this.mql.addEventListener?this.mql.addEventListener("change",(()=>{this.setStickyAriaAttribute()})):this.mql.addListener(this.setStickyAriaAttribute()),"IntersectionObserver"in window&&(this.handleSectionObserver(),this.handleAnchorObserver()),this.handleMobileActiveBtn()}buildLinks(t){this.sectionsArray.forEach((e=>{let i=document.querySelector(".".concat(t,"__list")),s=document.createElement("li"),r=document.createElement("a"),n=document.createTextNode(e.title);i&&(s.classList.add("".concat(t,"__list-item")),r.href="#".concat(e.id),r.classList.add("link"),r.dataset.text=e.title,r.addEventListener("click",this.clickHandler),r.append(n),s.append(r),i.append(s))}))}handleAnchorObserver(){let t=document.querySelector(".hero__anchor-trigger");const e={threshold:0,rootMargin:"-"+this.headerHeight+"px 0px -"+this.headerHeight+"px 0px"};new IntersectionObserver((t=>{t.forEach((t=>{!t.isIntersecting&&this.minSections?(this.$el.classList.add(this.visibleClass),t.boundingClientRect.top>this.headerHeight&&(this.$el.classList.remove(this.visibleClass),this.closeMobileNavList())):(this.$el.classList.remove(this.visibleClass),this.mql.matches||"false"!=this.$stickyNavigationList.getAttribute("aria-hidden")||this.closeMobileNavList())}))}),e).observe(t)}handleSectionObserver(){let t=this.$sections.length,e=this.$sections[t-1];this.$el.classList.remove(this.visibleClass);let i=new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting?this.setActiveStickyLink(t):t.target==e&&t.boundingClientRect.top<0&&this.$el.classList.remove(this.visibleClass)}))}),{rootMargin:"-30% 0px -70% 0px",threshold:0});this.$sections.forEach((t=>{i.observe(t)}))}setActiveStickyLink(t){let e=t.target.getAttribute("id"),i=this.$el.querySelector(".link.active");if(null!=i){i.classList.remove("active");let t=i.getAttribute("href").substring(1),e=document.getElementById(t);e&&(e.style.marginTop="")}let s=this.$el.querySelector('a[href="#'.concat(e,'"]'));if(t.target.style.marginTop="6rem",null!==s){let t=s.textContent;s.classList.add("active"),this.$activeMobileBtn.querySelector(".current").innerHTML=t,this.mql.matches?this.$stickyNavigationList.setAttribute("aria-hidden","false"):this.$activeMobileBtn.querySelector(".current").innerHTML=t}}openMobileNavList(){this.$activeMobileBtn.setAttribute("aria-pressed","true"),this.$stickyNavigationList.setAttribute("aria-hidden","false")}closeMobileNavList(){this.$activeMobileBtn.setAttribute("aria-pressed","fal
1se"),this.$stickyNavigationList.setAttribute("aria-hidden","true")}handleMobileActiveBtn(){this.$activeMobileBtn.addEventListener("click",(t=>{"true"!==t.target.getAttribute("aria-pressed")?this.openMobileNavList():this.closeMobileNavList()}))}handleSectionPrepend(){this.$sections.forEach((t=>{const e=document.createElement("div");e.classList.add("sticky-navigation__section-trigger"),t.style.position="relative",t.insertBefore(e,t.childNodes[0])}))}setStickyAriaAttribute(){this.mql.matches?(this.$el.classList.remove(this.visibleClass),this.$stickyNavigationList.setAttribute("aria-hidden","false")):(this.$el.classList.remove(this.visibleClass),this.$stickyNavigationList.setAttribute("aria-hidden","true"))}}},87739:(t,e,i)=>{var s=i(22086),r=i(59413),n=i(45089),o=i(56112),a=i(10563),c=i(2964),l=s.TypeError,h=function(t){var e=0==t,i=1==t,s=2==t,h=3==t;return function(t,d,u){o(t);var v=a("Promise"),b=n(t.next),f=0,y=void 0!==d;return!y&&e||n(d),new v((function(n,a){var g=function(e,i){try{var s=c(t,"return");if(s)return v.resolve(r(s,t)).then((function(){e(i)}),(function(t){a(t)}))}catch(t){return a(t)}e(i)},m=function(t){g(a,t)},p=function(){try{if(e&&f>9007199254740991&&y)throw l("The allowed number of iterations has been exceeded");v.resolve(o(r(b,t))).then((function(t){try{if(o(t).done)e?(u.length=f,n(u)):n(!h&&(s||void 0));else{var r=t.value;y?v.resolve(e?d(r,f):d(r)).then((function(t){i?p():s?t?p():g(n,!1):e?(u[f++]=t,p()):t?g(n,h||r):p()}),m):(u[f++]=r,p())}}catch(t){m(t)}}),m)}catch(t){m(t)}};p()}))}};t.exports={toArray:h(0),forEach:h(1),every:h(2),some:h(3),find:h(4)}},39393:(t,e,i)=>{var s=i(51695),r=i(87739).forEach;s({target:"AsyncIterator",proto:!0,real:!0,forced:!0},{forEach:function(t){return r(this,t)}})},96083:(t,e,i)=>{var s=i(51695),r=i(22086),n=i(51855),o=i(90930),a=i(72585),c=i(63677),l=i(49606),h=i(50211),d=i(13083).IteratorPrototype,u=i(43296),v=h("toStringTag"),b=r.Iterator,f=u||!o(b)||b.prototype!==d||!c((function(){b({})})),y=function(){n(this,d)};l(d,v)||a(d,v,"Iterator"),!f&&l(d,"constructor")&&d.constructor!==Object||a(d,"constructor",y),y.prototype=d,s({global:!0,forced:f},{Iterator:y})},72254:(t,e,i)=>{var s=i(51695),r=i(94722),n=i(56112);s({target:"Iterator",proto:!0,real:!0,forced:!0},{forEach:function(t){r(n(this),t,{IS_ITERATOR:!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.