!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]="bc204ac8-097e-47e7-aac4-142b67e111f2",e._sentryDebugIdIdentifier="sentry-dbid-bc204ac8-097e-47e7-aac4-142b67e111f2")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[73468],{48686:(e,t,n)=>{n.d(t,{AK:()=>i,Dh:()=>r,GA:()=>u,Gj:()=>l,IT:()=>c,XV:()=>a,Yv:()=>s,ut:()=>o,zi:()=>d});let r=20,s=.2,i=1.5,o=4,l=32,a=658,c=880,d=80,u=16},70305:(e,t,n)=>{n.d(t,{r9:()=>i,Fx:()=>l,BE:()=>f,ov:()=>a,KA:()=>g,bs:()=>c,d_:()=>v,TI:()=>function e(t,n,r,i,o,l){var a,c,d,m,x,f,v;if(null===r){let r=t.rounds.length-1;if(r>=0){if(t.rounds[r].type>=0&&(!/final/i.test(t.rounds[r].description)||1!==t.rounds[r].type)&&t.rounds[r].blocks.length>1)return e(function(e){let t=e.rounds.length-1;if(t>=0){let n=s()(e);for(;n.rounds[t].blocks.length>1;){let e=n.rounds[t],r={id:-1,order:e.order+1,description:"",type:-1,blocks:[]};e.blocks.forEach((e,t)=>{if(t%2==0){let n={blockId:e.blockId+9999,events:[],result:"",isHidden:!0,order:Math.ceil((t+1)/2),participants:[{sourceBlockId:e.blockId}]};r.blocks.push(n)}else r.blocks[r.blocks.length-1].participants.push({sourceBlockId:e.blockId})}),n.rounds.push(r),t=n.rounds.length-1}return n}return e}(t),n,null);if(0===t.rounds[r].blocks.length||1===t.rounds[r].blocks.length&&!t.rounds[r].blocks[0].participants){let s=u()(t),i=r;for(;i>=0&&!s.rounds[i].blocks.some(e=>e.participants.length>0);)s.rounds.pop(),i--;return e(s,n,null)}let i={...t.rounds[r].blocks[0]};i.roundIndex=r,i.participantDraw=t.rounds[r].participantDraw,2===t.rounds[r].blocks.length&&(i.thirdPlaceBlock={...t.rounds[r].blocks[1],roundIndex:r});let o=i.order||1,l=p(t)&&h(t);return i.left=e(t,n,null==(a=i.participants[0])?void 0:a.sourceBlockId,r-1,2*o-1,l),i.right=e(t,n,null==(c=i.participants[1])?void 0:c.sourceBlockId,r-1,2*o,l),i}}if("number"==typeof i){let s;if((s=l&&void 0!==r?null==(d=t.rounds[i])?void 0:d.blocks.find(e=>e.blockId===r):null==(m=t.rounds[i])?void 0:m.blocks.find(e=>e.order===o))&&s.blockId>=0){let r=s.order||1;return(s.participantDraw=null==(x=t.rounds[i])?void 0:x.participantDraw,0===s.participants.length||2===s.participants.length)?{...s,roundIndex:i,left:e(t,n,null==(f=s.participants[0])?void 0:f.sourceBlockId,i-1,2*r-1,l),right:e(t,n,null==(v=s.participants[1])?void 0:v.sourceBlockId,i-1,2*r,l)}:{...s,roundIndex:i,left:e(t,n,void 0,i-1,2*r-1,l),right:e(t,n,void 0,i-1,2*r,l)}}}},y6:()=>function e(t){return t?Math.max(e(t.left),e(t.right))+1:0},P4:()=>x});var r=n(9922),s=n.n(r);let i=e=>{let{hasWinner:t,isFirstParticipantWinner:n,isSecondParticipantWinner:r,isLive:s,isSeriesInProgress:i}=e;return s?{firstParticipantName:"live",secondParticipantName:"live",firstParticipantScore:"live",secondParticipantScore:"live"}:{firstParticipantName:!t||n?"default":"secondary",secondParticipantName:!t||r?"default":"secondary",firstParticipantScore:i?"success":n?"default":"secondary",secondParticipantScore:i?"success":r?"default":"secondary"}};var o=n(21377);let l=e=>{let{firstParticipant:t,secondParticipant:n,block:r}=e,s=r.result===o.pq_.Walkover,i=r.result===o.pq_.Retired,l=!!(null==t?void 0:t.winner),a=!!(null==n?void 0:n.winner);return{isLive:!!r.eventInProgress,isSeriesInProgress:!r.finished,isRetired:i,isWalkover:s,isSpecial:i||s,isFirstParticipantWinner:l,isSecondParticipantWinner:a,hasWinner:l||a,hasScore:!!r.homeTeamScore&&!!r.awayTeamScore,hasStartTime:!!r.seriesStartDateTimestamp}};function a(e,t){return function e(n){if(void 0===n)return 0;let r=0;return n.isHidden||(t&&n.participants.length>=1?r=1:2===n.participants.length&&(r=1)),r+e(null==n?void 0:n.left)+e(null==n?void 0:n.right)}(e)>0}let c=e=>e.type===o.FFH.Finals||e.type%2==0&&(e.type===o.FFH.ThirdPlace&&1===e.blocks.length||e.type<=8);var d=n(932),u=n.n(d);let p=e=>{if(e.rounds.some(e=>1!==e.blocks.length&&e.blocks.length%2!=0))return!0;let t=0;for(let n=0;ne.rounds.some(e=>e.blocks.some(e=>e.participants.some(e=>e.sourceBlockId))),m=e=>/qualif|preliminary/i.test(e),x=(e,t)=>{let n,r=t||e.rounds;if(e.currentRound){var s;n=(null==(s=r[e.currentRound-1])?void 0:s.type)<=o.FFH.EighthFinals}if(!1===n||1===e.rounds.length&&1===e.rounds[0].type||e.rounds.length>0&&e.rounds[0].blocks.length>8)return!1;let i=e.rounds.filter(e=>!m(e.description));return!!i.length&&!(i.some(e=>e.blocks.some(t=>(t.order?t.order:0)>e.blocks.length))||i.every(e=>e.blocks.every(e=>e.participants.every(e=>e.team.disabled))))&&i.some(e=>e.blocks.some(e=>e.participants.length>0))};function f(e){let t=[];return e.forEach((e,n)=>{let r=new Set;e.blocks.forEach(e=>{e.participants.forEach(n=>{var s;if((null==n||null==(s=n.team)?void 0:s.id)&&!n.team.disabled){if(t.some(e=>e.has(n.team.id))||1===e.participants.length)return;r.add(n.team.id)}})}),t.push(r)}),t}function v(e,t,n){if(0===t)return!1;let r=null==n?void 0:n[t];if(r){var s;if((null==e||null==(s=e.team)?void 0:s.id)&&r.has(e.team.id))return!0}return!1}function g(e){return!!e&&e.some((e,t)=>t>0&&e.size>0)}},81170:(e,t,n)=>{n.d(t,{eo:()=>ew,b8:()=>em,fT:()=>b,Y9:()=>E,eS:()=>ek,_4:()=>D,Vr:()=>eb,b2:()=>u,Cq:()=>ey,WR:()=>I,Xs:()=>ef,Bg:()=>eg,Dg:()=>ej});var r=n(6029),s=n(28349),i=n(76356),o=n(90248),l=n(68379),a=n(47530);let c=e=>{let{isColorless:t}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.so,{mb:"sm",gap:"md",children:[(0,r.jsx)(l.J,{position:"relative",mt:"2xs",seed:1,colorless:t}),(0,r.jsx)(s.EY,{textStyle:"body.mediumParagraph",children:(0,r.jsx)(o.A,{id:"tennis_seeded_player"})})]}),(0,r.jsxs)(i.so,{mb:"sm",gap:"md",children:[(0,r.jsx)(l.J,{position:"relative",mt:"2xs",seed:"WC",colorless:t}),(0,r.jsx)(s.EY,{textStyle:"body.mediumParagraph",children:(0,r.jsx)(o.A,{id:"abbr.wc"})})]}),(0,r.jsxs)(i.so,{mb:"sm",gap:"md",children:[(0,r.jsx)(l.J,{position:"relative",mt:"2xs",seed:"LL",colorless:t}),(0,r.jsx)(s.EY,{textStyle:"body.mediumParagraph",children:(0,r.jsx)(o.A,{id:"abbr.ll"})})]}),(0,r.jsxs)(i.so,{mb:"sm",gap:"md",children:[(0,r.jsx)(l.J,{position:"relative",mt:"2xs",seed:"PR",colorless:t}),(0,r.jsx)(s.EY,{textStyle:"body.mediumParagraph",children:(0,r.jsx)(o.A,{id:"abbr.pr"})})]}),(0,r.jsxs)(i.so,{mb:"sm",gap:"md",children:[(0,r.jsx)(l.J,{position:"relative",mt:"2xs",seed:"Q",colorless:t}),(0,r.jsx)(s.EY,{textStyle:"body.mediumParagraph",children:(0,r.jsx)(o.A,{id:"abbr.qp"})})]}),(0,r.jsxs)(i.so,{mb:"sm",gap:"md",children:[(0,r.jsx)(l.J,{position:"relative",mt:"2xs",seed:"A",colorless:t}),(0,r.jsx)(s.EY,{textStyle:"body.mediumParagraph",children:(0,r.jsx)(o.A,{id:"abbr.a"})})]}),(0,r.jsxs)(i.so,{mb:"sm",gap:"md",children:[(0,r.jsx)(l.J,{position:"relative",mt:"2xs",seed:"SE",colorless:t}),(0,r.jsx)(s.EY,{textStyle:"body.mediumParagraph",children:(0,r.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,r.jsx)(r.Fragment,{children:d[t]}):(0,r.jsx)(a.rC,{roundName:t})}var p=n(21377),h=n(947),m=n(31844),x=n(19451),f=n(26331),v=n(73088),g=n(30479);let b=e=>{let{uniqueTournamentId:t,seasonId:n,cupTree:s,sport:l,categorySlug:a,uniqueTournamentSlug:c}=e,d=(0,h.A)(),u=(0,f.A)(),b=s.rounds.length,j=(()=>{switch(b){case 1:return 250;case 2:return 278;case 4:return 466;default:return 642}})(),y=s.id,k=s.name,w=(0,x.vf)(d.locale),S="".concat(p.yuv).concat(w?"/".concat(w):"","/embed/unique-tournament/").concat(t,"/season/").concat(n,"/cuptree/").concat(y),R="sofa-cupTree-embed-".concat(t,"-").concat(n,"-").concat(y),P="height:".concat(j+2+16+48+16+148,"px!important;max-width:700px!important;width:100%!important;"),T=(0,p.Lo9)(v.z.getTranslatedRoute(u,"uniqueTournament",{sport:l,category:a,tournament:c,id:t},(0,g.HL)({id:n})).route,{isApiRoute:!1}),I=d.formatMessage({id:"cupTree.embed.backLink"},{linkToSofascore:'Sofascore')}),E='\n
\n ').concat(I,"\n
");return(0,r.jsx)(i.az,{px:"sm",pb:"sm",children:(0,r.jsx)(m.C,{px:"0",callToAction:(0,r.jsx)(o.A,{id:"bracket_embed"}),embedString:E})})};var j=n(48683),y=n(55729),k=n(6354),w=n(20336),S=n(79154);let R={};var P=n(54409),T=n(54053);function I(){let[e,t]=(0,y.useState)(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.az,{h:"xl",w:"xl",onClick:()=>t(!0),cursor:"pointer",children:(0,r.jsx)(P.G_L,{fill:"onSurface.nLv1"})}),(0,r.jsx)(T.A,{isOpen:e,setIsOpen:t,header:"tennis_seedings_title",children:(0,r.jsx)(i.az,{px:"lg",pt:"sm",maxW:{md:"[328px]"},children:(0,r.jsx)(c,{})})})]})}function E(e){let{id:t,name:n,sport:s,phaseSelector:o}=e,l=s===p.QCR.Tennis,a=function(e,t){let{uniqueTournamentId:n,uniqueTournamentName:r}=(0,y.useContext)(k.O),s=(0,h.A)();if(R[t])return R[t];let i=s.formatMessage({id:e||"tournament.cupTree"});if(!n||!r||!(n in S))return R[t]=i,i;let o=s.formatMessage({id:S[n]}),l=(0,w.t)(e,p.QCR.Football,s);return(l=l.replace(new RegExp("\\b".concat(r,"\\b")),o))===e?(R[t]=i,i):(R[t]=l,l)}(n,t),c=(0,r.jsx)(i.az,{position:"relative",h:"2xl",children:(0,r.jsxs)(i.so,{align:"center",gap:"sm",position:"absolute",right:"-xs",top:"0",children:[o,l&&(0,r.jsx)(I,{})]})});return(0,r.jsx)(j.Zp.Header,{variant:"left-aligned-desktop",title:(0,r.jsx)("bdi",{children:a}),actionComponent:c})}function D(){return(0,r.jsx)(i.so,{className:"cupTree-instruction-snackbar",position:"absolute",justify:"center",top:"[112px]",left:"0",w:"100%",children:(0,r.jsxs)(i.so,{align:"center",bg:"surface.t",px:"lg",py:"md",br:"lg",h:"4xl",children:[(0,r.jsx)(P.fRW,{fill:"surface.s1"}),(0,r.jsx)(s.EY,{ml:"md",textStyle:"body.medium",color:"surface.s1",children:(0,r.jsx)(o.A,{id:"bracket_zoom_snackbar"})})]})})}var C=n(494),B=n(22648),L=n(89489),A=n(95211);function H(e){let[t,n]=(0,y.useState)(!1),{block:s}=e,l=(0,C.wA)(),a=(0,C.d4)(e=>s.events?s.events.map(t=>e.favorites.events[t]).filter(Boolean):[]);async function c(){try{if(s.events&&a.lengthp.nk6.fetchEvent(e)))).map(e=>{let{event:t}=e;return t});l((0,L.oU)(e)),n(!1)}}catch(e){n(!1)}}return(0,y.useEffect)(()=>{c()},[s.blockId,s.events]),(0,r.jsx)(i.az,{children:t?(0,r.jsx)(B.a,{}):a.length?(0,r.jsx)(r.Fragment,{children:a.map(e=>(0,r.jsx)("div",{children:(0,r.jsx)(A.n6,{event:e,isNarrow:!0,isShort:!0,isShortDate:!0,children:null})},e.id))}):(0,r.jsx)(o.A,{id:"basic.noEvents",defaultMessage:"No events"})})}var _=n(31710),z=n(99064),F=n(41735),V=n(94497),Y=n(62827),M=n(48686);function N(){let e=(0,_._)(["\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 N=function(){return e},e}let q=(0,F.default)(z.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,Y.UR)("-".concat(M.Dh+4,"px"),"unset"),(0,Y.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,Y.UR)("".concat(M.ut,"px solid ").concat(e.theme.colors.surface.s1),"unset"),e=>(0,Y.UR)("unset","".concat(M.ut,"px solid ").concat(e.theme.colors.surface.s1)),V.qG,(0,Y.UR)("-".concat(M.Dh+4,"px"),"unset"),(0,Y.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,Y.UR)("".concat(M.ut,"px solid ").concat(e.theme.colors.surface.s1),"unset"),e=>(0,Y.UR)("unset","".concat(M.ut,"px solid ").concat(e.theme.colors.surface.s1)),V.qG,(0,Y.UR)("-".concat(M.Dh+4,"px"),"unset"),(0,Y.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,Y.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,Y.UR)("unset","".concat(M.ut,"px dashed ").concat(e.theme.colors.surface.s1)),V.qG,e=>e.theme.breakpoints.query.mdMin(N(),e.theme.colors.surface.s2)),Q=(0,F.default)(z.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;"),U=(0,F.default)(z.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 W=n(65078),G=n(13266);let X=e=>{let{events:t,children:n}=e,s=(0,f.A)(),i=async e=>{e.preventDefault();let n=null==t?void 0:t[0];if(!n||(null==t?void 0:t.length)>1)return;let{event:r}=await p.nk6.fetchEvent(n);(0,G.zw)(s,"event",{id:r.customId,name:r.slug,sport:r.tournament.category.sport.slug})};return(0,r.jsx)("a",{href:"#",onClick:i,children:n})};var J=n(33144),O=n(94604),K=n(85986);let Z=(0,n(62042).Fj)({variants:{variant:{default:{color:"neutrals.nLv1"},secondary:{color:"neutrals.nLv3"},live:{color:"status.live"},success:{color:"secondary.default"}}},defaultVariants:{variant:"default"}}),$=(0,i.I4)("span",Z),ee=(0,i.I4)("bdi",Z),et="cupTreeHighlight-team",en=()=>(0,r.jsx)(i.az,{px:"sm",br:"sm",bg:"secondary.highlight",h:"md",w:"2xl",children:(0,r.jsx)(s.EY,{textStyle:"assistive.micro",color:"secondary.default",verticalAlign:"top",children:"BYE"})}),er=(0,y.memo)(function(e){var t,n;let{participant:s,seed:a,nameColor:c,scoreColor:d,score:u,isFirst:p,isNewEntrant:h,isEmptyBlock:m}=e,{showSingleParticipantByeBlocks:x}=(0,K.B)(),f=(null==s||null==(t=s.team)?void 0:t.id)||0,v=(null==(n=document)?void 0:n.dir)==="rtl",g=x&&(null==s?void 0:s.team)===void 0&&!m;return(0,r.jsxs)(i.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(et,"-").concat(f):"",borderStartStartRadius:v?p&&u?"sm":void 0:p?"sm":void 0,borderStartEndRadius:v?p?"sm":void 0:p&&u?"sm":void 0,borderEndEndRadius:v?p?void 0:"sm":p||!u?void 0:"sm",borderEndStartRadius:v?p||!u?void 0:"sm":p?void 0:"sm",children:[(0,r.jsxs)(i.so,{w:"100%",align:"center",overflowX:"clip",h:"xl",children:[(0,r.jsx)(i.az,{position:"relative",children:g?(0,r.jsx)(i.az,{w:"xl",h:"xl"}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(J.p,{id:f,name:null==s?void 0:s.team.name,size:24,style:{verticalAlign:"top"}}),(0,r.jsx)(l.J,{seed:a,right:"[0px]",bottom:"-xs",h:"md",textStyle:"assistive.micro"})]})}),(0,r.jsx)(ee,{ml:"sm",variant:c,textStyle:"body.medium",truncate:!0,maxW:{mdDown:"[124px]",md:"[180px]"},children:g?(0,r.jsx)(en,{}):(null==s?void 0:s.team)?(0,r.jsxs)(r.Fragment,{children:[h&&(0,r.jsx)(P.UPF,{fill:"playoffs.promotionToX",w:"16",h:"16",mr:"xs",mt:"-1",style:{transform:v?"rotate(-90deg)":"rotate(90deg)",verticalAlign:"middle"}}),(0,r.jsx)(O.Rm,{team:s.team,short:!0})]}):(0,r.jsx)(o.A,{id:"label_to_be_determined",defaultMessage:"TBD"})})]}),u&&(0,r.jsx)($,{style:{whiteSpace:"nowrap"},variant:d,children:u})]})});var es=n(4967),ei=n(90510);let eo=e=>{let{seriesStartDateTimestamp:t,isLive:n}=e,i=1e3*t,l=(0,es.cK)(i)||(0,es.ef)(i);return(0,r.jsx)(s.EY,{textStyle:"assistive.default",textAlign:"end",display:"block",pr:"sm",minW:"[52px]",color:n?"status.live":"neutrals.nLv3",children:n?(0,r.jsx)(o.A,{id:"inProgress"}):(0,r.jsxs)(r.Fragment,{children:[l?(0,r.jsx)(o.A,{id:(0,es.cK)(i)?"today":"tomorrow"}):(0,r.jsx)(ei.XU,{day:"numeric",month:"short",value:i}),(0,r.jsx)("br",{}),(0,r.jsx)(ei.ib,{value:i})]})})},el=e=>{let{isRetired:t,isWalkover:n}=e;return(0,r.jsx)(s.EY,{textStyle:"assistive.default",display:"block",color:"neutrals.nLv3",px:"sm",truncate:!0,children:(0,r.jsx)(o.A,{id:n?"walkover":t?"retired":""})})},ea=e=>{let{isFinals:t}=e;return(0,r.jsx)(i.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,r.jsx)(s.EY,{textStyle:"assistive.micro",color:"surface.s1",px:"md",display:"block",children:(0,r.jsx)(o.A,{id:t?"final":"3rdPlace"})})})};var ec=n(70305);let ed=e=>{let t=e.querySelector(".cuptree-round-descriptions"),n=null==t?void 0:t.style.transform.match(/scaleX\(([^)]+)\)/),r=1;return n&&n[1]&&(r=+n[1]),r};function eu(e){var t,n,o;let{block:l,highlights:a,selectedRoundIndex:c}=e,d=(0,W.g3)(),{rounds:u,sourceTreeId:p,phaseFilter:h,entrantsPerRound:m}=(0,K.B)(),x=(0,y.useRef)(null),f=(0,y.useRef)(null),v=(0,y.useRef)(null),g=d?l.participants[1]:l.participants[0],b=null==g?void 0:g.teamSeed,j=d?l.awayTeamScore:l.homeTeamScore,k=d?l.participants[0]:l.participants[1],w=null==k?void 0:k.teamSeed,S=d?l.homeTeamScore:l.awayTeamScore,R=(0,ec.Fx)({firstParticipant:g,secondParticipant:k,block:l}),T=(0,ec.r9)(R),I=(R.hasScore||R.isLive)&&!R.isSpecial,E=!!l.seriesStartDateTimestamp&&!I&&!R.isSpecial;(0,y.useLayoutEffect)(()=>{if(!e.is3rdPlace)return setTimeout(()=>{!function(){var t;let n="rtl"===document.dir,r=document.querySelector('[data-tree-id="'.concat(p,'"]'))||document;if(!r)return;let s=ed(r),i=(null==g?void 0:g.sourceBlockId)?r.querySelector('[data-blockId="'.concat(null==g?void 0:g.sourceBlockId,'"][data-level="').concat((e.level||0)+1,'"]')):r.querySelector('[data-order="'.concat(2*(l.order||1)-1,'"][data-level="').concat((e.level||0)+1,'"]')),o=(null==k?void 0:k.sourceBlockId)?r.querySelector('[data-blockId="'.concat(null==k?void 0:k.sourceBlockId,'"][data-level="').concat((e.level||0)+1,'"]')):r.querySelector('[data-order="'.concat(2*(l.order||1),'"][data-level="').concat((e.level||0)+1,'"]')),a=null==(t=x.current)?void 0:t.getBoundingClientRect(),c=null==i?void 0:i.getBoundingClientRect(),d=null==o?void 0:o.getBoundingClientRect();if(a){if(c){let t=Math.abs(a.top-c.top)/s;f.current&&(l.participantDraw?f.current.classList.add("connector-left-participant-draw","edge-"+(e.edge||"none"),"arrangement-"+(e.arrangement||"none")):f.current.classList.add("connector-left"),n?f.current.style.right="-".concat(2*M.Dh,"px"):f.current.style.left="-".concat(2*M.Dh,"px"),f.current.style.width="".concat(M.Dh,"px"),f.current.style.top=-t+M.Gj+"px",f.current.style.height=t+M.ut+"px")}if(d){let t=Math.abs(d.top-a.top)/s;v.current&&(l.participantDraw?v.current.classList.add("connector-right-participant-draw","edge-"+(e.edge||"none"),"arrangement-"+(e.arrangement||"none")):v.current.classList.add("connector-right"),n?v.current.style.right="-".concat(2*M.Dh,"px"):v.current.style.left="-".concat(2*M.Dh,"px"),v.current.style.width="".concat(M.Dh,"px"),v.current.style.bottom=-t+M.Gj+"px",v.current.style.height=t+M.ut+"px")}if(l.participantDraw&&"left"===e.edge){let t=document.querySelectorAll('[data-level="'.concat((e.level||0)+1,'"]')),n=t[0],r=t[t.length-1];if(n&&r){let e=n.getBoundingClientRect(),t=r.getBoundingClientRect(),i=Math.abs(e.top-t.top)/s;n.setAttribute("style","--participant-connector-height:".concat(i,"px")),n.classList.add("participant-connector")}}}}()},200),()=>{var e,t;null==(e=f.current)||e.classList.remove("connector-left"),null==(t=v.current)||t.classList.remove("connector-right")}},[c,h]);let D=l.venue&&!g&&!k,C=!g&&!k;return(0,r.jsxs)(q,{ref:x,"data-blockId":l.blockId,"data-order":l.order,"data-level":e.level,"data-leftBlockId":null==g?void 0:g.sourceBlockId,"data-rightBlockId":null==k?void 0:k.sourceBlockId,position:"relative",onMouseEnter:()=>{var e,t;return a.set([null==g||null==(e=g.team)?void 0:e.id,null==k||null==(t=k.team)?void 0:t.id])},onMouseLeave:a.clear,children:[(0,r.jsx)(i.az,{position:"absolute",top:"[36px]",left:"0",ref:f,pointerEvents:"none"}),(0,r.jsx)(i.az,{position:"absolute",left:"0",ref:v,pointerEvents:"none"}),(0,r.jsx)(X,{events:l.events,children:(0,r.jsxs)(i.so,{position:"relative",bg:{mdDown:"surface.s1",md:"surface.s2"},br:"sm",cursor:(null==(t=l.events)?void 0:t.length)>0?"pointer":"default",align:"center",justify:"space-between",className:"cup-tree-block",elevation:{mdDown:"2"},children:[(0,r.jsx)(i.az,{flexGrow:1,overflow:"hidden",h:"[68px]",children:D?(0,r.jsxs)(i.so,{pl:"md",h:"100%",align:"center",children:[(0,r.jsx)(i.az,{w:"xl",h:"xl",mr:"sm",children:(0,r.jsx)(P.EGm,{w:"24",h:"24",fill:"onSurface.nLv1"})}),(0,r.jsxs)(i.az,{children:[(0,r.jsx)(s.EY,{maxW:"[148px]",truncate:!0,display:"block",children:null==(n=l.venue)?void 0:n.name}),(0,r.jsx)(s.EY,{color:"neutrals.nLv3",textStyle:"assistive.default",display:"block",children:null==(o=l.venue)?void 0:o.city.name})]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(er,{participant:g,seed:b,nameColor:T.firstParticipantName,scoreColor:T.firstParticipantScore,score:I?j||"-":void 0,isEmptyBlock:C,isNewEntrant:(0,ec.d_)(g,u.length-(e.level||0)-1,m),isFirst:!0}),(0,r.jsx)(er,{participant:k,seed:w,nameColor:T.secondParticipantName,scoreColor:T.secondParticipantScore,score:I?S||"-":void 0,isEmptyBlock:C,isNewEntrant:(0,ec.d_)(k,u.length-(e.level||0)-1,m)})]})}),(e.isFinals||e.is3rdPlace)&&(0,r.jsx)(ea,{isFinals:e.isFinals}),R.isSpecial?(0,r.jsx)(el,{isRetired:R.isRetired,isWalkover:R.isWalkover}):E?(0,r.jsx)(eo,{isLive:R.isLive,seriesStartDateTimestamp:l.seriesStartDateTimestamp}):null]})})]})}function ep(e){var t;let{thirdPlaceBlock:n,...s}=e,o=s.block.events.length>1,[l,a]=(0,y.useState)(!1),{showSingleParticipantByeBlocks:c,rounds:d}=(0,K.B)(),u=0===s.level&&!s.isRelegationDecider&&(null==(t=d[d.length-1])?void 0:t.type)===p.FFH.Finals,h=c?0===s.block.participants.length:s.block.participants.length<2;return s.ancestorHasParticipants&&h&&!s.block.venue&&!s.block.seriesStartDateTimestamp||s.block.isHidden?null:(0,r.jsxs)(Q,{w:s.isVisibleRound?s.columnWidth:0,h:78*!!s.isVisibleRound,isVisibleRound:s.isVisibleRound,position:"relative",role:"button",onClick:e=>{e.stopPropagation(),a(!0)},children:[(0,r.jsx)(eu,{...s,withLink:!o,isFinals:!s.is3rdPlace&&u,is3rdPlace:s.is3rdPlace}),o&&(0,r.jsx)(T.A,{isOpen:l,setIsOpen:a,header:"tournament.series",children:(0,r.jsx)(i.az,{px:"lg",pt:"sm",maxW:{md:"[360px]"},children:(0,r.jsx)(H,{...s})})}),u&&n&&(0,r.jsx)(i.az,{w:"100%",position:"absolute",bottom:"-2xl",left:"[0px]",transform:"translateY(100%)",children:(0,r.jsx)(ep,{...s,block:n,is3rdPlace:!0})})]})}let eh=e=>{let{status:t,colors:n,block:i}=e,l=i.homeTeamScore&&i.homeTeamScore.length>5||i.awayTeamScore&&i.awayTeamScore.length>5;return t.isWalkover?(0,r.jsx)(s.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",mt:"xs",children:(0,r.jsx)(o.A,{id:"walkover"})}):t.isRetired?(0,r.jsx)(s.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",mt:"xs",children:(0,r.jsx)(o.A,{id:"retired"})}):t.hasScore?(0,r.jsxs)(s.EY,{textAlign:"center",mt:"xs",style:{whiteSpace:"nowrap"},children:[(0,r.jsx)($,{textStyle:l?"body.small":"body.large",variant:n.firstParticipantScore,children:i.homeTeamScore.replace(" ","")})," : ",(0,r.jsx)($,{textStyle:l?"body.small":"body.large",variant:n.secondParticipantScore,children:i.awayTeamScore.replace(" ","")})]}):t.hasStartTime?(0,r.jsx)(s.EY,{textStyle:"assistive.default",color:t.isLive?"status.live":"neutrals.nLv3",mt:"xs",children:(0,es.cK)(1e3*i.seriesStartDateTimestamp)?(0,r.jsx)(ei.ib,{value:1e3*i.seriesStartDateTimestamp}):(0,r.jsx)(ei.XU,{day:"numeric",month:"short",value:1e3*i.seriesStartDateTimestamp})}):null};function em(e){var t,n,a;let{block:c,hideTopConnector:d,hideBottomConnector:u,inCard:p}=e,[h,m]=(0,y.useState)(!1),x=c.participants[0],f=c.participants[1],v=(0,ec.Fx)({firstParticipant:x,secondParticipant:f,block:c}),g=(0,ec.r9)(v);return(0,r.jsxs)(X,{events:c.events,children:[(0,r.jsxs)(U,{align:"center",justify:"center",bg:p?"surface.s2":"surface.s1",elevation:2,hideTopConnector:d,hideBottomConnector:u,inCard:p,role:"button",onClick:e=>{var t;((null==(t=c.events)?void 0:t.length)||0)>1&&(e.preventDefault(),e.stopPropagation(),m(!0))},children:[(0,r.jsxs)(i.so,{align:"center",justify:"center",children:[(0,r.jsxs)(i.so,{mx:"xs",w:"1/2",direction:"column",justify:"center",align:"center",textAlign:"center",position:"relative",children:[(0,r.jsx)(J.p,{id:null==x||null==(t=x.team)?void 0:t.id,size:28}),(null==x?void 0:x.team)?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.J,{seed:x.teamSeed,bottom:"lg",h:"md",textStyle:"assistive.micro"}),(0,r.jsx)($,{mt:"xs",textStyle:"assistive.default",variant:g.firstParticipantName,children:x.team.nameCode||x.team.name.slice(0,3)})]}):(0,r.jsx)(s.EY,{textTransform:"uppercase",mt:"xs",textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,r.jsx)(o.A,{id:"label_to_be_determined",defaultMessage:"TBD"})})]}),(0,r.jsxs)(i.so,{mx:"xs",w:"1/2",direction:"column",justify:"center",align:"center",textAlign:"center",position:"relative",children:[(0,r.jsx)(J.p,{id:null==f||null==(n=f.team)?void 0:n.id,size:28}),(null==f?void 0:f.team)?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.J,{seed:f.teamSeed,bottom:"lg",h:"md",textStyle:"assistive.micro"}),(0,r.jsx)($,{mt:"xs",textStyle:"assistive.default",variant:g.secondParticipantName,children:f.team.nameCode||f.team.name.slice(0,3)})]}):(0,r.jsx)(s.EY,{textTransform:"uppercase",mt:"xs",textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,r.jsx)(o.A,{id:"label_to_be_determined",defaultMessage:"TBD"})})]})]}),(0,r.jsx)(eh,{block:c,colors:g,status:v})]}),((null==(a=c.events)?void 0:a.length)||0)>1&&(0,r.jsx)(T.A,{isOpen:h,setIsOpen:m,header:"tournament.series",children:(0,r.jsx)(i.so,{px:"lg",pt:"sm",direction:"column",maxW:{md:"[360px]"},children:(0,r.jsx)(H,{block:c})})})]})}var ex=n(59721);function ef(){let{tournamentId:e}=(0,K.B)();return(0,r.jsxs)(i.az,{position:"absolute",top:"[calc(50% - 28px)]",right:"[-42px]",children:[(0,r.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,r.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,r.jsx)("path",{d:"M16.9 44.9V49.9L11.9 49.9V54H43V52.0001L39 52V45L16.9 44.9Z",fill:"#374DF5"}),(0,r.jsx)("rect",{x:"20",y:"10",width:"16",height:"16",fill:"url(#pattern0_2354_307)"}),(0,r.jsx)("defs",{children:(0,r.jsx)("pattern",{id:"pattern0_2354_307",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:(0,r.jsx)("use",{xlinkHref:"#image0_2354_307",transform:"scale(0.015625)"})})})]}),(0,r.jsx)(ex.e,{id:e,size:16,style:{position:"absolute",top:8,left:20}})]})}var ev=function(e){return e.Left="left",e.Right="right",e.Inner="inner",e}({});function eg(e){let{tree:t,initialOrientation:n="top",inCard:s}=e;if(!t)return null;let o=t.left||t.right;return(0,r.jsxs)(i.so,{flexGrow:1,flexShrink:1,direction:"top"===n?"column":"column-reverse",children:[(0,r.jsxs)(i.so,{children:[(0,r.jsx)(eg,{tree:t.left,initialOrientation:n,inCard:s}),(0,r.jsx)(eg,{tree:t.right,initialOrientation:n,inCard:s})]}),(0,r.jsxs)(i.so,{justify:"center",position:"relative",children:[o&&(0,r.jsx)(i.az,{position:"absolute",borderTopColor:s?"surface.s2":"surface.s1",borderTopWidth:"4px",borderTopStyle:"solid",w:"[calc(50% + 4px)]",left:"[calc(25% - 2px)]",top:"top"===n?"-2xs":"[calc(100% - 2px)]"}),(0,r.jsx)(em,{block:t,hideTopConnector:!o&&"top"===n,hideBottomConnector:!o&&"bottom"===n,inCard:s})]})]})}let eb=(0,y.memo)(function e(t){var n;let{selectedRoundIndex:s}=t,{tree:o,level:l=0,depth:a}=t,{rounds:c}=(0,K.B)(),d=a-l-1,u=void 0===s||s===d||s-1===d||s+1===d;if(!o)return null;let h=t.ancestorHasParticipants||!o.isHidden&&o.participants.length>0,{left:m,right:x,...f}=o,v=!t.isRelegationDecider&&0===l&&(null==(n=c[c.length-1])?void 0:n.type)===p.FFH.Finals&&f.finished;return(0,r.jsxs)(i.so,{flexGrow:1,flexShrink:1,flexBasis:"[1px]",justify:"flex-end",children:[(m||x)&&(0,r.jsxs)(i.az,{position:"relative",children:[(0,r.jsx)(e,{...t,ancestorHasParticipants:h,level:l+1,tree:m,arrangement:"left",edge:t.edge===ev.Inner||t.edge===ev.Right?ev.Inner:ev.Left}),(0,r.jsx)(e,{...t,ancestorHasParticipants:h,level:l+1,tree:x,arrangement:"right",edge:t.edge===ev.Inner||t.edge===ev.Left?ev.Inner:ev.Right})]}),(0,r.jsxs)(i.so,{position:"relative",direction:"column",justify:"space-around",children:[v&&u&&(0,r.jsx)(ef,{}),(0,r.jsx)(ep,{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:s,columnWidth:t.columnWidth},f.blockId||"".concat(l,"-").concat(t.depth,"-").concat(f.order))]})]})});function ej(e){let{onZoomIn:t,onZoomOut:n}=e;return(0,r.jsxs)(i.so,{dir:"ltr",direction:"column",position:"absolute",top:"[64px]",right:"xl",gap:"2xs",children:[(0,r.jsx)(s.K0,{size:"primary",onClick:t,children:(0,r.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 11H13V4H11V11H4V13H11V20H13V13H20V11Z",fill:"var(--surface-s1)"})})}),(0,r.jsx)(s.K0,{size:"primary",onClick:n,children:(0,r.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 11H13H11H4V13H11H13H20V11Z",fill:"var(--surface-s1)"})})})]})}function ey(e){let{x:t,scale:n,roundNames:o}=e,l=(0,y.useMemo)(()=>n>0?1/n:1,[n]),{sport:c}=(0,K.B)();return(0,r.jsx)(i.so,{gap:"3xl",px:"lg",transformOrigin:{base:"0px 0px 0px",_rtl:"top right 0px"},style:{transform:"translateX(".concat(t,"px) scaleX(").concat(n,")")},className:"cuptree-round-descriptions",children:o.map((e,t)=>(0,r.jsx)(i.az,{h:"4xl",py:"lg",flexGrow:0,flexShrink:0,flexBasis:"[260px]",overflowClipMargin:10,overflowX:"clip",children:(0,r.jsx)(s.EY,{display:"block",textStyle:"table.medium",textAlign:"center",style:{transformOrigin:"50% 50%",transform:"scaleX(".concat(l,")")},children:n<.3?(0,r.jsx)(u,{roundName:e}):(0,r.jsx)(a.rC,{roundName:e,sport:c})})},e+t))})}function ek(e){let{onChange:t}=e,[n,s]=(0,y.useState)([]),i=(0,F.useTheme)();return(0,y.useEffect)(()=>(t.push(e=>{s(e)}),()=>{t.pop()}),[]),(0,r.jsx)("style",{children:n.map(e=>"\n .".concat(et,"-").concat(e," { background: ").concat(i.colors.neutral.highlight,"; }\n .").concat(et,"-").concat(e,":hover { background: ").concat(i.colors.neutral.highlight,"; }\n "))})}function ew(){let e="rtl"===document.dir;return(0,r.jsxs)(i.az,{px:"sm",py:"md",children:[(0,r.jsx)(P.UPF,{fill:"playoffs.promotionToX",w:"24",h:"24",mr:"xs",mt:"-1",style:{transform:e?"rotate(-90deg)":"rotate(90deg)",verticalAlign:"middle"}}),(0,r.jsx)(s.EY,{ml:"xs",textStyle:"assistive.default",children:(0,r.jsx)(o.A,{id:"bracket_bye_explainer",defaultMessage:"Bye - automatic advancement"})})]})}},85986:(e,t,n)=>{n.d(t,{B:()=>l,J:()=>o});var r=n(6029),s=n(55729);let i=(0,s.createContext)(void 0),o=e=>{let{children:t,...n}=e;return(0,r.jsx)(i.Provider,{value:n,children:t})},l=()=>{let e=(0,s.useContext)(i);if(void 0===e)throw Error("useCupTreeContext must be used within a CupTreeProvider");return e}},95195:(e,t,n)=>{n.d(t,{Q:()=>i});var r=n(21377),s=n(45860);function i(e,t){let{data:n,error:i,isLoading:o}=(0,s.Ay)(r.V3t.cupTrees(e,t));return i?[void 0,o]:[null==n?void 0:n.cupTrees,o]}}}]);