1'use strict';const servicesIncludeUtils=(()=>{const l={bookingAppointment:"bookingAppointment",cancellationBookingAppointment:"cancellationBookingAppointment",rateYourExperience:"rateYourExperience",dynamicRateYourExperience:"dynamicRateYourExperience"},h={accumulated:"RYE-accumulatedTimeInWeb",alreadyShown:"RYE-alreadyShown"},f={accumulateTimeLimit:60,accumulateTime:0,isPassedTimeLimit:!1},A=(a,b,c)=>{if(!b)return console.warn("Services no execute by no dealerCode"),!1;if("object"===typeof b)if(c)c.dealer= 2b,b=b.id;else return b.dealerCode?b:b.dealer?(b.dealerCode=b.dealer.id,b):{dealer:b,dealerCode:b.id};c||(c={});return{...c,dealerCode:b}},D=(a,b)=>{a=!1;!sessionStorage.getItem(h.alreadyShown)&&(B()||C()&&document.body.classList.contains("zenit"))&&f.isPassedTimeLimit?(sessionStorage.setItem(h.alreadyShown,"true"),a={analytics:{channel:dynamic_dataLayer.eVars.channel,pageName:dynamic_dataLayer.eVars.pageName}}):console.warn("RYE: It is not executed because it does not meet the requirements");return a}, 3p={bookingAppointment:{validateEntryData:A},cancellationBookingAppointment:{validateEntryData:A},rateYourExperience:{validateEntryData:D,processPath:(a,b)=>{CommonUtils.aem.isActiveDS()&&(a=CommonUtils.url.addingSelector(a,"ds"));return a}},dynamicRateYourExperience:{validateEntryData:D,changeType:()=>l.rateYourExperience}},r={type:"js-type",data:"js-data",dealer:"js-dealer"},n={};let u;document.addEventListener("DOMContentLoaded",()=>{const a=CommonUtils.url.getUrlParameter(r.type),b=CommonUtils.url.getUrlParameter(r.dealer); 4let c=CommonUtils.url.getUrlParameter(r.data);a&&p[a]&&("undefined"!==typeof CommonUtils&&CommonUtils.url.removeURLParameters(Object.values(r)),c=c?JSON.parse(atob(c)):null,q(a,b||c,b&&c,!0))});window.addEventListener("message",a=>{a.data.type&&p[a.data.type]&&q(a.data.type,a.data.dealer,a.data.data)},!1);const q=(a,b,c,d)=>{if(!a||!p[a]||document.body.classList.contains("isAuthorEdit")||document.querySelector(".service-content-embed.mod__active"))console.warn("Services no execute by no type or another modal is open", 5a);else{var e=p[a].validateEntryData;b="function"===typeof e?e(a,b,c):{};!1!==b&&(d={...b,type:a,...E(),...O(d)},n[a]?F(d):G(d))}},E=()=>{const a={};"undefined"===typeof isUserConnected||"undefined"===typeof SeatId?a.noLogin=!0:isUserConnected&&(a.userConnected=!0,t(a,"name",SeatId.PARAMS().USER_NAME),t(a,"surname",SeatId.PARAMS().USER_SURNAME),t(a,"phone",SeatId.PARAMS().USER_PRIMARY_PHONE),t(a,"email",SeatId.PARAMS().USER_MAIL),t(a,"userId",SeatId.PARAMS().USER_ID));return a},t=(a,b,c)=>{a&&(c= 6SeatId.getParam(c))&&(a[b]=c)},G=a=>{const b="includeContent."+a.type;if(document.body.classList.contains("aem-site")){var c=window.location.pathname;c=window.location.pathname.includes("html")?c.replace(/\.[^].+\./,".").replace("html",b+".html"):c.replace(/\.[^.]+/g,"")+"."+b;c+=window.location.search}else c=window.location.origin,a.domain&&(c=a.domain),c=c+"/."+b+".html";c=c.replace(/\/w\/[^.]+/,"");P(c,a)},P=async(a,b)=>{try{const e=await fetch(a),g=await e.json();if(e&&e.ok&&g&&g.path){{var c= 7g.path;const k=document.querySelector('meta[name\x3d"dealerSelector"]')?.content;var d=k?c.replace(".embedContent",`.${k}.${"embedContent"}`):c}Q(d,b)}}catch(e){console.warn("Something went wrong.",e)}},Q=(a,b)=>{var c=p[b.type].changeType;"function"===typeof c&&(b.type=c());c=p[b.type].processPath;"function"===typeof c&&(a=c(a,b));const d=document.createElement("iframe");d.classList.add("service-content-embed");d.src=a;document.body.appendChild(d);n[b.type]={$node:d};d.onload=()=>{H(b.type);const e= 8d.contentDocument;if(e){e.dispatchEvent(new CustomEvent(b.type+"Execute",{detail:b}));e.addEventListener("execute",k=>{q(k.detail.type,k.detail.data)});e.addEventListener(b.type+"Close",()=>{d.classList.remove("mod__active");document.body.style.overflowY=""});e.addEventListener(b.type+"Login",R);e.addEventListener(b.type+"Redirect",S);const g="confirmed-"+b.type;e.addEventListener(g,()=>{document.dispatchEvent(new CustomEvent(g))});e.body.classList.remove("ds-bg")}else b&&b.domain&&(d.contentWindow.postMessage(JSON.stringify({type:b.type+ 9"Execute",detail:b}),b.domain),window.addEventListener("message",g=>{let k;try{k=JSON.parse(g.data)}catch(Z){return}k&&"close"===k.type&&(d.classList.remove("mod__active"),document.body.style.overflowY="")},!1))}},H=a=>{const b=n[a];let c;b&&(u&&n[u]&&(n[u].$node.classList.remove("mod__active"),document.body.style.overflowY=""),u=a,c=b.$node,c.classList.add("mod__active"),document.body.style.overflowY="hidden");return c},R=()=>{"undefined"!==typeof loginMenuComponentUtils&&(loginMenuComponentUtils.loginWithOtherTab(), 10document.addEventListener("updateContextSeatID",I))},I=()=>{document.removeEventListener("updateContextSeatID",I);n[l.bookingAppointment].$node.contentDocument.dispatchEvent(new CustomEvent(l.bookingAppointment+"LoginOK",{detail:E()}))},F=a=>{const b=H(a.type);b&&(b.contentDocument?b.contentDocument.dispatchEvent(new CustomEvent(a.type+"Render",{detail:a})):a&&a.domain&&b.contentWindow.postMessage(JSON.stringify({type:a.type+"Render",detail:a}),a.domain))},O=a=>{const b={},c=[],d=r.data+"-";window.location.search&& 11(window.location.search.substring(1).split("\x26").forEach(function(e){e=e.split("\x3d");var g=e[0];g.includes(d)&&(c.push(g),g=g.split(d)[1],b[g]=decodeURIComponent(e[1]))}),a&&CommonUtils.url.removeURLParameters(c));return b},S=a=>{a.detail&&(window.location.href=a.detail)},B=()=>document.querySelector('meta[name\x3d"RYE-config"]')&&!document.querySelector(".cmp-electrification-landing")&&!document.querySelector(".container-body[data-channel\x3d'Carworld']")&&!document.body.classList.contains("zenit"), 12C=()=>document.querySelector('meta[name\x3d"RYE-config-central"]'),J=()=>{setTimeout(()=>{f.accumulateTime=parseInt(sessionStorage.getItem(h.accumulated))+10;sessionStorage.setItem(h.accumulated,f.accumulateTime);f.accumulateTime<f.accumulateTimeLimit?J():f.isPassedTimeLimit=!0},1E4)},W=()=>{if(document.querySelector('meta[name\x3d"RYE-enable"]')&&!document.querySelector('meta[name\x3d"RYE-type"]')){const a=x(),b=T();let c=!1,d=!1,e=null;const g=()=>{!c||b&&!d||(q(l.dynamicRateYourExperience),e&& 13e())};U(a,()=>{c=!0;g()});null!==b&&(e=V(b,()=>{d=!0;g()}))}},x=a=>{const b=document.querySelector('meta[name\x3d"RYE-time"]');a=a||(b?parseInt(b.content):0);!f.isPassedTimeLimit&&f.accumulateTime+a<=f.accumulateTimeLimit&&(a+=f.accumulateTimeLimit-(f.accumulateTime+a));return a+1},T=()=>{const a=document.querySelector('meta[name\x3d"RYE-scroll-percentage"]');return a?parseInt(a.content):null},U=(a,b)=>{setTimeout(b,1E3*a)},V=(a,b)=>{const c=()=>{((window.scrollY||document.documentElement.scrollTop)+ 14window.innerHeight)/document.documentElement.scrollHeight*100>=a&&(b(),d())};window.addEventListener("scroll",c);const d=()=>{window.removeEventListener("scroll",c)};return d},v=a=>{document.querySelector(".service-content-embed.mod__active")||(a={analytics:{channel:"undefined"!==typeof dynamic_dataLayer?dynamic_dataLayer.eVars?.channel||a?.channel:a?.channel,pageName:"undefined"!==typeof dynamic_dataLayer?dynamic_dataLayer.eVars?.pageName||dynamic_dataLayer.eVars?.virtualPageName||a?.pageName:a?.pageName}, 15type:l.rateYourExperience},n[l.rateYourExperience]?F(a):G(a))};var m="not config",y=!1,w=!1,K=null,z,L,M;const X=a=>{m="pending";z=x(20);K=setTimeout(()=>{if(y=!0,w)m="executed",v(),sessionStorage.setItem(h.alreadyShown,"true")},1E3*z);const b=new IntersectionObserver((c,d)=>
15{c.forEach(e=>{e.isIntersecting&&(w=!0,y&&w&&(m="executed",v(),sessionStorage.setItem(h.alreadyShown,"true")),d.disconnect())})},{threshold:.5});b.observe(a);window.addEventListener("beforeunload",()=>{clearTimeout(K);b.disconnect()})}, 16Y=a=>{const b=window.location.pathname,c=/^\/[a-z]{2}-[a-z]{2}\/.+/;(/^\/[a-z]{2}\/.+/.test(b)||c.test(b))&&a++;return b.split("/").filter(d=>0<d.length).length===a},N=(a,b)=>{a=b.getElementsByClassName(a);return a[a.length-1]||null};CommonUtils.dom.domReady(()=>{sessionStorage.getItem(h.accumulated)?f.accumulateTime=parseInt(sessionStorage.getItem(h.accumulated)):sessionStorage.setItem(h.accumulated,"0");f.isPassedTimeLimit=f.accumulateTime>f.accumulateTimeLimit;f.isPassedTimeLimit||J();!sessionStorage.getItem(h.alreadyShown)&& 17(B()||C()&&document.body.classList.contains("zenit"))&&W();CommonUtils.url.getUrlParameter("testRYE")&&v()});return{execute:q,executeWithDynamicFormRYE:()=>{const a=document.querySelector('meta[name\x3d"RYE-type"]');a&&"withDynamicFormRYE"===a.content&&q(l.dynamicRateYourExperience)},executeAutomaticRYE:v,initializeAutomaticRYE:({level:a,componentSelector:b,entryNode:c})=>{if(c){var d=!!sessionStorage.getItem(h.alreadyShown);if((a=a&&!Y(a))||d)m="not meet criteria",L=d,M=!a;else{a:if(Array.isArray(b)){for(const e of b)if(d= 18N(e,c)){c=d;break a}c=null}else c=N(b,c);c?X(c):m="component for scroll not found -\x3e "+b}}},getTimeConfig:x,infoAutomaticRYE:a=>{console.info("Automatic RYE",m);"pending"===m?(console.info("- isTimeReached",y),console.info(" - Time required in seconds",z),console.info(" - General config time",f),console.info("- isComponentVisible",w)):"not meet criteria"===m&&(console.info("- alreadyShown",L),console.info("- isSpecificLevel",M))},TYPES:l,SESSION_STORAGE:h}})();window.servicesIncludeUtils=servicesIncludeUtils;
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.