1class HeaderSticky{constructor(a,b={}){this.options=Object.assign(this,{elContainer:".js-header-sticky",classSticky:"is-header-sticky",classMinimal:"is-minimal",scrollDebounceTime:500,mobile:!0},b),this.headerSticky=document.querySelector(a);this.headerSticky&&!1!==this._isInAllowedViewports()&&this._init()}_init(){this.scrollY=0>this.headerSticky.getBoundingClientRect().top?0:this.headerSticky.getBoundingClientRect().top,this.scrollYB=this.headerSticky.getBoundingClientRect().bottom,this._assignOnScrollEvents(),this._registerEvents(),window.addEventListener("resize",this._resize.bind(this)),this.isDestroy=!1,HeaderSticky.createStyle(this.headerSticky)}_registerEvents(){document.addEventListener("scroll",this._onMinimalScroll,!1),document.addEventListener("scroll",this._onStickyScroll,!1)}_assignOnScrollEvents(){this._onMinimalScroll=HeaderSticky.debounce(this._onMinimal.bind(this),this.options.scrollDebounceTime),this._onStickyScroll=this._onSticky.bind(this)}_onSticky(){let a=this.options.classSticky,b=this.options.classMinimal,c=this.headerSticky.getBoundingClientRect().top;window.scrollY>Math.abs(this.scrollY)||0>=c?!this.headerSticky.classList.contains(a)&&this.headerSticky.classList.add(a):(this.headerSticky.classList.remove(a),this.headerSticky.classList.remove(b)),0===window.scrollY&&0===Math.abs(this.scrollY)&&0===c&&(this.headerSticky.classList.remove(a),this.headerSticky.classList.remove(b))}_onMinimal(){let a=this.options.classMinimal;window.scrollY>this.scrollYB&&!this.headerSticky.classList.contains(a)&&this.headerSticky.classList.add(a)}_resize(){!1===this.isDestroy&&!1===this._isInAllowedViewports()&&this._destroy(),!0===this.isDestroy&&!0===this._isInAllowedViewports()&&(this._registerEvents(),this.isDestroy=!1)}_destroy(){document.removeEventListener("scroll",this._onMinimalScroll,!1),document.removeEventListener("scroll",this._onStickyScroll),this.headerSticky.classList.remove(this.options.classSticky),this.headerSticky.classList.remove(this.options.classMinimal),this.isDestroy=!0}_isInAllowedViewports(){return!!this.options.mobile||Viewport.isXL()||Viewport.isLG()}static debounce(a,b,c=!1){let d;return(...e)=>{c&&!d&&setTimeout(a.bind(a,...e),0),clearTimeout(d),d=setTimeout(a.bind(a,...e),b)}}static createStyle(a){const b=`* { scroll-margin-top: ${a.offsetHeight}px; }`,c=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");c.appendChild(d),d.type="text/css",d.styleSheet?d.styleSheet.cssText=b:d.appendChild(document.createTextNode(b))}}class Viewport{static isXS(){return"XS"===Viewport.getCurrentViewport()}static isSM(){return"SM"===Viewport.getCurrentViewport()}static isMD(){return"MD"===Viewport.getCurrentViewport()}static isLG(){return"LG"===Viewport.getCurrentViewport()}static isXL(){return"XL"===Viewport.getCurrentViewport()}static getCurrentViewport(){const a=window.getComputedStyle(document.documentElement,":before").content;return a.replace(/['"]+/g,"").toUpperCase()}}
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.