!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},s=(new e.Error).stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="33b48b94-6d54-41a4-b004-081d4067ff20",e._sentryDebugIdIdentifier="sentry-dbid-33b48b94-6d54-41a4-b004-081d4067ff20")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3231],{7079:(e,s,t)=>{t.d(s,{X:()=>T});var n=t(6029),l=t(21377),i=t(95083),r=t(55729),o=t(947),a=t(41735),d=t(76356),c=t(93338),u=t(41249),m=t(90248),x=t(494),p=t(45860),h=t(54409),j=t(70591),g=t(10794),f=t(94604),v=t(19135),y=t(19168),b=t(50574),w=t(13892),I=t(82287),S=t(69435),C=t(67149);let k=e=>{var s;let{row:t,events:o,sport:a,position:m,columnKeys:v,promotionColors:k,isRTL:L}=e,{isNarrowLayout:T,selectedTeamId:E,homeTeamId:D,awayTeamId:z,displayType:_}=(0,r.useContext)(S.P),{isDesktopLarge:P}=(0,i.$c)(),N=(0,x.d4)(g.JV),Y=t.team.id,A=!!t.liveMatchWinnerCodeColumn,{texts:R}=(0,r.useContext)(I.C),{data:F}=(0,p.Ay)(t.promotion?l.oo$.singleEntity(t.promotion.id,N):null),B=(null==F?void 0:F.translation.value)||(null==(s=t.promotion)?void 0:s.text)||R[Y],[M,O]=(0,r.useState)(!1);return(0,n.jsx)(j.gT,{sport:a,team:t.team,"data-testid":"standings_row",children:(0,n.jsxs)(w.fh,{"data-selected":E===Y||void 0,team:D===Y?"home":z===Y?"away":"none",children:[E===Y&&(0,n.jsx)(d.az,{position:"absolute",left:"[0px]",w:"xs",h:"100%",bg:"neutral.default"}),(0,n.jsx)(d.az,{children:(0,n.jsx)(d.so,{w:"xl",h:"xl",justify:"center",align:"center",br:"50%",textStyle:"display.small",cursor:"pointer",userSelect:"none",onClick:e=>{e.preventDefault(),e.stopPropagation(),B&&(M||(O(!0),setTimeout(()=>{O(!1)},3e3),(0,y.MZ)((0,n.jsxs)(d.so,{align:"center",children:[(0,n.jsx)(h.G_L,{fill:"surface.s1",mr:"lg"}),(0,n.jsxs)(u.EY,{block:!0,color:"surface.s1",font:"display.small",children:[(0,n.jsx)(f.Rm,{team:t.team,short:!0})," – ".concat(B)]})]}))))},color:k[Y]?"surface.s1":"neutrals.nLv1",style:{backgroundColor:k[Y]?k[Y]:c.S.var("colors.surface.s2")},title:B||void 0,children:m})}),"full"===_&&(!P||T)?null:(0,n.jsx)(u._V,{src:l.cWY.image(t.team.id),width:"32",height:"32",style:{verticalAlign:"top"},w:[32,24],h:[32,24],ml:"sm",fallback:(0,n.jsx)(d.I4.img,{style:{marginLeft:u.xI.sm},src:"/static/images/placeholders/team.svg",width:{base:"2xl",md:"xl"},height:{base:"2xl",md:"xl"},className:"standings-row-placeholder-image",alt:""}),alt:""}),(0,n.jsx)(d.az,{flexGrow:1,overflow:"auto",children:(0,n.jsxs)(d.so,{align:"center",pl:"sm",overflow:"hidden",w:"100%",children:[(0,n.jsx)(u.EY,{as:"div",font:"table.medium",color:A?"sofaSingles.live":"onSurface.nLv1",ellipsis:!0,children:(0,n.jsx)(f.Rm,{team:t.team,short:!0})}),A&&(0,n.jsx)(d.I4.small,{position:"relative",color:"status.live",_after:{content:"''",position:"relative",display:"inline-block",top:"[-1px]",width:"[6px]",height:"[6px]",ml:"xs",br:"50%",bg:"status.live",animation:"pulse 1s ease-in infinite"}})]})}),v.map(e=>{if("last5"===e)return(0,n.jsx)(b.o1,{events:o,referenceId:t.team.id},t.team.id+e);let s=C.oG(e,a,t,L),l=!1;e===t.liveMatchWinnerCodeColumn||"points"===e&&A?l=!0:"percentage"===e&&A&&(l=!0);let i=C.j8(e,a,!1);return(0,n.jsx)(d.az,{children:(0,n.jsx)(u.EY,{as:"bdi",font:"table.medium",color:l?"sofaSingles.live":"onSurface.nLv1",children:(0,n.jsx)(d.so,{justify:"center",style:{minWidth:i},children:s})})},e)})]})})};function L(e){let{sport:s,columnKeys:t,currentSeason:l}=e,i=null==l?void 0:l.year;return(0,n.jsxs)(w.fh,{children:[(0,n.jsx)(d.az,{children:(0,n.jsx)(u.EY,{font:"table.medium",color:"onSurface.nLv3",align:"center",as:"div",style:{width:24},children:"#"})}),(0,n.jsx)(d.az,{flexGrow:1,children:(0,n.jsx)(u.EY,{pl:"sm",font:"table.medium",color:"onSurface.nLv3",children:(0,n.jsx)(m.A,{id:"team"})})}),t.map(e=>{if("last5"===e)return(0,n.jsx)(d.so,{ml:"sm",wrap:"nowrap",flexBasis:"[120px]",justify:"center",align:"center",children:(0,n.jsx)(d.so,{minW:"2xl",justify:"center",children:(0,n.jsx)(u.EY,{font:"table.medium",color:"onSurface.nLv3",children:(0,n.jsx)(v.N,{id:e})})})},"column-key-last5");let t=function(e,s){switch(e){case"pointsCurrSeason":return s;case"pointsPrevSeason":return Number(s)-1;case"pointsPrevPrevSeason":return Number(s)-2;default:return(0,n.jsx)(v.N,{id:e})}}(e,i),l=C.j8(e,s,!1);return(0,n.jsx)(d.az,{children:(0,n.jsx)(u.EY,{font:"table.medium",color:"onSurface.nLv3",textTransform:"points"===e?"uppercase":void 0,children:(0,n.jsx)(d.so,{justify:"center",style:{minWidth:l},children:t})})},e)})]})}function T(e){let{type:s,table:t,teamEvents:d}=e,c=(0,r.useContext)(S.P),{uniqueTournamentId:u,isNarrowLayout:m,displayType:x,homeTeamId:p,awayTeamId:h,selectedTeamId:j,currentSeason:g}=c,{isDesktop:f,mediaBreakpoint:v}=(0,i.$c)(),{settings:y}=(0,a.useTheme)(),b=(0,o.A)(),w=t.tournament.category.sport.slug,T=(0,r.useMemo)(()=>{let e=t.rows.reduce((e,s)=>Object.keys(s).length>Object.keys(e).length?s:e,t.rows[0]),n=t.rows.some(e=>0!==Number(e.gamesBehind)),l=t.rows.some(e=>void 0!==e.scoresFor||void 0!==e.scoresAgainst),i=!!(null==g?void 0:g.year)&&t.rows.some(e=>void 0!==e.pointsCurrSeason||void 0!==e.pointsPrevPrevSeason||void 0!==e.pointsPrevPrevSeason);if(e._isPlaceholderRow)return[b.formatMessage({id:"standings_placeholder_data"},{type:s,name:t.name})];let r="xxs"===v||"xs"===v||f&&m;return(0,C.Tx)(e,w,x,m,n,l,i,r,u)},[t.id,w,x,m]),{colors:E}=(0,r.useContext)(I.C),D=(0,r.useMemo)(()=>{let e={homeTeamId:p,awayTeamId:h,selectedTeamId:j};return s===l.lpv.Home&&(delete e.awayTeamId,delete e.homeTeamId,e.selectedTeamId=j),s===l.lpv.Away&&(delete e.awayTeamId,delete e.homeTeamId,e.selectedTeamId=j),e},[p,h,j,s]);return(0,n.jsxs)("div",{style:{width:"100%"},children:[(0,n.jsx)(L,{columnKeys:T,sport:w,currentSeason:g}),(0,n.jsx)(S.P.Provider,{value:{...c,...D},children:t.rows.map((e,s)=>(0,n.jsx)(k,{columnKeys:T,promotionColors:E,position:s+1,row:e,sport:w,events:d?d[e.team.id]:null,isRTL:"rtl"===y.textDirection},e.id))})]})}},11033:(e,s,t)=>{t.d(s,{K:()=>k,c:()=>L});var n=t(6029),l=t(21377),i=t(95083),r=t(76356),o=t(41249),a=t(55729),d=t(90248),c=t(494),u=t(45860),m=t(54409),x=t(40548),p=t(10794),h=t(94604),j=t(84942),g=t(13892),f=t(82287);function v(e){let{description:s,transValue:t}=e;return(0,n.jsxs)(g.VY,{children:[s.teamName?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.lC,{original:s.teamName}),":\xa0"]}):null,t||s.text]})}function y(e){let{description:s,locale:t}=e,{data:i}=(0,u.Ay)(l.oo$.singleEntity(s.id,t));return(0,n.jsx)(v,{description:s,transValue:null==i?void 0:i.translation.value})}function b(e){let{promotion:s,locale:t}=e,{data:r}=(0,u.Ay)(l.oo$.singleEntity(s.id,t));return(0,n.jsx)(i.EY,{display:"block",textStyle:"assistive.default",color:"neutrals.nLv3",lineHeight:1,children:(null==r?void 0:r.translation.value)||s.text})}function w(e){let{descriptions:s,locale:t}=e;return s&&s.length&&t?"en"===t?(0,n.jsx)(n.Fragment,{children:s.map(e=>(0,n.jsx)(v,{description:e},e.id))}):(0,n.jsx)(n.Fragment,{children:s.map(e=>(0,n.jsx)(y,{description:e,locale:t},e.id))}):null}let I=(e,s)=>{let{colors:t}=(0,a.useContext)(f.C),[n,l,i]=(0,a.useMemo)(()=>{let n=[],l=[],i={};return e.rows.forEach(e=>{var r;e.descriptions&&n.push(...e.descriptions.map(t=>({...t,teamName:(0,j.s)(e.team,s)}))),(null==(r=e.promotion)?void 0:r.text)&&!i[e.promotion.id]&&(l.push(e.promotion),i[e.promotion.id]=t[e.team.id])}),[n,l,i]},[e.rows]);return{rowDescriptions:n,rowPromotions:l,promotionColors:i,tieBreakingRules:e.tieBreakingRule?[e.tieBreakingRule]:[]}},S=e=>{let{children:s,defaultOpenedFirstRules:t}=e;return(0,n.jsx)(o.nD,{children:(0,n.jsxs)(o.nD.Item,{bg:"surface.s2",br:"sm",defaultOpened:t,children:[(0,n.jsx)(o.nD.Trigger,{bg:"transparent",children:(0,n.jsx)(i.EY,{textStyle:"display.small",children:(0,n.jsx)(d.A,{id:"rules"})})}),(0,n.jsx)(o.nD.Content,{children:(0,n.jsx)(i.EY,{textStyle:"body.small",display:"block",px:"md",pb:"md",children:s})})]})})},C=e=>{let{locale:s,descriptions:t,rowDescriptions:l,rowPromotions:i,tieBreakingRules:o,promotionColors:a,defaultOpenedFirstRules:d}=e;return(0,n.jsx)(r.az,{px:"sm",pb:"md",children:(0,n.jsx)(S,{defaultOpenedFirstRules:d,children:(0,n.jsxs)(r.so,{direction:"column",gap:"sm",children:[(0,n.jsx)("div",{children:i.map(e=>(0,n.jsxs)(r.so,{align:"center",h:"xl",children:[(0,n.jsx)(r.so,{justify:"center",align:"center",w:"xl",children:(0,n.jsx)(r.az,{h:"sm",w:"sm",br:"50%",style:{background:a[e.id]}})}),(0,n.jsx)(b,{promotion:e,locale:s})]},e.id))}),(0,n.jsx)(w,{descriptions:l,locale:s}),(0,n.jsx)(w,{descriptions:t,locale:s}),(0,n.jsx)(w,{descriptions:o,locale:s})]})})})};function k(e){var s;let t=(0,c.d4)(p.JV),{isMobile:l}=(0,i.$c)(),{rowDescriptions:o,rowPromotions:a,tieBreakingRules:u,promotionColors:h}=I(e,t),j=!!(o.length||(null==(s=e.descriptions)?void 0:s.length)||u.length);return j||a.length?l?(0,n.jsx)(r.az,{pt:"md",children:(0,n.jsx)(C,{locale:t,descriptions:e.descriptions,rowDescriptions:o,rowPromotions:a,tieBreakingRules:u,promotionColors:h,defaultOpenedFirstRules:e.defaultOpenedFirstRules})}):(0,n.jsx)(r.az,{p:"sm",borderTop:[e.noDivider?void 0:"neutrals.nLv4",void 0],children:(0,n.jsxs)(r.so,{br:"sm",py:"sm",px:{mdDown:"sm",md:"lg"},pt:{md:"sm"},direction:"column",children:[a.length>0&&(0,n.jsxs)(r.so,{align:"center",mb:"md",children:[(0,n.jsx)(m.G_L,{w:"24",h:"24",fill:"onSurface.nLv3",mr:"lg"}),(0,n.jsx)(r.az,{children:(0,n.jsx)(i.EY,{lineHeight:"32px",textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,n.jsx)(d.A,{id:"standings.promotionInfo",values:{isMobile:l}})})})]}),j&&(0,n.jsxs)(x.N,{children:[(0,n.jsx)(w,{descriptions:o,locale:t}),(0,n.jsx)(w,{descriptions:e.descriptions,locale:t}),(0,n.jsx)(w,{descriptions:u,locale:t})]})]})}):null}function L(e){var s;let t=(0,c.d4)(p.JV),{isMobile:l}=(0,i.$c)(),{rowDescriptions:o,rowPromotions:a,tieBreakingRules:d,promotionColors:u}=I(e,t),m=!!(o.length||(null==(s=e.descriptions)?void 0:s.length)||d.length);return m&&0!==a.length?l?(0,n.jsx)(r.az,{pt:"md",children:(0,n.jsx)(C,{locale:t,descriptions:e.descriptions,rowDescriptions:o,rowPromotions:a,tieBreakingRules:d,promotionColors:u})}):(0,n.jsxs)(r.az,{px:"sm",children:[(0,n.jsx)(r.az,{pt:"sm",pb:{mdDown:"sm"},mb:{mdDown:"sm"},children:a.map(e=>(0,n.jsxs)(r.so,{align:"center",h:"2xl",gap:"sm",children:[(0,n.jsx)(r.so,{justify:"center",align:"center",h:"xl",w:"xl",children:(0,n.jsx)(r.az,{h:"sm",w:"sm",br:"50%",style:{background:u[e.id]}})}),(0,n.jsx)(b,{promotion:e,locale:t})]},e.id))}),(0,n.jsx)(r.so,{br:"sm",py:"sm",px:["sm","lg"],pt:{base:"sm",mdDown:void 0},direction:"column",children:m&&(0,n.jsxs)(x.N,{pb:"xs",children:[(0,n.jsx)(w,{descriptions:o,locale:t}),(0,n.jsx)(w,{descriptions:e.descriptions,locale:t}),(0,n.jsx)(w,{descriptions:d,locale:t})]})})]}):(0,n.jsx)(r.az,{h:"sm"})}},13892:(e,s,t)=>{t.d(s,{FF:()=>a,VY:()=>o,fh:()=>r});var n=t(62042),l=t(76356);let i=(0,n.Fj)({base:{display:"flex",alignItems:"center",position:"relative",textStyle:"table.medium",padding:"sm",height:{base:"4xl",md:"2xl"},_selected:{backgroundColor:"neutral.highlight"},_hover:{backgroundColor:"surface.s2"}},variants:{team:{none:{},home:{backgroundColor:"secondary.highlight",borderLeft:"xs solid {colors.secondary.default}",paddingLeft:"xs"},away:{backgroundColor:"primary.highlight",borderLeft:"xs solid {colors.primary.default}",paddingLeft:"xs"}}}}),r=(0,l.I4)("div",i),o=(0,l.I4)("p",{base:{margin:"0",padding:"0","& + &":{marginTop:"xs"}}}),a=(0,l.I4)("div",{base:{"& button":{border:"1px solid {colors.surface.s2}",paddingLeft:"xs",paddingRight:"xs","& svg":{margin:"0"},"& svg:nth-child(2)":{display:"none"}}}})},40548:(e,s,t)=>{t.d(s,{N:()=>d});var n=t(6029),l=t(95083),i=t(41249),r=t(55729),o=t(90248),a=t(54409);function d(e){let{children:s,closedHeight:t=64,...d}=e,[c,u]=(0,r.useState)(!1),[m,x]=(0,r.useState)(0),p=(0,r.useCallback)(()=>u(e=>!e),[]),{mediaBreakpoint:h}=(0,l.$c)(),j=(0,r.useRef)(null);(0,r.useEffect)(()=>{var e;x((null==j||null==(e=j.current)?void 0:e.scrollHeight)||0)},[j,s,h]);let g=m>t;return(0,n.jsxs)(i.az,{...d,children:[(0,n.jsx)(i.EY,{font:"body.small",color:"onSurface.nLv1",lineClamp:!c&&g?4:void 0,ref:j,as:"div",children:s}),g&&(0,n.jsx)(i.az,{cursor:"pointer",onClick:p,mt:"sm",children:(0,n.jsxs)(i.EY,{font:["assistive.default","display.small"],color:"primary.default",align:"right",hover:!0,as:"div",children:[(0,n.jsx)(o.A,{id:c?"show_less":"show_more"}),c?(0,n.jsx)(a.t8v,{ml:"xs",fill:"primary.default"}):(0,n.jsx)(a.QtO,{ml:"xs",fill:"primary.default"})]})})]})}},65457:(e,s,t)=>{t.d(s,{A:()=>u,u:()=>m});var n=t(6029),l=t(21377),i=t(95083),r=t(76356),o=t(41249),a=t(90248),d=t(54409),c=t(13892);function u(e){return e.isNarrowLayout?(0,n.jsx)(c.FF,{children:(0,n.jsx)(o.ms,{items:e.items||[...l.ur4],selectedItem:e.displayType,onSelectedItemChange:s=>{let{selectedItem:t}=s;t&&e.setDisplayType(t)},renderItem:(e,s)=>s?(0,n.jsx)(d.NwX,{fill:"onSurface.nLv1"}):(0,n.jsx)(a.A,{id:"standings."+e}),menuLabel:(0,n.jsx)(a.A,{id:"standings.appearance"}),alignRight:!0,buttonStyle:{width:36,height:36,zIndex:o.Py.Backdrop}})}):null}function m(e){let{displayType:s,setDisplayType:t,items:l,isNarrowLayout:o}=e;return(0,n.jsxs)(r.so,{justify:"space-between",p:"sm",borderBottom:"neutrals.nLv4",children:[(0,n.jsxs)(r.az,{children:[(0,n.jsx)(i.EY,{display:"block",textStyle:"assistive.default",color:"neutrals.nLv1",pt:"2xs",children:(0,n.jsx)(a.A,{id:"standings.appearance"})}),(0,n.jsx)(i.EY,{display:"block",textStyle:"body.small",color:"neutrals.nLv3",children:(0,n.jsx)(a.A,{id:"standings.appearance.select"})})]}),(0,n.jsx)(u,{displayType:s,setDisplayType:t,items:l,isNarrowLayout:o})]})}},69435:(e,s,t)=>{t.d(s,{P:()=>i});var n=t(78383),l=t.n(n);let i=(0,t(55729).createContext)({isNarrowLayout:!0,uniqueTournamentId:void 0,seasonId:void 0,displayTypeOptions:void 0,displayType:"short",setDisplayType:l(),standings:[],homeTeamId:void 0,awayTeamId:void 0,selectedTeamId:void 0,hasPerformanceGraphFeature:!1,hasHomeAwayStandings:!1,tournamentId:void 0,currentSeason:void 0})},82287:(e,s,t)=>{t.d(s,{C:()=>r,R:()=>o});var n=t(6029),l=t(55729),i=t(67149);let r=(0,l.createContext)({colors:{},texts:{}}),o=e=>{let{standings:s,children:t}=e,[o,a]=(0,l.useMemo)(()=>{let e=s.rows.map(e=>({...e.promotion,teamId:e.team.id})).filter(e=>!!e.id);return[(0,i.oB)(e),e.reduce((e,s)=>(e[s.teamId]=s.text,e),{})]},[null==s?void 0:s.id]);return(0,n.jsx)(r.Provider,{value:{colors:o,texts:a},children:t})}}}]);