!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]="99ca4f6f-6059-4e75-944f-039a3626ea11",e._sentryDebugIdIdentifier="sentry-dbid-99ca4f6f-6059-4e75-944f-039a3626ea11")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2753,5729,8056],{141:(e,t,n)=>{n.d(t,{L:()=>g});var i=n(6029),s=n(21377),r=n(41249),l=n(55729),a=n(90248),o=n(8703),d=n(98775),c=n(87763),u=n(19168),h=n(85578),x=n(39756);function m(e){let{children:t,isOnOverlay:n,highlighted:s}=e;return(0,i.jsx)(r.so,{justify:"center",children:(0,i.jsx)(r.so,{h:n?"24px":void 0,br:"sm",px:"sm",border:n?"2px solid sofaSingles.live":void 0,justify:"center",align:"center",bg:n?"overlay.darken2":void 0,children:(0,i.jsx)(r.EY,{color:s||!n?"sofaSingles.live":"onColor.secondary",font:s||!n?"display.small":"body.medium",whiteSpace:"nowrap",children:t})})})}function g(e){let{event:t,isOnOverlay:n}=e,r=(0,l.useContext)(d.A),g=void 0===r||r.nextFightId===t.id;if(t.status.type===s.XUj.WillContinue)return t.finalRound?(0,i.jsxs)(m,{isOnOverlay:n,children:[(0,i.jsx)(a.A,{id:"status_round",values:{round:t.finalRound}}),"\xa0|\xa0",(0,i.jsx)(a.A,{id:"stage_result_finished"})]}):(0,i.jsx)(m,{isOnOverlay:n,children:(0,i.jsx)(c.fP,{id:t.status.description})});if(t.status.code===s.sum.Started||t.status.type===s.XUj.NotStarted&&1e3*t.startTimestamp{n.d(t,{A:()=>a});var i=n(6029),s=n(95083),r=n(41249),l=n(90248);function a(e){let{tabKey:t,messageId:n,activeTab:a,onTabClick:o}=e;return(0,i.jsx)(r.tU.Tab,{tabKey:t,h:"48px",style:{borderBottomWidth:"3px"},onClick:e=>e.nativeEvent.isTrusted&&a!==t?o(t):void 0,children:(0,i.jsx)(s.EY,{textStyle:"tab.primary.desktop",color:"onColor.primary",textAlign:"center",display:"block",children:(0,i.jsx)(l.A,{id:n})})})}},2315:(e,t,n)=>{n.d(t,{A:()=>u});var i=n(6029),s=n(21377),r=n(41249),l=n(55729),a=n(90248),o=n(62859),d=n(39969);function c(e){let{isOnOverlay:t}=e,{event:n}=(0,l.useContext)(o.y$);return n.finalRound?(0,i.jsx)(r.EY,{as:"div",font:"body.small",color:t?"onColor.primary":"onSurface.nLv1",ellipsis:!0,children:(0,i.jsx)(a.A,{id:"finished"})}):null}function u(e){let{isOnOverlay:t,location:n,entityType:a}=e,{event:u,leftTeam:h,rightTeam:x}=(0,l.useContext)(o.y$),m=u.status.type!==s.XUj.Finished;return(0,i.jsxs)(r.az,{style:{overflow:m?void 0:"hidden"},children:[m&&(0,i.jsx)(d.h,{id:u.id,tournament:u.tournament,leftTeam:h,rightTeam:x,type:a,location:n,isOnOverlay:t}),!m&&(0,i.jsx)(c,{isOnOverlay:t})]})}},3898:(e,t,n)=>{n.d(t,{dq:()=>i.default,OE:()=>o,mw:()=>c.TeamMedia,in:()=>d});var i=n(5884),s=n(6029),r=n(21377),l=n(45860),a=n(17239);function o(e){let{playerId:t}=e,{data:n}=(0,l.Ay)(r.qvj.media(t));return n?(0,s.jsx)(a.$,{highlights:n.media}):null}function d(e){let{tournamentId:t,...n}=e,{data:i}=(0,l.Ay)(r.yKR.media(t));return i&&i.media.length?(0,s.jsx)(a.$,{highlights:i.media,mb:"md",...n}):null}n(55342),n(8056);var c=n(35729)},4832:(e,t,n)=>{n.d(t,{i:()=>i.A,y:()=>e_});var i=n(44987),s=n(6029),r=n(21377),l=n(76356),a=n(41249),o=n(55729),d=n(45860),c=n(65789),u=n(28132),h=n(28171),x=n(86679),m=n(1775),g=n(95083),p=n(90248),j=n(94474),v=n.n(j);function f(e){let{children:t}=e;return(0,s.jsx)(g.Ym,{textStyle:"body.medium",color:"neutrals.nLv1",h:"lg",display:"block",children:t})}function y(e){let{labelId:t,children:n}=e;return(0,s.jsxs)(l.so,{justify:"space-between",align:"center",h:"2xl",px:"lg",children:[(0,s.jsx)(f,{children:(0,s.jsx)(p.A,{id:t})}),(0,s.jsx)(l.so,{justify:"center",align:"center",children:n})]})}function b(e){let{labelId:t,value:n}=e;return void 0===n?null:(0,s.jsx)(y,{labelId:t,children:(0,s.jsx)(f,{children:n})})}function w(e){let{organization:t}=e,n=t.country;return(0,s.jsxs)(c.Zp,{isInverseDesktop:!0,children:[(0,s.jsx)(c.Zp.Header,{titleId:"info"}),(null==n?void 0:n.alpha2)&&(null==n?void 0:n.name)&&(0,s.jsx)(y,{labelId:"country",children:(0,s.jsxs)(l.so,{align:"center",gap:"sm",children:[(0,s.jsx)("img",{src:"/static/images/flags/".concat(n.alpha2.toLowerCase(),".png"),width:16,height:16,alt:n.alpha2}),(0,s.jsx)(f,{children:(0,s.jsx)(p.A,{id:v()(n.name.toLowerCase()),defaultMessage:n.name})})]})}),(0,s.jsx)(b,{labelId:"divisions",value:t.numberOfDivisions}),(0,s.jsx)(b,{labelId:"number_of_fighters",value:t.numberOfCompetitors}),(0,s.jsx)(b,{labelId:"foundation_date",value:t.yearOfFoundation}),(0,s.jsx)(b,{labelId:"current_president",value:t.chairman}),(0,s.jsx)(b,{labelId:"owner",value:t.owner}),(0,s.jsx)(c.Zp.Footer,{})]})}var _=n(33144),C=n(4967),T=n(9127),A=n(25273),E=n(90510),k=n(62859),z=n(8703),S=n(65078),I=n(70591),U=n(98559);n(5631),n(141);var L=n(33942);n(2315),n(66071);let O=(0,T.m)(l.so),D=(0,T.m)(g.EY);function F(e){let{startTimestamp:t}=e,n=C.pp(t);return C.cK(n)?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.A,{id:"today"}),",\xa0",(0,s.jsx)(E.ib,{value:n})]}):(0,s.jsx)(E.XU,{value:new Date(1e3*t),...C.or.dateWithShortWeekday})}function M(e){var t;let{team:n,gender:i,isRight:a,isSecondaryColor:d,winnerCode:c,opacity:u}=e,{event:h}=(0,o.useContext)(k.y$),x=c===r.Jfo.Left,m=c===r.Jfo.Right,g=x&&!a||m&&a,p=(0,z.Mh)(h);return(0,s.jsxs)(O,{direction:"column",align:"center",basis:"[0px]",grow:1,transition:{type:"spring",stiffness:90,damping:15,bounce:0},layout:!0,children:[(0,s.jsxs)(O,{w:"5xl",h:"5xl",position:"relative",style:{opacity:u},layout:!0,children:[g&&(0,s.jsx)(l.az,{position:"absolute",overflow:"visible",left:m?void 0!==p?"[-90px]":"[-50px]":void 0,right:x?void 0!==p?"[-90px]":"[-50px]":void 0,children:(0,s.jsx)(L.r,{winnerCode:c,isOnOverlay:!0})}),(0,s.jsx)(_.p,{hasFlag:!0,id:n.id,alpha2:null==(t=n.country)?void 0:t.alpha2,size:56,flagSize:20,right:a,sport:n.sport,gender:i})]}),(0,s.jsx)(D,{textStyle:"display.micro",color:d?"onColor.secondary":"onColor.primary",textAlign:a?"left":"right",maxW:"100%",h:"lg",mt:"2xs",display:"block",truncate:!0,layout:!0,children:n.name})]})}function H(){return(0,s.jsx)(l.az,{h:"[134px]",br:"lg"})}function Y(){let{event:e,leftTeam:t,rightTeam:n}=(0,o.useContext)(k.y$),a=(0,S.gm)(e,"winnerCode"),{hasLeftTeamOpacity:d,hasRightTeamOpacity:c}=(0,U.Zq)(e.status.type,a),u=a===r.Jfo.Left||a===r.Jfo.Right;return(0,s.jsx)(I.tj,{style:{width:"100%"},event:e,children:(0,s.jsx)(l.az,{h:"[134px]",br:{base:"sm",md:"lg"},overflow:"hidden",children:(0,s.jsx)(i.A,{organization:e.tournament.uniqueTournament,isFeaturedEvent:!0,children:(0,s.jsxs)(l.az,{h:"100%",w:"100%",py:"sm",children:[(0,s.jsx)(l.so,{justify:"center",pb:"lg",children:(0,s.jsxs)(g.EY,{textStyle:"body.small",color:"onColor.primary",children:["".concat(e.tournament.name," | "),(0,s.jsx)(F,{startTimestamp:e.startTimestamp})]})}),(0,s.jsx)(l.so,{justify:"space-between",children:(0,s.jsxs)(A.o,{children:[(0,s.jsx)(M,{team:t,gender:e.gender,isSecondaryColor:void 0!==a&&a!==r.Jfo.Left,winnerCode:a,opacity:d?"[0.6]":void 0}),(0,s.jsxs)(l.so,{direction:"column",justify:"space-evenly",align:"center",children:[!u&&(0,s.jsx)(O,{layout:!0,transition:{duration:.1},children:(0,s.jsx)(L.A,{event:e,isOnOverlay:!0})}),(0,s.jsx)(g.EY,{textStyle:"display.small",color:"onColor.primary",textAlign:"center",display:"block",children:"VS"})]}),(0,s.jsx)(M,{team:n,gender:e.gender,isRight:!0,isSecondaryColor:void 0!==a&&a!==r.Jfo.Right,winnerCode:a,opacity:c?"[0.6]":void 0})]})})]})})})})}function B(e){let{eventId:t}=e,{event:n,...i}=(0,S.mJ)(t,{shouldRefresh:!0});return n?(0,s.jsx)(k.y$.Provider,{value:{event:n,...i},children:(0,s.jsx)(Y,{})}):(0,s.jsx)(H,{})}function P(e){let{organizationId:t}=e,{data:n,error:i}=(0,d.Ay)(r.V3t.featuredEvents(t));return i?null:(null==n?void 0:n.featuredEvents.length)?(0,s.jsx)(B,{eventId:n.featuredEvents[0].id}):(0,s.jsx)(H,{})}function N(e){let{organization:t}=e;return t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.Zp,{isInverseDesktop:!0,children:[(0,s.jsx)(c.Zp.Header,{titleId:"tournament.featuredEvent"}),(0,s.jsx)(l.az,{p:"sm",children:(0,s.jsx)(P,{organizationId:t.id})})]}),(0,s.jsx)(w,{organization:t})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.Zp,{isInverseDesktop:!0,children:[(0,s.jsx)(c.Zp.Header,{titleId:"tournament.featuredEvent"}),(0,s.jsx)(l.az,{h:"[150px]"})]}),(0,s.jsxs)(c.Zp,{isInverseDesktop:!0,children:[(0,s.jsx)(c.Zp.Header,{titleId:"info"}),(0,s.jsx)(l.az,{h:"[208px]"})]})]})}var K=n(75751),R=n(76868),X=n(12373);let W=e=>{let{events:t,selectedFightNightId:n}=e;return(0,s.jsx)(c.BU,{children:t.map(e=>(0,s.jsx)(X.A,{event:e,isSelected:n===e.tournament.id},e.id))})},J=e=>{let{rows:t=4}=e;return(0,s.jsx)(l.so,{direction:"column",gap:"sm",p:"sm",children:[...Array(t)].map((e,t)=>(0,s.jsx)(l.az,{h:"[162px]",bg:{base:"surface.s1",md:"surface.s2"},br:"lg"},"organization-events-cl-".concat(t)))})},Z=e=>{let{organizationId:t,selectedFightNightId:n,activeMonth:i}=e,{data:l,isLoading:a}=(0,d.Ay)(function(e,t){if(void 0===t)return null;let n=t.year.toString(),i=t.month.toString().padStart(2,"0");return r.V3t.scheduledMmaMainEvents(e,n,i)}(t,i));if(void 0===i||a)return(0,s.jsx)(J,{});let o=null==l?void 0:l.events.filter(e=>e.status.type===r.XUj.Finished);return void 0===o?(0,s.jsx)(R.p,{graphic:"no-games-mma",descriptionMessageId:"no_events_empty_state_mma"}):(0,s.jsx)(W,{events:o,selectedFightNightId:n})};var $=n(12047),V=n(54409);let q=e=>{let{type:t,onClick:n,visible:i}=e;return i?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.so,{justify:"prev"===t?"flex-start":"flex-end",minW:"[150px]",hideBelow:"lg",children:(0,s.jsx)(g.$n,{size:"secondary",variant:"outline",br:"xs",px:"sm",onClick:()=>n(t),children:"prev"===t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(V.pa2,{fill:"primary.default"}),(0,s.jsx)(p.A,{id:"basic.previous"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.A,{id:"basic.next"}),(0,s.jsx)(V.CCT,{fill:"primary.default"})]})})}),(0,s.jsx)(l.so,{w:"2xl",hideFrom:"lg",children:(0,s.jsx)(g.K0,{size:"secondary",variant:"clear",onClick:()=>n(t),children:"prev"===t?(0,s.jsx)(V.pa2,{fill:"primary.default"}):(0,s.jsx)(V.CCT,{fill:"primary.default"})})})]}):(0,s.jsx)(l.az,{w:{base:"2xl",lg:"[150px]"}})},G=e=>{let{activeMonth:t,setActiveMonth:n,monthsWithEvents:i}=e,{isDesktop:r}=(0,g.$c)(),o=(0,$.Ay)({isInMobileTabs:!1,isSportMenuVisible:!0}),{shouldDisplayPrev:d,shouldDisplayNext:c,activeDateIndex:u}=function(e,t){let n=e.findIndex(e=>e.month===(null==t?void 0:t.month)&&e.year===t.year);return{shouldDisplayPrev:n!==e.length-1,shouldDisplayNext:0!==n,activeDateIndex:n}}(i,t),h=e=>{n(i["prev"===e?u+1:u-1]),window.scrollTo({top:0,behavior:"smooth"})};return(0,s.jsxs)(l.so,{bg:"surface.s1",px:"md",py:"sm",elevation:"2",position:"sticky",zIndex:"sticky",style:{top:r?112:o},children:[(0,s.jsx)(q,{visible:d,type:"prev",onClick:h}),(0,s.jsx)(l.so,{justify:"center",align:"center",grow:999,children:(0,s.jsx)(a.ms,{items:i,selectedItem:t,renderItem:e=>e?(0,s.jsx)(E.XU,{value:function(e){return new Date(e.year,e.month-1).getTime()}(e),month:"long",year:"numeric"}):null,onSelectedItemChange:e=>{e.selectedItem&&(n(e.selectedItem),window.scrollTo({top:0,behavior:"smooth"}))}})}),(0,s.jsx)(q,{visible:c,type:"next",onClick:h})]})},Q=e=>{let{organizationId:t,selectedFightNightId:n,monthsWithEvents:i,activeMonth:r,setActiveMonth:l}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(G,{activeMonth:r,monthsWithEvents:i,setActiveMonth:l}),(0,s.jsx)(Z,{activeMonth:r,organizationId:t,selectedFightNightId:n})]})},ee=3600*(0,C.UW)(),et=e=>{let[t,n]=(0,o.useState)(void 0),{data:i}=(0,d.Ay)(r.V3t.monthsWithEvents(e,ee));return(0,o.useEffect)(()=>{var e;n(null==i||null==(e=i.monthsWithEvents)?void 0:e[0])},[i,e]),{activeMonth:t,setActiveMonth:n,monthsWithEvents:(null==i?void 0:i.monthsWithEvents)||[]}},en=e=>{let{data:t,isLoading:n}=(0,d.Ay)(r.V3t.liveEvents(e));return{liveEvents:(null==t?void 0:t.events)||[],isLoading:n}},ei=e=>{let{organizationId:t,selectedFightNightId:n,setLiveEventsCount:i}=e,{liveEvents:r,isLoading:l}=en(t);return((0,o.useEffect)(()=>{i(r.length||void 0)},[r]),l)?(0,s.jsx)(J,{}):r?(0,s.jsx)(W,{events:r,selectedFightNightId:n}):(0,s.jsx)(R.p,{graphic:"no-games-mma",descriptionMessageId:"no_events_empty_state_mma"})};var es=function(e){return e.Live="live",e.Upcoming="next",e.Finished="last",e}({});let er=e=>{let{activeTab:t,hasLiveTab:n,hasUpcomingTab:i,liveEventsCount:r}=e,{isDesktop:o}=(0,g.$c)(),d=(0,$.Ay)({isInMobileTabs:!1,isSportMenuVisible:!0});return(0,s.jsxs)(l.az,{bg:"surface.s1",px:"lg",py:"sm",borderBottom:"1px solid {colors.neutrals.nLv4}",position:t===es.Finished?"static":"sticky",zIndex:"sticky",style:{top:o?112:d},children:[n&&(0,s.jsx)(a.tU.Tab,{tabKey:es.Live,bg:t===es.Live?"sofaSingles.live":"surface.s2",border:t===es.Live?"sofaSingles.live":"surface.s2",children:(0,s.jsxs)(g.EY,{textStyle:"assistive.default",color:t===es.Live?"onColor.primary":"status.live",lineHeight:1,children:[(0,s.jsx)(p.A,{id:"live"})," ",void 0!==r&&"(".concat(r,")")]})}),i&&(0,s.jsx)(a.tU.Tab,{tabKey:es.Upcoming,children:(0,s.jsx)(p.A,{id:"mma_upcoming_fight"})}),(0,s.jsx)(a.tU.Tab,{tabKey:es.Finished,children:(0,s.jsx)(p.A,{id:"stage_result_finished"})})]})},el=e=>{let{organizationId:t,selectedFightNightId:n}=e,{data:i,isLoading:l}=(0,d.Ay)(r.V3t.mainEvents(t,"next"));return l?(0,s.jsx)(J,{}):i?(0,s.jsx)(W,{events:i.events,selectedFightNightId:n}):(0,s.jsx)(R.p,{graphic:"no-games-mma",descriptionMessageId:"no_events_empty_state_mma"})};var ea=n(7263);let eo=e=>{let[t,n]=(0,o.useState)(void 0),[i,s]=(0,o.useState)(void 0),{data:l}=(0,d.Ay)([r.V3t.mainEvents(e,"next"),"HEAD"],{fetcher:ea.n}),{data:a}=(0,d.Ay)([r.V3t.liveEvents(e),"HEAD"],{fetcher:ea.n});return(0,o.useEffect)(()=>{if(void 0!==l&&void 0!==a){if(a)return void s(es.Live);if(l)return void s(es.Upcoming);s(es.Finished)}},[a,l]),{activeTab:i,setActiveTab:s,hasLiveTab:a,hasUpcomingTab:l,liveEventsCount:t,setLiveEventsCount:n}};function ed(e){let{selectedFightNightId:t,id:n}=e,{activeMonth:i,setActiveMonth:r,monthsWithEvents:o}=et(n),{activeTab:d,setActiveTab:c,hasLiveTab:u,hasUpcomingTab:h,liveEventsCount:x,setLiveEventsCount:m}=eo(n);return void 0===d?(0,s.jsx)(l.az,{h:"[800px]"}):(0,s.jsx)(K.t,{tag:"OrganizationEvents",children:(0,s.jsxs)(a.tU,{variant:"tertiary",value:d,onChange:e=>c(e),children:[(0,s.jsx)(er,{activeTab:d,hasLiveTab:u,hasUpcomingTab:h,liveEventsCount:x}),(0,s.jsx)(a.tU.Panel,{tabKey:es.Live,children:(0,s.jsx)(ei,{organizationId:n,selectedFightNightId:t,setLiveEventsCount:m})}),(0,s.jsx)(a.tU.Panel,{tabKey:es.Upcoming,children:(0,s.jsx)(el,{organizationId:n,selectedFightNightId:t})}),(0,s.jsx)(a.tU.Panel,{tabKey:es.Finished,children:(0,s.jsx)(Q,{organizationId:n,selectedFightNightId:t,monthsWithEvents:o,activeMonth:i,setActiveMonth:r})})]})})}var ec=n(4866),eu=n(98449),eh=n(46009),ex=n(8973);function em(e){let{id:t,children:n}=e;return(0,s.jsxs)(l.az,{w:"100%",h:{base:"[128px]",lg:"[160px]"},borderTopLeftRadius:{md:"xl"},borderTopRightRadius:{md:"xl"},overflow:"hidden",position:"relative",children:[(0,s.jsx)(l.az,{h:{base:"[128px]",lg:"[160px]"},borderTopLeftRadius:{md:"xl"},borderTopRightRadius:{md:"xl"},position:"relative",overflow:"hidden",bgSize:"[200% 200%]",bgPosition:"center",filter:"auto",blur:"[50px]",scale:"auto",scaleX:"[1.5]",scaleY:"[1.5]",style:{backgroundImage:"url(".concat(r.V3t.image(t),")")},children:(0,s.jsx)(l.az,{h:{base:"[128px]",lg:"[160px]"},bg:"overlay.darken1",bgRepeat:"no-repeat",bgPosition:"center"})}),(0,s.jsx)(l.so,{w:"100%",h:"100%",direction:"column",justify:"space-between",position:"absolute",top:"[0px]",left:"[0px]",children:n})]})}function eg(e){var t;let{organization:n,children:i}=e,{isDesktopLarge:a}=(0,g.$c)();return n?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.so,{mt:{base:"md",lg:"xl"},mx:{base:"md",lg:"xl"},children:(0,s.jsxs)(l.so,{gap:{base:"md",lg:"xl"},w:"100%",children:[(0,s.jsx)(I.BK,{organization:n,children:(0,s.jsx)(l.az,{w:{base:"5xl",lg:"7xl"},h:{base:"5xl",lg:"7xl"},p:"xs",bg:"surface.s1",br:"xs",children:(0,s.jsx)(ec.e,{id:n.id,size:a?64:48})})}),(0,s.jsxs)(l.so,{direction:"column",justify:"center",gap:{base:"xs",lg:"sm"},h:"100%",overflow:"hidden",children:[(0,s.jsxs)(l.so,{align:"center",gap:"xs",children:[(0,s.jsx)(I.BK,{organization:n,style:{flexShrink:1,overflow:"hidden"},children:(0,s.jsx)(g.EY,{textStyle:{base:"display.large",lg:"display.extraLarge"},color:"onColor.primary",display:"block",truncate:!0,children:n.name})}),(0,s.jsx)(eh.e,{id:n.id,entity:r.bq7.Tournaments,location:ex.y.Header,type:ex.b.Stage,isOnOverlay:!0})]}),(null==(t=n.country)?void 0:t.alpha2)&&(0,s.jsxs)(l.so,{align:"center",gap:{base:"xs",lg:"sm"},h:{base:"lg",lg:"2xl"},children:[(0,s.jsx)(l.az,{w:{base:"lg",lg:"2xl"},h:{base:"lg",lg:"2xl"},children:(0,s.jsx)(ec.w,{size:a?32:16,alpha2:n.country.alpha2})}),(0,s.jsx)(g.EY,{textStyle:{base:"body.medium",lg:"display.medium"},color:"onColor.primary",truncate:!0,children:(0,s.jsx)(eu.m,{name:n.country.name||"",slug:v()(n.country.name||"")})})]})]})]})}),(0,s.jsx)(l.az,{h:"4xl",children:i})]}):null}function ep(e){let{id:t,organization:n,children:i}=e;return(0,s.jsx)(em,{id:t,children:(0,s.jsx)(eg,{organization:n,children:i})})}var ej=n(75327),ev=n(79926);function ef(e){let{type:t,gender:n}=e,{data:i,error:a}=(0,d.Ay)(r.AZO.rankingsById(t.id));return(null==i?void 0:i.rankingRows.length)?(0,s.jsx)(s.Fragment,{children:i.rankingRows.map(e=>(0,s.jsx)(ev.A,{ranking:e,gender:n},e.id))}):a?null:(0,s.jsx)(l.az,{h:"[664px]"})}function ey(e){let{rankingTypes:t,gender:n}=e,[i,r]=(0,o.useState)(!0);return(0,s.jsxs)(a.tU,{variant:"tertiary",initialValue:t[0].id,onChange:()=>{i&&r(!1)},children:[(0,s.jsx)(a.tU.List,{scroll:!0,h:"48px",px:"lg",children:t.map(e=>(0,s.jsx)(a.tU.Tab,{tabKey:e.id,hoverBg:"surface.s2",children:e.weightClass?(0,s.jsx)(ej.L,{weightClass:e.weightClass}):e.name},e.id))}),(0,s.jsx)(ev.k,{}),t.map(e=>(0,s.jsx)(a.tU.Panel,{tabKey:e.id,children:(0,s.jsx)(ef,{type:e,gender:n})},e.id))]})}function eb(e){let{rankingTypes:t,genders:n}=e,[i,d]=(0,o.useState)(!0);return(0,s.jsx)(l.az,{p:{mdDown:"sm"},children:(0,s.jsx)(l.az,{bg:{mdDown:"surface.s1"},br:{mdDown:"lg"},elevation:{mdDown:"2"},pt:"sm",pb:{base:"sm",md:"lg"},children:(0,s.jsxs)(a.tU,{variant:"secondary",initialValue:n[0],onChange:()=>{i&&d(!1)},children:[(0,s.jsx)(l.so,{align:"center",h:"4xl",px:"lg",children:(0,s.jsx)(a.tU.List,{scroll:!0,children:n.map(e=>(0,s.jsx)(a.tU.Tab,{tabKey:e,children:(0,s.jsx)(p.A,{id:e===r.YT8.Male?"mens_division":"womens_division"})},e))})}),n.map(e=>(0,s.jsx)(a.tU.Panel,{tabKey:e,children:(0,s.jsx)(ey,{rankingTypes:t.filter(t=>t.gender===e),gender:e})},e))]})})})}function ew(e){let{id:t}=e,{data:n,error:i}=(0,d.Ay)(r.AZO.uniqueTournamentSummary(t));if(!(null==n?void 0:n.rankings.length))return i?null:(0,s.jsx)(l.az,{height:"[800px]"});let a=n.rankings.map(e=>e.rankingType),o=new Set(a.map(e=>e.gender)),c=[r.YT8.Male,r.YT8.Female].filter(e=>o.has(e));return c?(0,s.jsx)(eb,{rankingTypes:a,genders:c}):null}function e_(e){let{selectedFightNightId:t,id:n}=e,{data:i,error:g}=(0,d.Ay)(r.V3t.details(n)),[p,j]=(0,o.useState)(u.H.Matches),{hasRankings:v}=(0,x.A)({hasRankings:{route:r.AZO.uniqueTournamentSummary(n)}}),{logTabChange:f}=(0,h.A)(),y=e=>f({type:e,id:n,location:u.m.Organization});if(g)return null;let b=null==i?void 0:i.uniqueTournament;return(0,s.jsx)(l.az,{md:{bg:"surface.s1",br:"xl",elevation:"2"},children:(0,s.jsxs)(a.tU,{fullWidthTabs:!0,variant:"primary",initialValue:u.H.Matches,value:p,onChange:e=>j(e),children:[(0,s.jsx)(ep,{id:n,organization:b,children:(0,s.jsxs)(a.tU.List,{w:"100%",underline:{color:"onColor.primary"},scroll:!0,h:48,children:[(0,s.jsx)(m.A,{onTabClick:y,activeTab:p,tabKey:u.H.Details,messageId:"details"}),(0,s.jsx)(m.A,{onTabClick:y,activeTab:p,tabKey:u.H.Matches,messageId:"events_title"}),v&&(0,s.jsx)(m.A,{onTabClick:y,activeTab:p,tabKey:u.H.Rankings,messageId:"rankings"})]})}),(0,s.jsx)(a.tU.Panel,{tabKey:u.H.Details,children:(0,s.jsx)(c.BU,{children:(0,s.jsx)(N,{organization:b})})}),(0,s.jsx)(a.tU.Panel,{tabKey:u.H.Matches,children:(0,s.jsx)(ed,{id:n,selectedFightNightId:t})}),v&&(0,s.jsx)(a.tU.Panel,{tabKey:u.H.Rankings,children:(0,s.jsx)(ew,{id:n})})]})})}},5631:(e,t,n)=>{n.d(t,{B:()=>h});var i=n(6029),s=n(21377),r=n(41249),l=n(55729),a=n(62859),o=n(65078),d=n(33942);let c=(e,t)=>t?e?"onColor.primary":"onColor.secondary":e?"onSurface.nLv1":"onSurface.nLv3",u=(e,t)=>t?e?"onColor.secondary":"onColor.primary":e?"onSurface.nLv1":"onSurface.nLv3";function h(e){let{isOnOverlay:t}=e,{event:n,leftTeam:h,rightTeam:x}=(0,l.useContext)(a.y$),m=(0,o.gm)(n,"winnerCode");return(0,i.jsxs)(r.so,{mx:"sm",flex:"1",direction:"column",justify:"space-evenly",children:[(0,i.jsxs)(r.so,{h:"28px",align:"center",justify:"space-between",gap:"sm",mt:"xs",children:[(0,i.jsx)(r.EY,{as:"div",font:"display.micro",color:c(m===s.Jfo.Left||void 0===m,t),align:"left",style:{flexGrow:10,flexBasis:"24px"},children:h.name}),(0,i.jsx)(r.EY,{as:"div",align:"center",font:"display.small",color:u(m===s.Jfo.Left||m===s.Jfo.Right,t),style:{flexGrow:1,flexBasis:"24px"},children:"VS"}),(0,i.jsx)(r.EY,{as:"div",font:"display.micro",color:c(m===s.Jfo.Right||void 0===m,t),align:"right",style:{flexGrow:10,flexBasis:"24px"},children:x.name})]}),(0,i.jsx)(d.A,{event:n,isOnOverlay:t})]})}},5884:(e,t,n)=>{n.r(t),n.d(t,{default:()=>a});var i=n(6029),s=n(21377),r=n(45860),l=n(17239);function a(e){let{eventId:t,hideTitle:n,isInWidget:a}=e,{data:o}=(0,r.Ay)(s.bnp.eventHighlights(t));return o?(0,i.jsx)(l.$,{highlights:o.highlights,hideTitle:n,isInWidget:a}):null}},8056:(e,t,n)=>{n.r(t),n.d(t,{UniqueTournamentMedia:()=>a,default:()=>o});var i=n(6029),s=n(21377),r=n(45860),l=n(17239);function a(e){let{uniqueTournamentId:t,hideTitle:n}=e,{data:a}=(0,r.Ay)(s.V3t.media(t));return a&&a.media.length?(0,i.jsx)(l.$,{highlights:a.media,hideTitle:n}):null}let o=a},12373:(e,t,n)=>{n.d(t,{A:()=>E});var i=n(6029),s=n(33144),r=n(95083),l=n(76356),a=n(55729),o=n(65789),d=n(62859),c=n(65078),u=n(8973),h=n(20204),x=n(5631),m=n(2315),g=n(66071),p=n(98559),j=n(59721);function v(e){var t;let{fightNight:n,venue:s}=e;return(0,i.jsxs)(l.so,{justify:"space-between",align:"center",h:"5xl",pl:"lg",borderTopLeftRadius:"sm",borderTopRightRadius:"sm",overflow:"hidden",children:[(0,i.jsxs)(l.so,{justify:"center",align:"center",gap:"md",pr:"lg",children:[(0,i.jsx)(l.az,{w:"3xl",h:"3xl",children:(0,i.jsx)(j.e,{size:40,id:(null==(t=n.uniqueTournament)?void 0:t.id)||0})}),(0,i.jsxs)(l.az,{overflow:"hidden",children:[(0,i.jsx)(r.EY,{textStyle:"display.medium",color:"neutrals.nLv1",display:"block",truncate:!0,children:n.name}),(0,i.jsx)(r.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",display:"block",truncate:!0,children:(0,p.zx)(s,n.location)})]})]}),n.isLive&&(0,i.jsx)(l.az,{w:"sm",h:"sm",br:"50%",bg:"status.live",mr:"md"})]})}var f=n(21377),y=n(4967),b=n(90248),w=n(90510);function _(){let{event:e}=(0,a.useContext)(d.y$);return e.status.type===f.XUj.InProgress||e.status.type===f.XUj.WillContinue?(0,i.jsx)(l.so,{justify:"center",align:"center",h:"lg",px:"xs",br:"xs",bg:"overlay.darken2",children:(0,i.jsx)(r.EY,{textStyle:"assistive.default",color:"status.live",textAlign:"center",children:(0,i.jsx)(b.A,{id:"live"})})}):(0,i.jsx)(r.EY,{textStyle:"body.small",color:"onColor.primary",children:(0,i.jsx)(w.XU,{value:1e3*e.startTimestamp,...y.or.fullDateTime,year:"numeric"})})}var C=n(44987);function T(){let{isMobile:e}=(0,r.$c)();return(0,i.jsxs)(l.so,{justify:"space-between",align:"center",w:"100%",h:"xl",px:"sm",position:"absolute",top:"sm",left:"[0px]",children:[(0,i.jsx)(l.so,{basis:"[0px]",grow:1,children:(0,i.jsx)(_,{})}),(0,i.jsx)(r.EY,{textStyle:"body.small",color:"onColor.primary",textAlign:"center",display:"block",flexBasis:"[0px]",flexGrow:1,children:(0,i.jsx)(g.A,{})}),(0,i.jsx)(l.so,{justify:"flex-end",basis:"[0px]",grow:1,children:(0,i.jsx)(m.A,{isOnOverlay:!0,location:e?u.y.MainMatches:u.y.EventsTab,entityType:u.b.Tournament})})]})}function A(){var e,t;let{event:n,leftTeam:r,rightTeam:o}=(0,a.useContext)(d.y$),u=(0,c.gm)(n,"winnerCode"),{hasLeftTeamOpacity:h,hasRightTeamOpacity:m}=(0,p.Zq)(n.status.type,u);return(0,i.jsxs)(l.so,{justify:"space-between",h:"5xl",mt:"md",children:[(0,i.jsx)(l.az,{w:"5xl",h:"5xl",opacity:h?"[0.6]":void 0,children:(0,i.jsx)(s.p,{hasFlag:!0,id:r.id,size:56,alpha2:null==(e=r.country)?void 0:e.alpha2,flagSize:20,sport:r.sport,gender:n.gender})}),(0,i.jsx)(x.B,{isOnOverlay:!0}),(0,i.jsx)(l.az,{w:"5xl",h:"5xl",opacity:m?"[0.6]":void 0,children:(0,i.jsx)(s.p,{hasFlag:!0,id:o.id,size:56,alpha2:null==(t=o.country)?void 0:t.alpha2,flagSize:20,right:!0,sport:o.sport,gender:n.gender})})]})}function E(e){let{isSelected:t,event:n}=e,{event:s,leftTeam:r,rightTeam:a,leftScore:u,rightScore:x}=(0,c.AR)(n);return(0,i.jsx)(d.y$.Provider,{value:{event:s,leftTeam:r,rightTeam:a,leftScore:u,rightScore:x},children:(0,i.jsx)(h.A,{fightNight:s.tournament,children:(0,i.jsx)(o.Zp,{isInverseDesktop:!0,children:(0,i.jsxs)(l.az,{bg:{md:t?"primary.highlight":void 0},br:"lg",children:[(0,i.jsx)(v,{fightNight:s.tournament,venue:s.venue}),(0,i.jsxs)(l.az,{position:"relative",children:[(0,i.jsx)(C.A,{organization:s.tournament.uniqueTournament,borderRadius:"0 0 16px 16px",children:(0,i.jsxs)(l.az,{p:"sm",children:[(0,i.jsx)(l.az,{h:"xl"}),(0,i.jsx)(A,{})]})}),(0,i.jsx)(T,{})]})]})})})})}},17239:(e,t,n)=>{n.d(t,{$:()=>A});var i=n(6029),s=n(4967),r=n(41249),l=n(55729),a=n(90248),o=n(494),d=n(41735),c=n(65789),u=n(54409),h=n(75751),x=n(47146),m=n(76410),g=n(10794);let p=(0,d.default)(r.az).withConfig({componentId:"sc-c5b73d7d-0"})(["width:144px;height:80px;position:absolute;top:0;left:0;background:",";display:grid;svg{margin:auto;}"],e=>e.theme.colors.overlay.darken1),j=(0,d.default)(r.az).withConfig({componentId:"sc-c5b73d7d-1"})(["a:visited{.media-component-seen-notice{color:"," !important;}}img{display:block;border-radius:",";}"],e=>e.theme.colors.neutral.default,e=>e.theme.spacing.xxs);var v=n(21377);let f=/sofascore.com\/news\//g,y=[v.zut.MEDIA_VIDEO,v.zut.MEDIA_NEWS_VIDEO,v.zut.MEDIA_YOUTUBE_VIDEO],b=e=>f.test(e),w=e=>-1!==y.indexOf(e),_=e=>{let t=document.createElement("a");return t.href=e,t.host},C=e=>{if(e){let n=_(e);if("www.youtube.com"===n){let t=new URL(e).searchParams.get("v");return"https://img.youtube.com/vi/".concat(t,"/0.jpg")}if("youtu.be"===n){var t;let n=null==(t=new URL(e).pathname)?void 0:t.slice(1);return"https://img.youtube.com/vi/".concat(n,"/0.jpg")}}},T=()=>{let e=(0,l.useContext)(d.ThemeContext);return(0,i.jsx)(r.az,{w:"144",h:"80",bg:"onSurface.nLv4",display:"grid",br:"xxs",children:(0,i.jsx)(u.dwH,{m:"auto",fill:null==e?void 0:e.colors.onSurface.nLv4})})},A=e=>{let{highlights:t,hideTitle:n,isInWidget:l}=e,d=function(e){let{media:t,selectedLocale:n,geoIPAlpha2:i,n:s=10}=e;return t.sort((e,t)=>t.createdAtTimestamp-e.createdAtTimestamp).filter(e=>!e.forCountries||!e.forCountries.length||-1!==e.forCountries.indexOf(n.toUpperCase())||-1!==e.forCountries.indexOf(i.toUpperCase())).slice(0,s)}({media:[...t],selectedLocale:(0,o.d4)(g.JV),geoIPAlpha2:(0,o.d4)(g.LQ)||""});return d.length?(0,i.jsx)(h.t,{tag:"Media",children:(0,i.jsxs)(c.Zp,{isInverseDesktop:l,children:[!n&&(0,i.jsx)(c.Zp.Header,{titleId:"media",as:"h4"}),(0,i.jsx)(j,{pt:["sm",l?"sm":0],pb:["sm",l?"sm":"lg"],children:(0,i.jsx)(c.BU,{children:d.map(e=>(0,i.jsx)(r.az,{children:(0,i.jsxs)(r.so,{as:"a",href:e.url,target:"_blank",rel:e.doFollow||b(e.url)?void 0:"nofollow",onClick:()=>(0,m.Xy)(e.title),children:[(0,i.jsxs)(r.az,{position:"relative",children:[(0,i.jsx)(r._V,{src:e.thumbnailUrl||C(e.url),width:"144",height:"80",fallback:(0,i.jsx)(T,{}),alt:"thumbnail"}),w(e.mediaType)&&(0,i.jsx)(p,{children:(0,i.jsx)(u.reY,{fill:"white"})})]}),(0,i.jsxs)(r.so,{direction:"column",justify:"space-between",maxW:"calc(100% - 144px)",grow:1,pl:"lg",children:[(0,i.jsxs)(r.az,{children:[(0,i.jsx)(r.EY,{block:!0,as:"bdi",className:"media-component-title",font:"display.small",color:"onSurface.nLv1",w:"100%",lineClamp:2,children:e.title}),(0,i.jsx)(r.EY,{font:"assistive.default",color:"onSurface.nLv3",w:"100%",mt:"xs",lineClamp:1,children:e.subtitle})]}),(0,i.jsx)(r.az,{children:(0,i.jsxs)(r.so,{justify:"space-between",children:[(0,i.jsx)(r.EY,{as:"bdi",font:"body.small",color:"onSurface.nLv3",w:"100%",mt:"xs",textTransform:"firstLetter",ellipsis:!0,children:(0,i.jsx)(x.v,{timestamp:(0,s.pp)(e.createdAtTimestamp).getTime()})}),(0,i.jsx)(r.EY,{font:"body.small",className:"media-component-seen-notice",color:"transparent",w:"100%",mt:"xs",style:{textAlign:"right",userSelect:"none"},"aria-hidden":"true",ellipsis:!0,children:(0,i.jsx)(a.A,{id:"basic.seen"})})]})})]})]})},e.id))})})]})}):null}},24940:(e,t,n)=>{n.d(t,{U:()=>i});let i=(0,n(55729).createContext)(void 0)},27424:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(6029),s=n(90248);let r=JSON.parse('{"boxing":"mma_fighting_style_boxing","brazilian-jiu-jitsu":"mma_fighting_style_brazilian_jiu_jitsu","jiu-jitsu":"mma_fighting_style_jiu_jitsu","judo":"mma_fighting_style_judo","karate":"mma_fighting_style_karate","kickboxing":"mma_fighting_style_kickboxing","kung-fu":"mma_fighting_style_kung_fu","taekwondo":"mma_fighting_style_taekwondo","wrestling":"mma_fighting_style_wrestling","muay-thai":"mma_fighting_style_muay_thai","freestyle":"mma_fighting_style_freestyle","striker":"mma_fighting_style_striker","grappling":"mma_fighting_style_submission_grappling"}');var l=n(27892);function a(e){let{id:t}=e;return(0,i.jsx)(s.A,{id:(0,l.O)(r,t)})}},32869:(e,t,n)=>{n.d(t,{A:()=>w,T:()=>b});var i=n(6029),s=n(33144),r=n(21377),l=n(95083),a=n(76356),o=n(55729),d=n(65789),c=n(62859),u=n(54409),h=n(65078),x=n(8973),m=n(70591),g=n(5631),p=n(98559),j=n(75327),v=n(27424),f=n(2315);let y=(e,t)=>{var n;if(e.fightType===r.rBd.MainCard)return 1===t&&(null==(n=e.tournament.uniqueTournament)?void 0:n.id)===p.FY?"co_main_events":0===t?"main_event":void 0};function b(){var e,t;let{event:n,leftTeam:r,rightTeam:l}=(0,o.useContext)(c.y$),d=(0,h.gm)(n,"winnerCode"),{hasLeftTeamOpacity:u,hasRightTeamOpacity:x}=(0,p.Zq)(n.status.type,d);return(0,i.jsxs)(a.so,{justify:"space-between",h:"7xl",py:"sm",px:"lg",children:[(0,i.jsx)(a.az,{w:"5xl",h:"5xl",opacity:u?"[0.6]":void 0,children:(0,i.jsx)(s.p,{hasFlag:!0,id:r.id,size:56,alpha2:null==(e=r.country)?void 0:e.alpha2,flagSize:20,sport:r.sport,gender:n.gender})}),(0,i.jsx)(g.B,{}),(0,i.jsx)(a.az,{w:"5xl",h:"5xl",opacity:x?"[0.6]":void 0,children:(0,i.jsx)(s.p,{hasFlag:!0,id:l.id,size:56,alpha2:null==(t=l.country)?void 0:t.alpha2,flagSize:20,right:!0,sport:l.sport,gender:n.gender})})]})}function w(e){let{event:t,leftTeam:n,rightTeam:s,leftScore:r,rightScore:o}=(0,h.AR)(e.event),g=y(t,e.index);return(0,i.jsx)(c.y$.Provider,{value:{event:t,leftTeam:n,rightTeam:s,leftScore:r,rightScore:o},children:(0,i.jsxs)(d.Zp,{isInverseDesktop:!0,children:[(0,i.jsx)(d.Zp.Header,{titleId:g}),(0,i.jsx)(m.tj,{event:t,children:(0,i.jsxs)(a.az,{py:"xs",children:[(0,i.jsxs)(a.so,{justify:"space-between",align:"center",px:"lg",py:"sm",children:[(0,i.jsxs)(a.so,{align:"center",children:[t.fightDiscipline&&(0,i.jsx)(u.u2O,{icon:t.fightDiscipline,mr:"sm"}),(0,i.jsxs)(l.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",display:"block",truncate:!0,children:[(0,i.jsx)(j.k,{event:t})," ",t.fightDiscipline&&(0,i.jsx)(v.A,{id:t.fightDiscipline})]})]}),(0,i.jsx)(f.A,{location:x.y.FightNight,entityType:x.b.Event})]}),(0,i.jsx)(b,{})]})})]})})}},33942:(e,t,n)=>{n.d(t,{A:()=>j,r:()=>p});var i=n(6029),s=n(21377),r=n(41249),l=n(55729),a=n(90248),o=n(62859),d=n(8703),c=n(65078),u=n(98559),h=n(85578),x=n(141),m=n(39756);function g(e){let{winnerCode:t,isOnOverlay:n}=e,{event:c}=(0,l.useContext)(o.y$),u=(0,d.Mh)(c);if(!t)return null;if(t===s.Jfo.Draw||t===s.Jfo.NoContest)return(0,i.jsxs)(r.so,{align:"center",justify:"center",h:"24px",children:[(0,i.jsx)(m.k,{isOnOverlay:n,children:(0,i.jsx)(a.A,{id:t===s.Jfo.Draw?"draw":"no_contest_mma_short"})}),u&&(0,i.jsx)(r.az,{px:"sm",children:(0,i.jsxs)(r.EY,{font:"display.micro",color:"onColor.secondary",textTransform:"uppercase",lineHeight:14,children:[(0,i.jsx)(a.A,{id:"mma_status_round_short",values:{n:c.finalRound}})," | ",u]})})]});let h=t===s.Jfo.Left;return(0,i.jsxs)(r.so,{align:"center",direction:h?"row":"row-reverse",children:[(0,i.jsx)(r.so,{align:"center",justify:"center",w:36,h:24,br:"sm",bg:"success.default",children:(0,i.jsx)(r.EY,{font:"display.small",c:"surface.s1",align:"center",h:14,children:c.winType||(0,i.jsx)(a.A,{id:"win"})})}),u&&(0,i.jsx)(r.az,{px:"sm",children:(0,i.jsxs)(r.EY,{font:"display.micro",color:"success.default",textTransform:"uppercase",lineHeight:14,children:[(0,i.jsx)(a.A,{id:"mma_status_round_short",values:{n:c.finalRound}})," | ",u]})})]})}function p(e){let{winnerCode:t,isOnOverlay:n}=e;if(!t)return null;let l=t===s.Jfo.Draw||t===s.Jfo.NoContest,a=t===s.Jfo.Left||t===s.Jfo.Right,o=l?"center":t===s.Jfo.Left?"flex-start":"flex-end";return(0,i.jsx)(r.so,{"data-testid":"outcome-container",justify:o,children:(0,i.jsx)(h.O,{isOnOverlay:n,px:a?"0px":"sm",children:(0,i.jsx)(g,{winnerCode:t,isOnOverlay:n})})})}function j(e){let{event:t,isOnOverlay:n}=e,l=(0,c.gm)(t,"winnerCode");return void 0!==l&&l!==s.Jfo.Unknown?(0,i.jsx)(p,{winnerCode:l,isOnOverlay:n}):(0,u.xO)(t)?null:(0,i.jsx)(r.so,{justify:"center",children:(0,i.jsx)(x.L,{event:t,isOnOverlay:n})})}},35729:(e,t,n)=>{n.r(t),n.d(t,{TeamMedia:()=>o,default:()=>d});var i=n(6029),s=n(21377),r=n(45860),l=n(17239),a=n(11998);function o(e){let{teamId:t,hideTitle:n}=e,{data:o,isLoading:d,error:c}=(0,r.Ay)(s.cWY.media(t));return d?(0,i.jsx)(a.n,{}):!o||c?null:(0,i.jsx)(l.$,{highlights:o.media,hideTitle:n})}let d=o},39756:(e,t,n)=>{n.d(t,{k:()=>r});var i=n(6029),s=n(41249);function r(e){let{isOnOverlay:t,children:n,isSpecial:r}=e;return(0,i.jsx)(s.EY,{as:"div",font:"display.small",lineHeight:16,color:t||r?"onColor.primary":"onSurface.nLv1",textTransform:r?void 0:"uppercase",children:n})}},41358:(e,t,n)=>{n.d(t,{J:()=>o,c:()=>d});var i=n(95083),s=n(81278),r=n(55729),l=n(76410),a=n(24940);let o=(e,t)=>{let{isMobile:n}=(0,i.$c)(),a=(0,s.useRouter)();(0,r.useEffect)(()=>{switch(e){case"sport":if((0,l.Mt)({name:document.title,link:a.asPath,type:a.route}),n)break;case"organization":(0,l.IX)(t)}},[e,a,n])},d=e=>{let t=(0,r.useContext)(a.U);(0,r.useEffect)(()=>{(0,l.tw)(e.id,e.isLive)},[e.id,null==t?void 0:t.page])}},41449:(e,t,n)=>{n.d(t,{N:()=>D});var i=n(6029),s=n(21377),r=n(95083),l=n(76356),a=n(41249),o=n(55729),d=n(90248),c=n(45860),u=n(65789),h=n(7263),x=n(98775),m=n(96913),g=n(28132),p=n(28171),j=n(32869),v=n(59721),f=n(4967),y=n(90510),b=n(70591),w=n(98559);function _(e){let{fightNight:t,venue:n,startTimestamp:s}=e;return t.uniqueTournament?(0,i.jsx)(u.Zp,{isInverseDesktop:!0,children:(0,i.jsxs)(l.so,{align:"center",gap:"lg",h:"5xl",px:"lg",py:"sm",children:[(0,i.jsx)(l.az,{h:"3xl",children:(0,i.jsx)(b.tQ,{tournament:t.uniqueTournament,children:(0,i.jsx)(v.e,{id:t.uniqueTournament.id,size:40})})}),(0,i.jsxs)(l.az,{overflow:"hidden",children:[(0,i.jsx)(r.EY,{textStyle:"display.medium",color:"neutrals.nLv1",display:"block",truncate:!0,children:(0,i.jsx)(y.XU,{value:new Date(1e3*s),...f.or.dateTimeWithShortWeekday})}),(0,i.jsx)(r.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",display:"block",truncate:!0,children:(0,w.zx)(n,t.location)})]})]})}):null}function C(e){let{groupedEvents:t,nextEventId:n,type:s,tabKey:r,fightNight:l,venue:o}=e;if(0===t[s].length)return null;let d=Math.min(...t[s].map(e=>e.startTimestamp));return(0,i.jsx)(a.tU.Panel,{tabKey:r,children:(0,i.jsxs)(u.BU,{children:[(0,i.jsx)(_,{fightNight:l,venue:o,startTimestamp:d}),t[s].map((e,t)=>(0,i.jsx)(j.A,{event:e,index:t,nextEventId:n},e.id))]})})}var T=n(41358),A=n(3898);function E(e){let{fightNightId:t}=e;return(0,i.jsx)(a.tU.Panel,{tabKey:g.H.Media,children:(0,i.jsx)(l.az,{bg:{mdDown:"surface.s0"},p:{mdDown:"sm"},children:(0,i.jsx)(A.in,{tournamentId:t,br:[void 0,"0 0 lg lg"],elevation:void 0})})})}let k=e=>{let t,n={earlyprelims:[],maincard:[],prelims:[],unknown:[]};return e.forEach(e=>{if(e.fightType&&n[e.fightType].push(e),!t||t.status.type===s.XUj.NotStarted){if(e.status.type===s.XUj.InProgress||e.status.type===s.XUj.WillContinue){t=e;return}if(e.status.type===s.XUj.NotStarted){var i;(null==t?void 0:t.order)&&!(t.order>(null!=(i=e.order)?i:0))||(t=e)}}}),{groupedEvents:n,nextEvent:t}},z=(e,t)=>{let n=Object.values(s.rBd).find(t=>e[t].length>0);switch(n){case s.rBd.MainCard:return g.H.MainCard;case s.rBd.Prelims:return g.H.Prelims;default:return t?g.H.Media:n===s.rBd.EarlyPrelims?g.H.EarlyPrelims:g.H.Other}};var S=n(1775),I=n(4832);let U=e=>{let{organizationId:t}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.az,{h:"[128px]",bg:"surface.s1"}),(0,i.jsxs)(u.BU,{children:[(0,i.jsx)(u.Zp,{children:(0,i.jsx)(l.az,{h:"5xl"})}),[...Array(6)].map((e,n)=>(0,i.jsx)(u.Zp,{children:(0,i.jsx)(l.az,{h:0===n||1===n&&t===w.FY?"[162px]":"[122px]"})},"fight-".concat(n,"-loader")))]})]})};function L(e){let{groupedEvents:t,fightNight:n,venue:d,hasMedia:c,defaultTab:u}=e,[h,x]=(0,o.useState)(u),j=n.name.split(":"),v=j.length>1?j[0].trim():void 0,f=(j[1]||j[0]).trim(),{logTabChange:y}=(0,p.A)();(0,T.c)(n);let b=e=>y({type:e,id:n.id,location:m.m.FightNight});return(0,i.jsxs)(a.tU,{fullWidthTabs:!0,variant:"primary",initialValue:u,onChange:e=>x(e),children:[(0,i.jsx)(I.i,{organization:n.uniqueTournament,isHeader:!0,h:"128px",children:(0,i.jsxs)(l.so,{direction:"column",justify:"space-between",h:"100%",overflow:"auto",children:[(0,i.jsxs)(l.az,{h:"5xl",px:"lg",py:"sm",overflow:"hidden",children:[(0,i.jsx)(r.EY,{textStyle:"assistive.default",color:"onColor.secondary",h:"lg",display:"block",truncate:!0,children:v}),(0,i.jsx)(r.EY,{color:"onColor.primary",h:"xl",display:"block",truncate:!0,children:f})]}),(0,i.jsxs)(a.tU.List,{underline:{color:"onColor.primary"},scroll:!0,h:48,children:[t[s.rBd.MainCard].length>0&&(0,i.jsx)(S.A,{activeTab:h,onTabClick:b,tabKey:g.H.MainCard,messageId:"main_card"}),t[s.rBd.Prelims].length>0&&(0,i.jsx)(S.A,{activeTab:h,onTabClick:b,tabKey:g.H.Prelims,messageId:"prelims"}),c&&(0,i.jsx)(S.A,{activeTab:h,onTabClick:b,tabKey:g.H.Media,messageId:"media"}),t[s.rBd.EarlyPrelims].length>0&&(0,i.jsx)(S.A,{activeTab:h,onTabClick:b,tabKey:g.H.EarlyPrelims,messageId:"early_prelims_mma"}),t[s.rBd.Unknown].length>0&&(0,i.jsx)(S.A,{activeTab:h,onTabClick:b,tabKey:g.H.Other,messageId:"other"})]})]})}),(0,i.jsx)(C,{tabKey:g.H.MainCard,fightNight:n,venue:d,groupedEvents:t,type:s.rBd.MainCard}),(0,i.jsx)(C,{tabKey:g.H.Prelims,fightNight:n,venue:d,groupedEvents:t,type:s.rBd.Prelims}),(0,i.jsx)(E,{fightNightId:n.id}),(0,i.jsx)(C,{fightNight:n,venue:d,tabKey:g.H.EarlyPrelims,groupedEvents:t,type:s.rBd.EarlyPrelims}),(0,i.jsx)(C,{fightNight:n,venue:d,tabKey:g.H.Other,groupedEvents:t,type:s.rBd.Unknown})]})}function O(e){let{groupedEvents:t,fightNight:n,venue:r,hasMedia:o,defaultTab:c}=e;return(0,T.c)(n),(0,i.jsx)(u.Zp,{children:(0,i.jsxs)(a.tU,{variant:"secondary",initialValue:c,children:[(0,i.jsx)(l.so,{px:"lg",pt:"lg",pb:"sm",borderBottom:"1px solid {colors.neutrals.nLv4}",children:(0,i.jsxs)(a.tU.List,{scroll:!0,children:[t[s.rBd.MainCard].length>0&&(0,i.jsx)(a.tU.Tab,{tabKey:g.H.MainCard,children:(0,i.jsx)(d.A,{id:"main_card"})}),t[s.rBd.Prelims].length>0&&(0,i.jsx)(a.tU.Tab,{tabKey:g.H.Prelims,children:(0,i.jsx)(d.A,{id:"prelims"})}),o&&(0,i.jsx)(a.tU.Tab,{tabKey:g.H.Media,children:(0,i.jsx)(d.A,{id:"media"})}),t[s.rBd.EarlyPrelims].length>0&&(0,i.jsx)(a.tU.Tab,{tabKey:g.H.EarlyPrelims,children:(0,i.jsx)(d.A,{id:"early_prelims_mma"})}),t[s.rBd.Unknown].length>0&&(0,i.jsx)(a.tU.Tab,{tabKey:g.H.Other,children:(0,i.jsx)(d.A,{id:"other"})})]})}),(0,i.jsx)(C,{fightNight:n,venue:r,tabKey:g.H.MainCard,groupedEvents:t,type:s.rBd.MainCard}),(0,i.jsx)(C,{fightNight:n,venue:r,tabKey:g.H.Prelims,groupedEvents:t,type:s.rBd.Prelims}),(0,i.jsx)(E,{fightNightId:n.id}),(0,i.jsx)(C,{fightNight:n,venue:r,tabKey:g.H.EarlyPrelims,groupedEvents:t,type:s.rBd.EarlyPrelims}),(0,i.jsx)(C,{fightNight:n,venue:r,tabKey:g.H.Other,groupedEvents:t,type:s.rBd.Unknown})]})})}function D(e){var t;let{id:n,organizationId:a}=e,{data:o,error:d}=(0,c.Ay)(s.V3t.mmaEvents(a,n,"all"),{refreshInterval:2e4}),{data:m}=(0,c.Ay)([s.yKR.media(n),"HEAD"],{refreshInterval:12e4,fetcher:h.n}),{isMobile:g}=(0,r.$c)();if(!(null==o?void 0:o.events.length))return d?null:g?(0,i.jsx)(U,{organizationId:a}):(0,i.jsx)(u.HH,{isCard:!g,children:(0,i.jsx)(l.az,{h:"[800px]"})});let{groupedEvents:p,nextEvent:j}=k(o.events),v=z(p,m),f={groupedEvents:p,fightNight:o.events[0].tournament,nextEvent:j,venue:null==(t=o.events.find(e=>{var t;return null==(t=e.venue)?void 0:t.id}))?void 0:t.venue,hasMedia:m,defaultTab:v};return(0,i.jsx)(x.A.Provider,{value:{nextFightId:null==j?void 0:j.id},children:g?(0,i.jsx)(L,{...f}):(0,i.jsx)(O,{...f})})}},44987:(e,t,n)=>{n.d(t,{A:()=>c});var i=n(6029),s=n(41249),r=n(41735);let l=(e,t)=>"url(/static/images/mma-octogons/".concat(e,".").concat(t,") no-repeat center center"),a=(0,r.default)(s.az).withConfig({componentId:"sc-5feeb543-0"})(["overflow:hidden;background:",";background-size:cover;"],e=>"".concat(l(e.isFeaturedEvent?"featured-event":"event-card","png"))),o=(0,r.default)(s.az).withConfig({componentId:"sc-5feeb543-1"})(["background:",";"],e=>!e.isFeaturedEvent&&(e.gradient?"linear-gradient(to bottom, ".concat(e.color,", ").concat(e.gradient,")"):e.color)),d=(0,r.default)(s.az).withConfig({componentId:"sc-5feeb543-2"})(["background:"," no-repeat center;backdrop-filter:",";"],e=>e.theme.colors.overlay.darken2,e=>"blur(".concat(e.isHeader?"3px":"2px",")"));function c(e){let{organization:t,children:n,isHeader:s,isFeaturedEvent:l,h:c="100%",...u}=e,h=(0,r.useTheme)(),x=(null==t?void 0:t.primaryColorHex)&&(s?void 0:h.setAlpha(t.primaryColorHex,0)),m=(null==t?void 0:t.primaryColorHex)&&(s?h.setAlpha(t.primaryColorHex,.7):t.primaryColorHex);return(0,i.jsx)(a,{h:c,...u,isFeaturedEvent:l,children:(0,i.jsx)(o,{h:c,color:m,gradient:x,isFeaturedEvent:l,children:(0,i.jsx)(d,{h:c,isHeader:s,children:n})})})}},55342:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(6029),s=n(21377),r=n(45860),l=n(65789),a=n(17239);function o(e){let{id:t,isDesktop:n}=e,{data:o}=(0,r.Ay)(s.dVR.highlights(t));return o&&o.highlights.length?(0,i.jsx)(l.BU,{children:(0,i.jsx)(a.$,{highlights:o.highlights,hideTitle:!0,isInWidget:n})}):null}},66071:(e,t,n)=>{n.d(t,{A:()=>d});var i=n(6029),s=n(21377),r=n(55729),l=n(90248),a=n(62859);let o={[s.rBd.MainCard]:"main_card",[s.rBd.Prelims]:"prelims",[s.rBd.EarlyPrelims]:"early_prelims_mma",[s.rBd.Unknown]:""};function d(){let{event:e}=(0,r.useContext)(a.y$);return e.fightType&&e.fightType!==s.rBd.Unknown?(0,i.jsx)(l.A,{id:o[e.fightType]}):null}},75327:(e,t,n)=>{n.d(t,{k:()=>d,L:()=>o});var i=n(6029),s=n(90248),r=n(947);let l=JSON.parse('{"lightheavy":"light_heavyweight","openweight":"openweight_mma","poundforpound":"pound_for_pound","fly":"flyweight","bantam":"bantamweight","feather":"featherweight","light":"lightweight","welter":"welterweight","middle":"middleweight","heavy":"heavyweight","catch":"catchweight","straw":"strawweight","atom":"mma_weight_class_atomweight","superlight":"super_lightweight_cage","superwelter":"super_welterweight_cage","suppermiddle":"super_middleweight_cage","superheavy":"super_heavyweight_cage"}');var a=n(27892);let o=e=>{let{weightClass:t}=e;return(0,i.jsx)(s.A,{id:(0,a.O)(l,t)})},d=e=>{let{event:t}=e,n=(0,r.A)();if(!t.weightClass)return null;let s=(0,a.O)(l,t.weightClass),o=n.formatMessage({id:s});return(0,i.jsx)(i.Fragment,{children:o})}},79926:(e,t,n)=>{n.d(t,{A:()=>p,k:()=>x});var i=n(6029),s=n(33144),r=n(21377),l=n(41249),a=n(90248),o=n(54409),d=n(65078),c=n(70591);let u=(e,t)=>e&&t.winnerCode===r.Jfo.Left||!e&&t.winnerCode===r.Jfo.Right?{color:"success.default",messageId:"standings.label.wins"}:!e&&t.winnerCode===r.Jfo.Left||e&&t.winnerCode===r.Jfo.Right?{color:"error.default",messageId:"standings.label.losses"}:t.winnerCode===r.Jfo.Draw?{color:"onSurface.nLv1",messageId:"standings.label.draws"}:t.winnerCode===r.Jfo.NoContest?{color:"onSurface.nLv1",messageId:"NC"}:void 0;function h(e){let{team:t,lastEvent:n}=e,{event:s,leftTeam:r,rightTeam:o}=(0,d.AR)(n);if(!t)return null;let c=r.id===t.id,h=u(c,s);return h?(0,i.jsxs)(l.so,{direction:"column",align:"flex-end",h:"40px",style:{justifySelf:"flex-end"},children:[(0,i.jsx)(l.so,{align:"center",justify:"center",h:"24px",w:"24px",br:"50%",bg:"surface.s2",children:(0,i.jsx)(l.EY,{font:"display.small",align:"center",color:h.color,children:(0,i.jsx)(a.A,{id:h.messageId})})}),(0,i.jsxs)(l.EY,{font:"assistive.default",color:"onSurface.nLv3",children:[c?o.shortName||o.name:r.shortName||r.name,"\xa0 (",new Date(1e3*n.startTimestamp).getFullYear(),")"]})]}):null}function x(){return(0,i.jsxs)(l.so,{justify:"space-between",px:"lg",pt:"lg",children:[(0,i.jsx)(l.EY,{font:"assistive.default",color:"onSurface.nLv3",as:"div",children:(0,i.jsx)(a.A,{id:"rankings"})}),(0,i.jsx)(l.EY,{font:"body.small",color:"onSurface.nLv3",as:"div",align:"right",children:(0,i.jsx)(a.A,{id:"last_fight"})})]})}function m(e){var t,n,r;let{ranking:a,gender:d}=e;return(0,i.jsxs)(l.so,{h:"64px",pl:"sm",pr:"lg",align:"center",gap:"sm",hoverBg:"surface.s2",overflow:"hidden",justify:"space-between",children:[(0,i.jsxs)(l.so,{align:"center",gap:"sm",children:[(0,i.jsx)(l.so,{h:"16px",w:"24px",justify:"center",children:(0,i.jsx)(o.Lam,{h:"16px"})}),(0,i.jsx)(s.p,{size:40,id:null==(t=a.team)?void 0:t.id,sport:null==(n=a.team)?void 0:n.sport,gender:d}),(0,i.jsx)(l.EY,{font:"display.medium",color:"onSurface.nLv1",ellipsis:!0,children:(null==(r=a.team)?void 0:r.name)||a.name})]}),a.lastEvent&&(0,i.jsx)(h,{team:a.team,lastEvent:a.lastEvent})]})}function g(e){let{team:t,children:n}=e;return t?(0,i.jsx)(c.CJ,{team:t,children:n}):(0,i.jsx)(i.Fragment,{children:n})}function p(e){var t,n,r;let{ranking:a,gender:o}=e;return 0===a.position?(0,i.jsx)(g,{team:a.team,children:(0,i.jsx)(m,{ranking:a,gender:o})}):(0,i.jsx)(g,{team:a.team,children:(0,i.jsxs)(l.so,{h:"56px",pl:"sm",pr:"lg",align:"center",gap:"sm",hoverBg:"surface.s2",overflow:"hidden",justify:"space-between",children:[(0,i.jsxs)(l.so,{align:"center",gap:"sm",children:[(0,i.jsx)(l.EY,{as:"div",color:"onSurface.nLv1",w:"24px",mr:"sm",align:"center",children:a.position}),(0,i.jsx)(s.p,{size:32,id:null==(t=a.team)?void 0:t.id,sport:null==(n=a.team)?void 0:n.sport,gender:o}),(0,i.jsx)(l.EY,{font:"body.medium",color:"onSurface.nLv1",ellipsis:!0,children:(null==(r=a.team)?void 0:r.name)||a.name})]}),a.lastEvent&&(0,i.jsx)(h,{team:a.team,lastEvent:a.lastEvent})]})})}},85578:(e,t,n)=>{n.d(t,{O:()=>r});var i=n(6029),s=n(41249);function r(e){let{isOnOverlay:t,children:n,isSpecial:r,...l}=e;return(0,i.jsx)(s.so,{justify:"center",align:"center",px:"sm",h:"24px",br:r?"12px":"sm",bg:r?"error.default":t?"overlay.darken2":"surface.s2",...l,children:n})}},89033:(e,t,n)=>{n.d(t,{H:()=>$});var i=n(6029),s=n(59721),r=n(21377),l=n(95083),a=n(21501),o=n(76356),d=n(55729),c=n(45860),u=n(65789),h=n(14861),x=n(46009),m=n(8973),g=n(13481),p=n(98559),j=n(8329),v=n(4967),f=n(90248),y=n(90510),b=n(65078),w=n(20204);function _(e){let{event:t}=e,n=t.status.type===r.XUj.InProgress||t.status.type===r.XUj.WillContinue,s=t.status.type===r.XUj.NotStarted&&1e3*t.startTimestampMath.abs(t.startTimestamp-new Date().getTime()/1e3),o=t.status.type===r.XUj.NotStarted&&1e3*t.startTimestamp{let{isMobile:e}=(0,l.$c)(),[t,n]=(0,d.useState)(!1),i=(0,d.useCallback)(()=>n(e=>!e),[]);return(0,d.useEffect)(()=>{let e=document.getElementById("js-calendar-target");if(e)return e.addEventListener("click",i),()=>e.removeEventListener("click",i)},[e]),{showMobileCalendar:t,toggleCalendar:i}};var S=n(62859),I=n(54409),U=n(12373),L=function(e){return e.Live="live",e.Upcoming="upcoming",e.Finished="finished",e}(L||{});let O={live:"live",finished:"stage_result_finished",upcoming:"mma_upcoming_fight"},D=e=>{if(e.tournament.isLive)return"live";if(e.status.type===r.XUj.NotStarted)return"upcoming";if([r.XUj.Postponed,r.XUj.Canceled].includes(e.status.type)){let t=new Date;return new Date(1e3*e.startTimestamp)>t?"finished":"upcoming"}return"finished"};function F(e){let{events:t,selectedFightNightId:n,stickyTop:s}=e,r={live:[],upcoming:[],finished:[]};return t.forEach(e=>{r[D(e)].push(e)}),(0,i.jsx)(i.Fragment,{children:Object.keys(r).map(e=>0===r[e].length?null:(0,i.jsxs)(o.az,{position:"relative",children:[(0,i.jsx)(o.az,{pt:"lg",px:"lg",h:"3xl",position:"sticky",bg:"surface.s0",zIndex:"sticky",style:{top:s},children:(0,i.jsx)(l.EY,{textStyle:{base:"display.small",md:"display.medium"},color:"neutrals.nLv1",h:"lg",display:"block",children:(0,i.jsx)(f.A,{id:O[e]})})}),(0,i.jsx)(u.BU,{children:r[e].map(e=>{let t=n===e.tournament.id;return(0,i.jsx)(U.A,{isSelected:t,event:e},e.id)})})]},e))})}function M(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=(0,v.UG)(e),i=(0,d.useContext)(S.Ws),{data:s,isLoading:l}=(0,c.Ay)(t?r.t3g.mainEventsByDate(i,n,"extended"):null,{refreshInterval:1e4});return{events:null==s?void 0:s.events,isLoading:l}}var H=n(12047),Y=n(76868);let B=e=>r.tI9.dailyUniqueTournaments(e,3600*(0,v.UW)(),r.QCR.MMA),P=e=>{let{date:t,onDateChange:n}=e,{data:s}=(0,c.Ay)([B((0,v.UG)(t)),"EMPTY_EVENT_LIST"],()=>N(t));return(0,i.jsxs)(o.so,{direction:"column",align:"center",pb:"2xl",children:[(0,i.jsx)(Y.p,{graphic:"no-games-mma",descriptionMessageId:"no_events_empty_state_mma"}),void 0!==s&&(0,i.jsx)(l.$n,{variant:"outline",onClick:()=>n(s),children:(0,i.jsx)(f.A,{id:"mma_view_previous_fights_button"})})]})};async function N(e){var t;let[n,i]=function(e){let t=(0,v.UG)(e).substring(0,7),n=new Date(e).setMonth(e.getMonth()-1);return[t,(0,v.UG)(n).substring(0,7)]}(e),[s,l]=await Promise.all([(0,r.TtD)(B(i)),(0,r.TtD)(B(n))]);return t=e,[...s.dailyUniqueTournaments,...l.dailyUniqueTournaments].map(e=>new Date(e.date)).filter(e=>et.getTime()-e.getTime())[0]}var K=n(85397);function R(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.az,{h:"3xl",bg:"surface.s2"}),(0,i.jsx)(u.BU,{children:[...Array(8)].map((e,t)=>(0,i.jsx)(u.Zp,{children:(0,i.jsx)(o.az,{h:"[162px]"})},"fight-night-loader-".concat(t)))})]})}let X=e=>{let{currentDate:t,onClick:n,toggleCalendar:s}=e,r=new Date,a=new Date(t.getTime()-K.v),d=new Date(t.getTime()+K.v),c=(0,H.Ay)({isInMobileTabs:!1});return(0,i.jsxs)(o.so,{justify:"space-between",align:"center",gap:"sm",h:"4xl",px:"xl",bg:"surface.s1",position:"sticky",zIndex:"dropdown",borderBottom:"1px solid {colors.neutrals.nLv4}",style:{top:c},children:[(0,i.jsx)(l.$n,{variant:"clear",onClick:()=>n(-1*K.S),children:(0,i.jsx)(I.pa2,{h:"24px",w:"24px",fill:"primary.default"})}),(0,i.jsx)(o.az,{onClick:s,cursor:"pointer",children:(0,i.jsxs)(l.EY,{textStyle:"display.medium",textTransform:"initial",children:[(0,i.jsx)(y.XU,{value:a,...a.getFullYear()===d.getFullYear()?v.or.dateWithShortMonthOnly:v.or.dateWithShortMonth}),"\xa0-\xa0",(0,i.jsx)(y.XU,{value:d,...r.getFullYear()===d.getFullYear()&&a.getFullYear()===d.getFullYear()?v.or.dateWithShortMonthOnly:v.or.dateWithShortMonth})]})}),(0,i.jsx)(l.$n,{variant:"clear",onClick:()=>n(K.S),children:(0,i.jsx)(I.CCT,{h:"24px",w:"24px",fill:"primary.default"})})]})},W=e=>{let{date:t,onDateChange:n}=e,{events:s,isLoading:r}=M(t),l=(0,H.Ay)({isInMobileTabs:!1}),a=new Date("".concat((0,v.UG)(t)," 00:00:00")),o=new Date(a.getTime()-K.v).getTime()/1e3,d=new Date(a.getTime()+K.v+v.d_-v.Z2).getTime()/1e3,c=null==s?void 0:s.filter(e=>e.startTimestamp>=o&&e.startTimestamp<=d);return r?(0,i.jsx)(R,{}):(null==c?void 0:c.length)?(0,i.jsx)(F,{events:c,stickyTop:l+48}):(0,i.jsx)(P,{date:t,onDateChange:n})};function J(){let e=(0,a.hX)(),{showMobileCalendar:t,toggleCalendar:n}=z(),[s,r]=(0,d.useState)(new Date),l=(0,d.useContext)(S.Ws);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(X,{currentDate:s,toggleCalendar:n,onClick:e=>r(t=>new Date(t.getTime()+e))}),(0,i.jsx)(W,{date:s,onDateChange:e=>r(e)}),!e&&(0,i.jsxs)(E.Xn,{isOpen:t,onClose:n,children:[(0,i.jsx)(E.Xn.Header,{}),(0,i.jsx)(E.Xn.Content,{minH:352,children:(0,i.jsx)(k.A,{date:s,onChange:e=>{r(e),n()},sport:l})})]})]})}function Z(e){let{organization:t,isFirst:n,isSelected:a,isMobile:d}=e;return(0,i.jsx)(g.A,{organization:t,children:(0,i.jsxs)(o.so,{align:"center",h:"4xl",px:"lg",bg:a?"neutral.highlight":void 0,borderTop:n?void 0:"1px solid {colors.neutrals.nLv4}",_hover:{bg:"surface.s2"},children:[(0,i.jsx)(s.e,{size:24,id:t.id}),(0,i.jsx)(l.EY,{w:"100%",textStyle:{base:"display.micro",md:"body.large"},color:"neutrals.nLv1",truncate:!0,ml:"xl",mr:"sm",children:t.name}),d&&(0,i.jsx)(o.so,{align:"center",h:"[36px]",borderLeft:"1px solid {colors.neutrals.nLv4}",pl:"md",children:(0,i.jsx)(x.e,{entity:r.bq7.Tournaments,id:t.id,location:m.y.MainLeagues,type:m.b.UniqueTournament})})]})})}function $(e){let{selectedId:t,showOrganizations:n}=e,{data:s}=(0,c.Ay)(r.ZXN.uniqueTournaments(p.Ap)),x=(0,a.hX)(),{isMobile:m,isDesktop:g}=(0,l.$c)(),{events:j,isLoading:v}=M(new Date,!m),f=function(e){let t={};return null==e||e.forEach(e=>{var n;let i=null==(n=e.tournament.uniqueTournament)?void 0:n.id;i&&(t[i]||(t[i]=[]),t[i].push(e))}),t}(j);return x||!m||n?!s||v?m&&!n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.az,{bg:"surface.s1",h:"4xl",borderBottom:"1px solid {colors.neutrals.nLv4}"}),(0,i.jsx)(R,{})]}):(0,i.jsx)(o.az,{p:{mdDown:"sm"},mb:"sm",children:(0,i.jsxs)(u.Zp,{children:[(0,i.jsx)(u.Zp.Header,{titleId:"organisations"}),(0,i.jsx)(o.az,{h:"[752px]"})]})}):(0,i.jsxs)(o.az,{p:{mdDown:"sm"},children:[(0,i.jsxs)(u.Zp,{children:[(0,i.jsx)(u.Zp.Header,{titleId:"organisations"}),s.groups.map(e=>e.uniqueTournaments.map((e,n)=>{let s=t===e.id&&!m,r=f[e.id]||[];return(0,i.jsxs)(d.Fragment,{children:[(0,i.jsx)(Z,{organization:e,isSelected:s,isFirst:0===n,isMobile:m}),g&&r.map((e,t)=>(0,i.jsx)(A,{event:e,isSelected:s,isFirst:0===t},e.id))]},e.id)})),(0,i.jsx)(u.Zp.Footer,{})]}),(0,i.jsx)(h.i,{id:"main.DESKTOP_RIGHT",mt:"md",mb:"md"})]}):(0,i.jsx)(J,{})}},98775:(e,t,n)=>{n.d(t,{A:()=>i});let i=(0,n(55729).createContext)(void 0)}}]);