1'use strict';const carRangeHeroComponent=(e,r)=>{const {ANALYTICS:f}=CommonUtils.analytics,n={component:r,container:r+"__slider-wrapper",items:r+"__slider-container",item:r+"__car",left:"mod__left",center:"mod__center",show:"mod__show"};let g=[],h,u,l=!1,p,v;const k=[...e.getElementsByClassName(n.item)],y=()=>{h=k.length;if(2>h)e.children[1]?.remove();else{var a=CommonUtils.viewports,b=a.isXS()&&2<h,c=a.isS()&&2<h,d=a.isM()&&4<h,q=a.isL()&&5<h,m=a.isXL()&&6<h,t=a.isXXL()&&8<h;u=a.getViewport().label; 2if(b||c||d||q||m||t)a={...SwiperCustom.navigationObj(),spaceBetween:["S","M","L"].includes(u)?16:["XL","XXL"].includes(u)?20:8,pagination:!1},SwiperCustom.changeMultiClassSwiper(e,"add",n),g=SwiperCustom.addSwiper(e,g,a)}},D=a=>{const b=new MutationObserver(()=>{p=e.querySelectorAll(".cmp-video-spinner");p.length&&(b.disconnect(),clearTimeout(c),a())});b.observe(e,{childList:!0,subtree:!0});const c=setTimeout(()=>b.disconnect(),2E3)},A=()=>{v=e.querySelector(`.${n.items}`).getBoundingClientRect().width; 3const a=CommonUtils.viewports.isXXL().min;E(window.innerWidth>a?a:window.innerWidth);requestAnimationFrame(()=>{z()})},E=a=>{const b=e.querySelector(`.${n.container}`),c=CommonUtils.viewports.getViewport().label;["XS","S","M","L"].includes(c)?b.classList.toggle(n.center,v<a):b.classList.toggle(n.left,v>a);b.classList.add(n.show)},z=()=>{p=e.querySelectorAll(".cmp-video-spinner");const a=e.getBoundingClientRect().width;if(p.length){var b=CommonUtils.viewports.getViewport().label,c=(a-v)/2,d=p[0].getBoundingClientRect().width, 4q=parseFloat(getComputedStyle(p[0]).right),m={M:52,L:39,XL:47,XXL:55};p.forEach(t=>{t.style.bottom="";!["XS","S"].includes(b)&&c>d+2*q&&(t.style.bottom=`${m[b]}px`)})}},B=()=>{let a=1,b;l=!1;0<k.length&&(b=setInterval(()=>{l=!0;k[a].click();g&&g.length&&g[0].slideTo(a);a++;a>=k.length&&(a=0);setTimeout(()=>{l=!1},0)},6E3));const c=()=>{l||(clearInterval(b),document.removeEventListener("click",c))};document.addEventListener("click",c)},C=a=>{const b={};if(a){const {carCode:c,carName:d}=CommonUtils.analytics.ANALYTICS; 5b[d]=a.dataset.modelName;b[c]=a.dataset.modelCode}return b},F=a=>{a.forEach(b=>{b?.classList.remove(CommonUtils.dom.CSS_CLASS.active)})};window.addEventListener("resize",()=>{2>h||CommonUtils.viewports.getViewport().label===u||(g=SwiperCustom.destroy(g),y(),l&&B());A()});y();A();(()=>{k[0]?.classList.add(CommonUtils.dom.CSS_CLASS.active);e.querySelectorAll(".cmp-car-range-hero-item").forEach((a,b)=>{a.classList[0===b?"add":"remove"](CommonUtils.dom.CSS_CLASS.active)})})();(()=>{const a=e.querySelectorAll(`.${CommonUtils.dom.CSS_CLASS.button.js}`), 6b=e.querySelectorAll(".cmp-car-range-hero-item");a.forEach(c=>{c.addEventListener("click",()=>{if("undefined"!==typeof buttonComponentGlobalUtils){var d=e.querySelector(`.${"cmp-car-range-hero-item"}.${CommonUtils.dom.CSS_CLASS.active}`),{carCode:q,carName:m}=C(d),t=f.elementName;var w=e.querySelector(`.${"cmp-car-range-hero-item"}.${CommonUtils.dom.CSS_CLASS.active}`);w=[w.querySelector(".cmp-car-range-hero-item__small-title")?.textContent?.trim(),w.querySelector(".cmp-car-range-hero-item__title")?.textContent?.trim()].filter(Boolean).join(" "); 7var G=f.carName,H=f.carCode,I=f.generic;{const x={};if(d){const {fullPayment:J,paymentFrequencyAmount:K}=CommonUtils.analytics.ANALYTICS;d.dataset.totalPrice&&(x[J]=d.dataset.totalPrice);d.dataset.monthlyPrice&&(x[K]=d.dataset.monthlyPrice)}d=x}buttonComponentGlobalUtils.sendAnalytics(e,c,{[t]:w,[G]:m,[H]:q,[I]:"medium left",...d},c.firstElementChild?.href)}})});k.forEach(c=>{c.addEventListener("click",()=>{F(k);c?.classList.add(CommonUtils.dom.CSS_CLASS.active);b.forEach(d=>{d.classList.remove(CommonUtils.dom.CSS_CLASS.active); 8if(d.id===c.id&&(d.classList.add(CommonUtils.dom.CSS_CLASS.active),!l)){{const {carCode:q,carName:m}=C(d);CommonUtils.analytics.callAnalytics({[f.callName]:f.interaction,[f.eventName]:f.EventNames.clickCTA,[f.carName]:m,[f.carCode]:q,[f.ctaLabel]:m,[f.ctaType]:f.CtaTypes.image,[f.moduleComponent]:e?.classList[0]})}}});D(()=>{z()})})})})();(()=>{const a=CommonUtils.url.getUrlParameter("model")?.toLowerCase();if(a){var b=-1;
8Array.from(k).forEach((c,d)=>{c=c.id?.toLowerCase();c===a?b=d:a.includes("leon")&& 9c.includes("le")&&(c=c.includes("s"),a.includes("s")?c&&(b=d):c||(b=d))});-1!==b&&(k[b].click(),g&&g.length&&g[0].slideTo(b),l=!1)}})();l&&B()};CommonUtils.dom.domReady(e=>{CommonUtils.aem.isAuthorEdit()||(e=e.getElementsByClassName("cmp-car-range-hero"),Array.prototype.forEach.call(e,r=>carRangeHeroComponent(r,"cmp-car-range-hero")))});
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.