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([[1353],{2488:(e,t,l)=>{l.d(t,{S:()=>r});var n=l(12115),a=l(28700);function r(e){let{id:t,type:l}=e,[r,i]=(0,n.useState)(!1),[o,s]=(0,n.useState)(!1),[u,d]=(0,n.useState)("");(0,n.useEffect)(()=>{let e=()=>{try{let e=document.cookie.match(/OptanonConsent=([^;]+)/);if(!e){i(!1),s(!0),d("");return}let n=decodeURIComponent(e[1]);if(n===u&&o)return;d(n);let r=n.match(/groups=([^&]+)/);if(!r){i(!1),s(!0);return}let c=decodeURIComponent(r[1]).split(","),m=a.hs[t];if("category"===l){let e=c.find(e=>e.startsWith("".concat(m,":")));if(e){let[,t]=e.split(":");i("1"===t)}else i(!1)}else i(!1);s(!0)}catch(e){console.error("Error checking consent:",e),i(!1),s(!0)}};e();let n=()=>{setTimeout(e,100)};window.addEventListener("OneTrustGroupsUpdated",n),window.addEventListener("consent.onetrust",n);let r=setInterval(e,250),c=window.OptanonWrapper;return window.OptanonWrapper=function(){c&&c(),setTimeout(e,200)},()=>{window.removeEventListener("OneTrustGroupsUpdated",n),window.removeEventListener("consent.onetrust",n),clearInterval(r),c&&(window.OptanonWrapper=c)}},[t,l,o,u]);let c=(0,n.useCallback)(()=>{window.cmpUtils&&"function"==typeof window.cmpUtils.emitEvent?window.cmpUtils.emitEvent("cmp.consent.submit"):console.warn("window.cmpUtils is not available to emit consent submit event")},[]);return{hasConsent:r,isReady:o,rejectAllConsent:(0,n.useCallback)(()=>{window.Optanon&&"function"==typeof window.Optanon.RejectAll&&window.Optanon.RejectAll()},[]),submitConsentChange:c}}},3923:(e,t,l)=>{l.d(t,{S:()=>a});var n=l(56664);let a=l.n(n)().screens},5153:(e,t,l)=>{l.r(t),l.d(t,{EnhancedNextImage:()=>u});var n=l(95155),a=l(78126),r=l.n(a),i=l(66766),o=l(43687),s=l(97893);function u(e){let{alt:t,crop:l,priority:a,src:u,template:d={defaultSize:"66vw",sizeConfig:{lg:"66vw",sm:"90vw"}},...c}=e,m=(0,o.W)(d);return(0,n.jsxs)(n.Fragment,{children:[a&&"string"==typeof u&&(0,n.jsx)(r(),{children:(0,n.jsx)("link",{as:"image",crossOrigin:"anonymous",href:u,rel:"preload"})}),(0,n.jsx)(i.default,{alt:t,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mN89uJNPQAIsQM7E+c3WAAAAABJRU5ErkJggg==",loader:e=>(e=>{let{crop:t,quality:l,src:n,width:a}=e;return a?"".concat(n,"?").concat(t?"crop=".concat(t,"*&"):"","w=").concat(Math.round(a/2),"&width=").concat(Math.round(a/2),"&q=").concat(l||100,"&format=webp"):n})({...e,crop:l}),onError:e=>{s.Y.error(Error("Error loading image",{cause:e}),{context:{src:u}})},placeholder:"blur",priority:a,sizes:m,src:u,...c})]})}},41353:(e,t,l)=>{l.d(t,{default:()=>Y});var n=l(95155),a=l(12115),r=l(5036),i=l(1773),o=l.n(i),s=l(66945),u=l(52596),d=l(97071),c=l(28885),m=l(80624),v=l(33374),p=l(28700),g=l(2488),h=l(15012),f=l(90904);let w=e=>Object.values(e).filter(e=>e.isVisible);var x=l(43265),b=l(35695),E=l(97893),A=l(33289),S=l(33253);let y=e=>{let{containerRef:t,duration:l,pageTargeting:n,usePathname:r=b.usePathname,vastTemplate:i,videoId:o}=e,{adTargeting:u,defaultVastTemplate:d}=n,c=(0,s.dv)(),m="lg"===c||"xl"===c||"2xl"===c,v=(0,a.useMemo)(()=>i||d,[d,i]),p=/(jam\.mtr\.video\.(?:gallery\.)?(?:new|used|enth)\.)[^/]+/,g=p.test(v)?m?v:v.replace(p,"$1mob"):v,h=r(),{ppc:f,sm_id:w,utm_campaign:x,utm_content:y,utm_id:j,utm_medium:C,utm_source:k,utm_term:N,utm_type:V}=(0,S.A)(),P=m?"dt-preroll":"m-preroll";return(0,a.useMemo)(()=>{var e,n,a;return function(e){let{brand:t,duration:l,height:n,mak:a,mod:r,page:i,ppc:o,pub:s,sect:u,slot:d,sm_id:c,updatedVastTagPath:m,utm_campaign:v,utm_content:p,utm_id:g,utm_medium:h,utm_source:f,utm_term:w,utm_type:x,videoId:b,videoKVP:A,width:S}=e,y=m,j=Date.now();return((e,t,l)=>{let{mak:n,mod:a,slot:r,utm_campaign:i,utm_content:o,utm_id:s,utm_medium:u,utm_source:d,utm_term:c,utm_type:m}=t;if(!e)return e;try{let t=new URL(e),v=Object.fromEntries(new URLSearchParams(t.searchParams.get("cust_params")||"").entries()),p=new URLSearchParams({...l||{},...v,...n&&{mak:n},...a&&{mod:a},...r&&{slot:r},...i&&{utm_campaign:i},...o&&{utm_content:o},...s&&{utm_id:s},...u&&{utm_medium:u},...d&&{utm_source:d},...c&&{utm_term:c},...m&&{utm_type:m},nextweb:"true"}).toString();return t.searchParams.set("cust_params",p),t.toString()}catch(e){E.Y.log({error:e,level:"error",msg:"Error in appendCustParams"})}return e})(y=(y=(y=(y=(y=(y=(y=(y=(y=(y=(y=(y=(y=y.replace("[DATE]","".concat(j))).replace("[timestamp]","".concat(j))).replace("[WIDTH]","".concat(S))).replace("[HEIGHT]","".concat(n))).replace("[ID]",b)).replace("[mediaProxy.entry.id]",b)).replace("[DURATION]","".concat(l))).replace("[PAGE]",i)).replace("[SM_ID]",c||"")).replace("[PPC]",o||"")).replace("[SECT]",u)).replace("[brand]",t)).replace("[pub]",s||""),{mak:a,mod:r,slot:d,utm_campaign:v,utm_content:p,utm_id:g,utm_medium:h,utm_source:f,utm_term:w,utm_type:x},A)}({brand:(null==u?void 0:u.brand)||"",duration:l,height:(null==(e=t.current)?void 0:e.clientHeight)||0,mak:(null==u?void 0:u.make)||"",mod:(null==u?void 0:u.model)||"",page:"/"===h?"homepage":(null==u?void 0:u.page)||"",ppc:f,pub:(null==u?void 0:u.pub)||"",sect:u.sect||"",slot:P,sm_id:w,updatedVastTagPath:g,utm_campaign:x,utm_content:y,utm_id:j,utm_medium:C,utm_source:k,utm_term:N,utm_type:V,videoId:o,videoKVP:A.Bk&&(null==(n=window.gptLayer)?void 0:n.videoKVP)||{},width:(null==(a=t.current)?void 0:a.clientWidth)||0})},[u,l,t,h,f,P,w,x,y,j,C,k,N,V,g,o])};var j=l(39061);let C=function(e,t){let l=arguments.length>2&&void 0!==arguments[2]&&arguments[2],{clientHeight:n,clientWidth:a}=e,r=new window.google.ima.AdsRequest;return r.setAdWillAutoPlay(l),r.setAdWillPlayMuted(!0),r.adTagUrl=t,r.linearAdSlotWidth=a,r.linearAdSlotHeight=n,r.nonLinearAdSlotWidth=a,r.nonLinearAdSlotHeight=n,r.vastLoadTimeout=8e3,r.contentDuration=10,r},k=async function(e,t,l,n,a,r){let i=arguments.length>6&&void 0!==arguments[6]&&arguments[6],o=((e,t)=>{let l=new window.google.ima.AdDisplayContainer(e);l.initialize();let n=new window.google.ima.AdsLoader(l);new window.google.ima.AdsRenderingSettings().enablePreloading=!0,n.getSettings().setVpaidMode(window.google.ima.ImaSdkSettings.VpaidMode.DISABLED),n.getSettings().setDisableFlashAds(!0);let a=(0,j.N)();return a&&n.getSettings().setPpid(a),n.addEventListener(window.google.ima.AdErrorEvent.Type.AD_ERROR,t,!1),n})(e,a),s=C(t,n,i);o.requestAds(s);let u=await new Promise((e,n)=>{o.addEventListener(window.google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,a=>{l||n(null);let i=new window.google.ima.AdsRenderingSettings;i.loadVideoTimeout=3e4,i.useStyledLinearAds=!0,i.autoAlign=!1;let o=a.getAdsManager(l,i);Object.entries(r).forEach(e=>{let[t,l]=e;o.addEventListener(t,l,!1)}),window.googleImaVansAdapter.init(window.google,o,l,{anId:"931688",campId:"640x480"}),o.init(t.clientWidth,t.clientHeight,window.google.ima.ViewMode.NORMAL),e(o)},!1)});return{adsLoader:o,adsManager:u,adsRequest:s}};var N=l(92568);let V=e=>{let{adContainerRef:t,canAutoplay:l=!1,containerRef:n,vastTag:r,videoRef:i}=e,[o,s]=(0,a.useState)(null),[u,d]=(0,a.useState)(!1),[c,m]=(0,a.useState)(!1),[v,p]=(0,a.useState)(!1),{enterFullScreen:g,exitFullScreen:h,isFullScreen:f}=(()=>{let[e,t]=(0,a.useState)(!1),[l,n]=(0,a.useState)(null),r=(0,a.useCallback)(()=>{let e=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||null;n(e),t(null!==e)},[]),i=(0,a.useCallback)(async e=>{if(!e)return;let t=e.requestFullscreen||e.webkitRequestFullscreen||e.mozRequestFullScreen||e.msRequestFullscreen;if(t)try{await t.call(e)}catch(e){E.Y.log({error:e,level:"error",msg:"Error entering fullscreen"})}},[]),o=(0,a.useCallback)(async()=>{let e=document.exitFullscreen||document.webkitExitFullscreen||document.mozCancelFullScreen||document.msExitFullscreen;if(e)try{await e.call(document)}catch(e){E.Y.log({error:e,level:"error",msg:"Error exiting fullscreen"})}},[]);return(0,a.useEffect)(()=>{let e=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"];return e.forEach(e=>{document.addEventListener(e,r)}),r(),()=>{e.forEach(e=>{document.removeEventListener(e,r)})}},[r]),{enterFullScreen:i,exitFullScreen:o,fullScreenElement:l,isFullScreen:e}})(),w=(0,a.useCallback)(e=>{var t;E.Y.log({error:e,level:"error",msg:"Error in useVideoAds"}),p(!1),m(!0),null==i||null==(t=i.current)||t.play()},[i]);(0,a.useCallback)(e=>{f&&h().then(()=>{g(e)})},[g,h,f]);let x=(0,a.useCallback)(()=>{var e;null==i||null==(e=i.current)||e.pause(),p(!0)},[i]),b=(0,a.useCallback)(()=>{var e;null==i||null==(e=i.current)||e.play(),p(!1)},[i]),A=(0,a.useCallback)(()=>{if(!n.current||!o)return;let{clientHeight:e,clientWidth:t}=n.current,l=window.innerWidth,a=window.innerHeight;f?o.resize(l,a,window.google.ima.ViewMode.FULLSCREEN):o.resize(t,e,window.google.ima.ViewMode.NORMAL)},[o,n,f]);return(0,a.useEffect)(()=>{let e=null,a=null;if(t.current&&n.current&&i.current&&u&&r)return k(t.current,n.current,i.current,r,w,{contentPauseRequested:x,contentResumeRequested:b},l).then(t=>{let{adsLoader:l,adsManager:n}=t;e=l,a=n,s(n),null==n||n.start()}).catch(w),()=>{null==a||a.destroy(),null==e||e.destroy()}},[t,u,l,n,w,x,b,r,i]),(0,a.useEffect)(()=>{Promise.all([(0,N.A)("https://imasdk.googleapis.com/js/sdkloader/ima3.js"),(0,N.A)("https://static.adsafeprotected.com/vans-adapter-google-ima.js")]).then(()=>{d(!0)}).catch(()=>{w()})},[w]),(0,a.useEffect)(()=>{let e=new ResizeObserver(A);return n.current&&e.observe(null==n?void 0:n.current),()=>{e.disconnect()}},[n,A]),{adsError:c,adsManager:o,showAdContainer:v}};var P=l(69588);let R=e=>{let{className:t="z-10",isMute:l=!0,onClick:a}=e,i=l?v.Co.VideoUnmuteButton:v.Co.VideoMuteButton;return(0,n.jsx)("div",{className:(0,u.A)("absolute top-3.5 left-3.5",t),children:(0,n.jsx)(s.$n,{className:"rounded-3xl text-sm opacity-50",colorScheme:"neutral-3","data-id":i,"data-parent":v.Co.VideoPlayer,onClick:a,size:"small",startIcon:(0,n.jsx)(o(),{path:l?r.AeL:r.pgw,size:1}),typographyProps:{variant:"caption2"},children:l?P.EX.UnmuteButton:P.EX.MuteButton})})},M=e=>{let{canAutoplay:t=!1,containerRef:l,duration:r,handleMuteOnClick:i,isFullscreen:o,isMute:s,pageTargeting:d,setAdsError:c,setAdsManager:m,useVastTag:v=y,useVideoAds:p=V,vastTemplate:g,videoId:h,videoRef:f}=e,w=(0,a.useRef)(null),x=v({containerRef:l,duration:r,pageTargeting:d,vastTemplate:g,videoId:h}),{adsError:b,adsManager:E,showAdContainer:A}=p({adContainerRef:w,canAutoplay:t,containerRef:l,vastTag:x,videoRef:f});(0,a.useEffect)(()=>{E&&m(E)},[E,m]),(0,a.useEffect)(()=>{b&&c(b)},[b,c]);let S=(0,a.useMemo)(()=>(0,u.A)("absolute inset-0 z-30",{hidden:!A,"w-full h-full":o}),[o,A]);return(0,a.useEffect)(()=>{let e=setInterval(()=>{if(w.current){let e=w.current.querySelector("div");e&&(e.style.position="unset")}},200);return()=>{clearInterval(e)}}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:S,"data-testid":"video_ad",ref:w}),A&&(0,n.jsx)(R,{className:"z-30",isMute:s,onClick:i})]})};var L=l(10420);let I=e=>{let{isFullscreen:t,isSticky:l,videoId:r,videoRef:i}=e,o=(0,a.useRef)(null),s=(0,a.useRef)(null);return(0,a.useEffect)(()=>{if(!o.current&&i.current&&s.current)return(0,L.E)().then(async e=>{try{var t;o.current=e.register({clientId:r,direct:{layout:{initOptions:{bottom:{el:s.current}}}},el:i.current,organizationId:"22"}),await (null==(t=o.current)?void 0:t.embed())}catch(e){E.Y.log({error:{err:e},level:"error",msg:"Error in SourceDigitalWrapper"})}}),()=>{var e;null==(e=o.current)||e.destroy()}},[i,s,o,r]),(0,a.useEffect)(()=>{var e;(null==(e=o.current)?void 0:e.context)&&(l||t?o.current.context.hide():o.current.context.show())},[t,l,o]),(0,n.jsx)("div",{ref:s})};var T=l(50602);let F=e=>{let{currentTime:t,totalTime:l}=e,r=(0,a.useMemo)(()=>(0,T.A)(t),[t]),i=(0,a.useMemo)(()=>(0,T.A)(l),[l]),o="".concat(r," / ").concat(i);return(0,n.jsx)(s.o5,{className:"text-neutral-8",variant:"caption1",children:o})},z=e=>{let{isPlaying:t,onClick:l}=e,a=t?P.EX.PauseButtonLabel:P.EX.PlayButtonLabel;return(0,n.jsx)("button",{"aria-label":a,"data-id":v.Co.VideoPlayButton,"data-parent":v.Co.VideoPlayer,onClick:l,children:(0,n.jsx)(o(),{color:"white",path:t?r.PAd:r.H9P,size:1})})},B=e=>{let{containerRef:t,currentTime:l,handlePlayheadSeek:r,totalTime:i}=e,[o,u]=(0,a.useState)(""),[d,c]=(0,a.useState)(null),m=(0,a.useRef)(null),p=(0,a.useCallback)(e=>{var t;let l=e.nativeEvent.layerX,n=null==(t=m.current)?void 0:t.getBoundingClientRect().width;return n?l/n:0},[]);return(0,n.jsxs)("button",{"aria-label":"Video Progress Bar",className:"relative h-2 w-full","data-id":v.Co.VideoProgressBar,"data-parent":v.Co.VideoPlayer,onClick:e=>{r(Math.round(i*p(e)/1e3))},onMouseLeave:()=>{u(""),c(null)},onMouseMove:e=>{let t=p(e),l=Math.round(i*t);u((0,T.A)("".concat(l))),c(100*t)},ref:m,children:[(0,n.jsx)(s.m_,{container:(null==t?void 0:t.current)||void 0,content:o,open:!!o,children:(0,n.jsx)("div",{className:"absolute h-full w-0",style:{left:"".concat(d,"%")}})}),(0,n.jsx)(s.hZ,{disableTransitions:!0,value:l/i*100,variant:"determinate"})]})},O=e=>{let{currentVolume:t,handleVolumeChange:l,isMute:i,toggleMute:s,...u}=e,[d,c]=(0,a.useState)(!1),m=i?P.EX.UnmuteButtonLabel:P.EX.MuteButtonLabel,p=i?v.Co.VideoVolumeSliderUnmuteButton:v.Co.VideoVolumeSliderMuteButton;return(0,n.jsxs)("div",{className:"flex",onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),...u,children:[(0,n.jsx)("button",{"aria-label":m,"data-id":p,"data-parent":v.Co.VideoPlayer,onClick:s,children:(0,n.jsx)(o(),{color:"white",path:i?r.cvN:r.pgw,size:1})}),d&&(0,n.jsx)("input",{"aria-label":P.EX.VolumeSliderLabel,className:"accent-neutral-8 w-20 cursor-pointer bg-transparent","data-id":"volume-slider",max:"10",min:"0",onChange:l,type:"range",value:i?0:10*t})]})},U=e=>{var t;let{containerRef:l,duration:i,initialVolume:s,isMuted:d,loadNextVideo:c,showControls:m,showNextButton:p,toggleFullscreen:g,toggleMute:h,togglePlayVideo:f,videoRef:w}=e,[x,b]=(0,a.useState)("0"),[E,A]=(0,a.useState)(s),S=(0,a.useCallback)(e=>{let t=Number(e.target.value)/10,l=w.current;0!==t||d?l&&(A(t),l.volume=t,d&&h()):h()},[d,h,w]),y=(0,a.useCallback)(e=>{let t=w.current;t&&(t.currentTime=e)},[w]),j=(0,a.useCallback)(()=>{var e;let t=(null==(e=w.current)?void 0:e.currentTime)||0;b("".concat(1e3*t))},[w]);return(0,a.useEffect)(()=>{let e=w.current;return null==e||e.addEventListener("timeupdate",j),()=>{null==e||e.removeEventListener("timeupdate",j)}},[j,w]),(0,n.jsx)("div",{className:"absolute right-0 bottom-0 left-0 z-20",children:(0,n.jsxs)("div",{className:(0,u.A)("to-neutral-1 bg-gradient-to-b from-transparent",{invisible:!m}),children:[(0,n.jsx)("div",{className:"w-full px-2",children:(0,n.jsx)(B,{containerRef:l,currentTime:x,handlePlayheadSeek:y,totalTime:i})}),(0,n.jsxs)("div",{className:"flex items-center gap-2 p-4",children:[(0,n.jsx)(z,{isPlaying:!(null==(t=w.current)?void 0:t.paused),onClick:()=>{f()}}),p&&(0,n.jsx)("button",{"aria-label":"Load Next Video","data-id":v.Co.NextVideoButton,"data-parent":v.Co.VideoPlayer,onClick:c,children:(0,n.jsx)(o(),{color:"white",path:r.zre,size:1})}),(0,n.jsx)(O,{currentVolume:E||0,handleVolumeChange:S,isMute:d,toggleMute:h}),(0,n.jsx)(F,{currentTime:x,totalTime:i||"0"}),(0,n.jsx)("button",{"aria-label":"Toggle Full Screen Video",className:"ml-auto","data-id":v.Co.VideoToggleFullScreenButton,"data-parent":v.Co.VideoPlayer,onClick:g,children:(0,n.jsx)(o(),{color:"white",path:r.Ec0,size:1})})]})]})})};var D=l(66308),W=l(66141),q=l(5153);let _=e=>{let{currentVideoId:t,index:l,item:a,onVideoClick:r,priority:i=!1}=e,{duration:o,thumbnailUrl:d,videoId:c,videoName:m}=a,p=!!t&&t===c,g=d&&d.trim()||W.rA;return(0,n.jsxs)(s.Zp,{as:"button",className:(0,u.A)({"cursor-pointer":!p}),"data-id":v.Co.VideoPlaylistCard,"data-parent":v.Co.VideoPlaylist,onClick:r&&!p?()=>r(l):void 0,orientation:"vertical",children:[(0,n.jsxs)(s.Vo,{alt:null==m?void 0:m.trim(),as:q.EnhancedNextImage,aspectRatio:"16/9",imageProps:{priority:!!i&&l<4,template:{defaultSize:"66vw",sizeConfig:{lg:"20vw",sm:"66vw"}}},src:g,children:[p&&(0,n.jsx)("div",{className:"bg-neutral-2/75 text-neutral-8 absolute inset-0 flex items-center justify-center text-center font-bold select-none","data-id":v.Co.NowPlaying,children:P.mI.NowPlaying}),!p&&(0,n.jsx)("div",{className:"absolute right-2 bottom-2",children:(0,n.jsx)(s.Ex,{ignoreTheme:!0,children:(0,T.A)(o)})})]}),(0,n.jsx)(s.Wu,{children:(0,n.jsx)(s.ZB,{title:m,titleTypographyProps:{as:i?"h2":"h3",className:"text-neutral-2 dark:text-neutral-7",maxLines:3,variant:"button2"}})})]})},H=()=>(0,n.jsxs)(s.Zp,{className:"overflow-hidden",orientation:"vertical",children:[(0,n.jsx)("div",{className:"relative aspect-video w-full",children:(0,n.jsx)(s.EA,{className:"h-full w-full"})}),(0,n.jsx)(s.Wu,{children:(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsx)(s.EA,{className:"h-4 w-full"}),(0,n.jsx)(s.EA,{className:"h-4 w-3/4"})]})})]}),X=e=>{let{currentVideoId:t,onVideoClick:l,playlist:r,priority:i=!1}=e,[o,u]=(0,D.A)(5),[d,c]=(0,a.useState)([]);return((0,a.useEffect)(()=>{c(e=>{let t=new Set([...e,...o]);return t.size===e.length?e:Array.from(t)})},[o]),null==r?void 0:r.length)?(0,n.jsxs)(s.FN,{className:"pt-2 sm:pt-4",setApi:u,children:[(0,n.jsx)(s.Wk,{className:"sm:gap-4","data-id":v.Co.VideoPlaylist,children:r.map((e,a)=>{var r;let o=d.includes(a);return(0,n.jsx)(s.A7,{children:o?(0,n.jsx)(_,{currentVideoId:t,index:a,item:e,onVideoClick:l,priority:i}):(0,n.jsx)(H,{})},"playlist-slide-".concat(null!=(r=e.videoId)?r:a))})}),(0,n.jsx)(s.Q8,{}),(0,n.jsx)(s.Oj,{})]}):null},G={desktop:[[300,250]],laptop:[[300,250]],mobile:[],tablet:[[300,250]]};(0,m.U)("\n fragment VideoData on Video {\n description\n duration\n url\n id\n publishedDate\n thumbnailUrl\n title\n }\n");let Y=e=>{var t;let{allowAutoplay:l=!1,allowSticky:i=!1,className:m="",disableVAMs:b=!0,hidePlaylist:E=!1,pageTargeting:A,playlist:S=[],priority:y=!1,vastTag:j,video:C}=e,k=(0,a.useId)(),N=(0,a.useRef)(null),V=(0,a.useRef)(null),[P,L]=(0,a.useState)(!1),{hasConsent:T}=(0,g.S)({id:p.Ok.ADVERTISEMENT,type:"category"}),F=l&&T,{containerRef:z,isFullscreen:B,setIsFullScreen:O,toggleFullscreen:D,videoRef:W}=(()=>{let e=(0,a.useRef)(null),t=(0,a.useRef)(null),[l,n]=(0,a.useState)(!1),r=(0,a.useCallback)(()=>{let a=null==e?void 0:e.current,r=null==t?void 0:t.current;l?document&&document.exitFullscreen():(n(!0),(null==a?void 0:a.requestFullscreen)?null==a||a.requestFullscreen():(null==a?void 0:a.webkitRequestFullScreen)?null==a||a.webkitRequestFullScreen():(null==a?void 0:a.webkitEnterFullscreen)?null==a||a.webkitEnterFullscreen():(null==a?void 0:a.msRequestFullscreen)?a.msRequestFullscreen():(null==a?void 0:a.mozRequestFullScreen)?a.mozRequestFullScreen():(null==r?void 0:r.webkitEnterFullscreen)&&(null==r||r.webkitEnterFullscreen()))},[l]);return{containerRef:e,isFullscreen:l,setIsFullScreen:n,toggleFullscreen:r,videoRef:t}})(),q=(0,s.dv)("md"),[_,H]=(0,a.useState)(null),[Y,K]=(0,a.useState)(!1),[Q,J]=(0,a.useState)(0),[Z,$]=(0,a.useState)(!0),[ee,et]=(0,a.useState)(!0),el=(null==A||null==(t=A.adTargeting)?void 0:t.sponsored)==="true",en=(0,a.useMemo)(()=>S[Q]||C,[C,S,Q]);(0,a.useEffect)(()=>{$(!1),setTimeout(()=>{$(!0)},20)},[Q]);let ea=(0,a.useMemo)(()=>Q{eg(q?"838":"414")},[q]);let eh=ec?"".concat(ec,"?w=").concat(ep,"&width=").concat(ep,"&format=webp"):void 0,[ef,ew]=(0,a.useState)(!1),[ex,eb]=(0,a.useState)(!1),[eE,eA]=(0,a.useState)(i),{bottomAdhesion:eS}=(0,h.A)(f.lR),[ey,ej]=(0,a.useState)(!1),eC=F&&!ef||ex,ek=(0,s.v1)(N),eN=(null==ek?void 0:ek.isIntersecting)||!1,eV=(()=>{let[e,t]=(0,a.useState)(!0),l=(0,a.useCallback)(()=>{t("visible"===document.visibilityState)},[t]);return(0,a.useEffect)(()=>(document.addEventListener("visibilitychange",l),()=>{document.removeEventListener("visibilitychange",l)}),[l]),e})();(0,a.useEffect)(()=>{eN&&ej(!0)},[eN]);let eP=(0,a.useCallback)(()=>{if(T||ex){if(_&&(null==_?void 0:_.getRemainingTime())!==0&&(null==_?void 0:_.getRemainingTime())!==-1)_.resume();else if(_||Y){var e;null==(e=W.current)||e.play()}}},[_,Y,W,T,ex]),eR=(0,a.useCallback)(()=>{if(!eC||!eV||ef)if(_&&(null==_?void 0:_.getRemainingTime())!==0&&(null==_?void 0:_.getRemainingTime())!==-1)_.pause();else{var e;null==(e=W.current)||e.pause()}},[_,W,eC,ef,eV]),{isSticky:eM}=(e=>{let{allowAutoplay:t,allowSticky:l,isDocumentVisible:n,isVisible:r,pauseVideo:i,playVideo:o,playerId:u}=e,d=(0,h.A)(f.Qs),{deleteVideoManagerEntry:c,setVideoManagerData:m}=(0,h.A)(),v=(0,s.dv)(),p="lg"===v||"xl"===v||"2xl"===v,[g,x]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{m({isVisible:r,playerId:u,...r&&{lastSeen:Date.now()}})},[c,r,u,m]),(0,a.useEffect)(()=>()=>{c(u)},[c,u]),(0,a.useEffect)(()=>{if(!p)return void x(!1);let e=w(d),t=d[u];x(!!(!e.length&&l&&(null==t?void 0:t.lastSeen)))},[p,d,u,l]),(0,a.useEffect)(()=>{var e;let a=Object.keys(d).length>1,s=w(d),c=s.sort((e,t)=>(e.lastSeen||0)-(t.lastSeen||0)),m=s.some(e=>e.playerId!==u),v=(null==(e=c[0])?void 0:e.playerId)===u,h=n&&t&&(m&&v||(r||g)&&!m||!a&&r),f=!n||m&&!v||!a&&!r&&!g;if(h)o();else if(f)if(a)i();else{let e=d[u];!r&&l&&(null==e?void 0:e.lastSeen)&&p&&t?setTimeout(()=>{r||g||i()},150):i()}},[d,u,g,t,r,o,i,n,l,p]),{isSticky:g}})({allowAutoplay:eC,allowSticky:eE,isDocumentVisible:eV,isVisible:eN,pauseVideo:eR,playerId:k,playVideo:eP}),eL=(0,a.useCallback)(()=>{J(e=>e+1)},[]);(0,a.useEffect)(()=>{let e=W.current,t=()=>{eb(!1),S.length>1&&eL()};return e&&e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[W,eL,S]);let eI=(0,a.useCallback)(()=>{var e,t;let l=!(null==(e=W.current)?void 0:e.paused);L(l),l?(ew(!0),eb(!1)):(ew(!1),eb(!0)),l?eR():(et(!0),T?eP():null==(t=W.current)||t.play())},[eR,eP,W,T]),eT=(0,a.useCallback)(()=>{document.fullscreenElement||O(!1)},[O]);(0,a.useEffect)(()=>{let e=W.current;return document.addEventListener("fullscreenchange",eT),null==e||e.addEventListener("webkitendfullscreen",eT),()=>{document.removeEventListener("fullscreenchange",eT),document.removeEventListener("webkitendfullscreen",eT)}},[eT,W]);let eF=(0,a.useMemo)(()=>S.map(e=>({...e,title:null==e?void 0:e.videoName})),[S]),ez=()=>{ei(!er),null==_||_.setVolume(+!!er)},eB=Math.round(Number(C.duration||"0")/1e3);return(0,n.jsxs)("div",{className:m,children:[(0,n.jsxs)("div",{ref:N,children:[eM&&(0,n.jsx)("div",{className:"aspect-video"}),(0,n.jsxs)("div",{className:(0,u.A)({"fixed right-0 bottom-0 z-[9999] m-4 max-h-[200px] max-w-[350px]":eM,"grid h-screen w-screen":B}),onBlur:()=>es(!1),onFocus:()=>es(!0),onMouseMove:()=>{es(!0),V.current&&clearTimeout(V.current),V.current=window.setTimeout(()=>{es(!1)},2500)},ref:z,style:{bottom:"".concat(eS,"px")},children:[(0,n.jsxs)(s.Vo,{as:"video",aspectRatio:"16/9",className:(0,u.A)({"[&>div]:max-h-screen [&>div]:overflow-visible":B,"m-auto":B,"overflow-visible":eM}),"data-testid":"video_player",ref:W,src:em,videoProps:{autoPlay:!1,className:(0,u.A)({"w-full":!eM,"w-screen ":B}),controls:!1,"data-nitrous-video-description":en.description,"data-nitrous-video-duration":null==eB?void 0:eB.toString(),"data-nitrous-video-id":en.videoId,"data-nitrous-video-publication-date":en.publishedDate,"data-nitrous-video-title":en.videoName,"data-nitrous-video-type":eB>600?"long form":"short form","data-nitrous-video-url":en.videoFileUrl,muted:er,onLoadedMetadata:()=>{let e=W.current;e&&ed("".concat(Math.round(1e3*e.duration)))},onLoadStart:()=>{let e=W.current;e&&(e.volume=.6)},playsInline:!0,poster:eh},children:[P&&!eM&&ee&&!el&&T&&(0,n.jsx)("div",{className:"absolute inset-0 hidden md:block",children:(0,n.jsxs)("div",{className:"relative flex h-full items-center justify-center",children:[(0,n.jsx)(s.K0,{"aria-label":"Close advertisement",className:"absolute top-2 right-2 z-50",colorScheme:"neutral-2",compact:!0,"data-id":v.Co.CloseAdIconButton,"data-parent":v.Co.VideoPlayer,onClick:e=>{e.stopPropagation(),et(!1)},ripple:!1,rounded:!0,size:"small",children:(0,n.jsx)(o(),{path:r.hyP,size:.8})}),(0,n.jsx)("div",{className:"relative z-40 flex min-h-[250px]",children:(0,n.jsx)(x.A,{className:"flex min-h-[250px] lg:mb-0","data-testid":c.B2.PausedVideoBanner,pageTargeting:A,sizes:G,slotIdPrefix:c.B2.PausedVideoBanner,targeting:{native:"300x250",ntvPlacement:"1115836",pos:["pausevideobanner"]}})})]})}),(0,n.jsx)("button",{"aria-label":"Toggle Play Video",className:"absolute inset-0","data-id":v.Co.VideoOverlayTogglePlayButton,"data-parent":v.Co.VideoPlayer,onClick:eI}),eo&&er&&(0,n.jsx)(R,{"data-testid":"mute_button",isMute:er,onClick:()=>ez()}),(0,n.jsx)(U,{containerRef:z,duration:eu||"0",initialVolume:.6,isMuted:er,loadNextVideo:eL,showControls:eo,showNextButton:ea,toggleFullscreen:D,toggleMute:ez,togglePlayVideo:eI,videoRef:W}),ey&&Z&&T&&(0,n.jsx)(M,{canAutoplay:F,containerRef:z,duration:eu||"0",handleMuteOnClick:()=>ez(),isFullscreen:B,isMute:er,pageTargeting:A,setAdsError:K,setAdsManager:H,vastTemplate:j,videoId:ev||"",videoRef:W})]}),eM&&(0,n.jsx)(s.K0,{"aria-label":"Close video player",className:"absolute -top-3 -right-3 z-500",colorScheme:"neutral-2",compact:!0,"data-id":v.Co.CloseVideoPlayerIconButton,"data-parent":v.Co.VideoPlayer,onClick:()=>eA(!1),ripple:!1,rounded:!0,size:"small",children:(0,n.jsx)(o(),{path:r.hyP,size:.8})})]})]}),!E&&(0,n.jsx)(X,{currentVideoId:ev,onVideoClick:J,playlist:eF,priority:y}),d.X.NEXT_PUBLIC_FEATURE_VAMS&&!b&&(0,n.jsx)("div",{className:"py-0",children:(0,n.jsx)("div",{className:"min-h-[50px] lg:min-h-0",children:(0,n.jsx)(I,{isFullscreen:B,isSticky:eM,videoId:ev||"",videoRef:W})})})]})}},43687:(e,t,l)=>{l.d(t,{W:()=>a});var n=l(3923);let a=e=>{let{defaultSize:t,sizeConfig:l}=e,a="",i=Object.entries(l).sort(r);i.forEach((e,l)=>{let[r]=e,o=n.S[r];if(0===l)a="(max-width: ".concat(o,") ").concat(t);else{let e=i[l-1][1];a="".concat(a,", (max-width: ").concat(o,") ").concat(e)}});let o=i[i.length-1][1];return a="".concat(a,", ").concat(o)},r=(e,t)=>{let l=parseInt(n.S[e[0]]),a=parseInt(n.S[t[0]]);return Number(l)-Number(a)}},50602:(e,t,l)=>{l.d(t,{A:()=>o});var n=l(30832),a=l.n(n),r=l(8963),i=l.n(r);a().extend(i());let o=e=>{let t="m:ss",l=0;return e&&(l=+e),l>=36e5&&(t="H:mm:ss"),a().duration(l).format(t)}},66141:(e,t,l)=>{l.d(t,{fD:()=>n,rA:()=>a});let n="https://inskrt.com/uploads/2022/05/Ghosted-Out-Car.png",a="https://st.motortrend.com/app/themes/motortrend/mantle/modules/assets/motortrend-logo-share.png"},66308:(e,t,l)=>{l.d(t,{A:()=>a});var n=l(12115);let a=e=>{let[t,l]=(0,n.useState)(),[a,r]=(0,n.useState)(e?Array.from({length:e},(e,t)=>t):[]);return(0,n.useEffect)(()=>{if(!t)return;let e=e=>{let t=(null==e?void 0:e.slidesInView())||[];t.join(",")!==a.join(",")&&r(t)};return t.on("slidesInView",e),e(t),()=>{t.off("slidesInView",e)}},[t,a]),[a,l]}}}]); //# sourceMappingURL=1353-751ac3aafab7266e.js.map