/*! For license information please see 513.17a036f78f63300caeb8.js.LICENSE.txt */ "use strict";(self.webpackChunkcrashlogic=self.webpackChunkcrashlogic||[]).push([[513],{8513:(e,t,n)=>{n.r(t),n.d(t,{actions:()=>Pe,condintionallyUpdateAfterFinishStateAsync:()=>Se,conditionallySetCoefficientIfExists:()=>we,default:()=>Be,gameSlice:()=>R,selectActiveLeaderBoardId:()=>Z,selectAnimationData:()=>z,selectAnimationDataV2:()=>U,selectAutoBetPopupData:()=>Oe,selectBetPartData:()=>F,selectBonuses:()=>i.selectBonuses,selectChatConfigs:()=>i.selectChatConfigs,selectChatIsActive:()=>i.selectChatIsActive,selectCoinRate:()=>i.selectCoinRate,selectCrashGameData:()=>he,selectCurrencyId:()=>i.selectCurrencyId,selectCurrencyInfo:()=>i.selectCurrencyInfo,selectCurrentGameTypeName:()=>be,selectDailyLeaders:()=>oe,selectDataLoaded:()=>i.selectDataLoaded,selectDurationData:()=>q,selectFallBackInfo:()=>ye,selectGameCoefficient:()=>ge,selectGameDuration:()=>X,selectGameId:()=>i.selectGameId,selectGameSecond:()=>K,selectGameStatus:()=>Y,selectGameTypeNames:()=>ve,selectGlobalBonusHistory:()=>i.selectGlobalBonusHistory,selectGlobalHistory:()=>i.selectGlobalHistory,selectHistory:()=>pe,selectHubIsConnected:()=>i.selectHubIsConnected,selectIsChatOpened:()=>i.selectIsChatOpened,selectLeaders:()=>de,selectLeftPaneData:()=>M,selectMinMaxBetWin:()=>i.selectMinMaxBetWin,selectMonthlyLeaders:()=>re,selectNewMessageNotify:()=>i.selectNewMessageNotify,selectNotifications:()=>i.selectNotifications,selectPartnerUIConfig:()=>i.selectPartnerUIConfig,selectPing:()=>i.selectPing,selectPixiData:()=>$,selectPlayerBalance:()=>i.selectPlayerBalance,selectPlayerHashCode:()=>ne,selectPlayerStakes:()=>te,selectPopups:()=>i.selectPopups,selectPrecision:()=>i.selectPrecision,selectProgressData:()=>Q,selectQuickBets:()=>i.selectQuickBets,selectReloadSite:()=>ee,selectReportBoxData:()=>J,selectReportInfo:()=>V,selectResources:()=>i.selectResources,selectResults:()=>fe,selectRightPaneData:()=>H,selectRoundTicketsCountData:()=>me,selectSettings:()=>i.selectSettings,selectSortedTickets:()=>ce,selectStatistics:()=>Ie,selectStatusCountDown:()=>le,selectTicketListData:()=>ue,selectTicketListHeaderData:()=>ae,selectTicketListItemData:()=>se,selectTickets:()=>ie,shallowSelector:()=>Ce});var o=n(1254),r=n(5694),i=n(1277),a=n(3688),s=n(6345),c=n(1100),u=n.n(c),l=n(2663);function f(e){return f="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},f(e)}function d(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 p(e){for(var t=1;t0?s.GameStatus.InProcess:s.GameStatus.Countdown,B=P===s.GameStatus.InProcess?0:-Math.ceil(i);"Crasher"===l.GZ&&(B=(B=(P=i>0&&!a?s.GameStatus.InProcess:s.GameStatus.Countdown)===s.GameStatus.InProcess?0:-Math.ceil(i))<0?r:B),null===u()||void 0===u()||u().setItem("shared_crash_status",P),null!==u()&&void 0!==u()&&u().getItem("shared_crash_status")||(e.gameInfo.status=P);var x=JSON.parse((null===u()||void 0===u()?void 0:u().getItem("externalAutoPlayOptions_0"))||"{}");x&&(e.externalAutoPlayOptions[0]=x);var A=JSON.parse((null===u()||void 0===u()?void 0:u().getItem("externalAutoPlayOptions_1"))||"{}");A&&(e.externalAutoPlayOptions[1]=A),e.isDataLoaded=!0,e.partnerInfo.coinRate=d,e.partnerInfo.currencyId=e.playerInfo.isDemo?"Fun":p,e.partnerInfo.precision=I,e.partnerInfo.minBet=m,e.partnerInfo.maxBet=y,e.partnerInfo.maxWin=b,e.partnerInfo.defaultBet=v,e.partnerInfo.quickBets=g,e.partnerInfo.partnerInstanceName=h,e.gameInfo.duration=r,e.gameInfo.second=B,e.gameInfo.freezeCoefficient=c,e.tickets=S||[],e.history=(null==k?void 0:k.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=w||[],e.leaders=O||[],e.statistics=C||[],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=Date.now(),i=0,a=0,s=null===u()||void 0===u()?void 0:u().getItem("pending_autobet_0");if(s){var c=JSON.parse(s);i=c.time,r-c.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=c}var f=null===u()||void 0===u()?void 0:u().getItem("pending_autobet_1");if(f){var d=JSON.parse(f);a=d.time,r-d.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=d}var I=null===u()||void 0===u()?void 0:u().getItem("externalAutoPlayOptions_0");if(I){var m=JSON.parse(I);r-i>6e5?null===u()||void 0===u()||u().removeItem("externalAutoPlayOptions_0"):e.externalAutoPlayOptions[0]=p(p({},l._y),m)}var y=null===u()||void 0===u()?void 0:u().getItem("externalAutoPlayOptions_1");if(y){var b=JSON.parse(y);r-a>6e5?null===u()||void 0===u()||u().removeItem("externalAutoPlayOptions_1"):e.externalAutoPlayOptions[1]=p(p({},l._y),b)}}},setInitialStateLastRoundTickets:function(e,t){var n=t.payload.tickets;e.lastRoundTickets=(0,l.q)(n)}};var y=n(6606);function b(e){return b="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},b(e)}function v(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 g(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 k(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)?k(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}));f&&(f.pressed=!1,f.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,S(f.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,i=n.playerTickets,a=void 0===i?[]:i;if(e.gameInfo.gameId===o){a.forEach((function(t,n){var o=t.win;e.betPartsWins[n]={index:n,showWin: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,e.gameInfo.freezeCoefficient=0,e.gameInfo.boostCoefficient=0;var c=!1;e.tickets.forEach((function(t){t.betInfo.forEach((function(e){e.win=e.win||0})),t.playerId===+l.QW&&(e.history.unshift(g(g({},t),{},{gameId:o})),c=!0)})),c&&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 O=n(4439),C=n(342),P={Maestro:"Maestro",StarLight:"StarLight"};function B(e){return B="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},B(e)}function x(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=n.isGalaxsysBonus,f=r.index,d=e.playerInfo.stakes[f];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,d.pending.isGalaxsysBonus=c,s>0&&r.isAutoBet&&!l.xf){var p=(new Date).getTime();null===u()||void 0===u()||u().setItem("pending_autobet_".concat(f),JSON.stringify(T(T({},d.pending),{},{time:p})))}d.current=null},movePendingToCurrentStake:function(e,t){var n,o,r,i,a,s=t.payload.index,c=e.externalAutoPlayOptions[s]||{},f=c.totalLose,d=c.totalWin,p=c.singleWin,I=c.wins,m=c.bets,y=c.singleTotalWin,b=e.playerInfo.stakes[s];if(P[l.GZ])if(null!=f&&f.checked&&(null==f?void 0:f.number)<=+m-+I||null!=d&&d.checked&&(null==d?void 0:d.number)<=+I||null!=p&&p.checked&&(null==p?void 0:p.number)<=+y)b.pending=null,b.current=null,null===u()||void 0===u()||u().removeItem("autobet_count_".concat(s)),null===u()||void 0===u()||u().removeItem("pending_autobet_".concat(s)),null===u()||void 0===u()||u().removeItem("externalAutoPlayOptions_".concat(s)),e.externalAutoPlayOptions[s]=T({},l._y);else if(null!=f&&f.checked&&null!==(i=b.current)&&void 0!==i&&i.bet){var v=T(T({},e.externalAutoPlayOptions[s]),{},{bets:(+m+b.current.bet).toFixed(2)});l.xf||null===u()||void 0===u()||u().setItem("externalAutoPlayOptions_".concat(s),JSON.stringify(v)),e.externalAutoPlayOptions[s]=v}null!==(n=b.current)&&void 0!==n&&n.isAutoBet&&(null===(o=b.current)||void 0===o?void 0:o.autoBet)>0&&(b.pending=(0,O.cloneDeep)(b.current),b.pending.stakeId=null,null===(a=b.pending)||void 0===a||a.betInfo.forEach((function(e){e&&(e.stakeInfoId=null,e.coefficient=null,e.win=null)}))),null!==(r=b.current)&&void 0!==r&&null!==(r=r.betInfo)&&void 0!==r&&r.every((function(e){return e.win>0}))&&(b.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},updateGameSecond:function(e,t){var n=t.payload.second;e.gameInfo.second=-Math.round(n)},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=[T({guid:1},(0,y.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.lV)(e.tickets,i),r.current=(0,O.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,y.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,f=n.index,d=n.currencyId,p=n.bonusInfo,I=e.playerInfo.stakes[f],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:d||e.partnerInfo.currencyId};if(I.pressed=!1,!I.pending&&null!==u()&&void 0!==u()&&u().getItem("pending_autobet_".concat(f))&&(I.pending=JSON.parse(null===u()||void 0===u()?void 0:u().getItem("pending_autobet_".concat(f)))),I.current=(0,O.cloneDeep)(I.pending),I.current){var y,b=I.current.autoBet-1>0;if(I.current.stakeId=r,I.current.bet=a.reduce((function(e,t){return e+t.bet}),0),I.current.betInfo=a,I.current.isAutoBet=b,I.current.autoBet=b?I.current.autoBet-1:0,I.current.winType=c,I.current.win=null,b&&!l.xf){var v=Date.now();null===u()||void 0===u()||u().setItem("pending_autobet_".concat(f),JSON.stringify(T(T({},I.current),{},{bonusId:null==p?void 0:p.id,time:v})))}else null===u()||void 0===u()||u().removeItem("autobet_count_".concat(f)),null===u()||void 0===u()||u().removeItem("pending_autobet_".concat(f)),null===u()||void 0===u()||u().removeItem("externalAutoPlayOptions_".concat(f));l.xf||(null===u()||void 0===u()?void 0:u().getItem("pending_autobet_".concat(f)))&&(null===u()||void 0===u()||u().setItem("autobet_count_".concat(f),JSON.stringify({stakeId:r,autoBet:null===(y=I.current)||void 0===y?void 0:y.autoBet})))}I.pending=null,3===s||4===s||(e.playerInfo.balance=o),(0,l.lV)(e.tickets,m)},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.lV)(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.lV)(e.tickets,u)}))},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 C.AS.Partial:s=[i.current.betInfo[0]];break;case C.AS.Full:s=i.current.betInfo;break;case C.AS.FullAfterPartial:s=[i.current.betInfo[1]]}1!==r&&(e.gameInfo.betInfoFullCashouts[o]=!0);var c=0;s.forEach((function(e){var t=+(0,y.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,y.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 f=[];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)})),f=i.current.betInfo,e.tickets.forEach((function(e){e.stakeId===u&&(e.win=2===l?c:s[0].win,e.cashoutType=l,f.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,y.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&&(o.current=T(T({},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,i=T(T({},l._y),r);l.xf||null===u()||void 0===u()||u().setItem("externalAutoPlayOptions_".concat(o),JSON.stringify(i)),e.externalAutoPlayOptions[o]=i},updateExternalOptions:function(e,t){var n=t.payload,o=n.index,r=n.name,i=n.value,a=T(T({},e.externalAutoPlayOptions[o]),{},j({},r,(+e.externalAutoPlayOptions[o][r]+i).toFixed(2)));"singleTotalWin"===r&&(a.singleTotalWin=+i.toFixed(2)),l.xf||null===u()||void 0===u()||u().setItem("externalAutoPlayOptions_".concat(o),JSON.stringify(a)),e.externalAutoPlayOptions[o]=a},resetExternalOptions:function(e,t){var n=t.payload.index;null===u()||void 0===u()||u().removeItem("externalAutoPlayOptions_".concat(n)),e.externalAutoPlayOptions[n]=T({},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=[T({},i)].concat(function(e){if(Array.isArray(e))return x(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 x(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)?x(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 D(e){return D="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},D(e)}function _(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,p=e.services.settings,I=p.isAnimate,m=p.sound,y=p.music,b=(0,i.selectChatIsActive)(e),v=(0,i.selectNewMessageNotify)(e);return{isAnimate:I,sound:m,music:y,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:f,cashoutsCount:d,resultsList:e.results,resources:"string"==typeof e.resources?JSON.parse(e.resources||"{}"):e.resources,chatIsActive:b,newMessageNotify:v}},U=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)||[],f=e.tickets,d=(null==f?void 0:f.filter((function(e){return!e.isDemo})).length)||0,p=(null==f?void 0:f.filter((function(e){return!e.isDemo&&(e.betInfo[0].win>0||e.betInfo[1].win>0)})).length)||0,I=e.services.settings,m=I.isAnimate,y=I.sound,b=I.music,v=(0,i.selectChatIsActive)(e),g=(0,i.selectNewMessageNotify)(e),h={isAnimate:m,sound:y,music:b,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:d,cashoutsCount:p,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},J=function(e){return{status:e.gameInfo.status,coefficient:e.gameInfo.coefficient,freezeCoefficient:e.gameInfo.freezeCoefficient,boostCoefficient:e.gameInfo.boostCoefficient,isAnimate:e.services.settings.isAnimate}},q=function(e){return{duration:e.gameInfo.duration,second:e.gameInfo.second}},V=function(e){var t=e.gameInfo;return{freezeCoefficient:t.freezeCoefficient,isBoost:t.isBoost}},Q=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"}},$=function(e){return{status:e.gameInfo.status,duration:e.gameInfo.duration,second:e.gameInfo.second,finish:e.gameInfo.pixiGameFinish,start:e.gameInfo.pixiGameStart}},Y=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).gameInfo.status},K=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).gameInfo.second},X=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).gameInfo.duration},ee=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).reloadSite},te=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).playerInfo.stakes},ne=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).playerInfo.hashCode},oe=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).leadersDaily},re=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).leadersMonthly},ie=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).tickets},ae=function(e){var t=e.partnerInfo,n=e.resources;return{currencyId:t.currencyId,resources:n}},se=function(e,t){var n=e.partnerInfo;return E({coinRate:n.coinRate,precision:n.precision,itemData:e.tickets.find((function(e){return e.betInfo[0].stakeInfoId===t}))},ae(e))},ce=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)})),[].concat(n,o)},ue=function(e){return function(t){return ce(t).slice(0,e)}},le=function(e){return"countdown"===Y(e)},fe=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).results},de=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).leaders},pe=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).history},Ie=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).statistics},me=function(e){return function(t){var n,o=ce(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}},ye=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}},be=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).partnerInfo.gameTypeName},ve=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).partnerInfo.gameTypeNames},ge=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z).gameInfo.coefficient},he=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}},ke=null,Se=function(e){return function(t){ke&&clearTimeout(ke),ke=setTimeout((function(){t(Pe.cleanBoard())}),e)}},we=function(e){var t=e.gameId,n=e.coefficient,o=e.seconds,r=e.freezeCoefficient,a=e.boostCoefficient;return function(e,s){var c=(0,i.selectGameId)(s());c&&e(c===t?Pe.setCoefficient({coefficient:n,seconds:o,freezeCoefficient:r,boostCoefficient:a}):Pe.reloadSite())}},Oe=function(e){var t=e.resources,n=e.partnerInfo,o=t.strAutoBet,r=t.strRounds,i=t.strStopTotalLose,a=t.strStopTotalWin,s=t.strStopSingleWin,c=t.strSingleWin,u=t.strCancel,l=t.strStart,f=n.maxWin;return{minBet:n.minBet,maxWin:f,precision:n.precision,strAutoBet:o,strRounds:r,strStopTotalLose:i,strStopTotalWin:a,strStopSingleWin:s,strSingleWin:c,strCancel:u,strStart:l}};function Ce(e,t){return(0,r.useSelector)(e,t||r.shallowEqual)}var Pe=R.actions;const Be=R.reducer},2972:(e,t,n)=>{n.d(t,{C:()=>r,c:()=>i});var o=n(248),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,f=t.culture,d=void 0===f?"":f;this.name=o.BaseHubMethodNames.GetInitialState,this.model={version:e,activeGameId:r,token:a,isDemo:c,partnerId:l,culture:d}},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)},getInitialState:function(){var e=new l.GetInitialState({activeGameId:a,token:i,isDemo:s,partnerId:c,culture:u});t(e)}}}},2663:(e,t,n)=>{n.d(t,{E_:()=>v,GZ:()=>w,LG:()=>m,N2:()=>O,NX:()=>s,Pw:()=>l,QW:()=>x,Sh:()=>N,TG:()=>C,Te:()=>d,U8:()=>u,WH:()=>p,_y:()=>D,fC:()=>b,hd:()=>g,lV:()=>_,o7:()=>f,ps:()=>c,q:()=>G,rL:()=>T,tq:()=>S,x$:()=>I,xJ:()=>k,xf:()=>P,y_:()=>A}),n(199);var o=n(6345),r=n(3562),i=n(6606),a=n(5893),s=(0,r.GalaxsysFrontendApi)(),c=10,u=6,l=100,f=699999.99,d=["crasher","starlight"],p=(Object.freeze({Partial:1,Full:2,FullAfterPartial:3}),Object.freeze({CANCEL:"cancel",CASHOUT:"cashout",BET:"bet",LOADING:"loading",BONUS:"bonus"})),I=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 m(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=t||2;return""===e?"":parseFloat("".concat(e).replace(/,/g,"")).toLocaleString("en-US",{minimumFractionDigits:n,maximumFractionDigits:o}).replaceAll(","," ")}function y(e,t){var n=Math.pow(10,t);return Math.floor((e*n).toFixed(t))/n}function b(e,t){return y(e-t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:2)}function v(e,t){return y(e+t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:2)}function g(e){var t=1;if(e)switch(e.type){case o.BonusTypes.FreeBet:t=3;break;case o.BonusTypes.FreeAmount:t=4}return t}var h=(0,i.getTypedParamsFromURL)()||{},k=(h.token,h.mode),S=(h.backUrl,h.referer,h.isMobile),w=h.gameKindName,O=h.activeGameId,C=h.culture,P=h.isDemo,B=h.partnerId,x=+h.playerId,A=+B,T=["maestro","starlight"].includes(w.toLowerCase())?0:3e3,j=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})))||[]},G=function(e){var t=[],n=[];return null==e||e.forEach((function(e){e.playerId===+x?t.push(e):n.push(e)})),j(t),j(n),[].concat(t,n)},D={totalLose:{number:0,checked:!1},totalWin:{number:0,checked:!1},singleWin:{number:0,checked:!1},wins:0,bets:0,singleTotalWin:0};function _(e,t){for(var n,o=0,r=e.length-1,i=t.betInfo;o<=r;){var a=e[n=Math.floor((o+r)/2)].betInfo,s=a[0].betCoin+a[1].betCoin,c=i[0].betCoin+i[1].betCoin;if(a[0].stakeInfoId===i[0].stakeInfoId)return e;s>c?o=n+1:r=n-1}return e.splice(o,0,t),e}var N=function(){var e=arguments.length>1?arguments[1]:void 0,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).filter((function(e){return e.coefficient&&!Number.isNaN(e.coefficient)})).map((function(t){var n=t.coefficient,o=e.extraHigh;return n<=2?o=e.low:n<=5?o=e.mid:n<=10&&(o=e.high),(0,a.jsx)("span",{className:"".concat(o," ").concat(e.result__item),children:(0,a.jsx)("span",{children:"".concat(Number(t.coefficient).toFixed(2),"x")})},t.gameId)}));return S?t.slice(0,30):t}},342:(e,t,n)=>{n.d(t,{AS:()=>l,AW:()=>f,GO:()=>d,IP:()=>I,Kb:()=>p,ps:()=>u});var o=n(248),r=n(2972);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(2663);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{var o=n(8416),r=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var o,i={},u=null,l=null;for(o in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(l=t.ref),t)a.call(t,o)&&!c.hasOwnProperty(o)&&(i[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===i[o]&&(i[o]=t[o]);return{$$typeof:r,type:e,key:u,ref:l,props:i,_owner:s.current}}t.Fragment=i,t.jsx=u,t.jsxs=u},5893:(e,t,n)=>{e.exports=n(5251)}}]);