"use strict";(self.webpackChunklauncher=self.webpackChunklauncher||[]).push([[3317,9904],{9904:(e,t,n)=>{n.r(t),n.d(t,{BASE_POPUP_NAMES:()=>c,BaseHubMethodNames:()=>r,BaseHubRequests:()=>i,BaseHubResponseModels:()=>s,types:()=>o,useBaseRequests:()=>a});var o={string:"",number:0,array:[],object:{},bool:!1,date:new Date},r={Ping:"Ping",GetBalance:"GetBalance",GetInitialState:"GetInitialState",GetInitialStateGameTickets:"GetInitialStateGameTickets",GetInitialStateHistory:"GetInitialStateHistory",GetInitialStateMaxWinners:"GetInitialStateMaxWinners",GetInitialStateLeaders:"GetInitialStateLeaders",GetInitialStateGameResults:"GetInitialStateGameResults",GetInitialStateStatistics:"GetInitialStateStatistics",GetInitialStateCashBackInfo:"GetInitialStateCashBackInfo",GetInitialStateLastRoundTickets:"GetInitialStateLastRoundTickets",GenerateHashCode:"GenerateHashCode",History:"History",BonusHistory:"BonusHistory",BonusInfo:"BonusInfo",BonusNotify:"BonusNotify",Error:"Error",LogOutPlayer:"LogOutPlayer",ExpiredToken:"ExpiredToken",Deactivated:"Deactivated",UpdateWinners:"UpdateWinners",GetMaxWinners:"GetMaxWinners",ActiveLeaderboardInfo:"ActiveLeaderboardInfo",LeaderboardPlayersListUpdate:"LeaderboardPlayersListUpdate",LeaderboardPlayerScoreUpdate:"LeaderboardPlayerScoreUpdate",LeaderboardInfo:"LeaderboardInfo",LeaderboardHistory:"LeaderboardHistory",LeaderboardStart:"LeaderboardStart",LeaderboardFinish:"LeaderboardFinish",LeaderboardPlayerWin:"LeaderboardPlayerWin",UpcomingLeaderboards:"UpcomingLeaderboards",GetLeaderBoard:"GetLeaderBoard"},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;return{Ping:function(){this.name=r.Ping,this.model={version:e}},GetBalance:function(t){var n=t.token,o=void 0===n?0:n;this.name=r.GetBalance,this.model={version:e,token:o}},GetInitialState:function(t){var n=t.activeGameId,o=void 0===n?0:n,i=t.token,a=void 0===i?"":i,s=t.isDemo,c=void 0!==s&&s,u=t.partnerId,l=void 0===u?0:u,d=t.culture,f=void 0===d?"":d;this.name=r.GetInitialState,this.model={version:e,activeGameId:o,token:a,isDemo:c,partnerId:l,culture:f}},GetLeaderBoard:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.name=r.ActiveLeaderboardInfo,this.model=e},GenerateHashCode:function(t){var n=t.key,o=void 0===n?"":n,i=t.salt,a=void 0===i?"":i;this.name=r.GenerateHashCode,this.model={version:e,key:o,salt:a}},History:function(t){var n=t.token,o=void 0===n?"":n;this.name=r.History,this.model={version:e,token:o}},BonusHistory:function(t){var n=t.token,o=void 0===n?"":n;this.name=r.BonusHistory,this.model={version:e,token:o}},BonusInfo:function(t){var n=t.token,o=void 0===n?"":n,i=t.activeGameId,a=void 0===i?0:i;this.name=r.BonusInfo,this.model={version:e,token:o,activeGameId:a}},GetMaxWinners:function(t){var n=t.activeGameId,o=void 0===n?0:n,i=t.partnerId,a=void 0===i?"":i,s=t.token,c=void 0===s?"":s;this.name=r.GetMaxWinners,this.model={version:e,activeGameId:o,partnerId:a,token:c}}}};function a(e,t,n){var o=i(n),r=e||{},a=r.token,s=r.activeGameId,c=r.isDemo,u=r.partnerId,l=r.culture;return{getPing:function(){var e=new o.Ping;t(e)},getHashCode:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=new o.GenerateHashCode({key:e,salt:n});t(r)},getBetHistory:function(){var e=new o.History({token:a});t(e)},getBonusHistory:function(){var e=new o.BonusHistory({token:a});t(e)},getBonusInfo:function(){var e=new o.BonusInfo({token:a,activeGameId:s});t(e)},getInitialState:function(){var e=new o.GetInitialState({activeGameId:s,token:a,isDemo:c,partnerId:u,culture:l});t(e)},getMaxWinners:function(){var e=new o.GetMaxWinners({activeGameId:s,partnerId:u,token:a});t(e)}}}var s={Ping:{},GetInitialStateCashBackInfo:{id:0,fillPercentage:0,boxCount:0,boxAmounts:[]},GetBalance:{balance:0},GenerateHashCode:{hashCode:""},BonusHistory:{bonusHistory:[{type:"string",quantity:0,bet:0,date:"1 January, 1970, 00:00:00 UTC",expireDate:"1 January, 1970, 00:00:00 UTC",totalWin:0}]},ActiveLeaderboardInfo:{leaderBoard:[{}]},LeaderboardPlayersListUpdate:{leaderBoard:[{}]},LeaderboardPlayerScoreUpdate:{leaderBoard:[{}]},LeaderboardInfo:{leaderBoard:[{}]},LeaderboardHistory:{leaderBoard:[{}]},LeaderboardStart:{leaderBoard:[{}]},LeaderboardFinish:{leaderBoard:[{}]},LeaderboardPlayerWin:{leaderBoard:[{}]},BonusInfo:{bonuses:[{id:0,remainingCount:0,remainingBet:0,bet:0,expireDate:"1 January, 1970, 00:00:00 UTC",type:""}]},BonusNotify:{id:0,bet:0,count:0,expireDate:"1 January, 1970, 00:00:00 UTC",type:""},Error:{},LogOutPlayer:{},ExpiredToken:{isExpired:!1,token:""},Deactivated:{partnerIds:[]}},c=Object.freeze({RULES:"Rules",CHECK_HASH_CODE:"CheckHashCode",ABOUT_HASH_CODE:"AboutHashCode",GAME_CONTROLS:"GameControls",BONUS_LIST:"BonusListPopup",KEYBOARD:"Keyboard",GLOBAL_HISTORY:"GlobalHistory",GLOBAL_BONUS_HISTORY:"GlobalBonusHistory",CASH_BACK:"CashBackPopup",KEYBOARD_MINES:"KeyboardMines",MENU:"Menu",MAIN_MENU:"MainMenu",LEADER_BOARD:"LeaderBoard",LEADER_BOARD_HISTORY:"LeaderBoardHistory",BONUS_ASIDE:"BonusAside",CHAT_POPUP:"ChatPopup",CHAT_REGISTRY_POPUP:"ChatRegistryPopup"})},3317:(e,t,n)=>{n.r(t),n.d(t,{actions:()=>he,condintionallyUpdateAfterFinishStateAsync:()=>me,conditionallySetCoefficientIfExists:()=>be,default:()=>ke,gameSlice:()=>j,selectActiveLeaderBoardId:()=>N,selectAnimationData:()=>W,selectAnimationDataV2:()=>_,selectAutoBetPopupData:()=>ye,selectBetPartData:()=>E,selectBetPartsWins:()=>ve,selectBonuses:()=>i.selectBonuses,selectChatConfigs:()=>i.selectChatConfigs,selectChatIsActive:()=>i.selectChatIsActive,selectCoinRate:()=>i.selectCoinRate,selectCrashGameData:()=>Ie,selectCurrencyId:()=>i.selectCurrencyId,selectCurrencyInfo:()=>i.selectCurrencyInfo,selectCurrentGameTypeName:()=>le,selectDailyLeaders:()=>V,selectDataLoaded:()=>i.selectDataLoaded,selectDurationData:()=>F,selectFallBackInfo:()=>ue,selectGameCoefficient:()=>fe,selectGameDuration:()=>z,selectGameId:()=>i.selectGameId,selectGameSecond:()=>q,selectGameStatus:()=>J,selectGameTypeNames:()=>de,selectGlobalBonusHistory:()=>i.selectGlobalBonusHistory,selectGlobalHistory:()=>i.selectGlobalHistory,selectHistory:()=>ae,selectHubIsConnected:()=>i.selectHubIsConnected,selectIsChatOpened:()=>i.selectIsChatOpened,selectLeaders:()=>ie,selectLeftPaneData:()=>R,selectMinMaxBetWin:()=>i.selectMinMaxBetWin,selectMonthlyLeaders:()=>$,selectNotifications:()=>i.selectNotifications,selectPing:()=>i.selectPing,selectPixiData:()=>Z,selectPlayerBalance:()=>i.selectPlayerBalance,selectPlayerHashCode:()=>Q,selectPlayerStakes:()=>Y,selectPopups:()=>i.selectPopups,selectPrecision:()=>i.selectPrecision,selectProgressData:()=>U,selectQuickBets:()=>i.selectQuickBets,selectReloadSite:()=>K,selectReportBoxData:()=>M,selectResources:()=>i.selectResources,selectResults:()=>re,selectRightPaneData:()=>H,selectRoundTicketsCountData:()=>ce,selectSettings:()=>i.selectSettings,selectSortedTickets:()=>oe,selectStatistics:()=>se,selectTicketListHeaderData:()=>ee,selectTicketListItemData:()=>te,selectTickets:()=>X,shallowSelector:()=>ge});var o=n(1254),r=n(5694),i=n(613),a=n(4281),s=n(6345),c=n(1100),u=n.n(c),l=n(3665);const d={setInitialState:function(e,t){var n=t.payload,o=n.gameInfo,r=o.duration,i=o.second,a=o.isGameFinished,c=n.partnerInfo,d=c.coinRate,f=c.currencyId,I=c.precision,p=c.minBet,m=c.maxBet,b=c.maxWin,y=c.defaultBet,v=c.quickBets,g=c.partnerInstanceName,h=n.historyTickets,k=n.tickets,S=n.results,B=n.leaders,w=n.statistics,C=i>0?s.GameStatus.InProcess:s.GameStatus.Countdown,O=C===s.GameStatus.InProcess?0:-Math.ceil(i);"Crasher"===l.GZ&&(O=(O=(C=i>0&&!a?s.GameStatus.InProcess:s.GameStatus.Countdown)===s.GameStatus.InProcess?0:-Math.ceil(i))<0?r:O),null===u()||void 0===u()||u().setItem("shared_crash_status",C),null!==u()&&void 0!==u()&&u().getItem("shared_crash_status")||(e.gameInfo.status=C),e.isDataLoaded=!0,e.animationToggle="Crasher"!==l.GZ,e.partnerInfo.coinRate=d,e.partnerInfo.currencyId=e.playerInfo.isDemo?"Fun":f,e.partnerInfo.precision=I,e.partnerInfo.minBet=p,e.partnerInfo.maxBet=m,e.partnerInfo.maxWin=b,e.partnerInfo.defaultBet=y,e.partnerInfo.quickBets=v,e.partnerInfo.partnerInstanceName=g,e.gameInfo.duration=r,e.gameInfo.second=O,e.tickets=k||[],e.history=(null==h?void 0:h.filter((function(e){var t,n;return null!==e.win&&null!==(null===(t=e.betInfo[0])||void 0===t?void 0:t.win)&&null!==(null===(n=e.betInfo[1])||void 0===n?void 0:n.win)})))||[],e.results=S||[],e.leaders=B||[],e.statistics=w||[],e.playerInfo.demoGamesCount=0},setIsDisconected:function(e){e.playerInfo.stakes.forEach((function(e){e.pressed=!1,e.pending=null,e.current=null})),e.gameInfo.second=0,e.gameInfo.coefficient=0,e.gameInfo.status=s.GameStatus.Loading},setInitialStateSharedTickets:function(e,t){var n=t.payload.tickets,o=null===u()||void 0===u()?void 0:u().getItem("shared_crash_status");if(o&&(e.gameInfo.status=o),!n.length){var r=null===u()||void 0===u()?void 0:u().getItem("pending_autobet_0"),i=Date.now();if(r){var a=JSON.parse(r);i-a.time>6e5?(null===u()||void 0===u()||u().removeItem("pending_autobet_0"),null===u()||void 0===u()||u().removeItem("autobet_count_0")):e.playerInfo.stakes[0].pending=a}var s=null===u()||void 0===u()?void 0:u().getItem("pending_autobet_1");if(s){var c=JSON.parse(s);i-c.time>6e5?(null===u()||void 0===u()||u().removeItem("pending_autobet_1"),null===u()||void 0===u()||u().removeItem("autobet_count_1")):e.playerInfo.stakes[1].pending=c}}},setInitialStateLastRoundTickets:function(e,t){var n=t.payload.tickets;e.lastRoundTickets=n}};var f=n(6606);function I(e){return I="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},I(e)}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function m(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,o=new Array(t);n0&&!s.every((function(e){return e.win}))){var c=function(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=o.stakeId,i=o.autoCashout,a=o.betInfo,s=(n=2,function(e){if(Array.isArray(e))return e}(t=void 0===a?[]:a)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,s=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);c=!0);}catch(e){u=!0,r=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(t,n)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=s[0],u=s[1],l=null;return i0}));d&&(d.pressed=!1,d.current.win=2===i?s:(null===(c=a[1])||void 0===c?void 0:c.win)||(null===(u=a[0])||void 0===u?void 0:u.win),e.gameInfo.sharedBigWinCoefficient=o?+a[0].coefficient>o?+a[0].coefficient:o:+a[0].coefficient,v(d.current.betInfo,r))}r.betInfo.forEach((function(e){t.betInfo.forEach((function(t){t.stakeInfoId===e.stakeInfoId&&(t.bet=e.bet,t.coefficient=e.coefficient,t.win=e.win,t.winCoin=e.winCoin)}))}))}}))},setFinishRoundState:function(e,t){var n=t.payload,o=n.gameId,r=n.coefficient;if(e.gameInfo.gameId===o){e.gameInfo.status=s.GameStatus.Loading,e.gameInfo.second=e.gameInfo.duration,e.gameInfo.seconds=0,e.gameInfo.coefficient=r.toFixed(2),e.gameInfo.pixiGameFinish=!0,e.gameInfo.pixiGameStart=!1;var i=!1;e.tickets.forEach((function(t){t.betInfo.forEach((function(e){e.win=e.win||0})),t.playerId===+l.QW&&(e.history.unshift(m(m({},t),{},{gameId:o})),i=!0)})),i&&e.playerInfo.demoGamesCount++,e.playerInfo.stakes.forEach((function(e){var t;null===(t=e.current)||void 0===t||null===(t=t.betInfo)||void 0===t||t.forEach((function(e){null!==e.win&&void 0!==e.win||(e.win=0)}))}))}else console.log("Wrong GameId invoked in Finish Round")},cleanBoard:function(e){e.playerInfo.stakes.forEach((function(e){!function(e){e.current&&e.current.isAutoBet&&(e.pending=e.current,e.pending.stakeId=null,e.pending.betInfo.forEach((function(e){e.coefficient=null,e.win=null}))),e.current=null}(e)})),e.gameInfo.status=s.GameStatus.Loading,e.tickets=[]}};var h=n(4439),k=n(5192);function S(e){return S="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},S(e)}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n0&&!i?s.GameStatus.InProcess:s.GameStatus.Countdown;e.gameInfo.gameId=a,e.gameInfo.duration=o,e.gameInfo.status=c;var u=c===s.GameStatus.InProcess?0:-Math.round(r);e.gameInfo.second=u<0?o:u},setPlayerPressed:function(e,t){var n=t.payload,o=n.pressed,r=n.index,i=n.halfPressed;e.playerInfo.stakes[r].halfPressed=i,e.playerInfo.stakes[r].pressed=o},disableBetPart:function(e,t){var n=t.payload,o=n.index,r=n.isDisabled;e.playerInfo.stakes[o].isDisabled=r},addPendingStake:function(e,t){var n=t.payload,o=n.bet,r=n.combination,i=n.betType,a=n.bonusId,s=n.autoBet,c=r.index,d=e.playerInfo.stakes[c];if(d.pending||(d.pending={}),d.pending.stakeId=null,d.pending.bet=o,d.pending.betInfo=[{stakeInfoId:null,bet:o/2,coefficient:null,win:null},{stakeInfoId:null,bet:o/2,coefficient:null,win:null}],d.pending.betType=i,d.pending.combination=r,d.pending.autoCashout=r.autoCashout,d.pending.isAutoBet=r.isAutoBet,d.pending.autoBet=s,d.pending.bonusId=a,s>0&&r.isAutoBet&&!l.xf){var f=(new Date).getTime();null===u()||void 0===u()||u().setItem("pending_autobet_".concat(c),JSON.stringify(C(C({},d.pending),{},{time:f})))}d.current=null},movePendingToCurrentStake:function(e,t){var n,o,r,i,a=t.payload.index,s=e.externalAutoPlayOptions[a],c=s.totalLose,u=s.totalWin,d=s.singleWin,f=s.wins,I=s.bets,p=s.singleTotalWin,m=e.playerInfo.stakes[a];"Maestro"===l.GZ&&(c.checked&&c.number<=I-f||u.checked&&u.number<=f||d.checked&&d.number<=p)&&(m.pending=null,m.current=null),null!==(n=m.current)&&void 0!==n&&n.isAutoBet&&(null===(o=m.current)||void 0===o?void 0:o.autoBet)>0&&(m.pending=(0,h.cloneDeep)(m.current),m.pending.stakeId=null,null===(i=m.pending)||void 0===i||i.betInfo.forEach((function(e){e&&(e.stakeInfoId=null,e.coefficient=null,e.win=null)}))),null!==(r=m.current)&&void 0!==r&&null!==(r=r.betInfo)&&void 0!==r&&r.every((function(e){return e.win>0}))&&(m.current=null)},clearStake:function(e,t){var n=t.payload.index,o=e.playerInfo.stakes[n];o.pressed=!1,o.pending=null,o.current=null},addDemoTicket:function(e,t){var n,o=t.payload.index,r=e.playerInfo.stakes[o];if(e.playerInfo.balance-((null===(n=r.pending)||void 0===n?void 0:n.bet)||0)<0)return r.current=null,r.pending=null,void(e.services.notifications.list=[C({guid:1},(0,f.getNotificationById)(e.resources,4))]);var i={stakeId:++e.playerInfo.demoStakeId,playerId:l.QW,isDemo:!0,betInfo:[{stakeInfoId:++e.playerInfo.demoStakeInfoId,bet:r.pending.bet/2,win:null,coefficient:null},{stakeInfoId:++e.playerInfo.demoStakeInfoId,bet:r.pending.bet/2,win:null,coefficient:null}],currencyId:e.partnerInfo.currencyId};if((0,l.Az)(e.tickets,i),e.tickets=(0,l.q)(e.tickets),r.current=(0,h.cloneDeep)(r.pending),r.current){r.current.stakeId=i.stakeId;var a=r.current.autoBet-1>0;r.current.betInfo=i.betInfo,r.current.isAutoBet=a,r.current.autoBet=a?r.current.autoBet-1:0,r.current.win=null}r.pending=null,e.playerInfo.balance=(0,f.subtractWithPrecision)(e.playerInfo.balance,r.current.bet,e.partnerInfo.precision)},addMyTicket:function(e,t){var n=t.payload,o=n.balance,r=n.stakeId,i=n.bet,a=n.betInfo,s=n.betType,c=n.winType,d=n.index,f=n.currencyId,I=n.bonusInfo,p=e.playerInfo.stakes[d],m={stakeId:r,playerId:l.QW,bet:i,betType:s,betInfo:a.map((function(e){return{stakeInfoId:e.stakeInfoId,bet:e.bet,win:null,coefficient:null}})),win:null,currencyId:f||e.partnerInfo.currencyId};if(p.pressed=!1,!p.pending&&null!==u()&&void 0!==u()&&u().getItem("pending_autobet_".concat(d))&&(p.pending=JSON.parse(null===u()||void 0===u()?void 0:u().getItem("pending_autobet_".concat(d)))),p.current=(0,h.cloneDeep)(p.pending),p.current){var b,y=p.current.autoBet-1>0;if(p.current.stakeId=r,p.current.bet=a.reduce((function(e,t){return e+t.bet}),0),p.current.betInfo=a,p.current.isAutoBet=y,p.current.autoBet=y?p.current.autoBet-1:0,p.current.winType=c,p.current.win=null,y&&!l.xf){var v=Date.now();null===u()||void 0===u()||u().setItem("pending_autobet_".concat(d),JSON.stringify(C(C({},p.current),{},{bonusId:null==I?void 0:I.id,time:v})))}else null===u()||void 0===u()||u().removeItem("autobet_count_".concat(d)),null===u()||void 0===u()||u().removeItem("pending_autobet_".concat(d));l.xf||(null===u()||void 0===u()?void 0:u().getItem("pending_autobet_".concat(d)))&&(null===u()||void 0===u()||u().setItem("autobet_count_".concat(d),JSON.stringify({stakeId:r,autoBet:null===(b=p.current)||void 0===b?void 0:b.autoBet})))}p.pending=null,e.playerInfo.balance=o,(0,l.Az)(e.tickets,m),e.tickets=(0,l.q)(e.tickets)},addOtherTicket:function(e,t){var n=t.payload.otherTicket,o=n.stakeId,r=n.partnerPlayerId,i=n.betInfo,a=n.betType,s=n.currencyId,c={stakeId:o,playerId:n.playerId,partnerPlayerId:r,betInfo:i.map((function(e){return{stakeInfoId:e.stakeInfoId,bet:e.bet,betCoin:e.betCoin,win:null,coefficient:null}})),betType:a,currencyId:s};(0,l.Az)(e.tickets,c)},addOtherTicketsByInterval:function(e,t){t.payload.otherTickets.forEach((function(t){var n=t.stakeId,o=t.partnerPlayerId,r=t.bet,i=t.betCoin,a=t.betInfo,s=t.betType,c=t.currencyId,u={stakeId:n,playerId:t.playerId,partnerPlayerId:o,bet:r,betCoin:i,betInfo:a.map((function(e){return{stakeInfoId:e.stakeInfoId,bet:e.bet,betCoin:e.betCoin,win:null,coefficient:null}})),betType:s,currencyId:c};(0,l.Az)(e.tickets,u),e.tickets.push(u)})),e.tickets=(0,l.q)(e.tickets)},cashoutDemoTicket:function(e,t){var n=t.payload,o=n.index,r=n.cashoutType,i=e.playerInfo.stakes[o],a=e.gameInfo.coefficient,s=[];switch(i.pressed=!1,r){case k.AS.Partial:s=[i.current.betInfo[0]];break;case k.AS.Full:s=i.current.betInfo;break;case k.AS.FullAfterPartial:s=[i.current.betInfo[1]]}1!==r&&(e.gameInfo.betInfoFullCashouts[o]=!0);var c=0;s.forEach((function(e){var t=+(0,f.multiplyWithPrecision)(a,e.bet);e.coefficient=a,e.win=t,c+=t})),i.current.win=c,e.tickets.forEach((function(e){e.stakeId===i.current.stakeId&&(e.win=2===r?c:i.current.betInfo[0].win,s.forEach((function(t){var n,o=null===(n=e.betInfo)||void 0===n?void 0:n.find((function(e){return e.stakeInfoId===t.stakeInfoId}));o&&(o.bet=t.bet,o.coefficient=t.coefficient,o.win=t.win)})))}));var u=s.reduce((function(e,t){return e+t.win}),0);e.playerInfo.balance=(0,f.sumWithPrecision)(e.playerInfo.balance,u,e.partnerInfo.precision)},cashoutMyTicket:function(e,t){var n=t.payload,o=n.index,r=n.stopStakeResult,i=e.playerInfo.stakes[o],a=e.gameInfo.sharedBigWinCoefficient;if(r){var s=r.betInfo,c=r.win,u=r.stakeId,l=r.cashoutType;i.current.win=2===l?c:s[0].win,1!==l&&(e.gameInfo.betInfoFullCashouts[o]=!0),e.gameInfo.sharedBigWinCoefficient=a?+s[0].coefficient>a?+s[0].coefficient:a:+s[0].coefficient;var d=[];i.pressed=!1,s.forEach((function(e){var t,n=null===(t=i.current.betInfo)||void 0===t?void 0:t.find((function(t){return t.stakeInfoId===e.stakeInfoId}));n&&(n.bet=e.bet,n.coefficient=e.coefficient,n.win=e.win)})),d=i.current.betInfo,e.tickets.forEach((function(e){e.stakeId===u&&(e.win=2===l?c:s[0].win,d.forEach((function(t){var n,o=null===(n=e.betInfo)||void 0===n?void 0:n.find((function(e){return e.stakeInfoId===t.stakeInfoId}));o&&(o.bet=t.bet,o.coefficient=t.coefficient,o.win=t.win)})))}))}},cancelMyTicket:function(e,t){var n,o,r,i=t.payload,a=i.index,s=i.stakeId,c=e.playerInfo.stakes[a];l.xf&&(s=(null===(n=c.current)||void 0===n?void 0:n.stakeId)||(null===(o=c.pending)||void 0===o?void 0:o.stakeId),e.playerInfo.balance=(0,f.sumWithPrecision)(e.playerInfo.balance,(null===(r=c.current)||void 0===r?void 0:r.bet)||0,e.partnerInfo.precision)),c.pressed=!1,c.pending=null,c.current=null,e.tickets=e.tickets.filter((function(e){return e.stakeId!==s}))},cancelAutoBetData:function(e,t){var n=t.payload.index,o=e.playerInfo.stakes[n];o.current=C(C({},o.current),{},{autoBet:0,isAutoBet:!1}),o.pending=null},cancelOtherTicket:function(e,t){var n=t.payload.stakeId;e.tickets=e.tickets.filter((function(e){return e.stakeId!==n}))},updateStopAutoBets:function(e){e.playerInfo.stakes.forEach((function(e){e.pressed||(e.pressed=!1,e.pending=null),e.current&&(e.current.isAutoBet=!1,e.current.autoBet=0)}))},setExternalAutoPlayOptions:function(e,t){var n=t.payload,o=n.index,r=n.data;e.externalAutoPlayOptions[o]=C(C({},l._y),r)},updateExternalOptions:function(e,t){var n=t.payload,o=n.index,r=n.name,i=n.value;e.externalAutoPlayOptions[o][r]+=i},resetExternalOptions:function(e,t){var n=t.payload.index;e.externalAutoPlayOptions[n]=C({},l._y)},setBetPartsWins:function(e,t){var n,o=t.payload,r=o.index,i=o.data,a=e.betPartsWins.filter((function(e){return e.index!==r}));e.betPartsWins=[C({},i)].concat(function(e){if(Array.isArray(e))return B(e)}(n=a)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(e,t):void 0}}(n)||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.")}())},removeWinPopupByIndex:function(e,t){var n=t.payload;e.betPartsWins=e.betPartsWins.filter((function(e){return e.index!==n}))}};function G(e){return G="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},G(e)}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n0||e.betInfo[1].win>0)})).length)||0,I=e.services.settings,p=I.isAnimate,m=I.sound,b=I.music,y=(0,i.selectChatIsActive)(e),v=(0,i.selectNewMessageNotify)(e);return{isAnimate:p,sound:m,music:b,duration:e.gameInfo.duration,cashedout1:(null===(o=c[0])||void 0===o?void 0:o.win)>0&&(null===(r=c[1])||void 0===r?void 0:r.win)>0,cashedout2:(null===(a=u[0])||void 0===a?void 0:a.win)>0&&(null===(s=u[1])||void 0===s?void 0:s.win)>0,status:e.gameInfo.status,second:e.gameInfo.second,coefficient:e.gameInfo.coefficient,playersCount:d,cashoutsCount:f,resultsList:e.results,resources:"string"==typeof e.resources?JSON.parse(e.resources||"{}"):e.resources,chatIsActive:y,newMessageNotify:v}},_=function(e,t){var n,o,r,a,s,c,u=(null===(n=e.playerInfo.stakes[0])||void 0===n||null===(n=n.current)||void 0===n?void 0:n.betInfo)||[],l=(null===(o=e.playerInfo.stakes[1])||void 0===o||null===(o=o.current)||void 0===o?void 0:o.betInfo)||[],d=e.tickets,f=(null==d?void 0:d.filter((function(e){return!e.isDemo})).length)||0,I=(null==d?void 0:d.filter((function(e){return!e.isDemo&&(e.betInfo[0].win>0||e.betInfo[1].win>0)})).length)||0,p=e.services.settings,m=p.isAnimate,b=p.sound,y=p.music,v=(0,i.selectChatIsActive)(e),g=(0,i.selectNewMessageNotify)(e),h={isAnimate:m,sound:b,music:y,duration:e.gameInfo.duration,cashedout1:(null===(r=u[0])||void 0===r?void 0:r.win)>0&&(null===(a=u[1])||void 0===a?void 0:a.win)>0,cashedout2:(null===(s=l[0])||void 0===s?void 0:s.win)>0&&(null===(c=l[1])||void 0===c?void 0:c.win)>0,status:e.gameInfo.status,second:e.gameInfo.second,coefficient:e.gameInfo.coefficient,playersCount:f,cashoutsCount:I,resultsList:e.results,resources:"string"==typeof e.resources?JSON.parse(e.resources||"{}"):e.resources,chatIsActive:v,newMessageNotify:g},k={};return t?t.forEach((function(e){k[e]=h[e]})):k=h,k},M=function(e){return{status:e.gameInfo.status,coefficient:e.gameInfo.coefficient,isAnimate:e.services.settings.isAnimate}},F=function(e){return{duration:e.gameInfo.duration,second:e.gameInfo.second}},U=function(e){var t,n;return{status:e.gameInfo.status,duration:e.gameInfo.duration,second:e.gameInfo.second,strPlaceYourBets:(null===(t=e.resources)||void 0===t?void 0:t.strPlaceYourBets)||"_PLACE YOUR BETS",strBetsAreClosed:(null===(n=e.resources)||void 0===n?void 0:n.strBetsAreClosed)||"_BETS ARE CLOSED"}},Z=function(e){return{status:e.gameInfo.status,duration:e.gameInfo.duration,second:e.gameInfo.second,finish:e.gameInfo.pixiGameFinish,start:e.gameInfo.pixiGameStart}},J=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).gameInfo.status},q=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).gameInfo.second},z=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).gameInfo.duration},K=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).reloadSite},Y=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).playerInfo.stakes},Q=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).playerInfo.hashCode},V=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).leadersDaily},$=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).leadersMonthly},X=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).tickets},ee=function(e){var t=e.partnerInfo,n=e.resources;return{currencyId:t.currencyId,resources:n}},te=function(e,t){var n=e.partnerInfo;return x({coinRate:n.coinRate,precision:n.precision,itemData:e.tickets.find((function(e){return e.betInfo[0].stakeInfoId===t}))},ee(e))},ne=function(e){return(null==e?void 0:e.sort((function(e,t){return t.betInfo[0].betCoin+t.betInfo[1].betCoin-e.betInfo[0].betCoin-e.betInfo[1].betCoin})))||[]},oe=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z,n=[],o=[];return null===(e=t.tickets)||void 0===e||e.forEach((function(e){e.playerId===+l.QW?n.push(e):o.push(e)})),ne(n),ne(o),[].concat(n,o)},re=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).results},ie=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).leaders},ae=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).history},se=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).statistics},ce=function(e){return function(t){var n,o=oe(t);return"playersCount"===e?n=(null==o?void 0:o.filter((function(e){return!e.isDemo})).length)||0:"cashoutsCount"===e&&(n=(null==o?void 0:o.filter((function(e){return!e.isDemo&&(e.betInfo[0].win>0||e.betInfo[1].win>0)})).length)||0),n}},ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z;return{isDataLoaded:e.isDataLoaded,isDisconnected:e.playerInfo.isDisconnected,isExpired:e.playerInfo.isExpired,underConstruction:e.underConstruction}},le=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).partnerInfo.gameTypeName},de=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).partnerInfo.gameTypeNames},fe=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).gameInfo.coefficient},Ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z;return{isDataLoaded:e.isDataLoaded,gameStatus:e.gameInfo.status,stakes:e.playerInfo.stakes,isDisconnected:e.playerInfo.isDisconnected,balance:e.playerInfo.balance,minBet:e.partnerInfo.minBet,maxBet:e.partnerInfo.maxBet,music:e.services.settings.music,sound:e.services.settings.sound,resources:e.resources,hubConnected:(0,i.selectHubIsConnected)(e),token:e.playerInfo.token}},pe=null,me=function(e){return function(t){pe&&clearTimeout(pe),pe=setTimeout((function(){t(he.cleanBoard())}),e)}},be=function(e){var t=e.gameId,n=e.coefficient,o=e.seconds;return function(e,r){var a=(0,i.selectGameId)(r());a&&e(a===t?he.setCoefficient({coefficient:n,seconds:o}):he.reloadSite())}},ye=function(e){var t=e.resources,n=e.partnerInfo,o=e.playerInfo,r=t.strAutoBet,i=t.strRounds,a=t.strBetAmount,s=t.strTotalLose,c=t.strTotalWin,u=t.strSingleWin,l=t.strCancel,d=t.strStart,f=n.maxWin;return{minBet:n.minBet,maxWin:f,precision:n.precision,strAutoBet:r,strRounds:i,strBetAmount:a,strTotalLose:s,strTotalWin:c,strSingleWin:u,strCancel:l,strStart:d,balance:o.balance}},ve=function(e){return e.betPartsWins};function ge(e){return(0,r.useSelector)(e,r.shallowEqual)}var he=j.actions;const ke=j.reducer},1727:(e,t,n)=>{n.d(t,{C:()=>r,c:()=>i});var o=n(9904),r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return{Ping:function(){this.name=o.BaseHubMethodNames.Ping,this.model={version:e}},GetBalance:function(t){var n=t.token,r=void 0===n?0:n;this.name=o.BaseHubMethodNames.GetBalance,this.model={version:e,token:r}},GetInitialState:function(t){var n=t.activeGameId,r=void 0===n?0:n,i=t.token,a=void 0===i?"":i,s=t.isDemo,c=void 0!==s&&s,u=t.partnerId,l=void 0===u?0:u,d=t.culture,f=void 0===d?"":d;this.name=o.BaseHubMethodNames.GetInitialState,this.model={version:e,activeGameId:r,token:a,isDemo:c,partnerId:l,culture:f}},GetLeaderBoard:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.name=o.BaseHubMethodNames.GetLeaderBoard,this.model=e,this.id=t},GenerateHashCode:function(t){var n=t.key,r=void 0===n?"":n,i=t.salt,a=void 0===i?"":i;this.name=o.BaseHubMethodNames.GenerateHashCode,this.model={version:e,key:r,salt:a}},History:function(t){var n=t.token,r=void 0===n?0:n;this.name=o.BaseHubMethodNames.History,this.model={version:e,token:r}},BonusHistory:function(t){var n=t.playerId,r=void 0===n?0:n;this.name=o.BaseHubMethodNames.BonusHistory,this.model={version:e,playerId:r}},BonusInfo:function(t){var n=t.token,r=void 0===n?"":n,i=t.activeGameId,a=void 0===i?0:i;this.name=o.BaseHubMethodNames.BonusInfo,this.model={version:e,token:r,activeGameId:a}}}};function i(e,t,n){var o=e||{},i=o.token,a=o.activeGameId,s=o.isDemo,c=o.partnerId,u=o.culture,l=r(n);return{getPing:function(){var e=new l.Ping;t(e)},getBalance:function(){var e=new l.GetBalance({token:i});t(e)},getHashCode:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=new l.GenerateHashCode({key:e,salt:n});t(o)},getBetHistory:function(){var e=new l.History({token:i});t(e)},getBonusHistory:function(){var e=new l.BonusHistory({token:i});t(e)},getBonusInfo:function(){var e=new l.BonusInfo({token:i,activeGameId:a});t(e)},getInitialState:function(){var e=new l.GetInitialState({activeGameId:a,token:i,isDemo:s,partnerId:c,culture:u});t(e)},getLeaderBoard:function(){var e=new l.GetLeaderBoard({token:i});t(e)}}}},3665:(e,t,n)=>{n.d(t,{Az:()=>D,E_:()=>v,GZ:()=>B,LG:()=>b,N2:()=>w,NX:()=>s,Ob:()=>c,Pw:()=>d,QW:()=>G,TG:()=>C,Te:()=>I,U8:()=>l,WH:()=>p,_y:()=>j,fC:()=>y,hd:()=>g,o7:()=>f,ps:()=>u,q:()=>L,rL:()=>T,tq:()=>S,x$:()=>m,xJ:()=>k,xf:()=>O,y_:()=>A});var o=n(199),r=n(6345),i=n(3562),a=n(6606),s=(0,i.GalaxsysFrontendApi)(),c=2,u=10,l=6,d=100,f=699999.99,I=["Crasher"],p=(Object.freeze({Partial:1,Full:2,FullAfterPartial:3}),Object.freeze({CANCEL:"cancel",CASHOUT:"cashout",BET:"bet",LOADING:"loading",BONUS:"bonus"})),m=function(e){var t=0;if(isNaN(+e))return-1;var n=(t=(e=Math.round(100*e)/100)>=1e9?"".concat(e/1e9,"B"):e>=1e6?"".concat(e/1e6,"M"):e>=1e3?"".concat(e/1e3,"K"):e).toString(),o=n.split(".");if(-1!==n.indexOf(".")&&o[1].length>3){var r=n[n.length-1];t="".concat(o[0]+r,"+")}return t};function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return""===e?"":parseFloat("".concat(e).replace(/,/g,"")).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:t}).replaceAll(","," ")}function y(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;return+(+(0,o.format)((0,o.subtract)(+e,+t),{precision:14})).toFixed(n)}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;return+(+(0,o.format)((0,o.add)(+e,+t),{precision:14})).toFixed(n)}function g(e){var t=1;if(e)switch(e.type){case r.BonusTypes.FreeBet:t=3;break;case r.BonusTypes.FreeAmount:t=4}return t}var h=(0,a.getTypedParamsFromURL)()||{},k=(h.token,h.mode),S=(h.backUrl,h.referer,h.isMobile),B=h.gameKindName,w=h.activeGameId,C=h.culture,O=h.isDemo,P=h.partnerId,G=+h.playerId,A=+P,T=["Maestro"].includes(B)?0:3e3,x=function(e){return(null==e?void 0:e.sort((function(e,t){return t.betInfo[0].betCoin+t.betInfo[1].betCoin-e.betInfo[0].betCoin-e.betInfo[1].betCoin})))||[]},L=function(e){var t=[],n=[];return null==e||e.forEach((function(e){e.playerId===+G?t.push(e):n.push(e)})),x(t),x(n),[].concat(t,n)},D=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e.find((function(e){return e.betInfo[0].stakeInfoId===t.betInfo[0].stakeInfoId}))?console.log("duplicated key"):e.push(t)},j={totalLose:{number:0,checked:!1},totalWin:{number:0,checked:!1},singleWin:{number:0,checked:!1},wins:0,bets:0,singleTotalWin:0}},5192:(e,t,n)=>{n.d(t,{AS:()=>l,AW:()=>d,GO:()=>f,IP:()=>p,Kb:()=>I,ps:()=>u});var o=n(1727),r=n(9904);function i(e){return i="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},i(e)}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function s(e){for(var t=1;t{n.d(t,{Z:()=>c});var o=n(3665);function r(e){return r="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},r(e)}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t