!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]="8ab750e5-5422-4c84-841e-53a2f6630d88",e._sentryDebugIdIdentifier="sentry-dbid-8ab750e5-5422-4c84-841e-53a2f6630d88")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4824],{189:(e,t,n)=>{n.d(t,{r9:()=>s,Fx:()=>l,BE:()=>j,aQ:()=>a,ov:()=>c,KA:()=>k,bs:()=>d,d_:()=>y,TI:()=>function e(t,n,r,s,o,l){var a,c,d,u,m,f,g;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=i()(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 i=p()(t),s=r;for(;s>=0&&!i.rounds[s].blocks.some(e=>e.participants.length>0);)i.rounds.pop(),s--;return e(i,n,null)}let s={...t.rounds[r].blocks[0]};s.roundIndex=r,s.participantDraw=t.rounds[r].participantDraw,2===t.rounds[r].blocks.length&&(s.thirdPlaceBlock={...t.rounds[r].blocks[1],roundIndex:r});let o=s.order||1,l=h(t)&&x(t);return s.left=e(t,n,null==(a=s.participants[0])?void 0:a.sourceBlockId,r-1,2*o-1,l),s.right=e(t,n,null==(c=s.participants[1])?void 0:c.sourceBlockId,r-1,2*o,l),s}}if("number"==typeof s){let i;if((i=l&&void 0!==r?null==(d=t.rounds[s])?void 0:d.blocks.find(e=>e.blockId===r):null==(u=t.rounds[s])?void 0:u.blocks.find(e=>e.order===o))&&i.blockId>0){let r=i.order||1;return(i.participantDraw=null==(m=t.rounds[s])?void 0:m.participantDraw,0===i.participants.length||2===i.participants.length)?{...i,roundIndex:s,left:e(t,n,null==(f=i.participants[0])?void 0:f.sourceBlockId,s-1,2*r-1,l),right:e(t,n,null==(g=i.participants[1])?void 0:g.sourceBlockId,s-1,2*r,l)}:{...i,roundIndex:s,left:e(t,n,void 0,s-1,2*r-1,l),right:e(t,n,void 0,s-1,2*r,l)}}}},y6:()=>function e(t){return t?Math.max(e(t.left),e(t.right))+1:0},o$:()=>b,P4:()=>f});var r=n(9922),i=n.n(r);let s=e=>{let{hasWinner:t,isFirstParticipantWinner:n,isSecondParticipantWinner:r,isLive:i,isSeriesInProgress:s}=e;return i?{firstParticipantName:"live",secondParticipantName:"live",firstParticipantScore:"live",secondParticipantScore:"live"}:{firstParticipantName:!t||n?"default":"secondary",secondParticipantName:!t||r?"default":"secondary",firstParticipantScore:s?"success":n?"default":"secondary",secondParticipantScore:s?"success":r?"default":"secondary"}};var o=n(21377);let l=e=>{let{firstParticipant:t,secondParticipant:n,block:r}=e,i=r.result===o.pq_.Walkover,s=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:s,isWalkover:i,isSpecial:s||i,isFirstParticipantWinner:l,isSecondParticipantWinner:a,hasWinner:l||a,hasScore:!!r.homeTeamScore&&!!r.awayTeamScore,hasStartTime:!!r.seriesStartDateTimestamp}},a=e=>{let t=[];return(e.forEach((e,n)=>{/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(n)}),t.length===e.length)?[]:t};function c(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 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=n(932),p=n.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 n=0;ne.rounds.some(e=>e.blocks.some(e=>e.participants.some(e=>e.sourceBlockId))),m=e=>/qualif|preliminary/i.test(e),f=(e,t)=>{let n,r=t||e.rounds;if(e.currentRound){var i;n=(null==(i=r[e.currentRound-1])?void 0:i.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 s=e.rounds.filter(e=>!m(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))};var g=n(831),v=n.n(g);function b(e){let t=v()(e.rounds,"type");return{...e,rounds:t.map(e=>({...e,blocks:v()(e.blocks,e=>{if(e.participants&&e.participants.length){var t,n;return null==(n=e.participants[0])||null==(t=n.team)?void 0:t.id}return e.blockId})}))}}function j(e){let t=[];return e.forEach((e,n)=>{let r=new Set;e.blocks.forEach(e=>{e.participants.forEach(n=>{var i;if((null==n||null==(i=n.team)?void 0:i.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 y(e,t,n){if(0===t)return!1;let r=null==n?void 0:n[t];if(r){var i;if((null==e||null==(i=e.team)?void 0:i.id)&&r.has(e.team.id))return!0}return!1}function k(e){return!!e&&e.some((e,t)=>t>0&&e.size>0)}},48686:(e,t,n)=>{n.d(t,{AK:()=>s,Dh:()=>r,GA:()=>u,Gj:()=>l,IT:()=>c,XV:()=>a,Yv:()=>i,ut:()=>o,zi:()=>d});let r=20,i=.2,s=1.5,o=4,l=32,a=658,c=880,d=80,u=16},53214:(e,t,n)=>{n.d(t,{eo:()=>ew,b8:()=>ex,fT:()=>k,Y9:()=>A,eS:()=>ek,_4:()=>L,Vr:()=>eb,b2:()=>x,Cq:()=>ey,o0:()=>I,Xs:()=>ef,Bg:()=>ev,Dg:()=>ej});var r=n(6029),i=n(95083),s=n(76356),o=n(41249),l=n(55729),a=n(90248),c=n(54409),d=n(68379),u=n(47530);let p=e=>{let{isColorless:t}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(s.so,{mb:"sm",gap:"md",children:[(0,r.jsx)(d.J,{position:"relative",mt:"xxs",seed:1,colorless:t}),(0,r.jsx)(i.EY,{textStyle:"body.mediumParagraph",children:(0,r.jsx)(a.A,{id:"tennis_seeded_player"})})]}),(0,r.jsxs)(s.so,{mb:"sm",gap:"md",children:[(0,r.jsx)(d.J,{position:"relative",mt:"xxs",seed:"WC",colorless:t}),(0,r.jsx)(i.EY,{textStyle:"body.mediumParagraph",children:(0,r.jsx)(a.A,{id:"abbr.wc"})})]}),(0,r.jsxs)(s.so,{mb:"sm",gap:"md",children:[(0,r.jsx)(d.J,{position:"relative",mt:"xxs",seed:"LL",colorless:t}),(0,r.jsx)(i.EY,{textStyle:"body.mediumParagraph",children:(0,r.jsx)(a.A,{id:"abbr.ll"})})]}),(0,r.jsxs)(s.so,{mb:"sm",gap:"md",children:[(0,r.jsx)(d.J,{position:"relative",mt:"xxs",seed:"PR",colorless:t}),(0,r.jsx)(i.EY,{textStyle:"body.mediumParagraph",children:(0,r.jsx)(a.A,{id:"abbr.pr"})})]}),(0,r.jsxs)(s.so,{mb:"sm",gap:"md",children:[(0,r.jsx)(d.J,{position:"relative",mt:"xxs",seed:"Q",colorless:t}),(0,r.jsx)(i.EY,{textStyle:"body.mediumParagraph",children:(0,r.jsx)(a.A,{id:"abbr.qp"})})]}),(0,r.jsxs)(s.so,{mb:"sm",gap:"md",children:[(0,r.jsx)(d.J,{position:"relative",mt:"xxs",seed:"A",colorless:t}),(0,r.jsx)(i.EY,{textStyle:"body.mediumParagraph",children:(0,r.jsx)(a.A,{id:"abbr.a"})})]}),(0,r.jsxs)(s.so,{mb:"sm",gap:"md",children:[(0,r.jsx)(d.J,{position:"relative",mt:"xxs",seed:"SE",colorless:t}),(0,r.jsx)(i.EY,{textStyle:"body.mediumParagraph",children:(0,r.jsx)(a.A,{id:"abbr.se"})})]})]})},h={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 x(e){let{roundName:t}=e;return t in h?(0,r.jsx)(r.Fragment,{children:h[t]}):(0,r.jsx)(u.rC,{roundName:t})}var m=n(21377),f=n(947),g=n(79387),v=n(19451),b=n(26331),j=n(73088),y=n(30479);let k=e=>{let{uniqueTournamentId:t,seasonId:n,cupTree:i,sport:o,categorySlug:l,uniqueTournamentSlug:c}=e,d=(0,f.A)(),u=(0,b.A)(),p=i.rounds.length,h=(()=>{switch(p){case 1:return 250;case 2:return 278;case 4:return 466;default:return 642}})(),x=i.id,k=i.name,w=(0,v.vf)(d.locale),S="".concat(m.yuv).concat(w?"/".concat(w):"","/embed/unique-tournament/").concat(t,"/season/").concat(n,"/cuptree/").concat(x),R="sofa-cupTree-embed-".concat(t,"-").concat(n,"-").concat(x),T="height:".concat(h+2+16+48+16+148,"px!important;max-width:700px!important;width:100%!important;"),P=(0,m.Lo9)(j.z.getTranslatedRoute(u,"uniqueTournament",{sport:o,category:l,tournament:c,id:t},(0,y.HL)({id:n})).route,{isApiRoute:!1}),I=d.formatMessage({id:"cupTree.embed.backLink"},{linkToSofascore:'Sofascore')}),A='\n
\n ').concat(I,"\n
");return(0,r.jsx)(s.az,{px:"sm",pb:"sm",children:(0,r.jsx)(g.C,{px:"0px",callToAction:(0,r.jsx)(a.A,{id:"cupTree.embed.cta"}),embedString:A})})};var w=n(65789),S=n(6354),R=n(20336),T=n(79154);let P={};function I(){return(0,r.jsx)(o.AM,{trigger:(0,r.jsx)(o.AM.TriggerWrapper,{children:(0,r.jsx)(c.G_L,{minW:24,fill:"onSurface.nLv1"})}),closeOnOutsideClick:!0,children:(0,r.jsxs)(o.AM.Content,{position:"absolute",w:"320px",maxW:"calc(100vw - 48px)",right:"100%",elevation:3,children:[(0,r.jsx)(i.EY,{textStyle:"display.large",display:"block",my:"sm",children:(0,r.jsx)(a.A,{id:"tennis_seedings_title"})}),(0,r.jsx)(p,{})]})})}function A(e){let{id:t,name:n,sport:i,phaseSelector:o}=e,a=i===m.QCR.Tennis,c=function(e,t){let{uniqueTournamentId:n,uniqueTournamentName:r}=(0,l.useContext)(S.O),i=(0,f.A)();if(P[t])return P[t];let s=i.formatMessage({id:e||"tournament.cupTree"});if(!n||!r||!(n in T))return P[t]=s,s;let o=i.formatMessage({id:T[n]}),a=(0,R.t)(e,m.QCR.Football,i);return(a=a.replace(new RegExp("\\b".concat(r,"\\b")),o))===e?(P[t]=s,s):(P[t]=a,a)}(n,t),d=(0,r.jsxs)(s.so,{align:"center",gap:"sm",position:"absolute",right:"md",top:"md",children:[o,a&&(0,r.jsx)(I,{})]});return(0,r.jsx)(w.Zp.Header,{title:(0,r.jsx)("bdi",{children:c}),actionComponent:d})}function L(){return(0,r.jsx)(s.so,{className:"cupTree-instruction-snackbar",position:"absolute",justify:"center",top:"[112px]",left:"0",w:"100%",children:(0,r.jsxs)(s.so,{align:"center",bg:"surface.t",px:"lg",py:"md",br:"lg",h:"4xl",children:[(0,r.jsx)(c.fRW,{fill:"surface.s1"}),(0,r.jsx)(i.EY,{ml:"md",textStyle:"body.medium",color:"surface.s1",children:(0,r.jsx)(a.A,{id:"bracket_zoom_snackbar"})})]})})}var B=n(494),D=n(22648),E=n(89489),C=n(53486);function H(e){let[t,n]=(0,l.useState)(!1),o=e.block,c=(0,B.wA)(),d=(0,B.d4)(e=>o.events?o.events.map(t=>e.favorites.events[t]).filter(Boolean):[]);async function u(){try{if(o.events&&d.lengthm.nk6.fetchEvent(e)))).map(e=>{let{event:t}=e;return t});c((0,E.oU)(e)),n(!1)}}catch(e){n(!1)}}return(0,l.useEffect)(()=>{u()},[o.blockId,o.events]),(0,r.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,r.jsx)(D.a,{}):d.length?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.EY,{textAlign:"center",display:"block",p:"sm",textStyle:"display.small",children:(0,r.jsx)(a.A,{id:"tournament.series",defaultMessage:"Series"})}),d.map(e=>(0,r.jsx)("div",{onClick:e=>{e.stopPropagation()},children:(0,r.jsx)(C.n6,{event:e,isNarrow:!0,isShort:!0,isShortDate:!0,children:null})},e.id)),(0,r.jsx)(i.$n,{w:"100%",variant:"clear",onClick:t=>{t.stopPropagation(),e.close()},children:(0,r.jsx)(a.A,{id:"close_window_button",defaultMessage:"Close"})})]}):(0,r.jsx)(a.A,{id:"basic.noEvents",defaultMessage:"No events"})})}var _=n(31710),F=n(41735),V=n(94497),z=n(19168),M=n(48686);function Y(){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 Y=function(){return e},e}let N=(0,F.default)(o.az).withConfig({componentId:"sc-c33b2f52-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)(o.az).withConfig({componentId:"sc-c33b2f52-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)(o.so).withConfig({componentId:"sc-c33b2f52-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.theme.colors.surface.s1,M.zi,M.ut/2,M.GA,e=>e.hideTopConnector&&"display: none;",M.ut,e=>e.theme.colors.surface.s1,M.zi,M.ut/2,M.GA,e=>e.hideBottomConnector&&"display: none;");var U=n(65078),W=n(70591),G=n(33144),X=n(94604),J=n(84942),O=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"}}),K=(0,s.I4)("span",Z),$=(0,s.I4)("bdi",Z),ee="cupTreeHighlight-team",et=()=>(0,r.jsx)(s.az,{px:"sm",br:"sm",bg:"secondary.highlight",h:"md",w:"2xl",children:(0,r.jsx)(i.EY,{textStyle:"assistive.micro",color:"secondary.default",verticalAlign:"top",children:"BYE"})}),en=(0,l.memo)(function(e){var t,n;let{participant:i,seed:o,nameColor:l,scoreColor:u,score:p,isFirst:h,isNewEntrant:x}=e,m=(0,b.A)(),{showSingleParticipantByeBlocks:f}=(0,O.B)(),g=(null==i||null==(t=i.team)?void 0:t.id)||0,v=(null==i?void 0:i.team)?(0,J.s)(i.team,m,{short:!0}):void 0,j=(null==(n=document)?void 0:n.dir)==="rtl",y=f&&void 0===v;return(0,r.jsxs)(s.so,{h:"[34px]",pl:{lgDown:"sm",lg:"md"},pr:{mdDown:"sm",md:p?"sm":void 0,lg:p?"md":void 0},pt:h?"sm":"xs",pb:h?"xs":"sm",align:"center",justify:"space-between",className:g?"".concat(ee,"-").concat(g):"",borderTopLeftRadius:j?h&&p?"sm":void 0:h?"sm":void 0,borderTopRightRadius:j?h?"sm":void 0:h&&p?"sm":void 0,borderBottomRightRadius:j?h?void 0:"sm":h||!p?void 0:"sm",borderBottomLeftRadius:j?h||!p?void 0:"sm":h?void 0:"sm",children:[(0,r.jsxs)(s.so,{w:"100%",align:"center",overflowX:"clip",h:"xl",children:[(0,r.jsx)(s.az,{position:"relative",children:y?(0,r.jsx)(s.az,{w:"xl",h:"xl"}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(G.p,{id:g,name:v,size:24,style:{verticalAlign:"top"}}),(0,r.jsx)(d.J,{seed:o,right:0,bottom:-4,h:12,font:"assistive.micro"})]})}),(0,r.jsx)($,{ml:"sm",variant:l,textStyle:"body.medium",truncate:!0,maxW:{mdDown:"[124px]",md:"[180px]"},children:y?(0,r.jsx)(et,{}):v?(0,r.jsxs)(r.Fragment,{children:[x&&(0,r.jsx)(c.UPF,{fill:"playoffs.promotionToX",w:"16",h:"16",mr:"xs",mt:"-1",style:{transform:j?"rotate(-90deg)":"rotate(90deg)",verticalAlign:"middle"}}),(0,r.jsx)(X.lC,{original:v})]}):(0,r.jsx)(a.A,{id:"label_to_be_determined",defaultMessage:"TBD"})})]}),p&&(0,r.jsx)(K,{style:{whiteSpace:"nowrap"},variant:u,children:p})]})});var er=n(90510);let ei=e=>{let{seriesStartDateTimestamp:t,isLive:n}=e;return(0,r.jsx)(i.EY,{textStyle:"assistive.default",textAlign:"right",display:"block",pr:"sm",minW:"[52px]",color:n?"status.live":"neutrals.nLv3",children:n?(0,r.jsx)(a.A,{id:"inProgress"}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(er.XU,{day:"numeric",month:"short",value:1e3*t}),(0,r.jsx)("br",{}),(0,r.jsx)(er.ib,{value:1e3*t})]})})},es=e=>{let{isRetired:t,isWalkover:n}=e;return(0,r.jsx)(i.EY,{textStyle:"assistive.default",display:"block",color:"neutrals.nLv3",px:"sm",truncate:!0,children:(0,r.jsx)(a.A,{id:n?"walkover":t?"retired":""})})},eo=e=>{let{isFinals:t}=e;return(0,r.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,r.jsx)(i.EY,{textStyle:"assistive.micro",color:"primary.default",px:"md",display:"block",children:(0,r.jsx)(a.A,{id:t?"final":"3rdPlace"})})})};var el=n(189);let ea=e=>{let{event:t,children:n}=e;return t?(0,r.jsx)(W.tj,{event:t,children:n}):(0,r.jsx)(r.Fragment,{children:n})},ec=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 ed(e){var t,n,o,a,d,u,p,h,x,m;let{block:f,withLink:g,highlights:v,selectedRoundIndex:b}=e,{event:j,fetchedEvent:y}=(0,U.mJ)(g?((null==f?void 0:f.events)||[])[0]:void 0),k=(0,U.g3)(),{sourceTreeId:w,phaseFilter:S,entrantsPerRound:R}=(0,O.B)(),T=y||j,P=(0,l.useRef)(null),I=(0,l.useRef)(null),A=(0,l.useRef)(null),L=k?f.participants[1]:f.participants[0],B=k?null==y?void 0:y.awayTeamSeed:null==y?void 0:y.homeTeamSeed,D=k?f.awayTeamScore||(null==T||null==(n=T.awayScore)||null==(t=n.display)?void 0:t.toString()):f.homeTeamScore||(null==T||null==(a=T.homeScore)||null==(o=a.display)?void 0:o.toString()),E=k?f.participants[0]:f.participants[1],C=k?null==y?void 0:y.homeTeamSeed:null==y?void 0:y.awayTeamSeed,H=k?f.homeTeamScore||(null==T||null==(u=T.homeScore)||null==(d=u.display)?void 0:d.toString()):f.awayTeamScore||(null==T||null==(h=T.awayScore)||null==(p=h.display)?void 0:p.toString()),_=(0,el.Fx)({firstParticipant:L,secondParticipant:E,block:f}),F=(0,el.r9)(_),V=(_.hasScore||_.isLive)&&!_.isSpecial,z=!!f.seriesStartDateTimestamp&&!V&&!_.isSpecial;(0,l.useLayoutEffect)(()=>{if(!e.is3rdPlace)return setTimeout(()=>{!function(){var t;let n="rtl"===document.dir,r=document.querySelector('[data-tree-id="'.concat(w,'"]'))||document;if(!r)return;let i=ec(r),s=(null==L?void 0:L.sourceBlockId)?r.querySelector('[data-blockId="'.concat(null==L?void 0:L.sourceBlockId,'"][data-level="').concat((e.level||0)+1,'"]')):r.querySelector('[data-order="'.concat(2*(f.order||1)-1,'"][data-level="').concat((e.level||0)+1,'"]')),o=(null==E?void 0:E.sourceBlockId)?r.querySelector('[data-blockId="'.concat(null==E?void 0:E.sourceBlockId,'"][data-level="').concat((e.level||0)+1,'"]')):r.querySelector('[data-order="'.concat(2*(f.order||1),'"][data-level="').concat((e.level||0)+1,'"]')),l=null==(t=P.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;I.current&&(f.participantDraw?I.current.classList.add("connector-left-participant-draw","edge-"+(e.edge||"none"),"arrangement-"+(e.arrangement||"none")):I.current.classList.add("connector-left"),n?I.current.style.right="-".concat(2*M.Dh,"px"):I.current.style.left="-".concat(2*M.Dh,"px"),I.current.style.width="".concat(M.Dh,"px"),I.current.style.top=-t+M.Gj+"px",I.current.style.height=t+M.ut+"px")}if(c){let t=Math.abs(c.top-l.top)/i;A.current&&(f.participantDraw?A.current.classList.add("connector-right-participant-draw","edge-"+(e.edge||"none"),"arrangement-"+(e.arrangement||"none")):A.current.classList.add("connector-right"),n?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.bottom=-t+M.Gj+"px",A.current.style.height=t+M.ut+"px")}if(f.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(),s=Math.abs(e.top-t.top)/i;n.setAttribute("style","--participant-connector-height:".concat(s,"px")),n.classList.add("participant-connector")}}}}()},200),()=>{var e,t;null==(e=I.current)||e.classList.remove("connector-left"),null==(t=A.current)||t.classList.remove("connector-right")}},[b,S]);let Y=f.venue&&!L&&!E;return(0,r.jsxs)(N,{ref:P,"data-blockId":f.blockId,"data-order":f.order,"data-level":e.level,"data-leftBlockId":null==L?void 0:L.sourceBlockId,"data-rightBlockId":null==E?void 0:E.sourceBlockId,position:"relative",onMouseEnter:()=>{var e,t;return v.set([null==L||null==(e=L.team)?void 0:e.id,null==E||null==(t=E.team)?void 0:t.id])},onMouseLeave:v.clear,children:[(0,r.jsx)(s.az,{position:"absolute",top:"[36px]",left:"0",ref:I,pointerEvents:"none"}),(0,r.jsx)(s.az,{position:"absolute",left:"0",ref:A,pointerEvents:"none"}),(0,r.jsx)(ea,{event:T,children:(0,r.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,r.jsx)(s.az,{flexGrow:1,overflow:"hidden",h:"[68px]",children:Y?(0,r.jsxs)(s.so,{pl:"md",h:"100%",align:"center",children:[(0,r.jsx)(s.az,{w:"xl",h:"xl",mr:"sm",children:(0,r.jsx)(c.EGm,{w:"24",h:"24",fill:"onSurface.nLv1"})}),(0,r.jsxs)(s.az,{children:[(0,r.jsx)(i.EY,{maxW:"[148px]",truncate:!0,display:"block",children:null==(x=f.venue)?void 0:x.name}),(0,r.jsx)(i.EY,{color:"neutrals.nLv3",textStyle:"assistive.default",display:"block",children:null==(m=f.venue)?void 0:m.city.name})]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(en,{participant:L,seed:B,nameColor:F.firstParticipantName,scoreColor:F.firstParticipantScore,score:V?D||"-":void 0,isNewEntrant:(0,el.d_)(L,f.roundIndex,R),isFirst:!0}),(0,r.jsx)(en,{participant:E,seed:C,nameColor:F.secondParticipantName,scoreColor:F.secondParticipantScore,score:V?H||"-":void 0,isNewEntrant:(0,el.d_)(E,f.roundIndex,R)})]})}),(e.isFinals||e.is3rdPlace)&&(0,r.jsx)(eo,{isFinals:e.isFinals}),_.isSpecial?(0,r.jsx)(es,{isRetired:_.isRetired,isWalkover:_.isWalkover}):z?(0,r.jsx)(ei,{isLive:_.isLive,seriesStartDateTimestamp:f.seriesStartDateTimestamp}):null]})})]})}function eu(e){var t;let{thirdPlaceBlock:n,...i}=e,a=i.block.events.length>1,[c,d]=(0,l.useState)(!1),u=(0,o.jz)(()=>d(!1)),{showSingleParticipantByeBlocks:p,rounds:h}=(0,O.B)(),x=0===i.level&&!i.isRelegationDecider&&(null==(t=h[h.length-1])?void 0:t.type)===m.FFH.Finals,f=p?0===i.block.participants.length:i.block.participants.length<2;return i.ancestorHasParticipants&&f&&!i.block.venue&&!i.block.seriesStartDateTimestamp||i.block.isHidden?null:(0,r.jsxs)(q,{w:i.isVisibleRound?i.columnWidth:0,h:78*!!i.isVisibleRound,isVisibleRound:i.isVisibleRound,ref:u,position:"relative",role:"button",onClick:e=>{e.stopPropagation(),d(!0)},children:[(0,r.jsx)(ed,{...i,withLink:!a,isFinals:!i.is3rdPlace&&x,is3rdPlace:i.is3rdPlace}),a&&c&&(0,r.jsx)(H,{...i,close:()=>d(!1),isFinals:x}),x&&n&&(0,r.jsx)(s.az,{w:"100%",position:"absolute",bottom:"-2xl",left:"[0px]",transform:"translateY(100%)",children:(0,r.jsx)(eu,{...i,block:n,is3rdPlace:!0})})]})}var ep=n(4967);let eh=e=>{let{status:t,colors:n,block:s}=e,o=s.homeTeamScore&&s.homeTeamScore.length>5||s.awayTeamScore&&s.awayTeamScore.length>5;return t.isWalkover?(0,r.jsx)(i.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",mt:"xs",children:(0,r.jsx)(a.A,{id:"walkover"})}):t.isRetired?(0,r.jsx)(i.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",mt:"xs",children:(0,r.jsx)(a.A,{id:"retired"})}):t.hasScore?(0,r.jsxs)(i.EY,{textAlign:"center",mt:"xs",style:{whiteSpace:"nowrap"},children:[(0,r.jsx)(K,{textStyle:o?"body.small":"body.large",variant:n.firstParticipantScore,children:s.homeTeamScore.replace(" ","")})," : ",(0,r.jsx)(K,{textStyle:o?"body.small":"body.large",variant:n.secondParticipantScore,children:s.awayTeamScore.replace(" ","")})]}):t.hasStartTime?(0,r.jsx)(i.EY,{textStyle:"assistive.default",color:t.isLive?"status.live":"neutrals.nLv3",mt:"xs",children:(0,ep.cK)(1e3*s.seriesStartDateTimestamp)?(0,r.jsx)(er.ib,{value:1e3*s.seriesStartDateTimestamp}):(0,r.jsx)(er.XU,{day:"numeric",month:"short",value:1e3*s.seriesStartDateTimestamp})}):null};function ex(e){var t,n;let{block:o,hideTopConnector:l,hideBottomConnector:c}=e,u=o.participants[0],p=o.participants[1],h=(0,el.Fx)({firstParticipant:u,secondParticipant:p,block:o}),x=(0,el.r9)(h);return(0,r.jsxs)(Q,{align:"center",justify:"center",bg:"surface.s1",elevation:2,hideTopConnector:l,hideBottomConnector:c,children:[(0,r.jsxs)(s.so,{align:"center",justify:"center",children:[(0,r.jsxs)(s.so,{mx:"xs",w:"1/2",direction:"column",justify:"center",align:"center",textAlign:"center",position:"relative",children:[(0,r.jsx)(G.p,{id:null==u||null==(t=u.team)?void 0:t.id,size:28}),(null==u?void 0:u.team)?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.J,{seed:u.teamSeed,bottom:"lg",h:12,font:"assistive.micro"}),(0,r.jsx)(K,{mt:"xs",textStyle:"assistive.default",variant:x.firstParticipantName,children:u.team.nameCode||u.team.name.slice(0,3)})]}):(0,r.jsx)(i.EY,{textTransform:"uppercase",mt:"xs",textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,r.jsx)(a.A,{id:"label_to_be_determined",defaultMessage:"TBD"})})]}),(0,r.jsxs)(s.so,{mx:"xs",w:"1/2",direction:"column",justify:"center",align:"center",textAlign:"center",position:"relative",children:[(0,r.jsx)(G.p,{id:null==p||null==(n=p.team)?void 0:n.id,size:28}),(null==p?void 0:p.team)?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.J,{seed:p.teamSeed,bottom:"lg",h:12,font:"assistive.micro"}),(0,r.jsx)(K,{mt:"xs",textStyle:"assistive.default",variant:x.secondParticipantName,children:p.team.nameCode||p.team.name.slice(0,3)})]}):(0,r.jsx)(i.EY,{textTransform:"uppercase",mt:"xs",textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,r.jsx)(a.A,{id:"label_to_be_determined",defaultMessage:"TBD"})})]})]}),(0,r.jsx)(eh,{block:o,colors:x,status:h})]})}var em=n(59721);function ef(){let{tournamentId:e}=(0,O.B)();return(0,r.jsxs)(s.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)(em.e,{id:e,size:16,style:{position:"absolute",top:8,left:20}})]})}var eg=function(e){return e.Left="left",e.Right="right",e.Inner="inner",e}({});function ev(e){let{tree:t,initialOrientation:n="top"}=e;if(!t)return null;let i=t.left||t.right;return(0,r.jsxs)(s.so,{flexGrow:1,flexShrink:1,direction:"top"===n?"column":"column-reverse",children:[(0,r.jsxs)(s.so,{children:[(0,r.jsx)(ev,{tree:t.left,initialOrientation:n}),(0,r.jsx)(ev,{tree:t.right,initialOrientation:n})]}),(0,r.jsxs)(s.so,{justify:"center",position:"relative",children:[i&&(0,r.jsx)(s.az,{position:"absolute",borderTopColor:"surface.s1",borderTopWidth:"4px",borderTopStyle:"solid",w:"[calc(50% + 4px)]",left:"[calc(25% - 2px)]",top:"top"===n?"-2xs":"[calc(100% - 2px)]"}),(0,r.jsx)(ex,{block:t,hideTopConnector:!i&&"top"===n,hideBottomConnector:!i&&"bottom"===n})]})]})}let eb=(0,l.memo)(function e(t){var n;let{selectedRoundIndex:i}=t,{tree:o,level:l=0,depth:a}=t,{rounds:c}=(0,O.B)(),d=a-l-1,u=void 0===i||i===d||i-1===d||i+1===d;if(!o)return null;let p=t.ancestorHasParticipants||!o.isHidden&&o.participants.length>0,{left:h,right:x,...f}=o,g=!t.isRelegationDecider&&0===l&&(null==(n=c[c.length-1])?void 0:n.type)===m.FFH.Finals&&f.finished;return(0,r.jsxs)(s.so,{flexGrow:1,flexShrink:1,flexBasis:"[1px]",justify:"flex-end",children:[(h||x)&&(0,r.jsxs)(s.az,{position:"relative",children:[(0,r.jsx)(e,{...t,ancestorHasParticipants:p,level:l+1,tree:h,arrangement:"left",edge:t.edge===eg.Inner||t.edge===eg.Right?eg.Inner:eg.Left}),(0,r.jsx)(e,{...t,ancestorHasParticipants:p,level:l+1,tree:x,arrangement:"right",edge:t.edge===eg.Inner||t.edge===eg.Left?eg.Inner:eg.Right})]}),(0,r.jsxs)(s.so,{position:"relative",direction:"column",justify:"space-around",children:[g&&u&&(0,r.jsx)(ef,{}),(0,r.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 ej(e){let{onZoomIn:t,onZoomOut:n}=e;return(0,r.jsxs)(s.so,{dir:"ltr",direction:"column",position:"absolute",top:"[112px]",right:"xl",gap:"2xs",children:[(0,r.jsx)(i.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)(i.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,a=(0,l.useMemo)(()=>n>0?1/n:1,[n]),{sport:c}=(0,O.B)();return(0,r.jsx)(s.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)(s.az,{h:"4xl",py:"lg",flexGrow:0,flexShrink:0,flexBasis:"[260px]",overflowClipMargin:10,overflowX:"clip",children:(0,r.jsx)(i.EY,{display:"block",textStyle:"table.medium",textAlign:"center",style:{transformOrigin:"50% 50%",transform:"scaleX(".concat(a,")")},children:n<.3?(0,r.jsx)(x,{roundName:e}):(0,r.jsx)(u.rC,{roundName:e,sport:c})})},e+t))})}function ek(e){let{onChange:t}=e,[n,i]=(0,l.useState)([]),s=(0,F.useTheme)();return(0,l.useEffect)(()=>(t.push(e=>{i(e)}),()=>{t.pop()}),[]),(0,r.jsx)("style",{children:n.map(e=>"\n .".concat(ee,"-").concat(e," { background: ").concat(s.colors.neutral.highlight,"; }\n .").concat(ee,"-").concat(e,":hover { background: ").concat(s.colors.neutral.highlight,"; }\n "))})}function ew(){let e="rtl"===document.dir;return(0,r.jsxs)(s.az,{px:"sm",py:"md",children:[(0,r.jsx)(c.UPF,{fill:"playoffs.promotionToX",w:"24",h:"24",mr:"xs",mt:"-1",style:{transform:e?"rotate(-90deg)":"rotate(90deg)",verticalAlign:"middle"}}),(0,r.jsx)(i.EY,{ml:"xs",textStyle:"assistive.default",children:(0,r.jsx)(a.A,{id:"bracket_bye_explainer",defaultMessage:"Bye - automatic advancement"})})]})}},85986:(e,t,n)=>{n.d(t,{B:()=>l,J:()=>o});var r=n(6029),i=n(55729);let s=(0,i.createContext)(void 0),o=e=>{let{children:t,...n}=e;return(0,r.jsx)(s.Provider,{value:n,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,n)=>{n.d(t,{Q:()=>o});var r=n(21377),i=n(45860),s=n(189);function o(e,t){let{data:n,error:o,isLoading:l}=(0,i.Ay)(r.V3t.cupTrees(e,t));if(o)return[void 0,l];if(n){let e=(0,s.aQ)(n.cupTrees);if(e.length===n.cupTrees.length)return[void 0,l];let t=n.cupTrees.filter((t,n)=>!e.includes(n));if(t.length)return[t,l]}return[void 0,l]}}}]);