/*! For license information please see 443.7b9cc5c542b3ed6b58f5.js.LICENSE.txt */ "use strict";(self.webpackChunkleaderboard=self.webpackChunkleaderboard||[]).push([[443,522],{1284:(e,r,a)=>{a.d(r,{A:()=>x,I:()=>S});var n=a(2565),t=a.n(n),o=a(3197),i=a.n(o),d=a(9411),l=a.n(d),s=a(8030),c=a(2058),u=a(9767),p=a(5893);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function f(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,n)}return a}function y(e){for(var r=1;r0&&void 0!==arguments[0]?arguments[0]:function(){},r=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=n.strName,d=n.strPrizePool,l=n.strMinimumBet,v=n.strGames,f=n.strStartLeaderboard,y=n.strEnd,S=n.strStatus,x=n.strLeaderBoard,O=n.strInprogress,C=n.strUpcoming,k=n.strFinished,A=null==l?void 0:l.concat(" ",r),W=function(e,r){return(0,p.jsxs)(I,{children:[(0,p.jsx)("span",{className:"firstName",children:n["str".concat(e[0])]}),e.length>1?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(g,{}),"+",(0,p.jsx)(h,{children:e.length-1}),(0,p.jsx)(L,{last:a.length>2&&a.length-1===r}),(0,p.jsx)(B,{last:a.length>2&&a.length-1===r,children:e.map((function(e){return n["str".concat(e)]})).slice(1).join(", ")})]}):null]})},_=function(e,r){return(0,p.jsx)(i(),{styles:e,status:r,children:(a=r,0===a?C:1===a?O:k)});var a},q=function(r){return(0,p.jsx)(t(),{onClick:function(){e(s.BASE_POPUP_NAMES.LEADER_BOARD,{leaderBoardId:r})}})};return{headers:c.tq?[S,"",o,d,A,v,f,y]:[o,d,A,v,f,y,S],body:(null==a?void 0:a.map((function(e,r){var a=e.id,n=e.name,t=e.prizePool,o=e.startDate,i=e.endDate,d=e.minBet,l=e.status,s=e.games;return!0===c.tq?{status:_(P,l),info:(0,p.jsx)(m,{children:q(a)}),name:(0,p.jsx)(b,{children:n}),prizePool:t,minBet:d,games:W(s,r),start:(0,u.w)(o,j),end:(0,u.w)(i,j)}:{name:(0,p.jsx)(b,{children:n}),prizePool:t,minBet:d,games:W(s,r),start:(0,u.w)(o,j),end:(0,u.w)(i,j),status:_(w,l),info:q(a)}})))||[],strLeaderBoard:x}},x=function(e,r){var a,n,t=r.strPosition,o=r.strPlayerId,i=r.strScore,d=r.strLeaders,l=r.strPrizes,s=r.strRules,c=r.strMe,u=[d,l,s];return{currentPlayer:y(y({},null!=e&&e.currentPlayerInfo&&Object.keys(e.currentPlayerInfo).length?e.currentPlayerInfo:{isWinPosition:!1,position:"-",score:"-"}),{},{id:c}),name:(null==e?void 0:e.name)||"",tabList:0===(null==e?void 0:e.status)||2===(null==e?void 0:e.status)?(u.shift(),u):u,players:{headers:[t,o,i],data:(null==e||null===(a=e.players)||void 0===a?void 0:a.map((function(r){var a,n,t=r.id,o=r.position,i=r.score,d=r.isWinPosition,l=r.playerNickName;return{position:o,id:(null==e||null===(a=e.currentPlayerInfo)||void 0===a?void 0:a.id)===t?c:l,score:i,isWinPosition:d,active:t===(null==e||null===(n=e.currentPlayerInfo)||void 0===n?void 0:n.id)}})))||[]},prizes:{headers:[t,l],data:(null==e||null===(n=e.prizes)||void 0===n?void 0:n.map((function(e){var r=e.id,a=e.placeFrom,n=e.placeTo,t=e.prize,o=e.currencyCode;return{id:r,position:a===n?a:"".concat(a,"-").concat(n),prize:"".concat(t," ").concat(o)}})))||[]},rules:(null==e?void 0:e.rules)||"",dataId:null==e?void 0:e.id}}},2058:(e,r,a)=>{a.d(r,{QY:()=>c,TG:()=>v,WG:()=>l,EY:()=>d,al:()=>o,xn:()=>i,tq:()=>p,Ix:()=>s,r:()=>f});var n=a(6606),t="https://nar-fg.cchhllpp.net/prd",o="".concat(t,"/images/leaderBoard/global/cupWithWings.png"),i="".concat(t,"/images/leaderBoard/global/header.png"),d="".concat(t,"/images/leaderBoard/global/goldenCup.png"),l="".concat(t,"/images/leaderBoard/global/goldenBranch.png"),s="".concat(t,"/images/leaderBoard/global/ribbon.png"),c={ActiveLeaderboardInfo:"ActiveLeaderboardInfo",LeaderboardPlayersListUpdate:"LeaderboardPlayersListUpdate",LeaderboardPlayerScoreUpdate:"LeaderboardPlayerScoreUpdate",LeaderboardInfo:"LeaderboardInfo",LeaderboardHistory:"LeaderboardHistory",LeaderboardStart:"LeaderboardStart",LeaderboardFinish:"LeaderboardFinish",LeaderboardPlayerWin:"LeaderboardPlayerWin",UpcomingLeaderboards:"UpcomingLeaderboards"},u=(0,n.getTypedParamsFromURL)()||{},p=u.isMobile,v=u.culture,f=u.token},9767:(e,r,a)=>{a.d(r,{J:()=>i,w:()=>o});var n=a(9801),t=a.n(n),o=function(e,r){return t().utc(e).local().format(r)},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return"string"==typeof e?e.replace(/\B(?=(\d{3})+(?!\d))/g," "):e.toString().replace(/\B(?=(\d{3})+(?!\d))/g," ")}},2522:(e,r,a)=>{a.r(r),a.d(r,{actionCreators:()=>d,actions:()=>g,leadBoardSliceReducer:()=>h,selectActiveLeaderBoard:()=>u,selectActiveLeaderBoardId:()=>p,selectCurrencyId:()=>m,selectCurrentLeaderBoard:()=>c,selectCurrentPlayerInfo:()=>s,selectFeatureHubIsConnected:()=>b,selectLeaderBoardPlayerWin:()=>f,selectLeaderboardHistory:()=>v,selectResources:()=>y});var n=a(1254),t={showLeaderBoard:!1,playerWin:[],activeLeaderBoard:{currentPlayerInfo:{},id:null,name:"",players:[]},currentLeaderBoard:{currentPlayerInfo:{},id:null,status:"",name:"",players:[],prizes:[{id:0,placeFrom:1,placeTo:2,prize:0,currencyCode:""}],rules:""},leaderBoardHistory:[]};function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,r){if(e){if("string"==typeof e)return i(e,r);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?i(e,r):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,r){(null==r||r>e.length)&&(r=e.length);for(var a=0,n=new Array(r);a0&&void 0!==arguments[0]?arguments[0]:t).services)||void 0===e||null===(e=e.leaderBoard)||void 0===e?void 0:e.currentPlayerInfo},c=function(){var e;return null===(e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:t).services)||void 0===e||null===(e=e.leaderBoard)||void 0===e?void 0:e.currentLeaderBoard},u=function(){var e;return null===(e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:t).services)||void 0===e||null===(e=e.leaderBoard)||void 0===e?void 0:e.activeLeaderBoard},p=function(){var e;return null===(e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:t).services)||void 0===e||null===(e=e.leaderBoard)||void 0===e?void 0:e.activeLeaderBoard.id},v=function(){var e;return null===(e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:t).services)||void 0===e||null===(e=e.leaderBoard)||void 0===e?void 0:e.leaderBoardHistory},f=function(){var e;return null===(e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:t).services)||void 0===e||null===(e=e.leaderBoard)||void 0===e?void 0:e.playerWin},y=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:t).resources},m=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:t).partnerInfo.currencyId},b=function(){var e;return null===(e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:t).services.connection)||void 0===e||null===(e=e.isConnected)||void 0===e?void 0:e.features},g=l.actions,h=l.reducer},5251:(e,r,a)=>{var n=a(8416),t=Symbol.for("react.element"),o=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,d=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function s(e,r,a){var n,o={},s=null,c=null;for(n in void 0!==a&&(s=""+a),void 0!==r.key&&(s=""+r.key),void 0!==r.ref&&(c=r.ref),r)i.call(r,n)&&!l.hasOwnProperty(n)&&(o[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===o[n]&&(o[n]=r[n]);return{$$typeof:t,type:e,key:s,ref:c,props:o,_owner:d.current}}r.Fragment=o,r.jsx=s,r.jsxs=s},5893:(e,r,a)=>{e.exports=a(5251)}}]);