!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]="319fd6ab-136e-484a-9eb7-e87b70cbf8c9",e._sentryDebugIdIdentifier="sentry-dbid-319fd6ab-136e-484a-9eb7-e87b70cbf8c9")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[96175],{3022:(e,t,n)=>{n.d(t,{Q:()=>s});var r=n(21377),i=n(45860);function s(e,t){let{data:n,error:s,isLoading:l}=(0,i.Ay)(r.V3t.cupTrees(e,t));return s?[void 0,l]:[null==n?void 0:n.cupTrees,l]}},12094:(e,t,n)=>{n.d(t,{TI:()=>function e(t,n,a,c,d){if(null===n){let n=t.rounds.length-1;if(n>=0){var u,p,h,x,m,f,v;if(t.rounds[n].type>=0&&!((e,t)=>{let n=e.rounds[t];return!!n&&/final/i.test(n.description)&&1===n.type})(t,n)&&t.rounds[n].blocks.length>1)return e((0,r.l)(t),null);if(0===t.rounds[n].blocks.length||1===t.rounds[n].blocks.length&&!t.rounds[n].blocks[0].participants){let r=(e=>{let t=e.rounds.length-1;for(;t>=0&&!e.rounds[t].blocks.some(e=>{var t,n;return(null!=(n=null==(t=e.participants)?void 0:t.length)?n:0)>0});)t--;return t})(t);return e(ri,ne:()=>s});var r=n(65462);let i=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))),l=(e,t)=>"".concat(e,":").concat(t);function o(e,t,n,r,i,s){var a,c,d,u,p,h,x,m,f,v;let g=((e,t,n,r,i)=>{let s=e.rounds[t];if(s){if(void 0!==r){let e=s.blocks.find(e=>e.blockId===r);if(e&&e.blockId>=0)return i.has(l(t,e.blockId))?void 0:e}if(void 0!==n){let e=s.blocks.find(e=>e.order===n);if(e&&!i.has(l(t,e.blockId)))return e}}})(e,n,r,null!=t?t:void 0,s);if(!g)return;s.add(l(n,g.blockId));let b=null!=(m=null!=(x=g.order)?x:r)?m:1,j=null==(c=g.participants)||null==(a=c[0])?void 0:a.sourceBlockId,y=null==(u=g.participants)||null==(d=u[1])?void 0:d.sourceBlockId,k=null!=j?j:void 0;return(null!=(f=null==(p=g.participants)?void 0:p.length)?f:0)===1?{...g,roundIndex:n,participantDraw:null==(v=e.rounds[n])?void 0:v.participantDraw,left:o(e,k,n-1,2*b-1,i,s),right:o(e,void 0,n-1,void 0,i,s)}:{...g,roundIndex:n,participantDraw:null==(h=e.rounds[n])?void 0:h.participantDraw,left:o(e,k,n-1,2*b-1,i,s),right:o(e,null!=y?y:void 0,n-1,2*b,i,s)}}},38809:(e,t,n)=>{n.d(t,{B:()=>o,J:()=>l});var r=n(6029),i=n(55729);let s=(0,i.createContext)(void 0),l=e=>{let{children:t,...n}=e;return(0,r.jsx)(s.Provider,{value:n,children:t})},o=()=>{let e=(0,i.useContext)(s);if(void 0===e)throw Error("useCupTreeContext must be used within a CupTreeProvider");return e}},45254:(e,t,n)=>{n.d(t,{r9:()=>r,Fx:()=>s,BE:()=>d,ov:()=>l,KA:()=>p,bs:()=>o,d_:()=>u,TI:()=>a.TI,y6:()=>function e(t){return t?Math.max(e(t.left),e(t.right))+1:0},P4:()=>c}),n(65462);let r=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 i=n(21377);let s=e=>{let{firstParticipant:t,secondParticipant:n,block:r}=e,s=r.result===i.pq_.Walkover,l=r.result===i.pq_.Retired,o=!!(null==t?void 0:t.winner),a=!!(null==n?void 0:n.winner);return{isLive:!!r.eventInProgress,isSeriesInProgress:!r.finished,isRetired:l,isWalkover:s,isSpecial:l||s,isFirstParticipantWinner:o,isSecondParticipantWinner:a,hasWinner:o||a,hasScore:!!r.homeTeamScore&&!!r.awayTeamScore,hasStartTime:!!r.seriesStartDateTimestamp}};function l(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 o=e=>e.type===i.FFH.Finals||e.type%2==0&&(e.type===i.FFH.ThirdPlace&&1===e.blocks.length||e.type<=8);var a=n(12094);let c=(e,t)=>{let n,r=t||e.rounds;if(e.currentRound){var s;n=(null==(s=r[e.currentRound-1])?void 0:s.type)<=i.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 l=e.rounds.filter(e=>{let t;return t=e.description,!/qualif|preliminary/i.test(t)});return!!l.length&&!(l.some(e=>e.blocks.some(t=>(t.order?t.order:0)>e.blocks.length))||l.every(e=>e.blocks.every(e=>e.participants.every(e=>e.team.disabled))))&&l.some(e=>e.blocks.some(e=>e.participants.length>0))};function d(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 u(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 p(e){return!!e&&e.some((e,t)=>t>0&&e.size>0)}},57766:(e,t,n)=>{n.d(t,{eo:()=>eg,b8:()=>ec,Y9:()=>S,eS:()=>ev,_4:()=>R,Vr:()=>ex,b2:()=>u,Cq:()=>ef,WR:()=>w,Xs:()=>eu,Bg:()=>eh,Dg:()=>em});var r=n(6029),i=n(28349),s=n(76356),l=n(90248),o=n(80322),a=n(9081);let c=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)(o.J,{position:"relative",mt:"2xs",seed:1,colorless:t}),(0,r.jsx)(i.EY,{textStyle:"body.mediumParagraph",children:(0,r.jsx)(l.A,{id:"tennis_seeded_player"})})]}),(0,r.jsxs)(s.so,{mb:"sm",gap:"md",children:[(0,r.jsx)(o.J,{position:"relative",mt:"2xs",seed:"WC",colorless:t}),(0,r.jsx)(i.EY,{textStyle:"body.mediumParagraph",children:(0,r.jsx)(l.A,{id:"abbr.wc"})})]}),(0,r.jsxs)(s.so,{mb:"sm",gap:"md",children:[(0,r.jsx)(o.J,{position:"relative",mt:"2xs",seed:"LL",colorless:t}),(0,r.jsx)(i.EY,{textStyle:"body.mediumParagraph",children:(0,r.jsx)(l.A,{id:"abbr.ll"})})]}),(0,r.jsxs)(s.so,{mb:"sm",gap:"md",children:[(0,r.jsx)(o.J,{position:"relative",mt:"2xs",seed:"PR",colorless:t}),(0,r.jsx)(i.EY,{textStyle:"body.mediumParagraph",children:(0,r.jsx)(l.A,{id:"abbr.pr"})})]}),(0,r.jsxs)(s.so,{mb:"sm",gap:"md",children:[(0,r.jsx)(o.J,{position:"relative",mt:"2xs",seed:"Q",colorless:t}),(0,r.jsx)(i.EY,{textStyle:"body.mediumParagraph",children:(0,r.jsx)(l.A,{id:"abbr.qp"})})]}),(0,r.jsxs)(s.so,{mb:"sm",gap:"md",children:[(0,r.jsx)(o.J,{position:"relative",mt:"2xs",seed:"A",colorless:t}),(0,r.jsx)(i.EY,{textStyle:"body.mediumParagraph",children:(0,r.jsx)(l.A,{id:"abbr.a"})})]}),(0,r.jsxs)(s.so,{mb:"sm",gap:"md",children:[(0,r.jsx)(o.J,{position:"relative",mt:"2xs",seed:"SE",colorless:t}),(0,r.jsx)(i.EY,{textStyle:"body.mediumParagraph",children:(0,r.jsx)(l.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(46222),x=n(20288),m=n(55729),f=n(947),v=n(50865),g=n(97431),b=n(79154);let j={};var y=n(52466),k=n(82536);function w(){let[e,t]=(0,m.useState)(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.az,{h:"xl",w:"xl",onClick:()=>t(!0),cursor:"pointer",children:(0,r.jsx)(y.G_L,{fill:"onSurface.nLv1"})}),(0,r.jsx)(k.A,{isOpen:e,setIsOpen:t,header:"tennis_seedings_title",children:(0,r.jsx)(s.az,{px:"lg",pt:"sm",maxW:{md:"[328px]"},children:(0,r.jsx)(c,{})})})]})}function S(e){let{id:t,name:n,sport:i,phaseSelector:l,embedProps:o}=e,a=i===p.QCR.Tennis,c=function(e,t){let{uniqueTournamentId:n,uniqueTournamentName:r}=(0,m.useContext)(v.O),i=(0,f.A)();if(j[t])return j[t];let s=i.formatMessage({id:e||"tournament.cupTree"});if(!n||!r||!(n in b))return j[t]=s,s;let l=i.formatMessage({id:b[n]}),o=(0,g.t)(e,p.QCR.Football,i);return(o=o.replace(new RegExp("\\b".concat(r,"\\b")),l))===e?(j[t]=s,s):(j[t]=o,o)}(n,t),d=(0,r.jsx)(s.az,{h:"2xl",children:(0,r.jsxs)(s.so,{align:"center",gap:"lg",children:[l,a&&(0,r.jsx)(w,{}),(0,r.jsx)(x.w,{type:"cup_tree",...o})]})});return(0,r.jsx)(h.Zp.Header,{variant:"left-aligned-desktop",title:(0,r.jsx)("bdi",{children:c}),actionComponent:d})}function R(){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)(y.fRW,{fill:"surface.s1"}),(0,r.jsx)(i.EY,{ml:"md",textStyle:"body.medium",color:"surface.s1",children:(0,r.jsx)(l.A,{id:"bracket_zoom_snackbar"})})]})})}var I=n(494),P=n(56494),D=n(96016),E=n(42781);function C(e){let[t,n]=(0,m.useState)(!1),{block:i}=e,o=(0,I.wA)(),a=(0,I.d4)(e=>i.events?i.events.map(t=>e.favorites.events[t]).filter(Boolean):[]);async function c(){try{if(i.events&&a.lengthp.nk6.fetchEvent(e)))).map(e=>{let{event:t}=e;return t});o((0,D.oU)(e)),n(!1)}}catch(e){n(!1)}}return(0,m.useEffect)(()=>{c()},[i.blockId,i.events]),(0,r.jsx)(s.az,{children:t?(0,r.jsx)(P.a,{}):a.length?(0,r.jsx)(r.Fragment,{children:a.map(e=>(0,r.jsx)("div",{children:(0,r.jsx)(E.n6,{event:e,isNarrow:!0,isShort:!0,isShortDate:!0,children:null})},e.id))}):(0,r.jsx)(l.A,{id:"basic.noEvents",defaultMessage:"No events"})})}var T=n(9329),B=n(99064),L=n(41735),A=n(79261),H=n(14831),_=n(58643);function F(){let e=(0,T._)(["\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 F=function(){return e},e}let V=(0,L.default)(B.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;}",""],_.Dh,(0,H.UR)("-".concat(_.Dh+4,"px"),"unset"),(0,H.UR)("unset","-".concat(_.Dh+4,"px")),_.ut,_.Dh+1,_.ut,e=>e.theme.colors.surface.s2,_.ut,e=>e.theme.colors.surface.s1,e=>(0,H.UR)("".concat(_.ut,"px solid ").concat(e.theme.colors.surface.s1),"unset"),e=>(0,H.UR)("unset","".concat(_.ut,"px solid ").concat(e.theme.colors.surface.s1)),A.qG,(0,H.UR)("-".concat(_.Dh+4,"px"),"unset"),(0,H.UR)("unset","-".concat(_.Dh+4,"px")),_.Dh,_.ut,e=>e.theme.colors.surface.s1,_.ut,e=>e.theme.colors.surface.s1,e=>(0,H.UR)("".concat(_.ut,"px solid ").concat(e.theme.colors.surface.s1),"unset"),e=>(0,H.UR)("unset","".concat(_.ut,"px solid ").concat(e.theme.colors.surface.s1)),A.qG,(0,H.UR)("-".concat(_.Dh+4,"px"),"unset"),(0,H.UR)("unset","-".concat(_.Dh+4,"px")),_.Dh,_.ut,e=>e.theme.colors.surface.s1,_.ut,e=>e.theme.colors.surface.s1,e=>(0,H.UR)("unset","".concat(_.ut,"px dashed ").concat(e.theme.colors.surface.s1)),A.qG,_.ut,e=>e.theme.colors.surface.s1,e=>(0,H.UR)("unset","".concat(_.ut,"px dashed ").concat(e.theme.colors.surface.s1)),A.qG,e=>e.theme.breakpoints.query.mdMin(F(),e.theme.colors.surface.s2)),z=(0,L.default)(B.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;"),Y=(0,L.default)(B.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;","}"],_.zi,_.ut,e=>e.inCard?e.theme.colors.surface.s2:e.theme.colors.surface.s1,_.zi,_.ut/2,_.GA,e=>e.hideTopConnector&&"display: none;",_.ut,e=>e.inCard?e.theme.colors.surface.s2:e.theme.colors.surface.s1,_.zi,_.ut/2,_.GA,e=>e.hideBottomConnector&&"display: none;");var M=n(67087),N=n(31830),Q=n(64006);let U=e=>{let{events:t,children:n}=e,i=(0,N.A)(),s=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,Q.zw)(i,"event",{id:r.customId,name:r.slug,sport:r.tournament.category.sport.slug})};return(0,r.jsx)("a",{href:"#",onClick:s,children:n})};var W=n(33144),q=n(88505),G=n(38809);let X=(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"}}),J=(0,s.I4)("span",X),O=(0,s.I4)("bdi",X),K="cupTreeHighlight-team",Z=()=>(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"})}),$=(0,m.memo)(function(e){var t,n;let{participant:i,seed:a,nameColor:c,scoreColor:d,score:u,isFirst:p,isNewEntrant:h,isEmptyBlock:x}=e,{showSingleParticipantByeBlocks:m}=(0,G.B)(),f=(null==i||null==(t=i.team)?void 0:t.id)||0,v=(null==(n=document)?void 0:n.dir)==="rtl",g=m&&(null==i?void 0:i.team)===void 0&&!x;return(0,r.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(K,"-").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)(s.so,{w:"100%",align:"center",overflowX:"clip",h:"xl",children:[(0,r.jsx)(s.az,{position:"relative",children:g?(0,r.jsx)(s.az,{w:"xl",h:"xl"}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(W.p,{id:f,name:null==i?void 0:i.team.name,size:24,style:{verticalAlign:"top"}}),(0,r.jsx)(o.J,{seed:a,right:"[0px]",bottom:"-xs",h:"md",textStyle:"assistive.micro"})]})}),(0,r.jsx)(O,{ml:"sm",variant:c,textStyle:"body.medium",truncate:!0,maxW:{mdDown:"[124px]",md:"[180px]"},children:g?(0,r.jsx)(Z,{}):(null==i?void 0:i.team)?(0,r.jsxs)(r.Fragment,{children:[h&&(0,r.jsx)(y.UPF,{fill:"playoffs.promotionToX",w:"16",h:"16",mr:"xs",mt:"-1",style:{transform:v?"rotate(-90deg)":"rotate(90deg)",verticalAlign:"middle"}}),(0,r.jsx)(q.Rm,{team:i.team,short:!0})]}):(0,r.jsx)(l.A,{id:"label_to_be_determined",defaultMessage:"TBD"})})]}),u&&(0,r.jsx)(J,{style:{whiteSpace:"nowrap"},variant:d,children:u})]})});var ee=n(4967),et=n(90510);let en=e=>{let{seriesStartDateTimestamp:t,isLive:n}=e,s=1e3*t,o=(0,ee.cK)(s)||(0,ee.ef)(s);return(0,r.jsx)(i.EY,{textStyle:"assistive.default",textAlign:"end",display:"block",pr:"sm",minW:"[52px]",color:n?"status.live":"neutrals.nLv3",children:n?(0,r.jsx)(l.A,{id:"inProgress"}):(0,r.jsxs)(r.Fragment,{children:[o?(0,r.jsx)(l.A,{id:(0,ee.cK)(s)?"today":"tomorrow"}):(0,r.jsx)(et.XU,{day:"numeric",month:"short",value:s}),(0,r.jsx)("br",{}),(0,r.jsx)(et.ib,{value:s})]})})},er=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)(l.A,{id:n?"walkover":t?"retired":""})})},ei=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:"surface.s1",px:"md",display:"block",children:(0,r.jsx)(l.A,{id:t?"final":"3rdPlace"})})})};var es=n(45254);function el(e){var t,n,l;let{block:o,highlights:a,selectedRoundIndex:c}=e,d=(0,M.g3)(),{rounds:u,sourceTreeId:p,phaseFilter:h,entrantsPerRound:x,preferSourceBlockId:f}=(0,G.B)(),v=(0,m.useRef)(null),g=(0,m.useRef)(null),b=(0,m.useRef)(null),j=d?o.participants[1]:o.participants[0],k=null==j?void 0:j.teamSeed,w=d?o.awayTeamScore:o.homeTeamScore,S=d?o.participants[0]:o.participants[1],R=null==S?void 0:S.teamSeed,I=d?o.homeTeamScore:o.awayTeamScore,P=(0,es.Fx)({firstParticipant:j,secondParticipant:S,block:o}),D=(0,es.r9)(P),E=(P.hasScore||P.isLive)&&!P.isSpecial,C=!!o.seriesStartDateTimestamp&&!E&&!P.isSpecial;(0,m.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 i=(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})(r),s=f?r.querySelector('[data-blockId="'.concat(null==j?void 0:j.sourceBlockId,'"][data-level="').concat((e.level||0)+1,'"]')):r.querySelector('[data-order="'.concat(2*(o.order||1)-1,'"][data-level="').concat((e.level||0)+1,'"]')),l=f?r.querySelector('[data-blockId="'.concat(null==S?void 0:S.sourceBlockId,'"][data-level="').concat((e.level||0)+1,'"]')):r.querySelector('[data-order="'.concat(2*(o.order||1),'"][data-level="').concat((e.level||0)+1,'"]')),a=null==(t=v.current)?void 0:t.getBoundingClientRect(),c=null==s?void 0:s.getBoundingClientRect(),d=null==l?void 0:l.getBoundingClientRect();if(a){if(c){let t=Math.abs(a.top-c.top)/i;g.current&&(o.participantDraw?g.current.classList.add("connector-left-participant-draw","edge-"+(e.edge||"none"),"arrangement-"+(e.arrangement||"none")):g.current.classList.add("connector-left"),n?g.current.style.right="-".concat(2*_.Dh,"px"):g.current.style.left="-".concat(2*_.Dh,"px"),g.current.style.width="".concat(_.Dh,"px"),g.current.style.top=-t+_.Gj+"px",g.current.style.height=t+_.ut+"px")}if(d){let t=Math.abs(d.top-a.top)/i;b.current&&(o.participantDraw?b.current.classList.add("connector-right-participant-draw","edge-"+(e.edge||"none"),"arrangement-"+(e.arrangement||"none")):b.current.classList.add("connector-right"),n?b.current.style.right="-".concat(2*_.Dh,"px"):b.current.style.left="-".concat(2*_.Dh,"px"),b.current.style.width="".concat(_.Dh,"px"),b.current.style.bottom=-t+_.Gj+"px",b.current.style.height=t+_.ut+"px")}if(o.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=g.current)||e.classList.remove("connector-left"),null==(t=b.current)||t.classList.remove("connector-right")}},[c,h]);let T=o.venue&&!j&&!S,B=!j&&!S;return(0,r.jsxs)(V,{ref:v,"data-blockId":o.blockId,"data-order":o.order,"data-level":e.level,"data-leftBlockId":null==j?void 0:j.sourceBlockId,"data-rightBlockId":null==S?void 0:S.sourceBlockId,position:"relative",onMouseEnter:()=>{var e,t;return a.set([null==j||null==(e=j.team)?void 0:e.id,null==S||null==(t=S.team)?void 0:t.id])},onMouseLeave:a.clear,children:[(0,r.jsx)(s.az,{position:"absolute",top:"[36px]",left:"0",ref:g,pointerEvents:"none"}),(0,r.jsx)(s.az,{position:"absolute",left:"0",ref:b,pointerEvents:"none"}),(0,r.jsx)(U,{events:o.events,children:(0,r.jsxs)(s.so,{position:"relative",bg:{mdDown:"surface.s1",md:"surface.s2"},br:"sm",cursor:(null==(t=o.events)?void 0:t.length)>0?"pointer":"default",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:T?(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)(y.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==(n=o.venue)?void 0:n.name}),(0,r.jsx)(i.EY,{color:"neutrals.nLv3",textStyle:"assistive.default",display:"block",children:null==(l=o.venue)?void 0:l.city.name})]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)($,{participant:j,seed:k,nameColor:D.firstParticipantName,scoreColor:D.firstParticipantScore,score:E?w||"-":void 0,isEmptyBlock:B,isNewEntrant:(0,es.d_)(j,u.length-(e.level||0)-1,x),isFirst:!0}),(0,r.jsx)($,{participant:S,seed:R,nameColor:D.secondParticipantName,scoreColor:D.secondParticipantScore,score:E?I||"-":void 0,isEmptyBlock:B,isNewEntrant:(0,es.d_)(S,u.length-(e.level||0)-1,x)})]})}),(e.isFinals||e.is3rdPlace)&&(0,r.jsx)(ei,{isFinals:e.isFinals}),P.isSpecial?(0,r.jsx)(er,{isRetired:P.isRetired,isWalkover:P.isWalkover}):C?(0,r.jsx)(en,{isLive:P.isLive,seriesStartDateTimestamp:o.seriesStartDateTimestamp}):null]})})]})}function eo(e){var t;let{thirdPlaceBlock:n,...i}=e,l=i.block.events.length>1,[o,a]=(0,m.useState)(!1),{showSingleParticipantByeBlocks:c,rounds:d}=(0,G.B)(),u=0===i.level&&!i.isRelegationDecider&&(null==(t=d[d.length-1])?void 0:t.type)===p.FFH.Finals,h=c?0===i.block.participants.length:i.block.participants.length<2;return i.ancestorHasParticipants&&h&&!i.block.venue&&!i.block.seriesStartDateTimestamp||i.block.isHidden?null:(0,r.jsxs)(z,{w:i.isVisibleRound?i.columnWidth:0,h:78*!!i.isVisibleRound,isVisibleRound:i.isVisibleRound,position:"relative",role:"button",onClick:e=>{e.stopPropagation(),a(!0)},children:[(0,r.jsx)(el,{...i,withLink:!l,isFinals:!i.is3rdPlace&&u,is3rdPlace:i.is3rdPlace}),l&&(0,r.jsx)(k.A,{isOpen:o,setIsOpen:a,header:"tournament.series",children:(0,r.jsx)(s.az,{px:"lg",pt:"sm",maxW:{md:"[360px]"},children:(0,r.jsx)(C,{...i})})}),u&&n&&(0,r.jsx)(s.az,{w:"100%",position:"absolute",bottom:"-2xl",left:"[0px]",transform:"translateY(100%)",children:(0,r.jsx)(eo,{...i,block:n,is3rdPlace:!0})})]})}let ea=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)(l.A,{id:"walkover"})}):t.isRetired?(0,r.jsx)(i.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",mt:"xs",children:(0,r.jsx)(l.A,{id:"retired"})}):t.hasScore?(0,r.jsxs)(i.EY,{textAlign:"center",mt:"xs",style:{whiteSpace:"nowrap"},children:[(0,r.jsx)(J,{textStyle:o?"body.small":"body.large",variant:n.firstParticipantScore,children:s.homeTeamScore.replace(" ","")})," : ",(0,r.jsx)(J,{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,ee.cK)(1e3*s.seriesStartDateTimestamp)?(0,r.jsx)(et.ib,{value:1e3*s.seriesStartDateTimestamp}):(0,r.jsx)(et.XU,{day:"numeric",month:"short",value:1e3*s.seriesStartDateTimestamp})}):null};function ec(e){var t,n,a;let{block:c,hideTopConnector:d,hideBottomConnector:u,inCard:p}=e,[h,x]=(0,m.useState)(!1),f=c.participants[0],v=c.participants[1],g=(0,es.Fx)({firstParticipant:f,secondParticipant:v,block:c}),b=(0,es.r9)(g);return(0,r.jsxs)(U,{events:c.events,children:[(0,r.jsxs)(Y,{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(),x(!0))},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)(W.p,{id:null==f||null==(t=f.team)?void 0:t.id,size:28}),(null==f?void 0:f.team)?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.J,{seed:f.teamSeed,bottom:"lg",h:"md",textStyle:"assistive.micro"}),(0,r.jsx)(J,{mt:"xs",textStyle:"assistive.default",variant:b.firstParticipantName,children:f.team.nameCode||f.team.name.slice(0,3)})]}):(0,r.jsx)(i.EY,{textTransform:"uppercase",mt:"xs",textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,r.jsx)(l.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)(W.p,{id:null==v||null==(n=v.team)?void 0:n.id,size:28}),(null==v?void 0:v.team)?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.J,{seed:v.teamSeed,bottom:"lg",h:"md",textStyle:"assistive.micro"}),(0,r.jsx)(J,{mt:"xs",textStyle:"assistive.default",variant:b.secondParticipantName,children:v.team.nameCode||v.team.name.slice(0,3)})]}):(0,r.jsx)(i.EY,{textTransform:"uppercase",mt:"xs",textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,r.jsx)(l.A,{id:"label_to_be_determined",defaultMessage:"TBD"})})]})]}),(0,r.jsx)(ea,{block:c,colors:b,status:g})]}),((null==(a=c.events)?void 0:a.length)||0)>1&&(0,r.jsx)(k.A,{isOpen:h,setIsOpen:x,header:"tournament.series",children:(0,r.jsx)(s.so,{px:"lg",pt:"sm",direction:"column",maxW:{md:"[360px]"},children:(0,r.jsx)(C,{block:c})})})]})}var ed=n(59721);function eu(){let{tournamentId:e}=(0,G.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)(ed.e,{id:e,size:16,style:{position:"absolute",top:8,left:20}})]})}var ep=function(e){return e.Left="left",e.Right="right",e.Inner="inner",e}({});function eh(e){let{tree:t,initialOrientation:n="top",inCard:i}=e;if(!t)return null;let l=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)(eh,{tree:t.left,initialOrientation:n,inCard:i}),(0,r.jsx)(eh,{tree:t.right,initialOrientation:n,inCard:i})]}),(0,r.jsxs)(s.so,{justify:"center",position:"relative",children:[l&&(0,r.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"===n?"-2xs":"[calc(100% - 2px)]"}),(0,r.jsx)(ec,{block:t,hideTopConnector:!l&&"top"===n,hideBottomConnector:!l&&"bottom"===n,inCard:i})]})]})}let ex=(0,m.memo)(function e(t){var n;let{selectedRoundIndex:i}=t,{tree:l,level:o=0,depth:a}=t,{rounds:c}=(0,G.B)(),d=a-o-1,u=void 0===i||i===d||i-1===d||i+1===d;if(!l)return null;let h=t.ancestorHasParticipants||!l.isHidden&&l.participants.length>0,{left:x,right:m,...f}=l,v=!t.isRelegationDecider&&0===o&&(null==(n=c[c.length-1])?void 0:n.type)===p.FFH.Finals&&f.finished;return(0,r.jsxs)(s.so,{flexGrow:1,flexShrink:1,flexBasis:"[1px]",justify:"flex-end",children:[(x||m)&&(0,r.jsxs)(s.az,{position:"relative",children:[(0,r.jsx)(e,{...t,ancestorHasParticipants:h,level:o+1,tree:x,arrangement:"left",edge:t.edge===ep.Inner||t.edge===ep.Right?ep.Inner:ep.Left}),(0,r.jsx)(e,{...t,ancestorHasParticipants:h,level:o+1,tree:m,arrangement:"right",edge:t.edge===ep.Inner||t.edge===ep.Left?ep.Inner:ep.Right})]}),(0,r.jsxs)(s.so,{position:"relative",direction:"column",justify:"space-around",children:[v&&u&&(0,r.jsx)(eu,{}),(0,r.jsx)(eo,{block:f,thirdPlaceBlock:f.thirdPlaceBlock,highlights:t.highlights,arrangement:t.arrangement,edge:t.edge,level:o,isRelegationDecider:t.isRelegationDecider,ancestorHasParticipants:t.ancestorHasParticipants,isVisibleRound:u,selectedRoundIndex:i,columnWidth:t.columnWidth},f.blockId||"".concat(o,"-").concat(t.depth,"-").concat(f.order))]})]})});function em(e){let{onZoomIn:t,onZoomOut:n}=e;return(0,r.jsxs)(s.so,{dir:"ltr",direction:"column",position:"absolute",top:"[64px]",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 ef(e){let{x:t,scale:n,roundNames:l}=e,o=(0,m.useMemo)(()=>n>0?1/n:1,[n]),{sport:c}=(0,G.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:l.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(o,")")},children:n<.3?(0,r.jsx)(u,{roundName:e}):(0,r.jsx)(a.rC,{roundName:e,sport:c})})},e+t))})}function ev(e){let{onChange:t}=e,[n,i]=(0,m.useState)([]),s=(0,L.useTheme)();return(0,m.useEffect)(()=>(t.push(e=>{i(e)}),()=>{t.pop()}),[]),(0,r.jsx)("style",{children:n.map(e=>"\n .".concat(K,"-").concat(e," { background: ").concat(s.colors.neutral.highlight,"; }\n .").concat(K,"-").concat(e,":hover { background: ").concat(s.colors.neutral.highlight,"; }\n "))})}function eg(){let e="rtl"===document.dir;return(0,r.jsxs)(s.az,{px:"sm",py:"md",children:[(0,r.jsx)(y.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)(l.A,{id:"bracket_bye_explainer",defaultMessage:"Bye - automatic advancement"})})]})}},58643:(e,t,n)=>{n.d(t,{AK:()=>s,Dh:()=>r,GA:()=>u,Gj:()=>o,IT:()=>c,XV:()=>a,Yv:()=>i,ut:()=>l,zi:()=>d});let r=20,i=.2,s=1.5,l=4,o=32,a=658,c=880,d=80,u=16},65462:(e,t,n)=>{n.d(t,{l:()=>s});var r=n(9922),i=n.n(r);function s(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}}}]);