1"use strict";(self.webpackChunkaem_maven_archetype=self.webpackChunkaem_maven_archetype||[]).push([["components-extendedOverlay-extendedOverlay-js","components-htmlinjection-js-injectionHandler-js","components-mapcomponent-js-filter-js","components-modal-Modal-js","components-popup-modal-popup-modal-js","components-vehiclecomparerulesengine-js-api-js","components-video-video-js"],{11122:function(e,t,o){o.r(t),o.d(t,{default:function(){return d}});var n=o(99686),i=o(44746);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function r(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}var s="hide",d=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.el=t,this.duration=this.el.dataset.duration,this.videoTitle=this.el.dataset.videoTitle,this.closeLabel=this.el.dataset.closeLabel,this.uiSelectors={modalVideo:this.el.querySelector(".cmp-extended-overlay-video"),playOverlay:this.el.querySelector(".icon-play-v2")},this.init()},(t=[{key:"init",value:function(){var e=this;document.querySelectorAll(".video.video--extended-overlay").forEach(function(t){t.addEventListener("timeupdate",function(){var o;t.currentTime>=e.duration&&(t.pause(),e.el.classList.remove(s),null===(o=e.el.closest(".cmp-hero-carousel").querySelector(".cmp-carousel__controls"))||void 0===o||o.classList.add(s))})}),this.uiSelectors.playOverlay.addEventListener("click",function(t){t.preventDefault(),t.stopImmediatePropagation(),e._creatExtendedVideoModal()})}},{key:"_creatExtendedVideoModal",value:function(){this.modal=new n.default(this.el,{modalModifier:["ExtendedVideo"],headerTitle:this.videoTitle,fullScreenMode:!0,closeLabel:this.closeLabel}),this.modal.open(this.uiSelectors.modalVideo),this.el.addEventListener("Modal:opened",function(){new i.default(document.querySelector(".Modal--ExtendedVideo .cmp-extended-overlay-video .cmp-video")),document.querySelector(".mejs-container").setAttribute("aria-hidden","true"),document.querySelector(".Modal__background").setAttribute("aria-hidden","true"),document.querySelector(".Modal--ExtendedVideo .cmp-extended-overlay-video .cmp-video .mejs-time-rail").setAttribute("tabindex","0"),document.querySelector(".Modal--ExtendedVideo .cmp-extended-overlay-video .cmp-video .mejs-time-rail").setAttribute("aria-label","time rail"),document.querySelector(".Modal--ExtendedVideo .cmp-extended-overlay-video .cmp-video video").play()})}}])&&r(e.prototype,t),o&&r(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,o}()},99686:function(e,t,o){o.r(t),o.d(t,{default:function(){return c}});var n=o(71202),i=o(69805);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function r(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?l(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function s(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function d(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}var c=function(){function e(t,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._defaults={className:"Modal",selector:".Modal",speed:350,modalModifier:null,closeLabel:null,enableClose:!0,fullScreenMode:!1,headerTitle:null,isCompact:!1,footer:!0},this.element=t,this._modal=null,this._modalContent=null,this.fullScreenClass="Modal--full-screen",this.options=Object.assign({},this._defaults,o)}return t=e,a=[{key:"toggleContent",value:function(e){[document.querySelector(".pageWrapper"),document.querySelector(".Fullscreen"),document.querySelector(".sharedNavigation"),document.querySelector("body > #jaguar")||document.querySelector("body > #landrover"),document.querySelector("main"),document.querySelector(".footercontainer")].filter(function(e){return e instanceof HTMLElement}
1).forEach(function(t){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")})}}],(o=[{key:"_attachModal",value:function(){var e=this,t=document.createElement("section"),o=this.options,n=o.className,i=o.modalModifier,a=o.closeLabel,l=o.enableClose,s=o.fullScreenMode,d=o.headerTitle,c=o.isCompact,u=l?'<button data-modal-close class="'.concat(n,'__close"></button>'):"",m=d?'<h2 class="Modal__header-title headline headline--s">'.concat(d,"</h2>"):"",v='\n <div class="'.concat(n,'__content-wrapper">\n <div class="').concat(n,'__header">\n ').concat(m,"\n ").concat(u,'\n </div>\n <div data-modal-content class="').concat(n,'__content" tabindex="0"></div>\n <div data-modal-footer class="').concat(n,'__footer"></div>\n <div data-modal-tab-target class="').concat(n,'__tab-target" tabindex="0"></div>\n </div>\n ');t.setAttribute("data-modal",""),t.setAttribute("role","dialog"),t.setAttribute("tabIndex","-1"),t.classList.add(n),s&&t.classList.add(this.fullScreenClass),null!==i&&(Array.isArray(i)||(this.options.modalModifier=i.split()),this.options.modalModifier.forEach(function(e){return t.classList.add("".concat(n,"--").concat(e))})),t.innerHTML=v,(document.querySelector(".mfp-content")||document.body).appendChild(t),this._modal=t;var f=t.querySelectorAll("[data-modal-content]")[0];this._modalContent=f;var y=t.querySelectorAll("[data-modal-footer]")[0];this._modalFooter=y,this._modal.classList.toggle("".concat(n,"--hide-footer"),!this.options.footer);var p=document.createElement("div");p.classList.add("".concat(n,"__background")),p.setAttribute("data-modal-close",""),t.appendChild(p),l&&r(this._modal.querySelectorAll("[data-modal-close]")).forEach(function(t){var o=t.classList.contains("".concat(n,"__background"));null===a||o||t.setAttribute("aria-label",a),t.addEventListener("click",function(t){t.preventDefault(),e._close()})}),c&&this._setupCompactMode(t)}},{key:"_detachModal",value:function(){var e=document.querySelectorAll(this.options.selector)[0];if(null!=e){var t=document.querySelector(".mfp-content")||document.body,o=t.childNodes;o&&o.length>0&&o.forEach(function(o){o.isEqualNode(e)&&t.removeChild(e)})}}},{key:"_keyboardControls",value:function(){var e=this;this._modal.focus(),this.options.enableClose&&this._modal.addEventListener("keydown",function(t){e._closeOnEsc(t)});var t=this._modal.querySelector("[data-modal-close]");t.addEventListener("keydown",function(e){e.keyCode===i.D.TAB&&e.shiftKey&&e.preventDefault()}),this._modal.querySelector("[data-modal-tab-target]").addEventListener("focus",function(){return t.focus()})}},{key:"_closeOnEsc",value:function(e){e.keyCode===i.D.ESC&&(e.preventDefault(),this._close())}},{key:"_open",value:function(t){var o=this;e.toggleContent(!0),this._attachModal(),this._modalContent.innerHTML="",this._modalContent.appendChild(t.cloneNode(!0)),this._modal.style.display="block",this.element.setAttribute("data-modal-return","true");var i=function(){if(Math.ceil(o._modalContent.scrollTop)===o._modalContent.scrollHeight-o._modalContent.offsetHeight){if(o.options.isCompact)return void o._modalContent.toggleAttribute("data-scroll-end",!0);o._modalFooter.style.opacity=0,requestAnimationFrame(function(){setTimeout(function(){o._modalFooter.style.display="none",o.isHidden=!0},10)})}else if(Math.ceil(o._modalContent.scrollTop)!==o._modalContent.scrollHeight-o._modalContent.offsetHeight){if(o.options.isCompact)return void o._modalContent.toggleAttribute("data-scroll-end",!1);if(!o.isHidden)return;o.isHidden=!1,o._modalFooter.style.display="block",requestAnimationFrame(function(){setTimeout(function(){o._modalFooter.style.opacity=1},10)})}};requestAnimationFrame(function(){var e;if(o._modal.style.opacity=1,(0,n.Vb)(o._modalContent)?o._modalContent.addEventListener("scroll",i):o.options.isCompact?o._modalContent.toggleAttribute("data-scroll-end",!0):o._modalFooter.style.display="none",o.options.fullScreenMode){document.documentElement.classList.add("modal-fullscreen");var t=document.querySelector(".Page__wrapper, #jaguar, #landrover");t&&(t.style.visibility="hidden")}o._modal.classList.toggle("".concat(o.options.className,"--hide-footer"),!o.options.footer||o.options.isCompact&&0===(null===(e=o._modalFooter)||void 0===e?void 0:e.children.length)),setTimeout(function(){o._keyboardControls(),o._eventTrigger("".concat(o.options.className,":opened"))},o.options.speed)})}},{key:"_close",value:function(){var t=this;e.toggleContent(!1),requestAnimationFrame(function(){if(t._modal.style.opacity=0,t.options.fullScreenMode){var e=document.querySelector(".Page__wrapper, #jaguar, #landrover");e&&(e.style.visibility="visible"),document.documentElement.classList.remove("modal-fullscreen")}setTimeout(function(){t._modal.style.display="none",t._eventTrigger("".concat(t.options.className,":closed")),t._detachModal(),t.element.focus();var e=document.querySelectorAll("[data-modal-return]")[0];e.focus(),e.removeAttribute("data-modal-return")},t.options.speed)})}},{key:"_eventTrigger",value:function(e){var t=new CustomEvent(e);this.element.dispatchEvent(t)}},{key:"_setupCompactMode",value:function(e){e.classList.add("Modal--compact")}},{key:"open",value:function(e){this._open(e)}},{key:"close",value:function(){this._close()}},{key:"resetKeyboardControls",value:function(){this._keyboardControls()}},{key:"modal",value:function(){return this._modal}}])&&s(t.prototype,o),a&&s(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,o,a}()},44746:function(e,t,o){o.r(t),o.d(t,{LOAD_TRIGGERED_EVENT:function(){return c},RESET_EVENT:function(){return d},default:function(){return m}});var n=o(26587);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,r(n.key),n)}}function r(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:t+""}var l="cmp-video--playing",s="cmp-video__poster",d="reset",c="load-triggered",u=function(e){return e.searchParams.set("enablejsapi","1"),e.searchParams.set("autoplay","1"),e.searchParams.set("background","1"),e.searchParams.set("color","white"),e.searchParams.set("rel","0"),e},m=function(){return e=function e(t,o,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t._videoInstance)return t._videoInstance;this.el=t,this.video=this.el.querySelector("video"),this.onPauseVideo=o,this.onPlayVideo=n,t._videoInstance=this,this.init()},(t=[{key:"init",value:function(){this.video?this.setupCustomPlayer():this.setupYoutubePlayer()}},{key:"setupYoutubePlayer",value:function(){var e,t,o=this,i=null,a=null,r=$(this.el).find("img").attr("src"),l=$(this.el).find(".cmp-video__youtube-poster"),s=function(e){dataLayer&&a&&dataLayer.push({event:"view_video",event_action:e,event_category:"video",event_label:i.videoTitle,interaction_hit:"yes",click_text:"",video_type:"youtube",video_title:i.videoTitle,video_url:i.getVideoUrl(),video_duration:(0,n.A)(a),video_playtime:(0,n.A)(i.getCurrentTime())})};l.attr("tabindex","0"),l.attr("role","button");for(var d=l.contents(),c=d.length,m=null,v=0;v<c;v+=1)8===d[v].nodeType&&(m=d[v].textContent);var f=$(m);if(t=null===(e=$(m))||void 0===e||null===(e=e[0])||void 0===e?void 0:e.src,(void 0===r||""===r)&&m&&t){f[0].allow="autoplay";var y=new URL(f[0].src);f[0].src=u(y).toString(),l.addClass("player").html(f),l.off("click")}l.on("click",function(){for(var e=$(this),n=e.contents(),r=n.length,l=null,d=0;d<r;d+=1)8===n[d].nodeType&&(l=n[d].textContent);if(l&&t){var c=$(l);c[0].allow="autoplay";var m=new URL(c[0].src);c[0].src=u(m).toString(),e.addClass("player").html(c),e.off("click");var v=e.find("iframe")[0];if(!v)return;YT.ready(function(){i=new YT.Player(v,{events:{onReady:function(e){a=Math.round(1e3*e.target.getDuration())/1e3},onStateChange:function(e){e.data===YT.PlayerState.PLAYING&&(s("video_play"),o.onPlayVideo&&o.onPlayVideo()),e.data===YT.PlayerState.PAUSED&&(s("video_pause"),o.onPauseVideo&&o.onPauseVideo())},onError:function(e){console.error(e)}}})})}}
1),l.on("keydown",function(e){" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),l.trigger("click"))})}},{key:"setupCustomPlayer",value:function(){var e=["playpause","progress","current","duration","tracks","fullscreen","a11y"];!(!this.el.dataset||!this.el.dataset.audioControls)&&JSON.parse(this.el.dataset.audioControls)&&e.splice(1,0,"volume"),new window.mejs.MediaElementPlayer(this.video,{stretching:"fill",poster:null,iPadUseNativeControls:!0,iPhoneUseNativeControls:!0,AndroidUseNativeControls:!0,clickToPlayPause:!0,features:e,enableKeyboard:!0}),this.setupListeners(),this.el.querySelector(".".concat(s))||this.setupPosterImage()}},{key:"setupPosterImage",value:function(){var e=this,t=this.el.dataset&&this.el.dataset.posterImgAltText?this.el.dataset.posterImgAltText:"",o=this.video.poster?this.video.poster:this.el.dataset.posterImg,n='<div class="'.concat(s,'" tabindex="0" role="button" aria-label="Play Video"><img width="100%" height="100%" src="').concat(o,'"\n alt="').concat(t,'"></div>'),i=document.createElement("template");i.innerHTML=n;var a=i.content;this.el.appendChild(a);var r=function(){if(e.video.readyState>=2)e.video.play(),e.video.muted=!1;else{var t=function(){e.video.play(),e.video.muted=!1,e.video.removeEventListener("canplay",t)};e.video.addEventListener("canplay",t),e.video.player?e.video.player.load():e.video.load(),e.video.dispatchEvent(new CustomEvent(c))}};this.el.querySelector(".".concat(s)).addEventListener("click",r),this.el.querySelector(".".concat(s)).addEventListener("keydown",function(e){" "!==e.key&&"Enter"!==e.key||(r(),e.preventDefault())})}},{key:"setupListeners",value:function(){var e=this,t=function(t){dataLayer&&dataLayer.push({event:"view_video",event_action:t,event_category:"video",event_label:e.video.src,interaction_hit:"yes",click_text:"",video_type:"embedded",video_title:e.video.src,video_duration:(0,n.A)(e.video.duration),video_playtime:e.video.currentTime?(0,n.A)(e.video.currentTime):""})};this.video.addEventListener("emptied",function(){e.showPosterImage()}),this.video.addEventListener("ended",function(){e.showPosterImage()}),this.video.addEventListener("play",function(){e.hidePosterImage(),t("video_play")}),this.video.addEventListener("pause",function(){t("video_pause")}),this.video.addEventListener(d,function(){e.showPosterImage(),e.video.pause(),e.video.setCurrentTime(0)}),this.video.addEventListener("timeupdate",function(){var t=e.el.querySelector("video").closest(".cmp-carousel"),o=null==t?void 0:t.dataset.duration,n=null==t?void 0:t.dataset.autoplay,i=null==t?void 0:t.dataset.total;o&&i>1&&1e3*e.video.currentTime>=o&&(n||e.video.pause(),e.video.currentTime=0)})}},{key:"showPosterImage",value:function(){this.el.classList.remove(l)}},{key:"hidePosterImage",value:function(){this.el.classList.add(l)}}])&&a(e.prototype,t),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,o}()},26587:function(e,t){t.A=function(e){var t=Math.floor(e/3600),o=Math.floor(e%3600/60),n=Math.floor(e%60);return"".concat(t.toString().padStart(2,"0"),":").concat(o.toString().padStart(2,"0"),":").concat(n.toString().padStart(2,"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.