!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]="308e1413-417e-4a7f-8713-2c7dbf9265a0",e._sentryDebugIdIdentifier="sentry-dbid-308e1413-417e-4a7f-8713-2c7dbf9265a0")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3554],{3468:(e,t,s)=>{s.d(t,{C:()=>l});var n=s(55729),r=s(19168);let l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e3,t=(0,n.useRef)(!1);return(0,n.useCallback)((s,n)=>{t.current||(t.current=!0,setTimeout(()=>{t.current=!1},e),(0,r.MZ)(s,n))},[])}},3881:(e,t,s)=>{s.d(t,{E:()=>a});var n=s(64082),r=s(6029),l=s(41249),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,h=(0,n.T)(e,["height","width","rowHeight","wrapperStyle","rows","animate","rowGap","uniqueKey"]);return 0===t?null:(0,r.jsx)(l.az,Object.assign({maxW:"100%",bg:"surface.s1",overflow:"hidden"},h,{style:o},{children:(0,r.jsx)(i.D,Object.assign({animate:c,width:s,height:d&&a?d*(a+u):t,uniqueKey:x},{children:(0,r.jsx)(r.Fragment,{children:d?Array(d).fill(null).map((e,t)=>(0,r.jsx)("rect",{x:0,y:t*(a+u),width:"100%",height:a},t)):(0,r.jsx)("rect",{x:0,y:0,width:"100%",height:t})})}))}))}},6198:(e,t,s)=>{s.d(t,{iC:()=>eW,GN:()=>tg,Aw:()=>eG,iy:()=>j,bj:()=>es,ET:()=>eV,Ay:()=>eO});var n=s(6029),r=s(32523),l=s(95083),i=s(76356),a=s(55729),o=s(90248),d=s(90510),c=s(494),u=s(65789),x=s(88339),h=s(41249);function p(e){let{children:t,...s}=e;return(0,n.jsx)(h.so,{direction:"column",gap:"sm",bg:"linear-gradient(180deg, rgba(55, 77, 245, 0.40) 0%, rgba(55, 77, 245, 0.00) 100%)",...s,children:t})}var m=s(70679),f=s(89642),g=s(33752);function j(){let{userId:e,userAccount:t}=(0,a.useContext)(f.t),s=(0,c.d4)(x.$F),r=e===(null==s?void 0:s.id),l=r?null==s?void 0:s.nickname:null==t?void 0:t.nickname;return(0,n.jsx)(i.az,{px:{base:"lg",md:"0"},py:"md",children:(0,n.jsxs)(g.B,{children:[(0,n.jsx)(g.B.Item,{children:(0,n.jsx)(o.A,{id:r?"profile_my_profile":"app.profile"})}),(0,n.jsx)(g.B.Item,{children:l})]})})}var v=s(21377),y=s(947),b=s(54409),_=s(54053),w=s(8476),k=s(76410),A=s(25862),S=s(45860),C=s(41735),E=s(40528),T=s(3468),F=s(52679);let L={[v.lqH.Predictor]:"profile_badge_top_predictor",[v.lqH.Crowdsourcer]:"user_status_contributor",[v.lqH.Editor]:"user_status_editor",[v.lqH.Moderator]:"basic.moderator"},H=e=>{let{badgeType:t,isActive:s,disabled:r,blocked:a,onClick:d}=e,{colors:c}=(0,C.useTheme)(),u=t?L[t]:"profile_badge_selection_no_badge",x=(0,T.C)();return u?(0,n.jsxs)(i.az,{br:"sm",minH:"6xl",position:"relative",onClick:()=>{if(!a)return r?void x((0,n.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:r||a||s?void 0:"surface.s0"},cursor:r||a?"not-allowed":s?void 0:"pointer",children:[(0,n.jsxs)(i.so,{align:"center",justify:"center",direction:"column",gap:"sm",py:"sm",px:"xs",children:[t?(0,n.jsx)(F.A,{userBadge:t,bg:r||a?c.onSurface.nLv3:void 0,size:24}):(0,n.jsx)(b.Cfq,{fill:a?"onSurface.nLv3":"onSurface.nLv2"}),(0,n.jsx)(l.EY,{userSelect:"none",color:r||a?"neutrals.nLv3":"neutrals.nLv1",children:(0,n.jsx)(o.A,{id:u})})]}),s&&(0,n.jsx)(i.az,{position:"absolute",top:"xs",right:"xs",children:(0,n.jsx)(b.sk6,{fill:a?"onSurface.nLv3":"primary.default",isRtlPrevented:!0})})]}):null};function I(e){var t;let{newBadge:s,setNewBadge:r}=e,d=(0,c.d4)(x.$F),u=(null==d?void 0:d.userBadge)===v.lqH.Moderator,{data:h}=(0,S.Ay)(d?v.oJZ.badges(d.id):null),[p,m]=(0,a.useState)(null!=(t=null==d?void 0:d.userBadge)?t:void 0),f=Object.values(v.lqH);return(0,a.useEffect)(()=>{p!==s&&r(p)},[p]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(i.az,{p:"lg",children:[(0,n.jsx)(l.EY,{display:"block",textStyle:"display.medium",textAlign:"center",color:u?"neutrals.nLv3":"neutrals.nLv1",children:(0,n.jsx)(o.A,{id:"profile_badges"})}),(0,n.jsx)(l.EY,{display:"block",textStyle:"assistive.default",textAlign:"center",color:"neutrals.nLv3",mt:"2xs",children:(0,n.jsx)(o.A,{id:"profile_badges_description"})})]}),(0,n.jsxs)(i.xA,{columns:2,gap:"sm",px:"lg",children:[(0,n.jsx)(H,{onClick:()=>{(null==d?void 0:d.userBadge)===void 0?m(void 0):p&&"no_badge"!==p&&m("no_badge")},isActive:!p||"no_badge"===p,blocked:u}),f.map(e=>(0,n.jsx)(H,{badgeType:e,isActive:p===e,disabled:!(null==h?void 0:h.badges.includes(e)),blocked:u,onClick:()=>m(e)},e))]})]})}function z(e){let{isOpen:t,setIsOpen:s,nickname:r,isChatModerator:d,image:u}=e,p=(0,c.wA)(),f=(0,y.A)(),g=(0,c.d4)(x.$F),[j,v]=(0,a.useState)(null),[S,C]=(0,a.useState)(),[E,T]=(0,a.useState)(null),[L,H]=(0,a.useState)(null),z=(0,c.d4)(x.gw),V=(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)(()=>{z===r&&(v(z),s(!1))},[z]),(0,n.jsx)(_.A,{isOpen:t,width:360,setIsOpen:s,renderAdPlaceholder:!1,header:(0,n.jsx)(i.az,{h:"xl"}),footer:(0,n.jsxs)(i.so,{justify:"flex-end",my:"sm",px:"lg",gap:"lg",children:[(0,n.jsx)(l.$n,{variant:"clear",onClick:()=>s(!1),children:(0,n.jsx)(o.A,{id:"basic.cancel"})}),(0,n.jsx)(l.$n,{variant:"filled",onClick:()=>{j&&p((0,w.fV)(j)),E&&p((0,w.bs)(E)),void 0!==S&&(null==g?void 0:g.userBadge)!==S&&(p((0,w.U1)("no_badge"===S?null:S)),(0,k.ke)({action:"change_badge",location:"profile",type:S||"no_badge"})),j===r&&s(!1)},children:(0,n.jsx)(o.A,{id:"basic.save"})})]}),children:(0,n.jsxs)(i.az,{bg:"surface.sp",br:"lg",w:"100%",maxW:"[360px]",pb:"lg",mx:"auto",children:[(0,n.jsxs)(i.so,{direction:"column",align:"center",gap:"md",mb:"lg",p:"lg",children:[(0,n.jsxs)(i.az,{position:"relative",children:[(0,n.jsx)(m.A,{size:150,src:L||u}),(0,n.jsxs)(i.az,{position:"absolute",bottom:"0",right:"0",children:[void 0===S&&(null==g?void 0:g.userBadge)&&(0,n.jsx)(F.A,{userBadge:null==g?void 0:g.userBadge}),S&&"no_badge"!==S&&(0,n.jsx)(F.A,{userBadge:S})]})]}),(0,n.jsxs)(i.I4.label,{cursor:"pointer",children:[(0,n.jsx)(l.EY,{textStyle:"assistive.default",color:"primary.default",p:"xs",cursor:"pointer",children:(0,n.jsx)(o.A,{id:"change_profile_picture"})}),(0,n.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,A.aT)({msgId:"profile_image_error_too_large",toastOptions:{autoClose:3e3,closeButton:!0}}));T(s),H(URL.createObjectURL(s))}}}})]})]}),d&&(0,n.jsxs)(i.so,{mb:"lg",mx:"lg",bg:"surface.s2",br:"lg",py:"md",px:"lg",gap:"lg",children:[(0,n.jsx)(i.az,{children:(0,n.jsx)(b.G_L,{fill:"onSurface.nLv3"})}),(0,n.jsx)(l.EY,{color:"neutrals.nLv1",textStyle:"body.small",children:(0,n.jsx)(o.A,{id:"moderators_nickname_edit_restriction"})})]}),(0,n.jsx)(h.pd,{px:"lg",label:(0,n.jsx)(o.A,{id:"nickname_hint"}),value:null===j?r:j,onChange:e=>v(e),disabled:d,maxLength:30}),g&&V&&(0,n.jsxs)(i.so,{py:"xs",px:"lg",align:"center",minH:"3xl",gap:"sm",mb:"sm",children:[(0,n.jsx)(i.az,{w:"lg",h:"lg",children:(0,n.jsx)(b.zzQ,{w:16,h:16,fill:"onSurface.nLv1"})}),(0,n.jsx)(l.EY,{color:"neutrals.nLv3",textStyle:"body.small",lineHeight:1,children:(0,n.jsx)(o.A,{id:"profile_account_creation_info",values:{platformName:V,date:f.formatDate(1e3*g.createdTimestamp,{dateStyle:"medium"})}})})]}),(0,n.jsx)(h.cG,{}),(0,n.jsx)(I,{newBadge:S,setNewBadge:C})]})})}var V=s(76868),M=function(e){return e.Reason="Reason",e.Confirm="Confirm",e}({}),Y=function(e){return e.TooMany="too-many",e.NoValue="no-value",e.SomethingElse="something-else",e}({});function D(e){let{activeStep:t,onClose:s,onContinueClick:r,isContinueDisabled:a,isSubmitDisabled:d}=e;switch(t){case M.Reason:return(0,n.jsxs)(i.so,{justify:"flex-end",m:"lg",children:[(0,n.jsx)(i.az,{hideBelow:"md",children:(0,n.jsx)(l.$n,{type:"button",variant:"clear",onClick:s,children:(0,n.jsx)(o.A,{id:"close"})},"close")}),(0,n.jsx)(l.$n,{type:"button",variant:"filled",onClick:r,disabled:a,ml:"lg",children:(0,n.jsx)(o.A,{id:"basic.continue"})},"continue")]});case M.Confirm:return(0,n.jsxs)(i.so,{gap:"lg",wrap:"wrap",justify:"flex-end",m:"lg",children:[(0,n.jsx)(i.az,{hideBelow:"md",children:(0,n.jsx)(l.$n,{type:"button",variant:"clear",onClick:s,children:(0,n.jsx)(o.A,{id:"button_not_delete"})},"not-delete")}),(0,n.jsx)(l.$n,{type:"submit",variant:"filled",disabled:d,children:(0,n.jsx)(o.A,{id:"user.confirmDelete"})},"submit")]});default:return null}}function O(e){let{activeStep:t}=e;return(0,n.jsxs)(i.az,{md:{px:"lg",pb:"sm",pt:"lg"},children:[t===M.Reason&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.EY,{display:"block",color:"neutrals.nLv1",textStyle:"display.large",children:(0,n.jsx)(o.A,{id:"delete_account_main_reason"})}),(0,n.jsx)(l.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,n.jsx)(o.A,{id:"select_one"})})]}),t===M.Confirm&&(0,n.jsx)(l.EY,{color:"neutrals.nLv1",textStyle:"display.large",children:(0,n.jsx)(o.A,{id:"user.deleteAccount"})})]})}function W(e){let{options:t,currentValue:s,onChange:r}=e,l=(0,y.A)();return(0,n.jsx)(n.Fragment,{children:t.map(e=>(0,n.jsx)(h.a,{id:e.value,name:"delete-reason",label:l.formatMessage({id:e.label}),value:e.value,checked:s===e.value,onChange:()=>r(e),gap:"lg",py:"md",px:"lg"},e.value))})}let B={[Y.NoValue]:"too_many_accounts",[Y.TooMany]:"dont_see_value",[Y.SomethingElse]:"something_else"};function P(e){let{isOpen:t,setIsOpen:s}=e,r=(0,y.A)(),o=(0,c.wA)(),d=(0,c.d4)(x.Cd),[u,h]=(0,a.useState)(M.Reason),[p,m]=(0,a.useState)(!1),[f,g]=(0,a.useState)(""),[j,b]=(0,a.useState)(""),A=f===Y.SomethingElse&&!j;(0,a.useEffect)(()=>{t&&(0,k.Ex)({source:"other",type:"delete_account"})},[t]);let S=async e=>{e.preventDefault(),m(!0);try{let e=new FormData,t=JSON.stringify({feedback:j,type:1});e.append("payload",t),f===Y.SomethingElse&&j&&d&&await v.QHp.postFeedback(e,d)}finally{(0,k.t9)({source:"other",type:"delete_account",action:"cta_click",choice:B[f]||""}),s(!1),m(!1),o((0,w.mN)())}};return(0,n.jsx)(_.A,{isOpen:t,setIsOpen:s,renderAdPlaceholder:!1,header:(0,n.jsx)(O,{activeStep:u}),footer:null,children:(0,n.jsxs)("form",{method:"post",onSubmit:S,children:[(0,n.jsxs)(i.az,{w:{md:"[400px]"},mx:"auto",children:[u===M.Reason&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(W,{options:[{label:"delete_account_reason_too_many",value:Y.TooMany},{label:"delete_account_reason_no_value",value:Y.NoValue},{label:"delete_account_reason_something",value:Y.SomethingElse}],onChange:e=>g(e.value),currentValue:f}),f===Y.SomethingElse&&(0,n.jsxs)(i.az,{mx:"lg",mb:{mdDown:"lg"},children:[(0,n.jsx)(l.fs,{name:"delete-reason",label:r.formatMessage({id:"hint_text_field"}),maxLength:300,minLength:1,height:"10xl",value:j,onChange:e=>b(e),resize:!1}),(0,n.jsxs)(l.EY,{display:"block",mt:"2xs",textStyle:"assistive.default",color:"neutrals.nLv3",textAlign:"right",children:[j.length,"/",300]})]})]}),u===M.Confirm&&(0,n.jsx)(V.p,{graphic:"chat",titleMessageId:"delete_account_offboarding_title",descriptionMessageId:"delete_account_offboarding_description"})]}),(0,n.jsx)(D,{activeStep:u,onContinueClick:()=>h(M.Confirm),onClose:()=>{s(!1),(0,k.t9)({source:"other",type:"delete_account",action:"close"})},isContinueDisabled:!f||A,isSubmitDisabled:p})]})})}let R=e=>{let{onClick:t,children:s}=e;return(0,n.jsx)(i.so,{h:"4xl",gap:"lg",px:"lg",align:"center",bg:{_hover:"surface.s2"},cursor:"pointer",onClick:t,children:s})},U=e=>{let{onModalToggle:t}=e,s=(0,c.wA)(),[r,d]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{t(r)},[r]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(i.az,{py:"sm",children:[(0,n.jsxs)(R,{onClick:()=>s((0,A.aS)()),children:[(0,n.jsx)(b.EwR,{w:24,h:24,fill:"onSurface.nLv3"}),(0,n.jsx)(l.EY,{textStyle:"body.medium",color:"neutrals.nLv1",children:(0,n.jsx)(o.A,{id:"user.signOut"})})]}),(0,n.jsxs)(R,{onClick:()=>d(!0),children:[(0,n.jsx)(b.xV8,{w:24,h:24,fill:"error.default"}),(0,n.jsx)(l.EY,{textStyle:"body.medium",color:"status.error.default",children:(0,n.jsx)(o.A,{id:"user.deleteAccount"})})]})]}),(0,n.jsx)(P,{isOpen:r,setIsOpen:d})]})};function Z(){let[e,t]=(0,a.useState)(!1),[s,r]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{t(s)},[s]),(0,n.jsx)(h.AM,{trigger:(0,n.jsx)(h.AM.TriggerWrapper,{children:(0,n.jsx)(i.az,{p:"2xs",w:"[28px]",h:"[28px]",children:(0,n.jsx)(b.Hop,{fill:"primary.default",w:24,h:24})})}),controls:[e,t],closeOnOutsideClick:!s,children:(0,n.jsx)(h.AM.Content,{right:0,minW:180,p:0,elevation:3,br:"lg",children:(0,n.jsx)(U,{onModalToggle:e=>r(e)})})})}var K=s(19168);function $(e){let{userId:t}=e,{isMobile:s}=(0,l.$c)(),[r,d]=(0,a.useState)(!1),c=window.location.origin+v.oJZ.profile(t),u=(0,a.useCallback)(async()=>{!r&&(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,K.MZ)((0,n.jsxs)(i.so,{align:"center",children:[(0,n.jsx)(b.G_L,{fill:"surface.s1",mr:"lg"}),(0,n.jsx)(l.EY,{display:"block",color:"surface.s1",textStyle:"display.small",children:(0,n.jsx)(o.A,{id:"basic.copiedToClipboard"})})]}))))},[s,r]);return(0,n.jsx)(l.K0,{onClick:u,variant:"clear",size:"primary",children:(0,n.jsx)(b.VJ,{fill:"primary.default",isRtlPrevented:!0})})}function q(){let e=(0,c.d4)(x.$F),{userAccount:t}=(0,a.useContext)(f.t),[s,r]=(0,a.useState)(!1),d=(null==e?void 0:e.id)===(null==t?void 0:t.id);return t&&e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(i.so,{gap:"sm",align:"center",children:[d&&(0,n.jsx)(l.$n,{variant:"outline",size:"tertiary",onClick:()=>r(!s),children:(0,n.jsx)(l.EY,{color:"primary.default",textStyle:"assistive.default",children:(0,n.jsx)(o.A,{id:"edit"})})}),(0,n.jsx)($,{userId:t.id}),d&&(0,n.jsx)(Z,{})]}),d&&(0,n.jsx)(z,{isOpen:s,setIsOpen:r,nickname:e.nickname,isChatModerator:e.userBadge===v.lqH.Moderator,image:e.imageURL})]}):null}let N={[v.lqH.Predictor]:{title:"profile_badge_top_predictor_info",text:"profile_badge_top_predictor_info_description"},[v.lqH.Editor]:{title:"editor_badge_title",text:"editor_badge_text"},[v.lqH.Crowdsourcer]:{title:"contributor_badge_title",text:"contributor_badge_text"},[v.lqH.Moderator]:{title:"moderator_badge_title",text:"moderator_badge_text"}};function G(e){let{isOpen:t,setIsOpen:s,userBadge:r}=e,a=(0,c.d4)(x.$F),{title:d,text:u}=N[r]||{};return(0,n.jsx)(_.A,{isOpen:t,setIsOpen:s,renderAdPlaceholder:!1,header:(0,n.jsx)(i.az,{m:"lg",mt:["sm","lg"],children:(0,n.jsx)(l.EY,{textStyle:"display.large",children:d&&(0,n.jsx)(o.A,{id:d})})}),footer:null,children:(0,n.jsxs)(i.so,{direction:"column",px:"lg",py:"sm",gap:"xl",maxW:{md:"[350px]"},children:[(0,n.jsx)(i.so,{justify:"center",children:(0,n.jsx)(F.A,{userBadge:r})}),(0,n.jsx)(l.EY,{textStyle:"body.mediumParagraph",children:u&&(0,n.jsx)(o.A,{id:u})}),!(null==a?void 0:a.editor)&&r===v.lqH.Editor&&(0,n.jsxs)(l.Mz,{w:"fit",href:"https://editor.sofascore.com",target:"_blank",rel:"noreferrer",children:[(0,n.jsx)(l.EY,{textStyle:"display.small",color:"primary.default",mr:"xs",userSelect:"none",children:(0,n.jsx)(o.A,{id:"editor_badge_cta_link"})}),(0,n.jsx)(b.HW5,{})]}),(0,n.jsx)(i.so,{justify:"center",mb:"xl",children:(0,n.jsx)(l.$n,{w:"100%",onClick:()=>s(!1),children:(0,n.jsx)(o.A,{id:"got_it_button"})})})]})})}let J={[v.lqH.Moderator]:"basic.moderator",[v.lqH.Predictor]:"profile_badge_top_predictor",[v.lqH.Editor]:"user_status_editor",[v.lqH.Crowdsourcer]:"user_status_contributor"};function Q(e){let{userAccount:t,...s}=e,r=J[t.userBadge];return r?(0,n.jsx)(l.EY,{...s,children:(0,n.jsx)(o.A,{id:r})}):null}function X(e){let{userAccount:t}=e,[s,r]=(0,a.useState)(!1);return Object.values(v.lqH).includes(t.userBadge)?(0,n.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:()=>r(!0),children:[(0,n.jsx)(F.A,{userBadge:t.userBadge,size:16}),(0,n.jsx)(Q,{userAccount:t,textStyle:"assistive.default",color:"neutrals.nLv1"}),(0,n.jsx)(G,{isOpen:s,setIsOpen:r,userBadge:t.userBadge})]}):(0,n.jsx)(i.az,{w:"lg"})}function ee(e){let{userAccount:t}=e,s=t.userBadge===v.lqH.Moderator,r=t.userBadge===v.lqH.Editor&&t.editor;return(0,n.jsxs)(i.az,{overflow:"hidden",children:[(0,n.jsx)(l.EY,{color:"neutrals.nLv1",textStyle:"display.large",lineClamp:2,overflowWrap:"anywhere",title:t.nickname,children:t.nickname}),!s&&r&&(0,n.jsx)(l.EY,{display:"block",mt:"2xs",color:"neutrals.nLv1",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,n.jsx)(u.HH,{isCard:!s,children:(0,n.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)(f.t),{isMobile:u}=(0,l.$c)();if(s)return(0,n.jsx)(r.E,{uniqueKey:"user-account-info-cl",h:[270,838],br:[void 0,"lg"]});if(!t)return null;let h=(null==e?void 0:e.id)===t.id?e:t;return(0,n.jsx)(et,{children:(0,n.jsxs)(p,{pt:[0,"lg"],pb:"sm",br:[0,"xl"],children:[u&&(0,n.jsx)(j,{}),(0,n.jsxs)(i.so,{justify:"space-between",align:"center",mx:"lg",children:[(0,n.jsx)(X,{userAccount:h}),(0,n.jsxs)(l.EY,{textStyle:"assistive.micro",children:[(0,n.jsx)(o.A,{id:"profile.joinDate"})," ",(0,n.jsx)(d.XU,{value:1e3*h.createdTimestamp})]})]}),(0,n.jsx)(i.so,{h:"[110px]",py:"xs",justify:"center",align:"center",children:(0,n.jsx)(m.A,{src:h.imageURL,size:102})}),(0,n.jsxs)(i.so,{justify:"space-between",align:"center",minH:"[60px]",px:"lg",gap:"lg",children:[(0,n.jsx)(ee,{userAccount:h}),(0,n.jsx)(q,{})]})]})})};var en=s(22648),er=s(37567),el=s(4967),ei=s(47146),ea=s(70591),eo=s(23419),ed=s(94604),ec=s(75791),eu=s(2294),ex=s(98516),eh=s(62121);let ep=e=>{let{event:t,voteType:s,location:r}=e,[l,i]=(0,a.useState)(!1);return(0,n.jsxs)(h.so,{gap:"sm",children:[(0,n.jsx)(h.cG,{vertical:!0}),(0,n.jsx)(h.$n,{variant:"unshielded",p:1,onClick:()=>i(!0),style:{zIndex:"unset"},children:(0,n.jsx)(b.GI1,{w:"24",h:"24",fill:"primary.default"})}),(0,n.jsx)(h.aF,{isOpen:l,children:(0,n.jsxs)(h.az,{w:312,bg:"surface.sp",p:"lg",br:"lg",elevation:3,mx:"auto",children:[(0,n.jsx)(h.EY,{font:"display.large",color:"onSurface.nLv1",lineHeight:"24px",mb:"sm",as:"div",children:(0,n.jsx)(o.A,{id:"profile.changeVoteTooltipDescription"})}),(0,n.jsx)(h.EY,{font:"body.medium",color:"onSurface.nLv1",as:"div",children:(0,n.jsx)(o.A,{id:"change_vote_watch_ad"})}),(0,n.jsxs)(h.so,{justify:"flex-end",mt:"xl",children:[(0,n.jsx)(h.$n,{variant:"unshielded",onClick:()=>i(!1),children:(0,n.jsx)(o.A,{id:"close_window_button"})}),(0,n.jsx)(ea.tj,{event:t,params:{editVote:"true",voteType:s},children:(0,n.jsx)(h.$n,{variant:"unshielded",onClick:()=>{(0,k.tN)({type:eh._7[s],location:r,id:t.id,position:(0,eh.mt)(s)||""})},children:(0,n.jsx)(o.A,{id:"pickem.continue"})})})]})]})})]})},em={[v.rjx.WhoWillWin]:"who_will_win",[v.rjx.FirstTeamToScore]:"who_will_score_first_title",[v.rjx.WillBothTeamsScore]:"will_both_teams_score_title"},ef=(0,a.createContext)(null),eg=()=>{let e=(0,a.useContext)(ef);if(!e)throw Error("usePredictionsContext must be used within an PredictionsContextProvider");return e};var ej=s(57126);let ev=e=>{let{correct:t,vote:s}=e;return(0,n.jsx)(h.az,{children:(0,n.jsx)(h.so,{align:"center",justify:"center",mr:"sm",p:"xs sm",minW:24,minH:24,br:s.length>1?"md":"50%",bg:1===t?"success.default":0===t?"error.default":"onSurface.nLv5",children:(0,n.jsx)(h.EY,{color:-1!==t?"surface.s1":"onSurface.nLv1",font:"display.small",textTransform:"uppercase",children:(0,n.jsx)(o.A,{id:s})})})})},ey=e=>{let{score:t,votingEnabled:s}=e;return void 0===t?null:(0,n.jsx)(h.az,{minW:40,mr:s?"sm":void 0,children:(0,n.jsxs)(h.EY,{as:"bdi",display:"block",font:"body.small",align:"right",c:t<0?"error.default":t>0?"success.default":"onSurface.nLv3",children:[t>0?"+":"",(0,ex.M)(t,2)]})})},eb=e=>{let{prediction:t,predictionVote:s,event:r,userId:l,isDaily10x:i,...a}=e,d=(0,c.d4)(eu.BF),{location:u,color:p}=eg(),{correct:m,odds:f,voteType:g}=s,j=function(e,t){let s=(0,c.d4)(ej.xl);if(!s)return t;switch(t){case v.gbi.One:return e.homeNameCode;case v.gbi.Two:return e.awayNameCode;case v.gbi.X:return"Tie";default:return t}}(t,s.vote),y=(0,c.d4)(x.$F),_=em[g],w=1e3*r.startTimestamp>Date.now()&&r.status.type===v.XUj.NotStarted,k=i&&0!==m;return(0,n.jsxs)(h.so,{justify:"space-between",align:"center",minH:"44",px:"lg",pb:"xs",bg:p.card,...a,children:[(0,n.jsxs)(h.so,{align:"center",gap:"sm",children:[k&&(0,n.jsx)(b.W84,{width:18,height:18}),(0,n.jsx)(h.EY,{font:"body.small",c:"onSurface.nLv1",fontWeight:k?"bold":void 0,children:_&&(0,n.jsx)(o.A,{id:_})})]}),(0,n.jsxs)(h.so,{align:"center",children:[(0,n.jsx)(ev,{correct:m,vote:j}),"weekly_challenge"===u&&(0,n.jsx)(ey,{score:s.score,votingEnabled:w}),"predictions"===u&&!d&&(0,n.jsx)(ec.c,{fractionalValue:f.fractionalValue,children:e=>(0,n.jsx)(h.EY,{align:"center",minW:"48",color:"-"!==f.fractionalValue?"secondary.default":"onSurface.nLv3",font:"table.medium",children:e})}),w&&!(0,K.ux)(r)&&(null==y?void 0:y.id)===l&&(0,n.jsx)(ep,{event:r,voteType:g,location:u})]})]})};var e_=s(49519);function ew(e){let{teamId:t,teamName:s,teamType:r,alpha2:l}=e;return r===v.YVh.Person?(0,n.jsx)(e_.w,{size:16,name:s,alt:s,alpha2:l,fallback:(0,n.jsx)(h._V,{src:"/static/images/placeholders/team.svg",width:16,height:16,alt:s})}):r===v.YVh.Regular?(0,n.jsx)(e_.p,{id:t,size:16,alt:s,isSmall:!0}):null}function ek(e,t,s){let n=(0,c.d4)(ej.xl),r=e.displayInverseHomeAwayTeams&&n,[l,i]=[e[t],e[s]];return r?[i,l]:[l,i]}function eA(e){let{prediction:t,userId:s}=e,r={id:t.eventId,slug:t.eventSlug,customId:t.customId,status:t.status,startTimestamp:t.startDateTimestamp,finalResultOnly:t.finalResultOnly,tournament:{category:{sport:{slug:t.sportSlug}}}},[l,i]=ek(t,"homeTeamId","awayTeamId"),[o,c]=ek(t,"homeTeamName","awayTeamName"),[u,x]=ek(t,"homeTeamType","awayTeamType"),[p,m]=ek(t,"homeTeamAlpha2","awayTeamAlpha2"),{color:f}=eg(),g=(0,a.useContext)(eo.k);return(0,n.jsxs)(h.az,{mx:"sm",children:[(0,n.jsx)(ea.tj,{event:r,children:(0,n.jsxs)(h.so,{h:44,px:"lg",pt:"xs",align:"center",justify:"space-between",bg:f.card,hoverBg:"onSurface.nLv4",borderRadius:"lg lg 0 0",children:[(0,n.jsxs)(h.so,{grow:1,basis:0,align:"center",gap:["xs","sm"],minW:0,children:[(0,n.jsx)(ew,{teamId:l,teamName:o,teamType:u,alpha2:p}),(0,n.jsx)(h.EY,{color:"onSurface.nLv1",font:"display.micro",align:"center",as:"div",ellipsis:!0,children:(0,n.jsx)(ed.lC,{original:o})})]}),(0,n.jsx)(h.EY,{color:"onSurface.nLv3",font:"body.small",mx:"sm",children:(0,n.jsx)(d.ib,{value:1e3*t.startDateTimestamp})}),(0,n.jsxs)(h.so,{grow:1,basis:0,align:"center",gap:["xs","sm"],minW:0,justify:"flex-end",children:[(0,n.jsx)(h.EY,{color:"onSurface.nLv1",font:"display.micro",align:"center",as:"div",ellipsis:!0,children:(0,n.jsx)(ed.lC,{original:c})}),(0,n.jsx)(ew,{teamId:i,teamName:c,teamType:x,alpha2:m})]})]})}),(0,n.jsx)(h.az,{bg:f.bg,children:(0,n.jsx)(h.cG,{})}),[v.rjx.WhoWillWin,v.rjx.WillBothTeamsScore,v.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,n.jsx)(eb,{prediction:t,predictionVote:o,event:r,userId:s,borderRadius:l===i.length-1?"0 0 lg lg":void 0,isDaily10x:!!g&&!!(null==o?void 0:o.weeklyChallengeBonusDateTimestamp)},a)})]})}var eS=s(12047);let eC=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:48,{isBottomSheet:t}=eg(),{isDesktop:s}=(0,l.$c)(),n=(0,eS.Ay)({isInMobileTabs:!1,isSportMenuVisible:!1});return t?e:s?0:n+48+e},eE=e=>{let{userId:t,predictions:s,date:r}=e,{color:i,location:a,activeTab:c}=eg(),u=eC(),{isDesktop:x}=(0,l.$c)(),p=new Date,m=new Date(1e3*s[0].startDateTimestamp).setHours(p.getHours(),p.getMinutes(),p.getSeconds(),p.getMilliseconds());return(0,n.jsxs)(h.so,{direction:"column",children:[(0,n.jsx)(h.PI,{isStickingDisabled:x,zIndex:h.Py.Sticky-2,top:u,bg:i.bg,px:"xl",py:"md",mt:"md",children:(0,n.jsxs)(h.so,{align:"center",children:[(0,n.jsx)(ei.v,{timestamp:m,children:e=>{let t=(0,el.Ui)(new Date(r).setHours(0,0,0,0),new Date().setHours(0,0,0,0),"days");return t>-2&&t<2?(0,n.jsxs)(h.EY,{color:"onSurface.nLv1",font:"assistive.default",textTransform:"capitalize",children:[e+",","\xa0"]}):null}}),(0,n.jsx)(h.EY,{color:"onSurface.nLv1",font:"assistive.default",children:(0,n.jsx)(d.XU,{value:m,weekday:"short",day:"numeric",month:"numeric"})}),(0,n.jsx)(h.EY,{color:"onSurface.nLv3",font:"body.small",ml:"auto",children:(0,n.jsx)(o.A,{id:"basic.nEvents",values:{n:s.length}})})]})}),(0,n.jsx)(h.so,{direction:"column",gap:"predictions"===a?["sm","md"]:"sm",children:s.map(e=>(0,n.jsx)(eA,{userId:t,prediction:e},"".concat(e.eventId,"-").concat(c)))})]})};var eT=s(25442),eF=s(43072),eL=s(7643);let eH=(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},[]),eI=e=>{let{userId:t,leaderboardId:s}=e,r=(0,c.wA)(),{activeTab:l}=eg(),{predictions:i,hasMore:o,error:d,isLoading:u,isValidating:p,triggerRef:m,setSize:f}=function(e,t){var s;let{activeTab:n,location:r}=eg(),{ref:l,inView:i}=(0,eF.Wx)(),o=n===eT.H.Finished,{data:d,size:c,setSize:u,isLoading:x,isValidating:h,error:p}=(0,eL.Ay)((s,n)=>{let l=null;return"weekly_challenge"===r&&t&&(l=v.rGM.predictions(t,e,o,s)),"predictions"===r&&(l=v.VfS.predictions(e,o,s)),0===s||(null==n?void 0:n.hasNextPage)?l:null},v.TtD),m=d||[],f=!!m.length&&(null==(s=m[c-1])?void 0:s.hasNextPage),g=m.reduce((e,t)=>[...e,...t.predictions],[]);return(0,a.useEffect)(()=>{i&&f&&!h&&u(e=>e+1)},[i]),{predictions:g,hasMore:f,isLoading:x,isValidating:h,error:p,triggerRef:l,setSize:u}}(t,s),g=(0,c.d4)(x.$F),j=l===eT.H.Finished,y=(0,a.useCallback)(()=>{i&&(null==g?void 0:g.id)===t&&r((0,er.UU)({predictions:i}))},[i]);if((0,a.useEffect)(()=>{y()},[i]),(0,a.useEffect)(()=>{f(1),y()},[l]),d||i&&!i.length&&!u){let e=l===eT.H.Finished?"weekly_challenge_finished_empty":"weekly_challenge_active_empty";return(0,n.jsx)(V.p,{graphic:"predictions-1x2",descriptionMessageId:e,m:"lg auto",px:"md",h:284,maxW:300})}if(i&&i.length){let e=eH(i,!j);return(0,n.jsxs)(n.Fragment,{children:[Object.keys(e).map(s=>(0,n.jsx)(eE,{userId:t,date:s,predictions:e[s]},s)),(o||p)&&(0,n.jsx)(h.so,{justify:"center",children:(0,n.jsx)(h.az,{ref:m,py:"lg",children:(0,n.jsx)(en.a,{})})})]})}return(0,n.jsx)(h.so,{justify:"center",h:600,py:"lg",children:(0,n.jsx)(h.y$,{})})},ez=e=>{let{children:t,...s}=e,{isMobile:r}=(0,l.$c)(),{activeTab:i,setActiveTab:d,isBottomSheet:c,location:u,bottomSheetRef:x,color:p}=eg(),m=(0,a.useRef)(null),f=eC(0);return r&&"predictions"===u?(0,n.jsx)(n.Fragment,{children:t}):(0,n.jsxs)(h.so,{direction:"column",bg:p.bg,pb:["sm","lg"],mb:["md",0],...s,children:[!c&&(0,n.jsx)(h.az,{ref:m,h:40,children:(0,n.jsx)(h.EY,{as:"div",align:"center",color:"onSurface.nLv1",lineHeight:"24px",font:"display.medium",pt:"md",pb:"xs",children:(0,n.jsx)(o.A,{id:"weekly_challenge"===u?"weekly_challenge_votes_this_week":"predictions"})})}),(0,n.jsx)(h.so,{h:48,align:"center",p:"sm",position:"sticky",top:f,zIndex:h.Py.Sticky,bg:p.bg,children:(0,n.jsxs)(h.tU,{variant:"tertiary",initialValue:eT.H.Upcoming,value:i,onChange:e=>{d(e),c&&(null==x?void 0:x.current)&&x.current.scrollTo({top:0}),r&&!c&&m.current&&m.current.getBoundingClientRect().y-f<0&&window.scrollTo({top:m.current.offsetTop-f-40})},children:[(0,n.jsx)(h.tU.Tab,{tabKey:eT.H.Upcoming,children:(0,n.jsx)(o.A,{id:"chip_active"})}),(0,n.jsx)(h.tU.Tab,{tabKey:eT.H.Finished,children:(0,n.jsx)(o.A,{id:"finished"})})]})}),t]})},eV=e=>{let{activeTab:t,setActiveTab:s}=e,{userAccount:l,isUserLoading:i}=(0,a.useContext)(f.t);return(0,n.jsx)(ef.Provider,{value:{activeTab:t,setActiveTab:s,location:"predictions",color:{bg:["surface.s0","surface.s1"],card:["surface.s1","surface.s2"]}},children:(0,n.jsx)(ez,{bg:["surface.s0",void 0],pb:"sm",children:i?(0,n.jsx)(r.E,{uniqueKey:"user-predictions-cl"}):l&&(0,n.jsx)(eI,{userId:l.id})})})};var eM=s(78383),eY=s.n(eM),eD=s(86501);function eO(){let[e,t]=(0,a.useState)(eT.H.Upcoming),s=(0,eS.Ay)({isInMobileTabs:!0,isSportMenuVisible:!1});return(0,n.jsxs)(h.tU,{onChange:s=>{e!==s&&(t(s),window.scrollTo({left:0,top:0}))},initialValue:eT.H.Upcoming,value:e,variant:"secondary",children:[(0,n.jsxs)(h.PI,{zIndex:h.Py.Sticky-1,bg:"surface.s1",p:"sm",h:48,top:s,children:[(0,n.jsx)(h.tU.Tab,{tabKey:eT.H.Upcoming,children:(0,n.jsx)(o.A,{id:"chip_active"})}),(0,n.jsx)(h.tU.Tab,{tabKey:eT.H.Finished,children:(0,n.jsx)(o.A,{id:"finished"})}),(0,n.jsx)(h.tU.Tab,{tabKey:eT.H.Statistics,children:(0,n.jsx)(o.A,{id:"statistics"})})]}),(0,n.jsx)(h.tU.Panel,{tabKey:eT.H.Upcoming,children:(0,n.jsx)(eV,{activeTab:e,setActiveTab:eY()})}),(0,n.jsx)(h.tU.Panel,{tabKey:eT.H.Finished,children:(0,n.jsx)(eV,{activeTab:e,setActiveTab:eY()})}),(0,n.jsx)(h.tU.Panel,{tabKey:eT.H.Statistics,children:(0,n.jsx)(eD._,{})})]})}function eW(e){let{isBottomSheet:t,bottomSheetRef:s}=e,r=(0,c.d4)(x.$F),[l,i]=(0,a.useState)(eT.H.Upcoming);return(null==r?void 0:r.id)&&(null==r?void 0:r.leaderboardId)?(0,n.jsx)(ef.Provider,{value:{activeTab:l,setActiveTab:i,location:"weekly_challenge",isBottomSheet:t,bottomSheetRef:s,color:{bg:t?"surface.sp":"surface.s1",card:t?"surface.s1":"surface.s2"}},children:(0,n.jsx)(ez,{br:[void 0,"lg"],elevation:[void 0,2],children:(0,n.jsx)(eI,{userId:r.id,leaderboardId:r.leaderboardId})})}):null}var eB=s(67333),eP=s(41007),eR=s(47550),eU=s(28157),eZ=s(19451),eK=s(70355);let e$=e=>{let{textId:t,routeName:s,eventType:r,icon:l}=e;return(0,n.jsx)(ea.N_,{routeKey:eK.UE[s],children:(0,n.jsxs)(h.so,{h:48,align:"center",justify:"space-between",px:"lg",py:"md",onClick:()=>(0,k.Wk)({type:r,location:"profile"}),children:[(0,n.jsxs)(h.so,{gap:"lg",align:"center",children:[l,(0,n.jsx)(h.EY,{as:"div",children:(0,n.jsx)(o.A,{id:t})})]}),(0,n.jsx)(b.zQC,{width:24,height:24,icon:"chevron-right",fill:"primary.default"})]})})};function eq(){return(0,n.jsxs)(u.Zp,{children:[(0,n.jsx)(u.Zp.Header,{titleId:"leaderboards_title"}),(0,n.jsx)(e$,{textId:"topPredictors",routeName:eZ.xW.TopPredictors,eventType:"top_predictors",icon:(0,n.jsx)(b.nJv,{fill:"onSurface.nLv1",isRtlPrevented:!0})}),(0,n.jsx)(e$,{textId:"top_contributors_leaderboard",routeName:eZ.xW.TopContributors,eventType:"top_contributors",icon:(0,n.jsx)(b.M_r,{fill:"onSurface.nLv1",isRtlPrevented:!0})}),(0,n.jsx)(e$,{textId:"top_editors_leaderboard",routeName:eZ.xW.TopEditors,eventType:"top_editors",icon:(0,n.jsx)(b.mTZ,{fill:"onSurface.nLv1",isRtlPrevented:!0})}),(0,n.jsx)(u.Zp.Footer,{defaultHeight:"sm"})]})}var eN=s(55794);function eG(){let{userId:e}=(0,a.useContext)(f.t);return(0,n.jsxs)(i.so,{direction:"column",gap:"sm",m:"sm",children:[(0,n.jsx)(eU.A,{}),(0,n.jsx)(eR.pk,{utIds:null}),(0,n.jsx)(eq,{}),(0,n.jsx)(eN.S,{}),(0,n.jsx)(eB.A,{userId:e}),(0,n.jsx)(eP.A,{userId:e})]})}var eJ=s(45501),eQ=s(3881),eX=s(33480),e0=s(59721);let e1=e=>{let{managedLeague:t}=e,{uniqueTournament:s}=t;return(0,n.jsx)(ea.tQ,{tournament:s,children:(0,n.jsxs)(i.so,{align:"center",h:"4xl",minW:{md:"[360px]"},px:"lg",gap:"md",cursor:"pointer",bg:{_hover:"neutrals.nLv5"},children:[(0,n.jsx)(e0.e,{size:24,id:s.id}),(0,n.jsx)(l.EY,{display:"block",textStyle:"body.medium",color:"neutrals.nLv1",children:s.name})]})})};function e4(e){let{uniqueTournaments:t,isOpen:s,setIsOpen:r}=e;return(0,n.jsx)(_.A,{header:"profile_edited_competitions",isOpen:s,setIsOpen:r,children:(0,n.jsx)(i.az,{maxH:"[60vh]",children:t.map(e=>(0,n.jsx)(e1,{managedLeague:e},e.uniqueTournament.id))})})}let e2=e=>{let{managedLeague:t}=e,{uniqueTournament:s}=t;return(0,n.jsx)(ea.tQ,{tournament:s,children:(0,n.jsxs)(i.so,{justify:"space-between",align:"center",h:"4xl",px:"lg",cursor:"pointer",bg:{_hover:"neutrals.nLv5"},children:[(0,n.jsxs)(i.so,{gap:"md",align:"center",children:[(0,n.jsx)(eX.e,{size:24,id:s.id}),(0,n.jsx)(l.EY,{display:"block",textStyle:"body.medium",color:"neutrals.nLv1",children:s.name})]}),(0,n.jsx)(b.zQC,{icon:"chevron-right",width:24,height:24,fill:"primary.default"})]})})};function e5(){let{userId:e}=(0,a.useContext)(f.t),{data:t,isLoading:s}=(0,S.Ay)(v.VfS.managedLeagues(e)),[r,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,n.jsx)(eQ.E,{uniqueKey:"edited-competitions-cl",h:328,br:"lg"}):(null==x?void 0:x.length)?(0,n.jsxs)(u.Zp,{isInverseDesktop:!0,children:[(0,n.jsx)(u.Zp.Header,{titleId:"profile_edited_competitions"}),null==x?void 0:x.slice(0,5).map(e=>(0,n.jsx)(e2,{managedLeague:e},e.uniqueTournament.id)),x&&x.length>5&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.so,{justify:"center",mt:"sm",children:(0,n.jsx)(l.$n,{size:"tertiary",onClick:()=>d(!0),children:(0,n.jsx)(o.A,{id:"see_all"})})}),(0,n.jsx)(e4,{isOpen:r,setIsOpen:d,uniqueTournaments:x})]}),(0,n.jsx)(u.Zp.Footer,{defaultHeight:"sm"})]}):null}var e3=s(75414);let e6=()=>{(0,k.Wk)({type:"top_editors",location:"profile"})};function e7(){return(0,n.jsx)(ea.N_,{routeKey:eK.UE[eZ.xW.TopEditors],onClick:e6,children:(0,n.jsxs)(i.so,{align:"center",justify:"space-between",py:"md",px:"lg",gap:"md",cursor:"pointer",bg:{_hover:"neutrals.nLv5"},roundedBottom:"lg",children:[(0,n.jsxs)(i.so,{gap:"md",align:"center",children:[(0,n.jsx)(F.A,{userBadge:v.lqH.Editor,size:24}),(0,n.jsx)(l.EY,{display:"block",textStyle:"body.medium",color:"neutrals.nLv1",userSelect:"none",children:(0,n.jsx)(o.A,{id:"profile_view_top_editors"})})]}),(0,n.jsx)(b.zQC,{icon:"chevron-right",width:24,height:24,fill:"primary.default"})]})})}function e9(e){let{stat:t,titleId:s}=e;return(0,n.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,n.jsx)(l.EY,{display:"block",textAlign:"center",textStyle:{base:"display.small",md:"display.medium"},color:"neutrals.nLv1",children:"string"==typeof t?t:(0,e3.A)(+(0,ex.M)(t||0))}),(0,n.jsx)(l.EY,{display:"block",textAlign:"center",textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,n.jsx)(o.A,{id:s})})]})}function e8(){let{userAccount:e,isUserLoading:t,userId:s}=(0,a.useContext)(f.t),{data:r,isLoading:l}=(0,S.Ay)(v.VfS.editorEventsCount(s));if(l||t)return(0,n.jsx)(i.so,{justify:"center",py:"lg",h:{base:"[168px]",md:"[124px]"},children:(0,n.jsx)(h.y$,{})});let o=null==e?void 0:e.userEditorScoreAggregates;return o||r?(0,n.jsxs)(i.az,{bg:"surface.s1",elevation:{mdDown:"2"},br:{mdDown:"lg"},children:[(0,n.jsxs)(i.az,{py:{mdDown:"sm"},px:{mdDown:"lg"},children:[(0,n.jsxs)(i.so,{gap:{md:"sm"},mb:{md:"sm"},children:[(0,n.jsx)(e9,{stat:null==r?void 0:r.editedEvents,titleId:"profile_added_matches"}),(0,n.jsx)(e9,{stat:null==r?void 0:r.eventOpenings,titleId:"match_views"})]}),(0,n.jsxs)(i.so,{gap:{md:"sm"},children:[(0,n.jsx)(e9,{stat:(null==o?void 0:o.currentRanking)||"-",titleId:"profile_leaderboard_position"}),(0,n.jsx)(e9,{stat:null==o?void 0:o.score,titleId:"points"})]})]}),(0,n.jsxs)(i.az,{display:["block","none"],children:[(0,n.jsx)(h.cG,{}),(0,n.jsx)(e7,{},s)]})]}):null}var te=s(21501),tt=s(78488),ts=s(83170),tn=s(28446),tr=s(56591),tl=s(10533),ti=s(71024),ta=s.n(ti);let to=ta()(()=>s.e(2254).then(s.bind(s,22254)),{loadableGenerated:{webpack:()=>[22254]},loading:()=>(0,n.jsx)(r.E,{uniqueKey:"event-openings-graph-graphic-cl",h:171})}),td=ta()(()=>s.e(4140).then(s.bind(s,94140)),{loadableGenerated:{webpack:()=>[94140]},loading:()=>(0,n.jsx)(r.E,{uniqueKey:"rtl-event-openings-graph-graphic-cl",h:171})});function tc(){let[e,t]=(0,a.useState)(!1),s="rtl"===(0,a.useContext)(C.ThemeContext).settings.textDirection;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(_.A,{header:"monthly_match_views",isOpen:e,setIsOpen:t,children:(0,n.jsxs)(i.az,{w:{base:"100%",md:"[320px]"},px:"lg",children:[(0,n.jsx)(l.EY,{display:"block",textStyle:"body.mediumParagraph",color:"neutrals.nLv1",pb:"lg",children:(0,n.jsx)(o.A,{id:"monthly_match_views_info_bubble"})}),(0,n.jsx)(l.EY,{display:"block",textStyle:"assistive.default",color:"neutral.default",ml:"xl",children:(0,n.jsx)(o.A,{id:"profile_number_of_match_openings"})}),(0,n.jsxs)(i.so,{align:"center",overflow:"hidden",children:[s?(0,n.jsx)(td,{}):(0,n.jsx)(to,{}),(0,n.jsx)(l.EY,{display:"block",textStyle:"assistive.default",color:"status.val",mt:"sm",children:(0,n.jsx)(o.A,{id:"profile_all_editors_average"})})]}),(0,n.jsx)(l.EY,{display:"block",textStyle:"assistive.default",color:"neutral.default",ml:"[120px]",children:(0,n.jsx)(o.A,{id:"month"})})]})}),(0,n.jsx)(l.K0,{variant:"clear",onClick:()=>t(!0),children:(0,n.jsx)(b.G_L,{fill:"onSurface.nLv3"})})]})}function tu(e){let{points:t,avg:s}=e,{colors:r,typography:l,settings:o}=(0,C.useTheme)(),d="rtl"===o.textDirection,c=(0,y.A)(),u=(0,a.useRef)(null),x=new Date,h=new Date(x.getFullYear(),x.getMonth()-6+1,1),p=function(e,t){let s=new Date;if(!t)return[e,s].map(e=>({date:e,score:0}));let n=(0,el.ZV)(e),r=Object.keys(t).map(e=>+e),l=Math.min(...r),i=r.filter(e=>e>=n).map(e=>({date:(0,el.pp)(e),score:t[e]}));if(!i.find(t=>t.date===e)){let s=r.findIndex(e=>e>n),l=t[r[s-1]];l&&i.unshift({date:e,score:l})}return l>n&&(i.unshift({date:(0,el.pp)(l-86400),score:0}),i.unshift({date:e,score:0})),i}(h,t),m=[h,x],f=Math.ceil(Math.max(...p.map(e=>e.score))),g=[0,.33*f,.66*f,f],j=s>f,v={left:d?16:36,right:d?36:16,top:j?26:16,bottom:36};return(0,te.st)(()=>{var e;if(!u.current)return;(0,tr.A)(u.current).selectAll("*").remove();let t=(0,tr.A)(u.current).append("svg").attr("width","100%").attr("height",116+v.bottom+v.top),n=null==(e=t.node())?void 0:e.getBoundingClientRect(),i=(null==n?void 0:n.width)||u.current.clientWidth,a=(0,ts.A)().domain(d?m.reverse():m).range([v.left,i-v.right]).clamp(!0),o=(0,tn.A)().domain([0,f]).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?tt.eH:tt.V4)(o).tickSize(0).tickValues(g).tickPadding(16).tickFormat(e=>(0,e3.A)(+(0,ex.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,tt.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",r.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(g).join("line").attr("x1",a(h)).attr("x2",a(x)).attr("y1",e=>o(e)).attr("y2",e=>o(e)).attr("stroke",r.onSurface.nLv4).attr("stroke-dasharray","4 4").attr("stroke-width","1px");let b=(0,tl.A)().x(e=>a(e.date)).y(e=>o(e.score));t.append("path").attr("stroke",r.secondary.default).attr("fill","none").attr("stroke-width","2px").attr("d",b(p)||"");let _=j?o(s)-10:o(s);t.append("g").classed("avg",!0).selectAll("line").data([null]).join("line").attr("x1",a(h)).attr("x2",a(x)).attr("y1",_).attr("y2",_).attr("stroke",r.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",r.sofaSingles.value).attr("x",d?i-v.right:v.left).attr("y",o(s)-(j?16:6)).text(c.formatMessage({id:"avg.lc"})+" "+(0,e3.A)(s))},200,[p]),(0,n.jsx)(i.az,{ref:u})}function tx(){let{userId:e}=(0,a.useContext)(f.t),{data:t,isLoading:s}=(0,S.Ay)(v.VfS.eventOpeningsGraph(e));return t||s?(0,n.jsxs)(u.Zp,{isInverseDesktop:!0,children:[(0,n.jsx)(u.Zp.Header,{titleId:"monthly_match_views",actionComponent:(0,n.jsx)(tc,{})}),t?(0,n.jsx)(tu,{points:t.points,avg:t.average}):(0,n.jsx)(r.E,{uniqueKey:"editor-event-openings-graph-cl",h:168,br:"lg",mx:"sm",animate:!0})]}):null}var th=s(91603),tp=s(65078);function tm(e){let{eventData:t,index:s}=e,{event:r,eventOpenings:a}=t,o=(0,tp.gm)(r,"winnerCode"),d=o===v.Jfo.Left?"neutrals.nLv1":"neutrals.nLv3",c=o===v.Jfo.Right?"neutrals.nLv1":"neutrals.nLv3",[u,x]=(0,tp.jr)(r,"homeTeam","awayTeam"),[p,m]=(0,tp.jr)(r,"homeScore","awayScore");return(0,n.jsx)(i.az,{cursor:"pointer",bg:{_hover:"neutrals.nLv5"},children:(0,n.jsx)(ea.tj,{event:r,children:(0,n.jsxs)(i.so,{pl:"lg",pr:"md",h:"4xl",align:"center",children:[(0,n.jsxs)(l.Ym,{minW:"xl",textAlign:"center",color:"neutrals.nLv1",textStyle:"body.small",children:[s+1,"."]}),(0,n.jsx)(h.cG,{vertical:!0,mx:"sm",my:"6px"}),(0,n.jsx)(i.az,{flexGrow:"1",overflow:"hidden",children:(0,n.jsxs)(i.so,{direction:"column",gap:"2xs",children:[(0,n.jsxs)(i.so,{justify:"space-between",children:[(0,n.jsxs)(i.so,{grow:1,align:"center",gap:"sm",overflowX:"hidden",children:[(0,n.jsx)(th.p,{size:16,id:u.id}),(0,n.jsx)(l.Ym,{color:d,textStyle:"body.medium",truncate:!0,children:(0,n.jsx)(ed.lC,{original:u.name})})]}),(0,n.jsx)(l.EY,{display:"block",color:d,textStyle:"body.medium",ml:"lg",children:p.display})]}),(0,n.jsxs)(i.so,{justify:"space-between",children:[(0,n.jsxs)(i.so,{grow:1,align:"center",gap:"sm",overflowX:"hidden",children:[(0,n.jsx)(th.p,{size:16,id:x.id}),(0,n.jsx)(l.Ym,{color:c,textStyle:"body.medium",truncate:!0,children:(0,n.jsx)(ed.lC,{original:x.name})})]}),(0,n.jsx)(l.EY,{display:"block",color:c,textStyle:"body.medium",ml:"lg",children:m.display})]})]})}),(0,n.jsx)(h.cG,{vertical:!0,mx:"sm",my:"6px"}),(0,n.jsxs)(i.so,{direction:"column",align:"center",minW:"2xl",gap:"2xs",children:[(0,n.jsx)(b.Mv5,{fill:"onSurface.nLv3"}),(0,n.jsx)(l.EY,{color:"primary.default",textStyle:"assistive.default",children:(0,e3.A)(a)})]})]})})})}function tf(){let{userId:e}=(0,a.useContext)(f.t),{data:t,isLoading:s}=(0,S.Ay)(v.VfS.mostOpenedEvents(e));return s?(0,n.jsx)(eQ.E,{uniqueKey:"editor-popular-events-cl",h:304,br:"lg"}):(null==t?void 0:t.events.length)?(0,n.jsxs)(u.Zp,{isInverseDesktop:!0,children:[(0,n.jsx)(u.Zp.Header,{titleId:"most_viewed_matches"}),t.events.map((e,t)=>(0,n.jsx)(tm,{eventData:e,index:t},e.event.id))]}):null}function tg(){let{isMobile:e}=(0,l.$c)(),{userAccount:t}=(0,a.useContext)(f.t);return(0,n.jsxs)(u.BU,{children:[(0,n.jsx)(e8,{}),(0,n.jsx)(e5,{}),(0,n.jsx)(tx,{}),(0,n.jsx)(tf,{}),e&&(null==t?void 0:t.editor)&&(0,n.jsx)(eJ.s,{})]})}},12047:(e,t,s)=>{s.d(t,{Ay:()=>i});var n=s(95083),r=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,r.YU)(),{isMobile:o}=(0,n.$c)(),d=50*!!e,c=48+d+48*!!t;return(0,l.useEffect)(()=>{if(!o)return void i(0);i(a===r.Dh.Up?c:d)},[a,o]),s}},17357:(e,t,s)=>{s.d(t,{A:()=>o});var n=s(21377),r=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,r.useState)(),[c,u]=(0,r.useState)(),x=(0,l.wA)();(0,r.useEffect)(()=>{(null==t?void 0:t.event)?x((0,a.$n)(t.event)):e&&n.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 h=(0,l.d4)(t=>{let{favorites:{events:s}}=t;return e?s[e]:void 0});(0,r.useEffect)(()=>{if(!e||!s)return;let t="event-details-".concat(e);return x((0,a.vB)({entities:[e],refreshTaskId:t},{fetchFunction:n.nk6.fetchEvent.bind(null,e)})),()=>{x((0,a.tM)(t))}},[e,s]);let[p,m]=(0,i.A)(h||(null==t?void 0:t.event),"homeTeam","awayTeam",o||(null==t?void 0:t.event)),[f,g]=(0,i.A)(h||(null==t?void 0:t.event),"homeScore","awayScore",o||(null==t?void 0:t.event));return{event:h,fetchedEvent:o,leftTeam:p,rightTeam:m,leftScore:f,rightScore:g,error:c}}},23419:(e,t,s)=>{s.d(t,{A:()=>l,k:()=>r});var n=s(55729);let r=(0,n.createContext)(null);function l(){let e=(0,n.useContext)(r);if(!e)throw Error("useWeeklyChallengeContext must be used within an WeeklyChallengeContextProvider");return e}},25442:(e,t,s)=>{s.d(t,{H:()=>n});var n=function(e){return e[e.Upcoming=0]="Upcoming",e[e.Finished=1]="Finished",e[e.Statistics=2]="Statistics",e}({})},28157:(e,t,s)=>{s.d(t,{A:()=>h});var n=s(6029),r=s(41249),l=s(90248),i=s(494),a=s(65789),o=s(54409),d=s(70591),c=s(2294),u=s(76410);let x=e=>{let{routeKey:t,icon:s,id:i,onClick:a}=e;return(0,n.jsx)(d.N_,{routeKey:t,onClick:a,children:(0,n.jsxs)(r.so,{justify:"space-between",align:"center",p:"md lg",children:[(0,n.jsxs)(r.so,{gap:"lg",children:[s,(0,n.jsx)(r.EY,{font:"body.mediumParagraph",children:(0,n.jsx)(l.A,{id:i})})]}),(0,n.jsx)(o.zQC,{icon:"chevron-right",width:24,height:24,fill:"primary.default"})]})})};function h(){let e=(0,i.d4)(c.BF);return(0,n.jsxs)(a.Zp,{children:[(0,n.jsx)(a.Zp.Header,{titleId:"quick_links"}),(0,n.jsx)(x,{routeKey:"user.weeklyChallenge",onClick:()=>(0,u.Wk)({type:"weekly_challenge",location:"profile"}),id:"weekly_challenge",icon:(0,n.jsx)(o.zQC,{icon:"leagues-outline",fill:"onSurface.nLv1"})}),!e&&(0,n.jsx)(x,{routeKey:"betting",id:"app.droppingOdds",icon:(0,n.jsx)(o.dv0,{fill:"onSurface.nLv1",width:"24",height:"24"}),onClick:u.M8}),(0,n.jsx)(a.Zp.Footer,{defaultHeight:"sm"})]})}},28171:(e,t,s)=>{s.d(t,{A:()=>a});var n=s(95083),r=s(78383),l=s.n(r),i=s(76410);function a(){let{isMobile:e}=(0,n.$c)();return{logTabChange:e?i.yy:l()}}},30720:(e,t,s)=>{s.d(t,{A:()=>r});var n=s(69385);function r(e,t,s,r){let l=(0,n.A)(r);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:()=>n.E});var n=s(3881)},33144:(e,t,s)=>{s.d(t,{p:()=>n.p});var n=s(91603)},33752:(e,t,s)=>{s.d(t,{B:()=>h});var n=s(6029),r=s(95083),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]",borderWidth:"[3px 0 3px 5px]",borderTopColor:"[transparent]",borderRightColor:"[transparent]",borderBottomColor:"[transparent]",borderLeftColor:"neutrals.nLv3",_rtl:{borderWidth:"[3px 5px 3px 0]",borderTopColor:"[transparent]",borderLeftColor:"[transparent]",borderBottomColor:"[transparent]",borderRightColor:"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)":{paddingTop:"md",paddingBottom:"md",paddingLeft:"lg",paddingRight:"lg",md:{paddingLeft:"0",paddingRight:"0"},"@supports not selector(:has(a, b))":{paddingTop:"md",paddingBottom:"md",paddingLeft:"lg",paddingRight:"lg",md:{paddingLeft:"0",paddingRight:"0"}}}},variants:{isHomePage:{true:{md:{padding:"0"}}}}}),x=(0,i.I4)("div",u),h=e=>{let{children:t,isHomePage:s}=e;return(0,n.jsx)(x,{isHomePage:s,children:(0,n.jsx)(c,{children:t})})};h.Item=e=>{let{children:t}=e;return(0,n.jsx)(o,{"data-testid":"breadcrumb",children:t})},h.Title=e=>{let{children:t}=e;return(0,n.jsx)(r.Li,{display:"inline",className:"breadcrumb-title","data-testid":"breadcrumb_title",children:(0,n.jsx)(r.H1,{display:"inline",textStyle:"display.micro",color:"neutrals.nLv3",children:t})})}},39419:(e,t,s)=>{s.d(t,{M:()=>d});var n=s(6029),r=s(4967),l=s(41249),i=s(55729),a=s(947),o=s(96470);let d=e=>{let{hasChallengeEnded:t,challengeEndTime:s,...d}=e,[c,u]=(0,i.useState)(new Date().getTime()),x=(0,a.A)();if((0,i.useEffect)(()=>{let e=setInterval(()=>u(new Date().getTime()),1e3);return()=>clearInterval(e)},[c]),!s)return null;let h=t?s+r.dp:s;return(0,n.jsx)(l.EY,{...d,children:h{s.d(t,{y:()=>a});var n=s(6029),r=s(41249),l=s(90248),i=s(54409);let a=e=>{let{messageId:t,font:s="body.medium"}=e;return(0,n.jsxs)(r.so,{align:"center",gap:"lg",children:[(0,n.jsx)(i.G_L,{fill:"surface.s1"}),(0,n.jsx)(r.EY,{block:!0,color:"surface.s1",font:s,children:(0,n.jsx)(l.A,{id:t})})]})}},41007:(e,t,s)=>{s.d(t,{A:()=>x});var n=s(6029),r=s(41249),l=s(494),i=s(65789),a=s(19168),o=s(7067),d=s(14930),c=s(27705);function u(e){let{experiments:t}=e,[s,l]=(0,a.yR)("experimentPickerValue","-"),d=[{label:"-"}];return t.forEach(e=>{e.variants.forEach(t=>{t!==o.KT.Control&&t!==o.KT.None&&d.push({label:t===o.KT.Treatment?e.name:"".concat(e.name,"---").concat(t)})})}),(0,n.jsx)(i.Zp,{children:(0,n.jsx)(r.az,{p:"md",children:(0,n.jsx)(r.jT,{label:"Experiment:",options:d,value:{label:s},onChange:e=>{let{label:s}=e;l(s),t.forEach(e=>{let t=s.split("---"),n=t[0],r=t[1]||o.KT.Treatment;e.name===n?(0,a.IO)((0,c.L4)(e.name),r):(0,a.IO)((0,c.L4)(e.name),o.KT.None)})},clearable:!1})})})}let x=e=>{let{userId:t}=e,s=(0,l.d4)(e=>e.auth.userAccount),r=(null==s?void 0:s.chatRole)==="admin",i=!t||(null==s?void 0:s.id)===t,a=[...d.f_,...d.gc];return a.length&&i&&r?(0,n.jsx)(u,{experiments:a}):null}},45501:(e,t,s)=>{s.d(t,{s:()=>u});var n=s(6029),r=s(41249),l=s(90248),i=s(494),a=s(65789),o=s(54409),d=s(88339),c=s(76410);let u=e=>{let{isInWidget:t}=e,s=(0,i.d4)(d.$F);return(null==s?void 0:s.editor)?null:(0,n.jsx)(a.Zp,{isInverseDesktop:t,children:(0,n.jsxs)(r.az,{p:"md",children:[(0,n.jsxs)(r.so,{p:"xs",mb:"xs",align:"center",children:[(0,n.jsx)(o._jO,{minW:40,minH:40,width:"40px",height:"40px",mr:"md",fill:"primary.default"}),(0,n.jsx)(r.EY,{font:"display.small",color:"onSurface.nLv1",children:(0,n.jsx)(l.A,{id:"editor_promo_text"})})]}),(0,n.jsx)("img",{style:{maxWidth:"280px",width:"100%"},src:"/static/images/editor/editor-mobile.png",alt:"eventEditorBannerImage"}),(0,n.jsx)("a",{href:"https://editor.sofascore.com/?utm_source=editor.sofascore.com&utm_medium=web_button&utm_campaign=join_sofascore_editor_team_desktop&utm_content=web_button_desktop",target:"_blank",rel:"noreferrer",onClick:c.Ao,children:(0,n.jsxs)(r.so,{mt:"lg",justify:"center",align:"center",bg:"surface.s2",br:"sm",cursor:"pointer",gap:"xs",p:"md",children:[(0,n.jsx)(r.EY,{font:"display.small",color:"primary.default",hover:!0,children:(0,n.jsx)(l.A,{id:"check_out_sofascore_editor"})}),(0,n.jsx)(o.HW5,{fill:"primary.default",width:16,height:16})]})})]})})}},50148:(e,t,s)=>{s.d(t,{A:()=>c});var n=s(6029),r=s(95083),l=s(76356),i=s(90248),a=s(54053),o=s(3541);let d=e=>{let{titleId:t,bulletIds:s}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.az,{px:"lg",textStyle:"body.mediumParagraph",fontWeight:700,children:(0,n.jsx)(i.A,{id:t})}),(0,n.jsx)("ul",{children:s.map(e=>(0,n.jsx)(r.Li,{children:(0,n.jsx)(i.A,{id:e})},e))})]})};function c(e){let{isOpen:t,setIsOpen:s}=e;return(0,n.jsx)(a.A,{header:(0,n.jsxs)(l.so,{h:"4xl",pt:"lg",pb:"sm",gap:"lg",px:{md:"lg"},justify:"space-between",children:[(0,n.jsx)(l.az,{textStyle:"display.large",color:"neutrals.nLv1",truncate:!0,children:(0,n.jsx)(i.A,{id:"weekly_about_streaks"})}),(0,n.jsx)(o.A,{h:24})]}),isOpen:t,setIsOpen:s,children:(0,n.jsxs)(l.az,{pt:"sm",maxW:{md:"[360px]"},children:[(0,n.jsx)(d,{titleId:"weekly_streaks_starting_losing",bulletIds:["weekly_streaks_starting_bullet","weekly_streaks_staying_bullet","weekly_streaks_losing_bullet"]}),(0,n.jsx)("br",{}),(0,n.jsx)(d,{titleId:"weekly_streaks_tracking",bulletIds:["weekly_streaks_tracking_rivals"]})]})})}},55365:(e,t,s)=>{s.d(t,{KY:()=>d,UR:()=>u,gj:()=>o,lZ:()=>a,mq:()=>c});var n=s(6029),r=s(21377),l=s(54409),i=s(98516);r.QCR.AussieRules,r.QCR.Football,r.QCR.Futsal,r.QCR.Handball,r.QCR.Rugby;let a=(e,t,s)=>{let n=e.status.type===r.XUj.InProgress,l=n&&e.crowdsourcingDataDisplayEnabled,i=t===r.Jfo.Left,a=t===r.Jfo.Right;return l?"sofaSingles.crowdsourcingLive":n?"sofaSingles.live":s?i?"onSurface.nLv1":"onSurface.nLv3":a?"onSurface.nLv1":"onSurface.nLv3"};function o(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 d=(e,t)=>(0,i.M)(e.map(e=>{var s,n;return null!=(n=null==t||null==(s=t[e])?void 0:s.overs)?n:0}).reduce((e,t)=>e+t,0),1),c=e=>{switch(e){case"WC":case"LL":return"playoffs.relegation";case"Q":case"A":case"PR":case"SE":return"playoffs.promotionToXPlayoff";default:return"playoffs.promotionToYPlayoff"}},u=(e,t,s)=>{if(e===r.QCR.Tennis)return s===r.Jfo.Left||s===r.Jfo.Right?(0,n.jsx)(l.OXq,{fill:"secondary.default"}):void 0;if(e===r.QCR.AmericanFootball){let e=null==t?void 0:t.currentPossession,s=Number(null==t?void 0:t.currentDown);return s>=1&&s<=4&&(e===r.Jfo.Left||e===r.Jfo.Right)?(0,n.jsx)(l.CvR,{icon:"af-touchdown",w:16,h:16,fill:"sofaSingles.live"}):void 0}}},55794:(e,t,s)=>{s.d(t,{S:()=>y});var n=s(6029),r=s(95083),l=s(76356),i=s(55729),a=s(43072),o=s(947),d=s(90248),c=s(494),u=s(54409),x=s(50801),h=s(40528),p=s(88339),m=s(89642),f=s(76410),g=s(3468);let j=()=>(0,n.jsxs)("svg",{width:"102",height:"101",viewBox:"0 0 102 101",fill:"none",style:{position:"absolute",bottom:16,right:0,opacity:.1},children:[(0,n.jsx)("path",{d:"M66.8686 67.5H50.1543V84.2501H66.8686V67.5Z",fill:"#FCFCFE"}),(0,n.jsxs)("g",{opacity:"0.5",children:[(0,n.jsx)("path",{d:"M100.287 84.25H83.5723V101H100.287V84.25Z",fill:"#FCFCFE"}),(0,n.jsx)("path",{d:"M16.7142 84.25H0V101H16.7142V84.25Z",fill:"#FCFCFE"}),(0,n.jsx)("path",{d:"M50.142 67.5H33.4277V84.2501H50.142V67.5Z",fill:"#FCFCFE"}),(0,n.jsx)("path",{d:"M116.999 50.75H100.285V67.5001H116.999V50.75Z",fill:"#FCFCFE"}),(0,n.jsx)("path",{d:"M66.8569 50.75H50.1426V67.5001H66.8569V50.75Z",fill:"#FCFCFE"}),(0,n.jsx)("path",{d:"M50.142 34H33.4277V50.7497H50.142V34Z",fill:"#FCFCFE"}),(0,n.jsx)("path",{d:"M33.4291 34H16.7148V50.7497H33.4291V34Z",fill:"#FCFCFE"}),(0,n.jsx)("path",{d:"M83.5717 17.25H66.8574V33.9997H83.5717V17.25Z",fill:"#FCFCFE"}),(0,n.jsx)("path",{d:"M50.142 17.25H33.4277V33.9997H50.142V17.25Z",fill:"#FCFCFE"}),(0,n.jsx)("path",{d:"M83.5717 0.5H66.8574V17.2501H83.5717V0.5Z",fill:"#FCFCFE"}),(0,n.jsx)("path",{d:"M50.142 0.5H33.4277V17.2501H50.142V0.5Z",fill:"#FCFCFE"})]}),(0,n.jsxs)("g",{opacity:"0.8",children:[(0,n.jsx)("path",{d:"M83.5717 84.25H66.8574V101H83.5717V84.25Z",fill:"#FCFCFE"}),(0,n.jsx)("path",{d:"M66.8569 84.25H50.1426V101H66.8569V84.25Z",fill:"#FCFCFE"}),(0,n.jsx)("path",{d:"M33.4291 84.25H16.7148V101H33.4291V84.25Z",fill:"#FCFCFE"}),(0,n.jsx)("path",{d:"M83.5717 67.5H66.8574V84.2501H83.5717V67.5Z",fill:"#FCFCFE"}),(0,n.jsx)("path",{d:"M50.142 50.7495H33.4277V67.4996H50.142V50.7495Z",fill:"#FCFCFE"}),(0,n.jsx)("path",{d:"M33.4291 50.7495H16.7148V67.4996H33.4291V50.7495Z",fill:"#FCFCFE"}),(0,n.jsx)("path",{d:"M66.8569 17.25H50.1426V33.9997H66.8569V17.25Z",fill:"#FCFCFE"}),(0,n.jsx)("path",{d:"M33.4291 17.25H16.7148V33.9997H33.4291V17.25Z",fill:"#FCFCFE"}),(0,n.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)(p.$F),s=(null==t?void 0:t.id)===e,{isMobile:y}=(0,r.$c)(),b=(0,g.C)(),_=(0,o.A)(),{ref:w,inView:k}=(0,a.Wx)({triggerOnce:!0}),A=async()=>{try{(0,f.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,n.jsx)(h.y,{messageId:"share_link_copied_to_clipboard"})))}catch(e){b((0,n.jsx)(h.y,{messageId:"error.generic2"}))}};return((0,i.useEffect)(()=>{k&&(0,f.ke)({action:"impression",location:"profile",type:"referral"})},[k]),s)?(0,n.jsxs)(l.so,{bg:"primary.default",align:"center",p:"lg",br:"xl",minH:"[124px]",gap:"sm",position:"relative",ref:w,children:[(0,n.jsx)(l.az,{overflow:"hidden",children:(0,n.jsx)(j,{})}),(0,n.jsxs)(l.so,{direction:"column",justify:"space-between",minH:"[92px]",gap:"sm",grow:1,shrink:1,children:[(0,n.jsx)(r.EY,{textStyle:"display.medium",color:"surface.s1",children:(0,n.jsx)(d.A,{id:"profile_referral_banner_header"})}),(0,n.jsx)(r.EY,{textStyle:"assistive.default",color:"surface.s1",children:(0,n.jsx)(d.A,{id:"profile_referral_banner_description"})}),(0,n.jsx)(l.so,{justify:"flex-start",w:"100%",children:(0,n.jsxs)(r.$n,{size:"tertiary",variant:"filled",bg:"surface.s1",onClick:A,children:[(0,n.jsx)(r.EY,{display:"block",lineHeight:1,textStyle:"assistive.default",color:"neutrals.nLv1",children:(0,n.jsx)(d.A,{id:"profile_button_share_link"})}),(0,n.jsx)(l.az,{h:"lg",w:"lg",children:(0,n.jsx)(u.VJ,{h:16,w:16,fill:"onSurface.nLv1"})})]})})]}),(0,n.jsx)(l.az,{w:"[68px]",h:"[68px]",children:(0,n.jsx)(x.A,{graphic:"twitter-feed"})})]}):null}},58918:(e,t,s)=>{s.d(t,{K:()=>o});var n=s(6029),r=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:h}=e;return(0,n.jsxs)(l.so,{children:[(0,n.jsx)(i.gT,{sport:o,team:d[0],ignoreLink:h,children:(0,n.jsx)(r.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,n.jsx)(i.gT,{sport:o,team:d[1],ignoreLink:h,children:(0,n.jsx)(r.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,n.jsx)(a.J,{seed:c,styles:{transform:"translateX(100%)"}})]})}},59721:(e,t,s)=>{s.d(t,{e:()=>n.e});var n=s(33480)},62121:(e,t,s)=>{s.d(t,{_7:()=>n._7,mt:()=>n.mt,Q3:()=>n.Q3,bZ:()=>n.bZ,wH:()=>n.wH}),s(97319),s(89042);var n=s(70448)},65078:(e,t,s)=>{s.d(t,{gm:()=>n.A,g3:()=>r.A,mJ:()=>l.A,jr:()=>i.A,AR:()=>o,h2:()=>h});var n=s(70215),r=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,n]=(0,i.A)(e,"homeTeam","awayTeam",e),[r,l]=(0,i.A)(e,"homeScore","awayScore",e);return{event:t||e,leftTeam:s,rightTeam:n,leftScore:r,rightScore:l}}var d=s(21377),c=s(55729),u=s(62859);let x=e=>t=>e===t;function h(e,t){var s,r;let{event:l,leftTeam:i,rightTeam:a}=(0,c.useContext)(u.y$),o=(0,n.A)(l,"winnerCode"),h=(l.status.code===d.sum.AET||l.status.code===d.sum.AP)&&l.tournament.category.sport.slug===d.QCR.IceHockey,p=e?x(e):t||(()=>!1),m=p(i.id,l.id)||(null==(s=i.subTeams)?void 0:s.some(e=>p(e.id,l.id))),f=p(a.id,l.id)||(null==(r=a.subTeams)?void 0:r.some(e=>p(e.id,l.id)));switch(o){case d.Jfo.Left:if(m)return d.h18.Win;if(f)return h?d.h18.OvertimeLoss:d.h18.Lose;break;case d.Jfo.Right:if(m)return h?d.h18.OvertimeLoss:d.h18.Lose;if(f)return d.h18.Win;break;case d.Jfo.Draw:if(m||f)return d.h18.Draw}}},67333:(e,t,s)=>{s.d(t,{A:()=>x});var n=s(6029),r=s(21377),l=s(95083),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=[r.rKn,...[...t].sort((e,t)=>e.localeCompare(t))].map(e=>({label:e}));return(0,n.jsx)(d.Zp,{children:(0,n.jsx)(i.az,{p:"md",children:(0,n.jsx)(l.jT,{label:"Branches:",options:s,value:{label:(0,r.Srs)()||r.rKn},onChange:e=>{(null==e?void 0:e.label)&&(e.label===r.rKn?(0,r.Sdf)(void 0):(0,r.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,r.B2D)(t,{},{headers:(0,r.MXE)(s)})},{data:h}=(0,o.Ay)(i&&l?[r.GJU.branches(),l]:null,{fetcher:x});return i&&d?(0,n.jsx)(u,{branches:null==h?void 0:h.branches}):null}},68379:(e,t,s)=>{s.d(t,{J:()=>i});var n=s(6029),r=s(41249),l=s(55365);let i=e=>{let{seed:t,position:s="absolute",left:i,right:a,bottom:o=0,h:d=16,minW:c=24,styles:u,font:x="assistive.default",colorless:h}=e;return t?(0,n.jsx)(r.so,{display:"inline-flex",align:"center",justify:"center",position:s,bottom:o,left:i,right:a,br:"sm",bg:h?void 0:(0,l.mq)(t),h:d,minW:c,zIndex:r.Py.Button,style:u,children:(0,n.jsx)(r.EY,{font:x,color:h?"onSurface.nLv1":"surface.s1",lineHeight:1,children:t})}):null}},69385:(e,t,s)=>{s.d(t,{A:()=>a});var n=s(55729),r=s(494),l=s(62859),i=s(57126);function a(e){var t;let s=(0,n.useContext)(l.y$),a=e||s.event,o=(0,r.d4)(i.xl);return(null==a||null==(t=a.tournament.uniqueTournament)?void 0:t.displayInverseHomeAwayTeams)&&o}},70215:(e,t,s)=>{s.d(t,{A:()=>r});var n=s(69385);function r(e,t,s){let r=(0,n.A)(s);if(!(e&&t))return;let l=e[t];if("number"==typeof l)return r&&[1,2].includes(l)?1===l?2:1:l}},70355:(e,t,s)=>{s.d(t,{GH:()=>r,UE:()=>i,v9:()=>l});var n=s(19451);let r=[1,0,2],l={1:160,2:130,3:120},i={[n.xW.TopPredictors]:"user.topPredictors",[n.xW.TopContributors]:"user.topContributors",[n.xW.TopEditors]:"user.topEditors"}},72110:(e,t,s)=>{s.d(t,{I:()=>d,p:()=>c});var n=s(6029),r=s(95083),l=s(76356),i=s(90248),a=s(65789),o=s(54409);function d(e){let{onClick:t,children:s}=e;return(0,n.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,r.$c)();return(0,n.jsxs)(a.HH,{isCard:u,children:[t&&(0,n.jsxs)(l.so,{align:"center",justify:"center",gap:"xs",px:"sm",pb:"sm",pt:"lg",children:[(0,n.jsx)(r.EY,{display:"block",textStyle:"display.small",textAlign:"center",color:"neutrals.nLv1",children:(0,n.jsx)(i.A,{id:t})}),s&&(0,n.jsx)(r.K0,{onClick:()=>null==d?void 0:d(),variant:"clear",children:(0,n.jsx)(o.G_L,{fill:"primary.default",width:16,height:16})})]}),(0,n.jsx)(l.so,{justify:"space-between",gap:"sm",p:{mdDown:"sm"},children:c})]})}},72629:(e,t,s)=>{s.d(t,{A:()=>h});var n=s(6029),r=s(95083),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,n.jsxs)(l.so,{align:"center",gap:"xs",children:[(0,n.jsx)(d.A,{h:20}),(0,n.jsx)(r.EY,{textStyle:"display.medium",children:void 0===t?"-":(0,n.jsx)(a.A,{id:"weekly_streak_counter",values:{n:t}})})]})};function h(e){let{maxWeeklyStreak:t,currentWeeklyStreak:s,hasCurrentStreakInfo:d,showTitle:h,onCurrentStreakClick:p}=e,[m,f]=(0,i.useState)(!1);return(0,n.jsxs)(u.p,{titleId:h?"weekly_streak_title":void 0,onInfoClick:()=>f(!0),hasInfo:!0,children:[(0,n.jsxs)(u.I,{onClick:d?()=>{d&&(f(!0),null==p||p())}:void 0,children:[(0,n.jsx)(x,{length:s,messageId:"weekly_streak_counter"}),(0,n.jsxs)(l.so,{justify:"center",px:"sm",gap:"xs",w:"100%",overflow:"hidden",children:[(0,n.jsx)(r.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",truncate:!0,children:(0,n.jsx)(a.A,{id:"weekly_current_streak"})}),d&&(0,n.jsx)(l.az,{h:"lg",w:"lg",children:(0,n.jsx)(o.FFV,{fill:"primary.default"})})]})]}),(0,n.jsxs)(u.I,{children:[(0,n.jsx)(x,{length:t,messageId:"weekly_streak_counter"}),(0,n.jsx)(r.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,n.jsx)(a.A,{id:"weekly_longest_streak"})})]}),(0,n.jsx)(c.A,{isOpen:m,setIsOpen:f})]})}},75414:(e,t,s)=>{s.d(t,{A:()=>n});let n=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 n=(e/1e5).toFixed();return n=n.endsWith("0")?n.substring(0,n.length-1):"".concat(n[0],".").concat(n[1]),"".concat(n,"M");case e<1e8:return"".concat(Math.round(e/1e6),"M");case e<1e9:let r=Math.round(e/1e6);if(1e3===r)return"1B";return"".concat(r,"M");default:return"".concat(e)}}},86501:(e,t,s)=>{s.d(t,{_:()=>I,g:()=>F});var n=s(6029),r=s(32523),l=s(41249),i=s(55729),a=s(90248),o=s(89642),d=s(494),c=s(75791),u=s(2294),x=s(95083),h=s(54409);let p=e=>{let{messageId:t,value:s,isButton:r,onClick:i}=e;return(0,n.jsxs)(l.so,{justify:"space-between",align:"center",py:"sm",children:[(0,n.jsxs)(l.so,{align:"center",gap:"xs",onClick:i,children:[(0,n.jsx)(l.EY,{color:r?"primary.default":"onSurface.nLv1",font:"body.medium",children:(0,n.jsx)(a.A,{id:t})}),r&&(0,n.jsx)(h.G_L,{fill:"primary.default",h:16,w:16})]}),(0,n.jsx)(l.EY,{color:"onSurface.nLv1",font:"body.medium",children:s})]})},m=e=>{let{messageId:t,value:s,isButton:r,onClick:i}=e;return(0,n.jsxs)(l.so,{direction:"column",justify:"center",align:"center",gap:"xs",p:"sm",br:"lg",bg:"surface.s2",onClick:i,cursor:r?"pointer":"default",hoverBg:r?"onSurface.nLv4":void 0,children:[(0,n.jsx)(l.EY,{font:"display.medium",children:s}),(0,n.jsxs)(l.EY,{align:"center",font:"assistive.default",c:r?"primary.default":"onSurface.nLv3",children:[(0,n.jsx)(a.A,{id:t}),r&&(0,n.jsx)(h.G_L,{fill:"primary.default",h:16,w:16,ml:"xs"})]})]})};function f(e){let{isMobile:t}=(0,x.$c)();return t?(0,n.jsx)(p,{...e}):(0,n.jsx)(m,{...e})}var g=s(54053);function j(e){let{isOpen:t,setIsOpen:s}=e,r=(0,d.d4)(u.BF);return(0,n.jsx)(g.A,{setIsOpen:s,isOpen:t,footer:(0,n.jsx)(l.so,{display:["none","flex"],justify:"flex-end",m:"lg",children:(0,n.jsx)(l.$n,{onClick:()=>s(!1),ml:"lg",variant:"unshielded",children:(0,n.jsx)(a.A,{id:"ok_got_it_button"})})}),renderAdPlaceholder:!1,children:(0,n.jsxs)(l.az,{maxW:[void 0,312],p:"lg",mx:"auto",children:[(0,n.jsx)(l.EY,{as:"div",c:"onSurface.nLv1",font:"display.large",mb:"sm",children:(0,n.jsx)(a.A,{id:r?"points":"profile.roi"})}),(0,n.jsx)(l.EY,{as:"div",c:"onSurface.nLv1",font:"body.mediumParagraph",children:(0,n.jsx)(a.A,{id:r?"points_VROI_info_bubble":"virtual_return_on_investment_info"})})]})})}function v(e){let{stat:t}=e,s=(0,d.d4)(u.BF),[r,l]=(0,i.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(f,{onClick:()=>l(!0),messageId:s?"points":"profile.roi",value:t,isButton:!0}),(0,n.jsx)(j,{isOpen:r,setIsOpen:l})]})}let y=(0,s(41735).default)(l.az).withConfig({componentId:"sc-7c2f9e08-0"})(["display:grid;gap:",";grid-template-columns:repeat(2,1fr);"],e=>e.theme.spacing.sm);function b(e){let{children:t}=e,{isMobile:s}=(0,x.$c)();return s?(0,n.jsx)(n.Fragment,{children:t}):(0,n.jsx)(y,{children:t})}let _=e=>{let{stats:t}=e,s=(0,d.d4)(u.BF),{correct:r,total:l,percentage:i,avgCorrectOdds:a,roi:o,ranking:x}=t;return(0,n.jsxs)(b,{children:[(0,n.jsx)(f,{messageId:"profile.correctPredictions",value:"".concat(r,"/").concat(l," (").concat(i,")")}),!s&&(0,n.jsx)(c.c,{fractionalValue:a.fractionalValue,children:e=>(0,n.jsx)(f,{messageId:"profile.correctOdds",value:e})}),(0,n.jsx)(v,{stat:o}),(0,n.jsx)(f,{messageId:"best_predictors_rank",value:x})]})};var w=s(98914),k=s(76410);let A=(e,t,s)=>"".concat(e,"/").concat(t," (").concat(s,")"),S=e=>{let{correct:t,total:s,messageId:r}=e;return(0,n.jsxs)(l.so,{justify:"space-between",gap:"lg",children:[(0,n.jsx)(l.EY,{block:!0,font:"body.mediumParagraph",c:"onSurface.nLv1",children:(0,n.jsx)(a.A,{id:r})}),(0,n.jsx)(l.EY,{block:!0,font:"body.mediumParagraph",c:"onSurface.nLv1",children:0===s?"0":A(t,s,"".concat((0,w.M)(t/s,2),"%"))})]})},C=e=>{let{isOpen:t,setIsOpen:s,stats:r}=e;return(0,n.jsx)(g.A,{setIsOpen:s,isOpen:t,header:"profile.correctPredictions",renderAdPlaceholder:!1,children:(0,n.jsx)(l.az,{minW:312,p:"lg",pt:"0",pb:["xxl","lg"],mx:"auto",children:(0,n.jsxs)(l.so,{direction:"column",gap:"xl",children:[(0,n.jsx)(S,{messageId:"profile_predictions_with_odds",correct:r.correctVotesWithOdds,total:r.totalVotesWithOdds}),(0,n.jsx)(S,{messageId:"profile_predictions_without_odds",correct:r.correctVotesWithoutOdds,total:r.totalVotesWithoutOdds})]})})})},E=e=>{let{stats:t}=e,s=(0,d.d4)(u.BF),[r,l]=(0,i.useState)(!1),a=A(t.correct,t.total,t.percentage);return s||0===Number(t.total)?(0,n.jsx)(f,{messageId:"profile.correctPredictions",value:a}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(f,{onClick:()=>{l(!0),(0,k.ke)({action:"click",location:"user_profile",type:"correct_predictions_info_button"})},messageId:"profile.correctPredictions",value:a,isButton:!0}),(0,n.jsx)(C,{isOpen:r,setIsOpen:l,stats:t})]})},T=e=>{let{stats:t}=e,s=(0,d.d4)(u.BF),{avgCorrectOdds:r,roi:l,ranking:i}=t;return(0,n.jsxs)(b,{children:[(0,n.jsx)(E,{stats:t}),!s&&(0,n.jsx)(c.c,{fractionalValue:r.fractionalValue,children:e=>(0,n.jsx)(f,{messageId:"profile.correctOdds",value:e})}),(0,n.jsx)(v,{stat:l}),(0,n.jsx)(f,{messageId:"profile_predictor_rank",value:i})]})};function F(){let{userAccount:e,isUserLoading:t}=(0,i.useContext)(o.t);return t?(0,n.jsx)(r.E,{uniqueKey:"predictions-overview-cl",h:[228,237],br:[void 0,"lg"]}):e?(0,n.jsxs)(l.so,{direction:"column",p:"sm",m:["sm",0],br:["lg",void 0],bg:["surface.s1",void 0],elevation:[2,void 0],gap:[0,"md"],children:[(0,n.jsx)(l.EY,{align:"center",pt:"md",pb:"sm",color:"onSurface.nLv1",font:"display.medium",textTransform:"capitalize",children:(0,n.jsx)(a.A,{id:"overview"})}),(0,n.jsxs)(l.tU,{variant:"tertiary",children:[(0,n.jsxs)(l.az,{py:"sm",children:[(0,n.jsx)(l.tU.Tab,{tabKey:1,children:(0,n.jsx)(a.A,{id:"profile.last30Days"})}),(0,n.jsx)(l.tU.Tab,{tabKey:2,children:(0,n.jsx)(a.A,{id:"profile.predictions.allTime"})})]}),(0,n.jsx)(l.tU.Panel,{tabKey:1,children:(0,n.jsx)(T,{stats:e.voteStatistics.current})}),(0,n.jsx)(l.tU.Panel,{tabKey:2,children:(0,n.jsx)(_,{stats:e.voteStatistics.allTime})})]})]}):null}var L=s(65789);let H=e=>{let{titleId:t,children:s}=e;return(0,n.jsxs)(L.Zp,{children:[(0,n.jsx)(L.Zp.Header,{titleId:t}),(0,n.jsx)(l.az,{px:"lg",children:s}),(0,n.jsx)(L.Zp.Footer,{defaultHeight:"sm"})]})};function I(){var e;let{userAccount:t}=(0,i.useContext)(o.t);if(!t)return null;let s=Number(null==(e=t.voteStatistics.current)?void 0:e.total)>0;return(0,n.jsxs)(L.BU,{children:[s&&(0,n.jsx)(H,{titleId:"profile.last30Days",children:(0,n.jsx)(T,{stats:t.voteStatistics.current})}),(0,n.jsx)(H,{titleId:"profile.predictions.allTime",children:(0,n.jsx)(_,{stats:t.voteStatistics.allTime})})]})}},89642:(e,t,s)=>{s.d(t,{t:()=>n});let n=(0,s(55729).createContext)({userId:"",userAccount:void 0,isUserLoading:!0})},96470:(e,t,s)=>{s.d(t,{Y:()=>r,j:()=>l});var n=s(4967);function r(e,t,s,n){let r=e>0?n.slice(0,e).map(e=>e.id):[],l=t>0?n.slice(e,e+t).map(e=>e.id):[];return{userIds:{promoted:r,demoted:n.length>e+t&&s>0?n.slice(-n.length+e+t).map(e=>e.id):[],neutral:l}}}function l(e,t,s){let{days:r,hours:l,minutes:i,seconds:a}=(0,n.DU)(e,t),o=r>0?r+s.formatMessage({id:"days_short"}):"",d=l>0?l+s.formatMessage({id:"hours_short"}):"";return[o,d,(l>0||i>0)&&!r?i+s.formatMessage({id:"minutes_short"}):"",(i>0||a>0)&&!r&&!l?a+s.formatMessage({id:"seconds_short"}):""].filter(Boolean).join(" ")}},96913:(e,t,s)=>{s.d(t,{m:()=>p.m,A:()=>h});var n=s(6029),r=s(95083),l=s(41249),i=s(78383),a=s.n(i),o=s(55729),d=s(90248),c=s(12047),u=s(28171);let x=(e,t)=>{let s=(0,o.useState)(e);return t||s};function h(e){let{id:t,location:s,initialTabKey:i,onChange:h=a(),tabs:p,children:m,customControls:f,noSportMenu:g,eventStatusType:j,seasonId:v,isInWidget:y}=e,b=(0,o.useRef)(null),{isMobile:_}=(0,r.$c)(),[w,k]=x(i,f),{logTabChange:A}=(0,u.A)(),S=(0,c.Ay)({isSportMenuVisible:!g,isInMobileTabs:!1});return(0,o.useEffect)(()=>{w!==i&&k(i)},[t,s,v]),(0,n.jsx)(l.tU,{onChange:e=>{w!==e&&(k(e),h(e),y||window.scrollTo({left:0,top:0}))},initialValue:i||w,value:w,variant:"primary",fullWidthTabs:_||y,children:(0,n.jsxs)(l.az,{d:"inline",style:{verticalAlign:"top"},ref:b,children:[(0,n.jsx)(l.PI,{isStickingDisabled:y||!_,bg:["surface.s1","transparent"],borderBottom:["effect.elevation1",void 0],top:S,children:(0,n.jsx)(l.tU.List,{underline:!0,scroll:!0,children:p.filter(e=>!e.isHidden).map(e=>(0,n.jsx)(l.tU.Tab,{tabKey:e.tabKey,style:{marginLeft:0},as:"h2",onClick:n=>n.nativeEvent.isTrusted&&e.tabKey!==w?A({type:e.tabKey,id:t,location:s,status:j}):void 0,children:(0,n.jsx)("a",{href:"#tab:".concat(e.tabKey),onClick:e=>e.preventDefault(),style:{color:"inherit"},children:"string"==typeof e.item?(0,n.jsx)(d.A,{id:e.item,values:e.values}):e.item})},"".concat(t,"-").concat(e.tabKey)))})}),(0,n.jsx)(l.az,{children:m})]})},t)}var p=s(28132)},98095:(e,t,s)=>{s.d(t,{j:()=>i});var n=s(4967),r=s(45860);let l=e=>fetch(e,{method:"HEAD",cache:"no-store"});function i(){let{data:e,error:t,isLoading:s}=(0,r.Ay)("https://cdn.adapex.io/hb/aaw.sofascore.js",{fetcher:l,dedupingInterval:n.d_});return{isLoading:s,hasAdBlock:!!(null==e?void 0:e.redirected)||void 0!==t}}},98914:(e,t,s)=>{s.d(t,{M:()=>n});let n=function(e,t=0){var s,n,r;return(s="round",n=e,0==+(r=-t)?Math[s](+n):(r*=1,isNaN(n*=1)||"number"!=typeof r||r%1!=0)?NaN:+((n=(n=Math[s](+((n=n.toString().split("e"))[0]+"e"+(n[1]?n[1]-r:-r)))).toString().split("e"))[0]+"e"+(n[1]?+n[1]+r:r))).toFixed(t)}}}]);