!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]="10c1df42-e74e-425a-bf80-9cc6e6c70376",e._sentryDebugIdIdentifier="sentry-dbid-10c1df42-e74e-425a-bf80-9cc6e6c70376")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2753,5729,8056],{141:(e,t,n)=>{n.d(t,{L:()=>j});var s=n(6029),i=n(21377),r=n(89875),l=n(76356),a=n(55729),o=n(90248),d=n(8703),c=n(98775),u=n(87763),x=n(62827),h=n(85578),m=n(39756);function g(e){let{children:t,isOnOverlay:n,highlighted:i}=e;return(0,s.jsx)(l.so,{justify:"center",children:(0,s.jsx)(l.so,{justify:"center",align:"center",h:n?"xl":void 0,px:"sm",br:"sm",border:n?"2px solid {colors.status.live}":void 0,bg:n?"overlay.darken2":void 0,children:(0,s.jsx)(r.EY,{textStyle:i||!n?"display.small":"body.medium",color:i||!n?"status.live":"onColor.secondary",whiteSpace:"nowrap",children:t})})})}function j(e){let{event:t,isOnOverlay:n}=e,r=(0,a.useContext)(c.A),l=void 0===r||r.nextFightId===t.id;if(t.status.type===i.XUj.WillContinue)return t.finalRound?(0,s.jsxs)(g,{isOnOverlay:n,children:[(0,s.jsx)(o.A,{id:"status_round",values:{round:t.finalRound}}),"\xa0|\xa0",(0,s.jsx)(o.A,{id:"stage_result_finished"})]}):(0,s.jsx)(g,{isOnOverlay:n,children:(0,s.jsx)(u.fP,{id:t.status.description})});if(t.status.code===i.sum.Started||t.status.type===i.XUj.NotStarted&&1e3*t.startTimestamp{n.d(t,{A:()=>l});var s=n(6029),i=n(99064),r=n(90248);function l(e){let{tabKey:t,messageId:n,activeTab:l,onTabClick:a}=e;return(0,s.jsx)(i.tU.Tab,{tabKey:t,h:"48px",style:{borderBottomWidth:"3px"},onClick:e=>e.nativeEvent.isTrusted&&l!==t?a(t):void 0,children:(0,s.jsx)(r.A,{id:n})})}},2315:(e,t,n)=>{n.d(t,{A:()=>x});var s=n(6029),i=n(21377),r=n(89875),l=n(76356),a=n(55729),o=n(90248),d=n(62859),c=n(39969);function u(e){let{isOnOverlay:t}=e,{event:n}=(0,a.useContext)(d.y$);return n.finalRound?(0,s.jsx)(r.EY,{textStyle:"body.small",color:t?"onColor.primary":"neutrals.nLv1",display:"block",truncate:!0,children:(0,s.jsx)(o.A,{id:"finished"})}):null}function x(e){let{isOnOverlay:t,location:n,entityType:r}=e,{event:o,leftTeam:x,rightTeam:h}=(0,a.useContext)(d.y$),m=o.status.type!==i.XUj.Finished;return(0,s.jsxs)(l.az,{overflow:m?void 0:"hidden",children:[m&&(0,s.jsx)(c.h,{id:o.id,tournament:o.tournament,leftTeam:x,rightTeam:h,type:r,location:n,isOnOverlay:t}),!m&&(0,s.jsx)(u,{isOnOverlay:t})]})}},3898:(e,t,n)=>{n.d(t,{dq:()=>s.default,OE:()=>o,mw:()=>c.TeamMedia,in:()=>d});var s=n(5884),i=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,i.jsx)(a.$,{highlights:n.media}):null}function d(e){let{tournamentId:t}=e,{data:n}=(0,l.Ay)(r.yKR.media(t));return n&&n.media.length?(0,i.jsx)(a.$,{highlights:n.media}):null}n(55342),n(8056);var c=n(35729)},4832:(e,t,n)=>{n.d(t,{i:()=>s.A,y:()=>ew});var s=n(44987),i=n(6029),r=n(21377),l=n(76356),a=n(99064),o=n(55729),d=n(45860),c=n(65789),u=n(58047),x=n(5316),h=n(86679),m=n(1775),g=n(89875),j=n(90248),p=n(94474),v=n.n(p);function y(e){let{children:t}=e;return(0,i.jsx)(g.Ym,{h:"lg",display:"block",children:t})}function f(e){let{labelId:t,children:n}=e;return(0,i.jsxs)(l.so,{justify:"space-between",align:"center",h:"2xl",px:"lg",children:[(0,i.jsx)(y,{children:(0,i.jsx)(j.A,{id:t})}),(0,i.jsx)(l.so,{justify:"center",align:"center",children:n})]})}function b(e){let{labelId:t,value:n}=e;return void 0===n?null:(0,i.jsx)(f,{labelId:t,children:(0,i.jsx)(y,{children:n})})}function w(e){let{organization:t}=e,n=t.country;return(0,i.jsxs)(c.Zp,{isInverseDesktop:!0,children:[(0,i.jsx)(c.Zp.Header,{titleId:"info"}),(null==n?void 0:n.alpha2)&&(null==n?void 0:n.name)&&(0,i.jsx)(f,{labelId:"country",children:(0,i.jsxs)(l.so,{align:"center",gap:"sm",children:[(0,i.jsx)("img",{src:(0,r.RHm)(n.alpha2),width:16,height:16,alt:n.alpha2}),(0,i.jsx)(y,{children:(0,i.jsx)(j.A,{id:v()(n.name.toLowerCase()),defaultMessage:n.name})})]})}),(0,i.jsx)(b,{labelId:"divisions",value:t.numberOfDivisions}),(0,i.jsx)(b,{labelId:"number_of_fighters",value:t.numberOfCompetitors}),(0,i.jsx)(b,{labelId:"foundation_date",value:t.yearOfFoundation}),(0,i.jsx)(b,{labelId:"current_president",value:t.chairman}),(0,i.jsx)(b,{labelId:"owner",value:t.owner}),(0,i.jsx)(c.Zp.Footer,{})]})}var _=n(33144),C=n(4967),A=n(9127),T=n(25273),E=n(90510),k=n(62859),z=n(8703),S=n(65078),I=n(82707),U=n(98559);n(5631),n(141);var L=n(33942);n(2315),n(66071);let O=(0,A.m)(l.so),D=(0,A.m)(g.EY);function M(e){let{startTimestamp:t}=e,n=C.pp(t);return C.cK(n)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(j.A,{id:"today"}),",\xa0",(0,i.jsx)(E.ib,{value:n})]}):(0,i.jsx)(E.XU,{value:new Date(1e3*t),...C.or.dateWithShortWeekday})}function F(e){var t;let{team:n,gender:s,isRight:a,isSecondaryColor:d,winnerCode:c,opacity:u}=e,{event:x}=(0,o.useContext)(k.y$),h=c===r.Jfo.Left,m=c===r.Jfo.Right,g=h&&!a||m&&a,j=(0,z.Mh)(x);return(0,i.jsxs)(O,{direction:"column",align:"center",basis:"[0px]",grow:1,transition:{type:"spring",stiffness:90,damping:15,bounce:0},layout:!0,children:[(0,i.jsxs)(O,{w:"5xl",h:"5xl",position:"relative",style:{opacity:u},layout:!0,children:[g&&(0,i.jsx)(l.az,{position:"absolute",overflow:"visible",left:m?void 0!==j?"[-90px]":"[-50px]":void 0,right:h?void 0!==j?"[-90px]":"[-50px]":void 0,children:(0,i.jsx)(L.r,{winnerCode:c,isOnOverlay:!0})}),(0,i.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:s})]}),(0,i.jsx)(D,{textStyle:"display.micro",color:d?"onColor.secondary":"onColor.primary",textAlign:a?"start":"end",maxW:"100%",h:"lg",mt:"2xs",display:"block",truncate:!0,layout:!0,children:n.name})]})}function Y(){return(0,i.jsx)(l.az,{h:"[134px]",br:"lg"})}function B(){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,i.jsx)(I.tj,{style:{width:"100%"},event:e,children:(0,i.jsx)(l.az,{h:"[134px]",br:{base:"sm",md:"lg"},overflow:"hidden",children:(0,i.jsx)(s.A,{organization:e.tournament.uniqueTournament,isFeaturedEvent:!0,children:(0,i.jsxs)(l.az,{h:"100%",w:"100%",py:"sm",children:[(0,i.jsx)(l.so,{justify:"center",pb:"lg",children:(0,i.jsxs)(g.EY,{textStyle:"body.small",color:"onColor.primary",children:["".concat(e.tournament.name," | "),(0,i.jsx)(M,{startTimestamp:e.startTimestamp})]})}),(0,i.jsx)(l.so,{justify:"space-between",children:(0,i.jsxs)(T.o,{children:[(0,i.jsx)(F,{team:t,gender:e.gender,isSecondaryColor:void 0!==a&&a!==r.Jfo.Left,winnerCode:a,opacity:d?"[0.6]":void 0}),(0,i.jsxs)(l.so,{direction:"column",justify:"space-evenly",align:"center",children:[!u&&(0,i.jsx)(O,{layout:!0,transition:{duration:.1},children:(0,i.jsx)(L.A,{event:e,isOnOverlay:!0})}),(0,i.jsx)(g.EY,{textStyle:"display.small",color:"onColor.primary",textAlign:"center",display:"block",children:"VS"})]}),(0,i.jsx)(F,{team:n,gender:e.gender,isRight:!0,isSecondaryColor:void 0!==a&&a!==r.Jfo.Right,winnerCode:a,opacity:c?"[0.6]":void 0})]})})]})})})})}function P(e){let{eventId:t}=e,{event:n,...s}=(0,S.mJ)(t,{shouldRefresh:!0});return n?(0,i.jsx)(k.y$.Provider,{value:{event:n,...s},children:(0,i.jsx)(B,{})}):(0,i.jsx)(Y,{})}function N(e){let{organizationId:t}=e,{data:n,error:s}=(0,d.Ay)(r.V3t.featuredEvents(t));return s?null:(null==n?void 0:n.featuredEvents.length)?(0,i.jsx)(P,{eventId:n.featuredEvents[0].id}):(0,i.jsx)(Y,{})}function K(e){let{organization:t}=e;return t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(c.Zp,{isInverseDesktop:!0,children:[(0,i.jsx)(c.Zp.Header,{titleId:"tournament.featuredEvent"}),(0,i.jsx)(l.az,{p:"sm",children:(0,i.jsx)(N,{organizationId:t.id})})]}),(0,i.jsx)(w,{organization:t})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(c.Zp,{isInverseDesktop:!0,children:[(0,i.jsx)(c.Zp.Header,{titleId:"tournament.featuredEvent"}),(0,i.jsx)(l.az,{h:"[150px]"})]}),(0,i.jsxs)(c.Zp,{isInverseDesktop:!0,children:[(0,i.jsx)(c.Zp.Header,{titleId:"info"}),(0,i.jsx)(l.az,{h:"[208px]"})]})]})}var X=n(75751),R=n(76868),W=n(12373);let J=e=>{let{events:t,selectedFightNightId:n}=e;return(0,i.jsx)(c.BU,{children:t.map(e=>(0,i.jsx)(W.A,{event:e,isSelected:n===e.tournament.id},e.id))})},Z=e=>{let{rows:t=4}=e;return(0,i.jsx)(l.so,{direction:"column",gap:"sm",p:"sm",children:[...Array(t)].map((e,t)=>(0,i.jsx)(l.az,{h:"[162px]",bg:{base:"surface.s1",md:"surface.s2"},br:"lg"},"organization-events-cl-".concat(t)))})},$=e=>{let{organizationId:t,selectedFightNightId:n,activeMonth:s}=e,{data:l,isLoading:a}=(0,d.Ay)(function(e,t){if(void 0===t)return null;let n=t.year.toString(),s=t.month.toString().padStart(2,"0");return r.V3t.scheduledMmaMainEvents(e,n,s)}(t,s));if(void 0===s||a)return(0,i.jsx)(Z,{});let o=null==l?void 0:l.events.filter(e=>e.status.type===r.XUj.Finished);return void 0===o?(0,i.jsx)(R.p,{graphic:"no-games-mma",descriptionMessageId:"no_events_empty_state_mma"}):(0,i.jsx)(J,{events:o,selectedFightNightId:n})};var H=n(94684),q=n(12047),V=n(54409);let G=e=>{let{type:t,onClick:n,visible:s}=e;return s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.so,{justify:"prev"===t?"flex-start":"flex-end",minW:"[150px]",hideBelow:"lg",children:(0,i.jsx)(g.$n,{size:"secondary",variant:"outline",br:"xs",px:"sm",onClick:()=>n(t),children:"prev"===t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(V.pa2,{fill:"primary.default"}),(0,i.jsx)(j.A,{id:"previous"})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(j.A,{id:"next"}),(0,i.jsx)(V.CCT,{fill:"primary.default"})]})})}),(0,i.jsx)(l.so,{w:"2xl",hideFrom:"lg",children:(0,i.jsx)(g.K0,{size:"secondary",variant:"clear",onClick:()=>n(t),children:"prev"===t?(0,i.jsx)(V.pa2,{fill:"primary.default"}):(0,i.jsx)(V.CCT,{fill:"primary.default"})})})]}):(0,i.jsx)(l.az,{w:{base:"2xl",lg:"[150px]"}})},Q=e=>{let{activeMonth:t,setActiveMonth:n,monthsWithEvents:s}=e,{isDesktop:r}=(0,g.$c)(),a=(0,q.Ay)({isInMobileTabs:!1,isSportMenuVisible:!0}),o=r?H.Rl+H.pB:a,{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}}(s,t),x=e=>{n(s["prev"===e?u+1:u-1]),window.scrollTo({top:0,behavior:"smooth"})};return(0,i.jsxs)(l.so,{bg:"surface.s1",px:"md",py:"sm",elevation:"2",position:"sticky",zIndex:"sticky",style:{top:o},children:[(0,i.jsx)(G,{visible:d,type:"prev",onClick:x}),(0,i.jsx)(l.so,{justify:"center",align:"center",grow:999,children:(0,i.jsx)(g.ms,{label:"months-with-events",items:s,selectedItem:t,renderItem:e=>e?(0,i.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,i.jsx)(G,{visible:c,type:"next",onClick:x})]})},ee=e=>{let{organizationId:t,selectedFightNightId:n,monthsWithEvents:s,activeMonth:r,setActiveMonth:l}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Q,{activeMonth:r,monthsWithEvents:s,setActiveMonth:l}),(0,i.jsx)($,{activeMonth:r,organizationId:t,selectedFightNightId:n})]})},et=3600*(0,C.UW)(),en=e=>{let[t,n]=(0,o.useState)(void 0),{data:s}=(0,d.Ay)(r.V3t.monthsWithEvents(e,et));return(0,o.useEffect)(()=>{var e;n(null==s||null==(e=s.monthsWithEvents)?void 0:e[0])},[s,e]),{activeMonth:t,setActiveMonth:n,monthsWithEvents:(null==s?void 0:s.monthsWithEvents)||[]}},es=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:s}=e,{liveEvents:r,isLoading:l}=es(t);return((0,o.useEffect)(()=>{s(r.length||void 0)},[r]),l)?(0,i.jsx)(Z,{}):r?(0,i.jsx)(J,{events:r,selectedFightNightId:n}):(0,i.jsx)(R.p,{graphic:"no-games-mma",descriptionMessageId:"no_events_empty_state_mma"})};var er=function(e){return e.Live="live",e.Upcoming="next",e.Finished="last",e}({});let el=e=>{let{activeTab:t,hasLiveTab:n,hasUpcomingTab:s,liveEventsCount:r}=e,{isDesktop:o}=(0,g.$c)(),d=(0,q.Ay)({isInMobileTabs:!1,isSportMenuVisible:!0}),c=o?H.Rl+H.pB:d;return(0,i.jsxs)(l.az,{bg:"surface.s1",px:"lg",py:"sm",borderBottom:"1px solid {colors.neutrals.nLv4}",position:t===er.Finished?"static":"sticky",zIndex:"sticky",style:{top:c},children:[n&&(0,i.jsx)(a.tU.Tab,{tabKey:er.Live,bg:t===er.Live?"sofaSingles.live":"surface.s2",border:t===er.Live?"sofaSingles.live":"surface.s2",children:(0,i.jsxs)(g.EY,{textStyle:"assistive.default",color:t===er.Live?"onColor.primary":"status.live",lineHeight:1,children:[(0,i.jsx)(j.A,{id:"live"})," ",void 0!==r&&"(".concat(r,")")]})}),s&&(0,i.jsx)(a.tU.Tab,{tabKey:er.Upcoming,children:(0,i.jsx)(j.A,{id:"mma_upcoming_fight"})}),(0,i.jsx)(a.tU.Tab,{tabKey:er.Finished,children:(0,i.jsx)(j.A,{id:"stage_result_finished"})})]})},ea=e=>{let{organizationId:t,selectedFightNightId:n}=e,{data:s,isLoading:l}=(0,d.Ay)(r.V3t.mainEvents(t,"next"));return l?(0,i.jsx)(Z,{}):s?(0,i.jsx)(J,{events:s.events,selectedFightNightId:n}):(0,i.jsx)(R.p,{graphic:"no-games-mma",descriptionMessageId:"no_events_empty_state_mma"})};var eo=n(7263);let ed=e=>{let[t,n]=(0,o.useState)(void 0),[s,i]=(0,o.useState)(void 0),{data:l}=(0,d.Ay)([r.V3t.mainEvents(e,"next"),"HEAD"],{fetcher:eo.n}),{data:a}=(0,d.Ay)([r.V3t.liveEvents(e),"HEAD"],{fetcher:eo.n});return(0,o.useEffect)(()=>{if(void 0!==l&&void 0!==a){if(a)return void i(er.Live);if(l)return void i(er.Upcoming);i(er.Finished)}},[a,l]),{activeTab:s,setActiveTab:i,hasLiveTab:a,hasUpcomingTab:l,liveEventsCount:t,setLiveEventsCount:n}};function ec(e){let{selectedFightNightId:t,id:n}=e,{activeMonth:s,setActiveMonth:r,monthsWithEvents:o}=en(n),{activeTab:d,setActiveTab:c,hasLiveTab:u,hasUpcomingTab:x,liveEventsCount:h,setLiveEventsCount:m}=ed(n);return void 0===d?(0,i.jsx)(l.az,{h:"[800px]"}):(0,i.jsx)(X.t,{tag:"OrganizationEvents",children:(0,i.jsxs)(a.tU,{variant:"tertiary",value:d,onChange:e=>c(e),children:[(0,i.jsx)(el,{activeTab:d,hasLiveTab:u,hasUpcomingTab:x,liveEventsCount:h}),(0,i.jsx)(a.tU.Panel,{tabKey:er.Live,children:(0,i.jsx)(ei,{organizationId:n,selectedFightNightId:t,setLiveEventsCount:m})}),(0,i.jsx)(a.tU.Panel,{tabKey:er.Upcoming,children:(0,i.jsx)(ea,{organizationId:n,selectedFightNightId:t})}),(0,i.jsx)(a.tU.Panel,{tabKey:er.Finished,children:(0,i.jsx)(ee,{organizationId:n,selectedFightNightId:t,monthsWithEvents:o,activeMonth:s,setActiveMonth:r})})]})})}var eu=n(4866),ex=n(98449),eh=n(46009),em=n(8973);function eg(e){var t;let{organization:n}=e;return n?(0,i.jsxs)(l.so,{bg:{mdDown:"surface.s1"},px:"lg",py:"sm",justify:"space-between",align:"center",children:[(0,i.jsx)(I.BK,{organization:n,children:(0,i.jsxs)(l.so,{gap:{base:"md",lg:"lg"},children:[(0,i.jsx)(eu.e,{id:n.id,size:40}),(0,i.jsxs)(l.az,{children:[(0,i.jsx)(g.EY,{textStyle:"display.medium",truncate:!0,children:n.name}),(null==(t=n.country)?void 0:t.alpha2)&&(0,i.jsxs)(l.so,{align:"center",gap:"xs",mt:"2xs",children:[(0,i.jsx)(eu.w,{size:16,alpha2:n.country.alpha2}),(0,i.jsx)(g.EY,{textStyle:"assistive.default",truncate:!0,children:(0,i.jsx)(ex.m,{name:n.country.name||"",slug:v()(n.country.name||"")})})]})]})]})}),(0,i.jsx)(eh.e,{id:n.id,entity:r.bq7.Tournaments,location:em.y.Header,type:em.b.Stage})]}):null}var ej=n(75327),ep=n(79926);function ev(e){let{type:t,gender:n}=e,{data:s,error:a}=(0,d.Ay)(r.AZO.rankingsById(t.id));return(null==s?void 0:s.rankingRows.length)?(0,i.jsx)(i.Fragment,{children:s.rankingRows.map(e=>(0,i.jsx)(ep.A,{ranking:e,gender:n},e.id))}):a?null:(0,i.jsx)(l.az,{h:"[664px]"})}function ey(e){let{rankingTypes:t,gender:n}=e,[s,r]=(0,o.useState)(!0);return(0,i.jsxs)(a.tU,{variant:"tertiary",initialValue:t[0].id,onChange:()=>{s&&r(!1)},children:[(0,i.jsx)(a.tU.List,{scroll:!0,h:"48px",px:"lg",children:t.map(e=>(0,i.jsx)(a.tU.Tab,{tabKey:e.id,hoverBg:"surface.s2",children:e.weightClass?(0,i.jsx)(ej.L,{weightClass:e.weightClass}):e.name},e.id))}),(0,i.jsx)(ep.k,{}),t.map(e=>(0,i.jsx)(a.tU.Panel,{tabKey:e.id,children:(0,i.jsx)(ev,{type:e,gender:n})},e.id))]})}function ef(e){let{rankingTypes:t,genders:n}=e,[s,d]=(0,o.useState)(!0);return(0,i.jsx)(l.az,{p:{mdDown:"sm"},children:(0,i.jsx)(l.az,{bg:{mdDown:"surface.s1"},br:{mdDown:"lg"},elevation:{mdDown:"2"},pt:"sm",pb:{base:"sm",md:"lg"},children:(0,i.jsxs)(a.tU,{variant:"secondary",initialValue:n[0],onChange:()=>{s&&d(!1)},children:[(0,i.jsx)(l.so,{align:"center",h:"4xl",px:"lg",children:(0,i.jsx)(a.tU.List,{scroll:!0,children:n.map(e=>(0,i.jsx)(a.tU.Tab,{tabKey:e,children:(0,i.jsx)(j.A,{id:e===r.YT8.Male?"mens_division":"womens_division"})},e))})}),n.map(e=>(0,i.jsx)(a.tU.Panel,{tabKey:e,children:(0,i.jsx)(ey,{rankingTypes:t.filter(t=>t.gender===e),gender:e})},e))]})})})}function eb(e){let{id:t}=e,{data:n,error:s}=(0,d.Ay)(r.AZO.uniqueTournamentSummary(t));if(!(null==n?void 0:n.rankings.length))return s?null:(0,i.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,i.jsx)(ef,{rankingTypes:a,genders:c}):null}function ew(e){let{selectedFightNightId:t,id:n}=e,{data:s,error:g}=(0,d.Ay)(r.V3t.details(n)),[j,p]=(0,o.useState)(u.x.Matches),{hasRankings:v}=(0,h.A)({hasRankings:{route:r.AZO.uniqueTournamentSummary(n)}}),{logTabChange:y}=(0,x.A)(),f=e=>y({type:e,id:n,location:u.C.Organization});if(g)return null;let b=null==s?void 0:s.uniqueTournament;return(0,i.jsx)(l.az,{md:{bg:"surface.s1",br:"xl",elevation:"2"},children:(0,i.jsxs)(a.tU,{fullWidthTabs:!0,variant:"primary",initialValue:u.x.Matches,value:j,onChange:e=>p(e),children:[(0,i.jsx)(eg,{organization:b}),(0,i.jsxs)(a.tU.List,{bg:"surface.s1",w:"100%",underline:!0,scroll:!0,h:48,children:[(0,i.jsx)(m.A,{onTabClick:f,activeTab:j,tabKey:u.x.Details,messageId:"details"}),(0,i.jsx)(m.A,{onTabClick:f,activeTab:j,tabKey:u.x.Matches,messageId:"events_title"}),v&&(0,i.jsx)(m.A,{onTabClick:f,activeTab:j,tabKey:u.x.Rankings,messageId:"rankings"})]}),(0,i.jsx)(a.tU.Panel,{tabKey:u.x.Details,children:(0,i.jsx)(c.BU,{children:(0,i.jsx)(K,{organization:b})})}),(0,i.jsx)(a.tU.Panel,{tabKey:u.x.Matches,children:(0,i.jsx)(ec,{id:n,selectedFightNightId:t})}),v&&(0,i.jsx)(a.tU.Panel,{tabKey:u.x.Rankings,children:(0,i.jsx)(eb,{id:n})})]})})}},4866:(e,t,n)=>{n.d(t,{e:()=>i.e,w:()=>s.w});var s=n(53192),i=n(33480)},5631:(e,t,n)=>{n.d(t,{B:()=>m});var s=n(6029),i=n(21377),r=n(89875),l=n(76356),a=n(93338),o=n(55729),d=n(62859),c=n(65078),u=n(33942);let x=(e,t)=>t?e?"colors.onColor.primary":"colors.onColor.secondary":e?"colors.neutrals.nLv1":"colors.neutrals.nLv3",h=(e,t)=>t?e?"colors.onColor.secondary":"colors.onColor.primary":e?"colors.neutrals.nLv1":"colors.neutrals.nLv3";function m(e){let{isOnOverlay:t}=e,{event:n,leftTeam:m,rightTeam:g}=(0,o.useContext)(d.y$),j=(0,c.gm)(n,"winnerCode");return(0,s.jsxs)(l.so,{direction:"column",justify:"space-evenly",mx:"sm",flex:"1",children:[(0,s.jsxs)(l.so,{justify:"space-between",align:"center",gap:"sm",h:"2xl",mt:"xs",children:[(0,s.jsx)(r.EY,{textStyle:"display.micro",textAlign:"start",flexGrow:10,flexBasis:"xl",style:{color:a.S.var(x(j===i.Jfo.Left||void 0===j,t))},children:m.name}),(0,s.jsx)(r.EY,{textStyle:"display.small",textAlign:"center",flexGrow:1,flexBasis:"xl",style:{color:a.S.var(h(j===i.Jfo.Left||j===i.Jfo.Right,t))},children:"VS"}),(0,s.jsx)(r.EY,{textStyle:"display.micro",textAlign:"end",flexGrow:10,flexBasis:"xl",style:{color:a.S.var(x(j===i.Jfo.Right||void 0===j,t))},children:g.name})]}),(0,s.jsx)(u.A,{event:n,isOnOverlay:t})]})}},5884:(e,t,n)=>{n.r(t),n.d(t,{default:()=>o});var s=n(6029),i=n(21377),r=n(45860),l=n(42621),a=n(17239);function o(e){let{eventId:t,hideTitle:n,eventHighlightId:o}=e,{data:d}=(0,r.Ay)(i.bnp.eventHighlights(t));return d?(0,s.jsx)(l.q,{persist:!0,children:(0,s.jsx)(a.$,{highlights:d.highlights,hideTitle:n,eventHighlightId:o})}):null}},8056:(e,t,n)=>{n.r(t),n.d(t,{UniqueTournamentMedia:()=>a,default:()=>o});var s=n(6029),i=n(21377),r=n(45860),l=n(17239);function a(e){let{uniqueTournamentId:t,hideTitle:n}=e,{data:a}=(0,r.Ay)(i.V3t.media(t));return a&&a.media.length?(0,s.jsx)(l.$,{highlights:a.media,hideTitle:n}):null}let o=a},12373:(e,t,n)=>{n.d(t,{A:()=>E});var s=n(6029),i=n(33144),r=n(89875),l=n(76356),a=n(55729),o=n(65789),d=n(62859),c=n(65078),u=n(8973),x=n(20204),h=n(5631),m=n(2315),g=n(66071),j=n(98559),p=n(59721);function v(e){var t;let{fightNight:n,venue:i}=e;return(0,s.jsxs)(l.so,{justify:"space-between",align:"center",h:"5xl",pl:"lg",roundedTop:"sm",overflow:"hidden",children:[(0,s.jsxs)(l.so,{justify:"center",align:"center",gap:"md",pr:"lg",children:[(0,s.jsx)(l.az,{w:"3xl",h:"3xl",children:(0,s.jsx)(p.e,{size:40,id:(null==(t=n.uniqueTournament)?void 0:t.id)||0})}),(0,s.jsxs)(l.az,{overflow:"hidden",children:[(0,s.jsx)(r.EY,{textStyle:"display.medium",display:"block",truncate:!0,children:n.name}),(0,s.jsx)(r.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",display:"block",truncate:!0,children:(0,j.zx)(i,n.location)})]})]}),n.isLive&&(0,s.jsx)(l.az,{w:"sm",h:"sm",br:"50%",bg:"status.live",mr:"md"})]})}var y=n(21377),f=n(4967),b=n(90248),w=n(90510);function _(){let{event:e}=(0,a.useContext)(d.y$);return e.status.type===y.XUj.InProgress||e.status.type===y.XUj.WillContinue?(0,s.jsx)(l.so,{justify:"center",align:"center",h:"lg",px:"xs",br:"xs",bg:"overlay.darken2",children:(0,s.jsx)(r.EY,{textStyle:"assistive.default",color:"status.live",textAlign:"center",children:(0,s.jsx)(b.A,{id:"live"})})}):(0,s.jsx)(r.EY,{textStyle:"body.small",color:"onColor.primary",children:(0,s.jsx)(w.XU,{value:1e3*e.startTimestamp,...f.or.fullDateTime,year:"numeric"})})}var C=n(44987);function A(){let{isMobile:e}=(0,r.$c)();return(0,s.jsxs)(l.so,{justify:"space-between",align:"center",w:"100%",h:"xl",px:"sm",position:"absolute",top:"sm",left:"[0px]",children:[(0,s.jsx)(l.so,{basis:"[0px]",grow:1,children:(0,s.jsx)(_,{})}),(0,s.jsx)(r.EY,{textStyle:"body.small",color:"onColor.primary",textAlign:"center",display:"block",flexBasis:"[0px]",flexGrow:1,children:(0,s.jsx)(g.A,{})}),(0,s.jsx)(l.so,{justify:"flex-end",basis:"[0px]",grow:1,children:(0,s.jsx)(m.A,{isOnOverlay:!0,location:e?u.y.MainMatches:u.y.EventsTab,entityType:u.b.Tournament})})]})}function T(){var e,t;let{event:n,leftTeam:r,rightTeam:o}=(0,a.useContext)(d.y$),u=(0,c.gm)(n,"winnerCode"),{hasLeftTeamOpacity:x,hasRightTeamOpacity:m}=(0,j.Zq)(n.status.type,u);return(0,s.jsxs)(l.so,{justify:"space-between",h:"5xl",mt:"md",children:[(0,s.jsx)(l.az,{w:"5xl",h:"5xl",opacity:x?"[0.6]":void 0,children:(0,s.jsx)(i.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,s.jsx)(h.B,{isOnOverlay:!0}),(0,s.jsx)(l.az,{w:"5xl",h:"5xl",opacity:m?"[0.6]":void 0,children:(0,s.jsx)(i.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{event:t}=e,{event:n,leftTeam:i,rightTeam:r,leftScore:a,rightScore:u}=(0,c.AR)(t);return(0,s.jsx)(d.y$.Provider,{value:{event:n,leftTeam:i,rightTeam:r,leftScore:a,rightScore:u},children:(0,s.jsx)(x.A,{fightNight:n.tournament,children:(0,s.jsx)(o.Zp,{isInverseDesktop:!0,children:(0,s.jsxs)(l.az,{br:"lg",children:[(0,s.jsx)(v,{fightNight:n.tournament,venue:n.venue}),(0,s.jsxs)(l.az,{position:"relative",roundedBottom:"lg",overflow:"hidden",children:[(0,s.jsx)(C.A,{organization:n.tournament.uniqueTournament,children:(0,s.jsxs)(l.az,{p:"sm",children:[(0,s.jsx)(l.az,{h:"xl"}),(0,s.jsx)(T,{})]})}),(0,s.jsx)(A,{})]})]})})})})}},17239:(e,t,n)=>{n.d(t,{$:()=>k});var s=n(6029),i=n(4967),r=n(89875),l=n(76356),a=n(93338),o=n(99064),d=n(55729),c=n(90248),u=n(494),x=n(65789),h=n(62859),m=n(54409),g=n(75751),j=n(47146),p=n(61836),v=n(10794);let y=(0,l.I4)("div",{base:{display:"grid",w:"[144px]",h:"8xl",position:"absolute",top:"0",left:"0",bg:"overlay.darken1","& svg":{margin:"auto"}}}),f=(0,l.I4)("div",{base:{"& a:visited":{"& .media-component-seen-notice":{color:"neutral.default !important"}},"& img":{display:"block",br:"2xs"}}});var b=n(21377);let w=/sofascore.com\/news\//g,_=[b.zut.MEDIA_VIDEO,b.zut.MEDIA_NEWS_VIDEO,b.zut.MEDIA_YOUTUBE_VIDEO],C=e=>w.test(e),A=e=>-1!==_.indexOf(e),T=e=>{let t=document.createElement("a");return t.href=e,t.host},E=e=>{if(e){let n=T(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")}}},k=e=>{let{highlights:t,hideTitle:n,isInverseDesktop:b,eventHighlightId:w}=e,_=(0,u.d4)(v.JV),T=(0,u.d4)(v.LQ),{location:k}=(0,d.useContext)(h.y$),z=k===h.cb.Widget,S=(function(e){let{media:t,selectedLocale:n,geoIPAlpha2:s,n:i=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(s.toUpperCase())).slice(0,i)})({media:[...t],selectedLocale:_,geoIPAlpha2:T||""}).filter(e=>e.id!==w);return S.length?(0,s.jsx)(g.t,{tag:"Media",children:(0,s.jsxs)(x.Zp,{isInverseDesktop:b,isNewCard:!0,children:[!n&&(0,s.jsx)(x.Zp.Header,{titleId:"media",as:"h4"}),(0,s.jsx)(l.az,{pt:{base:"sm",md:z?"sm":"0"},pb:{base:"sm",md:z?"sm":"lg"},children:(0,s.jsx)(f,{children:(0,s.jsx)(x.BU,{children:S.map(e=>(0,s.jsx)(l.az,{children:(0,s.jsx)(l.I4.a,{href:e.url,target:"_blank",rel:e.doFollow||C(e.url)?void 0:"nofollow",onClick:()=>(0,p.Xy)(e.title),children:(0,s.jsxs)(l.so,{gap:"lg",children:[(0,s.jsxs)(l.az,{position:"relative",children:[(0,s.jsx)(o._V,{src:e.thumbnailUrl||E(e.url),width:"144",height:"80",fallback:(0,s.jsx)(l.az,{w:"[144px]",h:"8xl",bg:"neutrals.nLv4",display:"grid",br:"2xs",children:(0,s.jsx)(m.dwH,{m:"auto",fill:a.S.var("colors.neutrals.nLv4")})}),alt:"thumbnail"}),A(e.mediaType)&&(0,s.jsx)(y,{children:(0,s.jsx)(m.reY,{fill:"white"})})]}),(0,s.jsxs)(l.so,{direction:"column",justify:"space-between",grow:1,style:{maxWidth:"calc(100% - 144px)"},children:[(0,s.jsxs)(l.so,{direction:"column",align:"start",gap:"xs",children:[(0,s.jsx)(r.Ym,{textStyle:"display.small",display:"block",lineClamp:2,children:e.title}),(0,s.jsx)(r.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",w:"100%",lineClamp:1,children:e.subtitle})]}),(0,s.jsxs)(l.so,{justify:"space-between",pt:"xs",children:[(0,s.jsx)(r.Ym,{textStyle:"body.small",color:"neutrals.nLv3",w:"100%",_firstLetter:{textTransform:"capitalize"},truncate:!0,children:(0,s.jsx)(j.v,{timestamp:(0,i.pp)(e.createdAtTimestamp).getTime()})}),(0,s.jsx)(r.EY,{"aria-hidden":"true",userSelect:"none",textStyle:"body.small",color:"[transparent]",className:"media-component-seen-notice",w:"100%",textAlign:"end",truncate:!0,children:(0,s.jsx)(c.A,{id:"basic.seen"})})]})]})]})})},e.id))})})})]})}):null}},24940:(e,t,n)=>{n.d(t,{U:()=>s});let s=(0,n(55729).createContext)(void 0)},27424:(e,t,n)=>{n.d(t,{A:()=>a});var s=n(6029),i=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,s.jsx)(i.A,{id:(0,l.O)(r,t)})}},32869:(e,t,n)=>{n.d(t,{A:()=>w,T:()=>b});var s=n(6029),i=n(33144),r=n(21377),l=n(89875),a=n(76356),o=n(55729),d=n(65789),c=n(62859),u=n(54409),x=n(65078),h=n(8973),m=n(82707),g=n(5631),j=n(98559),p=n(75327),v=n(27424),y=n(2315);let f=(e,t)=>{var n;if(e.fightType===r.rBd.MainCard)return 1===t&&(null==(n=e.tournament.uniqueTournament)?void 0:n.id)===j.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,x.gm)(n,"winnerCode"),{hasLeftTeamOpacity:u,hasRightTeamOpacity:h}=(0,j.Zq)(n.status.type,d);return(0,s.jsxs)(a.so,{justify:"space-between",h:"7xl",py:"sm",px:"lg",children:[(0,s.jsx)(a.az,{w:"5xl",h:"5xl",opacity:u?"[0.6]":void 0,children:(0,s.jsx)(i.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,s.jsx)(g.B,{}),(0,s.jsx)(a.az,{w:"5xl",h:"5xl",opacity:h?"[0.6]":void 0,children:(0,s.jsx)(i.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:i,leftScore:r,rightScore:o}=(0,x.AR)(e.event),g=f(t,e.index);return(0,s.jsx)(c.y$.Provider,{value:{event:t,leftTeam:n,rightTeam:i,leftScore:r,rightScore:o},children:(0,s.jsxs)(d.Zp,{isInverseDesktop:!0,children:[(0,s.jsx)(d.Zp.Header,{titleId:g}),(0,s.jsx)(m.tj,{event:t,children:(0,s.jsxs)(a.az,{py:"xs",children:[(0,s.jsxs)(a.so,{justify:"space-between",align:"center",px:"lg",py:"sm",children:[(0,s.jsxs)(a.so,{align:"center",children:[t.fightDiscipline&&(0,s.jsx)(u.u2O,{icon:t.fightDiscipline,mr:"sm"}),(0,s.jsxs)(l.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",display:"block",truncate:!0,children:[(0,s.jsx)(p.k,{event:t})," ",t.fightDiscipline&&(0,s.jsx)(v.A,{id:t.fightDiscipline})]})]}),(0,s.jsx)(y.A,{location:h.y.FightNight,entityType:h.b.Event})]}),(0,s.jsx)(b,{})]})})]})})}},33942:(e,t,n)=>{n.d(t,{A:()=>v,r:()=>p});var s=n(6029),i=n(21377),r=n(89875),l=n(76356),a=n(55729),o=n(90248),d=n(62859),c=n(8703),u=n(65078),x=n(98559),h=n(85578),m=n(141),g=n(39756);function j(e){let{winnerCode:t,isOnOverlay:n}=e,{event:u}=(0,a.useContext)(d.y$),x=(0,c.Mh)(u);if(!t)return null;if(t===i.Jfo.Draw||t===i.Jfo.NoContest)return(0,s.jsxs)(l.so,{justify:"center",align:"center",h:"xl",children:[(0,s.jsx)(g.k,{isOnOverlay:n,children:(0,s.jsx)(o.A,{id:t===i.Jfo.Draw?"draw":"no_contest_mma_short"})}),x&&(0,s.jsx)(l.so,{justify:"center",align:"center",px:"sm",children:(0,s.jsxs)(r.EY,{textStyle:"display.micro",color:"onColor.secondary",textTransform:"uppercase",children:[(0,s.jsx)(o.A,{id:"mma_status_round_short",values:{n:u.finalRound}})," | ",x]})})]});let h=t===i.Jfo.Left;return(0,s.jsxs)(l.so,{direction:h?"row":"row-reverse",align:"center",children:[(0,s.jsx)(l.so,{justify:"center",align:"center",w:"[36px]",h:"xl",br:"sm",bg:"status.success.default",children:(0,s.jsx)(r.EY,{textStyle:"display.small",color:"surface.s1",textAlign:"center",children:u.winType||(0,s.jsx)(o.A,{id:"win"})})}),x&&(0,s.jsx)(l.so,{justify:"center",align:"center",px:"sm",children:(0,s.jsxs)(r.EY,{textStyle:"display.micro",color:"status.success.default",textTransform:"uppercase",children:[(0,s.jsx)(o.A,{id:"mma_status_round_short",values:{n:u.finalRound}})," | ",x]})})]})}function p(e){let{winnerCode:t,isOnOverlay:n}=e;if(!t)return null;let r=t===i.Jfo.Draw||t===i.Jfo.NoContest,a=t===i.Jfo.Left||t===i.Jfo.Right,o=r?"center":t===i.Jfo.Left?"flex-start":"flex-end";return(0,s.jsx)(l.so,{justify:o,children:(0,s.jsx)(h.O,{isOnOverlay:n,aFighterHasWon:a,children:(0,s.jsx)(j,{winnerCode:t,isOnOverlay:n})})})}function v(e){let{event:t,isOnOverlay:n}=e,r=(0,u.gm)(t,"winnerCode");return void 0!==r&&r!==i.Jfo.Unknown?(0,s.jsx)(p,{winnerCode:r,isOnOverlay:n}):(0,x.xO)(t)?null:(0,s.jsx)(l.so,{justify:"center",children:(0,s.jsx)(m.L,{event:t,isOnOverlay:n})})}},35729:(e,t,n)=>{n.r(t),n.d(t,{TeamMedia:()=>o,default:()=>d});var s=n(6029),i=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)(i.cWY.media(t));return d?(0,s.jsx)(a.n,{}):!o||c?null:(0,s.jsx)(l.$,{highlights:o.media,hideTitle:n})}let d=o},39756:(e,t,n)=>{n.d(t,{k:()=>r});var s=n(6029),i=n(89875);function r(e){let{isOnOverlay:t,isSpecial:n,children:r}=e;return(0,s.jsx)(i.EY,{textStyle:"display.small",color:t||n?"onColor.primary":"neutrals.nLv1",textTransform:n?void 0:"uppercase",display:"block",children:r})}},41358:(e,t,n)=>{n.d(t,{J:()=>o,c:()=>d});var s=n(89875),i=n(81278),r=n(55729),l=n(61836),a=n(24940);let o=(e,t)=>{let{isMobile:n}=(0,s.$c)(),a=(0,i.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:()=>F});var s=n(6029),i=n(59721),r=n(21377),l=n(89875),a=n(76356),o=n(99064),d=n(81278),c=n(55729),u=n(90248),x=n(45860),h=n(65789),m=n(54409),g=n(7263),j=n(98775),p=n(38296),v=n(58047),y=n(5316),f=n(32869),b=n(4967),w=n(90510),_=n(82707),C=n(98559);function A(e){let{fightNight:t,venue:n,startTimestamp:r}=e;return t.uniqueTournament?(0,s.jsx)(h.Zp,{isInverseDesktop:!0,children:(0,s.jsxs)(a.so,{align:"center",gap:"lg",h:"5xl",px:"lg",py:"sm",children:[(0,s.jsx)(a.az,{h:"3xl",children:(0,s.jsx)(_.tQ,{tournament:t.uniqueTournament,children:(0,s.jsx)(i.e,{id:t.uniqueTournament.id,size:40})})}),(0,s.jsxs)(a.az,{overflow:"hidden",children:[(0,s.jsx)(l.EY,{textStyle:"display.medium",display:"block",truncate:!0,children:(0,s.jsx)(w.XU,{value:new Date(1e3*r),...b.or.dateTimeWithShortWeekday})}),(0,s.jsx)(l.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",display:"block",truncate:!0,children:(0,C.zx)(n,t.location)})]})]})}):null}function T(e){let{groupedEvents:t,nextEventId:n,type:i,tabKey:r,fightNight:l,venue:a}=e;if(0===t[i].length)return null;let d=Math.min(...t[i].map(e=>e.startTimestamp));return(0,s.jsx)(o.tU.Panel,{tabKey:r,children:(0,s.jsxs)(h.BU,{children:[(0,s.jsx)(A,{fightNight:l,venue:a,startTimestamp:d}),t[i].map((e,t)=>(0,s.jsx)(f.A,{event:e,index:t,nextEventId:n},e.id))]})})}var E=n(41358),k=n(3898);function z(e){let{fightNightId:t}=e;return(0,s.jsx)(o.tU.Panel,{tabKey:v.x.Media,children:(0,s.jsx)(a.az,{bg:{mdDown:"surface.s0"},p:{mdDown:"sm"},children:(0,s.jsx)(k.in,{tournamentId:t})})})}let S=e=>{let t,n={earlyprelims:[],maincard:[],prelims:[],unknown:[]};return e.forEach(e=>{if(e.fightType&&n[e.fightType].push(e),!t||t.status.type===r.XUj.NotStarted){if(e.status.type===r.XUj.InProgress||e.status.type===r.XUj.WillContinue){t=e;return}if(e.status.type===r.XUj.NotStarted){var s;(null==t?void 0:t.order)&&!(t.order>(null!=(s=e.order)?s:0))||(t=e)}}}),{groupedEvents:n,nextEvent:t}},I=(e,t)=>{let n=Object.values(r.rBd).find(t=>e[t].length>0);switch(n){case r.rBd.MainCard:return v.x.MainCard;case r.rBd.Prelims:return v.x.Prelims;default:return t?v.x.Media:n===r.rBd.EarlyPrelims?v.x.EarlyPrelims:v.x.Other}};var U=n(1775),L=n(4832);let O=e=>{let{organizationId:t}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.az,{h:"[128px]",bg:"surface.s1"}),(0,s.jsxs)(h.BU,{children:[(0,s.jsx)(h.Zp,{children:(0,s.jsx)(a.az,{h:"5xl"})}),[...Array(6)].map((e,n)=>(0,s.jsx)(h.Zp,{children:(0,s.jsx)(a.az,{h:0===n||1===n&&t===C.FY?"[162px]":"[122px]"})},"fight-".concat(n,"-loader")))]})]})};function D(e){let{groupedEvents:t,fightNight:n,venue:i,hasMedia:d,defaultTab:u}=e,[x,h]=(0,c.useState)(u),m=n.name.split(":"),g=m.length>1?m[0].trim():void 0,j=(m[1]||m[0]).trim(),{logTabChange:f}=(0,y.A)();(0,E.c)(n);let b=e=>f({type:e,id:n.id,location:p.C.FightNight});return(0,s.jsxs)(o.tU,{fullWidthTabs:!0,variant:"primary",initialValue:u,onChange:e=>h(e),children:[(0,s.jsx)(a.az,{h:"[128px]",children:(0,s.jsx)(L.i,{organization:n.uniqueTournament,isHeader:!0,children:(0,s.jsxs)(a.so,{direction:"column",justify:"space-between",h:"100%",overflow:"auto",children:[(0,s.jsxs)(a.az,{h:"5xl",px:"lg",py:"sm",overflow:"hidden",children:[(0,s.jsx)(l.EY,{textStyle:"assistive.default",color:"onColor.secondary",h:"lg",display:"block",truncate:!0,children:g}),(0,s.jsx)(l.EY,{color:"onColor.primary",h:"xl",display:"block",truncate:!0,children:j})]}),(0,s.jsxs)(o.tU.List,{underline:{color:"onColor.primary"},scroll:!0,h:48,children:[t[r.rBd.MainCard].length>0&&(0,s.jsx)(U.A,{activeTab:x,onTabClick:b,tabKey:v.x.MainCard,messageId:"main_card"}),t[r.rBd.Prelims].length>0&&(0,s.jsx)(U.A,{activeTab:x,onTabClick:b,tabKey:v.x.Prelims,messageId:"prelims"}),d&&(0,s.jsx)(U.A,{activeTab:x,onTabClick:b,tabKey:v.x.Media,messageId:"media"}),t[r.rBd.EarlyPrelims].length>0&&(0,s.jsx)(U.A,{activeTab:x,onTabClick:b,tabKey:v.x.EarlyPrelims,messageId:"early_prelims_mma"}),t[r.rBd.Unknown].length>0&&(0,s.jsx)(U.A,{activeTab:x,onTabClick:b,tabKey:v.x.Other,messageId:"other"})]})]})})}),(0,s.jsx)(T,{tabKey:v.x.MainCard,fightNight:n,venue:i,groupedEvents:t,type:r.rBd.MainCard}),(0,s.jsx)(T,{tabKey:v.x.Prelims,fightNight:n,venue:i,groupedEvents:t,type:r.rBd.Prelims}),(0,s.jsx)(z,{fightNightId:n.id}),(0,s.jsx)(T,{fightNight:n,venue:i,tabKey:v.x.EarlyPrelims,groupedEvents:t,type:r.rBd.EarlyPrelims}),(0,s.jsx)(T,{fightNight:n,venue:i,tabKey:v.x.Other,groupedEvents:t,type:r.rBd.Unknown})]})}function M(e){var t;let{groupedEvents:n,fightNight:c,venue:x,hasMedia:g,defaultTab:j}=e;(0,E.c)(c);let p=(0,d.useRouter)();return(0,s.jsxs)(h.Zp,{children:[(0,s.jsxs)(a.so,{px:"lg",pt:"md",pb:"sm",align:"center",gap:"md",children:[(0,s.jsx)(i.e,{id:null==(t=c.uniqueTournament)?void 0:t.id,size:40}),(0,s.jsx)(l.EY,{flexGrow:1,textStyle:"display.medium",children:c.name}),(0,s.jsx)(l.K0,{size:"primary",variant:"clear",onClick:()=>p.back(),children:(0,s.jsx)(m.zQC,{icon:"close"})})]}),(0,s.jsxs)(o.tU,{initialValue:j,variant:"secondary",children:[(0,s.jsxs)(o.tU.List,{px:"sm",scroll:!0,children:[n[r.rBd.MainCard].length>0&&(0,s.jsx)(o.tU.Tab,{tabKey:v.x.MainCard,children:(0,s.jsx)(u.A,{id:"main_card"})}),n[r.rBd.Prelims].length>0&&(0,s.jsx)(o.tU.Tab,{tabKey:v.x.Prelims,children:(0,s.jsx)(u.A,{id:"prelims"})}),g&&(0,s.jsx)(o.tU.Tab,{tabKey:v.x.Media,children:(0,s.jsx)(u.A,{id:"media"})}),n[r.rBd.EarlyPrelims].length>0&&(0,s.jsx)(o.tU.Tab,{tabKey:v.x.EarlyPrelims,children:(0,s.jsx)(u.A,{id:"early_prelims_mma"})}),n[r.rBd.Unknown].length>0&&(0,s.jsx)(o.tU.Tab,{tabKey:v.x.Other,children:(0,s.jsx)(u.A,{id:"other"})})]}),(0,s.jsx)(T,{fightNight:c,venue:x,tabKey:v.x.MainCard,groupedEvents:n,type:r.rBd.MainCard}),(0,s.jsx)(T,{fightNight:c,venue:x,tabKey:v.x.Prelims,groupedEvents:n,type:r.rBd.Prelims}),(0,s.jsx)(z,{fightNightId:c.id}),(0,s.jsx)(T,{fightNight:c,venue:x,tabKey:v.x.EarlyPrelims,groupedEvents:n,type:r.rBd.EarlyPrelims}),(0,s.jsx)(T,{fightNight:c,venue:x,tabKey:v.x.Other,groupedEvents:n,type:r.rBd.Unknown})]})]})}function F(e){var t;let{id:n,organizationId:i}=e,{data:o,error:d}=(0,x.Ay)(r.V3t.mmaEvents(i,n,"all"),{refreshInterval:2e4}),{data:c}=(0,x.Ay)([r.yKR.media(n),"HEAD"],{refreshInterval:12e4,fetcher:g.n}),{isMobile:u}=(0,l.$c)();if(!(null==o?void 0:o.events.length))return d?null:u?(0,s.jsx)(O,{organizationId:i}):(0,s.jsx)(h.HH,{isCard:!u,children:(0,s.jsx)(a.az,{h:"[800px]"})});let{groupedEvents:m,nextEvent:p}=S(o.events),v=I(m,c),y={groupedEvents:m,fightNight:o.events[0].tournament,nextEvent:p,venue:null==(t=o.events.find(e=>{var t;return null==(t=e.venue)?void 0:t.id}))?void 0:t.venue,hasMedia:c,defaultTab:v};return(0,s.jsx)(j.A.Provider,{value:{nextFightId:null==p?void 0:p.id},children:u?(0,s.jsx)(D,{...y}):(0,s.jsx)(M,{...y})})}},44987:(e,t,n)=>{n.d(t,{A:()=>a});var s=n(6029),i=n(76356),r=n(41735);let l=(e,t)=>"url(/static/images/mma-octogons/".concat(e,".").concat(t,") center / cover no-repeat");function a(e){let{organization:t,isFeaturedEvent:n,isHeader:a,children:o}=e,d=(0,r.useTheme)(),c=(null==t?void 0:t.primaryColorHex)&&(a?void 0:d.setAlpha(t.primaryColorHex,0)),u=(null==t?void 0:t.primaryColorHex)&&(a?d.setAlpha(t.primaryColorHex,.7):t.primaryColorHex);return(0,s.jsx)(i.az,{h:"100%",overflow:"hidden",style:{background:l(n?"featured-event":"event-card","png")},children:(0,s.jsx)(i.az,{h:"100%",style:{background:n?void 0:c?"linear-gradient(to bottom, ".concat(u,", ").concat(c,")"):u},children:(0,s.jsx)(i.az,{h:"100%",bg:"overlay.darken2",bgRepeat:"no-repeat",bgPosition:"center",filter:"auto",style:{backdropFilter:"blur(".concat(a?"3px":"2px",")")},children:o})})})}},55342:(e,t,n)=>{n.d(t,{A:()=>o});var s=n(6029),i=n(21377),r=n(45860),l=n(65789),a=n(17239);function o(e){let{id:t}=e,{data:n}=(0,r.Ay)(i.dVR.highlights(t));return n&&n.highlights.length?(0,s.jsx)(l.BU,{children:(0,s.jsx)(a.$,{highlights:n.highlights,hideTitle:!0,isInverseDesktop:!0})}):null}},66071:(e,t,n)=>{n.d(t,{A:()=>d});var s=n(6029),i=n(21377),r=n(55729),l=n(90248),a=n(62859);let o={[i.rBd.MainCard]:"main_card",[i.rBd.Prelims]:"prelims",[i.rBd.EarlyPrelims]:"early_prelims_mma",[i.rBd.Unknown]:""};function d(){let{event:e}=(0,r.useContext)(a.y$);return e.fightType&&e.fightType!==i.rBd.Unknown?(0,s.jsx)(l.A,{id:o[e.fightType]}):null}},75327:(e,t,n)=>{n.d(t,{k:()=>d,L:()=>o});var s=n(6029),i=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,s.jsx)(i.A,{id:(0,a.O)(l,t)})},d=e=>{let{event:t}=e,n=(0,r.A)();if(!t.weightClass)return null;let i=(0,a.O)(l,t.weightClass),o=n.formatMessage({id:i});return(0,s.jsx)(s.Fragment,{children:o})}},79926:(e,t,n)=>{n.d(t,{A:()=>v,k:()=>g});var s=n(6029),i=n(33144),r=n(21377),l=n(89875),a=n(76356),o=n(93338),d=n(90248),c=n(54409),u=n(65078),x=n(82707);let h=(e,t)=>e&&t.winnerCode===r.Jfo.Left||!e&&t.winnerCode===r.Jfo.Right?{color:"status.success.default",messageId:"standings.label.wins"}:!e&&t.winnerCode===r.Jfo.Left||e&&t.winnerCode===r.Jfo.Right?{color:"status.error.default",messageId:"standings.label.losses"}:t.winnerCode===r.Jfo.Draw?{color:"neutrals.nLv1",messageId:"standings.label.draws"}:t.winnerCode===r.Jfo.NoContest?{color:"neutrals.nLv1",messageId:"NC"}:void 0;function m(e){let{team:t,lastEvent:n}=e,{event:i,leftTeam:r,rightTeam:c}=(0,u.AR)(n);if(!t)return null;let x=r.id===t.id,m=h(x,i);return m?(0,s.jsxs)(a.so,{direction:"column",align:"flex-end",justifySelf:"flex-end",h:"3xl",children:[(0,s.jsx)(a.so,{justify:"center",align:"center",w:"xl",h:"xl",br:"50%",bg:"surface.s2",children:(0,s.jsx)(l.EY,{textStyle:"display.small",textAlign:"center",style:{color:o.S.var("colors.".concat(m.color))},children:(0,s.jsx)(d.A,{id:m.messageId})})}),(0,s.jsxs)(l.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:[x?c.shortName||c.name:r.shortName||r.name,"\xa0 (",new Date(1e3*n.startTimestamp).getFullYear(),")"]})]}):null}function g(){return(0,s.jsxs)(a.so,{justify:"space-between",px:"lg",pt:"lg",children:[(0,s.jsx)(l.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,s.jsx)(d.A,{id:"rankings"})}),(0,s.jsx)(l.EY,{textStyle:"body.small",color:"neutrals.nLv3",textAlign:"end",children:(0,s.jsx)(d.A,{id:"last_fight"})})]})}function j(e){var t,n,r;let{ranking:o,gender:d}=e;return(0,s.jsxs)(a.so,{justify:"space-between",align:"center",gap:"sm",h:"6xl",pl:"sm",pr:"lg",overflow:"hidden",_hover:{bg:"surface.s2"},children:[(0,s.jsxs)(a.so,{align:"center",gap:"sm",children:[(0,s.jsx)(a.so,{justify:"center",w:"xl",h:"lg",children:(0,s.jsx)(c.Lam,{h:"16px"})}),(0,s.jsx)(i.p,{size:40,id:null==(t=o.team)?void 0:t.id,sport:null==(n=o.team)?void 0:n.sport,gender:d}),(0,s.jsx)(l.EY,{textStyle:"display.medium",truncate:!0,children:(null==(r=o.team)?void 0:r.name)||o.name})]}),o.lastEvent&&(0,s.jsx)(m,{team:o.team,lastEvent:o.lastEvent})]})}function p(e){let{team:t,children:n}=e;return t?(0,s.jsx)(x.CJ,{team:t,children:n}):(0,s.jsx)(s.Fragment,{children:n})}function v(e){var t,n,r;let{ranking:o,gender:d}=e;return 0===o.position?(0,s.jsx)(p,{team:o.team,children:(0,s.jsx)(j,{ranking:o,gender:d})}):(0,s.jsx)(p,{team:o.team,children:(0,s.jsxs)(a.so,{justify:"space-between",align:"center",gap:"sm",h:"5xl",pl:"sm",pr:"lg",overflow:"hidden",_hover:{bg:"surface.s2"},children:[(0,s.jsxs)(a.so,{align:"center",gap:"sm",children:[(0,s.jsx)(l.EY,{textAlign:"center",w:"xl",mr:"sm",children:o.position}),(0,s.jsx)(i.p,{size:32,id:null==(t=o.team)?void 0:t.id,sport:null==(n=o.team)?void 0:n.sport,gender:d}),(0,s.jsx)(l.EY,{truncate:!0,children:(null==(r=o.team)?void 0:r.name)||o.name})]}),o.lastEvent&&(0,s.jsx)(m,{team:o.team,lastEvent:o.lastEvent})]})})}},85578:(e,t,n)=>{n.d(t,{O:()=>r});var s=n(6029),i=n(76356);function r(e){let{isOnOverlay:t,isSpecial:n,aFighterHasWon:r,children:l}=e;return(0,s.jsx)(i.so,{justify:"center",align:"center",h:"xl",px:r?void 0:"sm",br:n?"md":"sm",bg:n?"status.error.default":t?"overlay.darken2":"surface.s2",children:l})}},89033:(e,t,n)=>{n.d(t,{H:()=>$});var s=n(6029),i=n(59721),r=n(21377),l=n(89875),a=n(21501),o=n(76356),d=n(55729),c=n(45860),u=n(65789),x=n(46009),h=n(8973),m=n(13481),g=n(98559),j=n(8329),p=n(4967),v=n(90248),y=n(90510),f=n(65078),b=n(20204);function w(e){let{event:t}=e,n=t.status.type===r.XUj.InProgress||t.status.type===r.XUj.WillContinue,i=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),s=(0,d.useCallback)(()=>n(e=>!e),[]);return(0,d.useEffect)(()=>{let e=document.getElementById("js-calendar-target");if(e)return e.addEventListener("click",s),()=>e.removeEventListener("click",s)},[e]),{showMobileCalendar:t,toggleCalendar:s}};var z=n(62859),S=n(54409),I=n(12373),U=function(e){return e.Live="live",e.Upcoming="upcoming",e.Finished="finished",e}(U||{});let L={live:"live",finished:"stage_result_finished",upcoming:"mma_upcoming_fight"},O=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 D(e){let{events:t,selectedFightNightId:n,stickyTop:i}=e,r={live:[],upcoming:[],finished:[]};return t.forEach(e=>{r[O(e)].push(e)}),(0,s.jsx)(s.Fragment,{children:Object.keys(r).map(e=>0===r[e].length?null:(0,s.jsxs)(o.az,{position:"relative",children:[(0,s.jsx)(o.az,{pt:"lg",px:"lg",h:"3xl",position:"sticky",bg:"surface.s0",zIndex:"sticky",style:{top:i},children:(0,s.jsx)(l.EY,{textStyle:{base:"display.small",md:"display.medium"},h:"lg",display:"block",children:(0,s.jsx)(v.A,{id:L[e]})})}),(0,s.jsx)(u.BU,{children:r[e].map(e=>{let t=n===e.tournament.id;return(0,s.jsx)(I.A,{isSelected:t,event:e},e.id)})})]},e))})}function M(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=(0,p.UG)(e),s=(0,d.useContext)(z.Ws),{data:i,isLoading:l}=(0,c.Ay)(t?r.t3g.mainEventsByDate(s,n,"extended"):null,{refreshInterval:1e4});return{events:null==i?void 0:i.events,isLoading:l}}var F=n(12047),Y=n(76868);let B=e=>r.tI9.dailyUniqueTournaments(e,3600*(0,p.UW)(),r.QCR.MMA),P=e=>{let{date:t,onDateChange:n}=e,{data:i}=(0,c.Ay)([B((0,p.UG)(t)),"EMPTY_EVENT_LIST"],()=>N(t));return(0,s.jsxs)(o.so,{direction:"column",align:"center",pb:"2xl",children:[(0,s.jsx)(Y.p,{graphic:"no-games-mma",descriptionMessageId:"no_events_empty_state_mma"}),void 0!==i&&(0,s.jsx)(l.$n,{variant:"outline",onClick:()=>n(i),children:(0,s.jsx)(v.A,{id:"mma_view_previous_fights_button"})})]})};async function N(e){var t;let[n,s]=function(e){let t=(0,p.UG)(e).substring(0,7),n=new Date(e).setMonth(e.getMonth()-1);return[t,(0,p.UG)(n).substring(0,7)]}(e),[i,l]=await Promise.all([(0,r.TtD)(B(s)),(0,r.TtD)(B(n))]);return t=e,[...i.dailyUniqueTournaments,...l.dailyUniqueTournaments].map(e=>new Date(e.date)).filter(e=>et.getTime()-e.getTime())[0]}var K=n(85397);function X(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.az,{h:"3xl",bg:"surface.s2"}),(0,s.jsx)(u.BU,{children:[...Array(8)].map((e,t)=>(0,s.jsx)(u.Zp,{children:(0,s.jsx)(o.az,{h:"[162px]"})},"fight-night-loader-".concat(t)))})]})}let R=e=>{let{currentDate:t,onClick:n,toggleCalendar:i}=e,r=new Date,a=new Date(t.getTime()-K.v),d=new Date(t.getTime()+K.v),c=(0,F.Ay)({isInMobileTabs:!1});return(0,s.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,s.jsx)(l.$n,{variant:"clear",onClick:()=>n(-1*K.S),children:(0,s.jsx)(S.pa2,{h:"24px",w:"24px",fill:"primary.default"})}),(0,s.jsx)(o.az,{onClick:i,cursor:"pointer",children:(0,s.jsxs)(l.EY,{textStyle:"display.medium",textTransform:"initial",children:[(0,s.jsx)(y.XU,{value:a,...a.getFullYear()===d.getFullYear()?p.or.dateWithShortMonthOnly:p.or.dateWithShortMonth}),"\xa0-\xa0",(0,s.jsx)(y.XU,{value:d,...r.getFullYear()===d.getFullYear()&&a.getFullYear()===d.getFullYear()?p.or.dateWithShortMonthOnly:p.or.dateWithShortMonth})]})}),(0,s.jsx)(l.$n,{variant:"clear",onClick:()=>n(K.S),children:(0,s.jsx)(S.CCT,{h:"24px",w:"24px",fill:"primary.default"})})]})},W=e=>{let{date:t,onDateChange:n}=e,{events:i,isLoading:r}=M(t),l=(0,F.Ay)({isInMobileTabs:!1}),a=new Date("".concat((0,p.UG)(t)," 00:00:00")),o=new Date(a.getTime()-K.v).getTime()/1e3,d=new Date(a.getTime()+K.v+p.d_-p.Z2).getTime()/1e3,c=null==i?void 0:i.filter(e=>e.startTimestamp>=o&&e.startTimestamp<=d);return r?(0,s.jsx)(X,{}):(null==c?void 0:c.length)?(0,s.jsx)(D,{events:c,stickyTop:l+48}):(0,s.jsx)(P,{date:t,onDateChange:n})};function J(){let e=(0,a.hX)(),{showMobileCalendar:t,toggleCalendar:n}=k(),[i,r]=(0,d.useState)(new Date),l=(0,d.useContext)(z.Ws);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(R,{currentDate:i,toggleCalendar:n,onClick:e=>r(t=>new Date(t.getTime()+e))}),(0,s.jsx)(W,{date:i,onDateChange:e=>r(e)}),!e&&(0,s.jsxs)(T.Xn,{isOpen:t,onClose:n,children:[(0,s.jsx)(T.Xn.Header,{}),(0,s.jsx)(T.Xn.Content,{minH:352,children:(0,s.jsx)(E.A,{date:i,onChange:e=>{r(e),n()},sport:l})})]})]})}function Z(e){let{organization:t,isFirst:n,isSelected:a,isMobile:d}=e;return(0,s.jsx)(m.A,{organization:t,children:(0,s.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,s.jsx)(i.e,{size:24,id:t.id}),(0,s.jsx)(l.EY,{w:"100%",textStyle:{base:"display.micro",md:"body.large"},truncate:!0,ml:"xl",mr:"sm",children:t.name}),d&&(0,s.jsx)(o.so,{align:"center",h:"[36px]",borderStart:"1px solid {colors.neutrals.nLv4}",pl:"md",children:(0,s.jsx)(x.e,{entity:r.bq7.Tournaments,id:t.id,location:h.y.MainLeagues,type:h.b.UniqueTournament})})]})})}function $(e){let{selectedId:t,showOrganizations:n}=e,{data:i}=(0,c.Ay)(r.ZXN.uniqueTournaments(g.Ap)),x=(0,a.hX)(),{isMobile:h,isDesktop:m}=(0,l.$c)(),{events:j,isLoading:p}=M(new Date,!h),v=function(e){let t={};return null==e||e.forEach(e=>{var n;let s=null==(n=e.tournament.uniqueTournament)?void 0:n.id;s&&(t[s]||(t[s]=[]),t[s].push(e))}),t}(j);return x||!h||n?!i||p?h&&!n?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.az,{bg:"surface.s1",h:"4xl",borderBottom:"1px solid {colors.neutrals.nLv4}"}),(0,s.jsx)(X,{})]}):(0,s.jsx)(o.az,{p:{mdDown:"sm"},mb:"sm",children:(0,s.jsxs)(u.Zp,{children:[(0,s.jsx)(u.Zp.Header,{titleId:"organisations"}),(0,s.jsx)(o.az,{h:"[752px]"})]})}):(0,s.jsx)(o.az,{p:{mdDown:"sm"},children:(0,s.jsxs)(u.Zp,{children:[(0,s.jsx)(u.Zp.Header,{titleId:"organisations"}),i.groups.map(e=>e.uniqueTournaments.map((e,n)=>{let i=t===e.id&&!h,r=v[e.id]||[];return(0,s.jsxs)(d.Fragment,{children:[(0,s.jsx)(Z,{organization:e,isSelected:i,isFirst:0===n,isMobile:h}),m&&r.map((e,t)=>(0,s.jsx)(A,{event:e,isSelected:i,isFirst:0===t},e.id))]},e.id)})),(0,s.jsx)(u.Zp.Footer,{})]})}):(0,s.jsx)(J,{})}},98775:(e,t,n)=>{n.d(t,{A:()=>s});let s=(0,n(55729).createContext)(void 0)}}]);