!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},l=(new e.Error).stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="2859547f-95b5-425e-b7a0-50191c3a49fa",e._sentryDebugIdIdentifier="sentry-dbid-2859547f-95b5-425e-b7a0-50191c3a49fa")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[17088],{4790:(e,l,t)=>{"use strict";async function n(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Sofa365!Sofa365!",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"qC9sJnXgvT3C";if(!e)return;let n=new TextEncoder,i=n.encode(l),s={name:"AES-GCM",iv:n.encode(t)},r=await crypto.subtle.importKey("raw",i,s,!1,["decrypt"]),a=new Uint8Array(Array.from(window.atob(e)).map(e=>e.charCodeAt(0)));try{let e=await crypto.subtle.decrypt(s,r,a);return new TextDecoder().decode(e)}catch(e){throw Error("Decrypt failed")}}t.d(l,{s:()=>n})},18862:(e,l,t)=>{"use strict";t.d(l,{Y:()=>d,c:()=>a});var n=t(6029),i=t(494),s=t(33775),r=t(37455);let a=e=>{let{fractionalValue:l,children:t}=e,a=(0,i.d4)(r.$4),d=(0,s.YB)(l,a);return(0,n.jsx)(n.Fragment,{children:t?t(d):d})},d=e=>{let[l,t]=e.split("/");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("sup",{children:l}),"/",(0,n.jsx)("sub",{children:t})]})}},27197:(e,l,t)=>{"use strict";t.d(l,{s3:()=>d,Z8:()=>x});var n=t(46787),i=t(19621),s=t(494),r=t(45860),a=t(22116);function d(){var e;let l=(0,i.hX)(),t=(0,s.d4)(a.$F),d=!l&&!!(null==t?void 0:t.id),o=null!=(e=null==t?void 0:t.leaderboardId)?e:null;return(0,r.Ay)(d&&o?[o,"LEADERBOARD_RANKINGS"]:null,{fetcher:e=>{let[l]=e;return(0,n.TtD)(n.rGM.leaderboardRankings(l))}})}var o=t(55729),c=t(82612),u=t(60454);function x(e){let{eventIds:l,isLoading:t}=(0,c.A)(),i=(0,o.useContext)(u.k),s=!!i&&i.isDaily10xLoading,a=null==l?void 0:l.filter(e=>{var l;return!i||e!==(null==(l=i.daily10xEvent)?void 0:l.id)}),d=a?"number"==typeof e?a.slice(0,e):a:null,{data:x,error:h,isLoading:g}=(0,r.Ay)(d&&!s?[d,"NOT_VOTED_POPULAR_EVENTS"]:null,{fetcher:async e=>{let[l]=e;return await Promise.all(l.map(e=>n.nk6.fetchEvent(e))).then(e=>e.map(e=>e.event))}});return{eventList:x,eventListError:h,isLoading:g||t||s}}},43451:(e,l,t)=>{"use strict";t.d(l,{D:()=>r});var n=t(6029),i=t(36145),s=t(41735);let r=({width:e="100%",height:l,animate:t=!1,viewBox:r,style:a,children:d,uniqueKey:o})=>{let c=(0,s.useTheme)();return(0,n.jsx)(i.Ay,{speed:2,animate:t,width:e,height:l,backgroundColor:t?c.colors.surface.s0:c.colors.surface.s2,foregroundColor:c.colors.surface.s2,viewBox:r,style:a,uniqueKey:o,children:d})}},50526:(e,l,t)=>{"use strict";t.d(l,{A:()=>c});var n=t(6029),i=t(494),s=t(72753),r=t(10174),a=t(76356),d=t(52466);function o(){return(0,n.jsx)("a",{href:"https://certifications.gamingcommission.gov.gr/publicRecordsOnline/SitePages/KatoxoiAdeiasOnline.aspx",target:"_blank",rel:"nofollow noopener noreferrer",children:(0,n.jsxs)(a.so,{minH:"4xl",align:"center",gap:"md",px:"lg",children:[(0,n.jsx)(a.az,{h:"xl",w:"xl",children:(0,n.jsx)(d.OE_,{w:"24px",h:"24px",fill:"onSurface.nLv3",fillOpacity:1})}),(0,n.jsx)(r.EY,{textStyle:"assistive.micro",color:"neutrals.nLv3",children:"21+ | ΚΙΝΔΥΝΟΣ ΕΘΙΣΜΟΥ & ΑΠΩΛΕΙΑΣ ΠΕΡΙΟΥΣΙΑΣ | ΠΑΙΞΕ ΥΠΕΥΘΥΝΑ & ΜΕ ΑΣΦΑΛΕΙΑ |"})]})})}function c(){return"GR"===(0,i.d4)(s.LQ)?(0,n.jsx)(o,{}):null}},51057:(e,l,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/user/weeklyChallenge",function(){return t(81474)}])},60454:(e,l,t)=>{"use strict";t.d(l,{A:()=>s,k:()=>i});var n=t(55729);let i=(0,n.createContext)(null);function s(){let e=(0,n.useContext)(i);if(!e)throw Error("useWeeklyChallengeContext must be used within an WeeklyChallengeContextProvider");return e}},60682:(e,l,t)=>{"use strict";t.d(l,{Z:()=>n});let n=(e,l)=>{let t=null==e?void 0:e.provider,n=null==e?void 0:e.fallbackProvider;return l&&(null==t?void 0:t.liveOddsFrom)?[null==t?void 0:t.liveOddsFrom.id,null==n?void 0:n.id]:(null==t?void 0:t.oddsFrom)?[null==t?void 0:t.oddsFrom.id,null==n?void 0:n.id]:[null==t?void 0:t.id,null==n?void 0:n.id]}},64046:(e,l,t)=>{"use strict";t.d(l,{fl:()=>o,jF:()=>d,kW:()=>u,ki:()=>c});var n=t(55729),i=t(18970),s=t(16503),r=t(95084),a=t(4790),d=function(e){return e.Featured="featured",e.Additional="additional",e.Streaks="streaks",e.Compliance="compliance",e}({}),o=function(e){return e.BetBoostButton="bet_boost_button",e.AffiliateButton="affiliate_button",e}({}),c=function(e){return e.ProviderLogo="provider_logo",e.OddsValue="odds_value",e.BookmakerButton="bookmaker_button",e.AffiliateButton="affiliate_button",e}({});function u(e){let{event:l,location:t}=(0,n.useContext)(i.y$),d=e.location||t,c=e.countryOddsProvider,u=(0,a.s)(null==c?void 0:c.impressionCostEncrypted),x="compliance"===e.type||c&&l.status.type&&(e.marketName||e.isComparison),h=Object.values(o).find(l=>{var t,n;return!!(null==(n=e.activeCTA)||null==(t=n[l])?void 0:t.isActive)}),g=async()=>{"compliance"===e.type?(0,r.D5)({id:l.id,provider:null==c?void 0:c.provider.slug,status:l.status.type,location:d===i.cb.Widget?i.cb.EventPage:d,value:await u}):c&&l.status.type&&(e.marketName||e.isComparison)&&(0,r.CH)({id:l.id,provider:null==c?void 0:c.provider.slug,category:e.marketName,status:l.status.type,location:d,value:await u,is_active:!!h,type:h})},m=e.deps||[],p=(0,s.e)(g,{deps:[l.id,h,...m]});return{ref:x?p:void 0,makeOnClick:(0,n.useCallback)((t,n,i)=>{if(c&&t)return()=>{(0,r.Fe)({id:l.id,provider:i?i.provider.slug:c.provider.slug,category:t,type:e.type,location:d,position:n})}},[l.id,c,t])}}},64994:(e,l,t)=>{"use strict";t.d(l,{A:()=>v});var n=t(6029),i=t(53192),s=t(3881),r=t(91603),a=t(46787),d=t(22375),o=t(10174),c=t(76356),u=t(90510),x=t(90248),h=t(46222),g=t(52466),m=t(67087),p=t(64006),j=t(88505),y=t(27197);let _=e=>{var l,t,s,x;let{event:h}=e,[y,_]=(0,m.jr)(h,"homeTeam","awayTeam"),v=(0,d.pp)(h.startTimestamp),b=(0,d.cK)(v);return(0,n.jsx)(c.az,{cursor:"pointer",bg:{_hover:"surface.s2"},children:(0,n.jsx)(p.tj,{event:h,children:(0,n.jsxs)(c.so,{minH:"5xl",align:"center",py:"sm",px:"sm",children:[(0,n.jsxs)(c.so,{direction:b?"column-reverse":"column",minW:"5xl",me:"xs",children:[(0,n.jsx)(o.EY,{display:"block",color:"neutrals.nLv3",textStyle:"body.small",textAlign:"center",children:b?"-":(0,n.jsx)(u.XU,{value:v,...d.or.fullDate})}),(0,n.jsx)(o.EY,{display:"block",color:"neutrals.nLv3",textStyle:"body.small",textAlign:"center",mt:"xs",children:(0,n.jsx)(u.ib,{value:v})})]}),(0,n.jsx)(c.cG,{orientation:"vertical"}),(0,n.jsxs)(c.so,{align:"center",justify:"space-between",ms:"sm",me:"md",gap:"sm",w:"100%",overflowX:"hidden",children:[(0,n.jsxs)(c.so,{direction:"column",gap:"xs",overflow:"hidden",children:[(0,n.jsxs)(c.so,{align:"center",gap:"sm",children:[(0,n.jsx)(c.az,{w:"lg",h:"lg",children:y.type===a.YVh.Person?(0,n.jsx)(i.w,{size:16,alpha2:null==(l=y.country)?void 0:l.alpha2,fallback:(0,n.jsx)(o._V,{src:"/static/images/placeholders/team.svg",width:"lg",height:"lg",alt:"Team placeholder"}),name:null==(t=y.country)?void 0:t.name}):(0,n.jsx)(r.p,{size:16,id:y.id})}),(0,n.jsx)(o.Ym,{truncate:!0,children:(0,n.jsx)(j.Rm,{team:y})})]}),(0,n.jsxs)(c.so,{align:"center",gap:"sm",children:[(0,n.jsx)(c.az,{w:"lg",h:"lg",children:_.type===a.YVh.Person?(0,n.jsx)(i.w,{size:16,alpha2:null==(s=_.country)?void 0:s.alpha2,fallback:(0,n.jsx)(o._V,{src:"/static/images/placeholders/team.svg",width:"lg",height:"lg",alt:"Team placeholder"}),name:null==(x=_.country)?void 0:x.name}):(0,n.jsx)(r.p,{size:16,id:_.id})}),(0,n.jsx)(o.Ym,{truncate:!0,children:(0,n.jsx)(j.Rm,{team:_})})]})]}),(0,n.jsx)(c.az,{children:(0,n.jsx)(g.CCT,{fill:"primary.default"})})]})]})})})};function v(e){let{listLength:l=3}=e,{eventList:t,eventListError:i,isLoading:r}=(0,y.Z8)(l);return(0,n.jsxs)(h.Zp,{variant:"desktop-only",children:[(0,n.jsxs)(c.az,{py:"md",px:"lg",children:[(0,n.jsx)(o.EY,{display:"block",textStyle:"display.medium",textAlign:{base:"start",md:"center"},pb:"xs",children:(0,n.jsx)(x.A,{id:"weekly_challenge_every_vote_counts"})}),(0,n.jsx)(o.EY,{display:"block",textStyle:"assistive.default",color:"neutrals.nLv2",textAlign:{base:"start",md:"center"},children:(0,n.jsx)(x.A,{id:"weekly_challenge_every_vote_counts_description"})})]}),(0,n.jsx)(c.az,{pb:"sm",children:r?(0,n.jsx)(n.Fragment,{children:Array.from({length:l},(e,l)=>l).map(e=>(0,n.jsx)(s.E,{uniqueKey:"upcoming-events-cl",h:52,mb:"xs",br:"sm",mx:"sm"},e))}):(null==t?void 0:t.length)&&!i?t.map(e=>(0,n.jsx)(_,{event:e},e.id)):(0,n.jsx)(c.so,{align:"center",minH:"[168px]",px:"2xl",children:(0,n.jsx)(o.EY,{display:"block",textAlign:"center",textStyle:"body.medium",color:"neutrals.nLv3",children:(0,n.jsx)(x.A,{id:"weekly_challenge_upcoming_empty"})})})})]})}},68789:(e,l,t)=>{"use strict";t.d(l,{Ae:()=>c,F0:()=>d,ks:()=>o,uZ:()=>u});var n=t(22375),i=t(494),s=t(71587),r=t(37455);let a=(e,l)=>{var t;return((e,l,t)=>{let a=(0,i.d4)(r.Bu),d=(0,s.SR)(e,(0,n.UG)(new Date));return a&&l&&d.find(e=>e.id===l)?a:t})(e.tournament.category.sport.slug,null==(t=e.tournament.uniqueTournament)?void 0:t.id,l)},d=e=>a(e,(0,i.d4)(r.a5)),o=e=>a(e,(0,i.d4)(r.Zj)),c=()=>(0,i.d4)(r.a5),u=()=>(0,i.d4)(r.Bu)},71587:(e,l,t)=>{"use strict";t.d(l,{LS:()=>h,SR:()=>x,zK:()=>o});var n=t(46787),i=t(22375),s=t(19621),r=t(494),a=t(72753),d=t(98133);let o={1:{id:1,slug:"euro-2024",bgImage:"euro-2024.webp",seasonId:56953,msgKey:"football_euro_2024_tournament",showCupTreeFrom:"2024-06-29",analyticsName:"euro",historyHighlightsEndYear:"1980",defaultHistoryHighlightsYearPerCountry:{BE:"1980",DE:"1996",IT:"2000",CZ:"1996",FR:"1984",PT:"2004",DK:"1992",ES:"2008",NL:"1988",IE:"1988",UK:"1996",RO:"2000",GR:"2004",SE:"1992",CH:"1996",BG:"1996",RU:"2008",HR:"1996",TR:"2008",NO:"2000",SI:"2000",LV:"2004",AT:"2008",PL:"2012",UA:"2012",SK:"2016",RS:"2000",HU:"2016",IS:"2016",AL:"2016",FI:"2020",MK:"2020",GB:"1996"},visibleFrom:"2024-06-03",visibleTo:"2024-07-21",defaultFrom:"2024-06-14"},133:{id:133,slug:"copa-2024",bgImage:"euro-2024.webp",seasonId:57114,msgKey:"football_copa_2024_tournament",analyticsName:"copa",showCupTreeFrom:"2024-07-04",visibleFrom:"2024-06-03",visibleTo:"2024-07-21",defaultFrom:"2024-06-14"},357:{id:357,slug:"club-world-cup",logo:"cwc-2025-logo.svg",bgImage:"cwc-2025.png",seasonId:69619,msgKey:"bottom_navigation_tab_club_world_cup_short",analyticsName:"fifa_club_world_cup",showCupTreeFrom:"2025-06-28",visibleFrom:"2025-05-30",visibleTo:"2025-07-16",defaultFrom:"2025-06-15"}},c=(e,l)=>(!l.visibleTo||!(e>=l.visibleTo))&&(!l.visibleFrom||!(e(()=>{try{let l=e?(0,d.BJ)(e):void 0;if((null==l?void 0:l.continent)==="South America"||(null==l?void 0:l.continent)==="North America")return[357,133,1]}catch(e){}return[357,1,133]})().map(e=>o[e]).filter(e=>void 0!==e&&c((0,i.UG)(new Date),e)),x=(e,l)=>{let t=(0,r.d4)(a.LQ);return e!==n.QCR.Football?[]:u(t).filter(e=>c(l,e))},h=()=>{let e=(0,s.hX)(),l=(0,r.d4)(a.LQ);return e?{tournament:void 0}:{tournament:u(l).find(e=>c((0,i.UG)(new Date),e))}}},74207:(e,l,t)=>{"use strict";t.d(l,{r:()=>u,$:()=>h});var n=t(6029),i=t(46787),s=t(10174),r=t(76356),a=t(55729),d=t(18970),o=t(95084),c=t(64046);function u(e){let{selectedProvider:l,location:t,onClick:u,logClick:x=!0,size:h="56x28"}=e,g=null==l?void 0:l.provider,m=null==l?void 0:l.branded,p=null==l?void 0:l.provider.slug,{location:j}=(0,a.useContext)(d.y$),[y,_]=h.split("x"),v=t||j;return g&&m?(0,n.jsx)(r.I4.a,{display:"flex",justifyContent:"center",alignItems:"center",br:"xs",rel:"noopener noreferrer",target:"_blank",href:l.defaultBetSlipLink||g.defaultBetSlipLink,onClick:e=>{e.stopPropagation(),null==u||u(),x&&(0,o.Fe)({location:v,provider:p,position:c.ki.ProviderLogo})},style:{background:g.colors.primary,width:"".concat(y,"px"),height:"".concat(_,"px")},children:(0,n.jsx)(s._V,{src:i.npy.providerImage(g.id),alt:g.name||"",style:{width:"".concat(y,"px"),height:"auto"}})}):null}var x=t(90248);let h=e=>{let{provider:l}=e;return(null==l?void 0:l.branded)?(0,n.jsxs)(r.so,{justify:"center",align:"center",ml:"lg",children:[(0,n.jsx)(s.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",mr:"sm",truncate:!0,children:(0,n.jsx)(x.A,{id:"featured_by"})}),(0,n.jsx)(u,{selectedProvider:l,size:"48x24"})]}):null}},79375:(e,l,t)=>{"use strict";t.d(l,{A:()=>g,g:()=>h});var n=t(6029),i=t(10174),s=t(90248),r=t(494),a=t(72753);let d={AU:"www.gamblinghelponline.org.au",BG:"nss-bg.org/hi-kodeks",GB:"www.begambleaware.org",NL:"hands24x7.nl"},o={DE:"18+ | Erlaubt (Whitelist) | Suchtrisiko | www.buwei.de",NL:"Wat kost gokken jou? Stop op tijd. 18+",CA:"19+. Gambling can be addictive, please play responsibly.
Eligible iGames conducted and managed by iGO are only available to those physically present in the Province of Ontario.",US:"21+. Gambling Problem?
Call 1-800-GAMBLER",SE:"18+. st\xf6dlinjen.se. Spela ansvarsfullt.",DK:"18+ | Regler og vilk\xe5r g\xe6lder | Spil ansvarligt | Selvudeluk via ROFUS.nu | StopSpillet.dk",TR:"İddaa oranları anlık olarak değişiklik g\xf6sterebilmektedir."},c={BE:21,GR:21,CA:19};function u(e){let{countryOddsProvider:l}=e;return(null==l?void 0:l.oddsMayDiffer)?(0,n.jsxs)("span",{children:[(0,n.jsx)("br",{}),(0,n.jsx)(s.A,{id:"disclaimer_odds_may_differ"})]}):null}function x(){let e=(0,r.d4)(a.LQ),l=e&&d[e];return l?(0,n.jsxs)("span",{children:[", ",(0,n.jsx)("span",{dangerouslySetInnerHTML:{__html:l}})]}):null}let h=e=>e&&c[e.toUpperCase()]?c[e.toUpperCase()]:18;function g(e){let l,{provider:t}=e,d=(0,r.d4)(a.LQ),c=(0,r.d4)(a.zj);return d&&c?l=o["".concat(d,"-").concat(c)]||o[d]:d&&(l=o[d]),(0,n.jsxs)(i.EY,{display:"block",textStyle:"body.small",textAlign:"center",color:"neutrals.nLv3",pr:"sm",children:[l?(0,n.jsx)("span",{dangerouslySetInnerHTML:{__html:l}}):(0,n.jsx)(s.A,{id:"gamble_responsibly",values:{age:h(d)}}),(0,n.jsx)(x,{}),(0,n.jsx)(u,{countryOddsProvider:t})]})}},81474:(e,l,t)=>{"use strict";t.r(l),t.d(l,{default:()=>l_});var n=t(6029),i=t(76356),s=t(90248),r=t(88658),a=t(25246),d=t(78767),o=t(64006),c=t(10174),u=t(46222),x=t(20945),h=t(33144),g=t(55729),m=t(90510),p=t(18970),j=t(88196),y=t(88505);function _(e){let{team:l}=e;return(0,n.jsxs)(i.so,{flexGrow:"1",flexBasis:"[0px]",minW:"[0]",direction:"column",align:"center",gap:"xs",children:[(0,n.jsx)(i.az,{h:"2xl",children:(0,n.jsx)(h.p,{size:32,id:l.id,name:l.name})}),(0,n.jsx)(c.EY,{textStyle:"assistive.micro",display:"block",textAlign:"center",w:"100%",truncate:!0,children:(0,n.jsx)(y.Rm,{team:l})})]})}function v(){let{event:e,leftTeam:l,rightTeam:t}=(0,g.useContext)(p.y$);return(0,n.jsx)(j.A,{event:e,children:(0,n.jsxs)(i.so,{gap:"lg",justify:"center",px:"lg",py:"sm",_hover:{bg:"surface.s2"},children:[(0,n.jsx)(_,{team:l}),(0,n.jsxs)(i.so,{direction:"column",justify:"center",align:"center",children:[(0,n.jsx)(c.EY,{textStyle:"display.medium",children:(0,n.jsx)(m.XU,{value:1e3*e.startTimestamp})}),(0,n.jsx)(c.EY,{textStyle:"assistive.micro",children:(0,n.jsx)(m.ib,{value:1e3*e.startTimestamp})})]}),(0,n.jsx)(_,{team:t})]})})}var b=t(74207),f=t(68789);function k(){let e=(0,f.Ae)();return(0,n.jsxs)(i.so,{justify:"space-between",align:"center",gap:"md",p:{md:"sm"},children:[(0,n.jsxs)(i.so,{direction:"column",justify:"flex-start",children:[(0,n.jsx)(c.EY,{textStyle:"display.medium",display:"block",children:(0,n.jsx)(s.A,{id:"weekly_challenge_daily_10x_header"})}),(0,n.jsx)(c.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",display:"block",children:(0,n.jsx)(s.A,{id:"weekly_challenge_daily_10x_vote_description"})})]}),(0,n.jsx)(b.r,{selectedProvider:e,size:"48x24"})]})}var w=t(46787),A=t(6920),S=t(64046),C=t(6086);function E(e){let{eventId:l,isLive:t,location:s}=e,r=(0,f.Ae)(),{featuredOdds:a,error:d}=(0,A.A)(r,l,t,"fullTime"),{ref:o,makeOnClick:c}=(0,S.kW)({countryOddsProvider:r,type:S.jF.Featured,marketName:null==a?void 0:a.marketName,location:s});return d?null:a?(0,n.jsx)(C.A,{ref:o,selectedProvider:r,market:a,onClick:c(a.marketName,S.ki.OddsValue),hideMarketName:!0}):(0,n.jsx)(i.az,{h:"[38px]",mb:"sm"})}var L=t(79375),I=t(50526),F=t(61394);function T(){let{event:e,location:l}=(0,g.useContext)(p.y$),t=e.status.type===w.XUj.InProgress,r=(0,f.Ae)();return(0,n.jsxs)(i.so,{direction:"column",gap:"md",children:[(0,n.jsxs)(i.so,{direction:"column",gap:"md",bg:"surface.s2",br:"sm",p:"sm",children:[(0,n.jsx)(c.EY,{textStyle:"display.medium",textAlign:"center",px:"lg",display:"block",children:(0,n.jsx)(s.A,{id:"who_will_win"})}),(0,n.jsx)(F.A,{location:"weekly_challenge",voteType:w.rjx.WhoWillWin,isDailyBonus:!0}),(0,n.jsx)(E,{eventId:e.id,isLive:t,location:l})]}),(0,n.jsxs)(i.so,{direction:"column",pl:"sm",children:[(0,n.jsx)(L.A,{provider:r}),(0,n.jsx)(I.A,{})]})]})}var z=t(67087),Y=t(60454);function P(e){let{children:l}=e,{isDaily10xLoading:t,daily10xEvent:i}=(0,Y.A)(),[s,r]=(0,z.jr)(i,"homeTeam","awayTeam",i),[a,d]=(0,z.jr)(i,"homeScore","awayScore",i);return t||!i?null:(0,n.jsx)(p.y$,{value:{event:i,leftTeam:s,rightTeam:r,leftScore:a,rightScore:d,location:p.cb.WeeklyChallenge},children:l})}function B(){return(0,n.jsx)(P,{children:(0,n.jsx)(u.Zp,{children:(0,n.jsxs)(i.so,{direction:"column",gap:"md",p:"sm",children:[(0,n.jsx)(k,{}),(0,n.jsx)(v,{}),(0,n.jsx)(T,{})]})})})}var O=t(95393),W=t(19621),G=t(94565),R=t(494),D=t(95084),K=t(72753),U=t(18153);function M(){let e=(0,W.hX)(),l=(0,R.wA)(),t=(0,R.d4)(K.GJ);return(0,n.jsx)(u.Zp,{children:(0,n.jsxs)(i.so,{justify:"space-between",align:"center",p:"lg",children:[(0,n.jsx)(c.EY,{children:(0,n.jsx)(s.A,{id:"mute_weekly_challenge"})}),!e&&(0,n.jsx)(G.lM,{checked:t,onChange:e=>{l((0,U.w2)(!t)),(0,D.ke)({action:e.target.checked?"switch_on":"switch_off",location:"weekly_challenge",type:"mute_wc"})}})]})})}var H=t(62042),$=t(89827),N=t(22116),Z=t(37578),X=t(46071),V=t(66344),Q=t(86857);let q=(0,H.Fj)({base:{textStyle:"table.large"},variants:{color:{default:{color:"neutrals.nLv3"},promotion:{color:"status.success.default"},demotion:{color:"status.error.default"}}}}),J=(0,i.I4)("div",q),ee=e=>{var l,t,r,a;let{leaderboard:d,userId:o,isLoading:u}=e,[x,h]=(0,g.useState)(!1),m=(0,W.hX)(),p=(0,R.d4)(N.$F),j=(null==p?void 0:p.id)===o,y=null==d||null==(l=d.rankings)?void 0:l.find(e=>e.id===o),_=null==d||null==(t=d.rankings)?void 0:t.findIndex(e=>e.id===o),v=void 0!==_&&_>-1?_+1:void 0,b=null==y?void 0:y.currentWeeklyChallengeWeeklyStreak,f=new Date,k=d&&1e3*d.league.endDateTimestamph(!0),children:[(0,n.jsx)(V.A,{h:16}),(0,n.jsx)(c.EY,{textStyle:"table.medium",children:b||0})]}),(0,n.jsx)(c.EY,{display:"block",textStyle:"table.medium",ms:"sm",textAlign:"end",minW:"[38px]",children:(0,$.M)(y.score,2)})]})]})]}),(0,n.jsx)(Q.A,{isOpen:x,setIsOpen:h})]}):(0,n.jsx)(i.so,{align:"center",justify:"center",m:"lg",minH:"7xl",children:(0,n.jsx)(c.EY,{color:"neutrals.nLv2",textStyle:"body.medium",textAlign:"center",children:(0,n.jsx)(s.A,{id:"weekly_challenge_current_ranking_empty_state"})})})};var el=t(36129),et=t(27197);function en(){let e=(0,R.d4)(N.$F),{hasChallengeEnded:l}=(0,Y.A)(),{data:t,isLoading:r}=(0,et.s3)(),a=null==t?void 0:t.league,d=null==a?void 0:a.level,o=void 0!==d;return(0,n.jsxs)(u.Zp,{children:[(0,n.jsxs)(i.so,{align:"center",justify:o?"space-between":"center",pt:"md",pb:"xs",px:"lg",children:[o&&!l&&(0,n.jsx)(i.az,{pl:"2xs",w:"[18px]",h:"[26px]",children:(0,n.jsx)(el.X,{level:d,width:"18px",height:"26px"})}),(0,n.jsx)(c.EY,{display:"block",textAlign:"center",textStyle:"display.medium",children:(0,n.jsx)(s.A,{id:"weekly_challenge_current_ranking"})}),o&&(0,n.jsx)(i.az,{w:"[18px]"})]}),(0,n.jsx)(i.az,{p:"sm",children:(0,n.jsx)(ee,{userId:null==e?void 0:e.id,leaderboard:t,isLoading:r})})]})}let ei=(0,i.I4)("ul",{base:{display:"flex",flexDirection:"column",gap:"sm",pl:"xl"}});function es(e){let{titleId:l,children:t}=e;return(0,n.jsxs)(i.so,{direction:"column",p:"lg",gap:"sm",children:[(0,n.jsx)(i.az,{textStyle:"display.medium",children:(0,n.jsx)(s.A,{id:l})}),t]})}function er(e){let{id:l}=e;return(0,n.jsx)(c.Li,{children:(0,n.jsx)(s.A,{id:l})})}function ea(e){let{id:l,children:t}=e;return(0,n.jsx)(c.P,{m:"0",children:l?(0,n.jsx)(s.A,{id:l}):(0,n.jsx)(n.Fragment,{children:t})})}function ed(){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(es,{titleId:"weekly_challenge_how_to_play",children:[(0,n.jsx)(ea,{id:"weekly_challenge_how_to_body_one"}),(0,n.jsx)(ea,{id:"weekly_challenge_how_to_body_two"})]}),(0,n.jsx)(es,{titleId:"weekly_challenge_where_to_vote",children:(0,n.jsx)(ea,{id:"weekly_challenge_where_to_vote_body"})}),(0,n.jsxs)(es,{titleId:"weekly_challenge_what_happens",children:[(0,n.jsx)(ea,{id:"weekly_challenge_what_happens_body_one"}),(0,n.jsx)(ea,{id:"weekly_challenge_what_happens_body_two"})]}),(0,n.jsxs)(es,{titleId:"weekly_challenge_collecting_points",children:[(0,n.jsx)(ea,{children:(0,n.jsx)(s.A,{id:"weekly_challenge_collecting_points_body_one",values:{b:function(){for(var e=arguments.length,l=Array(e),t=0;t{let{level:l,title:t,asset:s,isActive:r,children:a}=e,[d,o]=(0,W.c9)([]);if((0,c.rF)(d,[r],()=>r),!r)return(0,n.jsx)(n.Fragment,{children:a});let u=l&&s?s.hex:void 0;return(0,n.jsxs)(i.so,{direction:"column",gap:"xs",align:"center",py:"sm",px:"md",br:"sm",elevation:{mdDown:"1"},style:{backgroundColor:u},children:[(0,n.jsx)(i.az,{ref:o,children:a}),t&&(0,n.jsx)(c.EY,{display:"block",textStyle:"display.micro",color:"onColor.primary",textAlign:"center",children:t})]})};function ex(){let e=(0,W.hX)(),l=(0,R.d4)(N.$F),{data:t,isLoading:s}=(0,ec.Ay)(w.rGM.leagueAssets()),{hasChallengeEnded:r}=(0,Y.A)(),{data:a,isLoading:d}=(0,et.s3)(),o=null==a?void 0:a.league,u=null==o?void 0:o.level;return(0,n.jsx)(c.tR,{buttonStyle:"outlined",colorPalette:"primaryInverted",showButtons:"desktop",children:(0,n.jsx)(i.so,{justify:"center",align:"center",gap:"xl",mx:{base:"lg",md:"xl"},pt:{base:"xl",md:"lg"},pb:"xl",minW:"fit",minH:"[147px]",flexShrink:"0",children:!e&&!s&&!d&&(null==t?void 0:t.meta)&&t.meta.map((e,s)=>{var a;let{level:d}=e,c=!r&&+d===u;return(0,n.jsx)(eu,{level:u,asset:t.meta.find(e=>e.level===u),title:null==o?void 0:o.title,isActive:c,children:(0,n.jsx)(i.az,{minH:"[78px]",children:(0,n.jsx)(el.X,{width:54,height:78,level:+d,isLocked:!r&&void 0!==u&&+d>(null!=(a=null==l?void 0:l.maxLeagueLevel)?a:u),animate:c,animateProps:{dur:"30s",begin:"5s",repeatCount:"indefinite",values:"-100%; 150%; 150%",keyTimes:"0; 0.016; 1"}})})},"".concat(s,"-").concat(d))})})})}var eh=t(6813),eg=t(52667);function em(){let{data:e}=(0,ec.Ay)(w.rGM.leagueAssets()),l=(0,R.d4)(N.$F),t=null==l?void 0:l.weeklyChallengeMaxFinishedLeagueLevel,r=null==l?void 0:l.weeklyChallengeBestRank;if(!r||!t)return null;let a=null==e?void 0:e.meta.find(e=>e.level===t);return(0,n.jsxs)(eg.p,{titleId:"weekly_challenge_personal_bests",children:[(0,n.jsx)(eg.I,{children:(0,n.jsxs)(i.so,{gap:"sm",align:"center",children:[(0,n.jsx)(el.X,{level:t,width:22,height:32}),(0,n.jsxs)(i.az,{children:[(null==a?void 0:a.title)&&(0,n.jsx)(c.EY,{display:"block",textStyle:"display.medium",children:null==a?void 0:a.title}),(0,n.jsx)(c.EY,{display:"block",textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,n.jsx)(s.A,{id:"weekly_challenge_highest_league"})})]})]})}),(0,n.jsxs)(eg.I,{children:[(0,n.jsxs)(c.EY,{textStyle:"display.medium",children:["#",r]}),(0,n.jsx)(c.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,n.jsx)(s.A,{id:"weekly_challenge_highest_rank"})})]})]})}var ep=t(62710);function ej(){let e=(0,R.d4)(N.$F),l=null==e?void 0:e.weeklyChallengeCurrentWeeklyStreak,t=null==e?void 0:e.weeklyChallengeMaxWeeklyStreak,s=null==e?void 0:e.weeklyChallengeMaxFinishedLeagueLevel,r=null==e?void 0:e.weeklyChallengeBestRank;return l||t||s&&r?(0,n.jsxs)(i.so,{p:"sm",direction:"column",gap:"sm",children:[(0,n.jsx)(ep.A,{currentWeeklyStreak:l,maxWeeklyStreak:t,showTitle:!0}),(0,n.jsx)(em,{})]}):(0,n.jsx)(eh.p,{graphic:"no-statistics",titleMessageId:"no_statistics_yet_title",descriptionMessageId:"no_statistics_yet_description"})}var ey=t(32523),e_=t(52466);let ev=e=>{let{children:l}=e,{eventList:t,isLoading:i}=(0,et.Z8)(1),s=null==t?void 0:t[0];return i?(0,n.jsx)(n.Fragment,{children:l}):s?(0,n.jsx)(o.tj,{event:s,children:l}):(0,n.jsx)(o.N_,{routeKey:"home",children:l})},eb=e=>{let{isLoggedIn:l,children:t}=e;return l?(0,n.jsx)(ev,{children:t}):(0,n.jsx)(n.Fragment,{children:t})};function ef(){let{isUserLoggedIn:e}=(0,Y.A)(),[l,t]=(0,g.useState)("surface.s1"),r=(0,R.wA)();return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(eb,{isLoggedIn:e,children:(0,n.jsx)(c.$n,{onFocus:()=>t("primary.default"),onBlur:()=>t("surface.s1"),onClick:()=>{e?(0,D.ke)({action:"click",location:"challenge",type:"start_voting"}):r((0,U.aS)())},w:"100%",children:e?(0,n.jsxs)(i.so,{align:"center",justify:"center",gap:"xs",children:[(0,n.jsx)(e_.Gdg,{fill:l,mr:"xs"}),(0,n.jsx)(s.A,{id:"weekly_challenge_start_voting"})]}):(0,n.jsx)(s.A,{id:"user.signIn"})})})})}function ek(e){let{index:l,zone:t,imgSrc:s,nickname:r,score:a}=e;return(0,n.jsxs)(i.so,{minH:"5xl",position:"relative",align:"center",justify:"space-between",px:"lg",borderTop:l>0?"onSurface.nLv4":void 0,children:[(0,n.jsxs)(i.so,{align:"center",gap:"lg",children:[(0,n.jsx)(c.EY,{color:"promotion"===t?"status.success.default":"demotion"===t?"status.error.default":"neutrals.nLv3",display:"block",textStyle:"table.large",minW:"2xl",textAlign:"center",children:l+1}),(0,n.jsx)(Z.A,{size:32,src:s}),(0,n.jsx)(c.EY,{textStyle:"table.medium",children:r})]}),(0,n.jsx)(c.EY,{display:"block",textStyle:"table.medium",children:(0,$.M)(a)||0})]})}var ew=t(29742),eA=t(93338);let eS=e=>{let{fill:l="neutrals.nLv1"}=e,{hasChallengeEnded:t,challengeEndTime:s}=(0,Y.A)();return(0,n.jsxs)(i.so,{align:"center",justify:"center",gap:"xs",children:[(0,n.jsx)(e_.zQC,{icon:"time-outline",fill:eA.S.var("colors.".concat(l))}),(0,n.jsx)(c.EY,{textStyle:"display.medium",style:{color:eA.S.var("colors.".concat(l))},children:(0,n.jsx)(ew.M,{hasChallengeEnded:t,challengeEndTime:s})})]})};function eC(){let[e,l]=(0,g.useState)(!1);return(0,n.jsxs)(i.so,{hideFrom:"md",justify:"center",w:"100%",position:"absolute",top:"0",style:{transform:"translateY(-50%)"},children:[(0,n.jsx)(i.az,{onClick:()=>{l(!0)},bg:"surface.sp",elevation:"3",py:"sm",px:"md",br:"xl",children:(0,n.jsx)(eS,{})}),(0,n.jsx)(c.Xn,{isOpen:e,onClose:()=>l(!1),title:(0,n.jsx)(s.A,{id:"timer_explainer_bottom_sheet_header"}),size:"contentFit",children:(0,n.jsx)(i.az,{px:"lg",pb:"4xl",children:(0,n.jsx)(c.EY,{textStyle:"body.mediumParagraph",children:(0,n.jsx)(s.A,{id:"timer_explainer_bottom_sheet"})})})})]})}function eE(e){let{showTimer:l,children:t}=e;return(0,n.jsxs)(i.az,{position:"relative",children:[t,l&&(0,n.jsx)(eC,{})]})}let eL=["Robert Smith","Bansilal Brata","Lucas Sim\xf5es","Xun Guiying"],eI=e=>{let{textId:l}=e;return(0,n.jsxs)(i.so,{gap:"sm",align:"center",children:[(0,n.jsx)(i.az,{br:"50%",h:"sm",w:"sm",bg:"primary.default"}),(0,n.jsx)(c.EY,{textStyle:"body.medium",children:(0,n.jsx)(s.A,{id:l})})]})},eF=e=>{let{hasEnded:l,isLoggedIn:t,hasLeaderboard:i,children:r}=e;return l?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.A,{id:"next_weekly_challenge"})," ",r]}):t?(0,n.jsx)(s.A,{id:i?"weekly_challenge_leaderboard_filling_up":"join_the_challenge"}):(0,n.jsx)(s.A,{id:"join_the_challenge"})},eT=e=>{let{hasEnded:l,isLoggedIn:t,hasLeaderboard:i}=e;return l?(0,n.jsx)(s.A,{id:"next_weekly_challenge_CTA"}):t?(0,n.jsx)(s.A,{id:i?"weekly_challenge_waiting":"weekly_challenge_get_started"}):(0,n.jsx)(s.A,{id:"weekly_challenge_sign_in"})};function ez(){let{isUserLoggedIn:e,hasChallengeEnded:l,challengeEndTime:t}=(0,Y.A)(),{data:s}=(0,et.s3)();return(0,n.jsx)(eE,{showTimer:!l,children:(0,n.jsxs)(i.az,{position:"relative",borderTop:"1px solid",borderTopColor:"neutrals.nLv4",roundedBottom:"lg",pb:"lg",children:[Array.from({length:10},(e,l)=>l).map(e=>(0,n.jsx)(ek,{index:e,nickname:eL[e%4],score:(e%4+1)*10,zone:e<5?"promotion":e>7?"demotion":void 0,imgSrc:"/static/images/weekly-challenge/placeholders/person-".concat(e%4+1,".png")},e)),(0,n.jsx)(i.az,{bg:"surface.s2",position:"absolute",style:{backdropFilter:"blur(6px)",WebkitBackdropFilter:"blur(6px)"},inset:"0",roundedBottom:{md:"lg"}}),(0,n.jsx)(i.so,{position:"absolute",justify:"center",inset:"0",children:(0,n.jsxs)(i.so,{direction:"column",gap:"sm",bg:"surface.sp",elevation:"1",br:"sm",mt:"[100px]",mx:"lg",h:"fit",w:"100%",maxW:"[320px]",py:"xl",px:"lg",children:[(0,n.jsx)(c.EY,{textStyle:"display.large",display:"block",children:(0,n.jsx)(eF,{hasEnded:l,hasLeaderboard:!!s,isLoggedIn:e,children:t&&(0,n.jsx)(ew.M,{hasChallengeEnded:l,challengeEndTime:t})})}),(0,n.jsx)(c.EY,{textStyle:"body.mediumParagraph",children:(0,n.jsx)(eT,{hasEnded:l,isLoggedIn:e,hasLeaderboard:!!s})}),!l&&(0,n.jsxs)(i.so,{direction:"column",gap:"sm",pl:"sm",children:[(0,n.jsx)(eI,{textId:"weekly_challenge_instruction_1"}),(0,n.jsx)(eI,{textId:"weekly_challenge_instruction_2"}),(0,n.jsx)(eI,{textId:"weekly_challenge_instruction_3"}),(0,n.jsx)(eI,{textId:"weekly_challenge_instruction_4"})]}),(0,n.jsx)(i.az,{pt:"lg",children:(0,n.jsx)(ef,{})})]})})]})})}function eY(e){let{isOpen:l,setIsOpen:t}=e,r=(0,g.useRef)(null);return(0,n.jsx)(c.Xn,{isOpen:l,onClose:()=>t(!1),title:(0,n.jsx)(s.A,{id:"weekly_challenge_votes_this_week"}),size:"large",children:(0,n.jsx)(i.az,{ref:r,minH:"100%",children:(0,n.jsx)(O.iC,{bottomSheetRef:r,isBottomSheet:!0})})})}var eP=t(43072);let eB=e=>{let{rankingsId:l,isMe:t,enableScroll:s,children:r}=e,{isMobile:a}=(0,c.$c)(),{ref:d,inView:u,entry:x}=(0,eP.Wx)({triggerOnce:!0,threshold:1});return((0,g.useEffect)(()=>{(null==x?void 0:x.target)&&!u&&s&&x.target.scrollIntoView({behavior:"smooth",block:"center"})},[u,null==x?void 0:x.target]),t&&a)?(0,n.jsx)(i.az,{ref:d,children:r}):(0,n.jsx)(o.N_,{routeKey:"user",params:{userId:l},onClick:()=>(0,D.Zs)("weekly_challenge"),children:r})},eO=e=>{let{index:l,ranking:t,zone:s,enableScroll:r,hideStreak:a}=e,{id:d,nickname:o,score:u,userBadge:x,currentWeeklyChallengeWeeklyStreak:h}=t,g=(0,R.d4)(N.$F),m=(null==g?void 0:g.id)===d;return(0,n.jsx)(eB,{rankingsId:d,isMe:m,enableScroll:r,children:(0,n.jsxs)(i.so,{minH:"5xl",align:"center",justify:"space-between",px:"lg",cursor:"pointer",bg:m?"primary.highlight":void 0,_hover:{bg:m?"primary.highlight":"neutrals.nLv5"},borderTop:l>0?"1px solid {colors.neutrals.nLv4}":void 0,borderStart:m?"4px solid {colors.primary.default}":void 0,children:[(0,n.jsxs)(i.so,{align:"center",gap:"lg",ml:m?"-xs":"0",me:"sm",children:[(0,n.jsx)(c.EY,{color:"promotion"===s?"status.success.default":"demotion"===s?"status.error.default":"neutrals.nLv3",textStyle:"table.large",display:"block",minW:"2xl",textAlign:"center",children:l+1}),(0,n.jsx)(Z.A,{size:32,src:w.VfS.chatImage(d),userBadge:x}),(0,n.jsx)(c.EY,{textStyle:"table.medium",lineClamp:2,overflowWrap:"anywhere",children:m?g.nickname:o})]}),(0,n.jsxs)(i.so,{align:"center",gap:"xs",children:[!a&&void 0!==h&&h>=3&&(0,n.jsxs)(i.so,{align:"center",gap:"2xs",children:[(0,n.jsx)(V.A,{h:16}),(0,n.jsx)(c.EY,{display:"block",textStyle:"table.medium",children:h})]}),(0,n.jsx)(c.EY,{display:"block",minW:"4xl",textAlign:"end",textStyle:"table.medium",children:(0,$.M)(u,2)})]})]})})};var eW=t(82536);let eG=e=>{let{zone:l}=e,[t,r]=(0,g.useState)(!1);if(!l)return null;let a="demotion"===l,d=a?"error.default":"success.default";return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(i.so,{align:"center",justify:"center",h:"3xl",borderTop:"1px solid",borderTopColor:"neutrals.nLv4",onClick:()=>{r(!0)},cursor:"pointer",children:[a?(0,n.jsx)(e_.RGe,{fill:d}):(0,n.jsx)(e_.UPF,{fill:d}),(0,n.jsx)(c.EY,{textStyle:"table.large",color:a?"status.error.default":"status.success.default",children:(0,n.jsx)(s.A,{id:a?"weekly_challenge_relegation":"weekly_challenge_promotion"})}),a?(0,n.jsx)(e_.RGe,{fill:d}):(0,n.jsx)(e_.UPF,{fill:d})]}),(0,n.jsx)(eW.A,{isOpen:t,setIsOpen:r,children:(0,n.jsxs)(i.az,{p:"lg",maxW:{md:"[320px]"},children:[(0,n.jsx)(c.EY,{display:"block",textStyle:"display.medium",mb:"lg",children:(0,n.jsx)(s.A,{id:"leaderboard_explainer_bottom_sheet_header"})}),(0,n.jsx)(c.EY,{display:"block",textStyle:"body.mediumParagraph",children:(0,n.jsx)(s.A,{id:"leaderboard_explainer_bottom_sheet"})})]})})]})};function eR(e){let{isOpen:l,setIsOpen:t}=e;return(0,n.jsx)(eW.A,{isOpen:l,setIsOpen:t,bottomSheetSize:"contentFit",children:(0,n.jsx)(i.az,{minH:"[316px]",children:(0,n.jsx)(P,{children:(0,n.jsxs)(i.so,{direction:"column",gap:"md",p:"lg",children:[(0,n.jsx)(k,{}),(0,n.jsx)(v,{}),(0,n.jsx)(T,{})]})})})})}var eD=t(15341);function eK(e){let{hasVoted:l}=e;return l?(0,n.jsxs)(i.so,{gap:"xs",align:"center",zIndex:"button",children:[(0,n.jsx)(e_.Ksi,{width:24,height:24,fill:"onSurface.nLv1"}),(0,n.jsx)(c.EY,{textStyle:"display.small",children:(0,n.jsx)(s.A,{id:"basic.voted"})})]}):(0,n.jsx)(c.$n,{variant:"filled",size:"secondary",negative:!0,children:(0,n.jsx)(s.A,{id:"play_button"})})}var eU=t(88393);function eM(){let{isMobile:e}=(0,c.$c)(),l=(0,W.hX)(),{isDaily10xLoading:t,daily10xEvent:n}=(0,Y.A)();return{showBanner:!t&&!!n&&!l&&e,daily10xEvent:n}}var eH=t(27379),e$=t(26457);function eN(e){let{daily10xEvent:l,hasVoted:t,children:i}=e;return t&&l?(0,n.jsx)(o.tj,{event:l,children:i}):(0,n.jsx)(n.Fragment,{children:i})}function eZ(){let{showBanner:e,daily10xEvent:l}=eM(),{hasVotedCurrentDaily10x:t,isLoading:r}=function(e){var l,t;let n=(0,R.d4)(N.$F),i=(0,R.d4)(e$.wH),{isDaily10xLoading:s,daily10xEvent:r}=(0,Y.A)(),{data:a,isLoading:d}=(0,eH.Z)(),o=!!r&&!!i[r.id]&&!!i[r.id][e].current,c=!!r&&!!(null==a||null==(t=a.predictions)||null==(l=t.find)?void 0:l.call(t,e=>e.eventId===r.id));return{hasVotedCurrentDaily10x:!!(null==n?void 0:n.id)&&(o||c),isLoading:s||d}}(w.rjx.WhoWillWin),[a]=(0,eD.A)(eU.e1,!1),[d,o]=(0,g.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[e&&(0,n.jsx)(eN,{daily10xEvent:l,hasVoted:t,children:(0,n.jsxs)(i.so,{position:"relative",justify:"space-between",align:"center",gap:"lg",br:"sm",px:"lg",py:a?"sm":"lg",minH:a?"4xl":"9xl",bg:"primary.highlight",overflow:"hidden",onClick:()=>{t||r||o(!0)},children:[(0,n.jsxs)(i.so,{direction:"column",gap:"xs",children:[(0,n.jsx)(c.EY,{textStyle:"display.medium",children:(0,n.jsx)(s.A,{id:"weekly_challenge_daily_10x_vote"})}),!a&&(0,n.jsx)(c.EY,{textStyle:"assistive.default",children:(0,n.jsx)(s.A,{id:"weekly_challenge_daily_10x_vote_description"})})]}),!r&&(0,n.jsx)(eK,{hasVoted:t}),(0,n.jsx)(i.az,{position:"absolute",zIndex:"backdrop",end:"[54px]",children:(0,n.jsx)(e_.nJv,{fill:"onColor.highlight.nLv1",height:70,width:70})})]})}),(0,n.jsx)(eR,{isOpen:d,setIsOpen:o})]})}function eX(e){let{children:l}=e,[t,r]=(0,g.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(i.so,{align:"center",py:"sm",pl:"sm",gap:"xs",onClick:()=>r(!0),cursor:"pointer",children:[(0,n.jsx)(e_.G_L,{w:18,h:18,fill:"onSurface.nLv3"}),l]}),(0,n.jsx)(eW.A,{isOpen:t,setIsOpen:r,header:"weekly_challenge_collecting_points",children:(0,n.jsxs)(i.I4.ul,{display:"flex",flexDirection:"column",maxW:"[400px]",gap:"sm",pr:"lg",children:[(0,n.jsx)(c.Li,{textStyle:"body.mediumParagraph",children:(0,n.jsx)(s.A,{id:"weekly_challenge_getting_points"})}),(0,n.jsx)(c.Li,{textStyle:"body.mediumParagraph",children:(0,n.jsx)(s.A,{id:"weekly_challenge_losing_points"})}),(0,n.jsx)(c.Li,{textStyle:"body.mediumParagraph",children:(0,n.jsx)(s.A,{id:"weekly_challenge_current_week"})}),(0,n.jsx)(c.Li,{textStyle:"body.mediumParagraph",children:(0,n.jsx)(s.A,{id:"weekly_challenge_later_weeks"})}),(0,n.jsx)(c.Li,{hideFrom:"md",textStyle:"body.mediumParagraph",children:(0,n.jsx)(s.A,{id:"weekly_challenge_name_leaderboard"})})]})})]})}function eV(e){let{leaderboardResponse:l,variant:t="current"}=e,{isMobile:r}=(0,c.$c)(),{showBanner:a}=eM(),[d,o]=(0,g.useState)(!1),u=(0,R.d4)(N.$F),{rankings:x,demotionZoneUsers:h,neutralZoneUsers:m,promotionZoneUsers:p}=l,{userIds:j}=(0,X.Y)(p,m,h,x);return(0,n.jsxs)(eE,{showTimer:"current"===t,children:[(0,n.jsxs)(i.so,{align:"center",justify:"space-between",h:{base:"[39px]",md:"[26px]"},px:"lg",pt:{base:"sm",md:"0"},borderTop:{md:"1px solid {colors.neutrals.nLv4}"},borderBottom:{md:"1px solid {colors.neutrals.nLv4}"},children:[(0,n.jsx)(c.EY,{display:"block",color:"neutrals.nLv3",textStyle:"table.medium",children:(0,n.jsx)(s.A,{id:"basic.rank"})}),(0,n.jsx)(eX,{children:(0,n.jsx)(c.EY,{color:"neutrals.nLv3",textStyle:"table.medium",children:(0,n.jsx)(s.A,{id:"points"})})})]}),(0,n.jsx)(i.az,{pb:"lg",children:x.map((e,l)=>{let s=(null==u?void 0:u.id)===e.id,d=l===j.promoted.length-1,c=l===j.promoted.length+j.neutral.length-1,x=p>0&&d&&j.promoted.length>0,m=h>0&&c&&j.demoted.length>0,y=j.promoted.includes(e.id)?"promotion":j.demoted.includes(e.id)?"demotion":"neutral";return(0,n.jsxs)(g.Fragment,{children:[(0,n.jsx)(i.az,{onClick:()=>s&&r&&o(!0),children:(0,n.jsx)(eO,{index:l,ranking:e,zone:y,enableScroll:"current"===t,hideStreak:"previous"===t})}),s&&a&&"current"===t&&(0,n.jsx)(i.az,{p:"md",borderTop:"1px solid",borderTopColor:"neutrals.nLv4",children:(0,n.jsx)(eZ,{})}),(0,n.jsx)(eG,{zone:x?"promotion":m?"demotion":void 0})]},e.id)})}),x.length<5&&(0,n.jsx)(i.az,{borderTop:"1px solid",borderTopColor:"neutrals.nLv4",children:(0,n.jsx)(eh.p,{graphic:"no-standings",children:(0,n.jsx)(c.EY,{color:"neutrals.nLv3",textStyle:"body.mediumParagraph",lineHeight:"20px",textAlign:"center",maxW:"[350px]",children:(0,n.jsx)(s.A,{id:"weekly_challenge_leaderboard_empty"})})})}),"current"===t&&(0,n.jsx)(eY,{isOpen:d,setIsOpen:o})]})}function eQ(){let{data:e,isLoading:l}=(0,et.s3)(),{hasChallengeEnded:t}=(0,Y.A)();return(0,W.hX)()||l?(0,n.jsx)(ey.E,{uniqueKey:"leaderboard-cl"}):t||!e?(0,n.jsx)(ez,{}):(0,n.jsx)(eV,{leaderboardResponse:e})}var eq=function(e){return e.Previous="Previous",e.Current="Current",e.Statistics="Statistics",e}({}),eJ=t(67080),e0=t(95285),e1=t(95473),e2=t(9701);function e4(){var e;let l=(0,R.d4)(N.$F),{result:t,newData:r,prevData:a,wasMaxLevel:d,isLoading:o,hasOnlyPrevLeaderboard:u}=function(){let e=(0,R.d4)(N.$F),l=!!(null==e?void 0:e.previousLeaderboardId)&&!e.leaderboardId,{data:t,isLoading:n}=(0,ec.Ay)((null==e?void 0:e.leaderboardId)?w.rGM.leaderboardRankings(+(null==e?void 0:e.leaderboardId)):null),{data:i,isLoading:s}=(0,ec.Ay)((null==e?void 0:e.previousLeaderboardId)?w.rGM.leaderboardRankings(e.previousLeaderboardId):null),{data:r,isLoading:a}=(0,ec.Ay)(w.rGM.leagueAssets()),d=n||s||a,o=l?"relegated":(null==e?void 0:e.leaderboardId)?(0,e0.E)(d,t,i):void 0,c=(0,e1.A)(r,i);return{result:o,userAccount:e,newData:t,prevData:i,wasMaxLevel:c,isLoading:d,hasOnlyPrevLeaderboard:l}}(),x=null==a?void 0:a.rankings.find(e=>e.id===(null==l?void 0:l.id)&&(null==l?void 0:l.id)),h=null==x?void 0:x.currentWeeklyChallengeWeeklyStreak,g=d&&"staying"===t,m=null==a||null==(e=a.rankings)?void 0:e.findIndex(e=>e.id===(null==l?void 0:l.id)),p=void 0!==m?m+1:void 0,j=null==a?void 0:a.league.title,y=u?j:null==r?void 0:r.league.title,_=u?null==a?void 0:a.league.level:null==r?void 0:r.league.level;return o?(0,n.jsx)(i.az,{h:"[288px]"}):(0,n.jsxs)(i.so,{direction:"column",justify:"center",minH:"[288px]",gap:"lg",children:[t&&(0,n.jsx)(i.so,{px:"md",py:"xs",br:"md",bg:"relegated"===t?"neutrals.nLv5":"secondary.highlight",w:"fit",mx:"auto",align:"center",children:(0,n.jsx)(c.EY,{textStyle:"table.medium",children:(0,n.jsx)(s.A,{id:g?"weekly_challenge_results_staying_top":eJ.j[t]})})}),!!_&&(0,n.jsx)(i.so,{justify:"center",children:(0,n.jsx)(el.X,{level:_,width:67,height:97})}),p&&j&&(0,n.jsxs)(i.so,{direction:"column",gap:"xs",children:[!!y&&(0,n.jsx)(c.EY,{textStyle:"display.large",textAlign:"center",display:"block",children:y}),(0,n.jsx)(c.EY,{textStyle:"body.medium",color:"neutrals.nLv2",textAlign:"center",display:"block",children:(0,n.jsx)(s.A,{id:g?"weekly_challenge_placement_top_league":"weekly_challenge_results_placement",values:{rank:p,leagueName:j}})})]}),t&&void 0!==h&&h>0&&(0,n.jsx)(i.so,{direction:"column",align:"center",w:{base:"100%",md:"fit"},px:"xl",py:"sm",bg:"neutrals.nLv5",br:"sm",mx:"auto",children:(0,n.jsx)(e2.A,{streak:h,resultType:t})})]})}function e6(e){let{isCard:l}=e,t=(0,W.hX)(),s=(0,R.d4)(N.$F),r=null==s?void 0:s.previousLeaderboardId,{data:a,isLoading:d}=(0,ec.Ay)(r?w.rGM.leaderboardRankings(r):null);return d||t?(0,n.jsx)(ey.E,{br:"lg",uniqueKey:"leaderboard-cl"}):a?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.Zp,{variant:"mobile-only",children:(0,n.jsx)(i.az,{px:"sm",pt:"lg",pb:l?"sm":"xl",children:(0,n.jsx)(e4,{})})}),(0,n.jsx)(u.Zp,{variant:"mobile-only",children:(0,n.jsx)(eV,{leaderboardResponse:a,variant:"previous"})})]}):(0,n.jsx)(eh.p,{graphic:"check-back-later",titleMessageId:"weekly_challenge_previous_week_empty_header",descriptionMessageId:"weekly_challenge_previous_week_empty_description"})}function e5(){return(0,n.jsx)(u.Zp,{children:(0,n.jsx)(i.so,{w:"100%",overflow:"hidden",br:"lg",children:(0,n.jsxs)(c.tU,{variant:"primary",initialValue:eq.Current,fullWidthTabs:!0,children:[(0,n.jsx)(i.az,{borderBottom:"1px solid {colors.neutrals.nLv4}",children:(0,n.jsxs)(c.tU.List,{mx:"lg",children:[(0,n.jsx)(c.tU.Tab,{tabKey:eq.Previous,children:(0,n.jsx)(s.A,{id:"weekly_challenge_previous_week"})}),(0,n.jsx)(c.tU.Tab,{tabKey:eq.Current,children:(0,n.jsx)(s.A,{id:"weekly_challenge_current_week_tab"})}),(0,n.jsx)(c.tU.Tab,{tabKey:eq.Statistics,children:(0,n.jsx)(s.A,{id:"statistics"})})]})}),(0,n.jsx)(c.tU.Panel,{tabKey:eq.Previous,children:(0,n.jsx)(e6,{})}),(0,n.jsxs)(c.tU.Panel,{tabKey:eq.Current,children:[(0,n.jsx)(ex,{}),(0,n.jsx)(eQ,{})]}),(0,n.jsx)(c.tU.Panel,{tabKey:eq.Statistics,children:(0,n.jsx)(ej,{})})]})})})}var e3=t(64994);function e7(){let{hasChallengeEnded:e}=(0,Y.A)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.H1,{textAlign:"center",mb:"2xl",children:(0,n.jsx)(s.A,{id:"weekly_challenge"})}),(0,n.jsxs)(x.xA,{pb:"4xl",children:[(0,n.jsxs)(x.fv,{flexGrow:2,children:[(0,n.jsx)(M,{}),(0,n.jsxs)(u.Zp,{children:[(0,n.jsx)(u.Zp.Header,{titleId:e?"next_weekly_challenge":"weekly_challenge_time_left"}),(0,n.jsx)(i.az,{mt:"lg",children:(0,n.jsx)(eS,{fill:"primary.default"})}),(0,n.jsx)(u.Zp.Footer,{})]}),(0,n.jsx)(en,{}),(0,n.jsx)(O.iC,{})]}),(0,n.jsx)(x.fv,{flexGrow:3,children:(0,n.jsx)(e5,{})}),(0,n.jsxs)(x.fv,{flexGrow:2,children:[(0,n.jsx)(e3.A,{}),(0,n.jsx)(B,{}),(0,n.jsx)(eo,{})]})]})]})}function e9(){let[e,l]=(0,g.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e_.G_L,{fill:"onSurface.nLv1",onClick:()=>l(!0)}),(0,n.jsx)(c.Xn,{isOpen:e,onClose:()=>l(!1),title:(0,n.jsx)(s.A,{id:"weekly_challenge_info"}),children:(0,n.jsx)(ed,{})})]})}var e8=t(43189),le=t(2920),ll=t(56132);let lt=(0,H.Fj)({base:{position:"absolute",display:"flex",justifyContent:"center",backgroundColor:"primary.default",top:"[36px]",br:"md",cursor:"pointer",end:"sm",zIndex:"stickySecondary",px:"xl",py:"sm",_after:{content:'""',display:"block",position:"absolute",width:"[0px]",height:"[0px]",borderTop:"10px solid transparent",borderBottom:"10px solid transparent",borderEnd:"7px solid {colors.primary.default}",top:"-md",end:"xl",transform:"rotate(90deg)"}}}),ln=(0,i.I4)("div",lt);function li(){let e=(0,R.d4)(N.$F),{data:l}=(0,et.s3)(),[t,r]=(0,g.useState)(!1),[a,d,o]=(0,eD.A)("weekly.challenge.streak.tooltip",!0);if(!(null==e?void 0:e.id))return null;let u=null==l?void 0:l.rankings.find(l=>l.id===e.id),x=u?u.currentWeeklyChallengeWeeklyStreak:0;return(0,n.jsxs)(i.az,{position:"relative",children:[(0,n.jsx)(i.so,{h:"xl",align:"center",justify:"flex-end",px:"lg",mb:"sm",children:(0,n.jsxs)(i.so,{bg:"surface.s1",py:"xs",px:"sm",br:"sm",elevation:"2",align:"center",gap:"2xs",onClick:()=>{r(!0),a&&d(!1)},children:[(0,n.jsx)(V.A,{h:16}),(0,n.jsx)(c.EY,{textStyle:"table.medium",children:x})]})}),(0,n.jsx)(Q.A,{isOpen:t,setIsOpen:r}),o&&a&&(null==e?void 0:e.leaderboardId)!==void 0&&(0,n.jsx)(ln,{onClick:()=>d(!1),children:(0,n.jsx)(c.EY,{textStyle:"body.medium",color:"onColor.primary",children:(0,n.jsx)(s.A,{id:"hint_current_weekly_streak"})})})]})}function ls(){let{hasChallengeEnded:e}=(0,Y.A)(),[l,t]=(0,g.useState)(!1);return e?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(i.so,{justify:"center",align:"center",h:"4xl",py:"sm",px:"xl",gap:"xs",br:"xl",bg:"primary.default",onClick:()=>t(!0),cursor:"pointer",children:[(0,n.jsx)(i.az,{w:"xl",h:"xl",children:(0,n.jsx)(e_.nJv,{fill:"surface.s1",h:24,w:24})}),(0,n.jsx)(c.EY,{display:"block",textStyle:"display.large",color:"surface.s1",children:(0,n.jsx)(s.A,{id:"vote"})})]}),(0,n.jsx)(c.Xn,{isOpen:l,onClose:()=>t(!1),size:"contentFit",children:(0,n.jsx)(e3.A,{})})]})}function lr(){let{data:e}=(0,et.s3)(),l=[{tabKey:ll.x.ChallengePreviousWeek,item:"weekly_challenge_previous_week"},{tabKey:ll.x.ChallengeCurrentWeek,item:"weekly_challenge_current_week_tab"},{tabKey:ll.x.Statistics,item:"statistics"}];return(0,n.jsxs)(le.A,{id:0,tabs:l,initialTabKey:ll.x.ChallengeCurrentWeek,location:ll.C.ChallengePage,noSportMenu:!0,children:[(0,n.jsx)(c.tU.Panel,{tabKey:ll.x.ChallengePreviousWeek,children:(0,n.jsx)(u.BU,{children:(0,n.jsx)(e6,{isCard:!0})})}),(0,n.jsxs)(c.tU.Panel,{tabKey:ll.x.ChallengeCurrentWeek,children:[(0,n.jsx)(ex,{}),(0,n.jsx)(li,{}),(0,n.jsx)(i.az,{bg:"surface.s1",children:(0,n.jsx)(eQ,{})}),!!e&&(0,n.jsx)(i.az,{position:"sticky",zIndex:"fixed",style:{bottom:e8.E+e8.M+8},children:(0,n.jsx)(i.az,{ms:"auto",me:"sm",my:"sm",w:"fit",children:(0,n.jsx)(ls,{})})})]}),(0,n.jsx)(c.tU.Panel,{tabKey:ll.x.Statistics,children:(0,n.jsx)(ej,{})})]})}function la(){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(i.so,{bg:"surface.s1",justify:"space-between",px:"lg",py:"lg",children:[(0,n.jsx)(c.H1,{textAlign:"center",textStyle:"display.large",my:"0",children:(0,n.jsx)(s.A,{id:"weekly_challenge"})}),(0,n.jsx)(i.az,{w:"xl",h:"xl",cursor:"pointer",children:(0,n.jsx)(e9,{})})]}),(0,n.jsx)(lr,{})]})}let ld=e=>{let{textId:l}=e;return(0,n.jsxs)(i.so,{gap:"sm",align:"center",children:[(0,n.jsx)(i.az,{br:"50%",h:"sm",w:"sm",bg:"primary.default"}),(0,n.jsx)(c.EY,{textStyle:"body.medium",children:(0,n.jsx)(s.A,{id:l})})]})};function lo(){let[e,l,t]=(0,eD.A)("seen-weekly-challenge",!1),[r,a]=(0,g.useState)(!1),{isUserLoggedIn:d,challengeEndTime:o,challengeStartTime:u}=(0,Y.A)(),{data:x,isLoading:h}=(0,eH.Z)(),m=o&&u&&x&&x.predictions.length&&x.predictions.find(e=>e.eventStartTimestamp>u&&e.eventStartTimestamp{e||!d||h||m||(l(!0),a(!0),(0,D.Ex)({type:"weekly_challenge_join",source:"other"}))},[d,h,x,m]);let p=e=>{(0,D.t9)({type:"weekly_challenge_join",action:e,source:"other"})};return t?(0,n.jsx)(c.aF,{isOpen:r,onClose:()=>{a(!1),p("close")},w:"[280px]",p:"lg",children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(i.so,{direction:"column",gap:"lg",children:[(0,n.jsx)(c.EY,{textStyle:"display.large",children:(0,n.jsx)(s.A,{id:"join_the_challenge"})}),(0,n.jsx)(i.so,{justify:"center",py:"sm",h:"[109px]",children:(0,n.jsx)(c._V,{style:{height:"93px"},src:"/static/images/weekly-challenge/trophies.svg",alt:""})}),(0,n.jsxs)(i.so,{direction:"column",gap:"lg",pl:"sm",children:[(0,n.jsx)(ld,{textId:"weekly_challenge_instruction_1"}),(0,n.jsx)(ld,{textId:"weekly_challenge_instruction_2"}),(0,n.jsx)(ld,{textId:"weekly_challenge_instruction_3"}),(0,n.jsx)(ld,{textId:"weekly_challenge_instruction_4"})]})]}),(0,n.jsx)(i.az,{pt:"lg",children:(0,n.jsx)(c.$n,{w:"100%",onClick:()=>{a(!1),p("cta_click")},children:(0,n.jsx)(s.A,{id:"ok_got_it_button"})})})]})}):null}var lc=t(22375),lu=t(37455),lx=t(49595),lh=t(42625),lg=t(82612);let lm=e=>!!e&&(0,lc.cK)(e);function lp(e){let{children:l}=e;return!function(){let{setIsDaily10xLoading:e,setDaily10xEvent:l}=(0,Y.A)(),t=(0,R.d4)(K.LQ),n=(0,R.d4)(N.$F),i=(0,R.d4)(lu.BF),s=(0,R.d4)(lx.j7),r=!t||eU.sJ.includes(t),a=lm(null==n?void 0:n.weeklyChallengeDailyBonusUsedAtTimestamp)||lm(null==s?void 0:s.timestamp),{newDaily10xEvent:d}=function(){let{eventIds:e}=(0,lg.A)(),[l,t]=(0,g.useState)(0),[n,i]=(0,g.useState)(null),s=null==e?void 0:e[l],r=s?w.bnp.details(s):null,{data:a}=(0,ec.Ay)(r);return(0,g.useEffect)(()=>{if(a){let n=a.event,s=eU.u_.includes(n.tournament.category.sport.slug),r=n.homeTeam.disabled||n.awayTeam.disabled;s&&(0,lh.bZ)(n)&&!r?i(n):e&&le+1)}},[a,l,e]),{newDaily10xEvent:n}}(),{data:o,isLoading:c}=(0,et.s3)(),u=null==o?void 0:o.rankings.find(e=>e.id===(null==n?void 0:n.id)),x=a?(null==u?void 0:u.currentDailyBonusEventId)||(null==s?void 0:s.eventId):void 0,{data:h,isLoading:m}=(0,ec.Ay)(x&&!i?w.bnp.details(x):null),p=c||m,j=i||!(null==n?void 0:n.id)||r;(0,g.useEffect)(()=>{if(j){l(void 0),e(!1);return}if(p)e(!0);else{if(h){l(h.event),e(!1);return}if(d&&!a){l(d),e(!1);return}e(!1)}},[p,j,i,h,d])}(),(0,n.jsx)(n.Fragment,{children:l})}function lj(e){let{children:l}=e,t=(0,W.hX)(),i=(0,R.d4)(N.$F),s=!t&&!!(null==i?void 0:i.id),{data:r}=(0,ec.Ay)(w.rGM.activeLeagueDetails()),{data:a}=(0,et.s3)(),[d,o]=(0,g.useState)(!0),[c,u]=(0,g.useState)(),x=new Date,h=a?1e3*a.league.endDateTimestamp:r&&1e3*r.meta.endDateTimestamp,m=a?1e3*a.league.startDateTimestamp:r&&1e3*r.meta.startDateTimestamp,p=h&&h(0,n.jsx)(ly,{})},82612:(e,l,t)=>{"use strict";t.d(l,{A:()=>d});var n=t(46787),i=t(494),s=t(45860),r=t(42625),a=t(27379);function d(){let e=(0,i.d4)(r.wH),{data:l,isLoading:t}=(0,s.Ay)(n.rGM.popularEvents()),{data:d,isLoading:o}=(0,a.Z)();return{eventIds:(null==l?void 0:l.events.length)?null==l?void 0:l.events.filter(l=>{var t;return(null==d||!d.predictions.length||!(null==d||null==(t=d.predictions)?void 0:t.find(e=>(null==e?void 0:e.eventId)===l)))&&!Object.keys(e).find(t=>{if(t!==l.toString())return!1;let n=e[+t];return(0,r.Q3)(n)})}):null,isLoading:t||o}}}},e=>{e.O(0,[56591,28446,83170,89153,24649,66022,42728,90636,46593,38792],()=>e(e.s=51057)),_N_E=e.O()}]);