PageSourceSearch

https://www.nlc.org/wp-content/themes/nlc/dist/block-editor/blocks/scr-hero/script.min.js?ver=1790694695

js nlc.org collected 2026-10-01 07:32:16 UTC 4,548 bytes, 2 lines download raw bytes

1this.NLC=this.NLC||{},this.NLC.Blocks=this.NLC.Blocks||{},this.NLC.Blocks.ScrHero=this.NLC.Blocks.ScrHero||{},this.NLC.Blocks.ScrHero.Script=function(){"use strict";function t(t,s){void 0===s&&(s=50);var e=null;function i(){for(var i=[],a=arguments.length;a--;)i[a]=arguments[a];e||(e=setTimeout((function(){t.apply(void 0,i),e=null}),s))}return i.cancel=function(){clearTimeout(e),e=null},i}var s=function(s){var e=this;this.node=s,this.index=-1,this.throttle=20,this.classNames={item:"scr-hero__item",currentItem:"scr-hero__item--current",stickyItem:"scr-hero__item--sticky",content:"scr-hero__content",bars:"scr-hero__bars",stickyBars:"scr-hero__bars--sticky",indicator:"scr-hero__indicator",indicatorSticky:"scr-hero__indicator--sticky",indicatorUp:"scr-hero__indicator--up",indicatorDown:"scr-hero__indicator--down",bar:"scr-hero__bar",currentBar:"scr-hero__bar--current",cutsTheMustard:"scr-hero--ctm",loaded:"scr-hero--loaded"},this.bars=document.createElement("div"),this.bars.className=this.classNames.bars,this.node.appendChild(this.bars),this.indicator=this.node.querySelector("."+this.classNames.indicator),this.items=Array.from(this.node.querySelectorAll("."+this.classNames.item)).map((function(t){var s=document.createElement("div");return s.className=e.classNames.bar+" has-"+(t.dataset.color||"purple")+"-background-color",e.bars.appendChild(s),{node:t,bar:s,content:t.querySelector("."+e.classNames.content)}})),this.cutsTheMustard()&&this.node.classList.add(this.classNames.cutsTheMustard),this.calculate(),window.addEventListener("scroll",t(this.calculate.bind(this),this.throttle)),window.addEventListener("resize",t(this.handleResize.bind(this),this.throttle));var i=function(t){return e.lastEventType=t.type};document.addEventListener("click",i),document.addEventListener("keydown",i);document.addEventListener("focus",(function(t){if(document.activeElement!==document.body&&e.lastEventType&&e.lastEventType.match(/^key/)){var s=document.activeElement.closest("."+e.classNames.item);if(s){var i=s.getBoundingClientRect(),a=window.scrollX||window.pageXOffset,c=window.scrollY||window.pageYOffset;window.scrollTo(a,c+i.top)}}}),!0),window.matchMedia("screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none)").matches&&document.body.addEventListener("mousewheel",(function(t){t.preventDefault(),window.scrollTo(window.pageXOffset,window.pageYOffset-t.wheelDelta)})),this.node.classList.add(this.classNames.loaded)};return s.prototype.cutsTheMustard=function(){return!(window.innerHeight<800)&&(window.matchMedia("screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none)").matches,!0)},s.prototype.handleResize=function(){this.cutsTheMustard()?this.node.classList.add(this.classNames.cutsTheMustard):this.node.classList.remove(this.classNames.cutsTheMustard)},s.prototype.calculate=function(){var t=document.documentElement.clientHeight/2,s=this.items.map((function(t){var s=t.node.getBoundingClientRect();return s.top+s.height/2})),e=s.reduce((function(s,e){return Math.abs(e-t)<Math.abs(s-t)?e:s})),i=s.indexOf(e);if(this.goTo(i),i===this.items.length-1){var a=this.node.getBoundingClientRect(),c=this.items[i].node.getBoundingClientRect();this.indicator.classList.add(this.classNames.indicatorUp),this.indicator.classList.remove(this.classNames.indicatorDown),a.bottom<document.documentElement.clientHeight?(this.bars.classList.add(this.classNames.stickyBars),this.indicator.classList.add(this.classNames.indicatorSticky)):(this.bars.classList.remove(this.classNames.stickyBars),this.indicator.classList.remove(this.classNames.indicatorSticky)),t>c.top+c.height/2?this.items[this.index].node.classList.add(this.classNames.stickyItem):this.items[this.index].node.classList.remove(this.classNames.stickyItem)}else 0===i?(this.indicator.classList.remove(this.classNames.indicatorUp),this.indicator.classList.add(this.classNames.indicatorDown)):(this.indicator.classList.remove(this.classNames.indicatorUp),this.indicator.classList.remove(this.classNames.indicatorDown))},s.prototype.goTo=function(t){t!==this.index&&(this.items[this.index]&&(this.items[this.index].node.classList.remove(this.classNames.currentItem),this.items[this.index].bar.classList.remove(this.classNames.currentBar)),this.index=t,this.items[this.index].node.classList.add(this.classNames.currentItem),this.items[this.index].bar.classList.add(this.classNames.currentBar))},s.instances=Array.from(document.querySelectorAll(".scr-hero")).map((function(t){return new s(t)})),s}();
2//# sourceMappingURL=script.min.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.