!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7f880b17-d5cd-449b-a2fc-62077f586f0e",e._sentryDebugIdIdentifier="sentry-dbid-7f880b17-d5cd-449b-a2fc-62077f586f0e")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3881],{3518:(e,t,a)=>{a.d(t,{Z:()=>d,i:()=>l.i});var n=a(6029),i=a(90510),s=a(494),r=a(5339),l=a(5921),o=a(52905);function d(e){let{value:t,fromUnit:a}=e,d=(0,s.d4)(o.Y);if(!t)return null;if((0,r.C)(t,a).to("m")>=1e3)return(0,n.jsx)(u,{value:t,fromUnit:a});if(d===l.i.Imperial){let e=function(e,t){let a=(0,r.C)(e,t).to("feet"),n=Math.floor(a),i=Math.round((0,r.C)(a-Math.floor(a),"ft").to("in"));return 12===i&&(n+=1,i=0),{ft:n,in:i}}(t,a);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.Gr,{value:e.ft,style:"unit",unit:"foot",unitDisplay:"narrow"}),"\xa0",(0,n.jsx)(i.Gr,{value:e.in,style:"unit",unit:"inch",unitDisplay:"narrow"})]})}return(0,n.jsx)(i.Gr,{value:(0,r.C)(t,a).to("cm"),style:"unit",unit:"centimeter",unitDisplay:"short"})}function u(e){let{value:t,fromUnit:a}=e,d=(0,s.d4)(o.Y);return t?d===l.i.Imperial?(0,n.jsx)(i.Gr,{value:(0,r.C)(t,a).to("mile"),style:"unit",unit:"mile",maximumFractionDigits:1,unitDisplay:"short"}):(0,n.jsx)(i.Gr,{value:(0,r.C)(t,a).to("km"),style:"unit",unit:"kilometer",maximumFractionDigits:1,unitDisplay:"short"}):null}},3763:(e,t,a)=>{a.d(t,{Q:()=>c});var n=a(6029),i=a(8329),s=a(21377),r=a(55729),l=a(94474),o=a.n(l),d=a(45860),u=a(62859);let c=e=>{var t,a,l;let{stage:c,size:p=24,national:m}=e,g=(0,r.useContext)(u.Ws),{data:h}=(0,d.Ay)([s.ZXN.image(c.slug),"HEAD"],{fetcher:e=>{let[t]=e;return(0,s.m_X)(t,{isApiRoute:!1})}}),{data:f}=(0,d.Ay)([(null==(t=c.stageParent)?void 0:t.description)?s.ZXN.image(o()(c.stageParent.description,{lower:!0})):null,"HEAD"],{fetcher:e=>{let[t]=e;return(0,s.m_X)(t,{isApiRoute:!1})}}),v=(null==(l=c.country)||null==(a=l.alpha2)?void 0:a.toLowerCase())||"international";return g===s.QCR.Cycling&&(h?v=c.slug:f&&(v=o()(c.stageParent.description,{lower:!0}))),(0,n.jsx)(i.w,{flag:v,size:p,national:m,fallback:(0,n.jsx)(i.w,{alpha2:"international",size:p})})}},3881:(e,t,a)=>{a.d(t,{E:()=>l});var n=a(64082),i=a(6029),s=a(41249),r=a(43451);function l(e){var{height:t=800,width:a="100%",rowHeight:l=45,wrapperStyle:o={},rows:d,animate:u=!1,rowGap:c=8,uniqueKey:p}=e,m=(0,n.T)(e,["height","width","rowHeight","wrapperStyle","rows","animate","rowGap","uniqueKey"]);return 0===t?null:(0,i.jsx)(s.az,Object.assign({maxW:"100%",bg:"surface.s1",overflow:"hidden"},m,{style:o},{children:(0,i.jsx)(r.D,Object.assign({animate:u,width:a,height:d&&l?d*(l+c):t,uniqueKey:p},{children:(0,i.jsx)(i.Fragment,{children:d?Array(d).fill(null).map((e,t)=>(0,i.jsx)("rect",{x:0,y:t*(l+c),width:"100%",height:l},t)):(0,i.jsx)("rect",{x:0,y:0,width:"100%",height:t})})}))}))}},7263:(e,t,a)=>{a.d(t,{n:()=>n.n});var n=a(3959)},7447:(e,t,a)=>{a.d(t,{A:()=>r});var n=a(6029),i=a(41249),s=a(54409);function r(e){let{isFollowed:t,disabled:a,onClick:r,isOnOverlay:l,...o}=e;return(0,n.jsx)(i.$n,{m:"0",p:"0",onClick:r,noFocus:!0,noActive:!0,variant:"unshielded",disabled:a,...o,children:t?(0,n.jsx)(s.zQC,{icon:"follow-active",fill:l?"onColor.primary":"primary.default",width:24,height:24,"data-testid":"follow-icon-star-button"}):(0,n.jsx)(s.zQC,{icon:"follow-default",fill:l?"onColor.primary":"neutral.default",width:24,height:24,"data-testid":"deselected-icon-star-button"})})}},8712:(e,t,a)=>{a.d(t,{Q:()=>m});var n=a(6029),i=a(21377),s=a(55729),r=a(494),l=a(8973),o=a(70757),d=a(76410),u=a(10794),c=a(37356),p=a(7447);let m=e=>{let{id:t,location:a}=e,m=(0,s.useMemo)(()=>(0,c.Uy)(),[]),g=(0,r.d4)(e=>m(e,t)),h=(0,r.d4)(u.fg),f=(0,r.wA)(),v=()=>{f((0,o.q$)(i.bq7.UniqueStages,t)),(0,d.g2)({id:t,type:l.b.UniqueStages,location:a,isFollowed:!1})},x=()=>{f((0,o.UQ)(i.bq7.UniqueStages,t)),(0,d.g2)({id:t,type:l.b.UniqueStages,location:a,isFollowed:!0})};return(0,n.jsx)(p.A,{disabled:h,isFollowed:g,onClick:()=>{g?v():x()},isOnOverlay:!0})}},8973:(e,t,a)=>{a.d(t,{b:()=>n,y:()=>i});var n=function(e){return e.Event="event",e.Team="team",e.UniqueTournament="unique_tournament",e.Tournament="tournament",e.Player="player",e.Stage="stage",e.Substage="substage",e.UniqueStages="unique_stage",e}({}),i=function(e){return e.MainMatches="main_matches",e.MainLeagues="main_leagues",e.Header="header",e.EventHeader="event_header",e.EventsTab="events_tab",e.EventWidget="event_widget",e.MatchesSection="matches_section",e.H2HSection="h2h_section",e.FloatingHeader="floating_header",e.Favorites="favorites",e.PlayerStatistics="player_statistics",e.RacesTab="races_tab",e.FightNight="fight_night",e.Fights="fights",e.PopularPlayers="popular_players",e.Search="search",e.Popup="popup",e}({})},9185:(e,t,a)=>{a.d(t,{y:()=>z});var n=a(6029),i=a(21377),s=a(4967),r=a(95083),l=a(41249),o=a(55729),d=a(90248),u=a(90510),c=a(45860),p=a(65789),m=a(62859),g=a(76868),h=a(40548),f=a(83110);let v=JSON.parse('{"3":{"gap":"gap"},"4":{"gap":"gap"},"5":{"gap":"gap"},"victories":"wins","points":"Pts","sprint":"Pts","climb":"Pts","youngRider":"young_rider","gap":"time","lapTime":"bestLap","totalTime":"time","Finished":"stage_result_finished","Accident":"stage_result_accident","Fuelpump":"stage_result_fuelpump","Reargear":"stage_result_reargear","Electrical":"stage_result_electrical","Transmission":"stage_result_transmission","Garage":"stage_result_garage","Clutch":"stage_result_clutch","Brakes":"stage_result_brakes","Engine":"stage_result_engine","Suspension":"stage_result_suspension","Tooslow":"stage_result_too_slow"}');var x=a(27892);let y=e=>{let{id:t,selectedStageTypeId:a,children:i}=e,s=(0,x.O)(v,t,"".concat(a));return(0,n.jsx)(d.A,{id:s,children:e=>"function"==typeof i?i(e):(0,n.jsx)(n.Fragment,{children:e})})};var b=function(e){return e.Time="time",e.Young="young",e.Sprint="sprint",e.Climb="climb",e}({}),j=a(49519),S=a(54409),w=a(17502);let C=e=>["gap","totalTime","lapTime","status","time","youngRider"].includes(e),T=(e,t)=>{let a=28;return C(e)?a=80:"points"===e&&t&&(a=40),a},L=e=>{var t,a,s,r;let{stageResults:o,columns:d,sportSlug:u,showImage:c,positionKey:p="position",isTeam:m,outrightType:g,showTeamColor:h,isHighlighted:f,isFirst:v,hasLongPoints:x}=e,b=m?o.team.teamColors.primary:null==(a=o.parentTeam)||null==(t=a.teamColors)?void 0:t.primary,C=!!o.status&&"Finished"!==o.status,L=!o.position||C,k=u===i.QCR.Cycling,E=0;o.position&&(E=o.gridPosition?o.gridPosition-o.position:o.previousPosition?o.previousPosition-o.position:0);let _=Object.keys(d).filter(e=>d[e]),A=_.reduce((e,t)=>e+T(t,x),0);return(0,n.jsx)(w.A,{team:o.team,outrightType:g,children:(0,n.jsxs)(l.so,{h:48,align:"center",justify:"space-between",bg:f?"neutral.highlight":void 0,hoverBg:k?void 0:"surface.s2",cursor:k?"default":"pointer",borderTop:v?void 0:"1px solid onSurface.nLv4",children:[h&&(0,n.jsx)(l.az,{bg:L?"neutral.default":b,minW:4,w:4,h:36,br:"0 2px 2px 0"}),(0,n.jsxs)(l.so,{h:32,direction:"column",align:"center",pl:"sm",pr:"lg",children:[(0,n.jsx)(S.kKd,{fill:E>0?"success.default":"transparent"}),(0,n.jsx)(l.EY,{w:16,font:"table.medium",color:L?"onSurface.nLv3":"onSurface.nLv1",align:"center",as:"div",children:o[p]||"-"}),(0,n.jsx)(S.kKd,{fill:E<0?"error.default":"transparent",style:{transform:"rotate(180deg)"}})]}),c&&(0,n.jsx)(l.az,{pr:"md",children:(0,n.jsx)(j.p,{id:o.team.id,name:o.team.name,size:32})}),(0,n.jsxs)(l.so,{direction:"column",overflow:"hidden",flex:"1 1 auto",justify:"flex-start",children:[m&&(0,n.jsx)(l.EY,{as:"bdi",font:"table.medium",color:"onSurface.nLv1",lineClamp:1,children:o.team.name}),!m&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.so,{align:"center",mb:"xxs",children:[(0,n.jsx)(l.EY,{as:"bdi",font:"table.medium",color:L?"onSurface.nLv3":"onSurface.nLv1",mr:"xs",lineClamp:1,children:o.team.name}),(0,n.jsx)(j.w,{alpha2:null==(s=o.team.country)?void 0:s.alpha2,national:!0,size:12,d:"inline-block"})]}),(null==o||null==(r=o.parentTeam)?void 0:r.name)&&(0,n.jsx)(l.EY,{as:"bdi",font:"assistive.micro",color:"onSurface.nLv3",lineClamp:1,ellipsis:!0,children:o.parentTeam.name})]})]}),(0,n.jsx)(l.so,{mr:"md",grow:1,maxW:A,justify:"space-between",children:_.map(e=>{let t=o[e]||(["gap","time"].includes(e)?"":0);return"status"===e&&(t=(0,n.jsx)(y,{id:t})),(0,n.jsx)(l.EY,{font:"table.medium",color:L?"onSurface.nLv3":"onSurface.nLv1",w:T(e,x),align:"right",children:t},e)})})]})})},k=(e,t)=>{if(t===i.CEM.Season)return{victories:!1,polePositions:!1,podiums:!1,points:!0};if(!e)return{};let{gridPosition:a,pitStops:n,laps:s,gap:r,lapTime:l,lapsLed:o,status:d,totalTime:u}=e,c={};return a&&(c.gridPosition=!0),n&&s&&void 0!==r?c={...c,pitStops:!0,laps:!0,points:!1,gap:!0}:s&&l&&void 0!==r?c={...c,laps:!0,lapTime:!0,points:!1,gap:!0}:s&&o&&d?c={...c,laps:!0,lapsLed:!0,points:!1,status:!0}:s&&void 0!==r&&u?c=c.gridPosition?{...c,laps:!0,points:!1,gap:!0}:{...c,laps:!0,gap:!0,points:!1,totalTime:!0}:s&&l?c={...c,laps:!0,points:!1,lapTime:!0}:s&&void 0!==r?c={...c,laps:!0,points:!1,gap:!0}:s?c={...c,points:!1,laps:!0}:void 0!==r&&(c={...c,points:!1,gap:!0}),c},E=(e,t)=>{let a=k(e[0],t);return e.reduce((e,t)=>(t.updatedAtTimestamp>e.updatedAtTimestamp&&(e.updatedAtTimestamp=t.updatedAtTimestamp),t.isLive&&(e.isLive=!0),Object.keys(a).forEach(a=>{t[a]&&(e.columns[a]=!0)}),e),{columns:{...a},isLive:!1,updatedAtTimestamp:0})},_={[b.Young]:"youngRiderPosition",[b.Sprint]:"sprintPosition",[b.Climb]:"climbPosition"},A=e=>{let{results:t,stageTypeId:a,outrightTeamType:c,uniqueStageName:p,highlightedTeamId:g,info:v}=e,x=c===i.SNJ.Team,{isMobile:j}=(0,r.$c)(),{updatedAtTimestamp:S}=E(t,a),[w,C]=(0,o.useState)(b.Time),T={[w===b.Young?"youngRider":w]:!0},k=(0,o.useContext)(m.Ws),A=Object.keys(T).filter(e=>!!T[e]),M=t.some(e=>void 0!==e.youngRiderPosition||void 0!==e.youngRider),D=t.some(e=>void 0!==e.sprintPosition||void 0!==e.sprint),I=t.some(e=>void 0!==e.climbPosition||void 0!==e.climb),z=M||D||I,P=t.filter(e=>w===b.Time||!!e.position&&e[_[w]]).sort((e,t)=>e[_[w]]&&t[_[w]]?e[_[w]]-t[_[w]]:0);return(0,n.jsxs)(l.az,{bg:"surface.s1",children:[z&&(0,n.jsx)(l.az,{borderTop:a===i.CEM.Season?void 0:[void 0,"onSurface.nLv4"],borderBottom:["onSurface.nLv4",void 0],px:"md",py:"sm",children:(0,n.jsxs)(l.tU,{value:w,variant:j?"secondary":"tertiary",onChange:e=>{C(e)},children:[(0,n.jsx)(l.tU.Tab,{tabKey:b.Time,children:(0,n.jsx)(d.A,{id:a===i.CEM.Season?"general_classification_short":"time"})}),M&&(0,n.jsx)(l.tU.Tab,{tabKey:b.Young,children:(0,n.jsx)(d.A,{id:"young"})}),D&&(0,n.jsx)(l.tU.Tab,{tabKey:b.Sprint,children:(0,n.jsx)(d.A,{id:"sprint"})}),I&&(0,n.jsx)(l.tU.Tab,{tabKey:b.Climb,children:(0,n.jsx)(d.A,{id:"climb"})})]})}),(0,n.jsx)(l.EY,{font:"body.small",color:"onSurface.nLv1",p:"lg",pb:"sm",align:"right",as:"div",children:(0,n.jsx)(d.A,{id:"basic.lastUpdated",values:{dateTime:(0,n.jsx)(u.XU,{value:1e3*S,...s.or.dateTime})}})}),(0,n.jsxs)(l.so,{h:48,align:"center",pr:"sm",children:[(0,n.jsx)(l.so,{h:16,mr:"sm",align:"center",children:(0,n.jsx)(l.EY,{w:32,font:"table.medium",color:"onSurface.nLv3",align:"center",as:"div",children:(0,n.jsx)(d.A,{id:"position.short"})})}),(0,n.jsx)(l.so,{h:16,grow:1,mr:"sm",align:"center",children:(0,n.jsx)(l.EY,{font:"table.medium",color:"onSurface.nLv3",children:(0,n.jsx)(d.A,{id:x?"team":(0,f.Jx)(p)})})}),A.map((e,t)=>(0,n.jsx)(l.so,{h:16,borderLeft:t?"onSurface.nLv4":void 0,px:"sm",align:"center",children:(0,n.jsx)(l.EY,{lineHeight:"16px",font:"table.medium",color:"onSurface.nLv3",align:"center",children:(0,n.jsx)(y,{id:e},e)})},e))]}),P.map((e,t)=>(0,n.jsx)(L,{sportSlug:k,stageResults:e,columns:T,isTeam:x,outrightType:c,isHighlighted:e.team.id===g,isFirst:0===t,positionKey:_[w]},e.id)),(null==v?void 0:v.note)&&(0,n.jsx)(h.N,{p:"lg",pt:"sm",children:v.note})]})},M=e=>{var t;let{fastestLapData:a,outrightTeamType:i}=e;return(0,n.jsx)(l.az,{p:"sm",children:(0,n.jsxs)(l.so,{br:"lg",bg:"surface.s2",p:"md",align:"center",children:[(0,n.jsx)(S._Ll,{mr:"md",fill:"#A32090"}),(0,n.jsxs)(l.az,{grow:1,children:[(0,n.jsx)(w.A,{team:a.team,outrightType:i,children:(0,n.jsx)(l.EY,{font:"table.medium",color:"onSurface.nLv1",as:"div",hover:!0,children:a.team.name})}),(0,n.jsx)(l.EY,{font:"assistive.micro",color:"onSurface.nLv3",as:"div",children:(null==(t=a.parentTeam)?void 0:t.name)||""})]}),a.time&&(0,n.jsxs)(l.az,{children:[(0,n.jsx)(l.EY,{font:"table.medium",color:"onSurface.nLv1",as:"div",children:a.time}),(0,n.jsx)(l.EY,{font:"assistive.micro",color:"onSurface.nLv3",as:"div",children:(0,n.jsx)(d.A,{id:"fastestLap.label"})})]})]})})};var D=a(97859);let I=e=>{let{results:t,fastestLapData:a,stageTypeId:r,outrightTeamType:o,uniqueStageName:c,highlightedTeamId:p,selectedStageType:m,info:g}=e,v=o===i.SNJ.Team,{columns:x,updatedAtTimestamp:b}=E(t,r),j="Formula 1"===c,S=Object.keys(x).filter(e=>!!x[e]),w=t.some(e=>e.points&&e.points.toString().length>2);return(0,n.jsxs)(l.az,{pb:"sm",children:[(0,n.jsx)(l.EY,{font:"body.small",color:"onSurface.nLv1",p:"sm",align:"right",block:!0,children:(0,n.jsx)(d.A,{id:"basic.lastUpdated",values:{dateTime:(0,n.jsx)(u.XU,{value:1e3*b,...s.or.dateTime})}})}),"Formula 1"===c&&a&&(0,n.jsx)(M,{fastestLapData:a,outrightTeamType:i.SNJ.Competitor}),(0,n.jsxs)(l.so,{h:48,align:"center",pl:j?4:void 0,pr:"sm",children:[(0,n.jsx)(l.so,{h:16,mr:"sm",align:"center",children:(0,n.jsx)(l.EY,{w:32,font:"table.medium",color:"onSurface.nLv3",align:"center",as:"div",children:(0,n.jsx)(d.A,{id:"position.short"})})}),(0,n.jsx)(l.so,{h:16,grow:1,mr:"sm",align:"center",children:(0,n.jsx)(l.EY,{font:"table.medium",color:"onSurface.nLv3",children:(0,n.jsx)(d.A,{id:v?"team":(0,f.Jx)(c)})})}),S.map((e,t)=>(0,n.jsx)(l.so,{h:16,borderLeft:t?"onSurface.nLv4":void 0,px:"sm",align:"center",children:(0,n.jsx)(l.EY,{lineHeight:"16px",font:"table.medium",color:"onSurface.nLv3",align:"center",children:(0,n.jsx)(y,{id:e,selectedStageTypeId:null==m?void 0:m.id},e)})},e))]}),t.map((e,t)=>(0,n.jsx)(L,{stageResults:e,columns:x,showImage:r!==i.CEM.Event,showTeamColor:j,isTeam:v,outrightType:o,isHighlighted:e.team.id===p,isFirst:0===t,hasLongPoints:w},e.team.id)),(null==g?void 0:g.note)&&(0,n.jsx)(h.N,{p:"lg",pt:"sm",children:g.note})]})},z=e=>{let{stageId:t,stageTypeId:a,outrightTeamType:s,uniqueStageName:l,selectedStageType:d,info:u}=e,{data:h,error:f}=(0,c.Ay)(i.dVR.standings(t,s),{refreshInterval:15e3}),v=(0,o.useContext)(m.Ws),{isMobile:x}=(0,r.$c)(),y=(0,o.useMemo)(()=>{let e=null==h?void 0:h.standings.find(e=>!!e.fastestLapTime);return e?{team:e.team,parentTeam:e.parentTeam,time:e.fastestLapTime}:void 0},[h]);return f?(0,n.jsx)(p.HH,{isCard:x,children:(0,n.jsx)(g.p,{graphic:"no-standings",descriptionMessageId:"stats.noResults",mt:[0,"xxl"],mb:[0,"14"],pb:["30","xxl"]})}):h?v===i.QCR.Cycling?(0,n.jsx)(A,{results:h.standings,stageTypeId:a,outrightTeamType:s,fastestLapData:y,uniqueStageName:l,info:u}):(0,n.jsx)(p.HH,{isCard:x,children:(0,n.jsx)(I,{results:h.standings,stageTypeId:a,outrightTeamType:s,fastestLapData:y,uniqueStageName:l,selectedStageType:d,info:u})}):(0,n.jsx)(D.Y,{})}},12047:(e,t,a)=>{a.d(t,{Ay:()=>r});var n=a(95083),i=a(21501),s=a(55729);function r(){let{isInMobileTabs:e=!0,isSportMenuVisible:t=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[a,r]=(0,s.useState)(0),l=(0,i.YU)(),{isMobile:o}=(0,n.$c)(),d=50*!!e,u=48+d+48*!!t;return(0,s.useEffect)(()=>{o&&r(l===i.Dh.Up?u:d)},[l,o]),a}},17189:(e,t,a)=>{a.d(t,{N:()=>l});var n=a(6029),i=a(90248);let s=JSON.parse('{"Day 1":{"id":"dayN","values":{"n":1}},"Day 2":{"id":"dayN","values":{"n":2}},"Day 3":{"id":"dayN","values":{"n":3}},"Day 4":{"id":"dayN","values":{"n":4}},"Day 5":{"id":"dayN","values":{"n":5}},"Free Practice 1":{"id":"freePracticeN","values":{"n":1}},"Free Practice 2":{"id":"freePracticeN","values":{"n":2}},"Free Practice 3":{"id":"freePracticeN","values":{"n":3}},"Practice 1":{"id":"practiceN","values":{"n":1}},"Practice 2":{"id":"practiceN","values":{"n":2}},"Practice 3":{"id":"practiceN","values":{"n":3}},"Practice 4":{"id":"practiceN","values":{"n":4}},"Qualifying":{"id":"Qualification"},"Qualification 1":{"id":"qualificationN","values":{"n":1}},"Qualification 2":{"id":"qualificationN","values":{"n":2}},"Qualification 3":{"id":"qualificationN","values":{"n":3}},"Qualification 4":{"id":"qualificationN","values":{"n":4}},"Race 1":{"id":"raceN","values":{"n":1}},"Race 2":{"id":"raceN","values":{"n":2}},"Race 3":{"id":"raceN","values":{"n":3}},"Race":"race"}');var r=a(27892);let l=e=>{let{id:t}=e;return(0,n.jsx)(i.A,{id:(0,r.O)(s,t),values:(0,r.B)(s,t)})}},18612:(e,t,a)=>{a.d(t,{D:()=>n.D});var n=a(43451)},24313:(e,t,a)=>{a.d(t,{M:()=>i,l:()=>s});var n=a(55729);let i=(0,n.createContext)({}),s=()=>(0,n.useContext)(i);i.displayName="EventCellContext"},28171:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(95083),i=a(78383),s=a.n(i),r=a(76410);function l(){let{isMobile:e}=(0,n.$c)();return{logTabChange:e?r.yy:s()}}},28760:(e,t,a)=>{a.d(t,{n:()=>g});var n=a(6029),i=a(32523),s=a(21377),r=a(21501),l=a(41249);a(55729);var o=a(90248),d=a(45860);a(62859);var u=a(76868);a(8973);var c=a(7263);a(8712),a(26331),a(70591),a(28132);var p=a(83110);a(24159),a(84942),a(45948),a(95457),a(28171),a(55057),a(18612);var m=a(9185);let g=e=>{let{stageId:t,uniqueStageName:a}=e,{data:g,error:h}=(0,d.Ay)([s.dVR.standings(t,s.SNJ.Competitor),"HEAD"],{fetcher:c.n}),{data:f}=(0,d.Ay)([s.dVR.standings(t,s.SNJ.Team),"HEAD"],{fetcher:c.n});return(0,r.hX)()||void 0===g&&!h?(0,n.jsx)(i.E,{uniqueKey:"unique-stage-container-cl",height:1179,py:"sm",animate:!0}):void 0===g||void 0===f?null:g&&f?(0,n.jsxs)(l.tU,{variant:"secondary",initialValue:1,children:[(0,n.jsxs)(l.so,{bg:"surface.s1",px:"lg",py:"sm",borderBottom:"onSurface.nLv4",children:[(0,n.jsx)(l.tU.Tab,{tabKey:1,children:(0,n.jsx)(o.A,{id:(0,p.Jx)(a)})}),(0,n.jsx)(l.tU.Tab,{tabKey:2,children:(0,n.jsx)(o.A,{id:"teams"})})]}),(0,n.jsx)(l.tU.Panel,{tabKey:1,children:(0,n.jsx)(l.az,{p:["sm",0],children:(0,n.jsx)(m.y,{stageId:t,stageTypeId:s.CEM.Season,uniqueStageName:a,outrightTeamType:s.SNJ.Competitor})})}),(0,n.jsx)(l.tU.Panel,{tabKey:2,children:(0,n.jsx)(l.az,{p:["sm",0],children:(0,n.jsx)(m.y,{stageId:t,stageTypeId:s.CEM.Season,uniqueStageName:a,outrightTeamType:s.SNJ.Team})})})]}):g?(0,n.jsx)(m.y,{stageId:t,stageTypeId:s.CEM.Season,uniqueStageName:a,outrightTeamType:s.SNJ.Competitor}):(0,n.jsx)(u.p,{graphic:"race-start",descriptionMessageId:"stats.noResults",mt:[0,"xxl"],pb:["xxl","28"]})}},32523:(e,t,a)=>{a.d(t,{E:()=>n.E});var n=a(3881)},33752:(e,t,a)=>{a.d(t,{B:()=>m});var n=a(6029),i=a(95083),s=a(62042),r=a(76356);let l=(0,s.Fj)({base:{display:"inline-block",verticalAlign:"bottom",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:"neutrals.nLv3",textStyle:"display.micro","& > a":{color:"primary.default",_hover:{textDecoration:"underline"}},"& + li":{_before:{content:'""',display:"inline-block",width:"[0px]",height:"[0px]",borderStyle:"solid",margin:"[1px 5px]",borderWidth:"[3px 0 3px 5px]",borderTopColor:"[transparent]",borderRightColor:"[transparent]",borderBottomColor:"[transparent]",borderLeftColor:"neutrals.nLv3",_rtl:{borderWidth:"[3px 5px 3px 0]",borderTopColor:"[transparent]",borderLeftColor:"[transparent]",borderBottomColor:"[transparent]",borderRightColor:"neutrals.nLv3"}}},"&:first-child:nth-last-child(3)":{maxWidth:"[50%]"},"&:first-child:nth-last-child(3) ~ &":{maxWidth:"[50%]"},"&:first-child:nth-last-child(4)":{maxWidth:"[33.33%]"},"&:first-child:nth-last-child(4) ~ &":{maxWidth:"[33.33%]"},"&:last-child":{display:"inline",whiteSpace:"initial"}}}),o=(0,r.I4)("li",l),d=(0,s.Fj)({base:{display:"flow-root",lineClamp:1,lineHeight:"[16px]",boxOrient:"vertical",overflow:"hidden",listStyle:"none",margin:"0",padding:"0",color:"neutrals.nLv3","&:has(.breadcrumb-title)":{lineClamp:2},"& > li":{lineHeight:"[16px]"}}}),u=(0,r.I4)("ul",d),c=(0,s.Fj)({base:{"&:has(.breadcrumb-title)":{paddingTop:"md",paddingBottom:"md",paddingLeft:"lg",paddingRight:"lg",md:{paddingLeft:"0",paddingRight:"0"},"@supports not selector(:has(a, b))":{paddingTop:"md",paddingBottom:"md",paddingLeft:"lg",paddingRight:"lg",md:{paddingLeft:"0",paddingRight:"0"}}}},variants:{isHomePage:{true:{md:{padding:"0"}}}}}),p=(0,r.I4)("div",c),m=e=>{let{children:t,isHomePage:a}=e;return(0,n.jsx)(p,{isHomePage:a,children:(0,n.jsx)(u,{children:t})})};m.Item=e=>{let{children:t}=e;return(0,n.jsx)(o,{"data-testid":"breadcrumb",children:t})},m.Title=e=>{let{children:t}=e;return(0,n.jsx)(i.Li,{display:"inline",className:"breadcrumb-title","data-testid":"breadcrumb_title",children:(0,n.jsx)(i.H1,{display:"inline",textStyle:"display.micro",color:"neutrals.nLv3",children:t})})}},39969:(e,t,a)=>{a.d(t,{h:()=>j,x:()=>T});var n=a(6029),i=a(21377),s=a(41249),r=a(55729),l=a(494),o=a(24313),d=a(70757),u=a(76410),c=a(10794),p=a(95083),m=a(90248),g=a(54409);let h=(e,t,a)=>{if(a)switch(t){case"right":return{top:"-8px",left:0,transform:"translateY(-100%)"};case"bottom":return{};default:return{top:"-8px",right:0,transform:"translateY(-100%)"}}switch(t){case"right":return{bottom:"-8px",left:0,transform:"translateY(100%)"};case"bottom":return e?{transform:"translateX(-100%)"}:{};default:return{bottom:"-8px",right:0,transform:"translateY(100%)"}}},f=e=>{let{image:t,name:a,LinkComponent:i}=e,r=(0,n.jsxs)(s.so,{align:"center",cursor:"pointer",children:[t,(0,n.jsx)(s.EY,{ml:"lg",color:"onSurface.nLv1",font:"body.medium",block:!0,style:{width:"102px"},children:a})]});return(0,n.jsx)(s.az,{my:"md",children:i?(0,n.jsx)(i,{children:r}):r})},v=(0,r.forwardRef)((e,t)=>{let{isEventFollowed:a,entities:i=[],onDeleteClick:r,menuPosition:l,isMenuInverted:o}=e,{isMobile:d}=(0,p.$c)();return(0,n.jsx)(s.az,{ref:t,position:"absolute",w:174,bg:"surface.s1",elevation:3,br:"md",py:"sm",zIndex:s.Py.Popover,style:{...h(d,l,o),whiteSpace:"normal"},children:a&&r?(0,n.jsxs)(s.so,{tabIndex:0,px:"lg",py:"sm",minH:"48",align:"center",br:"md",onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(null==r||r(e))},onClick:r,cursor:"pointer",children:[(0,n.jsx)(g.xV8,{fill:"error.default",width:24,height:24,mr:"lg"}),(0,n.jsx)(s.EY,{color:"onSurface.nLv1",font:"body.medium",block:!0,style:{width:"102px"},children:(0,n.jsx)(m.A,{id:"remove_from_favourites"})})]}):(0,n.jsxs)(s.az,{px:"lg",minH:"48",children:[(0,n.jsx)(s.EY,{color:"onSurface.nLv3",font:"assistive.default",pb:"sm",align:"left",as:"div",children:(0,n.jsx)(m.A,{id:"favorites.becauseYouFollow"})}),i.map(e=>(0,n.jsx)(f,{...e},e.entityType+e.id))]})})});var x=a(37356),y=a(7447);let b=e=>{e.stopPropagation(),e.preventDefault()};function j(e){let{id:t,leftTeam:a,rightTeam:p,tournament:m,menuPosition:g,isMenuInverted:h,isOnOverlay:f,location:j,type:S}=e,w=(0,r.useMemo)(()=>(0,x.fB)(),[]),C=(0,r.useMemo)(()=>(0,x.KL)(),[]),T=(0,l.d4)(e=>w(e,t)),L=(0,l.d4)(e=>C(e,{leftTeam:a,rightTeam:p,tournament:m})),k=(0,l.d4)(c.fg),E=T!==c.dE.NotFollowed&&!!T,_=E||!!L.length,{invertedMenu:A}=(0,o.l)(),M=(0,l.wA)(),D=()=>{M((0,d.q$)(i.bq7.Events,t)),M((0,d.q$)(i.bq7.MutedEvents,t)),(0,u.g2)({id:t,type:S,location:j,isFollowed:!1})},I=()=>{M((0,d.UQ)(i.bq7.Events,t)),(0,u.g2)({id:t,type:S,location:j,isFollowed:!0})},[z,P]=(0,r.useState)(!1),R=()=>P(e=>!e),q=(0,r.useCallback)(()=>P(!1),[]),N=(0,s.jz)(q);return(0,n.jsxs)(s.az,{ref:N,w:"fit-content",children:[(0,n.jsx)(y.A,{"aria-label":_?"Remove from favourites":"Add to favourites",disabled:k,isFollowed:_,isOnOverlay:f,onClick:e=>{b(e),k||(_?E?D():R():I())}}),_&&z&&!E&&(0,n.jsx)(v,{isEventFollowed:E,entities:L,menuPosition:g,isMenuInverted:A||h,onDeleteClick:e=>{b(e),D(),q()}})]})}var S=a(62859),w=a(8973),C=a(37470);function T(e){let{id:t,uniqueStage:a,menuPosition:p,location:m,isSubstageCell:g}=e,h=(0,r.useContext)(S.Ws),f=(0,r.useMemo)(()=>(0,x.BD)(),[]),b=(0,r.useMemo)(()=>(0,x.jM)(),[]),j=(0,l.d4)(e=>f(e,t)),T=(0,l.d4)(e=>b(e,null==a?void 0:a.id)),L=(0,l.d4)(c.fg),k=T&&a?(0,C.P3)({uniqueStage:a,sportSlug:h}):void 0,{invertedMenu:E}=(0,o.l)(),_=(0,l.wA)(),A=()=>{_((0,d.UQ)(i.bq7.Stages,t)),(0,u.g2)({id:t,type:g?w.b.Substage:w.b.Stage,location:m,isFollowed:!0})},M=()=>{_((0,d.q$)(i.bq7.Stages,t)),(0,u.g2)({id:t,type:g?w.b.Substage:w.b.Stage,location:m,isFollowed:!1})},[D,I]=(0,r.useState)(!1),z=()=>I(e=>!e),P=()=>I(!1),R=(0,s.jz)(P),q=j||T,N=T&&!g;return(0,n.jsxs)(s.az,{ref:R,position:"relative",w:"fit-content",children:[(0,n.jsx)(y.A,{disabled:L,isFollowed:q,onClick:e=>{e.stopPropagation(),e.preventDefault(),L||(q?z():A())}}),q&&D&&(0,n.jsx)(v,{entities:k?[k]:void 0,isEventFollowed:j&&!N,menuPosition:p,isMenuInverted:E,onDeleteClick:e=>{e.stopPropagation(),e.preventDefault(),M(),P()}})]})}},40548:(e,t,a)=>{a.d(t,{N:()=>d});var n=a(6029),i=a(95083),s=a(41249),r=a(55729),l=a(90248),o=a(54409);function d(e){let{children:t,closedHeight:a=64,...d}=e,[u,c]=(0,r.useState)(!1),[p,m]=(0,r.useState)(0),g=(0,r.useCallback)(()=>c(e=>!e),[]),{mediaBreakpoint:h}=(0,i.$c)(),f=(0,r.useRef)(null);(0,r.useEffect)(()=>{var e;m((null==f||null==(e=f.current)?void 0:e.scrollHeight)||0)},[f,t,h]);let v=p>a;return(0,n.jsxs)(s.az,{...d,children:[(0,n.jsx)(s.EY,{font:"body.small",color:"onSurface.nLv1",lineClamp:!u&&v?4:void 0,ref:f,as:"div",children:t}),v&&(0,n.jsx)(s.az,{cursor:"pointer",onClick:g,mt:"sm",children:(0,n.jsxs)(s.EY,{font:["assistive.default","display.small"],color:"primary.default",align:"right",hover:!0,as:"div",children:[(0,n.jsx)(l.A,{id:u?"show_less":"show_more"}),u?(0,n.jsx)(o.t8v,{ml:"xs",fill:"primary.default"}):(0,n.jsx)(o.QtO,{ml:"xs",fill:"primary.default"})]})})]})}},43451:(e,t,a)=>{a.d(t,{D:()=>r});var n=a(6029),i=a(36145),s=a(41735);let r=({width:e="100%",height:t,animate:a=!1,viewBox:r,style:l,children:o,uniqueKey:d})=>{let u=(0,s.useTheme)();return(0,n.jsx)(i.Ay,Object.assign({speed:2,animate:a,width:e,height:t,backgroundColor:a?u.colors.surface.s0:u.colors.surface.s2,foregroundColor:u.colors.surface.s2,viewBox:r,style:l,uniqueKey:d},{children:o}))}},45948:(e,t,a)=>{a.d(t,{Ay:()=>w,jl:()=>y});var n=a(6029),i=a(21377),s=a(4967),r=a(41249),l=a(55729),o=a(90510),d=a(90248),u=a(45860),c=a(62859),p=a(54409),m=a(8973),g=a(39969),h=a(70591),f=a(17189),v=a(83110),x=a(3763);let y=e=>(0,n.jsx)(r.az,{display:"inline-block",w:8,h:8,bg:"onSurface.nLv3",br:"50%",...e,children:e.isHollow&&(0,n.jsx)(r.az,{bg:"surface.s1",w:4,h:4,m:2,br:"50%"})}),b=(e,t)=>{switch(e){case i.hzM.inprogress:return"sofaSingles.live";case i.hzM.finished:return"onSurface.nLv3";default:if(t)return"onSurface.nLv1";return"onSurface.nLv3"}},j=e=>{let{stageId:t,fallbackRace:a}=e,{data:d}=(0,u.Ay)(i.dVR.substages(t)),c=(0,l.useMemo)(()=>d?(0,v.VL)(d.stages):a||null,[t,d,a]);if(!c)return null;if(!c.startDateTimestamp)return(0,n.jsx)(r.so,{minH:"32"});let p=b(c.status.type);return(0,n.jsxs)(r.so,{pt:"xs",pb:"md",pr:"sm",children:[(0,n.jsx)(r.az,{children:(0,n.jsx)(y,{w:8,h:8,bg:p,my:"xs",mr:"sm",isHollow:![i.hzM.inprogress,i.hzM.finished].includes(c.status.type)})}),(0,n.jsxs)(r.EY,{lineHeight:"16px",font:"body.small",color:p,lineClamp:1,children:[c.startDateTimestamp&&(0,n.jsx)(o.XU,{value:1e3*c.startDateTimestamp,...s.or.dateTime}),d?(0,n.jsxs)(n.Fragment,{children:[c.startDateTimestamp&&c.description&&" • ",(0,n.jsx)(f.N,{id:c.description})]}):null]})]})},S=e=>{let{stage:t}=e;return(0,v.YQ)(t.status.type)?(0,n.jsx)(r.EY,{pt:"xs",pb:"md",lineHeight:"16px",font:"body.small",color:"error.default",children:(0,n.jsx)(d.A,{id:t.status.type})}):t.winner?(0,n.jsxs)(r.so,{pt:"xs",pb:"md",pr:"0",align:"center",children:[(0,n.jsx)(r.az,{children:(0,n.jsx)(p.$dv,{fill:"onSurface.nLv3",mr:"xs"})}),(0,n.jsx)(r.EY,{as:"bdi",lineHeight:"16px",font:"body.small",color:"onSurface.nLv3",lineClamp:1,children:t.winner.name})]}):null},w=e=>{let{stage:t,selected:a,small:s,isFirst:o}=e,d=(0,l.useContext)(c.Ws);return(0,n.jsx)(h.LC,{stage:t,sportSlug:d,children:(0,n.jsxs)(r.az,{borderTop:[void 0,o||s?void 0:"onSurface.nLv4"],py:"xs",px:"sm",h:[90,"auto",90],hoverBg:"surface.s2",bg:s?void 0:["surface.s1",a?"neutral.highlight":void 0],mt:[o?"md":"sm",0],mx:s?void 0:["sm",0],br:s?void 0:["sm",0],elevation:s?void 0:[2,void 0],children:[(0,n.jsxs)(r.so,{h:[48,"auto",48],py:6,align:"center",justify:"space-between",px:"lg",children:[(0,n.jsx)(x.Q,{stage:t}),(0,n.jsx)(r.EY,{style:{flexGrow:1},font:"body.large",color:"onSurface.nLv1",ml:"lg",children:t.description}),(0,n.jsx)(r.cG,{vertical:!0,mx:"md"}),(0,n.jsx)(g.x,{id:t.id,uniqueStage:t.uniqueStage,location:s?m.y.MainMatches:m.y.RacesTab})]}),(0,n.jsxs)(r.so,{align:"center",justify:"space-between",pl:"56px",pr:["xs","lg"],children:[(0,n.jsx)(j,{stageId:t.id,fallbackRace:d===i.QCR.Cycling?t:void 0}),!s&&(0,n.jsx)(S,{stage:t})]})]})})}},46009:(e,t,a)=>{a.d(t,{w:()=>i,e:()=>g});var n=a(55729);let i=(0,n.createContext)("");var s=a(6029),r=a(76356),l=a(494),o=a(54409),d=a(76410),u=a(10794),c=a(70757),p=a(12759);let m=e=>{e.stopPropagation(),e.preventDefault()};function g(e){let{entity:t,id:a,location:i,type:g,isOnOverlay:h,isDisabled:f,hasNoBorder:v=!1,onClick:x}=e,y=(0,l.wA)(),b=(0,l.d4)(e=>(0,u.Ql)(e,t,a),l.bN),j="boolean"==typeof b?b:b!==u.dE.NotFollowed,S=(0,l.d4)(u.fg)||f,w=(0,n.useCallback)(()=>{if(!S){if(j){let e=b===u.dE.Favorite?(0,p.Hz)(t):t;y((0,c.q$)(e,a))}else{let e=(0,p.Hz)(t);y((0,c.UQ)(e,a))}(0,d.g2)({id:a,type:g,location:i,isFollowed:!j})}},[j,S,t,a]);return(0,s.jsx)(r.I4.button,{border:v?"1.5px solid transparent":void 0,alignItems:"center",appearance:"none",cursor:"pointer",display:"inline-flex",isolation:"isolate",justifyContent:"center",outline:"none",position:"relative",userSelect:"none",flexShrink:"0",whiteSpace:"nowrap",h:"[26px]",w:"[26px]",p:"[0px]",textStyle:"action.button.primary",gap:"xs",br:"xs",color:"primary.default",backgroundColor:"[transparent]",disabled:S,_disabled:{opacity:.5,color:"neutral.default",cursor:"not-allowed"},_hover:S?{}:{bg:"primary.default/8"},_active:S?{}:{bg:"primary.default/15"},_focusVisible:{},onClick:e=>{m(e),null==x||x(),w()},children:j?(0,s.jsx)(o.zQC,{icon:"follow-active",m:"0",fill:h?"onColor.primary":"primary.default"}):(0,s.jsx)(o.zQC,{icon:"follow-default",m:"0",fill:h?"onColor.primary":"neutral.default"})})}},47146:(e,t,a)=>{a.d(t,{v:()=>r});var n=a(6029),i=a(29705);let s={second:59,minute:59,hour:24,day:7},r=e=>{let{timestamp:t,isAbsoluteTime:a,children:r}=e,{value:l,unit:o}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now(),a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,i={...s,...a||{}},r=(e-t)/1e3;if(Math.abs(r)0)return{value:Math.round(p),unit:"year"};let m=12*p+d.getMonth()-u.getMonth();return Math.round(Math.abs(m))>0?{value:Math.round(m),unit:"month"}:{value:Math.round(r/604800),unit:"week"}}(t,void 0,void 0,a);return(0,n.jsx)(i.A,{value:l,unit:o,numeric:"auto",children:e=>"function"==typeof r?r(e):(0,n.jsx)(n.Fragment,{children:e})})}},49519:(e,t,a)=>{a.d(t,{p:()=>i.p,w:()=>n.w});var n=a(53192),i=a(91603)},55057:(e,t,a)=>{a.d(t,{h:()=>d,u:()=>u});var n=a(21377),i=a(55729),s=a(45860),r=a(62859),l=a(69559);let o={};function d(e){let t=(0,i.useContext)(r.Ws)===n.QCR.Cycling,{data:a}=(0,s.Ay)(n.dVR.substages(e)),{data:l}=(0,s.Ay)(t&&a?a.stages.map(e=>n.dVR.substages(e.id)):null,{fetcher:async e=>(await Promise.allSettled(e.map(n.TtD))).map(e=>"fulfilled"===e.status?e.value:null).filter(Boolean)}),d=null==l?void 0:l.map((e,t)=>(e.stages.forEach(e=>{if(e.stageParent&&(null==a?void 0:a.stages[t].stageParent)){var n;o[e.stageParent.id]=null==a||null==(n=a.stages[t].stageParent)?void 0:n.id}}),e.stages)).flat().sort((e,t)=>e.startDateTimestamp&&t.startDateTimestamp?e.startDateTimestamp-t.startDateTimestamp:0);return t?[d,o]:[null==a?void 0:a.stages,o]}let u=e=>{let t=(0,l.o)(),{data:a,error:i,isLoading:r}=(0,s.Ay)(["STAGE_SPORT_EXTENDED_SUBSTAGES",n.dVR.extended(e)],()=>c(t,e));return{stages:a||[],error:i,loading:r}};async function c(e,t){try{let a=await (0,n.TtD)(n.dVR.extended(t));if(e===n.QCR.Cycling){let e=a.stage.substages;if(void 0===e)return[];return e.reduce((e,t)=>{var a;return e.concat(null!=(a=t.substages)?a:[])},[])}return a.stage.substages||[]}catch(e){return[]}}},57715:(e,t,a)=>{a.d(t,{UB:()=>k,VL:()=>E.VL,YQ:()=>E.YQ});var n=a(6029),i=a(21377),s=a(55729),r=a(45860),l=a(65789),o=a(62859),d=a(8329),u=a(95083),c=a(41249),p=a(41735),m=a(46009),g=a(8973),h=a(70591),f=a(24159),v=a(76356),x=a(69559);let y={[i.QCR.Motorsport]:4,[i.QCR.Cycling]:4},b=()=>{var e;let t=null!=(e=y[(0,x.o)()])?e:4;return(0,n.jsx)(n.Fragment,{children:[...Array(t)].map((e,t)=>(0,n.jsx)(v.az,{h:"4xl",display:{base:"none",mdDown:"block"}},t))})};var j=a(45948);let S=(e,t)=>{let a=t.reduce((e,t)=>{if(t.uniqueStage){let a=t.uniqueStage.id;e[a]?e[a].push(t):e[a]=[t]}return e},{});return e.forEach(e=>{a[e.id]&&(e.featuredStages=a[e.id])}),e},w=(0,p.default)(c.so).withConfig({componentId:"sc-324f7143-0"})({"& > *":{width:"100%"}}),C=e=>{let{uniqueStage:t,selected:a,selectedEventStageId:r,isFirst:l}=e,p=(0,s.useContext)(o.Ws),{isMobile:v}=(0,u.$c)(),x=p===i.QCR.Cycling;return(0,n.jsxs)(c.az,{borderTop:l?void 0:"onSurface.nLv4",hoverBg:"surface.s2",bg:a?[void 0,"neutral.highlight"]:void 0,children:[(0,n.jsxs)(c.so,{cursor:"pointer",justify:"space-between",children:[(0,n.jsx)(w,{w:"100%",children:(0,n.jsx)(h.So,{uniqueStage:t,sportSlug:p,children:(0,n.jsxs)(c.so,{p:"md",align:"center",children:[(0,n.jsx)(d.w,{flag:x?t.category.slug:t.slug,name:t.name,size:24}),(0,n.jsx)(c.EY,{lineHeight:"24px",font:"body.large",color:"onSurface.nLv1",ml:"xl",children:(0,n.jsx)(f.c,{entity:t})})]})})}),v&&(0,n.jsxs)(c.so,{py:"sm",px:"md",children:[(0,n.jsx)(c.cG,{vertical:!0,color:"onSurface.nLv4",mr:"md"}),(0,n.jsx)(m.e,{entity:i.bq7.UniqueStages,id:t.id,location:g.y.MainLeagues,type:g.b.UniqueStages})]})]}),!v&&t.featuredStages&&t.featuredStages.map(e=>(0,n.jsx)(j.Ay,{stage:e,selected:r===e.id,small:!0},e.id))]})},T=e=>{var t;let{data:a,error:s}=(0,r.Ay)(i.ZXN.uniqueStages(e.categoryId));if(void 0===a&&!s)return(0,n.jsx)(b,{});if(s||!(null==a||null==(t=a.uniqueStages)?void 0:t.length))return null;let l=S(a.uniqueStages,e.featuredStages);return(0,n.jsx)(n.Fragment,{children:l.map(t=>(0,n.jsx)(C,{isFirst:e.isFirst,uniqueStage:t,selected:!!e.selectedUniqueStageId&&e.selectedUniqueStageId===t.id,selectedEventStageId:e.selectedEventStageId},t.id))})},L=e=>{let{categories:t,selectedUniqueStageId:a,selectedEventStageId:i,featuredStages:s}=e;return(0,n.jsx)(n.Fragment,{children:t.sort((e,t)=>{let a=(t.priority||0)-(e.priority||0);return 0===a?t.name{var r;return(0,n.jsx)(T,{categoryId:e.id,isFirst:!t,featuredStages:null!=(r=null==s?void 0:s.stages)?r:[],selectedUniqueStageId:a,selectedEventStageId:i},e.id)})})},k=e=>{let{selectedUniqueStageId:t,selectedEventStageId:a}=e,d=(0,s.useContext)(o.Ws),{data:u,error:c}=(0,r.Ay)(i.t3g.categories(d)),{data:p}=(0,r.Ay)(i.dVR.featuredStages(d),{refreshInterval:6e4});return(null==u?void 0:u.categories)&&!c?(0,n.jsx)(l.BU,{children:(0,n.jsxs)(l.Zp,{children:[(0,n.jsx)(l.Zp.Header,{titleId:"tournament.series"}),(0,n.jsx)(L,{categories:u.categories,featuredStages:p,selectedEventStageId:a,selectedUniqueStageId:t}),(0,n.jsx)(l.Zp.Footer,{})]})}):null};a(28760),a(21501),a(7263),a(55342),a(96913),a(28132),a(86679),a(4967),a(54409),a(3763);var E=a(83110);a(3518),a(85009),a(17189),a(97859),a(9185)},83110:(e,t,a)=>{a.d(t,{Jx:()=>r,VL:()=>i,YQ:()=>s});var n=a(21377);let i=e=>{let t=e[0],a=Number.MAX_VALUE,i=Date.now()/1e3;for(let s=0;sa)break;e===i&&t.status.type!==n.hzM.notstarted&&(t=r)}}return t},s=e=>[n.hzM.canceled,n.hzM.cancelled,n.hzM.postponed].indexOf(e)>-1,r=e=>["MotoGP","Moto3","Moto2","Superbike"].indexOf(e)>-1?"riders.bikes":e.toLowerCase().indexOf("cycling")>-1?"riders.cycling":"drivers"},85009:(e,t,a)=>{a.d(t,{d:()=>L});var n=a(6029),i=a(21377),s=a(95083),r=a(76356),l=a(41249),o=a(55729),d=a(947),u=a(494),c=a(45860),p=a(65789),m=a(76868),g=a(55938),h=a(32523),f=a(4967),v=a(54409),x=a(1815),y=a(76410);let b=e=>{let{count:t,isPositive:a}=e,i=a?v.URl:v.fHS;return(0,n.jsxs)(r.so,{border:"1px solid {colors.neutrals.nLv4}",align:"center",p:"xs",h:"xl",br:"xs",gap:"xs",children:[(0,n.jsx)(i,{width:16,height:16,fill:a?"success.default":"error.default"}),(0,n.jsx)(r.az,{textStyle:"assistive.default",color:"neutrals.nLv3",children:t})]})},j=e=>{let{channel:t}=e;return(0,n.jsx)(r.az,{textStyle:"display.small",color:t.link?"primary.default":"neutrals.nLv1",truncate:!0,children:t.name})},S=e=>{let{channel:t}=e,a=(0,x.e)(()=>(0,y.ke)({action:"impression",location:"event_details",type:"banner_channel_".concat(t.id)}),{delay:500,sendInterval:30*f.Z2});return t.link?(0,n.jsx)(s.Mz,{href:t.link,target:"_blank",rel:"noopener",overflow:"hidden",onClick:()=>{(0,y.ke)({action:"click",location:"event_details",type:"banner_channel_".concat(t.id)})},children:(0,n.jsxs)(r.so,{ref:a,align:"center",gap:"xs",children:[(0,n.jsx)(j,{channel:t}),(0,n.jsx)(r.az,{h:"lg",w:"lg",children:(0,n.jsx)(v.HW5,{h:16,w:16})})]})}):(0,n.jsx)(j,{channel:t})};function w(e){let{channelId:t,type:a,eventId:s}=e,{data:l}=(0,c.Ay)(i.RMf.eventChannelVotes(t,a,s));return l?(0,n.jsxs)(r.so,{px:"lg",py:"sm",align:"center",justify:"space-between",gap:"xs",children:[(0,n.jsxs)(r.so,{grow:1,align:"center",overflow:"hidden",gap:"sm",children:[(0,n.jsx)(r.az,{w:"xl",h:"xl",children:(0,n.jsx)(v.oIR,{w:24,h:24,fill:"onSurface.nLv1"})}),(0,n.jsx)(S,{channel:l.tvChannelVotes.tvChannel})]}),(0,n.jsxs)(r.so,{w:"fit",align:"center",justify:"flex-end",gap:"sm",children:[(0,n.jsx)(b,{count:l.tvChannelVotes.upvote||0,isPositive:!0}),(0,n.jsx)(b,{count:l.tvChannelVotes.downvote||0})]})]}):(0,n.jsx)(h.E,{uniqueKey:"tv-channel-cl",my:"sm",height:24,br:"xs",animate:!0})}let C=e=>{let t=Date.now()/1e3;return e-604800t},T=(e,t)=>(null==e?void 0:e.alpha2)?(0,n.jsxs)(r.so,{align:"center",gap:"lg",children:[(0,n.jsx)("img",{style:{verticalAlign:"top"},src:"/static/images/flags/".concat(e.alpha2.toLowerCase(),".png"),width:24,height:24,alt:e.name},e.alpha2),!t&&(0,n.jsx)(s.EY,{textTransform:"capitalize",children:e.name.replace("-"," ")})]}):null;function L(e){var t;let{eventId:a,type:s,startTimestamp:h,isInWidget:f}=e,v=(0,d.A)(),x=(0,u.d4)(e=>{let{locale:t}=e;return t.geoIPAlpha2}),[y,b]=(0,o.useState)(x),{data:j,isLoading:S}=(0,c.Ay)(i.RMf.eventCountryChannels(s,a)),L=(0,o.useMemo)(()=>(null==j?void 0:j.countryChannels)?Object.keys(null==j?void 0:j.countryChannels).map(e=>({alpha2:e,name:v.formatMessage({id:(0,g.K_)(e)})})).sort((e,t)=>e.name>t.name?1:-1):[],[null==j?void 0:j.countryChannels]);if((0,o.useEffect)(()=>{b(x)},[x]),!(null==j?void 0:j.countryChannels)&&!S||void 0===h||!C(h))return null;let k=y&&!!(null==j||null==(t=j.countryChannels[y])?void 0:t.length);return(0,n.jsxs)(p.Zp,{isInverseDesktop:f,children:[(0,n.jsx)(p.Zp.Header,{titleId:"tv_channels",variant:"left-aligned",actionComponent:x&&(0,n.jsx)(l.ms,{items:L,renderItem:T,initialSelectedItem:{alpha2:x,name:v.formatMessage({id:(0,g.K_)(x)})},onSelectedItemChange:e=>{var t;return b(null==(t=e.selectedItem)?void 0:t.alpha2)},alignRight:!0})}),(0,n.jsx)(r.az,{py:"sm",children:k?j.countryChannels[y].map(e=>(0,n.jsx)(w,{type:s,channelId:e,eventId:a},e)):(0,n.jsx)(m.p,{graphic:"no-tv-events",descriptionMessageId:"tv_channels_no_votes",p:"md"})})]})}},86679:(e,t,a)=>{a.d(t,{A:()=>p});var n=a(4967),i=a(59018),s=a.n(i),r=a(55729),l=a(7263);let o=n.pY,d={},u=async(e,t)=>{let a=new Date().getTime();if(!d[e]||d[e].time{let a=e.map(e=>{var a;return e.skipCheck||!e.route?new Promise(e=>e(!1)):u(e.route,null!=(a=e.deduplicationInterval)?a:t)});return(await Promise.allSettled(a)).map(e=>"fulfilled"===e.status&&e.value)};function p(e){var t;let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,i=Object.keys(e),l=Object.values(e),[d,u]=(0,r.useState)(i.reduce((e,t)=>({...e,[t]:void 0}),{})),p=null==n?void 0:n.refreshInterval,m=null!=(t=null==n?void 0:n.deduplicationInterval)?t:o;return(0,r.useEffect)(()=>{let e=async()=>{let e=await c(l,m),t={};i.forEach((a,n)=>{t[a]=e[n]}),u(e=>{for(let a of s()([...Object.keys(t),...Object.keys(e)]))if(e[a]!==t[a])return t;return e})};if(e(),!p)return;let t=setInterval(e,p);return()=>clearInterval(t)},[...a,p]),d}},95457:(e,t,a)=>{a.d(t,{SZ:()=>l});var n=a(31710);a(6029);var i=a(41249);a(55729);var s=a(41735);function r(){let e=(0,n._)(["\n border-top-left-radius: ",";\n border-top-right-radius: ",";\n "]);return r=function(){return e},e}let l=(e,t)=>{let a=e.colors.stageSports,n=a.generic;switch(t){case -1:n=e.colors.neutral.highlight;break;case 9:case 94:n=a.cycling;break;case 40:n=a.formula1;break;case 17:n=a.motoGP;break;case 16:n=a.moto3;break;case 15:n=a.moto2;break;case 28:n=a.superbike;break;case 36:n=a.WRC;break;case 18:n=a.nascar;break;case 10:n=a.dtm;break;case 67:n=a.indycar;break;case 68:n=a.formulaE;break;default:n=a.generic}return e.setAlpha(n,.75)},o=(0,s.css)(["",""],e=>e.theme.breakpoints.query.mdMin(r(),e.theme.spacing.xl,e.theme.spacing.xl));(0,s.default)(i.az).withConfig({componentId:"sc-56136cea-0"})(["background-image:",";background-size:cover;background-position:center center;",""],e=>"url('".concat(e.url,"')"),o),(0,s.default)(i.az).withConfig({componentId:"sc-56136cea-1"})(["background-image:",";"," backdrop-filter:grayscale(100%);.dropdown-wrap{button{padding:0;background-color:transparent;&:focus:not(:active){box-shadow:none;}}path{fill:",";}}"],e=>"linear-gradient(".concat(e.layer2,", ").concat(e.layer2,"), linear-gradient(").concat(e.layer1,", ").concat(e.layer1,")"),o,e=>e.theme.colors.onColor.primary)},96913:(e,t,a)=>{a.d(t,{m:()=>g.m,A:()=>m});var n=a(6029),i=a(95083),s=a(41249),r=a(78383),l=a.n(r),o=a(55729),d=a(90248),u=a(12047),c=a(28171);let p=(e,t)=>{let a=(0,o.useState)(e);return t||a};function m(e){let{id:t,location:a,initialTabKey:r,onChange:m=l(),tabs:g,children:h,customControls:f,noSportMenu:v,eventStatusType:x,seasonId:y,isInWidget:b}=e,j=(0,o.useRef)(null),{isMobile:S}=(0,i.$c)(),[w,C]=p(r,f),{logTabChange:T}=(0,c.A)(),L=(0,u.Ay)({isSportMenuVisible:!v,isInMobileTabs:!1});return(0,o.useEffect)(()=>{w!==r&&C(r)},[t,a,y]),(0,n.jsx)(s.tU,{onChange:e=>{w!==e&&(C(e),m(e),b||window.scrollTo({left:0,top:0}))},initialValue:r||w,value:w,variant:"primary",fullWidthTabs:S||b,children:(0,n.jsxs)(s.az,{d:"inline",style:{verticalAlign:"top"},ref:j,children:[(0,n.jsx)(s.PI,{isStickingDisabled:b||!S,bg:["surface.s1","transparent"],borderBottom:["effect.elevation1",void 0],top:L,children:(0,n.jsx)(s.tU.List,{underline:!0,scroll:!0,children:g.filter(e=>!e.isHidden).map(e=>(0,n.jsx)(s.tU.Tab,{tabKey:e.tabKey,style:{marginLeft:0},as:"h2",onClick:n=>n.nativeEvent.isTrusted&&e.tabKey!==w?T({type:e.tabKey,id:t,location:a,status:x}):void 0,children:(0,n.jsx)("a",{href:"#tab:".concat(e.tabKey),onClick:e=>e.preventDefault(),style:{color:"inherit"},children:"string"==typeof e.item?(0,n.jsx)(d.A,{id:e.item,values:e.values}):e.item})},"".concat(t,"-").concat(e.tabKey)))})}),(0,n.jsx)(s.az,{children:h})]})},t)}var g=a(28132)},97859:(e,t,a)=>{a.d(t,{Y:()=>s});var n=a(6029),i=a(41249);let s=()=>(0,n.jsx)(i.az,{p:"sm",h:1100,bg:"surface.s2"})}}]);