news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
news
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3265],{33253:(e,t,a)=>{a.d(t,{A:()=>s});var l=a(12115),r=a(35695),o=a(87186);let s=()=>{let e=(0,r.useSearchParams)();return(0,l.useMemo)(()=>{let t={...(0,o.n)((e=>{let t={};return e&&e.forEach((e,a)=>{t[a]?Array.isArray(t[a])?t[a].push(e):t[a]=[t[a],e]:t[a]=e}),t})(e))||{}};return e&&["dyn","ppc","sm_id","test"].forEach(a=>{let l=e.get(a);null!==l&&(t[a]=l)}),t},[e])}},43265:(e,t,a)=>{a.d(t,{A:()=>l.default});var l=a(86287)},80117:(e,t,a)=>{a.d(t,{A:()=>s});var l=a(30602);let r={diesel:"diesel",electric:"electric",hybrid:"hybrid",hybrids:"hybrid"},o=e=>e?r[e.toLowerCase()]:void 0,s=e=>{var t;let{isDesktop:a=!1,size:r,targeting:s={}}=e,{artid:n,bodystyle:i,bodystyleonly:d,cat:u,class:g,classonly:c,fluid:p,freeform_tags:h,fuel:f,native:m,pos:b,position:v,refresh:w,slot:y,type:E}=s,S=Array.isArray(b)?b:b?[b]:[],_="string"==typeof h?h.split(",").map(e=>e.trim()):Array.isArray(h)?h:[];_=_.filter(e=>e.startsWith("hacat")).map(e=>e.slice(5));let A=null!=p?p:r&&S?((e,t,a)=>{if(!e||0===e.length)return"";let l=a?"dt-":"m-",r=a&&(e=>{if("fluid"===e)return!1;let[t,a]=e;return 728===t&&90===a||970===t&&(90===a||250===a)})(t);for(let t of e)switch(t){case"top":return r?"dt-wide-top":"".concat(l,"box-1");case"middle":return r?"dt-wide-breaker middle":"".concat(l,"box-2");case"block2_bottom":case"block3_bottom":case"bottom":case"carmatch":case"newsletter":return r?"dt-wide-breaker":"".concat(l,"box-breaker");default:continue}return""})(S,r,a):m||S,T=E||i||d||g||c,P=f||o(g)||o(c),I="false"===w?l.IS.None:s.refreshtype;return{...s,artid:n||"",cat:u||_,fuel:f||P,position:null!=(t=null!=v?v:b)?t:"",refreshtype:I,slot:y||A,type:T||""}}},86287:(e,t,a)=>{a.d(t,{default:()=>M});var l=a(95155),r=a(12115),o=a(35695),s=a(66945),n=a(52596),i=a(36203),d=a(93158),u=a(82004),g=a(13623),c=a(56664),p=a.n(c);let h={desktop:"desktop",laptop:"laptop",mobile:"mobile",tablet:"tablet"},f={"2xl":"desktop",lg:"laptop",md:"tablet",sm:"mobile",xl:"desktop"},m=["mobile","tablet","laptop","desktop"],b=Object.values(p().screens).map(e=>16*parseInt(e)).sort((e,t)=>Number(e)-Number(t)),v=Object.freeze({mobile:0,tablet:Number(b[1]),laptop:Number(b[2]),desktop:Number(b[3])});function w(e){return Object.keys(e).filter(e=>v.hasOwnProperty(h[e])).map(t=>({minWidth:v[h[t]],sizeArray:e[h[t]]||[]}))}function y(e,t){let a="string"==typeof t?f[t]:"boolean"==typeof t?"mobile":null;if(!a)return[];let l=m.indexOf(a),r=e[m[l]];return r&&r.length>0?r:[]}var E=a(41003),S=a(22356),_=a(56589),A=a(30602),T=a(80117),P=a(17270);let I=(e,t,a,l,r)=>{let o=e.includes(".dfp")?r?e:e.replace(/\.dfp/g,".mob"):e,s=o.replace(/\/null$/,""),n=Object.keys(t).includes("bodystyleonly")||!1;return"wallpaper"===a?"".concat(s,"/").concat(a):"bottomadhesion"===a?l===P.BV.BuyersGuideHomepage||n||(null==l?void 0:l.includes(P.BV.Price))?"".concat(s,"/null/").concat(a):"".concat(o,"/").concat(a):s},N=e=>!e||0===Object.keys(e).length;var D=a(91482),x=a(95422),k=a(33253);let j=e=>{let{adPath:t,children:a,sizes:r,targeting:o}=e;return(0,l.jsxs)("div",{className:"relative min-h-100 min-w-100","data-debug":!0,children:[a,(0,l.jsxs)("div",{className:"bg-neutral-8 text-neutral-1 absolute inset-0 z-50 overflow-y-scroll text-wrap whitespace-pre opacity-80",children:[JSON.stringify(o,null," "),"\n",JSON.stringify(r,null," "),"\n",t]})]})};var R=a(49110);let O=e=>{let{additionalAdPath:t,className:a,destroyRefresh:n,onAdRendered:i,pageTargeting:g,sizes:c,targeting:p}=e,h=(0,o.useSearchParams)(),f=null==h?void 0:h.get("adDebug"),m=(0,r.useRef)(null),b=(0,r.useId)(),v=(0,o.usePathname)()||"",E=(0,r.useRef)(!1),S=(0,s.v1)(m),_=null==S?void 0:S.isIntersecting,[P,D]=(0,r.useState)(!1),k=(0,s.dv)(),j=(0,r.useMemo)(()=>y(c,k),[k,c]),R=(0,r.useMemo)(()=>w(c),[c]),O=(0,r.useMemo)(()=>{let e={...!N(null==g?void 0:g.adTargeting)&&(null==g?void 0:g.adTargeting)||{},...p,refresh:"false"};return(0,T.A)({isDesktop:!1,size:j[0],targeting:e})},[null==g?void 0:g.adTargeting,p,j]),z=(0,r.useMemo)(()=>{let e=null==g?void 0:g.adPath;if(e)return I(e,O,t,v)},[null==g?void 0:g.adPath,O,t,v]);return(0,r.useEffect)(()=>{let e=e=>{let{isEmpty:t,slot:a}=e;a.getSlotElementId()===b&&i&&i(t)};return i&&(window.googletag||{cmd:[]}).pubads().addEventListener("slotRenderEnded",e),()=>{if(i){let t=window.googletag||{cmd:[]};t.cmd.push(()=>{t.pubads().removeEventListener("slotRenderEnded",e)})}}},[i,b]),(0,r.useEffect)(()=>{n&&z&&(_&&!P?D(!0):_||!P&&E.current||(D(!1),window.googletag.cmd.push(()=>{let e=window.googletag.pubads().getSlots().find(e=>e.getSlotElementId()===b);e&&((0,x.e)("AdSlotDestroyed",{slotId:b}),window.googletag.destroySlots([e])),E.current=!0;let t=window.googletag||{cmd:[]};t.cmd.push(function(){let e=t.defineSlot(z,j,b);if((0,x.e)("AdSlotCreationRequest",{adUnitPath:z,size:j,slotId:b}),e){e.addService(t.pubads());let a=t.sizeMapping();R.forEach(e=>{let{minWidth:t,sizeArray:l}=e;a.addSize([t,1],l)});let l=a.build();l&&e.defineSizeMapping(l),t.pubads().enableSingleRequest(),t.enableServices(),Object.entries(O).forEach(t=>{let[a,l]=t;e.setTargeting(a,l)}),t.pubads().getTargeting(u.t.PhotoSlided).includes("true")&&(0,A.S$)(e,A.IS.DestroyRefresh),(0,A.wU)(e),t.cmd.push(function(){(0,x.e)("AdDisplayRequest",{slotId:b}),t.display(b),d.h.NEXT_PUBLIC_AD_HEADER_BIDDING&&t.pubads().refresh([e])})}return()=>{window.googletag&&window.googletag.cmd.push(()=>{window.googletag.destroySlots()})}})})))},[n,P,b,_,z,j,R,O]),(0,l.jsx)(s.e7,{condition:!!f,wrapper:e=>(0,l.jsxs)("div",{className:"relative min-h-100 min-w-100","data-debug":!0,children:[e,(0,l.jsxs)("div",{className:"bg-neutral-8 absolute inset-0 z-50 overflow-y-scroll text-wrap whitespace-pre opacity-80",children:[JSON.stringify(O,null," "),"\n",JSON.stringify(c,null," "),"\n",null==g?void 0:g.adPath," ",t]})]}),children:(0,l.jsx)("div",{className:a,"data-ad":!0,id:b,ref:m})})},z=e=>{let{additionalAdPath:t,className:a,fixedSlotId:i,forceRefresh:c=!1,noBid:p=!1,onAdRendered:h,pageTargeting:f,sizes:m,slotIdPrefix:b="",targeting:v,testId:P}=e,R=(0,o.useSearchParams)(),O=!!(null==R?void 0:R.get("adDebug")),z=(0,r.useRef)(null),M=(0,r.useId)(),B=i||"".concat("ad-id","-").concat(b,"-").concat(M).toLowerCase(),C=(0,o.usePathname)()||"",L=(0,r.useRef)(null),U=(0,r.useRef)(!1),H=(0,k.A)(),G=(0,s.dv)(),[X,q]=(0,r.useState)(null);(0,r.useEffect)(()=>{let e=()=>{q(window.innerWidth>=980)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let J=(0,r.useMemo)(()=>y(m,G),[G,m]),V=(0,r.useMemo)(()=>w(m),[m]),F=(0,r.useMemo)(()=>{let e=!N(null==f?void 0:f.adTargeting)&&(null==f?void 0:f.adTargeting)||{};f.configUpdated&&(U.current=!1,L.current&&googletag.cmd.push(()=>{googletag.destroySlots([L.current])}));let t={...e,...H,...v,refresh:"false"},a=J[0];return(0,T.A)({isDesktop:null!=X&&X,size:a,targeting:t})},[f.adTargeting,f.configUpdated,H,v,J,X]),W=(0,r.useMemo)(()=>{let e=null==f?void 0:f.adPath;return e?null!==X?I(e,F,t,C,X):void 0:void(0,x.e)("NoValidAdPath",{pageTargetingAdPath:null==f?void 0:f.adPath,path:e})},[null==f?void 0:f.adPath,F,t,C,X]),$=(0,s.v1)(z,{rootMargin:"".concat(d.h.NEXT_PUBLIC_AD_FETCH_MARGIN,"% 0% ").concat(d.h.NEXT_PUBLIC_AD_FETCH_MARGIN,"% 0%"),threshold:0}),K=d.h.NEXT_PUBLIC_AD_HEADER_BIDDING?$:{isIntersecting:!0};return(0,r.useEffect)(()=>{let e=d.h.NEXT_PUBLIC_AD_HEADER_BIDDING&&!p&&"true"!==F[u.t.Sponsored]&&J.length>0,t=(0,D.g)(C);((null==K?void 0:K.isIntersecting)&&e||!e)&&(()=>{if(!z.current||U.current||!W||t)return;U.current=!0,(0,S.A)();let a=e?(0,g.i0)({sizes:J,slotID:B,slotName:W}):Promise.resolve(),l=J.filter(e=>Array.isArray(e)&&2===e.length),r=new Promise(e=>{var t;let a=setTimeout(()=>{(0,x.e)("IASTimeout",{slotId:B,timeoutMs:1e3}),e()},1e3);(null==(t=window.__iasPET)?void 0:t.queue)&&l.length>0?window.__iasPET.queue.push({adSlots:[{adSlotId:B,adUnitPath:W,size:l}],dataHandler:()=>{clearTimeout(a),window.__iasPET.setTargetingForGPT();let t=["adt","alc","dlm","drg","fr","hat","ias-kw","off","vio"],l={};if(t.forEach(e=>{let t=googletag.pubads().getTargeting(e);t&&t.length>0&&(l[e]=t)}),Object.keys(l).length>0){(0,x.e)("IASTargetingApplied",{iasTargeting:JSON.stringify(l),slotId:B});let e=!0,t=!0;if(["adt","alc","dlm","drg","hat","off","vio"].forEach(a=>{let r=l[a]||[];r.includes("veryLow")||r.includes("low")||(e=!1),r.includes("veryLow")||(t=!1)}),e){let e=googletag.pubads().getTargeting("has");e.includes("ias_safe")||googletag.pubads().setTargeting("has",[...e,"ias_safe"])}if(t){let e=googletag.pubads().getTargeting("has");e.includes("ias_safe_verylow")||googletag.pubads().setTargeting("has",[...e,"ias_safe_verylow"])}}else(0,x.e)("IASTargetingMissing",{expectedKeys:t.join(","),slotId:B});e()}}):(clearTimeout(a),e())});googletag.cmd.push(()=>{try{if(i){let e=googletag.pubads().getSlots().find(e=>e.getSlotElementId()===i);e&&googletag.destroySlots([e])}let e=googletag.sizeMapping();V.forEach(t=>{let{minWidth:a,sizeArray:l}=t;return e.addSize([a,1],l)});let t=e.build(),l=googletag.defineSlot(W,J,B);l&&(L.current=l,l.addService(googletag.pubads()),t&&l.defineSizeMapping(t),Object.entries(F).forEach(e=>{let[t,a]=e;return l.setTargeting(t,a)}),googletag.pubads().getTargeting(u.t.PhotoSlided).includes("true")&&(0,A.S$)(l,A.IS.DestroyRefresh),(0,A.wU)(l),googletag.enableServices(),googletag.display(B),(0,E.A)(l),d.h.NEXT_PUBLIC_AD_HEADER_BIDDING?Promise.all([a,r]).then(()=>{googletag.pubads().refresh([l])}):c&&r.then(()=>{googletag.pubads().refresh([l])}),googletag.pubads().addEventListener("slotRenderEnded",e=>{e.slot===l&&((0,_.A)(e),h&&h(e.isEmpty))}))}catch(e){console.error("GPTCommandError",{finalAdPath:W,slotId:B})}})})()},[null==K?void 0:K.isIntersecting,W,p,F,J,B,V,h,C,G,i,c]),(0,l.jsx)(s.e7,{condition:O,wrapper:e=>(0,l.jsx)(j,{adPath:"".concat(null==f?void 0:f.adPath," ").concat(t),sizes:m,targeting:F,children:e}),children:(0,l.jsx)("div",{className:(0,n.A)(a,"min-h-[1px] min-w-[1px]"),"data-ad":!0,"data-testid":P,id:B,ref:z,style:{minHeight:"1px",minWidth:"1px"}})})},M=(0,i.withErrorBoundary)(e=>(0,l.jsx)(r.Suspense,{children:e.destroyRefresh?(0,l.jsx)(O,{...e}):(0,l.jsx)(z,{...e})}),{FallbackComponent:R.c})},91482:(e,t,a)=>{a.d(t,{g:()=>r});var l=a(17270);function r(e){return e===l.BV.OptOut||e===l.BV.OptOutHotrod}}}]); //# sourceMappingURL=3265-ab0e3bef46bc395f.js.map