PageSourceSearch

https://www.nationalcar.com/etc/designs/nweb/assets/20260923183819/js/collection.js

js nationalcar.com collected 2026-10-01 11:59:33 UTC 4,008 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunknational_aem=self.webpackChunknational_aem||[]).push([[8137],{51578:function(t,e,n){n.r(e);var a,o,c,i,r=n(12127),s=n(55618),d="collection--init",l="chapter",u="chapter--init",p="collection__pager-item",f="collection__pager-item--active",m=[],h=!1,v=!1;function w(t){o.forEach(function(e,n){var a,o=e.querySelector(".chapter-data-attrs");if(null!==o){switch(t){case s.j$.XLARGE:a=o.querySelector(".data-xlarge-src").dataset.url;break;case s.j$.LARGE:a=o.querySelector(".data-large-src").dataset.url;break;case s.j$.MEDIUM:a=o.querySelector(".data-medium-src").dataset.url;break;default:a=0===n?o.querySelector(".data-small-src").dataset.url:""}e.setAttribute("data-src","url(".concat(a,")")),(0,r.N7)(e)}})}function L(t){return"mousewheel"===t.type&&(0,r.aX)()&&(v=!0),"scroll"===t.type&&v?(t.preventDefault(),!1):(window.clearTimeout(i),h?(t.preventDefault(),!1):((0,r.aX)(8)&&b(),void(i=window.setTimeout(b,200))))}function E(t){var e=t.which;40!==e&&38!==e||b(y(100,40===e))}function b(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y();window.clearTimeout(i),t>=0?(h=!0,(0,r.X5)(m[t].top,{callback:function(){window.setTimeout(function(){h=!1,v=!1},300)},duration:1e3})):t=m.length-1,function(t){var e=a.querySelector(".".concat(l,'[data-chapter-index="').concat(t,'"]')),n=a.querySelector(".".concat(u,':not([data-chapter-index="').concat(t,'"])')),o=a.querySelector(".".concat(p,'[data-chapter-index="').concat(t,'"]')),c=a.querySelector(".".concat(f,':not([data-chapter-index="').concat(t,'"])'));o.classList.contains(f)||(o.classList.add(f),e.classList.contains("zl-section--bgcolor-medium")?a.dataset.bgcolor=s.vA.MEDIUM:a.dataset.bgcolor=s.vA.LIGHT,e.classList.contains(u)||e.classList.add(u),(c||n)&&(n.classList.remove(u),c.classList.remove(f)),a.dataset.chapterIndex=t)}(t)}function g(){window.clearTimeout(c),c=window.setTimeout(k,200)}function k(){m=[],o.forEach(function(t){m.push({top:t.offsetTop,bottom:t.offsetTop+t.offsetHeight})})}function y(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,r.TT)(),n=(0,r.cx)(),a=function(t,e){var n=window.innerHeight/t;return e&&(n*=t-1),n}(t,e),o=0;return m.forEach(function(t,e){(function(t,e,n){return e>t.top-n&&e<t.bottom-n})(t,n,a)&&(o=e)}),function(t,e,n){return 0===t&&e>m[0].bottom-n}(o,n,a)&&(o=-1),o}function _(){this.classList.contains(f)||b(this.dataset.chapterIndex)}e.default={init:function(t,e){var n=t.getState().toJS();a=e,o=Array.from(a.getElementsByClassName(l)),function(t){var e;(e=document.createElement("div")).classList.add("collection__pager"),o.forEach(function(t){var n=document.createElement("div"),a=document.createElement("span");a.textContent=t.dataset.chapterTitle,a.classList.add("collection__pager-item-text"),n.dataset.chapterIndex=t.dataset.chapterIndex,n.classList.add(p),n.appendChild(a),n.addEventListener("click",_),e.appendChild(n),m.push({top:t.offsetTop,bottom:t.offsetTop+t.offsetHeight})}),a.appendChild(e),function(){var t=document.createElement("button"),e=document.createElement("span");t.classList.add("collection__footer"),e.classList.add("collection__footer-text"),e.textContent=(0,r.ag)("common_learn_more"),t.addEventListener("click",b.bind(this,1)),t.appendChild(e),a.appendChild(t)}(),w(t.breakpoint),window.addEventListener("resize",g),t.breakpoint!==s.j$.SMALL&&(a.classList.add(d),b(),window.addEventListener("mousewheel",L),window.addEventListener("scroll",L),window.addEventListener("keyup",E))}(n),r.Et.observeStore(t,function(t){return t.get("breakpoint")},function(t){return function(t){var e=t.breakpoint===s.j$.SMALL,n=a.classList.contains(d);w(t.breakpoint),e||n?e&&n&&(a.classList.remove(d),window.removeEventListener("mousewheel",L),window.removeEventListener("scroll",L),window.removeEventListener("keyup",E)):(a.classList.add(d),b(),window.addEventListener("mousewheel",L),window.addEventListener("scroll",L),window.addEventListener("keyup",E))}(t)})}}}}]);

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.