!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]="bcbe089f-0cf6-41ae-9f20-1678543b89d0",e._sentryDebugIdIdentifier="sentry-dbid-bcbe089f-0cf6-41ae-9f20-1678543b89d0")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3554],{3468:(e,t,s)=>{s.d(t,{C:()=>l});var r=s(55729),n=s(62827);let l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e3,t=(0,r.useRef)(!1);return(0,r.useCallback)((s,r)=>{t.current||(t.current=!0,setTimeout(()=>{t.current=!1},e),(0,n.MZ)(s,r))},[])}},3881:(e,t,s)=>{s.d(t,{E:()=>a});var r=s(64082),n=s(6029),l=s(99064),i=s(43451);function a(e){var{height:t=800,width:s="100%",rowHeight:a=45,wrapperStyle:o={},rows:d,animate:c=!1,rowGap:u=8,uniqueKey:x}=e,p=(0,r.T)(e,["height","width","rowHeight","wrapperStyle","rows","animate","rowGap","uniqueKey"]);return 0===t?null:(0,n.jsx)(l.az,Object.assign({maxW:"100%",bg:"surface.s1",overflow:"hidden"},p,{style:o},{children:(0,n.jsx)(i.D,Object.assign({animate:c,width:s,height:d&&a?d*(a+u):t,uniqueKey:x},{children:(0,n.jsx)(n.Fragment,{children:d?Array(d).fill(null).map((e,t)=>(0,n.jsx)("rect",{x:0,y:t*(a+u),width:"100%",height:a},t)):(0,n.jsx)("rect",{x:0,y:0,width:"100%",height:t})})}))}))}},6198:(e,t,s)=>{s.d(t,{iC:()=>eW,GN:()=>tf,Aw:()=>eJ,iy:()=>j,bj:()=>es,ET:()=>eD,Ay:()=>eO});var r=s(6029),n=s(32523),l=s(44194),i=s(76356),a=s(55729),o=s(90248),d=s(90510),c=s(494),u=s(65789),x=s(88339);function p(e){let{children:t}=e;return(0,r.jsx)(i.so,{direction:"column",gap:"sm",bg:"[linear-gradient(180deg, rgba(55, 77, 245, 0.40) 0%, rgba(55, 77, 245, 0.00) 100%)]",pt:{md:"lg"},br:{md:"xl"},pb:"sm",children:t})}var h=s(70679),m=s(89642),g=s(33752);function j(){let{userId:e,userAccount:t}=(0,a.useContext)(m.t),s=(0,c.d4)(x.$F),n=e===(null==s?void 0:s.id),l=n?null==s?void 0:s.nickname:null==t?void 0:t.nickname;return(0,r.jsx)(i.az,{px:{base:"lg",md:"0"},py:"md",children:(0,r.jsxs)(g.B,{children:[(0,r.jsx)(g.B.Item,{children:(0,r.jsx)(o.A,{id:n?"profile_my_profile":"app.profile"})}),(0,r.jsx)(g.B.Item,{children:l})]})})}var f=s(21377),v=s(99064),y=s(947),b=s(54409),_=s(54053),w=s(8476),k=s(61836),S=s(25862),A=s(45860),C=s(41735),E=s(40528),F=s(3468),T=s(52679);let H={[f.lqH.Predictor]:"profile_badge_top_predictor",[f.lqH.Crowdsourcer]:"user_status_contributor",[f.lqH.Editor]:"user_status_editor",[f.lqH.Moderator]:"basic.moderator"},I=e=>{let{badgeType:t,isActive:s,disabled:n,blocked:a,onClick:d}=e,{colors:c}=(0,C.useTheme)(),u=t?H[t]:"profile_badge_selection_no_badge",x=(0,F.C)();return u?(0,r.jsxs)(i.az,{br:"sm",minH:"6xl",position:"relative",onClick:()=>{if(!a)return n?void x((0,r.jsx)(E.y,{font:"display.small",messageId:"profile_badge_toast_message_text"})):d()},border:"1px solid",borderColor:s&&!a?"primary.default":"neutrals.nLv3",bg:{base:s&&!a?"primary.highlight":"surface.s2",_hover:n||a||s?void 0:"surface.s0"},cursor:n||a?"not-allowed":s?void 0:"pointer",children:[(0,r.jsxs)(i.so,{align:"center",justify:"center",direction:"column",gap:"sm",py:"sm",px:"xs",children:[t?(0,r.jsx)(T.A,{userBadge:t,bg:n||a?c.onSurface.nLv3:void 0,size:24}):(0,r.jsx)(b.Cfq,{fill:a?"onSurface.nLv3":"onSurface.nLv2"}),(0,r.jsx)(l.EY,{userSelect:"none",color:n||a?"neutrals.nLv3":"neutrals.nLv1",children:(0,r.jsx)(o.A,{id:u})})]}),s&&(0,r.jsx)(i.az,{position:"absolute",top:"xs",end:"xs",children:(0,r.jsx)(b.sk6,{fill:a?"onSurface.nLv3":"primary.default",isRtlPrevented:!0})})]}):null};function M(e){var t;let{newBadge:s,setNewBadge:n}=e,d=(0,c.d4)(x.$F),u=(null==d?void 0:d.userBadge)===f.lqH.Moderator,{data:p}=(0,A.Ay)(d?f.oJZ.badges(d.id):null),[h,m]=(0,a.useState)(null!=(t=null==d?void 0:d.userBadge)?t:void 0),g=Object.values(f.lqH);return(0,a.useEffect)(()=>{h!==s&&n(h)},[h]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.az,{p:"lg",children:[(0,r.jsx)(l.EY,{display:"block",textStyle:"display.medium",textAlign:"center",color:u?"neutrals.nLv3":"neutrals.nLv1",children:(0,r.jsx)(o.A,{id:"profile_badges"})}),(0,r.jsx)(l.EY,{display:"block",textStyle:"assistive.default",textAlign:"center",color:"neutrals.nLv3",mt:"2xs",children:(0,r.jsx)(o.A,{id:"profile_badges_description"})})]}),(0,r.jsxs)(i.xA,{columns:2,gap:"sm",px:"lg",children:[(0,r.jsx)(I,{onClick:()=>{(null==d?void 0:d.userBadge)===void 0?m(void 0):h&&"no_badge"!==h&&m("no_badge")},isActive:!h||"no_badge"===h,blocked:u}),g.map(e=>(0,r.jsx)(I,{badgeType:e,isActive:h===e,disabled:!(null==p?void 0:p.badges.includes(e)),blocked:u,onClick:()=>m(e)},e))]})]})}function L(e){let{isOpen:t,setIsOpen:s,nickname:n,isChatModerator:d,image:u}=e,p=(0,c.wA)(),m=(0,y.A)(),g=(0,c.d4)(x.$F),[j,f]=(0,a.useState)(null),[A,C]=(0,a.useState)(),[E,F]=(0,a.useState)(null),[H,I]=(0,a.useState)(null),L=(0,c.d4)(x.gw),z=(null==g?void 0:g.providerType)?String(null==g?void 0:g.providerType).charAt(0).toUpperCase()+String(null==g?void 0:g.providerType).slice(1):null;return(0,a.useEffect)(()=>{L===n&&(f(L),s(!1))},[L]),(0,r.jsx)(_.A,{isOpen:t,width:360,setIsOpen:s,renderAdPlaceholder:!1,header:(0,r.jsx)(i.az,{h:"xl"}),footer:(0,r.jsxs)(i.so,{justify:"flex-end",my:"sm",px:"lg",gap:"lg",children:[(0,r.jsx)(l.$n,{variant:"clear",onClick:()=>s(!1),children:(0,r.jsx)(o.A,{id:"basic.cancel"})}),(0,r.jsx)(l.$n,{variant:"filled",onClick:()=>{j&&p((0,w.fV)(j)),E&&p((0,w.bs)(E)),void 0!==A&&(null==g?void 0:g.userBadge)!==A&&(p((0,w.U1)("no_badge"===A?null:A)),(0,k.ke)({action:"change_badge",location:"profile",type:A||"no_badge"})),j===n&&s(!1)},children:(0,r.jsx)(o.A,{id:"basic.save"})})]}),children:(0,r.jsxs)(i.az,{bg:"surface.sp",br:"lg",w:"100%",maxW:"[360px]",pb:"lg",mx:"auto",children:[(0,r.jsxs)(i.so,{direction:"column",align:"center",gap:"md",mb:"lg",p:"lg",children:[(0,r.jsxs)(i.az,{position:"relative",children:[(0,r.jsx)(h.A,{size:150,src:H||u}),(0,r.jsxs)(i.az,{position:"absolute",bottom:"0",right:"0",children:[void 0===A&&(null==g?void 0:g.userBadge)&&(0,r.jsx)(T.A,{userBadge:null==g?void 0:g.userBadge}),A&&"no_badge"!==A&&(0,r.jsx)(T.A,{userBadge:A})]})]}),(0,r.jsxs)(i.I4.label,{cursor:"pointer",children:[(0,r.jsx)(l.EY,{textStyle:"assistive.default",color:"primary.default",p:"xs",cursor:"pointer",children:(0,r.jsx)(o.A,{id:"change_profile_picture"})}),(0,r.jsx)(i.I4.input,{type:"file",accept:"image/*",display:"none",onChange:e=>{if(e.target&&"files"in e.target){var t;let s=null==(t=e.target.files)?void 0:t[0];if(s){if(s.size>5e7)return void p((0,S.aT)({msgId:"profile_image_error_too_large",toastOptions:{autoClose:3e3,closeButton:!0}}));F(s),I(URL.createObjectURL(s))}}}})]})]}),d&&(0,r.jsxs)(i.so,{mb:"lg",mx:"lg",bg:"surface.s2",br:"lg",py:"md",px:"lg",gap:"lg",children:[(0,r.jsx)(i.az,{children:(0,r.jsx)(b.G_L,{fill:"onSurface.nLv3"})}),(0,r.jsx)(l.EY,{textStyle:"body.small",children:(0,r.jsx)(o.A,{id:"moderators_nickname_edit_restriction"})})]}),(0,r.jsx)(l.pd,{px:"lg",label:(0,r.jsx)(o.A,{id:"nickname_hint"}),value:null===j?n:j,onChange:e=>f(e),disabled:d,maxLength:30}),g&&z&&(0,r.jsxs)(i.so,{py:"xs",px:"lg",align:"center",minH:"3xl",gap:"sm",mb:"sm",children:[(0,r.jsx)(i.az,{w:"lg",h:"lg",children:(0,r.jsx)(b.zzQ,{w:16,h:16,fill:"onSurface.nLv1"})}),(0,r.jsx)(l.EY,{color:"neutrals.nLv3",textStyle:"body.small",lineHeight:1,children:(0,r.jsx)(o.A,{id:"profile_account_creation_info",values:{platformName:z,date:m.formatDate(1e3*g.createdTimestamp,{dateStyle:"medium"})}})})]}),(0,r.jsx)(v.cG,{}),(0,r.jsx)(M,{newBadge:A,setNewBadge:C})]})})}var z=s(76868),D=function(e){return e.Reason="Reason",e.Confirm="Confirm",e}({}),V=function(e){return e.TooMany="too-many",e.NoValue="no-value",e.SomethingElse="something-else",e}({});function P(e){let{activeStep:t,onClose:s,onContinueClick:n,isContinueDisabled:a,isSubmitDisabled:d}=e;switch(t){case D.Reason:return(0,r.jsxs)(i.so,{justify:"flex-end",m:"lg",children:[(0,r.jsx)(i.az,{hideBelow:"md",children:(0,r.jsx)(l.$n,{type:"button",variant:"clear",onClick:s,children:(0,r.jsx)(o.A,{id:"close"})},"close")}),(0,r.jsx)(l.$n,{type:"button",variant:"filled",onClick:n,disabled:a,ms:"lg",children:(0,r.jsx)(o.A,{id:"basic.continue"})},"continue")]});case D.Confirm:return(0,r.jsxs)(i.so,{gap:"lg",wrap:"wrap",justify:"flex-end",m:"lg",children:[(0,r.jsx)(i.az,{hideBelow:"md",children:(0,r.jsx)(l.$n,{type:"button",variant:"clear",onClick:s,children:(0,r.jsx)(o.A,{id:"button_not_delete"})},"not-delete")}),(0,r.jsx)(l.$n,{type:"submit",variant:"filled",disabled:d,children:(0,r.jsx)(o.A,{id:"user.confirmDelete"})},"submit")]});default:return null}}function Y(e){let{activeStep:t}=e;return(0,r.jsxs)(i.az,{md:{px:"lg",pb:"sm",pt:"lg"},children:[t===D.Reason&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.EY,{display:"block",textStyle:"display.large",children:(0,r.jsx)(o.A,{id:"delete_account_main_reason"})}),(0,r.jsx)(l.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,r.jsx)(o.A,{id:"select_one"})})]}),t===D.Confirm&&(0,r.jsx)(l.EY,{textStyle:"display.large",children:(0,r.jsx)(o.A,{id:"user.deleteAccount"})})]})}function O(e){let{options:t,currentValue:s,onChange:n}=e,l=(0,y.A)();return(0,r.jsx)(r.Fragment,{children:t.map(e=>(0,r.jsx)(v.a,{id:e.value,name:"delete-reason",label:l.formatMessage({id:e.label}),value:e.value,checked:s===e.value,onChange:()=>n(e),gap:"lg",py:"md",px:"lg"},e.value))})}let W={[V.NoValue]:"too_many_accounts",[V.TooMany]:"dont_see_value",[V.SomethingElse]:"something_else"};function B(e){let{isOpen:t,setIsOpen:s}=e,n=(0,y.A)(),o=(0,c.wA)(),d=(0,c.d4)(x.Cd),[u,p]=(0,a.useState)(D.Reason),[h,m]=(0,a.useState)(!1),[g,j]=(0,a.useState)(""),[v,b]=(0,a.useState)("");(0,a.useEffect)(()=>{t&&(0,k.Ex)({source:"other",type:"delete_account"})},[t]);let S=async e=>{e.preventDefault(),m(!0);try{if(g===V.SomethingElse&&v&&d){let e=new FormData,t=window.navigator.platform||window.navigator.userAgent,s=window.navigator.userAgent,r=JSON.stringify({feedback:v,os:t,phoneModel:s,type:1});e.append("payload",r),await f.QHp.postFeedback(e,d)}}finally{(0,k.t9)({source:"other",type:"delete_account",action:"cta_click",choice:W[g]||""}),s(!1),m(!1),o((0,w.mN)())}};return(0,r.jsx)(_.A,{isOpen:t,setIsOpen:s,renderAdPlaceholder:!1,header:(0,r.jsx)(Y,{activeStep:u}),footer:null,children:(0,r.jsxs)("form",{method:"post",onSubmit:S,children:[(0,r.jsxs)(i.az,{w:{md:"[400px]"},mx:"auto",children:[u===D.Reason&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(O,{options:[{label:"delete_account_reason_too_many",value:V.TooMany},{label:"delete_account_reason_no_value",value:V.NoValue},{label:"delete_account_reason_something",value:V.SomethingElse}],onChange:e=>j(e.value),currentValue:g}),g===V.SomethingElse&&(0,r.jsxs)(i.az,{mx:"lg",mb:{mdDown:"lg"},children:[(0,r.jsx)(l.fs,{name:"delete-reason",label:n.formatMessage({id:"hint_text_field"}),maxLength:300,height:"10xl",value:v,onChange:e=>b(e),resize:!1}),(0,r.jsxs)(l.EY,{display:"block",mt:"2xs",textStyle:"assistive.default",color:"neutrals.nLv3",textAlign:"end",children:[v.length,"/",300]})]})]}),u===D.Confirm&&(0,r.jsx)(z.p,{graphic:"chat",titleMessageId:"delete_account_offboarding_title",descriptionMessageId:"delete_account_offboarding_description"})]}),(0,r.jsx)(P,{activeStep:u,onContinueClick:()=>p(D.Confirm),onClose:()=>{s(!1),(0,k.t9)({source:"other",type:"delete_account",action:"close"})},isContinueDisabled:!g,isSubmitDisabled:h})]})})}let U=e=>{let{onClick:t,children:s}=e;return(0,r.jsx)(i.so,{h:"4xl",gap:"lg",px:"lg",align:"center",bg:{_hover:"surface.s2"},cursor:"pointer",onClick:t,children:s})},K=e=>{let{onModalToggle:t}=e,s=(0,c.wA)(),[n,d]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{t(n)},[n]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.az,{py:"sm",children:[(0,r.jsxs)(U,{onClick:()=>s((0,S.aS)()),children:[(0,r.jsx)(b.EwR,{w:24,h:24,fill:"onSurface.nLv3"}),(0,r.jsx)(l.EY,{children:(0,r.jsx)(o.A,{id:"user.signOut"})})]}),(0,r.jsxs)(U,{onClick:()=>d(!0),children:[(0,r.jsx)(b.xV8,{w:24,h:24,fill:"error.default"}),(0,r.jsx)(l.EY,{color:"status.error.default",children:(0,r.jsx)(o.A,{id:"user.deleteAccount"})})]})]}),(0,r.jsx)(B,{isOpen:n,setIsOpen:d})]})};function R(){let[e,t]=(0,a.useState)(!1),[s,n]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{t(s)},[s]),(0,r.jsx)(v.AM,{trigger:(0,r.jsx)(v.AM.TriggerWrapper,{children:(0,r.jsx)(i.az,{p:"2xs",w:"[28px]",h:"[28px]",children:(0,r.jsx)(b.Hop,{fill:"primary.default",w:24,h:24})})}),controls:[e,t],closeOnOutsideClick:!s,children:(0,r.jsx)(v.AM.Content,{right:0,minW:180,p:0,elevation:3,br:"lg",children:(0,r.jsx)(K,{onModalToggle:e=>n(e)})})})}var Z=s(62827);function q(e){let{userId:t}=e,{isMobile:s}=(0,l.$c)(),[n,d]=(0,a.useState)(!1),c=window.location.origin+f.oJZ.profile(t),u=(0,a.useCallback)(async()=>{!n&&(d(!0),setTimeout(()=>{d(!1)},3e3),(0,k.oD)("profile"),s&&navigator.share?navigator.share({title:"Sofascore profile share",url:c}):"writeText"in window.navigator.clipboard&&(await window.navigator.clipboard.writeText(c),(0,Z.MZ)((0,r.jsxs)(i.so,{align:"center",gap:"lg",children:[(0,r.jsx)(b.G_L,{fill:"surface.s1"}),(0,r.jsx)(l.EY,{display:"block",color:"surface.s1",textStyle:"display.small",children:(0,r.jsx)(o.A,{id:"basic.copiedToClipboard"})})]}))))},[s,n]);return(0,r.jsx)(l.K0,{onClick:u,variant:"clear",size:"primary",children:(0,r.jsx)(b.VJ,{fill:"primary.default",isRtlPrevented:!0})})}function $(){let e=(0,c.d4)(x.$F),{userAccount:t}=(0,a.useContext)(m.t),[s,n]=(0,a.useState)(!1),d=(null==e?void 0:e.id)===(null==t?void 0:t.id);return t&&e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.so,{gap:"sm",align:"center",children:[d&&(0,r.jsx)(l.$n,{variant:"outline",size:"tertiary",onClick:()=>n(!s),children:(0,r.jsx)(l.EY,{color:"primary.default",textStyle:"assistive.default",children:(0,r.jsx)(o.A,{id:"edit"})})}),(0,r.jsx)(q,{userId:t.id}),d&&(0,r.jsx)(R,{})]}),d&&(0,r.jsx)(L,{isOpen:s,setIsOpen:n,nickname:e.nickname,isChatModerator:e.userBadge===f.lqH.Moderator,image:e.imageURL})]}):null}let N={[f.lqH.Predictor]:{title:"profile_badge_top_predictor_info",text:"profile_badge_top_predictor_info_description"},[f.lqH.Editor]:{title:"editor_badge_title",text:"editor_badge_text"},[f.lqH.Crowdsourcer]:{title:"contributor_badge_title",text:"contributor_badge_text"},[f.lqH.Moderator]:{title:"moderator_badge_title",text:"moderator_badge_text"}};function G(e){let{isOpen:t,setIsOpen:s,userBadge:n}=e,a=(0,c.d4)(x.$F),{title:d,text:u}=N[n]||{};return(0,r.jsx)(_.A,{isOpen:t,setIsOpen:s,renderAdPlaceholder:!1,header:(0,r.jsx)(i.az,{m:"lg",mt:{base:"sm",md:"lg"},children:(0,r.jsx)(l.EY,{textStyle:"display.large",children:d&&(0,r.jsx)(o.A,{id:d})})}),footer:null,children:(0,r.jsxs)(i.so,{direction:"column",px:"lg",py:"sm",gap:"xl",maxW:{md:"[350px]"},children:[(0,r.jsx)(i.so,{justify:"center",children:(0,r.jsx)(T.A,{userBadge:n})}),(0,r.jsx)(l.EY,{textStyle:"body.mediumParagraph",children:u&&(0,r.jsx)(o.A,{id:u})}),!(null==a?void 0:a.editor)&&n===f.lqH.Editor&&(0,r.jsxs)(l.Mz,{w:"fit",href:"https://torneo.sofascore.com",target:"_blank",rel:"noreferrer",children:[(0,r.jsx)(l.EY,{textStyle:"display.small",color:"primary.default",me:"xs",userSelect:"none",children:(0,r.jsx)(o.A,{id:"editor_badge_cta_link"})}),(0,r.jsx)(b.HW5,{})]}),(0,r.jsx)(i.so,{justify:"center",mb:"xl",children:(0,r.jsx)(l.$n,{w:"100%",onClick:()=>s(!1),children:(0,r.jsx)(o.A,{id:"got_it_button"})})})]})})}let J={[f.lqH.Moderator]:"basic.moderator",[f.lqH.Predictor]:"profile_badge_top_predictor",[f.lqH.Editor]:"user_status_editor",[f.lqH.Crowdsourcer]:"user_status_contributor"};function Q(e){let{userAccount:t,...s}=e,n=J[t.userBadge];return n?(0,r.jsx)(l.EY,{...s,children:(0,r.jsx)(o.A,{id:n})}):null}function X(e){let{userAccount:t}=e,[s,n]=(0,a.useState)(!1);return Object.values(f.lqH).includes(t.userBadge)?(0,r.jsxs)(i.so,{py:"xs",px:"sm",br:"xl",gap:"xs",bg:{base:"surface.s0",_hover:"surface.s1"},role:"button",cursor:"pointer",w:"fit",onClick:()=>n(!0),children:[(0,r.jsx)(T.A,{userBadge:t.userBadge,size:16}),(0,r.jsx)(Q,{userAccount:t,textStyle:"assistive.default"}),(0,r.jsx)(G,{isOpen:s,setIsOpen:n,userBadge:t.userBadge})]}):(0,r.jsx)(i.az,{w:"lg"})}function ee(e){let{userAccount:t}=e,s=t.userBadge===f.lqH.Moderator,n=t.userBadge===f.lqH.Editor&&t.editor;return(0,r.jsxs)(i.az,{overflow:"hidden",children:[(0,r.jsx)(l.EY,{textStyle:"display.large",lineClamp:2,overflowWrap:"anywhere",title:t.nickname,children:t.nickname}),!s&&n&&(0,r.jsx)(l.EY,{display:"block",mt:"2xs",textStyle:"assistive.default",title:t.editorName,truncate:!0,children:t.editorName})]})}function et(e){let{children:t}=e,{isMobile:s}=(0,l.$c)();return(0,r.jsx)(u.HH,{isCard:!s,children:(0,r.jsx)(i.az,{bg:{mdDown:"surface.s1"},children:t})})}let es=()=>{let e=(0,c.d4)(x.$F),{userAccount:t,isUserLoading:s}=(0,a.useContext)(m.t),{isMobile:u}=(0,l.$c)();if(s)return(0,r.jsx)(n.E,{uniqueKey:"user-account-info-cl",h:[270,838],br:[void 0,"lg"]});if(!t)return null;let g=(null==e?void 0:e.id)===t.id?e:t;return(0,r.jsx)(et,{children:(0,r.jsxs)(p,{children:[u&&(0,r.jsx)(j,{}),(0,r.jsxs)(i.so,{justify:"space-between",align:"center",mx:"lg",children:[(0,r.jsx)(X,{userAccount:g}),(0,r.jsxs)(l.EY,{textStyle:"assistive.micro",children:[(0,r.jsx)(o.A,{id:"profile.joinDate"})," ",(0,r.jsx)(d.XU,{value:1e3*g.createdTimestamp})]})]}),(0,r.jsx)(i.so,{h:"[110px]",py:"xs",justify:"center",align:"center",children:(0,r.jsx)(h.A,{src:g.imageURL,size:102})}),(0,r.jsxs)(i.so,{justify:"space-between",align:"center",minH:"[60px]",px:"lg",gap:"lg",children:[(0,r.jsx)(ee,{userAccount:g}),(0,r.jsx)($,{})]})]})})};var er=s(22648),en=s(37567),el=s(4967),ei=s(93338),ea=s(47146);let eo=(0,a.createContext)(null),ed=()=>{let e=(0,a.useContext)(eo);if(!e)throw Error("usePredictionsContext must be used within an PredictionsContextProvider");return e};var ec=s(70591),eu=s(23419),ex=s(94604),ep=s(49519);function eh(e){let{teamId:t,teamName:s,teamType:n,alpha2:l}=e;return n===f.YVh.Person?(0,r.jsx)(ep.w,{size:16,name:s,alt:s,alpha2:l,fallback:(0,r.jsx)(v._V,{src:"/static/images/placeholders/team.svg",width:16,height:16,alt:s})}):n===f.YVh.Regular?(0,r.jsx)(ep.p,{id:t,size:16,alt:s,isSmall:!0}):null}var em=s(75791),eg=s(2294),ej=s(98516),ef=s(62121);let ev=e=>{let{event:t,voteType:s,location:n}=e,[d,c]=(0,a.useState)(!1);return(0,r.jsxs)(i.so,{gap:"sm",children:[(0,r.jsx)(v.cG,{vertical:!0}),(0,r.jsx)(l.K0,{variant:"clear",onClick:()=>c(!0),children:(0,r.jsx)(b.GI1,{w:"24",h:"24",fill:"primary.default"})}),(0,r.jsx)(l.aF,{isOpen:d,children:(0,r.jsxs)(i.az,{w:"[312px]",bg:"surface.sp",p:"lg",br:"lg",elevation:"3",mx:"auto",children:[(0,r.jsx)(l.EY,{textStyle:"display.large",lineHeight:"24px",mb:"sm",display:"block",children:(0,r.jsx)(o.A,{id:"profile.changeVoteTooltipDescription"})}),(0,r.jsx)(l.EY,{display:"block",children:(0,r.jsx)(o.A,{id:"change_vote_watch_ad"})}),(0,r.jsxs)(i.so,{justify:"flex-end",mt:"xl",children:[(0,r.jsx)(l.$n,{variant:"clear",onClick:()=>c(!1),children:(0,r.jsx)(o.A,{id:"close_window_button"})}),(0,r.jsx)(ec.tj,{event:t,params:{editVote:"true",voteType:s},children:(0,r.jsx)(l.$n,{variant:"clear",onClick:()=>{(0,k.tN)({type:ef._7[s],location:n,id:t.id,position:(0,ef.mt)(s)||""})},children:(0,r.jsx)(o.A,{id:"pickem.continue"})})})]})]})})]})},ey={[f.rjx.WhoWillWin]:"who_will_win",[f.rjx.FirstTeamToScore]:"who_will_score_first_title",[f.rjx.WillBothTeamsScore]:"will_both_teams_score_title"};var eb=s(57126);let e_=e=>{let{correct:t,vote:s}=e;return(0,r.jsx)(i.so,{align:"center",justify:"center",mr:"sm",py:"xs",px:"sm",minW:"xl",minH:"xl",br:s.length>1?"md":"50%",bg:1===t?"status.success.default":0===t?"status.error.default":"neutrals.nLv5",children:(0,r.jsx)(l.EY,{color:-1!==t?"surface.s1":"neutrals.nLv1",textStyle:"display.small",textTransform:"uppercase",children:(0,r.jsx)(o.A,{id:s})})})},ew=e=>{let{score:t,votingEnabled:s}=e;return void 0===t?null:(0,r.jsx)(i.az,{minW:"3xl",mr:s?"sm":void 0,children:(0,r.jsxs)(l.Ym,{display:"block",textStyle:"body.small",textAlign:"end",color:t<0?"status.error.default":t>0?"status.success.default":"neutrals.nLv3",children:[t>0?"+":"",(0,ej.M)(t,2)]})})},ek=e=>{let{prediction:t,predictionVote:s,event:n,userId:a,isLastItem:d,isDaily10x:u}=e,p=(0,c.d4)(eg.BF),{location:h,color:m}=ed(),{correct:g,odds:j,voteType:v}=s,y=function(e,t){let s=(0,c.d4)(eb.xl);if(!s)return t;switch(t){case f.gbi.One:return e.homeNameCode;case f.gbi.Two:return e.awayNameCode;case f.gbi.X:return"Tie";default:return t}}(t,s.vote),_=(0,c.d4)(x.$F),w=ey[v],k=1e3*n.startTimestamp>Date.now()&&n.status.type===f.XUj.NotStarted,S=u&&0!==g;return(0,r.jsxs)(i.so,{justify:"space-between",align:"center",minH:"[44px]",px:"lg",pb:"xs",roundedBottom:d?"lg":void 0,style:{backgroundColor:ei.S.var("colors.".concat(m.card))},children:[(0,r.jsxs)(i.so,{align:"center",gap:"sm",children:[S&&(0,r.jsx)(b.W84,{width:18,height:18}),(0,r.jsx)(l.EY,{textStyle:"body.small",fontWeight:S?"bold":void 0,children:w&&(0,r.jsx)(o.A,{id:w})})]}),(0,r.jsxs)(i.so,{align:"center",children:[(0,r.jsx)(e_,{correct:g,vote:y}),"weekly_challenge"===h&&(0,r.jsx)(ew,{score:s.score,votingEnabled:k}),"predictions"===h&&!p&&(0,r.jsx)(em.c,{fractionalValue:j.fractionalValue,children:e=>(0,r.jsx)(l.EY,{textAlign:"center",minW:"4xl",color:"-"!==j.fractionalValue?"secondary.default":"neutrals.nLv3",textStyle:"table.medium",children:e})}),k&&!(0,Z.ux)(n)&&(null==_?void 0:_.id)===a&&(0,r.jsx)(ev,{event:n,voteType:v,location:h})]})]})};function eS(e,t,s){let r=(0,c.d4)(eb.xl),n=e.displayInverseHomeAwayTeams&&r,[l,i]=[e[t],e[s]];return n?[i,l]:[l,i]}function eA(e){let{prediction:t,userId:s}=e,n={id:t.eventId,slug:t.eventSlug,customId:t.customId,status:t.status,startTimestamp:t.startDateTimestamp,finalResultOnly:t.finalResultOnly,tournament:{category:{sport:{slug:t.sportSlug}}}},[o,c]=eS(t,"homeTeamId","awayTeamId"),[u,x]=eS(t,"homeTeamName","awayTeamName"),[p,h]=eS(t,"homeTeamType","awayTeamType"),[m,g]=eS(t,"homeTeamAlpha2","awayTeamAlpha2"),{color:j}=ed(),y=(0,a.useContext)(eu.k);return(0,r.jsxs)(i.az,{mx:"sm",children:[(0,r.jsx)(i.az,{h:"[44px]",roundedTop:"lg",bg:{_hover:"neutrals.nLv4"},children:(0,r.jsx)(ec.tj,{event:n,children:(0,r.jsxs)(i.so,{h:"[44px]",px:"lg",pt:"xs",roundedTop:"lg",align:"center",justify:"space-between",style:{backgroundColor:ei.S.var("colors.".concat(j.card))},children:[(0,r.jsxs)(i.so,{grow:1,basis:"[0px]",align:"center",gap:{base:"xs",md:"sm"},minW:"[0px]",children:[(0,r.jsx)(eh,{teamId:o,teamName:u,teamType:p,alpha2:m}),(0,r.jsx)(l.EY,{textStyle:"display.micro",textAlign:"center",display:"block",truncate:!0,children:(0,r.jsx)(ex.lC,{original:u})})]}),(0,r.jsx)(l.EY,{color:"neutrals.nLv3",textStyle:"body.small",mx:"sm",children:(0,r.jsx)(d.ib,{value:1e3*t.startDateTimestamp})}),(0,r.jsxs)(i.so,{grow:1,basis:"[0px]",align:"center",gap:{base:"xs",md:"sm"},minW:"[0px]",justify:"flex-end",children:[(0,r.jsx)(l.EY,{textStyle:"display.micro",textAlign:"center",display:"block",truncate:!0,children:(0,r.jsx)(ex.lC,{original:x})}),(0,r.jsx)(eh,{teamId:c,teamName:x,teamType:h,alpha2:g})]})]})})}),(0,r.jsx)(i.az,{style:{backgroundColor:ei.S.var("colors.".concat(j.bg))},children:(0,r.jsx)(v.cG,{})}),[f.rjx.WhoWillWin,f.rjx.WillBothTeamsScore,f.rjx.FirstTeamToScore].map(e=>({voteType:e,predictionVote:t.votes.find(t=>t.voteType===e)})).filter(e=>{let{predictionVote:t}=e;return!!t}).map((e,l,i)=>{let{voteType:a,predictionVote:o}=e;return(0,r.jsx)(ek,{prediction:t,predictionVote:o,event:n,userId:s,isLastItem:l===i.length-1,isDaily10x:!!y&&!!(null==o?void 0:o.weeklyChallengeBonusDateTimestamp)},a)})]})}var eC=s(12047);let eE=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:48,{isBottomSheet:t}=ed(),{isDesktop:s}=(0,l.$c)(),r=(0,eC.Ay)({isInMobileTabs:!1,isSportMenuVisible:!1});return t?e:s?0:r+48+e},eF=e=>{let{userId:t,predictions:s,date:n}=e,{color:a,location:c,activeTab:u}=ed(),x=eE(),{isDesktop:p}=(0,l.$c)(),h=new Date,m=new Date(1e3*s[0].startDateTimestamp).setHours(h.getHours(),h.getMinutes(),h.getSeconds(),h.getMilliseconds());return(0,r.jsxs)(i.so,{direction:"column",children:[(0,r.jsx)(v.PI,{isStickingDisabled:p,zIndex:v.Py.Sticky-2,top:x,mt:"md",children:(0,r.jsxs)(i.so,{align:"center",px:"xl",py:"md",style:{backgroundColor:ei.S.var("colors.".concat(a.bg))},children:[(0,r.jsx)(ea.v,{timestamp:m,children:e=>{let t=(0,el.Ui)(new Date(n).setHours(0,0,0,0),new Date().setHours(0,0,0,0),"days");return t>-2&&t<2?(0,r.jsxs)(l.EY,{textStyle:"assistive.default",textTransform:"capitalize",children:[e+",","\xa0"]}):null}}),(0,r.jsx)(l.EY,{textStyle:"assistive.default",children:(0,r.jsx)(d.XU,{value:m,weekday:"short",day:"numeric",month:"numeric"})}),(0,r.jsx)(l.EY,{color:"neutrals.nLv3",textStyle:"body.small",ml:"auto",children:(0,r.jsx)(o.A,{id:"basic.nEvents",values:{n:s.length}})})]})}),(0,r.jsx)(i.so,{direction:"column",gap:{base:"sm",md:"predictions"===c?"md":"sm"},children:s.map(e=>(0,r.jsx)(eA,{userId:t,prediction:e},"".concat(e.eventId,"-").concat(u)))})]})};var eT=s(25442),eH=s(43072),eI=s(7643);let eM=(e,t)=>e.sort((e,s)=>t?e.startDateTimestamp-s.startDateTimestamp:s.startDateTimestamp-e.startDateTimestamp).reduce((e,t)=>{let s=new Date(1e3*t.startDateTimestamp).toDateString();return e[s]?e[s].push(t):e[s]=[t],e},[]),eL=e=>{let{userId:t,leaderboardId:s}=e,n=(0,c.wA)(),{activeTab:l}=ed(),{predictions:o,hasMore:d,error:u,isLoading:p,isValidating:h,triggerRef:m,setSize:g}=function(e,t){var s;let{activeTab:r,location:n}=ed(),{ref:l,inView:i}=(0,eH.Wx)(),o=r===eT.H.Finished,{data:d,size:c,setSize:u,isLoading:x,isValidating:p,error:h}=(0,eI.Ay)((s,r)=>{let l=null;return"weekly_challenge"===n&&t&&(l=f.rGM.predictions(t,e,o,s)),"predictions"===n&&(l=f.VfS.predictions(e,o,s)),0===s||(null==r?void 0:r.hasNextPage)?l:null},f.TtD),m=d||[],g=!!m.length&&(null==(s=m[c-1])?void 0:s.hasNextPage),j=m.reduce((e,t)=>[...e,...t.predictions],[]);return(0,a.useEffect)(()=>{i&&g&&!p&&u(e=>e+1)},[i]),{predictions:j,hasMore:g,isLoading:x,isValidating:p,error:h,triggerRef:l,setSize:u}}(t,s),j=(0,c.d4)(x.$F),y=l===eT.H.Finished,b=(0,a.useCallback)(()=>{o&&(null==j?void 0:j.id)===t&&n((0,en.UU)({predictions:o}))},[o]);if((0,a.useEffect)(()=>{b()},[o]),(0,a.useEffect)(()=>{g(1),b()},[l]),u||o&&!o.length&&!p){let e=l===eT.H.Finished?"weekly_challenge_finished_empty":"weekly_challenge_active_empty";return(0,r.jsx)(i.az,{my:"lg",mx:"auto",px:"md",w:"[320px]",h:"[250px]",children:(0,r.jsx)(z.p,{graphic:"predictions-1x2",descriptionMessageId:e})})}if(o&&o.length){let e=eM(o,!y);return(0,r.jsxs)(r.Fragment,{children:[Object.keys(e).map(s=>(0,r.jsx)(eF,{userId:t,date:s,predictions:e[s]},s)),(d||h)&&(0,r.jsx)(i.so,{justify:"center",children:(0,r.jsx)(i.az,{ref:m,py:"lg",children:(0,r.jsx)(er.a,{})})})]})}return(0,r.jsx)(i.so,{justify:"center",h:"[600px]",py:"lg",children:(0,r.jsx)(v.y$,{})})},ez=e=>{let{children:t,...s}=e,{isMobile:n}=(0,l.$c)(),{activeTab:d,setActiveTab:c,isBottomSheet:u,location:x,bottomSheetRef:p,color:h}=ed(),m=(0,a.useRef)(null),g=eE(0);return n&&"predictions"===x?(0,r.jsx)(r.Fragment,{children:t}):(0,r.jsxs)(i.so,{direction:"column",pb:{base:"sm",md:"sm"},mb:{mdDown:"md"},style:{backgroundColor:ei.S.var("colors.".concat(h.bg))},...s,children:[!u&&(0,r.jsx)(i.az,{ref:m,style:{height:40},children:(0,r.jsx)(l.EY,{display:"block",textAlign:"center",lineHeight:"24px",textStyle:"display.medium",pt:"md",pb:"xs",children:(0,r.jsx)(o.A,{id:"weekly_challenge"===x?"weekly_challenge_votes_this_week":"predictions"})})}),(0,r.jsx)(i.so,{align:"center",p:"sm",position:"sticky",zIndex:"sticky",style:{backgroundColor:ei.S.var("colors.".concat(h.bg)),height:48,top:g},children:(0,r.jsxs)(v.tU,{variant:"tertiary",initialValue:eT.H.Upcoming,value:d,onChange:e=>{c(e),u&&(null==p?void 0:p.current)&&p.current.scrollTo({top:0}),n&&!u&&m.current&&m.current.getBoundingClientRect().y-g<0&&window.scrollTo({top:m.current.offsetTop-g-40})},children:[(0,r.jsx)(v.tU.Tab,{tabKey:eT.H.Upcoming,children:(0,r.jsx)(o.A,{id:"chip_active"})}),(0,r.jsx)(v.tU.Tab,{tabKey:eT.H.Finished,children:(0,r.jsx)(o.A,{id:"finished"})})]})}),t]})},eD=e=>{let{activeTab:t,setActiveTab:s}=e,{isMobile:i}=(0,l.$c)(),{userAccount:o,isUserLoading:d}=(0,a.useContext)(m.t);return(0,r.jsx)(eo.Provider,{value:{activeTab:t,setActiveTab:s,location:"predictions",color:{bg:i?"surface.s0":"surface.s1",card:i?"surface.s1":"surface.s2"}},children:(0,r.jsx)(ez,{bg:i?"surface.s0":void 0,pb:"sm",br:{md:"xl"},children:d?(0,r.jsx)(n.E,{uniqueKey:"user-predictions-cl"}):o&&(0,r.jsx)(eL,{userId:o.id})})})};var eV=s(78383),eP=s.n(eV),eY=s(86501);function eO(){let[e,t]=(0,a.useState)(eT.H.Upcoming),s=(0,eC.Ay)({isInMobileTabs:!0,isSportMenuVisible:!1});return(0,r.jsxs)(v.tU,{onChange:s=>{e!==s&&(t(s),window.scrollTo({left:0,top:0}))},initialValue:eT.H.Upcoming,value:e,variant:"secondary",children:[(0,r.jsxs)(v.PI,{zIndex:v.Py.Sticky-1,bg:"surface.s1",p:"sm",h:48,top:s,children:[(0,r.jsx)(v.tU.Tab,{tabKey:eT.H.Upcoming,children:(0,r.jsx)(o.A,{id:"chip_active"})}),(0,r.jsx)(v.tU.Tab,{tabKey:eT.H.Finished,children:(0,r.jsx)(o.A,{id:"finished"})}),(0,r.jsx)(v.tU.Tab,{tabKey:eT.H.Statistics,children:(0,r.jsx)(o.A,{id:"statistics"})})]}),(0,r.jsx)(v.tU.Panel,{tabKey:eT.H.Upcoming,children:(0,r.jsx)(eD,{activeTab:e,setActiveTab:eP()})}),(0,r.jsx)(v.tU.Panel,{tabKey:eT.H.Finished,children:(0,r.jsx)(eD,{activeTab:e,setActiveTab:eP()})}),(0,r.jsx)(v.tU.Panel,{tabKey:eT.H.Statistics,children:(0,r.jsx)(eY._,{})})]})}function eW(e){let{isBottomSheet:t,bottomSheetRef:s}=e,n=(0,c.d4)(x.$F),[l,i]=(0,a.useState)(eT.H.Upcoming);return(null==n?void 0:n.id)&&(null==n?void 0:n.leaderboardId)?(0,r.jsx)(eo.Provider,{value:{activeTab:l,setActiveTab:i,location:"weekly_challenge",isBottomSheet:t,bottomSheetRef:s,color:{bg:t?"surface.sp":"surface.s1",card:"surface.s2"}},children:(0,r.jsx)(ez,{br:{md:"xl"},elevation:{md:"2"},children:(0,r.jsx)(eL,{userId:n.id,leaderboardId:n.leaderboardId})})}):null}var eB=s(67333),eU=s(41007),eK=s(99326),eR=s(28157),eZ=s(19451),eq=s(70355);let e$=e=>{let{textId:t,routeName:s,eventType:n,icon:a}=e;return(0,r.jsx)(ec.N_,{routeKey:eq.UE[s],children:(0,r.jsxs)(i.so,{h:"4xl",align:"center",justify:"space-between",px:"lg",py:"md",onClick:()=>(0,k.Wk)({type:n,location:"profile"}),children:[(0,r.jsxs)(i.so,{gap:"lg",align:"center",children:[a,(0,r.jsx)(l.EY,{display:"block",children:(0,r.jsx)(o.A,{id:t})})]}),(0,r.jsx)(b.zQC,{width:24,height:24,icon:"chevron-right",fill:"primary.default"})]})})};function eN(){return(0,r.jsxs)(u.Zp,{children:[(0,r.jsx)(u.Zp.Header,{titleId:"leaderboards_title"}),(0,r.jsx)(e$,{textId:"topPredictors",routeName:eZ.xW.TopPredictors,eventType:"top_predictors",icon:(0,r.jsx)(b.nJv,{fill:"onSurface.nLv1",isRtlPrevented:!0})}),(0,r.jsx)(e$,{textId:"top_contributors_leaderboard",routeName:eZ.xW.TopContributors,eventType:"top_contributors",icon:(0,r.jsx)(b.M_r,{fill:"onSurface.nLv1",isRtlPrevented:!0})}),(0,r.jsx)(e$,{textId:"top_editors_leaderboard",routeName:eZ.xW.TopEditors,eventType:"top_editors",icon:(0,r.jsx)(b.mTZ,{fill:"onSurface.nLv1",isRtlPrevented:!0})}),(0,r.jsx)(u.Zp.Footer,{defaultHeight:"sm"})]})}var eG=s(55794);function eJ(){let{userId:e}=(0,a.useContext)(m.t);return(0,r.jsxs)(i.so,{direction:"column",gap:"sm",m:"sm",children:[(0,r.jsx)(eR.A,{}),(0,r.jsx)(eK.pk,{utIds:null,logData:{location:"user_profile",type:"fantasy",action:"click"}}),(0,r.jsx)(eN,{}),(0,r.jsx)(eG.S,{}),(0,r.jsx)(eB.A,{userId:e}),(0,r.jsx)(eU.A,{userId:e})]})}var eQ=s(37377),eX=s(3881),e0=s(33480),e1=s(59721);let e4=e=>{let{managedLeague:t}=e,{uniqueTournament:s}=t;return(0,r.jsx)(ec.tQ,{tournament:s,children:(0,r.jsxs)(i.so,{align:"center",h:"4xl",minW:{md:"[360px]"},px:"lg",gap:"md",cursor:"pointer",bg:{_hover:"neutrals.nLv5"},children:[(0,r.jsx)(e1.e,{size:24,id:s.id}),(0,r.jsx)(l.EY,{display:"block",children:s.name})]})})};function e2(e){let{uniqueTournaments:t,isOpen:s,setIsOpen:n}=e;return(0,r.jsx)(_.A,{header:"profile_edited_competitions",isOpen:s,setIsOpen:n,children:(0,r.jsx)(i.az,{maxH:"[60vh]",children:t.map(e=>(0,r.jsx)(e4,{managedLeague:e},e.uniqueTournament.id))})})}let e3=e=>{let{managedLeague:t}=e,{uniqueTournament:s}=t;return(0,r.jsx)(ec.tQ,{tournament:s,children:(0,r.jsxs)(i.so,{justify:"space-between",align:"center",h:"4xl",px:"lg",cursor:"pointer",bg:{_hover:"neutrals.nLv5"},children:[(0,r.jsxs)(i.so,{gap:"md",align:"center",children:[(0,r.jsx)(e0.e,{size:24,id:s.id}),(0,r.jsx)(l.EY,{display:"block",children:s.name})]}),(0,r.jsx)(b.zQC,{icon:"chevron-right",width:24,height:24,fill:"primary.default"})]})})};function e5(){let{userId:e}=(0,a.useContext)(m.t),{data:t,isLoading:s}=(0,A.Ay)(f.VfS.managedLeagues(e)),[n,d]=(0,a.useState)(!1),c=null==t?void 0:t.uniqueTournaments,x=null==c?void 0:c.filter((e,t,s)=>s.map(e=>e.uniqueTournament.id).indexOf(e.uniqueTournament.id)===t);return s?(0,r.jsx)(eX.E,{uniqueKey:"edited-competitions-cl",h:328,br:"lg"}):(null==x?void 0:x.length)?(0,r.jsxs)(u.Zp,{isInverseDesktop:!0,children:[(0,r.jsx)(u.Zp.Header,{titleId:"profile_edited_competitions"}),null==x?void 0:x.slice(0,5).map(e=>(0,r.jsx)(e3,{managedLeague:e},e.uniqueTournament.id)),x&&x.length>5&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.so,{justify:"center",mt:"sm",children:(0,r.jsx)(l.$n,{size:"tertiary",onClick:()=>d(!0),children:(0,r.jsx)(o.A,{id:"see_all"})})}),(0,r.jsx)(e2,{isOpen:n,setIsOpen:d,uniqueTournaments:x})]}),(0,r.jsx)(u.Zp.Footer,{defaultHeight:"sm"})]}):null}var e6=s(75414);let e7=()=>{(0,k.Wk)({type:"top_editors",location:"profile"})};function e9(){return(0,r.jsx)(ec.N_,{routeKey:eq.UE[eZ.xW.TopEditors],onClick:e7,children:(0,r.jsxs)(i.so,{align:"center",justify:"space-between",py:"md",px:"lg",gap:"md",cursor:"pointer",bg:{_hover:"neutrals.nLv5"},roundedBottom:"lg",children:[(0,r.jsxs)(i.so,{gap:"md",align:"center",children:[(0,r.jsx)(T.A,{userBadge:f.lqH.Editor,size:24}),(0,r.jsx)(l.EY,{display:"block",userSelect:"none",children:(0,r.jsx)(o.A,{id:"profile_view_top_editors"})})]}),(0,r.jsx)(b.zQC,{icon:"chevron-right",width:24,height:24,fill:"primary.default"})]})})}function e8(e){let{stat:t,titleId:s}=e;return(0,r.jsxs)(i.so,{direction:"column",align:"center",justify:"center",grow:1,w:"1/2",p:"sm",br:"lg",gap:"xs",bg:{md:"surface.s2"},children:[(0,r.jsx)(l.EY,{display:"block",textAlign:"center",textStyle:{base:"display.small",md:"display.medium"},children:"string"==typeof t?t:(0,e6.A)(+(0,ej.M)(t||0))}),(0,r.jsx)(l.EY,{display:"block",textAlign:"center",textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,r.jsx)(o.A,{id:s})})]})}function te(){let{userAccount:e,isUserLoading:t,userId:s}=(0,a.useContext)(m.t),{data:n,isLoading:l}=(0,A.Ay)(f.VfS.editorEventsCount(s));if(l||t)return(0,r.jsx)(i.so,{justify:"center",py:"lg",h:{base:"[168px]",md:"[124px]"},children:(0,r.jsx)(v.y$,{})});let o=null==e?void 0:e.userEditorScoreAggregates;return o||n?(0,r.jsxs)(i.az,{bg:"surface.s1",elevation:{mdDown:"2"},br:{mdDown:"lg"},children:[(0,r.jsxs)(i.az,{py:{mdDown:"sm"},px:{mdDown:"lg"},children:[(0,r.jsxs)(i.so,{gap:{md:"sm"},mb:{md:"sm"},children:[(0,r.jsx)(e8,{stat:null==n?void 0:n.editedEvents,titleId:"profile_added_matches"}),(0,r.jsx)(e8,{stat:null==n?void 0:n.eventOpenings,titleId:"match_views"})]}),(0,r.jsxs)(i.so,{gap:{md:"sm"},children:[(0,r.jsx)(e8,{stat:(null==o?void 0:o.currentRanking)||"-",titleId:"profile_leaderboard_position"}),(0,r.jsx)(e8,{stat:null==o?void 0:o.score,titleId:"points"})]})]}),(0,r.jsxs)(i.az,{hideFrom:"md",children:[(0,r.jsx)(v.cG,{}),(0,r.jsx)(e9,{},s)]})]}):null}var tt=s(21501),ts=s(78488),tr=s(83170),tn=s(28446),tl=s(56591),ti=s(10533),ta=s(71024),to=s.n(ta);let td=to()(()=>s.e(2254).then(s.bind(s,22254)),{loadableGenerated:{webpack:()=>[22254]},loading:()=>(0,r.jsx)(n.E,{uniqueKey:"event-openings-graph-graphic-cl",h:171})}),tc=to()(()=>s.e(4140).then(s.bind(s,94140)),{loadableGenerated:{webpack:()=>[94140]},loading:()=>(0,r.jsx)(n.E,{uniqueKey:"rtl-event-openings-graph-graphic-cl",h:171})});function tu(){let[e,t]=(0,a.useState)(!1),s="rtl"===(0,a.useContext)(C.ThemeContext).settings.textDirection;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(_.A,{header:"monthly_match_views",isOpen:e,setIsOpen:t,children:(0,r.jsxs)(i.az,{w:{base:"100%",md:"[320px]"},px:"lg",children:[(0,r.jsx)(l.EY,{display:"block",textStyle:"body.mediumParagraph",pb:"lg",children:(0,r.jsx)(o.A,{id:"monthly_match_views_info_bubble"})}),(0,r.jsx)(l.EY,{display:"block",textStyle:"assistive.default",color:"neutral.default",ms:"xl",children:(0,r.jsx)(o.A,{id:"profile_number_of_match_openings"})}),(0,r.jsxs)(i.so,{align:"center",overflow:"hidden",children:[s?(0,r.jsx)(tc,{}):(0,r.jsx)(td,{}),(0,r.jsx)(l.EY,{display:"block",textStyle:"assistive.default",color:"status.val",mt:"sm",children:(0,r.jsx)(o.A,{id:"profile_all_editors_average"})})]}),(0,r.jsx)(l.EY,{display:"block",textStyle:"assistive.default",color:"neutral.default",ms:"[120px]",children:(0,r.jsx)(o.A,{id:"month"})})]})}),(0,r.jsx)(l.K0,{variant:"clear",onClick:()=>t(!0),children:(0,r.jsx)(b.G_L,{fill:"onSurface.nLv3"})})]})}function tx(e){let{points:t,avg:s}=e,{colors:n,typography:l,settings:o}=(0,C.useTheme)(),d="rtl"===o.textDirection,c=(0,y.A)(),u=(0,a.useRef)(null),x=new Date,p=new Date(x.getFullYear(),x.getMonth()-6+1,1),h=function(e,t){let s=new Date;if(!t)return[e,s].map(e=>({date:e,score:0}));let r=(0,el.ZV)(e),n=Object.keys(t).map(e=>+e),l=Math.min(...n),i=n.filter(e=>e>=r).map(e=>({date:(0,el.pp)(e),score:t[e]}));if(!i.find(t=>t.date===e)){let s=n.findIndex(e=>e>r),l=t[n[s-1]];l&&i.unshift({date:e,score:l})}return l>r&&(i.unshift({date:(0,el.pp)(l-86400),score:0}),i.unshift({date:e,score:0})),i}(p,t),m=[p,x],g=Math.ceil(Math.max(...h.map(e=>e.score))),j=[0,.33*g,.66*g,g],f=s>g,v={left:d?16:36,right:d?36:16,top:f?26:16,bottom:36};return(0,tt.st)(()=>{var e;if(!u.current)return;(0,tl.A)(u.current).selectAll("*").remove();let t=(0,tl.A)(u.current).append("svg").attr("width","100%").attr("height",116+v.bottom+v.top),r=null==(e=t.node())?void 0:e.getBoundingClientRect(),i=(null==r?void 0:r.width)||u.current.clientWidth,a=(0,tr.A)().domain(d?m.reverse():m).range([v.left,i-v.right]).clamp(!0),o=(0,tn.A)().domain([0,g]).range([116+v.top,v.top]).clamp(!0),y=d?i-v.right:v.left;t.selectAll("g.y-axis").data([null]).join("g").attr("class","y-axis").attr("transform","translate(".concat(y,", 0)")).call((d?ts.eH:ts.V4)(o).tickSize(0).tickValues(j).tickPadding(16).tickFormat(e=>(0,e6.A)(+(0,ej.M)(e.valueOf())))).attr("text-anchor","middle").call(e=>e.select(".domain").attr("stroke-width",0)),t.selectAll("g.x-axis").data([null]).join("g").attr("class","x-axis").attr("transform","translate(0, ".concat(116+v.top,")")).call((0,ts.l7)(a).ticks(6).tickSize(0).tickPadding(16).tickFormat(e=>c.formatDate(new Date(e.toString()),{month:"short"}))).call(e=>e.select(".domain").attr("stroke-width",0)),t.selectAll("g.tick").select("text").attr("color",n.onSurface.nLv3).attr("font",l.family.sofascoreSans).attr("font-weight",l.weight.medium).attr("font-size",l.size.micro),t.append("g").classed("grid",!0).selectAll("line").data(j).join("line").attr("x1",a(p)).attr("x2",a(x)).attr("y1",e=>o(e)).attr("y2",e=>o(e)).attr("stroke",n.onSurface.nLv4).attr("stroke-dasharray","4 4").attr("stroke-width","1px");let b=(0,ti.A)().x(e=>a(e.date)).y(e=>o(e.score));t.append("path").attr("stroke",n.secondary.default).attr("fill","none").attr("stroke-width","2px").attr("d",b(h)||"");let _=f?o(s)-10:o(s);t.append("g").classed("avg",!0).selectAll("line").data([null]).join("line").attr("x1",a(p)).attr("x2",a(x)).attr("y1",_).attr("y2",_).attr("stroke",n.sofaSingles.value).attr("stroke-dasharray","8 8").attr("stroke-width","2px"),t.append("text").attr("font",l.family.sofascoreSans).attr("font-weight",l.weight.medium).attr("font-size",l.size.small).attr("fill",n.sofaSingles.value).attr("x",d?i-v.right:v.left).attr("y",o(s)-(f?16:6)).text(c.formatMessage({id:"avg.lc"})+" "+(0,e6.A)(s))},200,[h]),(0,r.jsx)(i.az,{ref:u})}function tp(){let{userId:e}=(0,a.useContext)(m.t),{data:t,isLoading:s}=(0,A.Ay)(f.VfS.eventOpeningsGraph(e));return t||s?(0,r.jsxs)(u.Zp,{isInverseDesktop:!0,children:[(0,r.jsx)(u.Zp.Header,{titleId:"monthly_match_views",actionComponent:(0,r.jsx)(tu,{})}),t?(0,r.jsx)(tx,{points:t.points,avg:t.average}):(0,r.jsx)(n.E,{uniqueKey:"editor-event-openings-graph-cl",h:168,br:"lg",mx:"sm",animate:!0})]}):null}var th=s(91603),tm=s(65078);function tg(e){let{eventData:t,index:s}=e,{event:n,eventOpenings:a}=t,o=(0,tm.gm)(n,"winnerCode"),d=o===f.Jfo.Left?"neutrals.nLv1":"neutrals.nLv3",c=o===f.Jfo.Right?"neutrals.nLv1":"neutrals.nLv3",[u,x]=(0,tm.jr)(n,"homeTeam","awayTeam"),[p,h]=(0,tm.jr)(n,"homeScore","awayScore");return(0,r.jsx)(i.az,{cursor:"pointer",bg:{_hover:"neutrals.nLv5"},children:(0,r.jsx)(ec.tj,{event:n,children:(0,r.jsxs)(i.so,{pl:"lg",pr:"md",h:"4xl",align:"center",children:[(0,r.jsxs)(l.Ym,{minW:"xl",textAlign:"center",textStyle:"body.small",children:[s+1,"."]}),(0,r.jsx)(v.cG,{vertical:!0,mx:"sm",my:"6px"}),(0,r.jsx)(i.az,{flexGrow:"1",overflow:"hidden",children:(0,r.jsxs)(i.so,{direction:"column",gap:"2xs",children:[(0,r.jsxs)(i.so,{justify:"space-between",children:[(0,r.jsxs)(i.so,{grow:1,align:"center",gap:"sm",overflowX:"hidden",children:[(0,r.jsx)(th.p,{size:16,id:u.id}),(0,r.jsx)(l.Ym,{color:d,textStyle:"body.medium",truncate:!0,children:(0,r.jsx)(ex.Rm,{team:u})})]}),(0,r.jsx)(l.EY,{display:"block",color:d,textStyle:"body.medium",ms:"lg",children:p.display})]}),(0,r.jsxs)(i.so,{justify:"space-between",children:[(0,r.jsxs)(i.so,{grow:1,align:"center",gap:"sm",overflowX:"hidden",children:[(0,r.jsx)(th.p,{size:16,id:x.id}),(0,r.jsx)(l.Ym,{color:c,textStyle:"body.medium",truncate:!0,children:(0,r.jsx)(ex.Rm,{team:x})})]}),(0,r.jsx)(l.EY,{display:"block",color:c,textStyle:"body.medium",ms:"lg",children:h.display})]})]})}),(0,r.jsx)(v.cG,{vertical:!0,mx:"sm",my:"6px"}),(0,r.jsxs)(i.so,{direction:"column",align:"center",minW:"2xl",gap:"2xs",children:[(0,r.jsx)(b.Mv5,{fill:"onSurface.nLv3"}),(0,r.jsx)(l.EY,{color:"primary.default",textStyle:"assistive.default",children:(0,e6.A)(a)})]})]})})})}function tj(){let{userId:e}=(0,a.useContext)(m.t),{data:t,isLoading:s}=(0,A.Ay)(f.VfS.mostOpenedEvents(e));return s?(0,r.jsx)(eX.E,{uniqueKey:"editor-popular-events-cl",h:304,br:"lg"}):(null==t?void 0:t.events.length)?(0,r.jsxs)(u.Zp,{isInverseDesktop:!0,children:[(0,r.jsx)(u.Zp.Header,{titleId:"most_viewed_matches"}),t.events.map((e,t)=>(0,r.jsx)(tg,{eventData:e,index:t},e.event.id))]}):null}function tf(){let{isMobile:e}=(0,l.$c)(),{userAccount:t}=(0,a.useContext)(m.t);return(0,r.jsxs)(u.BU,{children:[(0,r.jsx)(te,{}),(0,r.jsx)(e5,{}),(0,r.jsx)(tp,{}),(0,r.jsx)(tj,{}),e&&(null==t?void 0:t.editor)&&(0,r.jsx)(eQ.s,{})]})}},12047:(e,t,s)=>{s.d(t,{Ay:()=>i});var r=s(44194),n=s(21501),l=s(55729);function i(){let{isInMobileTabs:e=!0,isSportMenuVisible:t=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[s,i]=(0,l.useState)(0),a=(0,n.YU)(),{isMobile:o}=(0,r.$c)(),d=50*!!e,c=48+d+48*!!t;return(0,l.useEffect)(()=>{if(!o)return void i(0);i(a===n.Dh.Up?c:d)},[a,o]),s}},17357:(e,t,s)=>{s.d(t,{A:()=>o});var r=s(21377),n=s(55729),l=s(494),i=s(30720),a=s(19121);function o(e,t){let s=null==t?void 0:t.shouldRefresh,[o,d]=(0,n.useState)(),[c,u]=(0,n.useState)(),x=(0,l.wA)();(0,n.useEffect)(()=>{(null==t?void 0:t.event)?x((0,a.$n)(t.event)):e&&r.nk6.fetchEvent(e).then(e=>{x((0,a.$n)(e.event)),d(e.event),u(void 0)}).catch(e=>{u(e),(null==t?void 0:t.onFetchError)&&t.onFetchError(),d(void 0)})},[e,null==t?void 0:t.event]);let p=(0,l.d4)(t=>{let{favorites:{events:s}}=t;return e?s[e]:void 0});(0,n.useEffect)(()=>{if(!e||!s)return;let t="event-details-".concat(e);return x((0,a.vB)({entities:[e],refreshTaskId:t},{fetchFunction:r.nk6.fetchEvent.bind(null,e)})),()=>{x((0,a.tM)(t))}},[e,s]);let[h,m]=(0,i.A)(p||(null==t?void 0:t.event),"homeTeam","awayTeam",o||(null==t?void 0:t.event)),[g,j]=(0,i.A)(p||(null==t?void 0:t.event),"homeScore","awayScore",o||(null==t?void 0:t.event));return{event:p,fetchedEvent:o,leftTeam:h,rightTeam:m,leftScore:g,rightScore:j,error:c}}},23419:(e,t,s)=>{s.d(t,{A:()=>l,k:()=>n});var r=s(55729);let n=(0,r.createContext)(null);function l(){let e=(0,r.useContext)(n);if(!e)throw Error("useWeeklyChallengeContext must be used within an WeeklyChallengeContextProvider");return e}},25442:(e,t,s)=>{s.d(t,{H:()=>r});var r=function(e){return e[e.Upcoming=0]="Upcoming",e[e.Finished=1]="Finished",e[e.Statistics=2]="Statistics",e}({})},28132:(e,t,s)=>{s.d(t,{H:()=>n,m:()=>r});var r=function(e){return e.EventWidget="event_widget",e.EventPage="event_page",e.FantasyCompetition="fantasy_competition",e.FavoritesPage="favorites_page",e.FightNight="fight_night",e.FighterPage="fighter_page",e.ManagerPage="manager_page",e.Organization="organization_page",e.PlayerPage="player_page",e.RefereePage="referee_page",e.StageSport="stage_sport_page",e.StageSportRace="stage_sport_race_page",e.StageSportTeam="stage_sport_team_page",e.TeamPage="team_page",e.TournamentPage="tournament_page",e.UniqueTournamentPage="unique_tournament_page",e.DroppingOddsPage="dropping_odds_page",e.FantasyLeague="fantasy_league",e.ProfilePage="profile_page",e.VenuePage="venue_page",e.MainPageAll="main_page_all",e.MainPageFavorites="main_page_favourites",e.ChallengePage="challenge_page",e}({}),n=function(e){return e.Summary="summary",e.Incidents="incidents",e.Details="details",e.Scorecard="scorecard",e.Overs="overs",e.BoxScore="box_score",e.Lineups="lineups",e.Statistics="statistics",e.Standings="standings",e.Graphs="graphs",e.Matches="matches",e.Odds="odds",e.FeaturedOdds="featured_odds",e.AdditionalOdds="additional_odds",e.Commentary="commentary",e.Games="games",e.Media="media",e.List="list",e.Editor="editor",e.Fights="fights",e.Info="info",e.Rankings="rankings",e.Race="race",e.Races="races",e.Squad="squad",e.TopPlayers="top_players",e.TopStats="top_stats",e.TopTeams="top_teams",e.Knockout="knockout",e.EarlyPrelims="early_prelims",e.MainCard="main_card",e.Other="other",e.Prelims="prelims",e.PlayByPlay="play_by_play",e.FantasyHome="fantasy_home",e.FantasyMyTeam="fantasy_my_team",e.FantasyFixtures="fantasy_fixtures",e.FantasyLeagues="fantasy_leagues",e.FantasyStatistics="fantasy_statistics",e.BetBoost="bet_boost",e.DroppingOdds="dropping_odds",e.WinningOdds="winning_odds",e.HighValueStreaks="high_value_streaks",e.Top20TeamStreaks="top_20_team_streaks",e.Top20H2H="top_20_h2h",e.PowerRankings="power_rankings",e.PlayerFantasy="player_fantasy",e.FantasyLeagueLeaderboard="fantasy_league_leaderboard",e.FantasyLeagueDetails="fantasy_league_details",e.FantasyLeagueSettings="fantasy_league_settings",e.Overview="overview",e.MyPredictions="my_predictions",e.Following="following",e.Contributions="contributions",e.Career="career",e.Season="season",e.PlayerStatistics="player_stats",e.All="all",e.Live="live",e.Finished="finished",e.Upcoming="upcoming",e.TodayMatches="today_matches",e.ChallengeCurrentWeek="current_week",e.ChallengePreviousWeek="previous_week",e.History="history",e}({})},28157:(e,t,s)=>{s.d(t,{A:()=>m});var r=s(6029),n=s(44194),l=s(76356),i=s(90248),a=s(494),o=s(65789),d=s(54409),c=s(84677),u=s(70591),x=s(2294),p=s(61836);let h=e=>{let{routeKey:t,icon:s,id:a,onClick:o}=e;return(0,r.jsx)(u.N_,{routeKey:t,onClick:o,children:(0,r.jsxs)(l.so,{justify:"space-between",align:"center",py:"md",px:"lg",children:[(0,r.jsxs)(l.so,{gap:"lg",children:[s,(0,r.jsx)(n.EY,{textStyle:"body.mediumParagraph",children:(0,r.jsx)(i.A,{id:a})})]}),(0,r.jsx)(d.zQC,{icon:"chevron-right",width:24,height:24,fill:"primary.default"})]})})};function m(){let e=(0,a.d4)(x.BF),{isFantasyEnabled:t}=(0,c.t)();return(0,r.jsxs)(o.Zp,{children:[(0,r.jsx)(o.Zp.Header,{titleId:"quick_links"}),(0,r.jsx)(h,{routeKey:"user.weeklyChallenge",onClick:()=>(0,p.Wk)({type:"weekly_challenge",location:"profile"}),id:"weekly_challenge",icon:(0,r.jsx)(d.zQC,{icon:"leagues-outline",fill:"onSurface.nLv1"})}),!e&&(0,r.jsx)(h,{routeKey:"betting",id:"app.droppingOdds",icon:(0,r.jsx)(d.dv0,{fill:"onSurface.nLv1",width:"24",height:"24"}),onClick:p.M8}),t&&(0,r.jsx)(h,{routeKey:"fantasy",id:"fantasy_game",icon:(0,r.jsx)(d.azT,{h:24,w:24,fill:"onSurface.nLv1"})}),(0,r.jsx)(o.Zp.Footer,{defaultHeight:"sm"})]})}},28171:(e,t,s)=>{s.d(t,{A:()=>a});var r=s(44194),n=s(78383),l=s.n(n),i=s(61836);function a(){let{isMobile:e}=(0,r.$c)();return{logTabChange:e?i.yy:l()}}},30720:(e,t,s)=>{s.d(t,{A:()=>n});var r=s(69385);function n(e,t,s,n){let l=(0,r.A)(n);if(!(e&&void 0!==t&&void 0!==s))return[];let[i,a]=[e[t],e[s]];return l?[a,i]:[i,a]}},32523:(e,t,s)=>{s.d(t,{E:()=>r.E});var r=s(3881)},33144:(e,t,s)=>{s.d(t,{p:()=>r.p});var r=s(91603)},33752:(e,t,s)=>{s.d(t,{B:()=>p});var r=s(6029),n=s(44194),l=s(62042),i=s(76356);let a=(0,l.Fj)({base:{display:"inline-block",verticalAlign:"bottom",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:"neutrals.nLv3",textStyle:"display.micro","& > a":{color:"primary.default",_hover:{textDecoration:"underline"}},"& + li":{_before:{content:'""',display:"inline-block",width:"[0px]",height:"[0px]",borderStyle:"solid",margin:"[1px 5px]",borderYWidth:"xs",borderStartWidth:"[5px]",borderEndWidth:"0",borderTopColor:"[transparent]",borderEndColor:"[transparent]",borderBottomColor:"[transparent]",borderStartColor:"neutrals.nLv3"}},"&:first-child:nth-last-child(3)":{maxWidth:"[50%]"},"&:first-child:nth-last-child(3) ~ &":{maxWidth:"[50%]"},"&:first-child:nth-last-child(4)":{maxWidth:"[33.33%]"},"&:first-child:nth-last-child(4) ~ &":{maxWidth:"[33.33%]"},"&:last-child":{display:"inline",whiteSpace:"initial"}}}),o=(0,i.I4)("li",a),d=(0,l.Fj)({base:{display:"flow-root",lineClamp:1,lineHeight:"[16px]",boxOrient:"vertical",overflow:"hidden",listStyle:"none",margin:"0",padding:"0",color:"neutrals.nLv3","&:has(.breadcrumb-title)":{lineClamp:2},"& > li":{lineHeight:"[16px]"}}}),c=(0,i.I4)("ul",d),u=(0,l.Fj)({base:{"&:has(.breadcrumb-title)":{py:"md",px:"lg",md:{px:"0"},"@supports not selector(:has(a, b))":{py:"md",px:"lg",md:{px:"0"}}}},variants:{isHomePage:{true:{mdDown:{padding:"[0px !important]"}}}}}),x=(0,i.I4)("div",u),p=e=>{let{children:t,isHomePage:s}=e;return(0,r.jsx)(x,{isHomePage:s,children:(0,r.jsx)(c,{children:t})})};p.Item=e=>{let{children:t}=e;return(0,r.jsx)(o,{children:t})},p.Title=e=>{let{children:t}=e;return(0,r.jsx)(n.Li,{display:"inline",className:"breadcrumb-title",children:(0,r.jsx)(n.H1,{display:"inline",textStyle:"display.micro",color:"neutrals.nLv3",children:t})})}},37377:(e,t,s)=>{s.d(t,{s:()=>x});var r=s(6029),n=s(44194),l=s(76356),i=s(90248),a=s(494),o=s(65789),d=s(54409),c=s(88339),u=s(61836);let x=e=>{let{isInWidget:t}=e,s=(0,a.d4)(c.$F);return(null==s?void 0:s.editor)?null:(0,r.jsx)(o.Zp,{isInverseDesktop:t,children:(0,r.jsxs)(l.az,{p:"md",children:[(0,r.jsxs)(l.so,{align:"center",p:"xs",mb:"xs",children:[(0,r.jsx)(d._jO,{minW:40,minH:40,width:"40px",height:"40px",mr:"md",fill:"primary.default"}),(0,r.jsx)(n.EY,{textStyle:"display.small",children:(0,r.jsx)(i.A,{id:"torneo_promo_text"})})]}),(0,r.jsx)("img",{style:{maxWidth:"280px",width:"100%"},src:"/static/images/editor/editor-mobile.png",alt:"eventTorneoBannerImage"}),(0,r.jsx)("a",{href:"https://torneo.sofascore.com/?utm_source=torneo.sofascore.com&utm_medium=web_button&utm_campaign=join_sofascore_editor_team_desktop&utm_content=web_button_desktop",target:"_blank",rel:"noreferrer",onClick:u.ix,children:(0,r.jsxs)(l.so,{justify:"center",align:"center",gap:"xs",bg:"surface.s2",cursor:"pointer",br:"sm",mt:"lg",p:"md",children:[(0,r.jsx)(n.EY,{textStyle:"display.small",color:"primary.default",_hover:{filter:"auto",brightness:1.3,textDecoration:"underline"},children:(0,r.jsx)(i.A,{id:"check_out_torneo_by_sofascore"})}),(0,r.jsx)(d.HW5,{fill:"primary.default",width:16,height:16})]})})]})})}},39419:(e,t,s)=>{s.d(t,{M:()=>o});var r=s(6029),n=s(4967),l=s(55729),i=s(947),a=s(96470);let o=e=>{let{hasChallengeEnded:t,challengeEndTime:s}=e,[o,d]=(0,l.useState)(new Date().getTime()),c=(0,i.A)();if((0,l.useEffect)(()=>{let e=setInterval(()=>d(new Date().getTime()),1e3);return()=>clearInterval(e)},[o]),!s)return null;let u=t?s+n.dp:s;return(0,r.jsx)(r.Fragment,{children:u{s.d(t,{y:()=>a});var r=s(6029),n=s(99064),l=s(90248),i=s(54409);let a=e=>{let{messageId:t,font:s="body.medium"}=e;return(0,r.jsxs)(n.so,{align:"center",gap:"lg",children:[(0,r.jsx)(i.G_L,{fill:"surface.s1"}),(0,r.jsx)(n.EY,{block:!0,color:"surface.s1",font:s,children:(0,r.jsx)(l.A,{id:t})})]})}},41007:(e,t,s)=>{s.d(t,{A:()=>h});var r=s(6029),n=s(44194),l=s(76356),i=s(494),a=s(65789),o=s(62827),d=s(7067),c=s(14930),u=s(27705),x=s(83260);function p(e){let{experiments:t}=e,[s,i,c]=(0,x.A)("experimentPickerValue","-"),p=[{label:"-"}];return(t.forEach(e=>{e.variants.forEach(t=>{t!==d.KT.Control&&t!==d.KT.None&&p.push({label:t===d.KT.Treatment?e.name:"".concat(e.name,"---").concat(t)})})}),c)?(0,r.jsx)(a.Zp,{children:(0,r.jsx)(l.az,{p:"md",children:(0,r.jsx)(n.jT,{label:"Experiment:",options:p,value:{label:s},onChange:e=>{let{label:s}=e;i(s),t.forEach(e=>{let t=s.split("---"),r=t[0],n=t[1]||d.KT.Treatment;e.name===r?(0,o.IO)((0,u.L4)(e.name),n):(0,o.IO)((0,u.L4)(e.name),d.KT.None)})},clearable:!1})})}):null}let h=e=>{let{userId:t}=e,s=(0,i.d4)(e=>e.auth.userAccount),n=(null==s?void 0:s.chatRole)==="admin",l=!t||(null==s?void 0:s.id)===t,a=[...c.f_,...c.gc];return a.length&&l&&n?(0,r.jsx)(p,{experiments:a}):null}},43451:(e,t,s)=>{s.d(t,{D:()=>i});var r=s(6029),n=s(36145),l=s(41735);let i=({width:e="100%",height:t,animate:s=!1,viewBox:i,style:a,children:o,uniqueKey:d})=>{let c=(0,l.useTheme)();return(0,r.jsx)(n.Ay,Object.assign({speed:2,animate:s,width:e,height:t,backgroundColor:s?c.colors.surface.s0:c.colors.surface.s2,foregroundColor:c.colors.surface.s2,viewBox:i,style:a,uniqueKey:d},{children:o}))}},47146:(e,t,s)=>{s.d(t,{v:()=>i});var r=s(6029),n=s(29705);let l={second:59,minute:59,hour:24,day:7},i=e=>{let{timestamp:t,isAbsoluteTime:s,children:i}=e,{value:a,unit:o}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now(),s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0,n={...l,...s||{}},i=(e-t)/1e3;if(Math.abs(i)0)return{value:Math.round(x),unit:"year"};let p=12*x+d.getMonth()-c.getMonth();return Math.round(Math.abs(p))>0?{value:Math.round(p),unit:"month"}:{value:Math.round(i/604800),unit:"week"}}(t,void 0,void 0,s);return(0,r.jsx)(n.A,{value:a,unit:o,numeric:"auto",children:e=>"function"==typeof i?i(e):(0,r.jsx)(r.Fragment,{children:e})})}},50148:(e,t,s)=>{s.d(t,{A:()=>c});var r=s(6029),n=s(44194),l=s(76356),i=s(90248),a=s(54053),o=s(3541);let d=e=>{let{titleId:t,bulletIds:s}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.az,{px:"lg",textStyle:"body.mediumParagraph",fontWeight:700,children:(0,r.jsx)(i.A,{id:t})}),(0,r.jsx)("ul",{children:s.map(e=>(0,r.jsx)(n.Li,{children:(0,r.jsx)(i.A,{id:e})},e))})]})};function c(e){let{isOpen:t,setIsOpen:s}=e;return(0,r.jsx)(a.A,{header:(0,r.jsxs)(l.so,{h:"4xl",pt:"lg",pb:"sm",gap:"lg",px:{md:"lg"},justify:"space-between",children:[(0,r.jsx)(l.az,{textStyle:"display.large",truncate:!0,children:(0,r.jsx)(i.A,{id:"weekly_about_streaks"})}),(0,r.jsx)(o.A,{h:24})]}),isOpen:t,setIsOpen:s,children:(0,r.jsxs)(l.az,{pt:"sm",maxW:{md:"[360px]"},children:[(0,r.jsx)(d,{titleId:"weekly_streaks_starting_losing",bulletIds:["weekly_streaks_starting_bullet","weekly_streaks_staying_bullet","weekly_streaks_losing_bullet"]}),(0,r.jsx)("br",{}),(0,r.jsx)(d,{titleId:"weekly_streaks_tracking",bulletIds:["weekly_streaks_tracking_rivals"]})]})})}},55365:(e,t,s)=>{s.d(t,{KY:()=>c,UR:()=>x,gj:()=>d,lZ:()=>o,mq:()=>u});var r=s(6029),n=s(21377),l=s(93338),i=s(54409),a=s(98516);let o=(e,t,s)=>{let r=e.status.type===n.XUj.InProgress,i=r&&e.crowdsourcingDataDisplayEnabled,a=t===n.Jfo.Left,o=t===n.Jfo.Right;return i?l.S.var("colors.status.crowdsourcingLive"):r?l.S.var("colors.status.live"):s?a?l.S.var("colors.neutrals.nLv1"):l.S.var("colors.neutrals.nLv3"):o?l.S.var("colors.neutrals.nLv1"):l.S.var("colors.neutrals.nLv3")};function d(e){let t=(null==e?void 0:e.score)||0,s=(null==e?void 0:e.wickets)||0;return t||s?"".concat(t).concat(s>=0&&s<10?"-".concat(s):""):"-"}let c=(e,t)=>(0,a.M)(e.map(e=>{var s,r;return null!=(r=null==t||null==(s=t[e])?void 0:s.overs)?r:0}).reduce((e,t)=>e+t,0),1),u=e=>{switch(e){case"WC":case"LL":return"colors.playoffs.relegation";case"Q":case"A":case"PR":case"SE":return"colors.playoffs.promotionToXPlayoff";default:return"colors.playoffs.promotionToYPlayoff"}},x=(e,t,s)=>{if(e===n.QCR.Tennis)return s===n.Jfo.Left||s===n.Jfo.Right?(0,r.jsx)(i.OXq,{fill:"secondary.default"}):void 0;if(e===n.QCR.AmericanFootball){let e=null==t?void 0:t.currentPossession,s=Number(null==t?void 0:t.currentDown);return s>=1&&s<=4&&(e===n.Jfo.Left||e===n.Jfo.Right)?(0,r.jsx)(i.CvR,{icon:"af-touchdown",w:16,h:16,fill:"sofaSingles.live"}):void 0}}},55794:(e,t,s)=>{s.d(t,{S:()=>y});var r=s(6029),n=s(44194),l=s(76356),i=s(55729),a=s(43072),o=s(947),d=s(90248),c=s(494),u=s(54409),x=s(50801),p=s(40528),h=s(88339),m=s(89642),g=s(61836),j=s(3468);let f=()=>(0,r.jsxs)("svg",{width:"102",height:"101",viewBox:"0 0 102 101",fill:"none",style:{position:"absolute",bottom:16,right:0,opacity:.1},children:[(0,r.jsx)("path",{d:"M66.8686 67.5H50.1543V84.2501H66.8686V67.5Z",fill:"#FCFCFE"}),(0,r.jsxs)("g",{opacity:"0.5",children:[(0,r.jsx)("path",{d:"M100.287 84.25H83.5723V101H100.287V84.25Z",fill:"#FCFCFE"}),(0,r.jsx)("path",{d:"M16.7142 84.25H0V101H16.7142V84.25Z",fill:"#FCFCFE"}),(0,r.jsx)("path",{d:"M50.142 67.5H33.4277V84.2501H50.142V67.5Z",fill:"#FCFCFE"}),(0,r.jsx)("path",{d:"M116.999 50.75H100.285V67.5001H116.999V50.75Z",fill:"#FCFCFE"}),(0,r.jsx)("path",{d:"M66.8569 50.75H50.1426V67.5001H66.8569V50.75Z",fill:"#FCFCFE"}),(0,r.jsx)("path",{d:"M50.142 34H33.4277V50.7497H50.142V34Z",fill:"#FCFCFE"}),(0,r.jsx)("path",{d:"M33.4291 34H16.7148V50.7497H33.4291V34Z",fill:"#FCFCFE"}),(0,r.jsx)("path",{d:"M83.5717 17.25H66.8574V33.9997H83.5717V17.25Z",fill:"#FCFCFE"}),(0,r.jsx)("path",{d:"M50.142 17.25H33.4277V33.9997H50.142V17.25Z",fill:"#FCFCFE"}),(0,r.jsx)("path",{d:"M83.5717 0.5H66.8574V17.2501H83.5717V0.5Z",fill:"#FCFCFE"}),(0,r.jsx)("path",{d:"M50.142 0.5H33.4277V17.2501H50.142V0.5Z",fill:"#FCFCFE"})]}),(0,r.jsxs)("g",{opacity:"0.8",children:[(0,r.jsx)("path",{d:"M83.5717 84.25H66.8574V101H83.5717V84.25Z",fill:"#FCFCFE"}),(0,r.jsx)("path",{d:"M66.8569 84.25H50.1426V101H66.8569V84.25Z",fill:"#FCFCFE"}),(0,r.jsx)("path",{d:"M33.4291 84.25H16.7148V101H33.4291V84.25Z",fill:"#FCFCFE"}),(0,r.jsx)("path",{d:"M83.5717 67.5H66.8574V84.2501H83.5717V67.5Z",fill:"#FCFCFE"}),(0,r.jsx)("path",{d:"M50.142 50.7495H33.4277V67.4996H50.142V50.7495Z",fill:"#FCFCFE"}),(0,r.jsx)("path",{d:"M33.4291 50.7495H16.7148V67.4996H33.4291V50.7495Z",fill:"#FCFCFE"}),(0,r.jsx)("path",{d:"M66.8569 17.25H50.1426V33.9997H66.8569V17.25Z",fill:"#FCFCFE"}),(0,r.jsx)("path",{d:"M33.4291 17.25H16.7148V33.9997H33.4291V17.25Z",fill:"#FCFCFE"}),(0,r.jsx)("path",{d:"M16.7142 17.25H0V33.9997H16.7142V17.25Z",fill:"#FCFCFE"})]})]}),v="https://app.sofascore.com/nixz/rix1kpvt",y=()=>{let{userId:e}=(0,i.useContext)(m.t),t=(0,c.d4)(h.$F),s=(null==t?void 0:t.id)===e,{isMobile:y}=(0,n.$c)(),b=(0,j.C)(),_=(0,o.A)(),{ref:w,inView:k}=(0,a.Wx)({triggerOnce:!0}),S=async()=>{try{(0,g.oD)("referral"),y&&navigator.share?await navigator.share({title:"",text:_.formatMessage({id:"sofascore_share_link_text"}),url:v}):(await navigator.clipboard.writeText(v),b((0,r.jsx)(p.y,{messageId:"share_link_copied_to_clipboard"})))}catch(e){b((0,r.jsx)(p.y,{messageId:"error.generic2"}))}};return((0,i.useEffect)(()=>{k&&(0,g.ke)({action:"impression",location:"profile",type:"referral"})},[k]),s)?(0,r.jsxs)(l.so,{bg:"primary.default",align:"center",p:"lg",br:"xl",minH:"[124px]",gap:"sm",position:"relative",ref:w,children:[(0,r.jsx)(l.az,{overflow:"hidden",children:(0,r.jsx)(f,{})}),(0,r.jsxs)(l.so,{direction:"column",justify:"space-between",minH:"[92px]",gap:"sm",grow:1,shrink:1,children:[(0,r.jsx)(n.EY,{textStyle:"display.medium",color:"surface.s1",children:(0,r.jsx)(d.A,{id:"profile_referral_banner_header"})}),(0,r.jsx)(n.EY,{textStyle:"assistive.default",color:"surface.s1",children:(0,r.jsx)(d.A,{id:"profile_referral_banner_description"})}),(0,r.jsx)(l.so,{justify:"flex-start",w:"100%",children:(0,r.jsxs)(n.$n,{size:"tertiary",variant:"filled",bg:"surface.s1",onClick:S,children:[(0,r.jsx)(n.EY,{display:"block",lineHeight:1,textStyle:"assistive.default",children:(0,r.jsx)(d.A,{id:"profile_button_share_link"})}),(0,r.jsx)(l.az,{h:"lg",w:"lg",children:(0,r.jsx)(u.VJ,{h:16,w:16,fill:"onSurface.nLv1"})})]})})]}),(0,r.jsx)(l.az,{w:"[68px]",h:"[68px]",children:(0,r.jsx)(x.A,{graphic:"twitter-feed"})})]}):null}},58918:(e,t,s)=>{s.d(t,{K:()=>o});var r=s(6029),n=s(33144),l=s(76356),i=s(70591),a=s(68379);let o=e=>{var t,s;let{sport:o,teams:d,seeding:c,size:u,hideFlags:x,ignoreLink:p}=e;return(0,r.jsxs)(l.so,{children:[(0,r.jsx)(i.gT,{sport:o,team:d[0],ignoreLink:p,children:(0,r.jsx)(n.p,{hasFlag:!0,id:d[0].id,name:d[0].name,size:u||40,alpha2:x||null==(t=d[0].country)?void 0:t.alpha2,boxProps:{mr:-8}})}),(0,r.jsx)(i.gT,{sport:o,team:d[1],ignoreLink:p,children:(0,r.jsx)(n.p,{hasFlag:!0,id:d[1].id,name:d[1].name,size:u||40,alpha2:x||null==(s=d[1].country)?void 0:s.alpha2,right:!0})}),(0,r.jsx)(a.J,{seed:c,transform:"translateX(100%)"})]})}},59721:(e,t,s)=>{s.d(t,{e:()=>r.e});var r=s(33480)},62121:(e,t,s)=>{s.d(t,{_7:()=>r._7,mt:()=>r.mt,Q3:()=>r.Q3,bZ:()=>r.bZ,wH:()=>r.wH}),s(29469),s(89042);var r=s(70448)},65078:(e,t,s)=>{s.d(t,{gm:()=>r.A,g3:()=>n.A,mJ:()=>l.A,jr:()=>i.A,AR:()=>o,h2:()=>p});var r=s(70215),n=s(69385),l=s(17357),i=s(30720),a=s(494);function o(e){let t=(0,a.d4)(t=>{let{favorites:{events:s}}=t;return s[e.id]}),[s,r]=(0,i.A)(e,"homeTeam","awayTeam",e),[n,l]=(0,i.A)(e,"homeScore","awayScore",e);return{event:t||e,leftTeam:s,rightTeam:r,leftScore:n,rightScore:l}}var d=s(21377),c=s(55729),u=s(62859);let x=e=>t=>e===t;function p(e,t){var s,n;let{event:l,leftTeam:i,rightTeam:a}=(0,c.useContext)(u.y$),o=(0,r.A)(l,"winnerCode"),p=(l.status.code===d.sum.AET||l.status.code===d.sum.AP)&&l.tournament.category.sport.slug===d.QCR.IceHockey,h=e?x(e):t||(()=>!1),m=h(i.id,l.id)||(null==(s=i.subTeams)?void 0:s.some(e=>h(e.id,l.id))),g=h(a.id,l.id)||(null==(n=a.subTeams)?void 0:n.some(e=>h(e.id,l.id)));switch(o){case d.Jfo.Left:if(m)return d.h18.Win;if(g)return p?d.h18.OvertimeLoss:d.h18.Lose;break;case d.Jfo.Right:if(m)return p?d.h18.OvertimeLoss:d.h18.Lose;if(g)return d.h18.Win;break;case d.Jfo.Draw:if(m||g)return d.h18.Draw}}},67333:(e,t,s)=>{s.d(t,{A:()=>x});var r=s(6029),n=s(21377),l=s(44194),i=s(76356),a=s(494),o=s(45860),d=s(65789),c=s(88339);function u(e){let{branches:t}=e;if(!(null==t?void 0:t.length))return null;let s=[n.rKn,...[...t].sort((e,t)=>e.localeCompare(t))].map(e=>({label:e}));return(0,r.jsx)(d.Zp,{children:(0,r.jsx)(i.az,{p:"md",children:(0,r.jsx)(l.jT,{label:"Branches:",options:s,value:{label:(0,n.Srs)()||n.rKn},onChange:e=>{(null==e?void 0:e.label)&&(e.label===n.rKn?(0,n.Sdf)(void 0):(0,n.Sdf)("https://".concat(e.label,"api/v1")))}})})})}let x=e=>{let{userId:t}=e,s=(0,a.d4)(c.$F),l=(0,a.d4)(c.Cd),i=(null==s?void 0:s.chatRole)==="admin",d=!t||(null==s?void 0:s.id)===t,x=async e=>{let[t,s]=e;return(0,n.B2D)(t,{},{headers:(0,n.MXE)(s)})},{data:p}=(0,o.Ay)(i&&l?[n.GJU.branches(),l]:null,{fetcher:x});return i&&d?(0,r.jsx)(u,{branches:null==p?void 0:p.branches}):null}},68379:(e,t,s)=>{s.d(t,{J:()=>o});var r=s(6029),n=s(44194),l=s(76356),i=s(93338),a=s(55365);let o=e=>{let{seed:t,colorless:s,position:o="absolute",left:d,right:c,bottom:u="0",h:x="lg",minW:p="xl",textStyle:h="assistive.default",...m}=e;return t?(0,r.jsx)(l.ov,{display:"inline-flex",position:o,bottom:u,left:d,right:c,br:"sm",style:s?void 0:{background:i.S.var((0,a.mq)(t))},h:x,minW:p,zIndex:"button",...m,children:(0,r.jsx)(n.EY,{textStyle:h,color:s?"neutrals.nLv1":"surface.s1",lineHeight:1,children:t})}):null}},69385:(e,t,s)=>{s.d(t,{A:()=>a});var r=s(55729),n=s(494),l=s(62859),i=s(57126);function a(e){var t;let s=(0,r.useContext)(l.y$),a=e||s.event,o=(0,n.d4)(i.xl);return(null==a||null==(t=a.tournament.uniqueTournament)?void 0:t.displayInverseHomeAwayTeams)&&o}},70215:(e,t,s)=>{s.d(t,{A:()=>n});var r=s(69385);function n(e,t,s){let n=(0,r.A)(s);if(!(e&&t))return;let l=e[t];if("number"==typeof l)return n&&[1,2].includes(l)?1===l?2:1:l}},70355:(e,t,s)=>{s.d(t,{GH:()=>n,UE:()=>i,v9:()=>l});var r=s(19451);let n=[1,0,2],l={1:160,2:130,3:120},i={[r.xW.TopPredictors]:"user.topPredictors",[r.xW.TopContributors]:"user.topContributors",[r.xW.TopEditors]:"user.topEditors"}},72110:(e,t,s)=>{s.d(t,{I:()=>d,p:()=>c});var r=s(6029),n=s(44194),l=s(76356),i=s(90248),a=s(65789),o=s(54409);function d(e){let{onClick:t,children:s}=e;return(0,r.jsx)(l.so,{direction:"column",align:"center",justify:"center",gap:"xs",h:"[60px]",bg:"surface.s2",br:{base:"sm",md:"lg"},cursor:t?"pointer":"default",onClick:t,flexGrow:1,flexBasis:"[0px]",children:s})}function c(e){let{titleId:t,hasInfo:s,onInfoClick:d,children:c}=e,{isMobile:u}=(0,n.$c)();return(0,r.jsxs)(a.HH,{isCard:u,children:[t&&(0,r.jsxs)(l.so,{align:"center",justify:"center",gap:"xs",px:"sm",pb:"sm",pt:"lg",children:[(0,r.jsx)(n.EY,{display:"block",textStyle:"display.small",textAlign:"center",children:(0,r.jsx)(i.A,{id:t})}),s&&(0,r.jsx)(n.K0,{onClick:()=>null==d?void 0:d(),variant:"clear",children:(0,r.jsx)(o.G_L,{fill:"primary.default",width:16,height:16})})]}),(0,r.jsx)(l.so,{justify:"space-between",gap:"sm",p:{mdDown:"sm"},children:c})]})}},72629:(e,t,s)=>{s.d(t,{A:()=>p});var r=s(6029),n=s(44194),l=s(76356),i=s(55729),a=s(90248),o=s(54409),d=s(3541),c=s(50148),u=s(72110);let x=e=>{let{length:t}=e;return(0,r.jsxs)(l.so,{align:"center",gap:"xs",children:[(0,r.jsx)(d.A,{h:20}),(0,r.jsx)(n.EY,{textStyle:"display.medium",children:void 0===t?"-":(0,r.jsx)(a.A,{id:"weekly_streak_counter",values:{n:t}})})]})};function p(e){let{maxWeeklyStreak:t,currentWeeklyStreak:s,hasCurrentStreakInfo:d,showTitle:p,onCurrentStreakClick:h}=e,[m,g]=(0,i.useState)(!1);return(0,r.jsxs)(u.p,{titleId:p?"weekly_streak_title":void 0,onInfoClick:()=>g(!0),hasInfo:!0,children:[(0,r.jsxs)(u.I,{onClick:d?()=>{d&&(g(!0),null==h||h())}:void 0,children:[(0,r.jsx)(x,{length:s,messageId:"weekly_streak_counter"}),(0,r.jsxs)(l.so,{justify:"center",px:"sm",gap:"xs",w:"100%",overflow:"hidden",children:[(0,r.jsx)(n.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",truncate:!0,children:(0,r.jsx)(a.A,{id:"weekly_current_streak"})}),d&&(0,r.jsx)(l.az,{h:"lg",w:"lg",children:(0,r.jsx)(o.FFV,{fill:"primary.default"})})]})]}),(0,r.jsxs)(u.I,{children:[(0,r.jsx)(x,{length:t,messageId:"weekly_streak_counter"}),(0,r.jsx)(n.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,r.jsx)(a.A,{id:"weekly_longest_streak"})})]}),(0,r.jsx)(c.A,{isOpen:m,setIsOpen:g})]})}},75414:(e,t,s)=>{s.d(t,{A:()=>r});let r=function(e){switch(!0){case e<1e3:return"".concat(e);case e<1e4&&e/1e3%1>=.1:let t="".concat((e/1e3).toPrecision(2));return t.endsWith(".0")&&(t=t.substring(0,t.length-2)),"".concat(t,"k");case e<1e6:let s=Math.round(e/1e3);if(1e3===s)return"1M";return"".concat(s,"k");case e<1e7:let r=(e/1e5).toFixed();return r=r.endsWith("0")?r.substring(0,r.length-1):"".concat(r[0],".").concat(r[1]),"".concat(r,"M");case e<1e8:return"".concat(Math.round(e/1e6),"M");case e<1e9:let n=Math.round(e/1e6);if(1e3===n)return"1B";return"".concat(n,"M");default:return"".concat(e)}}},86501:(e,t,s)=>{s.d(t,{_:()=>M,g:()=>T});var r=s(6029),n=s(32523),l=s(44194),i=s(76356),a=s(99064),o=s(55729),d=s(90248),c=s(89642),u=s(494),x=s(75791),p=s(2294),h=s(54409);let m=e=>{let{messageId:t,value:s,isButton:n,onClick:a}=e;return(0,r.jsxs)(i.so,{justify:"space-between",align:"center",py:"sm",children:[(0,r.jsxs)(i.so,{align:"center",gap:"xs",onClick:a,children:[(0,r.jsx)(l.EY,{color:n?"primary.default":"neutrals.nLv1",textStyle:"body.medium",children:(0,r.jsx)(d.A,{id:t})}),n&&(0,r.jsx)(h.G_L,{fill:"primary.default",h:16,w:16})]}),(0,r.jsx)(l.EY,{children:s})]})},g=e=>{let{messageId:t,value:s,isButton:n,onClick:a}=e;return(0,r.jsxs)(i.so,{direction:"column",justify:"center",align:"center",gap:"xs",p:"sm",br:"lg",bg:{base:"surface.s2",_hover:{mdDown:"neutrals.nLv4"}},onClick:a,cursor:n?"pointer":"default",children:[(0,r.jsx)(l.EY,{textStyle:"display.medium",children:s}),(0,r.jsxs)(l.EY,{textAlign:"center",textStyle:"assistive.default",color:n?"primary.default":"neutrals.nLv3",children:[(0,r.jsx)(d.A,{id:t}),n&&(0,r.jsx)(h.G_L,{fill:"primary.default",h:16,w:16,ml:"xs"})]})]})};function j(e){let{isMobile:t}=(0,l.$c)();return t?(0,r.jsx)(m,{...e}):(0,r.jsx)(g,{...e})}var f=s(54053);function v(e){let{isOpen:t,setIsOpen:s}=e,n=(0,u.d4)(p.BF);return(0,r.jsx)(f.A,{setIsOpen:s,isOpen:t,footer:(0,r.jsx)(i.so,{hideBelow:"md",justify:"flex-end",m:"lg",children:(0,r.jsx)(l.$n,{onClick:()=>s(!1),ml:"lg",variant:"clear",children:(0,r.jsx)(d.A,{id:"ok_got_it_button"})})}),renderAdPlaceholder:!1,children:(0,r.jsxs)(i.az,{maxW:{md:"[312px]"},p:"lg",mx:"auto",children:[(0,r.jsx)(l.EY,{display:"block",textStyle:"display.large",mb:"sm",children:(0,r.jsx)(d.A,{id:n?"points":"profile.roi"})}),(0,r.jsx)(l.EY,{display:"block",textStyle:"body.mediumParagraph",children:(0,r.jsx)(d.A,{id:n?"points_VROI_info_bubble":"virtual_return_on_investment_info"})})]})})}function y(e){let{stat:t}=e,s=(0,u.d4)(p.BF),[n,l]=(0,o.useState)(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j,{onClick:()=>l(!0),messageId:s?"points":"profile.roi",value:t,isButton:!0}),(0,r.jsx)(v,{isOpen:n,setIsOpen:l})]})}function b(e){let{children:t}=e,{isMobile:s}=(0,l.$c)();return s?(0,r.jsx)(r.Fragment,{children:t}):(0,r.jsx)(i.xA,{gap:"sm",columns:2,children:t})}let _=e=>{let{stats:t}=e,s=(0,u.d4)(p.BF),{correct:n,total:l,percentage:i,avgCorrectOdds:a,roi:o,ranking:d}=t;return(0,r.jsxs)(b,{children:[(0,r.jsx)(j,{messageId:"profile.correctPredictions",value:"".concat(n,"/").concat(l," (").concat(i,")")}),!s&&(0,r.jsx)(x.c,{fractionalValue:a.fractionalValue,children:e=>(0,r.jsx)(j,{messageId:"profile.correctOdds",value:e})}),(0,r.jsx)(y,{stat:o}),(0,r.jsx)(j,{messageId:"best_predictors_rank",value:d})]})};var w=s(98914),k=s(61836);let S=(e,t,s)=>"".concat(e,"/").concat(t," (").concat(s,")"),A=e=>{let{correct:t,total:s,messageId:n}=e;return(0,r.jsxs)(i.so,{justify:"space-between",gap:"lg",children:[(0,r.jsx)(l.EY,{display:"block",textStyle:"body.mediumParagraph",children:(0,r.jsx)(d.A,{id:n})}),(0,r.jsx)(l.EY,{display:"block",textStyle:"body.mediumParagraph",children:0===s?"0":S(t,s,"".concat((0,w.M)(t/s,2),"%"))})]})},C=e=>{let{isOpen:t,setIsOpen:s,stats:n}=e;return(0,r.jsx)(f.A,{setIsOpen:s,isOpen:t,header:"profile.correctPredictions",renderAdPlaceholder:!1,children:(0,r.jsx)(i.az,{minW:"[312px]",p:"lg",pt:"0",pb:{base:"2xl",md:"lg"},mx:"auto",children:(0,r.jsxs)(i.so,{direction:"column",gap:"xl",children:[(0,r.jsx)(A,{messageId:"profile_predictions_with_odds",correct:n.correctVotesWithOdds,total:n.totalVotesWithOdds}),(0,r.jsx)(A,{messageId:"profile_predictions_without_odds",correct:n.correctVotesWithoutOdds,total:n.totalVotesWithoutOdds})]})})})},E=e=>{let{stats:t}=e,s=(0,u.d4)(p.BF),[n,l]=(0,o.useState)(!1),i=S(t.correct,t.total,t.percentage);return s||0===Number(t.total)?(0,r.jsx)(j,{messageId:"profile.correctPredictions",value:i}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j,{onClick:()=>{l(!0),(0,k.ke)({action:"click",location:"user_profile",type:"correct_predictions_info_button"})},messageId:"profile.correctPredictions",value:i,isButton:!0}),(0,r.jsx)(C,{isOpen:n,setIsOpen:l,stats:t})]})},F=e=>{let{stats:t}=e,s=(0,u.d4)(p.BF),{avgCorrectOdds:n,roi:l,ranking:i}=t;return(0,r.jsxs)(b,{children:[(0,r.jsx)(E,{stats:t}),!s&&(0,r.jsx)(x.c,{fractionalValue:n.fractionalValue,children:e=>(0,r.jsx)(j,{messageId:"profile.correctOdds",value:e})}),(0,r.jsx)(y,{stat:l}),(0,r.jsx)(j,{messageId:"profile_predictor_rank",value:i})]})};function T(){let{userAccount:e,isUserLoading:t}=(0,o.useContext)(c.t);return t?(0,r.jsx)(n.E,{uniqueKey:"predictions-overview-cl",h:[228,237],br:[void 0,"lg"]}):e?(0,r.jsxs)(i.so,{direction:"column",p:"sm",m:{mdDown:"sm"},br:{mdDown:"lg"},bg:{mdDown:"surface.s1"},elevation:{mdDown:"2"},gap:{md:"md"},children:[(0,r.jsx)(l.EY,{textAlign:"center",pt:"md",pb:"sm",textStyle:"display.medium",textTransform:"capitalize",children:(0,r.jsx)(d.A,{id:"overview"})}),(0,r.jsxs)(a.tU,{variant:"tertiary",children:[(0,r.jsxs)(i.az,{py:"sm",children:[(0,r.jsx)(a.tU.Tab,{tabKey:1,children:(0,r.jsx)(d.A,{id:"profile.last30Days"})}),(0,r.jsx)(a.tU.Tab,{tabKey:2,children:(0,r.jsx)(d.A,{id:"profile.predictions.allTime"})})]}),(0,r.jsx)(a.tU.Panel,{tabKey:1,children:(0,r.jsx)(F,{stats:e.voteStatistics.current})}),(0,r.jsx)(a.tU.Panel,{tabKey:2,children:(0,r.jsx)(_,{stats:e.voteStatistics.allTime})})]})]}):null}var H=s(65789);let I=e=>{let{titleId:t,children:s}=e;return(0,r.jsxs)(H.Zp,{children:[(0,r.jsx)(H.Zp.Header,{titleId:t}),(0,r.jsx)(i.az,{px:"lg",children:s}),(0,r.jsx)(H.Zp.Footer,{defaultHeight:"sm"})]})};function M(){var e;let{userAccount:t}=(0,o.useContext)(c.t);if(!t)return null;let s=Number(null==(e=t.voteStatistics.current)?void 0:e.total)>0;return(0,r.jsxs)(H.BU,{children:[s&&(0,r.jsx)(I,{titleId:"profile.last30Days",children:(0,r.jsx)(F,{stats:t.voteStatistics.current})}),(0,r.jsx)(I,{titleId:"profile.predictions.allTime",children:(0,r.jsx)(_,{stats:t.voteStatistics.allTime})})]})}},89642:(e,t,s)=>{s.d(t,{t:()=>r});let r=(0,s(55729).createContext)({userId:"",userAccount:void 0,isUserLoading:!0})},96470:(e,t,s)=>{s.d(t,{Y:()=>n,j:()=>l});var r=s(4967);function n(e,t,s,r){let n=e>0?r.slice(0,e).map(e=>e.id):[],l=t>0?r.slice(e,e+t).map(e=>e.id):[];return{userIds:{promoted:n,demoted:r.length>e+t&&s>0?r.slice(-r.length+e+t).map(e=>e.id):[],neutral:l}}}function l(e,t,s){let{days:n,hours:l,minutes:i,seconds:a}=(0,r.DU)(e,t),o=n>0?n+s.formatMessage({id:"days_short"}):"",d=l>0?l+s.formatMessage({id:"hours_short"}):"";return[o,d,(l>0||i>0)&&!n?i+s.formatMessage({id:"minutes_short"}):"",(i>0||a>0)&&!n&&!l?a+s.formatMessage({id:"seconds_short"}):""].filter(Boolean).join(" ")}},96913:(e,t,s)=>{s.d(t,{m:()=>m.m,A:()=>h});var r=s(6029),n=s(44194),l=s(76356),i=s(99064),a=s(78383),o=s.n(a),d=s(55729),c=s(90248),u=s(12047),x=s(28171);let p=(e,t)=>{let s=(0,d.useState)(e);return t||s};function h(e){let{id:t,location:s,initialTabKey:a,onChange:h=o(),tabs:m,children:g,customControls:j,noSportMenu:f,eventStatusType:v,seasonId:y,isInWidget:b}=e,{isMobile:_}=(0,n.$c)(),[w,k]=p(a,j),{logTabChange:S}=(0,x.A)(),A=(0,u.Ay)({isSportMenuVisible:!f,isInMobileTabs:!1});return(0,d.useEffect)(()=>{w!==a&&k(a)},[t,s,y]),(0,r.jsxs)(i.tU,{onChange:e=>{w!==e&&(k(e),h(e),b||window.scrollTo({left:0,top:0}))},initialValue:a||w,value:w,variant:"primary",fullWidthTabs:_||b,children:[(0,r.jsx)(l.az,{verticalAlign:"top",mdDown:{position:"sticky",bg:"surface.s1",borderBottom:"1px solid",borderColor:"elevation.elevation1",zIndex:"sticky"},style:{top:A},children:(0,r.jsx)(i.tU.List,{underline:!0,scroll:!0,children:m.filter(e=>!e.isHidden).map(e=>(0,r.jsx)(i.tU.Tab,{tabKey:e.tabKey,style:{marginLeft:0},as:"h2",onClick:r=>r.nativeEvent.isTrusted&&e.tabKey!==w?S({type:e.tabKey,id:t,location:s,status:v}):void 0,children:(0,r.jsx)("a",{href:"#tab:".concat(e.tabKey),onClick:e=>e.preventDefault(),style:{color:"inherit"},children:"string"==typeof e.item?(0,r.jsx)(c.A,{id:e.item,values:e.values}):e.item})},"".concat(t,"-").concat(e.tabKey)))})}),g]},t)}var m=s(28132)},98095:(e,t,s)=>{s.d(t,{j:()=>i});var r=s(4967),n=s(45860);let l=e=>fetch(e,{method:"HEAD",cache:"no-store"});function i(){let{data:e,error:t,isLoading:s}=(0,n.Ay)("https://cdn.adapex.io/hb/aaw.sofascore.js",{fetcher:l,dedupingInterval:r.d_});return{isLoading:s,hasAdBlock:!!(null==e?void 0:e.redirected)||void 0!==t}}},98914:(e,t,s)=>{s.d(t,{M:()=>r});let r=function(e,t=0){var s,r,n;return(s="round",r=e,0==+(n=-t)?Math[s](+r):(n*=1,isNaN(r*=1)||"number"!=typeof n||n%1!=0)?NaN:+((r=(r=Math[s](+((r=r.toString().split("e"))[0]+"e"+(r[1]?r[1]-n:-n)))).toString().split("e"))[0]+"e"+(r[1]?+r[1]+n:n))).toFixed(t)}}}]);