!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]="c86481b9-57be-4633-9dff-04d38986d1db",e._sentryDebugIdIdentifier="sentry-dbid-c86481b9-57be-4633-9dff-04d38986d1db")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4824],{25022:(e,t,r)=>{r.d(t,{r9:()=>s,Fx:()=>l,BE:()=>g,aQ:()=>a,ov:()=>c,KA:()=>b,bs:()=>d,d_:()=>v,TI:()=>function e(t,r,n,s,o,l){var a,c,d,u,x,f,g;if(null===n){let n=t.rounds.length-1;if(n>=0){if(t.rounds[n].type>=0&&(!/final/i.test(t.rounds[n].description)||1!==t.rounds[n].type)&&t.rounds[n].blocks.length>1)return e(function(e){let t=e.rounds.length-1;if(t>=0){let r=i()(e);for(;r.rounds[t].blocks.length>1;){let e=r.rounds[t],n={id:-1,order:e.order+1,description:"",type:-1,blocks:[]};e.blocks.forEach((e,t)=>{if(t%2==0){let r={blockId:e.blockId+9999,events:[],result:"",isHidden:!0,order:Math.ceil((t+1)/2),participants:[{sourceBlockId:e.blockId}]};n.blocks.push(r)}else n.blocks[n.blocks.length-1].participants.push({sourceBlockId:e.blockId})}),r.rounds.push(n),t=r.rounds.length-1}return r}return e}(t),r,null);if(0===t.rounds[n].blocks.length||1===t.rounds[n].blocks.length&&!t.rounds[n].blocks[0].participants){let i=p()(t),s=n;for(;s>=0&&!i.rounds[s].blocks.some(e=>e.participants.length>0);)i.rounds.pop(),s--;return e(i,r,null)}let s={...t.rounds[n].blocks[0]};s.roundIndex=n,s.participantDraw=t.rounds[n].participantDraw,2===t.rounds[n].blocks.length&&(s.thirdPlaceBlock={...t.rounds[n].blocks[1],roundIndex:n});let o=s.order||1,l=h(t)&&m(t);return s.left=e(t,r,null==(a=s.participants[0])?void 0:a.sourceBlockId,n-1,2*o-1,l),s.right=e(t,r,null==(c=s.participants[1])?void 0:c.sourceBlockId,n-1,2*o,l),s}}if("number"==typeof s){let i;if((i=l&&void 0!==n?null==(d=t.rounds[s])?void 0:d.blocks.find(e=>e.blockId===n):null==(u=t.rounds[s])?void 0:u.blocks.find(e=>e.order===o))&&i.blockId>0){let n=i.order||1;return(i.participantDraw=null==(x=t.rounds[s])?void 0:x.participantDraw,0===i.participants.length||2===i.participants.length)?{...i,roundIndex:s,left:e(t,r,null==(f=i.participants[0])?void 0:f.sourceBlockId,s-1,2*n-1,l),right:e(t,r,null==(g=i.participants[1])?void 0:g.sourceBlockId,s-1,2*n,l)}:{...i,roundIndex:s,left:e(t,r,void 0,s-1,2*n-1,l),right:e(t,r,void 0,s-1,2*n,l)}}}},y6:()=>function e(t){return t?Math.max(e(t.left),e(t.right))+1:0},P4:()=>f});var n=r(9922),i=r.n(n);let s=e=>{let{hasWinner:t,isFirstParticipantWinner:r,isSecondParticipantWinner:n,isLive:i,isSeriesInProgress:s}=e;return i?{firstParticipantName:"live",secondParticipantName:"live",firstParticipantScore:"live",secondParticipantScore:"live"}:{firstParticipantName:!t||r?"default":"secondary",secondParticipantName:!t||n?"default":"secondary",firstParticipantScore:s?"success":r?"default":"secondary",secondParticipantScore:s?"success":n?"default":"secondary"}};var o=r(21377);let l=e=>{let{firstParticipant:t,secondParticipant:r,block:n}=e,i=n.result===o.pq_.Walkover,s=n.result===o.pq_.Retired,l=!!(null==t?void 0:t.winner),a=!!(null==r?void 0:r.winner);return{isLive:!!n.eventInProgress,isSeriesInProgress:!n.finished,isRetired:s,isWalkover:i,isSpecial:s||i,isFirstParticipantWinner:l,isSecondParticipantWinner:a,hasWinner:l||a,hasScore:!!n.homeTeamScore&&!!n.awayTeamScore,hasStartTime:!!n.seriesStartDateTimestamp}},a=e=>{let t=[];return(e.forEach((e,r)=>{/qualif/i.test(e.name)&&e.rounds.filter(e=>e.type>=0).every(e=>e.blocks.every(e=>!1===e.eventInProgress||e.finished))&&t.push(r)}),t.length===e.length)?[]:t};function c(e,t){return function e(r){if(void 0===r)return 0;let n=0;return r.isHidden||(t&&r.participants.length>=1?n=1:2===r.participants.length&&(n=1)),n+e(null==r?void 0:r.left)+e(null==r?void 0:r.right)}(e)>0}let d=e=>e.type===o.FFH.Finals||e.type%2==0&&(e.type===o.FFH.ThirdPlace&&1===e.blocks.length||e.type<=8);var u=r(932),p=r.n(u);let h=e=>{if(e.rounds.some(e=>1!==e.blocks.length&&e.blocks.length%2!=0))return!0;let t=0;for(let r=0;re.rounds.some(e=>e.blocks.some(e=>e.participants.some(e=>e.sourceBlockId))),x=e=>/qualif|preliminary/i.test(e),f=(e,t)=>{let r,n=t||e.rounds;if(e.currentRound){var i;r=(null==(i=n[e.currentRound-1])?void 0:i.type)<=o.FFH.EighthFinals}if(!1===r||1===e.rounds.length&&1===e.rounds[0].type||e.rounds.length>0&&e.rounds[0].blocks.length>8)return!1;let s=e.rounds.filter(e=>!x(e.description));return!!s.length&&!(s.some(e=>e.blocks.some(t=>(t.order?t.order:0)>e.blocks.length))||s.every(e=>e.blocks.every(e=>e.participants.every(e=>e.team.disabled))))&&s.some(e=>e.blocks.some(e=>e.participants.length>0))};function g(e){let t=[];return e.forEach((e,r)=>{let n=new Set;e.blocks.forEach(e=>{e.participants.forEach(r=>{var i;if((null==r||null==(i=r.team)?void 0:i.id)&&!r.team.disabled){if(t.some(e=>e.has(r.team.id))||1===e.participants.length)return;n.add(r.team.id)}})}),t.push(n)}),t}function v(e,t,r){if(0===t)return!1;let n=null==r?void 0:r[t];if(n){var i;if((null==e||null==(i=e.team)?void 0:i.id)&&n.has(e.team.id))return!0}return!1}function b(e){return!!e&&e.some((e,t)=>t>0&&e.size>0)}},48686:(e,t,r)=>{r.d(t,{AK:()=>s,Dh:()=>n,GA:()=>u,Gj:()=>l,IT:()=>c,XV:()=>a,Yv:()=>i,ut:()=>o,zi:()=>d});let n=20,i=.2,s=1.5,o=4,l=32,a=658,c=880,d=80,u=16},53214:(e,t,r)=>{r.d(t,{eo:()=>ek,b8:()=>eh,fT:()=>b,Y9:()=>A,eS:()=>ey,_4:()=>C,Vr:()=>ev,b2:()=>u,Cq:()=>ej,o0:()=>E,Xs:()=>ex,Bg:()=>eg,Dg:()=>eb});var n=r(6029),i=r(44194),s=r(76356),o=r(90248),l=r(68379),a=r(47530);let c=e=>{let{isColorless:t}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.so,{mb:"sm",gap:"md",children:[(0,n.jsx)(l.J,{position:"relative",mt:"2xs",seed:1,colorless:t}),(0,n.jsx)(i.EY,{textStyle:"body.mediumParagraph",children:(0,n.jsx)(o.A,{id:"tennis_seeded_player"})})]}),(0,n.jsxs)(s.so,{mb:"sm",gap:"md",children:[(0,n.jsx)(l.J,{position:"relative",mt:"2xs",seed:"WC",colorless:t}),(0,n.jsx)(i.EY,{textStyle:"body.mediumParagraph",children:(0,n.jsx)(o.A,{id:"abbr.wc"})})]}),(0,n.jsxs)(s.so,{mb:"sm",gap:"md",children:[(0,n.jsx)(l.J,{position:"relative",mt:"2xs",seed:"LL",colorless:t}),(0,n.jsx)(i.EY,{textStyle:"body.mediumParagraph",children:(0,n.jsx)(o.A,{id:"abbr.ll"})})]}),(0,n.jsxs)(s.so,{mb:"sm",gap:"md",children:[(0,n.jsx)(l.J,{position:"relative",mt:"2xs",seed:"PR",colorless:t}),(0,n.jsx)(i.EY,{textStyle:"body.mediumParagraph",children:(0,n.jsx)(o.A,{id:"abbr.pr"})})]}),(0,n.jsxs)(s.so,{mb:"sm",gap:"md",children:[(0,n.jsx)(l.J,{position:"relative",mt:"2xs",seed:"Q",colorless:t}),(0,n.jsx)(i.EY,{textStyle:"body.mediumParagraph",children:(0,n.jsx)(o.A,{id:"abbr.qp"})})]}),(0,n.jsxs)(s.so,{mb:"sm",gap:"md",children:[(0,n.jsx)(l.J,{position:"relative",mt:"2xs",seed:"A",colorless:t}),(0,n.jsx)(i.EY,{textStyle:"body.mediumParagraph",children:(0,n.jsx)(o.A,{id:"abbr.a"})})]}),(0,n.jsxs)(s.so,{mb:"sm",gap:"md",children:[(0,n.jsx)(l.J,{position:"relative",mt:"2xs",seed:"SE",colorless:t}),(0,n.jsx)(i.EY,{textStyle:"body.mediumParagraph",children:(0,n.jsx)(o.A,{id:"abbr.se"})})]})]})},d={Quarterfinal:"1/4",Quarterfinals:"1/4",Semifinal:"1/2",Semifinals:"1/2",Final:"1/1","Round 1":"R1","Round 2":"R2","Round 3":"R3","Round 4":"R4","Round 5":"R5","Round 6":"R6","Round 7":"R7","Round 8":"R8","Round 9":"R9","Round 10":"R10","Qualification round 1":"QR1","Qualification round 2":"QR2","Qualification round 3":"QR3","Qualification round 4":"QR4","Qualification round 5":"QR5","Qualification round 6":"QR6","Preliminary round":"PR","Preliminary round 1":"PR1","Preliminary round 2":"PR2","Round of 16":"1/8","Round of 32":"1/16","Round of 64":"1/32","Round of 128":"1/64",R16:"1/8",R32:"1/16",R64:"1/32",R128:"1/64","1/8":"1/8","1/16":"1/16","1/32":"1/32","1/64":"1/64"};function u(e){let{roundName:t}=e;return t in d?(0,n.jsx)(n.Fragment,{children:d[t]}):(0,n.jsx)(a.rC,{roundName:t})}var p=r(21377),h=r(947),m=r(79387),x=r(19451),f=r(26331),g=r(73088),v=r(30479);let b=e=>{let{uniqueTournamentId:t,seasonId:r,cupTree:i,sport:l,categorySlug:a,uniqueTournamentSlug:c}=e,d=(0,h.A)(),u=(0,f.A)(),b=i.rounds.length,j=(()=>{switch(b){case 1:return 250;case 2:return 278;case 4:return 466;default:return 642}})(),y=i.id,k=i.name,w=(0,x.vf)(d.locale),S="".concat(p.yuv).concat(w?"/".concat(w):"","/embed/unique-tournament/").concat(t,"/season/").concat(r,"/cuptree/").concat(y),R="sofa-cupTree-embed-".concat(t,"-").concat(r,"-").concat(y),T="height:".concat(j+2+16+48+16+148,"px!important;max-width:700px!important;width:100%!important;"),P=(0,p.Lo9)(g.z.getTranslatedRoute(u,"uniqueTournament",{sport:l,category:a,tournament:c,id:t},(0,v.HL)({id:r})).route,{isApiRoute:!1}),E=d.formatMessage({id:"cupTree.embed.backLink"},{linkToSofascore:'Sofascore')}),A='\n
\n ').concat(E,"\n
");return(0,n.jsx)(s.az,{px:"sm",pb:"sm",children:(0,n.jsx)(m.C,{px:"0px",callToAction:(0,n.jsx)(o.A,{id:"bracket_embed"}),embedString:A})})};var j=r(65789),y=r(55729),k=r(6354),w=r(20336),S=r(79154);let R={};var T=r(99064),P=r(54409);function E(){return(0,n.jsx)(T.AM,{trigger:(0,n.jsx)(T.AM.TriggerWrapper,{children:(0,n.jsx)(P.G_L,{minW:24,fill:"onSurface.nLv1"})}),closeOnOutsideClick:!0,children:(0,n.jsxs)(T.AM.Content,{position:"absolute",w:"320px",maxW:"calc(100vw - 48px)",right:"100%",elevation:3,children:[(0,n.jsx)(i.EY,{textStyle:"display.large",display:"block",my:"sm",children:(0,n.jsx)(o.A,{id:"tennis_seedings_title"})}),(0,n.jsx)(c,{})]})})}function A(e){let{id:t,name:r,sport:i,phaseSelector:o}=e,l=i===p.QCR.Tennis,a=function(e,t){let{uniqueTournamentId:r,uniqueTournamentName:n}=(0,y.useContext)(k.O),i=(0,h.A)();if(R[t])return R[t];let s=i.formatMessage({id:e||"tournament.cupTree"});if(!r||!n||!(r in S))return R[t]=s,s;let o=i.formatMessage({id:S[r]}),l=(0,w.t)(e,p.QCR.Football,i);return(l=l.replace(new RegExp("\\b".concat(n,"\\b")),o))===e?(R[t]=s,s):(R[t]=l,l)}(r,t),c=(0,n.jsxs)(s.so,{align:"center",gap:"sm",position:"absolute",right:"md",top:"md",children:[o,l&&(0,n.jsx)(E,{})]});return(0,n.jsx)(j.Zp.Header,{title:(0,n.jsx)("bdi",{children:a}),actionComponent:c})}function C(){return(0,n.jsx)(s.so,{className:"cupTree-instruction-snackbar",position:"absolute",justify:"center",top:"[112px]",left:"0",w:"100%",children:(0,n.jsxs)(s.so,{align:"center",bg:"surface.t",px:"lg",py:"md",br:"lg",h:"4xl",children:[(0,n.jsx)(P.fRW,{fill:"surface.s1"}),(0,n.jsx)(i.EY,{ml:"md",textStyle:"body.medium",color:"surface.s1",children:(0,n.jsx)(o.A,{id:"bracket_zoom_snackbar"})})]})})}var I=r(494),B=r(22648),D=r(89489),L=r(53486);function _(e){let[t,r]=(0,y.useState)(!1),l=e.block,a=(0,I.wA)(),c=(0,I.d4)(e=>l.events?l.events.map(t=>e.favorites.events[t]).filter(Boolean):[]);async function d(){try{if(l.events&&c.lengthp.nk6.fetchEvent(e)))).map(e=>{let{event:t}=e;return t});a((0,D.oU)(e)),r(!1)}}catch(e){r(!1)}}return(0,y.useEffect)(()=>{d()},[l.blockId,l.events]),(0,n.jsx)(s.az,{position:"absolute",left:"0",top:"[72px]",bg:"surface.s1",w:"[300px]",p:"sm",br:"sm",elevation:"3",zIndex:"popover",children:t?(0,n.jsx)(B.a,{}):c.length?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.EY,{textAlign:"center",display:"block",p:"sm",textStyle:"display.small",children:(0,n.jsx)(o.A,{id:"tournament.series",defaultMessage:"Series"})}),c.map(e=>(0,n.jsx)("div",{onClick:e=>{e.stopPropagation()},children:(0,n.jsx)(L.n6,{event:e,isNarrow:!0,isShort:!0,isShortDate:!0,children:null})},e.id)),(0,n.jsx)(i.$n,{w:"100%",variant:"clear",onClick:t=>{t.stopPropagation(),e.close()},children:(0,n.jsx)(o.A,{id:"close_window_button",defaultMessage:"Close"})})]}):(0,n.jsx)(o.A,{id:"basic.noEvents",defaultMessage:"No events"})})}var H=r(31710),F=r(41735),V=r(94497),z=r(62827),M=r(48686);function Y(){let e=(0,H._)(["\n > .connector-left,\n > .connector-right,\n > .connector-left-participant-draw,\n > .connector-right-participant-draw,\n > .connector-left:after,\n > .connector-right:after {\n border-color: ",";\n }\n "]);return Y=function(){return e},e}let N=(0,F.default)(T.az).withConfig({componentId:"sc-540b4a21-0"})(["width:calc(100% - 2 * ","px);position:relative;right:",";left:",";margin:","px 0;&.participant-connector:after{content:'';display:block;position:absolute;top:50%;right:-","px;width:1px;height:var(--participant-connector-height);border-right:","px dashed ",";}> .connector-left{border-top:","px solid ",";border-right:",";border-left:",";animation:"," 0.2s ease-in-out;:after{content:'';display:block;position:absolute;bottom:0px;right:",";left:",";width:","px;height:0px;border-top:","px solid ",";}}> .connector-right{border-bottom:","px solid ",";border-right:",";border-left:",";animation:"," 0.2s ease-in-out;:after{content:'';display:block;position:absolute;top:0px;right:",";left:",";width:","px;height:0px;border-top:","px solid ",";}}> .connector-left-participant-draw{border-top:","px dashed ",";border-left:",";animation:"," 0.2s ease-in-out;}> .connector-right-participant-draw{border-bottom:","px dashed ",";border-left:",";animation:"," 0.2s ease-in-out;}",""],M.Dh,(0,z.UR)("-".concat(M.Dh+4,"px"),"unset"),(0,z.UR)("unset","-".concat(M.Dh+4,"px")),M.ut,M.Dh+1,M.ut,e=>e.theme.colors.surface.s2,M.ut,e=>e.theme.colors.surface.s1,e=>(0,z.UR)("".concat(M.ut,"px solid ").concat(e.theme.colors.surface.s1),"unset"),e=>(0,z.UR)("unset","".concat(M.ut,"px solid ").concat(e.theme.colors.surface.s1)),V.qG,(0,z.UR)("-".concat(M.Dh+4,"px"),"unset"),(0,z.UR)("unset","-".concat(M.Dh+4,"px")),M.Dh,M.ut,e=>e.theme.colors.surface.s1,M.ut,e=>e.theme.colors.surface.s1,e=>(0,z.UR)("".concat(M.ut,"px solid ").concat(e.theme.colors.surface.s1),"unset"),e=>(0,z.UR)("unset","".concat(M.ut,"px solid ").concat(e.theme.colors.surface.s1)),V.qG,(0,z.UR)("-".concat(M.Dh+4,"px"),"unset"),(0,z.UR)("unset","-".concat(M.Dh+4,"px")),M.Dh,M.ut,e=>e.theme.colors.surface.s1,M.ut,e=>e.theme.colors.surface.s1,e=>(0,z.UR)("unset","".concat(M.ut,"px dashed ").concat(e.theme.colors.surface.s1)),V.qG,M.ut,e=>e.theme.colors.surface.s1,e=>(0,z.UR)("unset","".concat(M.ut,"px dashed ").concat(e.theme.colors.surface.s1)),V.qG,e=>e.theme.breakpoints.query.mdMin(Y(),e.theme.colors.surface.s2)),q=(0,F.default)(T.az).withConfig({componentId:"sc-540b4a21-1"})(["transition:opacity 0.6s ease-in-out,width 0.2s ease-in-out,height 0.2s ease-in-out;position:relative;opacity:0;",""],e=>e.isVisibleRound&&"opacity: 1;"),Q=(0,F.default)(T.so).withConfig({componentId:"sc-540b4a21-2"})(["user-select:none;position:relative;height:","px;border-radius:8px;width:72px;margin:14px 4px;flex-direction:column;::before{content:'';position:absolute;border-left:","px solid ",";bottom:","px;left:calc(50% - ","px);height:","px;","}::after{content:'';position:absolute;border-left:","px solid ",";top:","px;left:calc(50% - ","px);height:","px;","}"],M.zi,M.ut,e=>e.inCard?e.theme.colors.surface.s2:e.theme.colors.surface.s1,M.zi,M.ut/2,M.GA,e=>e.hideTopConnector&&"display: none;",M.ut,e=>e.inCard?e.theme.colors.surface.s2:e.theme.colors.surface.s1,M.zi,M.ut/2,M.GA,e=>e.hideBottomConnector&&"display: none;");var U=r(65078),W=r(70591),G=r(33144),X=r(94604),J=r(85986);let O=(0,r(62042).Fj)({variants:{variant:{default:{color:"neutrals.nLv1"},secondary:{color:"neutrals.nLv3"},live:{color:"status.live"},success:{color:"secondary.default"}}},defaultVariants:{variant:"default"}}),K=(0,s.I4)("span",O),Z=(0,s.I4)("bdi",O),$="cupTreeHighlight-team",ee=()=>(0,n.jsx)(s.az,{px:"sm",br:"sm",bg:"secondary.highlight",h:"md",w:"2xl",children:(0,n.jsx)(i.EY,{textStyle:"assistive.micro",color:"secondary.default",verticalAlign:"top",children:"BYE"})}),et=(0,y.memo)(function(e){var t,r;let{participant:i,seed:a,nameColor:c,scoreColor:d,score:u,isFirst:p,isNewEntrant:h,isEmptyBlock:m}=e,{showSingleParticipantByeBlocks:x}=(0,J.B)(),f=(null==i||null==(t=i.team)?void 0:t.id)||0,g=(null==(r=document)?void 0:r.dir)==="rtl",v=x&&(null==i?void 0:i.team)===void 0&&!m;return(0,n.jsxs)(s.so,{h:"[34px]",pl:{lgDown:"sm",lg:"md"},pr:{mdDown:"sm",md:u?"sm":void 0,lg:u?"md":void 0},pt:p?"sm":"xs",pb:p?"xs":"sm",align:"center",justify:"space-between",className:f?"".concat($,"-").concat(f):"",borderStartStartRadius:g?p&&u?"sm":void 0:p?"sm":void 0,borderStartEndRadius:g?p?"sm":void 0:p&&u?"sm":void 0,borderEndEndRadius:g?p?void 0:"sm":p||!u?void 0:"sm",borderEndStartRadius:g?p||!u?void 0:"sm":p?void 0:"sm",children:[(0,n.jsxs)(s.so,{w:"100%",align:"center",overflowX:"clip",h:"xl",children:[(0,n.jsx)(s.az,{position:"relative",children:v?(0,n.jsx)(s.az,{w:"xl",h:"xl"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(G.p,{id:f,name:null==i?void 0:i.team.name,size:24,style:{verticalAlign:"top"}}),(0,n.jsx)(l.J,{seed:a,right:"[0px]",bottom:"-xs",h:"md",textStyle:"assistive.micro"})]})}),(0,n.jsx)(Z,{ml:"sm",variant:c,textStyle:"body.medium",truncate:!0,maxW:{mdDown:"[124px]",md:"[180px]"},children:v?(0,n.jsx)(ee,{}):(null==i?void 0:i.team)?(0,n.jsxs)(n.Fragment,{children:[h&&(0,n.jsx)(P.UPF,{fill:"playoffs.promotionToX",w:"16",h:"16",mr:"xs",mt:"-1",style:{transform:g?"rotate(-90deg)":"rotate(90deg)",verticalAlign:"middle"}}),(0,n.jsx)(X.Rm,{team:i.team,short:!0})]}):(0,n.jsx)(o.A,{id:"label_to_be_determined",defaultMessage:"TBD"})})]}),u&&(0,n.jsx)(K,{style:{whiteSpace:"nowrap"},variant:d,children:u})]})});var er=r(4967),en=r(90510);let ei=e=>{let{seriesStartDateTimestamp:t,isLive:r}=e,s=1e3*t,l=(0,er.cK)(s)||(0,er.ef)(s);return(0,n.jsx)(i.EY,{textStyle:"assistive.default",textAlign:"end",display:"block",pr:"sm",minW:"[52px]",color:r?"status.live":"neutrals.nLv3",children:r?(0,n.jsx)(o.A,{id:"inProgress"}):(0,n.jsxs)(n.Fragment,{children:[l?(0,n.jsx)(o.A,{id:(0,er.cK)(s)?"today":"tomorrow"}):(0,n.jsx)(en.XU,{day:"numeric",month:"short",value:s}),(0,n.jsx)("br",{}),(0,n.jsx)(en.ib,{value:s})]})})},es=e=>{let{isRetired:t,isWalkover:r}=e;return(0,n.jsx)(i.EY,{textStyle:"assistive.default",display:"block",color:"neutrals.nLv3",px:"sm",truncate:!0,children:(0,n.jsx)(o.A,{id:r?"walkover":t?"retired":""})})},eo=e=>{let{isFinals:t}=e;return(0,n.jsx)(s.az,{bg:t?"status.val":"neutral.default",br:"sm",position:"absolute",bottom:"[0px]",left:"[50%]",transform:{base:"translate(-50%,50%)",_rtl:"translate(50%,50%)"},pb:"2xs",children:(0,n.jsx)(i.EY,{textStyle:"assistive.micro",color:"surface.s1",px:"md",display:"block",children:(0,n.jsx)(o.A,{id:t?"final":"3rdPlace"})})})};var el=r(25022);let ea=e=>{let{event:t,children:r}=e;return t?(0,n.jsx)(W.tj,{event:t,children:r}):(0,n.jsx)(n.Fragment,{children:r})},ec=e=>{let t=e.querySelector(".cuptree-round-descriptions"),r=null==t?void 0:t.style.transform.match(/scaleX\(([^)]+)\)/),n=1;return r&&r[1]&&(n=+r[1]),n};function ed(e){var t,r,o,l,a,c,d,u,p,h;let{block:m,withLink:x,highlights:f,selectedRoundIndex:g}=e,{event:v,fetchedEvent:b}=(0,U.mJ)(x?((null==m?void 0:m.events)||[])[0]:void 0),j=(0,U.g3)(),{rounds:k,sourceTreeId:w,phaseFilter:S,entrantsPerRound:R}=(0,J.B)(),T=b||v,E=(0,y.useRef)(null),A=(0,y.useRef)(null),C=(0,y.useRef)(null),I=j?m.participants[1]:m.participants[0],B=j?null==b?void 0:b.awayTeamSeed:null==b?void 0:b.homeTeamSeed,D=j?m.awayTeamScore||(null==T||null==(r=T.awayScore)||null==(t=r.display)?void 0:t.toString()):m.homeTeamScore||(null==T||null==(l=T.homeScore)||null==(o=l.display)?void 0:o.toString()),L=j?m.participants[0]:m.participants[1],_=j?null==b?void 0:b.homeTeamSeed:null==b?void 0:b.awayTeamSeed,H=j?m.homeTeamScore||(null==T||null==(c=T.homeScore)||null==(a=c.display)?void 0:a.toString()):m.awayTeamScore||(null==T||null==(u=T.awayScore)||null==(d=u.display)?void 0:d.toString()),F=(0,el.Fx)({firstParticipant:I,secondParticipant:L,block:m}),V=(0,el.r9)(F),z=(F.hasScore||F.isLive)&&!F.isSpecial,Y=!!m.seriesStartDateTimestamp&&!z&&!F.isSpecial;(0,y.useLayoutEffect)(()=>{if(!e.is3rdPlace)return setTimeout(()=>{!function(){var t;let r="rtl"===document.dir,n=document.querySelector('[data-tree-id="'.concat(w,'"]'))||document;if(!n)return;let i=ec(n),s=(null==I?void 0:I.sourceBlockId)?n.querySelector('[data-blockId="'.concat(null==I?void 0:I.sourceBlockId,'"][data-level="').concat((e.level||0)+1,'"]')):n.querySelector('[data-order="'.concat(2*(m.order||1)-1,'"][data-level="').concat((e.level||0)+1,'"]')),o=(null==L?void 0:L.sourceBlockId)?n.querySelector('[data-blockId="'.concat(null==L?void 0:L.sourceBlockId,'"][data-level="').concat((e.level||0)+1,'"]')):n.querySelector('[data-order="'.concat(2*(m.order||1),'"][data-level="').concat((e.level||0)+1,'"]')),l=null==(t=E.current)?void 0:t.getBoundingClientRect(),a=null==s?void 0:s.getBoundingClientRect(),c=null==o?void 0:o.getBoundingClientRect();if(l){if(a){let t=Math.abs(l.top-a.top)/i;A.current&&(m.participantDraw?A.current.classList.add("connector-left-participant-draw","edge-"+(e.edge||"none"),"arrangement-"+(e.arrangement||"none")):A.current.classList.add("connector-left"),r?A.current.style.right="-".concat(2*M.Dh,"px"):A.current.style.left="-".concat(2*M.Dh,"px"),A.current.style.width="".concat(M.Dh,"px"),A.current.style.top=-t+M.Gj+"px",A.current.style.height=t+M.ut+"px")}if(c){let t=Math.abs(c.top-l.top)/i;C.current&&(m.participantDraw?C.current.classList.add("connector-right-participant-draw","edge-"+(e.edge||"none"),"arrangement-"+(e.arrangement||"none")):C.current.classList.add("connector-right"),r?C.current.style.right="-".concat(2*M.Dh,"px"):C.current.style.left="-".concat(2*M.Dh,"px"),C.current.style.width="".concat(M.Dh,"px"),C.current.style.bottom=-t+M.Gj+"px",C.current.style.height=t+M.ut+"px")}if(m.participantDraw&&"left"===e.edge){let t=document.querySelectorAll('[data-level="'.concat((e.level||0)+1,'"]')),r=t[0],n=t[t.length-1];if(r&&n){let e=r.getBoundingClientRect(),t=n.getBoundingClientRect(),s=Math.abs(e.top-t.top)/i;r.setAttribute("style","--participant-connector-height:".concat(s,"px")),r.classList.add("participant-connector")}}}}()},200),()=>{var e,t;null==(e=A.current)||e.classList.remove("connector-left"),null==(t=C.current)||t.classList.remove("connector-right")}},[g,S]);let q=m.venue&&!I&&!L,Q=!I&&!L;return(0,n.jsxs)(N,{ref:E,"data-blockId":m.blockId,"data-order":m.order,"data-level":e.level,"data-leftBlockId":null==I?void 0:I.sourceBlockId,"data-rightBlockId":null==L?void 0:L.sourceBlockId,position:"relative",onMouseEnter:()=>{var e,t;return f.set([null==I||null==(e=I.team)?void 0:e.id,null==L||null==(t=L.team)?void 0:t.id])},onMouseLeave:f.clear,children:[(0,n.jsx)(s.az,{position:"absolute",top:"[36px]",left:"0",ref:A,pointerEvents:"none"}),(0,n.jsx)(s.az,{position:"absolute",left:"0",ref:C,pointerEvents:"none"}),(0,n.jsx)(ea,{event:T,children:(0,n.jsxs)(s.so,{position:"relative",bg:{mdDown:"surface.s1",md:"surface.s2"},br:"sm",cursor:"pointer",align:"center",justify:"space-between",className:"cup-tree-block",elevation:{mdDown:"2"},children:[(0,n.jsx)(s.az,{flexGrow:1,overflow:"hidden",h:"[68px]",children:q?(0,n.jsxs)(s.so,{pl:"md",h:"100%",align:"center",children:[(0,n.jsx)(s.az,{w:"xl",h:"xl",mr:"sm",children:(0,n.jsx)(P.EGm,{w:"24",h:"24",fill:"onSurface.nLv1"})}),(0,n.jsxs)(s.az,{children:[(0,n.jsx)(i.EY,{maxW:"[148px]",truncate:!0,display:"block",children:null==(p=m.venue)?void 0:p.name}),(0,n.jsx)(i.EY,{color:"neutrals.nLv3",textStyle:"assistive.default",display:"block",children:null==(h=m.venue)?void 0:h.city.name})]})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(et,{participant:I,seed:B,nameColor:V.firstParticipantName,scoreColor:V.firstParticipantScore,score:z?D||"-":void 0,isEmptyBlock:Q,isNewEntrant:(0,el.d_)(I,k.length-(e.level||0)-1,R),isFirst:!0}),(0,n.jsx)(et,{participant:L,seed:_,nameColor:V.secondParticipantName,scoreColor:V.secondParticipantScore,score:z?H||"-":void 0,isEmptyBlock:Q,isNewEntrant:(0,el.d_)(L,k.length-(e.level||0)-1,R)})]})}),(e.isFinals||e.is3rdPlace)&&(0,n.jsx)(eo,{isFinals:e.isFinals}),F.isSpecial?(0,n.jsx)(es,{isRetired:F.isRetired,isWalkover:F.isWalkover}):Y?(0,n.jsx)(ei,{isLive:F.isLive,seriesStartDateTimestamp:m.seriesStartDateTimestamp}):null]})})]})}function eu(e){var t;let{thirdPlaceBlock:r,...i}=e,o=i.block.events.length>1,[l,a]=(0,y.useState)(!1),c=(0,T.jz)(()=>a(!1)),{showSingleParticipantByeBlocks:d,rounds:u}=(0,J.B)(),h=0===i.level&&!i.isRelegationDecider&&(null==(t=u[u.length-1])?void 0:t.type)===p.FFH.Finals,m=d?0===i.block.participants.length:i.block.participants.length<2;return i.ancestorHasParticipants&&m&&!i.block.venue&&!i.block.seriesStartDateTimestamp||i.block.isHidden?null:(0,n.jsxs)(q,{w:i.isVisibleRound?i.columnWidth:0,h:78*!!i.isVisibleRound,isVisibleRound:i.isVisibleRound,ref:c,position:"relative",role:"button",onClick:e=>{e.stopPropagation(),a(!0)},children:[(0,n.jsx)(ed,{...i,withLink:!o,isFinals:!i.is3rdPlace&&h,is3rdPlace:i.is3rdPlace}),o&&l&&(0,n.jsx)(_,{...i,close:()=>a(!1),isFinals:h}),h&&r&&(0,n.jsx)(s.az,{w:"100%",position:"absolute",bottom:"-2xl",left:"[0px]",transform:"translateY(100%)",children:(0,n.jsx)(eu,{...i,block:r,is3rdPlace:!0})})]})}let ep=e=>{let{status:t,colors:r,block:s}=e,l=s.homeTeamScore&&s.homeTeamScore.length>5||s.awayTeamScore&&s.awayTeamScore.length>5;return t.isWalkover?(0,n.jsx)(i.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",mt:"xs",children:(0,n.jsx)(o.A,{id:"walkover"})}):t.isRetired?(0,n.jsx)(i.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",mt:"xs",children:(0,n.jsx)(o.A,{id:"retired"})}):t.hasScore?(0,n.jsxs)(i.EY,{textAlign:"center",mt:"xs",style:{whiteSpace:"nowrap"},children:[(0,n.jsx)(K,{textStyle:l?"body.small":"body.large",variant:r.firstParticipantScore,children:s.homeTeamScore.replace(" ","")})," : ",(0,n.jsx)(K,{textStyle:l?"body.small":"body.large",variant:r.secondParticipantScore,children:s.awayTeamScore.replace(" ","")})]}):t.hasStartTime?(0,n.jsx)(i.EY,{textStyle:"assistive.default",color:t.isLive?"status.live":"neutrals.nLv3",mt:"xs",children:(0,er.cK)(1e3*s.seriesStartDateTimestamp)?(0,n.jsx)(en.ib,{value:1e3*s.seriesStartDateTimestamp}):(0,n.jsx)(en.XU,{day:"numeric",month:"short",value:1e3*s.seriesStartDateTimestamp})}):null};function eh(e){var t,r;let{block:a,hideTopConnector:c,hideBottomConnector:d,inCard:u}=e,p=a.participants[0],h=a.participants[1],m=(0,el.Fx)({firstParticipant:p,secondParticipant:h,block:a}),x=(0,el.r9)(m);return(0,n.jsxs)(Q,{align:"center",justify:"center",bg:u?"surface.s2":"surface.s1",elevation:2,hideTopConnector:c,hideBottomConnector:d,inCard:u,children:[(0,n.jsxs)(s.so,{align:"center",justify:"center",children:[(0,n.jsxs)(s.so,{mx:"xs",w:"1/2",direction:"column",justify:"center",align:"center",textAlign:"center",position:"relative",children:[(0,n.jsx)(G.p,{id:null==p||null==(t=p.team)?void 0:t.id,size:28}),(null==p?void 0:p.team)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.J,{seed:p.teamSeed,bottom:"lg",h:"md",textStyle:"assistive.micro"}),(0,n.jsx)(K,{mt:"xs",textStyle:"assistive.default",variant:x.firstParticipantName,children:p.team.nameCode||p.team.name.slice(0,3)})]}):(0,n.jsx)(i.EY,{textTransform:"uppercase",mt:"xs",textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,n.jsx)(o.A,{id:"label_to_be_determined",defaultMessage:"TBD"})})]}),(0,n.jsxs)(s.so,{mx:"xs",w:"1/2",direction:"column",justify:"center",align:"center",textAlign:"center",position:"relative",children:[(0,n.jsx)(G.p,{id:null==h||null==(r=h.team)?void 0:r.id,size:28}),(null==h?void 0:h.team)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.J,{seed:h.teamSeed,bottom:"lg",h:"md",textStyle:"assistive.micro"}),(0,n.jsx)(K,{mt:"xs",textStyle:"assistive.default",variant:x.secondParticipantName,children:h.team.nameCode||h.team.name.slice(0,3)})]}):(0,n.jsx)(i.EY,{textTransform:"uppercase",mt:"xs",textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,n.jsx)(o.A,{id:"label_to_be_determined",defaultMessage:"TBD"})})]})]}),(0,n.jsx)(ep,{block:a,colors:x,status:m})]})}var em=r(59721);function ex(){let{tournamentId:e}=(0,J.B)();return(0,n.jsxs)(s.az,{position:"absolute",top:"[calc(50% - 28px)]",right:"[-42px]",children:[(0,n.jsxs)("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M29.9608 41.0577V39.4808H31.5294V36.3269H24.4706V39.4808H26.0392V41.0577H20.1569L17.8039 43.4231V45H38.1961V43.4231L35.8431 41.0577H29.9608ZM48 7.54808H42.1176V11.4904H44.0784V18.1608L40.549 21.7088V4H15.451V21.7088L11.9216 18.1608V11.4904H13.8824V7.54808H8V19.8008L15.451 27.2912V30.8077L17.8039 32.3846L21.7255 34.75H34.2745L38.1961 32.3846L40.549 30.8077V27.2912L48 19.8008V7.54808Z",fill:"#E8B345"}),(0,n.jsx)("path",{d:"M16.9 44.9V49.9L11.9 49.9V54H43V52.0001L39 52V45L16.9 44.9Z",fill:"#374DF5"}),(0,n.jsx)("rect",{x:"20",y:"10",width:"16",height:"16",fill:"url(#pattern0_2354_307)"}),(0,n.jsx)("defs",{children:(0,n.jsx)("pattern",{id:"pattern0_2354_307",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:(0,n.jsx)("use",{xlinkHref:"#image0_2354_307",transform:"scale(0.015625)"})})})]}),(0,n.jsx)(em.e,{id:e,size:16,style:{position:"absolute",top:8,left:20}})]})}var ef=function(e){return e.Left="left",e.Right="right",e.Inner="inner",e}({});function eg(e){let{tree:t,initialOrientation:r="top",inCard:i}=e;if(!t)return null;let o=t.left||t.right;return(0,n.jsxs)(s.so,{flexGrow:1,flexShrink:1,direction:"top"===r?"column":"column-reverse",children:[(0,n.jsxs)(s.so,{children:[(0,n.jsx)(eg,{tree:t.left,initialOrientation:r,inCard:i}),(0,n.jsx)(eg,{tree:t.right,initialOrientation:r,inCard:i})]}),(0,n.jsxs)(s.so,{justify:"center",position:"relative",children:[o&&(0,n.jsx)(s.az,{position:"absolute",borderTopColor:i?"surface.s2":"surface.s1",borderTopWidth:"4px",borderTopStyle:"solid",w:"[calc(50% + 4px)]",left:"[calc(25% - 2px)]",top:"top"===r?"-2xs":"[calc(100% - 2px)]"}),(0,n.jsx)(eh,{block:t,hideTopConnector:!o&&"top"===r,hideBottomConnector:!o&&"bottom"===r,inCard:i})]})]})}let ev=(0,y.memo)(function e(t){var r;let{selectedRoundIndex:i}=t,{tree:o,level:l=0,depth:a}=t,{rounds:c}=(0,J.B)(),d=a-l-1,u=void 0===i||i===d||i-1===d||i+1===d;if(!o)return null;let h=t.ancestorHasParticipants||!o.isHidden&&o.participants.length>0,{left:m,right:x,...f}=o,g=!t.isRelegationDecider&&0===l&&(null==(r=c[c.length-1])?void 0:r.type)===p.FFH.Finals&&f.finished;return(0,n.jsxs)(s.so,{flexGrow:1,flexShrink:1,flexBasis:"[1px]",justify:"flex-end",children:[(m||x)&&(0,n.jsxs)(s.az,{position:"relative",children:[(0,n.jsx)(e,{...t,ancestorHasParticipants:h,level:l+1,tree:m,arrangement:"left",edge:t.edge===ef.Inner||t.edge===ef.Right?ef.Inner:ef.Left}),(0,n.jsx)(e,{...t,ancestorHasParticipants:h,level:l+1,tree:x,arrangement:"right",edge:t.edge===ef.Inner||t.edge===ef.Left?ef.Inner:ef.Right})]}),(0,n.jsxs)(s.so,{position:"relative",direction:"column",justify:"space-around",children:[g&&u&&(0,n.jsx)(ex,{}),(0,n.jsx)(eu,{block:f,thirdPlaceBlock:f.thirdPlaceBlock,highlights:t.highlights,arrangement:t.arrangement,edge:t.edge,level:l,isRelegationDecider:t.isRelegationDecider,ancestorHasParticipants:t.ancestorHasParticipants,isVisibleRound:u,selectedRoundIndex:i,columnWidth:t.columnWidth},f.blockId||"".concat(l,"-").concat(t.depth,"-").concat(f.order))]})]})});function eb(e){let{onZoomIn:t,onZoomOut:r}=e;return(0,n.jsxs)(s.so,{dir:"ltr",direction:"column",position:"absolute",top:"[112px]",right:"xl",gap:"2xs",children:[(0,n.jsx)(i.K0,{size:"primary",onClick:t,children:(0,n.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 11H13V4H11V11H4V13H11V20H13V13H20V11Z",fill:"var(--surface-s1)"})})}),(0,n.jsx)(i.K0,{size:"primary",onClick:r,children:(0,n.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 11H13H11H4V13H11H13H20V11Z",fill:"var(--surface-s1)"})})})]})}function ej(e){let{x:t,scale:r,roundNames:o}=e,l=(0,y.useMemo)(()=>r>0?1/r:1,[r]),{sport:c}=(0,J.B)();return(0,n.jsx)(s.so,{gap:"3xl",px:"lg",transformOrigin:{base:"0px 0px 0px",_rtl:"top right 0px"},style:{transform:"translateX(".concat(t,"px) scaleX(").concat(r,")")},className:"cuptree-round-descriptions",children:o.map((e,t)=>(0,n.jsx)(s.az,{h:"4xl",py:"lg",flexGrow:0,flexShrink:0,flexBasis:"[260px]",overflowClipMargin:10,overflowX:"clip",children:(0,n.jsx)(i.EY,{display:"block",textStyle:"table.medium",textAlign:"center",style:{transformOrigin:"50% 50%",transform:"scaleX(".concat(l,")")},children:r<.3?(0,n.jsx)(u,{roundName:e}):(0,n.jsx)(a.rC,{roundName:e,sport:c})})},e+t))})}function ey(e){let{onChange:t}=e,[r,i]=(0,y.useState)([]),s=(0,F.useTheme)();return(0,y.useEffect)(()=>(t.push(e=>{i(e)}),()=>{t.pop()}),[]),(0,n.jsx)("style",{children:r.map(e=>"\n .".concat($,"-").concat(e," { background: ").concat(s.colors.neutral.highlight,"; }\n .").concat($,"-").concat(e,":hover { background: ").concat(s.colors.neutral.highlight,"; }\n "))})}function ek(){let e="rtl"===document.dir;return(0,n.jsxs)(s.az,{px:"sm",py:"md",children:[(0,n.jsx)(P.UPF,{fill:"playoffs.promotionToX",w:"24",h:"24",mr:"xs",mt:"-1",style:{transform:e?"rotate(-90deg)":"rotate(90deg)",verticalAlign:"middle"}}),(0,n.jsx)(i.EY,{ml:"xs",textStyle:"assistive.default",children:(0,n.jsx)(o.A,{id:"bracket_bye_explainer",defaultMessage:"Bye - automatic advancement"})})]})}},85986:(e,t,r)=>{r.d(t,{B:()=>l,J:()=>o});var n=r(6029),i=r(55729);let s=(0,i.createContext)(void 0),o=e=>{let{children:t,...r}=e;return(0,n.jsx)(s.Provider,{value:r,children:t})},l=()=>{let e=(0,i.useContext)(s);if(void 0===e)throw Error("useCupTreeContext must be used within a CupTreeProvider");return e}},95195:(e,t,r)=>{r.d(t,{Q:()=>o});var n=r(21377),i=r(45860),s=r(25022);function o(e,t){let{data:r,error:o,isLoading:l}=(0,i.Ay)(n.V3t.cupTrees(e,t),{onSuccess:e=>(e.cupTrees.forEach(e=>{Array.isArray(e.rounds)||(e.rounds=Object.values(e.rounds))}),e)});if(o)return[void 0,l];if(r){let e=(0,s.aQ)(r.cupTrees);if(e.length===r.cupTrees.length)return[void 0,l];let t=r.cupTrees.filter((t,r)=>!e.includes(r));if(t.length)return[t,l]}return[void 0,l]}}}]);