{"version":3,"file":"static/chunks/pages/casino/plinko-daad46299a2c73d0.js","sources":["webpack://_N_E/./src/LegacyApp/client/store/flash/flash.constants.js","webpack://_N_E/./src/common/controllers/instanceController.ts","webpack://_N_E/./src/common/controllers/subjectController.ts","webpack://_N_E/./src/common/methods/incrementingId.ts","webpack://_N_E/./src/common/vendor/deterministicMatter.ts","webpack://_N_E/./src/modules/balance/store/thunks/getChangedBalance.thunk.ts","webpack://_N_E/./src/modules/games/Game/components/Game.components/GamePanel/gamePanel.styled.ts","webpack://_N_E/./src/modules/games/Game/methods/checkEasyConfig.ts","webpack://_N_E/./src/modules/games/Game/methods/checkExpertConfig.ts","webpack://_N_E/./src/modules/games/Game/methods/checkIsWinChanceDisabled.ts","webpack://_N_E/./src/modules/games/Game/methods/getStrategyFromState.ts","webpack://_N_E/./src/modules/games/Game/store/game/methods/checkIsStrategyFromBetPayload.ts","webpack://_N_E/./src/modules/games/Game/store/game/methods/createPlaceBetBody.thunk.ts","webpack://_N_E/./src/modules/games/Game/store/game/methods/createPlaceBetUrl.ts","webpack://_N_E/./src/modules/games/Game/store/game/thunks/gameResolvePendingAnimatedBets.thunk.ts","webpack://_N_E/./src/modules/games/Game/store/game/thunks/handleAnimatedBet.thunk.ts","webpack://_N_E/./src/LegacyApp/client/store/flash/flash.actions.js","webpack://_N_E/./src/modules/games/Game/store/game/thunks/handleBetResponse.thunk.ts","webpack://_N_E/./src/modules/games/Game/store/gameAutobet/thunks/handleAutobetError.thunk.ts","webpack://_N_E/./src/modules/games/Game/store/gameAutobet/thunks/handleAutobetPlayResponse.thunk.ts","webpack://_N_E/./src/modules/games/Game/store/plinko/methods/createPosition.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/MuliplierBoxes/MultiplierBox.tsx","webpack://_N_E/./src/modules/games/PlinkoGame/components/MuliplierBoxes/MultiplierBoxes.tsx","webpack://_N_E/./src/modules/games/PlinkoGame/components/MuliplierBoxes/multipliers.ts","webpack://_N_E/./src/modules/games/PlinkoGame/methods/getMinMaxWall.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/MatterJs/methods/createPlayground.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/MatterJs/methods/getBalls.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/MatterJs/methods/getWaitingBalls.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/MatterJs/methods/matterInstances.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/constants/WRAPPER_ID.tsx","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/methods/getBall.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/methods/getBallColor.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/methods/getBalls.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/methods/getWaitingBalls.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/methods/createPixiWebGLRenderer.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/methods/createPixiRenderer.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/methods/initPixi.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/methods/instances.pixi.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/methods/render.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/PinsLayer/Pin.tsx","webpack://_N_E/./src/modules/games/PlinkoGame/components/PinsLayer/PinsLayer.tsx","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/components/GameBody/index.tsx","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/components/GameBody/usePlinkoWorldRatio.ts","webpack://_N_E/./src/modules/games/PlinkoGame/constants.ts","webpack://_N_E/./src/modules/games/PlinkoGame/methods/createPins.ts","webpack://_N_E/./src/modules/games/PlinkoGame/controllers/PinsController.ts","webpack://_N_E/./src/modules/games/PlinkoGame/methods/getBallRadius.ts","webpack://_N_E/./src/modules/games/PlinkoGame/methods/getDataFromBallLabel.ts","webpack://_N_E/./src/modules/games/PlinkoGame/methods/getLinesRatio.ts","webpack://_N_E/./src/modules/games/PlinkoGame/methods/getMinMaxBallX.ts","webpack://_N_E/./src/modules/games/PlinkoGame/methods/getPayoutIndexFromPath.ts","webpack://_N_E/./src/modules/games/PlinkoGame/methods/getPinConfig.ts","webpack://_N_E/./src/modules/games/PlinkoGame/methods/getPinRadius.ts","webpack://_N_E/./src/modules/games/PlinkoGame/methods/getPyramidHeight.ts","webpack://_N_E/./src/modules/games/PlinkoGame/methods/plinkoTriggerEvents.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/MatterJs/methods/getBall.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/MatterJs/methods/removeBallMatterJs.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/methods/removeBallPixiJs.ts","webpack://_N_E/./src/modules/games/PlinkoGame/methods/removeBall.ts","webpack://_N_E/./src/modules/games/Game/store/plinko/thunks/plinkoBallResult.thunk.ts","webpack://_N_E/./src/modules/games/Game/store/plinko/selectors/usePlinkoPositionSelector.ts","webpack://_N_E/./src/modules/games/PlinkoGame/hooks/usePlinkoUpdatePayout.ts","webpack://_N_E/./src/modules/games/Game/store/game/thunks/changePayoutThunk.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/MatterJs/methods/addBallMatterJs.ts","webpack://_N_E/./node_modules/@tweenjs/tween.js/dist/tween.esm.js","webpack://_N_E/./src/LegacyApp/methods/math/random.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/methods/initialPlinkoCoordinates.ts","webpack://_N_E/./src/common/methods/randomizeElementFromArray.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/methods/createBounce.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/methods/createPlinkoPathTween.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/methods/getPinsHorizontalSpace.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/methods/AnimateComponent.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/methods/Ticker.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/methods/addBallAnimation.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/methods/createBall.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/methods/addBallPixiJs.ts","webpack://_N_E/./src/modules/games/PlinkoGame/methods/addBall.ts","webpack://_N_E/./src/modules/games/Game/components/Game.components/GameWrapper/StyledGame/game-plinko.global.styled.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/MatterJs/index.tsx","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/methods/getFallingBalls.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/methods/stopAllBalls.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/methods/addTestText.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/methods/addInitBalls.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/PixiJS/index.tsx","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/hooks/useResetBalls.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/components/Playground/Playground.tsx","webpack://_N_E/./src/modules/games/PlinkoGame/styles/PlinkoFormStyled.ts","webpack://_N_E/./src/modules/games/PlinkoGame/styles/PlinkoPlayground.styled.ts","webpack://_N_E/./src/common/helpers/requestIdleCallbackPolyfill.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/PlinkoGame/PlinkoGamePlayground.tsx","webpack://_N_E/./src/modules/games/PlinkoGame/hooks/usePlinkoNewBet.ts","webpack://_N_E/./src/modules/games/PlinkoGame/index.tsx","webpack://_N_E/./src/pages/casino/plinko.tsx","webpack://_N_E/?ff81","webpack://_N_E/./src/modules/games/PlinkoGame/components/PlinkoGame/PlinkoGamePlayground.module.scss","webpack://_N_E/./node_modules/trigfills/trigfills.min.js"],"sourceRoot":"","sourcesContent":["export const FLASHBET_RESULT = 'FLASHBET_RESULT';\n","export class InstanceController {\n\tprivate instance: T;\n\tprivate create: (instance?: T) => Promise;\n\n\tconstructor(create: (instance?: T) => Promise, defaultValue?: T) {\n\t\tthis.instance = null;\n\t\tthis.create = create;\n\t}\n\n\tpublic async get() {\n\t\tif (!this.instance) {\n\t\t\treturn await this.rebuild();\n\t\t}\n\t\treturn this.instance;\n\t}\n\n\tpublic async rebuild() {\n\t\tthis.instance = await this.create(this.instance);\n\t\treturn this.instance;\n\t}\n}\n","import { Subject } from 'rxjs';\n\nclass SubjectControllerClass {\n\tprivate subjects = {};\n\n\tconstructor() {\n\t\t// this.subject = new Subject();\n\t}\n\n\tpublic subscribe(id, callback) {\n\t\tif (!this.subjects[id]) {\n\t\t\tthis.subjects[id] = new Subject();\n\t\t}\n\n\t\treturn this.subjects[id].subscribe(callback);\n\t}\n\n\tpublic emit(id, message) {\n\t\tthis.subjects[id].next(message);\n\t}\n}\n\nexport const SubjectController = new SubjectControllerClass();\n","class IncrementingIdClass {\n\tprivate id: Record = {};\n\n\tpublic next(label = 'default') {\n\t\tif (!this.id[label]) {\n\t\t\tthis.id[label] = 0;\n\t\t}\n\t\tthis.id[label] = this.id[label] + 1;\n\t\treturn this.id[label];\n\t}\n}\n\nconst IncrementingId = new IncrementingIdClass();\n\nexport const getIncrId = (label: string) => IncrementingId.next(label);\n","import trigf from 'trigfills';\nimport * as MatterJS from 'matter-js';\n\ntrigf.setmaths();\n// @ts-expect-error invalid type\nMatterJS.Common._seed = 12345678;\n\nexport default MatterJS;\n","import { AppThunk } from '@legacyApp/types/store/ThunkAction';\nimport { getBalance } from '@legacyApp/client/modules/app/balanceService';\nimport { config } from '@legacyApp/client/config';\nimport { BalanceElement } from '@legacyApp/types/balance/BalancesArray';\nimport { roundNumber } from '@common/methods/roundNumber/roundNumber';\nimport { UserBalance } from '../UserBalance.type';\n\nexport const getChangedBalanceThunk = (data: {\n\tcurrency: UserBalance['currency'];\n\tamount: UserBalance['amount'];\n}): AppThunk => {\n\treturn (dispatch, getState) => {\n\t\tconst state = getState();\n\t\tconst { currency, amount } = data;\n\t\tconst balanceElement = getBalance(state.balance.balancesArray, currency);\n\t\tconst newBalance = roundNumber(\n\t\t\tNumber(balanceElement.amount) + Number(amount),\n\t\t\tconfig.decimals.balance,\n\t\t);\n\t\tconst newBalanceUsd = roundNumber(\n\t\t\tNumber(balanceElement.amount_usd) +\n\t\t\t\troundNumber(\n\t\t\t\t\tNumber(amount) * state.stats.price[currency],\n\t\t\t\t\tconfig.decimals.balance,\n\t\t\t\t),\n\t\t\tconfig.decimals.balance,\n\t\t);\n\t\treturn {\n\t\t\tcurrency,\n\t\t\tamount_usd: newBalanceUsd,\n\t\t\tamount: newBalance,\n\t\t};\n\t};\n};\n","import styled, { css } from 'styled-components';\nimport { box, noclick } from '@legacyApp/client/modules/style/defaults';\nimport { LoadingLogo } from '@legacyApp/client/components/loadingLogo/loading';\n\nexport const StyledGamePanel = styled.div<{\n\t$settingsAsList?: boolean;\n}>`\n\t${box};\n\talign-items: center;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 24px;\n\tjustify-content: center;\n\tposition: relative;\n`;\n\nexport const StyledGamePanelButton = css`\n\talign-items: center;\n\tcursor: pointer;\n\tdisplay: flex;\n\tjustify-content: center;\n`;\n\nexport const StyledGamePanelButtonMain = styled.div<{\n\t$clicked?: boolean;\n\tname?: string;\n\t$isDisabled?: boolean;\n\t$isNoClick?: boolean;\n\t$isAutoBetRolling?: boolean;\n\tonClick: any;\n}>`\n\t${StyledGamePanelButton};\n\tbackground: linear-gradient(55deg, #4dca77 6.79%, #18d458 94.06%);\n\tborder: 1px solid var(--misc-border, #406aa3);\n\tborder-radius: 64px;\n\tcolor: var(--White, #fff);\n\tfont-family: Maven Pro, sans-serif;\n\tfont-size: 20px;\n\tfont-style: normal;\n\tfont-weight: 700;\n\theight: 15vw;\n\tletter-spacing: 0.3px;\n\tline-height: 30px;\n\tmax-height: 55px;\n\tmax-width: 150px; /* 150% */\n\tposition: relative;\n\ttext-align: center;\n\ttext-transform: uppercase;\n\twidth: 40vw;\n\tz-index: 2;\n\n\t${(props) =>\n\t\tprops.$isDisabled\n\t\t\t? css`\n\t\t\t\t\tbackground: linear-gradient(55deg, #3b9b5b 6.79%, #11963e 94.06%);\n\t\t\t\t\tcolor: var(--color-white-white-50);\n\t\t\t\t\tcursor: default;\n\t\t\t `\n\t\t\t: ''};\n\n\t${(props) =>\n\t\tprops.$isAutoBetRolling\n\t\t\t? css`\n\t\t\t\t\tposition: relative;\n\t\t\t `\n\t\t\t: ''};\n\n\t${(props) =>\n\t\tprops.$isNoClick\n\t\t\t? css`\n\t\t\t\t\t${noclick}\n\t\t\t `\n\t\t\t: ''};\n\n\t@media (min-width: ${(props) => props.theme.media.minWidthDesktop}) {\n\t\tmax-height: 64px;\n\t\tmax-width: 175px;\n\t}\n\n\t@media (min-width: ${(props) => props.theme.media.minWidthBigDesktop}) {\n\t\tmax-height: 75px;\n\t\tmax-width: 205px;\n\t}\n`;\n\nexport const StyledGamePanelLoadingLogo = styled(LoadingLogo)`\n\t${(props) =>\n\t\tprops.$isHidden\n\t\t\t? css`\n\t\t\t\t\tdisplay: none !important;\n\t\t\t `\n\t\t\t: ''};\n`;\n","import { GameStrategy } from '../types/GameStrategy';\n\nexport const checkEasyConfig = (config: GameStrategy['config']): boolean => {\n\tif (\n\t\tconfig.filter((el) => {\n\t\t\treturn (\n\t\t\t\t['resetAmount', 'increaseAmountPercent'].indexOf(el.command[0].name) >\n\t\t\t\t-1\n\t\t\t);\n\t\t}).length !== 2\n\t) {\n\t\treturn false;\n\t}\n\treturn config.every((el) => {\n\t\tif (el.command[0].name === 'stop') {\n\t\t\tif (el.when[0].name === 'profit' && el.when[0].type === 'gte') {\n\t\t\t\t// console.log('isEasyConfig - stopAction', jsonToString(el));\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (el.when[0].name === 'loss' && el.when[0].type === 'before') {\n\t\t\t\t// console.log('isEasyConfig - stopAction', jsonToString(el));\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tif (\n\t\t\t['resetAmount', 'increaseAmountPercent'].indexOf(el.command[0].name) > -1\n\t\t) {\n\t\t\tif (['win', 'lose'].indexOf(el.when[0].name) > -1) {\n\t\t\t\tif (el.when[0].type === 'every') {\n\t\t\t\t\tif (parseFloat(el.when[0].value) === 1) {\n\t\t\t\t\t\t// console.log('isEasyConfig - amountAction', jsonToString(el));\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t});\n};\n","import { GameStrategy } from '../types/GameStrategy';\nimport { checkEasyConfig } from './checkEasyConfig';\n\nexport const checkExpertConfig = (config: GameStrategy['config']): boolean => {\n\t// console.log('isExpert - 1', { config });\n\tif (!config) {\n\t\treturn false;\n\t}\n\t// console.log('isExpert - 2', {length: config.length, config});\n\tif (config?.length) {\n\t\tconst isEasyTemplate = config.every(\n\t\t\t(el) => !el?.command || (el.command.length === 1 && el.when.length === 1),\n\t\t);\n\t\t// console.log('isExpert - 3', {isEasyTemplate});\n\t\tif (config?.length <= 4 && isEasyTemplate) {\n\t\t\t// console.log('isExpert', {isEasy: isEasyConfig(config), config: JSON.stringify(config)});\n\t\t\treturn !checkEasyConfig(config);\n\t\t}\n\t\treturn true;\n\t}\n\treturn false;\n};\n","import { RollRule } from '../types/RollRule';\nimport { GameType } from '../constants/availableGames';\nimport { checkIsSingleValue } from './checkIsSingleValue';\n\nexport const checkIsWinChanceDisabled = (rule: RollRule, game: GameType) => {\n\tif (game !== GameType.DICE) {\n\t\treturn false;\n\t}\n\treturn !checkIsSingleValue(rule) || rule === RollRule.DIRECT;\n};\n","import {\n\tgetGameFromUrl,\n\tgetPayout,\n} from '@legacyApp/client/modules/app/gameService';\nimport { RootState } from '@legacyApp/client/store/configure.store';\nimport { GameType } from '../constants/availableGames';\nimport { GameStrategy } from '../types/GameStrategy';\nimport { RollRule } from '../types/RollRule';\nimport { getRuleBetValuesBetConfig } from './getRuleBetValuesBetConfig';\n\nconst getDiceConfig = (state: RootState) => {\n\tconst rule = state.dice.rollDirection;\n\tconst betValues =\n\t\trule === RollRule.OVER\n\t\t\t? null\n\t\t\t: getRuleBetValuesBetConfig(\n\t\t\t\t\tstate.dice.rollDirection,\n\t\t\t\t\tstate.dice.betValue,\n\t\t\t );\n\treturn {\n\t\trollDirection: rule,\n\t\t...(!!betValues && { betValues }),\n\t};\n};\n\nexport const getStrategyFromState = (\n\tstate: RootState,\n\tgame: GameType,\n\tisDefault?: boolean,\n): GameStrategy => {\n\tif (!game) {\n\t\tgame = state.game?.activeGame || getGameFromUrl();\n\t}\n\treturn {\n\t\t...(game === GameType.DICE && getDiceConfig(state)),\n\t\tgame,\n\t\tcurrency:\n\t\t\tisDefault &&\n\t\t\tstate.gameAutobet?.currency &&\n\t\t\tstate.gameAutobet?.currency[game]\n\t\t\t\t? state.gameAutobet?.currency[game]\n\t\t\t\t: state.user.activeCurrency,\n\t\tconfig:\n\t\t\tstate.gameAutobet?.mode === 'easy'\n\t\t\t\t? state.gameAutobet?.configEasy[game]\n\t\t\t\t: state.gameAutobet?.config[game],\n\t\tpayoutValue:\n\t\t\tNumber(\n\t\t\t\tisDefault\n\t\t\t\t\t? game === 'limbo'\n\t\t\t\t\t\t? state?.limbo?.defaultPayout\n\t\t\t\t\t\t: getPayout(state.game?.defaultWinChanceValue[game], game)\n\t\t\t\t\t: state.game?.payoutValue[game],\n\t\t\t) || null,\n\t\trolls: Number(state.gameAutobet?.rolls) || null,\n\t\t...(state[game]?.risk && { risk: state[game].risk }),\n\t\t...(state[game]?.lines && { rows: state[game].lines }),\n\t\tbetAmount:\n\t\t\tNumber(\n\t\t\t\tisDefault\n\t\t\t\t\t? state.game?.defaultBetAmount[game]\n\t\t\t\t\t: state.game?.betAmount[game],\n\t\t\t) || null,\n\t};\n};\n","import { BetConfig } from '../@types/BetConfig';\n\nexport const checkIsStrategyFromBetPayload = (payload: BetConfig) => {\n\treturn payload.auto || payload.flash;\n};\n","import { AppThunk } from '@legacyApp/types/store/ThunkAction';\nimport { parseEasyConfigForAPI } from '@legacyApp/client/modules/app/strategyV3Service';\nimport { getStrategyFromState } from '../../../methods/getStrategyFromState';\nimport { checkExpertConfig } from '../../../methods/checkExpertConfig';\nimport { PlaceBetBody } from '../@types/PlaceBetBody';\nimport { BetConfig } from '../@types/BetConfig';\nimport { checkIsStrategyFromBetPayload } from './checkIsStrategyFromBetPayload';\n\nexport const createPlaceBetBodyThunk = (\n\tpayload: BetConfig,\n): AppThunk => {\n\treturn (dispatch, getState) => {\n\t\tconst { game } = payload;\n\t\tconst state = getState();\n\t\tconst isStrategy = checkIsStrategyFromBetPayload(payload);\n\t\tconst body: PlaceBetBody = {\n\t\t\t...payload,\n\t\t};\n\t\tconst strategy = isStrategy\n\t\t\t? getStrategyFromState(state, game, true)\n\t\t\t: false;\n\t\tif (strategy) {\n\t\t\tif (strategy.config && strategy.config.length) {\n\t\t\t\tbody.config = !checkExpertConfig(strategy.config)\n\t\t\t\t\t? parseEasyConfigForAPI(strategy.config)\n\t\t\t\t\t: strategy.config;\n\t\t\t}\n\t\t\tif (strategy.rolls) {\n\t\t\t\tbody.rolls = strategy.rolls;\n\t\t\t}\n\t\t}\n\n\t\tif (payload.auto && body.auto !== undefined) {\n\t\t\tdelete body.auto;\n\t\t}\n\n\t\tif (!payload.auto) {\n\t\t\tbody.auto = 1;\n\t\t}\n\n\t\treturn body;\n\t};\n};\n","import { checkIsWinChanceDisabled } from '../../../methods/checkIsWinChanceDisabled';\nimport { GameType } from '../../../constants/availableGames';\nimport { BetConfig } from '../@types/BetConfig';\n\nexport const createPlaceBetUrl = (payload: BetConfig) => {\n\tconst { game, rule, auto, flash } = payload;\n\tconst gameLabel =\n\t\trule && checkIsWinChanceDisabled(rule, game) ? `range-${game}` : game;\n\treturn `/${\n\t\t!auto && !flash && gameLabel === GameType.DICE ? 'v1' : 'v2'\n\t}/${gameLabel}/${flash ? 'flash' : auto ? 'auto' : 'manual'}/${\n\t\tauto ? 'start' : 'play'\n\t}`;\n};\n","import { AppThunk } from '@legacyApp/types/store/ThunkAction';\nimport { GameType } from '../../../constants/availableGames';\nimport { gameUpdateBetInAnimation } from '../game.actions';\nimport { handleAnimatedBetThunk } from './handleAnimatedBet.thunk';\n\nexport const gameResolvePendingAnimatedBetsThunk = (\n\tgame: GameType,\n): AppThunk => {\n\treturn async (dispatch, getState) => {\n\t\tconst { game: gameState } = getState();\n\t\tconst betHashesInAnimation = gameState?.betsInAnimation?.[game]\n\t\t\t? Object.keys(gameState.betsInAnimation[game])\n\t\t\t: [];\n\t\tbetHashesInAnimation.forEach((betHash) => {\n\t\t\tdispatch(\n\t\t\t\tgameUpdateBetInAnimation({\n\t\t\t\t\tgame,\n\t\t\t\t\tvalue: {\n\t\t\t\t\t\tid: betHash,\n\t\t\t\t\t\tactive: false,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\t\t});\n\t\tconst betHashes = gameState?.betsAnimated?.[game]\n\t\t\t? Object.keys(gameState.betsAnimated[game])\n\t\t\t: [];\n\t\tbetHashes.forEach((betHash) => {\n\t\t\tdispatch(handleAnimatedBetThunk(game, betHash));\n\t\t});\n\t};\n};\n","import { getChangedBalanceThunk } from '@modules/balance/store/thunks/getChangedBalance.thunk';\nimport { config } from '@legacyApp/client/config';\nimport { AppThunk } from '@legacyApp/types/store/ThunkAction';\nimport { BalanceElement } from '@legacyApp/types/balance/BalancesArray';\nimport { roundNumber } from '@common/methods/roundNumber/roundNumber';\nimport { GameType } from '../../../constants/availableGames';\nimport {\n\tBetResponseAnimationProps,\n\tbetUpdateAnimated,\n\tgameUpdateBetAnimatedLastBalance,\n} from '../game.actions';\nimport { handleAutobetPlayResponseThunk } from '../../gameAutobet/thunks/handleAutobetPlayResponse.thunk';\nimport { BetResponseProps } from '../@types/BetResponseProps';\nimport { AutobetResponseProps } from '../../gameAutobet/@types/AutobetResponseProps';\nimport { handleBetResponseThunk } from './handleBetResponse.thunk';\n\nexport const handleAnimatedBetThunk =\n\t(game: GameType, hash: string): AppThunk =>\n\t(dispatch, getState) => {\n\t\tconst state = getState();\n\t\tconst props: BetResponseAnimationProps =\n\t\t\tstate.game.betsAnimated[game][hash];\n\t\tif (!props) {\n\t\t\treturn;\n\t\t}\n\t\tconst currency = props.data.userBalance.currency;\n\t\tconst betsAnimatedQueueCount = Object.keys(\n\t\t\tstate.game.betsAnimated[game],\n\t\t).length;\n\t\tconst isLastBetAnimatedBalance =\n\t\t\tbetsAnimatedQueueCount === 1 &&\n\t\t\t!!state.game.betsAnimatedLastBalance[game][currency];\n\t\tconst userBalance: BalanceElement = isLastBetAnimatedBalance\n\t\t\t? state.game.betsAnimatedLastBalance[game][currency]\n\t\t\t: dispatch(\n\t\t\t\t\tgetChangedBalanceThunk({\n\t\t\t\t\t\tcurrency,\n\t\t\t\t\t\tamount: roundNumber(\n\t\t\t\t\t\t\tNumber(props.data.bet.amount) + Number(props.data.bet.profit),\n\t\t\t\t\t\t\tconfig.decimals.balance,\n\t\t\t\t\t\t),\n\t\t\t\t\t}),\n\t\t\t );\n\t\tconst payload: BetResponseProps | AutobetResponseProps = {\n\t\t\t...props,\n\t\t\tdata: {\n\t\t\t\t...props.data,\n\t\t\t\tuserBalance,\n\t\t\t},\n\t\t\tsource: 'handleAnimatedBetThunk',\n\t\t};\n\t\tif (props.data.nextBet || props.data.stopReason) {\n\t\t\tdispatch(handleAutobetPlayResponseThunk(payload));\n\t\t} else {\n\t\t\tdispatch(\n\t\t\t\t// @ts-expect-error invalid type\n\t\t\t\thandleBetResponseThunk(payload),\n\t\t\t);\n\t\t}\n\t\tif (isLastBetAnimatedBalance) {\n\t\t\tdispatch(\n\t\t\t\tgameUpdateBetAnimatedLastBalance({\n\t\t\t\t\tgame,\n\t\t\t\t\tvalue: {\n\t\t\t\t\t\tcurrency,\n\t\t\t\t\t\tamount: null,\n\t\t\t\t\t\tamount_usd: null,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t\tdispatch(\n\t\t\tbetUpdateAnimated({\n\t\t\t\tgame,\n\t\t\t\tvalue: {\n\t\t\t\t\tid: hash,\n\t\t\t\t},\n\t\t\t}),\n\t\t);\n\t\t// console.log('handleAnimatedBetThunk', {\n\t\t// \tisLastBetAnimatedBalance,\n\t\t// \tgame,\n\t\t// \thash,\n\t\t// \tprops,\n\t\t// \tpayload,\n\t\t// \tlastBalance: state.game.betsAnimatedLastBalance[game][currency],\n\t\t// \tuserBalance,\n\t\t// \tcurrency,\n\t\t// \tbetsAnimatedQueueCount,\n\t\t// });\n\t};\n","import { actionSimple } from '../../modules/app/actionService';\nimport { FLASHBET_RESULT } from './flash.constants';\n\nexport const flashbetResult = actionSimple(FLASHBET_RESULT);\n","import { AppThunk } from '@legacyApp/types/store/ThunkAction';\nimport { flashbetResult } from '@legacyApp/client/store/flash/flash.actions';\nimport {\n\tautobetPlay,\n\tautobetSetId,\n\tautobetSetRollsCounter,\n\tautobetSummaryConnectionError,\n} from '../../gameAutobet/gameAutobet.actions';\nimport { betResult } from '../game.actions';\nimport { checkIsStrategyFromBetPayload } from '../methods/checkIsStrategyFromBetPayload';\nimport { createPlaceBetBodyThunk } from '../methods/createPlaceBetBody.thunk';\nimport { BetResponseProps } from '../@types/BetResponseProps';\nimport { handleAutobetErrorThunk } from '../../gameAutobet/thunks/handleAutobetError.thunk';\n\nexport const handleBetResponseThunk = (props: BetResponseProps): AppThunk => {\n\treturn (dispatch, getState) => {\n\t\tconst state = getState();\n\t\tconst { data, payload, source } = props;\n\t\tconst { game } = payload;\n\t\tconst isStrategy = checkIsStrategyFromBetPayload(payload);\n\t\tif (!data || data.status === 404 || data.status >= 500 || data.text) {\n\t\t\tif (state.gameAutobet.active[game]) {\n\t\t\t\treturn dispatch(handleAutobetErrorThunk(props));\n\t\t\t}\n\t\t\treturn dispatch(\n\t\t\t\tbetResult({\n\t\t\t\t\tdata,\n\t\t\t\t\tlastBet: payload,\n\t\t\t\t\tauto: isStrategy,\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t\tif (payload.auto) {\n\t\t\tif (data.autoBet && data.autoBet.uuid) {\n\t\t\t\tconst body = dispatch(createPlaceBetBodyThunk(payload));\n\t\t\t\tdispatch(\n\t\t\t\t\tautobetSetRollsCounter({\n\t\t\t\t\t\tvalue: body.rolls || 0,\n\t\t\t\t\t\tgame,\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t\tdispatch(autobetSetId(game, data.autoBet.uuid));\n\t\t\t\tdispatch(\n\t\t\t\t\tautobetPlay({\n\t\t\t\t\t\tgame: game,\n\t\t\t\t\t\tcurrency: payload.currency,\n\t\t\t\t\t\trule: payload.rule,\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn dispatch(autobetSummaryConnectionError(payload, data));\n\t\t}\n\t\tdispatch(\n\t\t\tbetResult({\n\t\t\t\tdata,\n\t\t\t\tlastBet: payload,\n\t\t\t\tauto: isStrategy,\n\t\t\t}),\n\t\t);\n\t\tif (payload.flash) {\n\t\t\tdispatch(\n\t\t\t\tflashbetResult({\n\t\t\t\t\tresult: data,\n\t\t\t\t\tdata: payload,\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t};\n};\n","import { AppThunk } from '@legacyApp/types/store/ThunkAction';\nimport { sentryError } from '@legacyApp/client/modules/app/sentryService';\nimport { jsonToString } from '@common/methods/jsonToString';\nimport { createPlaceBetUrl } from '../../game/methods/createPlaceBetUrl';\nimport { getStrategyFromState } from '../../../methods/getStrategyFromState';\nimport {\n\tautoBetRolling,\n\tautobetSummaryConnectionError,\n} from '../gameAutobet.actions';\nimport { BetResponseProps } from '../../game/@types/BetResponseProps';\n\nexport const handleAutobetErrorThunk = (props: BetResponseProps): AppThunk => {\n\treturn async (dispatch, getState) => {\n\t\tconst state = getState();\n\t\tconst { data, payload, source } = props;\n\t\tconst { game } = payload;\n\t\tif (\n\t\t\tdata.status &&\n\t\t\tdata.status < 500 &&\n\t\t\t[\n\t\t\t\t403, // Game in progress\n\t\t\t\t429, // Rate exceeded\n\t\t\t].indexOf(data.status) === -1\n\t\t) {\n\t\t\tconst url = createPlaceBetUrl(payload);\n\t\t\tsentryError(\n\t\t\t\tnew Error(\n\t\t\t\t\t`${data.status} | ${url} - Cannot start ${state.gameAutobet.active[game]}bet session`,\n\t\t\t\t),\n\t\t\t\t{\n\t\t\t\t\tgameAutobet: state.gameAutobet,\n\t\t\t\t\tgame: state.game,\n\t\t\t\t\tdata,\n\t\t\t\t\tpayload: jsonToString(payload),\n\t\t\t\t\tsource,\n\t\t\t\t\tsessions: state.gameAutobet.id,\n\t\t\t\t\tstrategy: getStrategyFromState(state, game, true),\n\t\t\t\t},\n\t\t\t\tstate,\n\t\t\t);\n\t\t}\n\t\tdispatch(\n\t\t\tautoBetRolling({\n\t\t\t\tgame,\n\t\t\t\tvalue: false,\n\t\t\t}),\n\t\t);\n\t\tdispatch(\n\t\t\tautobetSummaryConnectionError(payload, {\n\t\t\t\tmessage: `Cannot start ${state.gameAutobet.active[game]}bet session, try again in 10min`,\n\t\t\t}),\n\t\t);\n\t};\n};\n","import { AppThunk } from '@legacyApp/types/store/ThunkAction';\nimport { betResult } from '../../game/game.actions';\nimport { autobet } from '../gameAutobet.actions';\nimport { AutobetResponseProps } from '../@types/AutobetResponseProps';\n\nexport const handleAutobetPlayResponseThunk = (\n\tprops: AutobetResponseProps,\n): AppThunk => {\n\treturn (dispatch) => {\n\t\tconst { data, payload, lastBetTimestamp } = props;\n\t\tdispatch(\n\t\t\tbetResult({\n\t\t\t\tdata: {\n\t\t\t\t\tbet: data.bet,\n\t\t\t\t\tuserBalance: data.userBalance,\n\t\t\t\t},\n\t\t\t\tlastBet: data.bet,\n\t\t\t\tauto: true,\n\t\t\t}),\n\t\t);\n\t\tdispatch(\n\t\t\tautobet({\n\t\t\t\t...payload,\n\t\t\t\tbet: data.bet,\n\t\t\t\tuserBalance: data.userBalance,\n\t\t\t\tnextBet: data.nextBet\n\t\t\t\t\t? {\n\t\t\t\t\t\t\t...data.nextBet,\n\t\t\t\t\t\t\tcounter: data.nextBet.rolls,\n\t\t\t\t\t }\n\t\t\t\t\t: {},\n\t\t\t\tstopped: data.stopReason, // stopped with reason\n\t\t\t\tlastBetTimestamp,\n\t\t\t}),\n\t\t);\n\t};\n};\n","import { isFunction } from '@common/methods/isFunction';\nimport { Bet } from '../../game/@types/PlaceBetResponse';\n\nexport const createPosition = (bet: Bet) => {\n\treturn `${bet.hash}||${bet.position}||${bet.path.join('')}`;\n};\n\nexport const parsePosition = (position: string) => {\n\tif (!position) {\n\t\treturn {\n\t\t\thash: null,\n\t\t\tposition: null,\n\t\t\tpath: null,\n\t\t};\n\t}\n\tif (!isFunction(position?.split)) {\n\t\treturn {\n\t\t\thash: null,\n\t\t\tposition: Number(position),\n\t\t\tpath: null,\n\t\t};\n\t}\n\tconst [hash, pos, path] = position.split('||');\n\treturn {\n\t\thash,\n\t\tposition: Number(pos),\n\t\tpath: path?.split('').map(Number),\n\t};\n};\n","import { FC, useRef, useEffect } from 'react';\nimport { Sounds } from '@common/constants/config/sounds';\nimport { SubjectController } from '@common/controllers/subjectController';\nimport audioService from '@legacyApp/client/modules/app/audioService';\nimport { MultiplierType } from '@modules/games/PlinkoGame/types/index';\nimport { PlinkoResultEventDetails } from '@modules/games/PlinkoGame/methods/plinkoTriggerEvents';\nimport { getBallColor } from '@modules/games/PlinkoGame/components/playground/PixiJS/methods/getBallColor';\nimport { MultiplierColorCombinations } from '@modules/games/PlinkoGame/components/MuliplierBoxes/multipliers';\nimport { PLINKO_RESULT_EVENT } from '@modules/games/PlinkoGame/constants';\n\nexport interface MultiplierBoxProps {\n\tmultiplier: MultiplierType;\n\tindex: number;\n\tcount: number;\n\tenableAnimation?: boolean;\n\tmarked?: boolean;\n}\n\nconst getMarkedBallStyle = (risk) => {\n\tconst colors = getBallColor(risk);\n\n\treturn {\n\t\tbackgroundColor: colors.fill,\n\t\tborder: `1px solid ${colors.line}`,\n\t};\n};\n\nexport const MultiplierBox: FC = ({\n\tmultiplier,\n\tindex,\n\tcount,\n\tenableAnimation,\n\tmarked,\n}) => {\n\tconst { value, risk, lines } = multiplier;\n\n\tconst boxEl = useRef(null);\n\tconst timeoutRef = useRef(null);\n\n\tconst boxColorClassName =\n\t\tMultiplierColorCombinations?.[String(count)]?.[index];\n\n\tconst onResult = (details: PlinkoResultEventDetails) => {\n\t\tif (!enableAnimation) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { payoutIndex } = details;\n\t\tconst isActivated = payoutIndex === index;\n\n\t\tif (!isActivated) {\n\t\t\treturn;\n\t\t}\n\n\t\taudioService.play(Sounds.won, undefined);\n\n\t\tboxEl.current.classList.add('multiplier-box-animation');\n\n\t\tif (timeoutRef.current) {\n\t\t\tclearTimeout(timeoutRef.current);\n\t\t}\n\n\t\ttimeoutRef.current = setTimeout(() => {\n\t\t\tboxEl.current.classList.remove('multiplier-box-animation');\n\t\t}, 500);\n\t};\n\n\tuseEffect(() => {\n\t\tconst handler = SubjectController.subscribe(PLINKO_RESULT_EVENT, onResult);\n\n\t\treturn () => {\n\t\t\thandler.unsubscribe();\n\n\t\t\tif (timeoutRef.current) {\n\t\t\t\tclearTimeout(timeoutRef.current);\n\t\t\t}\n\t\t};\n\t}, []);\n\n\treturn (\n\t\t\n\t\t\t{marked && (\n\t\t\t\t\n\t\t\t)}\n\t\t\t{value < 10 && value >= 1 ? value.toFixed(1) : value}\n\n\t\t\t{Number(value) < 1000 && 'x'}\n\t\t\n\t);\n};\n","import { FC, useCallback } from 'react';\nimport { useStateEffect } from '@common/hooks/useStateEffect';\nimport { Tooltip } from '@legacyApp/client/components/tooltip';\nimport { TransNamespace } from '@legacyApp/client/modules/translation/TransNamespace';\nimport { usePlinkoLinesSelector } from '../../../Game/store/plinko/selectors/usePlinkoLinesSelector';\nimport { usePlinkoRiskSelector } from '../../../Game/store/plinko/selectors/usePlinkoRiskSelector';\nimport transactionService from '../../../../transactions/transactionsService';\nimport { LinesType, MultiplierType, Risk } from '../../types';\nimport { useGameValidationProfitError } from '../../../Game/store/gameValidation/gameValidation.selectors';\nimport { GameType } from '../../../Game/constants/availableGames';\nimport { getMultiplierByLinesQnt } from './multipliers';\nimport { MultiplierBox } from './MultiplierBox';\n\nexport const MultiplierBoxes: FC<{\n\tlines?: LinesType;\n\trisk?: Risk;\n\tenableAnimation?: boolean;\n\tonModal?: boolean;\n\tprofitError?: string | boolean;\n\tclassName?: string;\n\tstyle?: object;\n\tmarkedBoxIndex?: number;\n\tstyleGrid?: object;\n\tcompactView?: boolean;\n}> = ({\n\tlines,\n\trisk,\n\tenableAnimation,\n\tonModal,\n\tprofitError,\n\tclassName,\n\tstyle,\n\tmarkedBoxIndex,\n\tstyleGrid,\n\tcompactView,\n}) => {\n\tconst stateLines = usePlinkoLinesSelector();\n\tconst lines_ = lines || stateLines;\n\tconst stateRisk = usePlinkoRiskSelector();\n\tconst risk_ = risk || stateRisk;\n\tconst profitErrorState = useGameValidationProfitError(GameType.PLINKO);\n\tconst profitError_ =\n\t\tprofitError !== undefined ? profitError : profitErrorState;\n\n\tconst compactViewClassNames =\n\t\t'[&_.grid]:gap-px [&_.grid]:min_tablet_small:gap-1 [&_.multiplier-box]:h-[unset] [&_.multiplier-box]:min_tablet_small:min-h-[30px] [&_.multiplier-box]:text-[6px] [&_.multiplier-box]:min_mobile_large:text-[0.5rem] [&_.multiplier-box]:min_tablet_medium:text-xs [&_.multiplier-box]:leading-none [&_.multiplier-box]:rounded-[0.15rem] [&_.multiplier-box]:min_mobile_large:rounded';\n\n\tconst multipliers = useStateEffect(\n\t\tuseCallback(() => getMultiplierByLinesQnt(lines_, risk_), [lines_, risk_]),\n\t\t(a, b) => transactionService.isListDifferent(a, b, ['label', 'value']),\n\t);\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t{multipliers.map((multiplier, index) => (\n\t\t\t\t\t\t\n\t\t\t\t\t))}\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import { LinesType, MultiplierType, MultiplierValues, Risk } from '../../types';\nimport { config } from '../playground/config';\n\nexport enum MultiplierColors {\n\tRED_DARKER = 'bg-color-red-darker',\n\tRED_DARK = 'bg-color-red-dark',\n\tRED = 'bg-color-red',\n\tORANGE_DARK = 'bg-color-orange-dark',\n\tORANGE = 'bg-color-orange',\n\tORANGE_LIGHT = 'bg-color-orange-light',\n\tYELLOW_DARK = 'bg-color-yellow-dark',\n\tYELLOW = 'bg-color-yellow',\n\tYELLOW_LIGHT = 'bg-color-yellow-light',\n}\n\nexport const MultiplierColorCombinations: Record> = {\n\t'9': [\n\t\tMultiplierColors.ORANGE,\n\t\tMultiplierColors.ORANGE_LIGHT,\n\t\tMultiplierColors.YELLOW_DARK,\n\t\tMultiplierColors.YELLOW,\n\t\tMultiplierColors.YELLOW_LIGHT,\n\t\tMultiplierColors.YELLOW,\n\t\tMultiplierColors.YELLOW_DARK,\n\t\tMultiplierColors.ORANGE_LIGHT,\n\t\tMultiplierColors.ORANGE,\n\t],\n\t'10': [\n\t\tMultiplierColors.ORANGE,\n\t\tMultiplierColors.ORANGE_LIGHT,\n\t\tMultiplierColors.YELLOW_DARK,\n\t\tMultiplierColors.YELLOW,\n\t\tMultiplierColors.YELLOW_LIGHT,\n\t\tMultiplierColors.YELLOW_LIGHT,\n\t\tMultiplierColors.YELLOW,\n\t\tMultiplierColors.YELLOW_DARK,\n\t\tMultiplierColors.ORANGE_LIGHT,\n\t\tMultiplierColors.ORANGE,\n\t],\n\t'11': [\n\t\tMultiplierColors.ORANGE_DARK,\n\t\tMultiplierColors.ORANGE,\n\t\tMultiplierColors.ORANGE_LIGHT,\n\t\tMultiplierColors.YELLOW_DARK,\n\t\tMultiplierColors.YELLOW,\n\t\tMultiplierColors.YELLOW_LIGHT,\n\t\tMultiplierColors.YELLOW,\n\t\tMultiplierColors.YELLOW_DARK,\n\t\tMultiplierColors.ORANGE_LIGHT,\n\t\tMultiplierColors.ORANGE,\n\t\tMultiplierColors.ORANGE_DARK,\n\t],\n\t'12': [\n\t\tMultiplierColors.ORANGE_DARK,\n\t\tMultiplierColors.ORANGE,\n\t\tMultiplierColors.ORANGE_LIGHT,\n\t\tMultiplierColors.YELLOW_DARK,\n\t\tMultiplierColors.YELLOW,\n\t\tMultiplierColors.YELLOW_LIGHT,\n\t\tMultiplierColors.YELLOW_LIGHT,\n\t\tMultiplierColors.YELLOW,\n\t\tMultiplierColors.YELLOW_DARK,\n\t\tMultiplierColors.ORANGE_LIGHT,\n\t\tMultiplierColors.ORANGE,\n\t\tMultiplierColors.ORANGE_DARK,\n\t],\n\t'13': [\n\t\tMultiplierColors.RED,\n\t\tMultiplierColors.ORANGE_DARK,\n\t\tMultiplierColors.ORANGE,\n\t\tMultiplierColors.ORANGE_LIGHT,\n\t\tMultiplierColors.YELLOW_DARK,\n\t\tMultiplierColors.YELLOW,\n\t\tMultiplierColors.YELLOW_LIGHT,\n\t\tMultiplierColors.YELLOW,\n\t\tMultiplierColors.YELLOW_DARK,\n\t\tMultiplierColors.ORANGE_LIGHT,\n\t\tMultiplierColors.ORANGE,\n\t\tMultiplierColors.ORANGE_DARK,\n\t\tMultiplierColors.RED,\n\t],\n\t'14': [\n\t\tMultiplierColors.RED,\n\t\tMultiplierColors.ORANGE_DARK,\n\t\tMultiplierColors.ORANGE,\n\t\tMultiplierColors.ORANGE_LIGHT,\n\t\tMultiplierColors.YELLOW_DARK,\n\t\tMultiplierColors.YELLOW,\n\t\tMultiplierColors.YELLOW_LIGHT,\n\t\tMultiplierColors.YELLOW_LIGHT,\n\t\tMultiplierColors.YELLOW,\n\t\tMultiplierColors.YELLOW_DARK,\n\t\tMultiplierColors.ORANGE_LIGHT,\n\t\tMultiplierColors.ORANGE,\n\t\tMultiplierColors.ORANGE_DARK,\n\t\tMultiplierColors.RED,\n\t],\n\t'15': [\n\t\tMultiplierColors.RED_DARK,\n\t\tMultiplierColors.RED,\n\t\tMultiplierColors.ORANGE_DARK,\n\t\tMultiplierColors.ORANGE,\n\t\tMultiplierColors.ORANGE_LIGHT,\n\t\tMultiplierColors.YELLOW_DARK,\n\t\tMultiplierColors.YELLOW,\n\t\tMultiplierColors.YELLOW_LIGHT,\n\t\tMultiplierColors.YELLOW,\n\t\tMultiplierColors.YELLOW_DARK,\n\t\tMultiplierColors.ORANGE_LIGHT,\n\t\tMultiplierColors.ORANGE,\n\t\tMultiplierColors.ORANGE_DARK,\n\t\tMultiplierColors.RED,\n\t\tMultiplierColors.RED_DARK,\n\t],\n\t'16': [\n\t\tMultiplierColors.RED_DARK,\n\t\tMultiplierColors.RED,\n\t\tMultiplierColors.ORANGE_DARK,\n\t\tMultiplierColors.ORANGE,\n\t\tMultiplierColors.ORANGE_LIGHT,\n\t\tMultiplierColors.YELLOW_DARK,\n\t\tMultiplierColors.YELLOW,\n\t\tMultiplierColors.YELLOW_LIGHT,\n\t\tMultiplierColors.YELLOW_LIGHT,\n\t\tMultiplierColors.YELLOW,\n\t\tMultiplierColors.YELLOW_DARK,\n\t\tMultiplierColors.ORANGE_LIGHT,\n\t\tMultiplierColors.ORANGE,\n\t\tMultiplierColors.ORANGE_DARK,\n\t\tMultiplierColors.RED,\n\t\tMultiplierColors.RED_DARK,\n\t],\n\t'17': [\n\t\tMultiplierColors.RED_DARKER,\n\t\tMultiplierColors.RED_DARK,\n\t\tMultiplierColors.RED,\n\t\tMultiplierColors.ORANGE_DARK,\n\t\tMultiplierColors.ORANGE,\n\t\tMultiplierColors.ORANGE_LIGHT,\n\t\tMultiplierColors.YELLOW_DARK,\n\t\tMultiplierColors.YELLOW,\n\t\tMultiplierColors.YELLOW_LIGHT,\n\t\tMultiplierColors.YELLOW,\n\t\tMultiplierColors.YELLOW_DARK,\n\t\tMultiplierColors.ORANGE_LIGHT,\n\t\tMultiplierColors.ORANGE,\n\t\tMultiplierColors.ORANGE_DARK,\n\t\tMultiplierColors.RED,\n\t\tMultiplierColors.RED_DARK,\n\t\tMultiplierColors.RED_DARKER,\n\t],\n};\n\nexport const getMultiplier = (\n\tvalue: MultiplierValues,\n\tlines: LinesType,\n\trisk: Risk,\n\tpayoutIndex: number,\n): MultiplierType => {\n\treturn {\n\t\tlabel: `${config.labels.floor}||${value}||${0}||${payoutIndex}`,\n\t\timg: `multiplier${value}`,\n\t\tvalue,\n\t\tlines,\n\t\trisk,\n\t\tpayoutIndex,\n\t};\n};\n\nexport const multiplyBlocksByLinesQnt: Record<\n\tRisk,\n\tRecord>\n> = {\n\t[Risk.LOW]: {\n\t\t8: [5.6, 2.1, 1.1, 1, 0.5, 1, 1.1, 2.1, 5.6],\n\t\t9: [5.6, 2, 1.6, 1, 0.7, 0.7, 1, 1.6, 2, 5.6],\n\t\t10: [8.9, 3, 1.4, 1.1, 1, 0.5, 1, 1.1, 1.4, 3, 8.9],\n\t\t11: [8.4, 3, 1.9, 1.3, 1, 0.7, 0.7, 1, 1.3, 1.9, 3, 8.4],\n\t\t12: [10, 3, 1.6, 1.4, 1.1, 1, 0.5, 1, 1.1, 1.4, 1.6, 3, 10],\n\t\t13: [8.1, 4, 3, 1.9, 1.2, 0.9, 0.7, 0.7, 0.9, 1.2, 1.9, 3, 4, 8.1],\n\t\t14: [7.1, 4, 1.9, 1.4, 1.3, 1.1, 1, 0.5, 1, 1.1, 1.3, 1.4, 1.9, 4, 7.1],\n\t\t15: [15, 8, 3, 2, 1.5, 1.1, 1, 0.7, 0.7, 1, 1.1, 1.5, 2, 3, 8, 15],\n\t\t16: [16, 9, 2, 1.4, 1.4, 1.2, 1.1, 1, 0.5, 1, 1.1, 1.2, 1.4, 1.4, 2, 9, 16],\n\t},\n\t[Risk.MEDIUM]: {\n\t\t8: [13, 3, 1.3, 0.7, 0.4, 0.7, 1.3, 3, 13],\n\t\t9: [18, 4, 1.7, 0.9, 0.5, 0.5, 0.9, 1.7, 4, 18],\n\t\t10: [22, 5, 2, 1.4, 0.6, 0.4, 0.6, 1.4, 2, 5, 22],\n\t\t11: [24, 6, 3, 1.8, 0.7, 0.5, 0.5, 0.7, 1.8, 3, 6, 24],\n\t\t12: [33, 11, 4, 2, 1.1, 0.6, 0.3, 0.6, 1.1, 2, 4, 11, 33],\n\t\t13: [43, 13, 6, 3, 1.3, 0.7, 0.4, 0.4, 0.7, 1.3, 3, 6, 13, 43],\n\t\t14: [58, 15, 7, 4, 1.9, 1, 0.5, 0.2, 0.5, 1, 1.9, 4, 7, 15, 58],\n\t\t15: [88, 18, 11, 5, 3, 1.3, 0.5, 0.3, 0.3, 0.5, 1.3, 3, 5, 11, 18, 88],\n\t\t16: [110, 41, 10, 5, 3, 1.5, 1, 0.5, 0.3, 0.5, 1, 1.5, 3, 5, 10, 41, 110],\n\t},\n\t[Risk.HIGH]: {\n\t\t8: [29, 4, 1.5, 0.3, 0.2, 0.3, 1.5, 4, 29],\n\t\t9: [43, 7, 2, 0.6, 0.2, 0.2, 0.6, 2, 7, 43],\n\t\t10: [76, 10, 3, 0.9, 0.3, 0.2, 0.3, 0.9, 3, 10, 76],\n\t\t11: [120, 14, 5.2, 1.4, 0.4, 0.2, 0.2, 0.4, 1.4, 5.2, 14, 120],\n\t\t12: [170, 24, 8.1, 2, 0.7, 0.2, 0.2, 0.2, 0.7, 2, 8.1, 24, 170],\n\t\t13: [260, 37, 11, 4, 1, 0.2, 0.2, 0.2, 0.2, 1, 4, 11, 37, 260],\n\t\t14: [420, 56, 18, 5, 1.9, 0.3, 0.2, 0.2, 0.2, 0.3, 1.9, 5, 18, 56, 420],\n\t\t15: [620, 83, 27, 8, 3, 0.5, 0.2, 0.2, 0.2, 0.2, 0.5, 3, 8, 27, 83, 620],\n\t\t16: [\n\t\t\t1000, 130, 26, 9, 4, 2, 0.2, 0.2, 0.2, 0.2, 0.2, 2, 4, 9, 26, 130, 1000,\n\t\t],\n\t},\n};\n\nexport function getMultiplierByLinesQnt(\n\tlines: LinesType,\n\trisk: Risk,\n): MultiplierType[] {\n\treturn multiplyBlocksByLinesQnt[risk][lines].map(\n\t\t(value: MultiplierValues, index) =>\n\t\t\tgetMultiplier(value, lines, risk, index),\n\t);\n}\n","import { LinesType } from '../types';\nimport { config } from '../components/playground/config';\nimport { getLinesRatio } from './getLinesRatio';\nimport { getPinRadius } from './getPinRadius';\n\nexport const getMinMaxWall = (lines: LinesType) => {\n\tconst linesRatio = getLinesRatio(lines);\n\tconst pinSize = getPinRadius(lines);\n\tconst pinGap = config.pins.pinGap * linesRatio;\n\treturn {\n\t\tmaxX: config.world.width / 2 + pinSize * config.pins.startPins + pinGap,\n\t\tminX: config.world.width / 2 - pinSize * config.pins.startPins - pinGap,\n\t};\n};\n","import { itMayBeTrueTrustMe } from '@common/methods/itMayBeTrueTrustMe';\nimport { NEXT_CONFIG } from '@common/constants/config/nextConfig';\nimport { getIncrId } from '@common/methods/incrementingId';\nimport { config } from '../../config';\nimport MatterJS from '../../../../../../../common/vendor/deterministicMatter';\nimport { LinesType, MultiplierType, Risk } from '../../../../types';\nimport { getMultiplierByLinesQnt } from '../../../MuliplierBoxes/multipliers';\nimport { createBallLabel } from '../../../../methods/getDataFromBallLabel';\nimport { AddBallProps } from '../../../../methods/addBall';\nimport { getLinesRatio } from '../../../../methods/getLinesRatio';\nimport { getPyramidHeight } from '../../../../methods/getPyramidHeight';\nimport { getMinMaxBallX } from '../../../../methods/getMinMaxBallX';\nimport { getMinMaxWall } from '../../../../methods/getMinMaxWall';\nimport { PinsController } from '../../../../controllers/PinsController';\n\nimport { getBallRadius } from '../../../../methods/getBallRadius';\n\nexport const createFloor = () => {\n\treturn MatterJS.Bodies.rectangle(\n\t\tconfig.world.width / 2,\n\t\tconfig.ball.y +\n\t\t\tconfig.pins.startToPinsSpace +\n\t\t\tconfig.pins.pinGap +\n\t\t\tgetPyramidHeight(),\n\t\tconfig.world.width * 2,\n\t\t20 * config.scale,\n\t\t{\n\t\t\tlabel: `${config.labels.floor}-0`,\n\t\t\trender: {\n\t\t\t\tvisible: false,\n\t\t\t\tfillStyle: 'rgba(255,0,0,0.21)',\n\t\t\t},\n\t\t\tisStatic: true,\n\t\t},\n\t);\n};\n\nexport const createRightWall = (lines: LinesType) => {\n\tconst { maxX } = getMinMaxWall(lines);\n\treturn MatterJS.Bodies.rectangle(\n\t\tmaxX + 10 * config.scale,\n\t\tconfig.ball.y,\n\t\tconfig.world.height * 2,\n\t\t20 * config.scale,\n\t\t{\n\t\t\tcollisionFilter: {\n\t\t\t\tgroup: -1,\n\t\t\t},\n\t\t\tangle: -90,\n\t\t\tlabel: `${config.labels.wall}-right`,\n\t\t\trender: {\n\t\t\t\tvisible: false,\n\t\t\t\tfillStyle: 'rgba(0,51,255,0.21)',\n\t\t\t},\n\t\t\tisStatic: true,\n\t\t},\n\t);\n};\n\nexport const createLeftWall = (lines: LinesType) => {\n\tconst { minX } = getMinMaxWall(lines);\n\treturn MatterJS.Bodies.rectangle(\n\t\tminX - 10 * config.scale,\n\t\tconfig.ball.y,\n\t\tconfig.world.height * 2,\n\t\t20 * config.scale,\n\t\t{\n\t\t\tcollisionFilter: {\n\t\t\t\tgroup: -1,\n\t\t\t},\n\t\t\tangle: 90,\n\t\t\tlabel: `${config.labels.wall}-left`,\n\t\t\trender: {\n\t\t\t\tvisible: false,\n\t\t\t\tfillStyle: 'rgba(0,255,4,0.49)',\n\t\t\t},\n\t\t\tisStatic: true,\n\t\t},\n\t);\n};\n\nexport const createMultiplierBox = (\n\tmultiplier: MultiplierType,\n\tlines: LinesType,\n\trisk: Risk,\n\tlastMultiplierX: number,\n\tindex: number,\n): MatterJS.Body => {\n\tconst linesRatio = getLinesRatio(lines);\n\tconst blockSize = config.pins.pinGap * linesRatio; // height and width\n\tif (lastMultiplierX === null) {\n\t\tconst gap = config.pins.pinGap * linesRatio;\n\t\tconst linePins = config.pins.startPins + lines - 1;\n\t\tconst lineWidth = linePins * gap;\n\t\tlastMultiplierX =\n\t\t\tconfig.world.width / 2 - lineWidth / 2 + gap / 2 - blockSize / 2;\n\t}\n\n\tconst x = lastMultiplierX + blockSize;\n\tconst y =\n\t\tconfig.ball.y +\n\t\tconfig.pins.startToPinsSpace +\n\t\tgetPyramidHeight() +\n\t\t(config.pins.pinGap * 2) / 3;\n\treturn MatterJS.Bodies.rectangle(x, y, blockSize, config.pins.pinGap, {\n\t\tlabel: multiplier.label,\n\t\tisStatic: true,\n\t\tid: index,\n\t\trender: {\n\t\t\tfillStyle: '#919191',\n\t\t\tvisible: false,\n\t\t\t// sprite: {\n\t\t\t// \txScale: config.scale,\n\t\t\t// \tyScale: config.scale,\n\t\t\t// \ttexture: parseImageSrc(\n\t\t\t// \t\t`/img/plinko/multipliers/${risk}/${multiplier.value}.svg`,\n\t\t\t// \t),\n\t\t\t// },\n\t\t},\n\t});\n};\n\nexport const createMatterPins = (lines: LinesType) => {\n\treturn PinsController.getConfig(lines).pins.map(({ x, y, size, label }) => {\n\t\treturn MatterJS.Bodies.circle(x, y, size, {\n\t\t\tlabel,\n\t\t\trender: {\n\t\t\t\tfillStyle: config.colors.pin,\n\t\t\t\tvisible: false,\n\t\t\t},\n\t\t\tisStatic: true,\n\t\t});\n\t});\n};\n\nexport const createBall = (props: AddBallProps) => {\n\tconst { lines, risk, position } = props;\n\tif (!lines) {\n\t\tthrow new Error(`Invalid lines - ${lines}`);\n\t}\n\tif (!risk) {\n\t\tthrow new Error(`Invalid risk - ${risk}`);\n\t}\n\tconst { maxBallX, minBallX } = getMinMaxBallX(lines);\n\tif (position && (position > maxBallX || position < minBallX)) {\n\t\talert(`Your ball is over limit ${position}`);\n\t\treturn null;\n\t}\n\t// console.log('GamePlinko - ball cordinates', {\n\t// \tminBallX,\n\t// \tmaxBallX,\n\t// \tballX,\n\t// });\n\tconst isStatic = position === null;\n\tconst radius = getBallRadius(lines);\n\t// console.log('createBall', {\n\t// \tradius,\n\t// \tlines,\n\t// \tgetLinesRatio: getLinesRatio(lines),\n\t// \tscale: config.scale,\n\t// \tconfigBallSize: config.ball.ballSize,\n\t// });\n\tconst id = getIncrId('createBall');\n\treturn MatterJS.Bodies.circle(\n\t\tisStatic ? 0 : Number(position),\n\t\tconfig.ball.y,\n\t\tradius,\n\t\t{\n\t\t\trestitution: 1.2,\n\t\t\tfriction: 0.3,\n\t\t\tfrictionAir: 0.05,\n\t\t\tcollisionFilter: {\n\t\t\t\tgroup: isStatic ? 2 : -1,\n\t\t\t},\n\t\t\trender: {\n\t\t\t\tvisible: !isStatic,\n\t\t\t\tfillStyle: '#0D6EFF',\n\t\t\t\tlineWidth: radius / 2,\n\t\t\t\tstrokeStyle: '#408BFC',\n\t\t\t},\n\t\t\tisStatic,\n\t\t\tlabel: createBallLabel({\n\t\t\t\t...props,\n\t\t\t\tposition: isStatic ? `waiting-${id}` : position,\n\t\t\t}),\n\t\t\tid,\n\t\t},\n\t);\n};\n\nexport const createPlayground = (lines: LinesType, risk: Risk) => {\n\tconst leftWall = createLeftWall(lines);\n\tconst rightWall = createRightWall(lines);\n\tconst floor = createFloor();\n\tconst waitingBalls = !itMayBeTrueTrustMe(NEXT_CONFIG.ENABLE_PLINKO_MOCK)\n\t\t? Array.from({ length: 50 }).map(() => {\n\t\t\t\treturn createBall({\n\t\t\t\t\tlines,\n\t\t\t\t\trisk,\n\t\t\t\t\tposition: null,\n\t\t\t\t\tbetHash: null,\n\t\t\t\t\tisMock: null,\n\t\t\t\t\tpath: [],\n\t\t\t\t});\n\t\t })\n\t\t: [];\n\n\t// const { minX, maxX } = getMinMaxWall(lines);\n\tlet lastMultiplierX: number = null;\n\tconst multipliersBodies = getMultiplierByLinesQnt(lines, risk).map(\n\t\t(multiplier, index) => {\n\t\t\tconst multiplierBody = createMultiplierBox(\n\t\t\t\tmultiplier,\n\t\t\t\tlines,\n\t\t\t\trisk,\n\t\t\t\tlastMultiplierX,\n\t\t\t\tindex,\n\t\t\t);\n\t\t\tlastMultiplierX = multiplierBody.position.x;\n\t\t\treturn multiplierBody;\n\t\t},\n\t);\n\tconst pins = createMatterPins(lines);\n\treturn [\n\t\t...pins,\n\t\t...multipliersBodies,\n\t\t...waitingBalls,\n\t\tleftWall,\n\t\trightWall,\n\t\tfloor,\n\t\t// MatterJS.Bodies.circle(maxX, config.ball.y, config.scale, {\n\t\t// \tcollisionFilter: {\n\t\t// \t\tgroup: -1,\n\t\t// \t},\n\t\t// \trender: {\n\t\t// \t\tvisible: false,\n\t\t// \t\tfillStyle: 'violet',\n\t\t// \t},\n\t\t// \tisStatic: true,\n\t\t// }),\n\t\t// MatterJS.Bodies.circle(minX, config.ball.y, config.scale, {\n\t\t// \tcollisionFilter: {\n\t\t// \t\tgroup: -1,\n\t\t// \t},\n\t\t// \trender: {\n\t\t// \t\tvisible: false,\n\t\t// \t\tfillStyle: 'violet',\n\t\t// \t},\n\t\t// \tisStatic: true,\n\t\t// }),\n\t];\n};\n","import MatterJS from '../../../../../../../common/vendor/deterministicMatter';\nimport { config } from '../../config';\nimport { matterEngine } from './matterInstances';\n\nexport const getBalls = async () => {\n\tconst engine = await matterEngine.get();\n\treturn MatterJS.Composite.allBodies(engine.world).filter((body) =>\n\t\tbody.label.includes(config.labels.ball),\n\t);\n};\n","import { getDataFromBallLabel } from '../../../../methods/getDataFromBallLabel';\nimport { getBalls } from './getBalls';\n\nexport const getWaitingBalls = async () => {\n\treturn (await getBalls()).filter((ball) => {\n\t\tconst data = getDataFromBallLabel(ball.label);\n\t\treturn String(data.position).includes('waiting');\n\t});\n};\n","import { InstanceController } from '@common/controllers/instanceController';\nimport MatterJS from '../../../../../../../common/vendor/deterministicMatter';\nimport { config } from '../../config';\n\nconst createEngine = async () =>\n\tMatterJS.Engine.create({\n\t\tgravity: {\n\t\t\ty: config.engine.engineGravity,\n\t\t},\n\t});\n\nexport const matterEngine = new InstanceController(\n\tcreateEngine,\n);\n\nconst createRunner = async () =>\n\tMatterJS.Runner.create({\n\t\tisFixed: true,\n\t});\n\nexport const matterRunner = new InstanceController(\n\tcreateRunner,\n);\n","import { GameType } from '../../../../../Game/constants/availableGames';\n\nexport const WRAPPER_ID = `${GameType.PLINKO}_wrapper`;\n","import { Body } from '../../../../types/ballsType';\nimport { getBalls } from './getBalls';\n\nexport const getBall = async (label: Body['label']) => {\n\treturn (await getBalls()).find((ball_) => label === ball_._label);\n};\n","import { Risk } from '../../../../types';\n\nexport const getBallColor = (risk: Risk) => {\n\tswitch (risk) {\n\t\tcase Risk.LOW:\n\t\t\treturn {\n\t\t\t\tfill: '#0D6EFF',\n\t\t\t\tline: '#408BFC',\n\t\t\t};\n\t\tcase Risk.MEDIUM:\n\t\t\treturn {\n\t\t\t\tfill: '#c1a73d',\n\t\t\t\tline: '#c7ab7a',\n\t\t\t};\n\t\tcase Risk.HIGH:\n\t\t\treturn {\n\t\t\t\tfill: '#8548b2',\n\t\t\t\tline: '#7c5596',\n\t\t\t};\n\t}\n};\n","import { config } from '../../config';\nimport { pixiApp } from './instances.pixi';\n\nexport const getBalls = async () => {\n\tconst app = await pixiApp.get();\n\treturn app.stage.children.filter((child) => {\n\t\treturn child._label && child._label.includes(config.labels.ball);\n\t});\n};\n","import { getDataFromBallLabel } from '../../../../methods/getDataFromBallLabel';\nimport { getBalls } from './getBalls';\n\nexport const getWaitingBalls = async () => {\n\treturn (await getBalls()).filter((ball) => {\n\t\tconst data = getDataFromBallLabel(ball._label);\n\t\treturn String(data.position).includes('waiting');\n\t});\n};\n","import * as PIXI from 'pixi.js';\n\nconst createPixiWebGLRenderer = (options?: Partial) => {\n\treturn new PIXI.Renderer({\n\t\tpowerPreference: 'high-performance',\n\t\tpremultipliedAlpha: true,\n\t\t...options,\n\t});\n};\n\nexport default createPixiWebGLRenderer;\n","import * as PIXI from 'pixi.js';\nimport createPixiWebGLRenderer from './createPixiWebGLRenderer';\n\nexport const createPixiRenderer = async (\n\toptions: Partial,\n) => {\n\ttry {\n\t\treturn createPixiWebGLRenderer(options);\n\t} catch (e) {\n\t\tconsole.error(e);\n\t\tconst createPixiCanvasRenderer = await import(\n\t\t\t'./createPixiCanvasRenderer'\n\t\t).then((mod) => {\n\t\t\treturn mod.default;\n\t\t});\n\t\treturn createPixiCanvasRenderer(options);\n\t}\n};\n","import * as PIXI from 'pixi.js';\nimport { CanvasRenderer } from 'pixi.js-legacy';\nimport { createPixiRenderer } from './createPixiRenderer';\n\n// export type Instance = PIXI.Application;\n// export type InstanceOptions = Partial;\n\n// export const initPixi = (\n// \telementId: string,\n// \toptions?: InstanceOptions,\n// \tcurrInstance?: Instance,\n// ) => {\n// \tconst wrapper = document.getElementById(elementId) as HTMLCanvasElement;\n// \tconst app = currInstance || new PIXI.Application(options);\n// \tif (wrapper && wrapper.children.length === 0) {\n// \t\t// @ts-expect-error incorrect type\n// \t\twrapper?.appendChild(app.view);\n// \t}\n// \tapp.stage.removeChildren();\n// \treturn app;\n// };\n\nexport interface Instance {\n\tstage: PIXI.Container;\n\trenderer: PIXI.Renderer | CanvasRenderer;\n}\n\nexport type InstanceOptions = Partial;\n\nexport const initPixi = async (\n\telementId: string,\n\toptions?: InstanceOptions,\n\tcurrInstance?: Instance,\n) => {\n\tconst wrapper = document.getElementById(elementId) as HTMLCanvasElement;\n\tconst renderer =\n\t\tcurrInstance?.renderer || (await createPixiRenderer(options));\n\tconst stage = currInstance?.stage || new PIXI.Container();\n\tif (wrapper && wrapper.children.length === 0) {\n\t\t// @ts-expect-error incorrect type\n\t\twrapper?.appendChild(renderer.view);\n\t}\n\tstage.eventMode = 'none';\n\tstage.interactiveChildren = false;\n\tstage.removeChildren();\n\trenderer.render(stage);\n\treturn {\n\t\tstage,\n\t\trenderer,\n\t};\n};\n","import { InstanceController } from '@common/controllers/instanceController';\nimport { config } from '../../config';\nimport { WRAPPER_ID } from '../constants/WRAPPER_ID';\nimport { initPixi, Instance } from './initPixi';\n\nexport const pixiApp = new InstanceController(\n\t(instance: Instance) => {\n\t\treturn initPixi(\n\t\t\tWRAPPER_ID,\n\t\t\t{\n\t\t\t\twidth: config.world.width,\n\t\t\t\theight: config.world.height,\n\t\t\t\tbackgroundAlpha: 0,\n\t\t\t\tantialias: true,\n\t\t\t\tpremultipliedAlpha: false,\n\t\t\t},\n\t\t\tinstance,\n\t\t);\n\t},\n\t{\n\t\tstage: null,\n\t\trenderer: null,\n\t},\n);\n","import { pixiApp } from './instances.pixi';\n\nexport const render = async () => {\n\tconst app = await pixiApp.get();\n\tapp.renderer.render(app.stage);\n};\n","import { useEffect, useMemo, useRef } from 'react';\nimport { Sounds } from '@common/constants/config/sounds';\nimport { SubjectController } from '@common/controllers/subjectController';\nimport { roundNumber } from '@common/methods/roundNumber/roundNumber';\nimport { PlinkoPinCollisionEventDetails } from '@modules/games/PlinkoGame/methods/plinkoTriggerEvents';\nimport audioService from '@legacyApp/client/modules/app/audioService';\nimport { config } from '@modules/games/PlinkoGame/components/playground/config/index';\nimport { PLINKO_PIN_COLLISION_EVENT } from '@modules/games/PlinkoGame/constants';\n\nconst ANIMATION_DURATION = 50;\n\nexport const Pin = ({ x, y, size, label }) => {\n\tconst timeoutRef = useRef(null);\n\tconst pinEl = useRef(null);\n\n\tconst style = useMemo(() => {\n\t\tconst size_ = ((size * 2) / config.world.width) * 100;\n\t\tconst x_ = (x / config.world.width) * 100 - size_ / 2;\n\t\tconst y_ = (y / config.world.height) * 100 - size_ / 2;\n\n\t\treturn {\n\t\t\theight: `${roundNumber(size_, 2)}%`,\n\t\t\tleft: `${roundNumber(x_, 2)}%`,\n\t\t\ttop: `${roundNumber(y_, 2)}%`,\n\t\t\twidth: `${roundNumber(size_, 2)}%`,\n\t\t};\n\t}, [x, y, size]);\n\n\tconst triggerAnimation = () => {\n\t\tif (pinEl.current.classList.contains('pin-animation')) {\n\t\t\treturn;\n\t\t}\n\n\t\tpinEl.current.classList.add('pin-animation');\n\n\t\tif (timeoutRef.current) {\n\t\t\tclearTimeout(timeoutRef.current);\n\t\t}\n\n\t\ttimeoutRef.current = setTimeout(() => {\n\t\t\tpinEl.current.classList.remove('pin-animation');\n\t\t}, ANIMATION_DURATION);\n\t};\n\n\tconst onPinCollision = (details: PlinkoPinCollisionEventDetails) => {\n\t\tconst { pinLabel } = details;\n\n\t\tif (!pinLabel || pinLabel !== label) {\n\t\t\treturn;\n\t\t}\n\n\t\taudioService.play(Sounds.pin, false, 0.8);\n\n\t\ttriggerAnimation();\n\t};\n\n\tuseEffect(() => {\n\t\tconst handler = SubjectController.subscribe(\n\t\t\tPLINKO_PIN_COLLISION_EVENT,\n\t\t\tonPinCollision,\n\t\t);\n\n\t\treturn () => {\n\t\t\thandler.unsubscribe();\n\n\t\t\tif (timeoutRef.current) {\n\t\t\t\tclearTimeout(timeoutRef.current);\n\t\t\t}\n\t\t};\n\t}, []);\n\n\treturn
;\n};\n","import { FC, memo } from 'react';\nimport styled from 'styled-components';\nimport { LinesType } from '../../types';\nimport { PinsController } from '../../controllers/PinsController';\nimport { Pin } from './Pin';\n\nexport const PinsLayer: FC<{\n\tlines?: LinesType;\n}> = memo(({ lines }) => {\n\tconst pins = PinsController.getConfig(lines).pins;\n\n\treturn (\n\t\t\n\t\t\t{pins.map((props, index) => {\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\t})}\n\t\t\n\t);\n});\n\nexport const PinBoxesStyled = styled.div`\n\theight: 100%;\n\tposition: absolute;\n\ttop: 0;\n\twidth: 100%;\n`;\n","import React, { FC, PropsWithChildren, useMemo } from 'react';\nimport styled from 'styled-components';\n\nimport { parseImageSrc } from '@common/components/default/Image/Image';\nimport { roundNumber } from '@common/methods/roundNumber/roundNumber';\nimport { GameType } from '@modules/games/Game/constants/availableGames';\nimport { usePlinkoLinesSelector } from '@modules/games/Game/store/plinko/selectors/usePlinkoLinesSelector';\nimport { usePlinkoWorldRatio } from '@modules/games/PlinkoGame/components/playground/components/GameBody/usePlinkoWorldRatio';\nimport { config } from '@modules/games/PlinkoGame/components/playground/config';\nimport { getPinConfig } from '@modules/games/PlinkoGame/methods/getPinConfig';\nimport { LinesType } from '@modules/games/PlinkoGame/types';\n\nimport { MultiplierBoxes } from '@modules/games/PlinkoGame/components/MuliplierBoxes/MultiplierBoxes';\nimport { PinsLayer } from '@modules/games/PlinkoGame/components/PinsLayer/PinsLayer';\n\nconst getMultiplierBoxesTop = (rows, scale) => {\n\tconst pinConfig = getPinConfig(rows, rows - 1, 0);\n\n\tconst pinsLastRowY =\n\t\t(pinConfig.y / config.world.height) * 100 - pinConfig.size / 2;\n\n\tconst scaleBreakpointForBiggerGap = 0.5;\n\n\tconst gapSmall = '0px';\n\n\tconst gapBigForMinRows = 8;\n\n\tconst gapBigForMaxRows = 14;\n\n\tconst gapBig = `${gapBigForMaxRows - 0.75 * (rows - gapBigForMinRows)}px`;\n\n\treturn `calc(${roundNumber(pinsLastRowY, 2)}% + (${scale} * ${\n\t\tscale < scaleBreakpointForBiggerGap ? gapSmall : gapBig\n\t}))`;\n};\n\nconst getMultipliersWidth = (rows, scale) => {\n\tconst space = scale * config.pins.pinSize;\n\n\tconst minX = getPinConfig(rows, rows - 1, 0)?.x;\n\n\tconst maxX = getPinConfig(rows, rows - 1, rows + 1)?.x;\n\n\tconst diff = maxX - minX;\n\n\tconst width = diff - space;\n\n\treturn `${width}px`;\n};\n\nconst getGap = (rows) => {\n\tconst pinConfig = getPinConfig(rows, rows - 1, 0);\n\n\treturn `${roundNumber(pinConfig.size / 2, 2)}px`;\n};\n\nexport const PlinkoGameBody: FC> = ({ children }) => {\n\tconst lines = usePlinkoLinesSelector();\n\n\tconst { worldToCanvasRatio, elementRef } = usePlinkoWorldRatio();\n\n\tconst style = useMemo(\n\t\t() => ({\n\t\t\ttop: getMultiplierBoxesTop(lines, worldToCanvasRatio || 1),\n\t\t\twidth: getMultipliersWidth(lines, worldToCanvasRatio || 1),\n\t\t\ttransform: `translateX(-50%) scale(${worldToCanvasRatio})`,\n\t\t}),\n\t\t[lines, worldToCanvasRatio],\n\t);\n\n\tconst styleGap = useMemo(\n\t\t() => ({\n\t\t\tgap: getGap(lines),\n\t\t}),\n\t\t[lines],\n\t);\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t{children || }\n\t\t\t\n\n\t\t\t\n\n\t\t\t{worldToCanvasRatio && (\n\t\t\t\t\n\t\t\t)}\n\t\t\n\t);\n};\n\nexport const PlinkoCanvasWrapperStyled = styled.div`\n\talign-items: center;\n\tdisplay: flex;\n\tjustify-content: center;\n`;\n\ninterface PlinkoGameBodyStyledProps {\n\t$scale: number;\n\t$rows: LinesType;\n}\n\nexport const PlinkoGameBodyStyled = styled.div`\n\tmax-width: ${config.world.element}px;\n\tmin-height: 100px;\n\tposition: relative;\n\twidth: 100%;\n\n\t&:before {\n\t\tbackground-image: url(${parseImageSrc(\n\t\t\t`/img/plinko/spaceship.svg`,\n\t\t)}) !important;\n\t\tbackground-position: center top;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-size: contain;\n\t\tcontent: '';\n\t\tdisplay: block;\n\t\theight: 100%;\n\t\tleft: 51.5%;\n\t\tposition: absolute;\n\t\ttop: -22.5%;\n\t\ttransform: translateX(-50%);\n\t\twidth: 100%;\n\t}\n\n\tcanvas {\n\t\theight: unset !important;\n\t\twidth: 100% !important;\n\t}\n\n\t@media (max-width: ${(props) => props.theme.media.maxWidthTablet}) {\n\t\twidth: calc((var(--vh, 1vh) * 100) - 380px);\n\t}\n\n\t@media (max-height: 669px) and (max-width: ${(props) =>\n\t\t\tprops.theme.media.maxWidthTablet}) {\n\t\twidth: calc((var(--vh, 1vh) * 100) - 300px);\n\t}\n`;\n","import { useCallback, useEffect, useRef, useState } from 'react';\nimport { useAppHeight, useAppWidth } from '@common/selectors/app.selectors';\nimport { useWindowEventListener } from '@common/hooks/useEventListener';\nimport { config } from '../../config';\nimport { GAME_LOADED_EVENT } from '../../../../../Game/constants/events';\n\nexport const usePlinkoWorldRatio = () => {\n\tconst elementRef = useRef(null);\n\tconst width = useAppWidth();\n\tconst height = useAppHeight();\n\n\tconst get = useCallback(() => {\n\t\tconst clientHeight = elementRef?.current?.clientHeight;\n\t\tconst clientWidth = elementRef?.current?.clientWidth;\n\t\tif (!clientHeight || !clientWidth) {\n\t\t\treturn null;\n\t\t}\n\t\tconst height_ = clientHeight || height;\n\t\tconst width_ = clientWidth || width;\n\t\tconst size = Math.min(width_, height_);\n\t\tif (\n\t\t\telementRef?.current?.clientWidth &&\n\t\t\tsize !== config.world.element &&\n\t\t\theight_\n\t\t) {\n\t\t\treturn size / config.world.width;\n\t\t}\n\t\treturn config.world.element / config.world.width;\n\t}, [height, width]);\n\tconst [worldToCanvasRatio, setWorldToCanvasRatio] = useState(null);\n\n\tconst update = useCallback(() => {\n\t\tconst ratio = get();\n\t\tif (ratio !== worldToCanvasRatio) {\n\t\t\tsetWorldToCanvasRatio(ratio);\n\t\t}\n\t}, [get, worldToCanvasRatio]);\n\n\tuseEffect(() => {\n\t\tupdate();\n\t}, [update]);\n\n\tuseWindowEventListener(GAME_LOADED_EVENT, () => {\n\t\tupdate();\n\t});\n\n\treturn {\n\t\telementRef,\n\t\tworldToCanvasRatio,\n\t};\n};\n","import { GameType } from '@modules/games/Game/constants/availableGames';\n\nexport const PLINKO_PIN_COLLISION_EVENT = `${GameType.PLINKO}:event:pin-collision`;\nexport const PLINKO_RESULT_EVENT = `${GameType.PLINKO}:event:result`;\nexport const PLINKO_BET_ERROR_EVENT = `${GameType.PLINKO}:event:bet-error`;\n","import { isFunction } from '@common/methods/isFunction';\nimport { LinesType } from '../types';\nimport { config } from '../components/playground/config';\nimport { getPinConfig } from './getPinConfig';\n\nexport interface PinProps {\n\tx: number;\n\ty: number;\n\tsize: number;\n\tlabel: string;\n\tlevelIndex: number;\n\tindex: number;\n}\n\nexport const createPinLabel = ({\n\tlevel,\n\tindex,\n\tlines,\n}: {\n\tlevel: number;\n\tindex: number;\n\tlines: LinesType;\n}) => {\n\treturn `${config.labels.pin}||${level + 1}-${index + 1}||${lines}`;\n};\n\nexport const getDataFromPinLabel = (label: string) => {\n\tconst [type, position, lines] = label.split('||');\n\tconst [level, index] = position.split('-').map(Number);\n\treturn { type, level, index, lines: Number(lines) as LinesType } as const;\n};\n\nexport const createPins = (\n\tlines: LinesType,\n\tcallback?: ({ x, y, size, label, levelIndex, index }: PinProps) => T,\n): T[] => {\n\tconst pins: T[] = [];\n\t// console.log('createPins', {\n\t// \tlines,\n\t// \tpinSize,\n\t// \tgap,\n\t// \tpins: config.pins,\n\t// });\n\n\tfor (let l = 0; l < lines; l++) {\n\t\tconst linePins = config.pins.startPins + l;\n\t\tfor (let i = 0; i < linePins; i++) {\n\t\t\tconst { x, y, size, levelIndex, index } = getPinConfig(lines, l, i);\n\t\t\tconst label = createPinLabel({ level: l, index: i, lines });\n\t\t\tconst pin = isFunction(callback)\n\t\t\t\t? callback({ x, y, size, label, levelIndex, index })\n\t\t\t\t: { x, y, size, label, levelIndex, index };\n\t\t\t// @ts-expect-error invalid type\n\t\t\tpins.push(pin);\n\t\t}\n\t}\n\n\treturn pins;\n};\n","import { LinesType } from '../types';\nimport { createPins, PinProps } from '../methods/createPins';\n\nclass PinsControllerClass {\n\tprivate config: Record<\n\t\tnumber,\n\t\t{\n\t\t\tpins: PinProps[];\n\t\t\tlevelsPositions: number[];\n\t\t}\n\t>;\n\n\tconstructor() {\n\t\tthis.config = {};\n\t}\n\n\tsetConfig(lines: LinesType) {\n\t\tconst pins = createPins(lines);\n\t\tthis.config[lines] = {\n\t\t\tpins,\n\t\t\tlevelsPositions: pins.reduce((acc, pin) => {\n\t\t\t\tif (!acc.includes(pin.y)) {\n\t\t\t\t\tacc.push(pin.y);\n\t\t\t\t}\n\t\t\t\treturn acc;\n\t\t\t}, [] as number[]),\n\t\t};\n\t}\n\n\tgetPinConfig(lines: LinesType, levelIndex: number, index: number) {\n\t\treturn this.getConfig(lines).pins.find(\n\t\t\t(pin) => pin.levelIndex === levelIndex && pin.index === index,\n\t\t);\n\t}\n\n\tgetConfig(lines: LinesType) {\n\t\tif (!this.config?.[lines]) {\n\t\t\tthis.setConfig(lines);\n\t\t}\n\t\treturn this.config[lines];\n\t}\n}\n\nexport const PinsController = new PinsControllerClass();\n","import { LinesType } from '../types';\nimport { config } from '../components/playground/config';\nimport { getLinesRatio } from './getLinesRatio';\n\nexport const getBallRadius = (lines: LinesType) => {\n\treturn getLinesRatio(lines) * config.ball.ballSize;\n};\n","import { getTimestamp } from '@legacyApp/client/modules/app/timeService';\nimport { isTrueOrZero } from '@common/methods/isTrueOrZero';\nimport { config } from '../components/playground/config';\nimport { LinesType, Risk } from '../types';\nimport { AddBallProps } from './addBall';\n\ninterface GetDataFromBallLabelResult extends AddBallProps {\n\tname: string;\n\ttimestamp: number;\n}\n\nexport const getDataFromBallLabel = (\n\tballLabel: string,\n): GetDataFromBallLabelResult => {\n\tconst [name, lines, position, betHash, risk, isMock, timestamp, path] =\n\t\tballLabel.split('||');\n\treturn {\n\t\tname,\n\t\tlines: Number(lines) as LinesType,\n\t\tbetHash,\n\t\trisk: String(risk) as Risk,\n\t\tposition: isTrueOrZero(Number(position)) ? Number(position) : position,\n\t\tisMock: Boolean(Number(isMock)),\n\t\ttimestamp: Number(timestamp),\n\t\tpath: path.split('').map(Number),\n\t};\n};\n\nexport const createBallLabel = ({\n\tlines,\n\tposition,\n\tbetHash,\n\trisk,\n\tisMock,\n\tpath,\n}: AddBallProps) => {\n\treturn `${config.labels.ball}||${lines}||${position}||${\n\t\tbetHash || ''\n\t}||${risk}||${isMock ? 1 : 0}||${getTimestamp()}||${path.join('')}`;\n};\n","import { LinesType } from '../types';\nimport { config } from '../components/playground/config';\n\nimport { getPyramidHeight } from './getPyramidHeight';\n\nexport const getLinesRatio = (lines: LinesType) => {\n\tif (!lines) {\n\t\tthrow new Error(`Invalid lines - ${lines}`);\n\t}\n\tconst pinGapToPinSizeRatio = config.pins.pinGap / config.pins.pinSize;\n\tconst pyramidHeight = getPyramidHeight();\n\tconst pinSize = pyramidHeight / (lines + pinGapToPinSizeRatio * (lines - 1));\n\treturn pinSize / config.pins.pinSize;\n};\n","import { roundNumber } from '@common/methods/roundNumber/roundNumber';\nimport { LinesType } from '../types';\nimport { PinsController } from '../controllers/PinsController';\n\nexport const getMinMaxBallX = (lines: LinesType, precision = 13) => {\n\tconst { x: min } = PinsController.getPinConfig(lines, 0, 0);\n\tconst { x: max } = PinsController.getPinConfig(lines, 0, 2);\n\treturn {\n\t\tmaxBallX: roundNumber(max, precision, 'floor'),\n\t\tminBallX: roundNumber(min, precision, 'ceil'),\n\t};\n};\n","export const getPayoutIndexFromPath = (path: number[]) => {\n\treturn path.reduce(\n\t\t(previousValue, currentValue) => previousValue + currentValue,\n\t\t0,\n\t);\n};\n","import { LinesType } from '../types';\nimport { config } from '../components/playground/config';\nimport { getLinesRatio } from './getLinesRatio';\nimport { getPinRadius } from './getPinRadius';\n\nexport const getPinConfig = (\n\tlines: LinesType,\n\tlevelIndex: number,\n\tindex: number,\n) => {\n\tconst linesRatio = getLinesRatio(lines);\n\tconst pinSize = getPinRadius(lines);\n\tconst gap = config.pins.pinGap * linesRatio;\n\tconst linePins = config.pins.startPins + levelIndex;\n\tconst lineWidth = linePins * gap;\n\tconst pinX = config.world.width / 2 - lineWidth / 2 + index * gap + gap / 2;\n\tconst pinY =\n\t\tconfig.ball.y + config.pins.startToPinsSpace + levelIndex * (gap + pinSize);\n\treturn { x: pinX, y: pinY, size: pinSize, levelIndex, index };\n};\n","import { LinesType } from '../types';\nimport { config } from '../components/playground/config';\nimport { getLinesRatio } from './getLinesRatio';\n\nexport const getPinRadius = (lines: LinesType) => {\n\treturn config.pins.pinSize * getLinesRatio(lines);\n};\n","import { config } from '../components/playground/config';\n\nexport const getPyramidHeight = () => {\n\tconst pinGapToPinSizeRatio = config.pins.pinGap / config.pins.pinSize;\n\tconst pyramidHeightToPinSizeRatio = 16 + pinGapToPinSizeRatio * 15;\n\treturn config.pins.pinSize * pyramidHeightToPinSizeRatio;\n};\n","import { SubjectController } from '@common/controllers/subjectController';\n\nimport { PLINKO_RESULT_EVENT } from '@modules/games/PlinkoGame/constants';\nimport { BallResult } from '@modules/games/PlinkoGame/types/ballResult';\n\nexport interface PlinkoPinCollisionEventDetails {\n\tpinLabel: string;\n}\n\nexport type PlinkoResultEventDetails = BallResult;\n\nexport const plinkoResultEvent = ({\n\tlines,\n\tballLabel,\n\tpayoutIndex,\n}: PlinkoResultEventDetails) => {\n\tSubjectController.emit(PLINKO_RESULT_EVENT, {\n\t\tlines,\n\t\tballLabel,\n\t\tpayoutIndex,\n\t});\n};\n","import { Body } from '../../../../types/ballsType';\nimport { getBalls } from './getBalls';\n\nexport const getBall = async (label: Body['label']) => {\n\treturn (await getBalls()).find((ball_) => label === ball_.label);\n};\n","import { getTimestamp } from '@legacyApp/client/modules/app/timeService';\nimport { itMayBeTrueTrustMe } from '@common/methods/itMayBeTrueTrustMe';\nimport { NEXT_CONFIG } from '@common/constants/config/nextConfig';\nimport MatterJS from '../../../../../../../common/vendor/deterministicMatter';\nimport { Body } from '../../../../types/ballsType';\nimport {\n\tcreateBallLabel,\n\tgetDataFromBallLabel,\n} from '../../../../methods/getDataFromBallLabel';\nimport { matterEngine } from './matterInstances';\nimport { getWaitingBalls } from './getWaitingBalls';\nimport { getBall } from './getBall';\n\nexport const removeBallMatterJs = async (label: Body['label']) => {\n\tconst ball = await getBall(label);\n\tconst waitingBalls = await getWaitingBalls();\n\tif (\n\t\twaitingBalls.length >= 50 ||\n\t\titMayBeTrueTrustMe(NEXT_CONFIG.ENABLE_PLINKO_MOCK)\n\t) {\n\t\tball.collisionFilter.group = 2;\n\t\tconst engine = await matterEngine.get();\n\t\tMatterJS.World.remove(engine.world, ball);\n\t} else {\n\t\tconst data = getDataFromBallLabel(ball.label);\n\t\tMatterJS.Body.set(ball, {\n\t\t\trender: {\n\t\t\t\t...ball.render,\n\t\t\t\tvisible: false,\n\t\t\t},\n\t\t\tcollisionFilter: {\n\t\t\t\t...ball.collisionFilter,\n\t\t\t\tgroup: 2,\n\t\t\t},\n\t\t\tisStatic: true,\n\t\t\tlabel: createBallLabel({\n\t\t\t\t...data,\n\t\t\t\tbetHash: null,\n\t\t\t\tposition: `waiting-${getTimestamp()}`,\n\t\t\t}),\n\t\t});\n\t\tMatterJS.Body.setPosition(ball, {\n\t\t\tx: 0,\n\t\t\ty: 0,\n\t\t});\n\t}\n};\n","import { getTimestamp } from '@legacyApp/client/modules/app/timeService';\nimport { getIncrId } from '@common/methods/incrementingId';\nimport { roundNumber } from '@common/methods/roundNumber/roundNumber';\nimport { Body } from '../../../../types/ballsType';\nimport {\n\tcreateBallLabel,\n\tgetDataFromBallLabel,\n} from '../../../../methods/getDataFromBallLabel';\nimport { config } from '../../config';\nimport { getBall } from './getBall';\nimport { pixiApp } from './instances.pixi';\nimport { getWaitingBalls } from './getWaitingBalls';\nimport { render } from './render';\n\nexport const removeBallPixiJs = async (label: Body['label']) => {\n\tconst ball = await getBall(label);\n\tif (!ball) {\n\t\treturn;\n\t}\n\tconst waitingBalls = await getWaitingBalls();\n\tconst app = await pixiApp.get();\n\tif (waitingBalls.length >= 50) {\n\t\tapp.stage.removeChild(ball);\n\t} else {\n\t\tball.position.set(roundNumber(config.world.width / 2, 0), config.ball.y);\n\t\tconst id = getIncrId('createBall');\n\t\tball._label = createBallLabel({\n\t\t\t...getDataFromBallLabel(ball._label),\n\t\t\tbetHash: null,\n\t\t\tposition: `waiting-${getTimestamp()}-${id}`,\n\t\t});\n\t\tball._animateComponent.reset();\n\t\tball._animateComponent = null;\n\t}\n\trender();\n};\n","import { removeBallMatterJs } from '../components/playground/MatterJs/methods/removeBallMatterJs';\nimport { removeBallPixiJs } from '../components/playground/PixiJS/methods/removeBallPixiJs';\nimport { Mode } from '../components/playground/config/constants';\nimport { config } from '../components/playground/config';\n\nexport const removeBall = async (label: string) => {\n\tif (config.mode === Mode.PIXI) {\n\t\treturn await removeBallPixiJs(label);\n\t}\n\tif (config.mode === Mode.MATTER) {\n\t\treturn await removeBallMatterJs(label);\n\t}\n};\n","import { AppThunk } from '@legacyApp/types/store/ThunkAction';\nimport { handleAnimatedBetThunk } from '../../game/thunks/handleAnimatedBet.thunk';\nimport { GameType } from '../../../constants/availableGames';\n\nexport const plinkoBallResultThunk = (betHash: string): AppThunk => {\n\treturn async (dispatch) => {\n\t\tdispatch(handleAnimatedBetThunk(GameType.PLINKO, betHash));\n\t};\n};\n","import { shallowEqual } from 'react-redux';\nimport { useAppSelector } from '@legacyApp/hooks/store/useAppSelector';\nimport { RootState } from '@legacyApp/client/store/configure.store';\nimport { parsePosition } from '../methods/createPosition';\n\nexport const usePlinkoPositionSelector = () =>\n\tuseAppSelector(\n\t\t(state) => state.plinko?.position,\n\t\tshallowEqual,\n\t);\n\nexport const usePlinkoParsedPositionSelector = () => {\n\tconst position = usePlinkoPositionSelector();\n\treturn parsePosition(position);\n};\n","import { useEffect } from 'react';\nimport { useAppDispatch } from '@legacyApp/hooks/store/useAppDispatch';\nimport { usePlinkoLinesSelector } from '../../Game/store/plinko/selectors/usePlinkoLinesSelector';\nimport { usePlinkoRiskSelector } from '../../Game/store/plinko/selectors/usePlinkoRiskSelector';\nimport { getMultiplierByLinesQnt } from '../components/MuliplierBoxes/multipliers';\nimport { useGamePayout } from '../../Game/store/game/game.selectors';\nimport { GameType } from '../../Game/constants/availableGames';\nimport { changePayoutThunk } from '../../Game/store/game/thunks/changePayoutThunk';\n\nexport const usePlinkoUpdatePayout = () => {\n\tconst dispatch = useAppDispatch();\n\tconst payout = useGamePayout(GameType.PLINKO);\n\tconst lines = usePlinkoLinesSelector();\n\tconst risk = usePlinkoRiskSelector();\n\n\tuseEffect(() => {\n\t\tconst { value } = getMultiplierByLinesQnt(lines, risk)[0];\n\t\tif (value !== payout) {\n\t\t\tdispatch(changePayoutThunk(value, GameType.PLINKO));\n\t\t}\n\t}, [dispatch, lines, payout, risk]);\n};\n","import { AppThunk } from '@legacyApp/types/store/ThunkAction';\nimport {\n\tgetPayout,\n\tgetWinChanceFromPayout,\n} from '@legacyApp/client/modules/app/gameService';\nimport { validatePayout } from '@legacyApp/client/modules/app/validateService';\nimport { GameType } from '../../../constants/availableGames';\nimport { parseSingleBetValue } from '../../../methods/getWinChanceFromBetValues';\nimport { diceActions } from '../../dice/dice.actions';\nimport { RollRule } from '../../../types/RollRule';\nimport { updatePayoutThunk } from './updatePayout.thunk';\nimport { updateWinChanceThunk } from './updateWinChance.thunk';\n\nexport const changePayoutThunk = (value: number, game: GameType): AppThunk => {\n\treturn (dispatch) => {\n\t\tif ([GameType.LIMBO, GameType.PLINKO].indexOf(game) === -1) {\n\t\t\tvalue = getPayout(getWinChanceFromPayout(value, game), game);\n\t\t}\n\t\tconst { amount } = validatePayout(value, game);\n\t\tdispatch(updatePayoutThunk(amount, game, true));\n\t\tconst winChance = getWinChanceFromPayout(amount, game);\n\t\tdispatch(updateWinChanceThunk(winChance, game));\n\t\tif (game === GameType.DICE) {\n\t\t\tdispatch(\n\t\t\t\tdiceActions.singleValueUpdate(\n\t\t\t\t\tparseSingleBetValue(winChance, RollRule.UNDER),\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t};\n};\n","import MatterJS from '../../../../../../../common/vendor/deterministicMatter';\nimport { config } from '../../config';\nimport { AddBallProps } from '../../../../methods/addBall';\nimport { createBallLabel } from '../../../../methods/getDataFromBallLabel';\nimport { createBall } from './createPlayground';\nimport { matterEngine } from './matterInstances';\nimport { getWaitingBalls } from './getWaitingBalls';\n\nconst { Composite } = MatterJS;\n\nexport const addBallMatterJs = async (props: AddBallProps) => {\n\tconst { position } = props;\n\tif (!position) {\n\t\treturn null;\n\t}\n\tconst waitingBalls = await getWaitingBalls();\n\tif (waitingBalls?.length) {\n\t\tconst label = createBallLabel(props);\n\t\tconst ball = waitingBalls[0];\n\t\tMatterJS.Body.setPosition(ball, {\n\t\t\tx: Number(position),\n\t\t\ty: config.ball.y,\n\t\t});\n\t\tMatterJS.Body.set(ball, {\n\t\t\trender: {\n\t\t\t\t...ball.render,\n\t\t\t\tvisible: true,\n\t\t\t},\n\t\t\tcollisionFilter: {\n\t\t\t\t...ball.collisionFilter,\n\t\t\t\tgroup: -1,\n\t\t\t},\n\t\t\tisStatic: false,\n\t\t\tlabel,\n\t\t});\n\t\treturn label;\n\t}\n\tconst ball = createBall(props);\n\tif (!ball) {\n\t\treturn null;\n\t}\n\tconst engine = await matterEngine.get();\n\tComposite.add(engine.world, ball);\n\treturn ball.label;\n};\n","/**\n * The Ease class provides a collection of easing functions for use with tween.js.\n */\nvar Easing = Object.freeze({\n Linear: Object.freeze({\n None: function (amount) {\n return amount;\n },\n In: function (amount) {\n return this.None(amount);\n },\n Out: function (amount) {\n return this.None(amount);\n },\n InOut: function (amount) {\n return this.None(amount);\n },\n }),\n Quadratic: Object.freeze({\n In: function (amount) {\n return amount * amount;\n },\n Out: function (amount) {\n return amount * (2 - amount);\n },\n InOut: function (amount) {\n if ((amount *= 2) < 1) {\n return 0.5 * amount * amount;\n }\n return -0.5 * (--amount * (amount - 2) - 1);\n },\n }),\n Cubic: Object.freeze({\n In: function (amount) {\n return amount * amount * amount;\n },\n Out: function (amount) {\n return --amount * amount * amount + 1;\n },\n InOut: function (amount) {\n if ((amount *= 2) < 1) {\n return 0.5 * amount * amount * amount;\n }\n return 0.5 * ((amount -= 2) * amount * amount + 2);\n },\n }),\n Quartic: Object.freeze({\n In: function (amount) {\n return amount * amount * amount * amount;\n },\n Out: function (amount) {\n return 1 - --amount * amount * amount * amount;\n },\n InOut: function (amount) {\n if ((amount *= 2) < 1) {\n return 0.5 * amount * amount * amount * amount;\n }\n return -0.5 * ((amount -= 2) * amount * amount * amount - 2);\n },\n }),\n Quintic: Object.freeze({\n In: function (amount) {\n return amount * amount * amount * amount * amount;\n },\n Out: function (amount) {\n return --amount * amount * amount * amount * amount + 1;\n },\n InOut: function (amount) {\n if ((amount *= 2) < 1) {\n return 0.5 * amount * amount * amount * amount * amount;\n }\n return 0.5 * ((amount -= 2) * amount * amount * amount * amount + 2);\n },\n }),\n Sinusoidal: Object.freeze({\n In: function (amount) {\n return 1 - Math.sin(((1.0 - amount) * Math.PI) / 2);\n },\n Out: function (amount) {\n return Math.sin((amount * Math.PI) / 2);\n },\n InOut: function (amount) {\n return 0.5 * (1 - Math.sin(Math.PI * (0.5 - amount)));\n },\n }),\n Exponential: Object.freeze({\n In: function (amount) {\n return amount === 0 ? 0 : Math.pow(1024, amount - 1);\n },\n Out: function (amount) {\n return amount === 1 ? 1 : 1 - Math.pow(2, -10 * amount);\n },\n InOut: function (amount) {\n if (amount === 0) {\n return 0;\n }\n if (amount === 1) {\n return 1;\n }\n if ((amount *= 2) < 1) {\n return 0.5 * Math.pow(1024, amount - 1);\n }\n return 0.5 * (-Math.pow(2, -10 * (amount - 1)) + 2);\n },\n }),\n Circular: Object.freeze({\n In: function (amount) {\n return 1 - Math.sqrt(1 - amount * amount);\n },\n Out: function (amount) {\n return Math.sqrt(1 - --amount * amount);\n },\n InOut: function (amount) {\n if ((amount *= 2) < 1) {\n return -0.5 * (Math.sqrt(1 - amount * amount) - 1);\n }\n return 0.5 * (Math.sqrt(1 - (amount -= 2) * amount) + 1);\n },\n }),\n Elastic: Object.freeze({\n In: function (amount) {\n if (amount === 0) {\n return 0;\n }\n if (amount === 1) {\n return 1;\n }\n return -Math.pow(2, 10 * (amount - 1)) * Math.sin((amount - 1.1) * 5 * Math.PI);\n },\n Out: function (amount) {\n if (amount === 0) {\n return 0;\n }\n if (amount === 1) {\n return 1;\n }\n return Math.pow(2, -10 * amount) * Math.sin((amount - 0.1) * 5 * Math.PI) + 1;\n },\n InOut: function (amount) {\n if (amount === 0) {\n return 0;\n }\n if (amount === 1) {\n return 1;\n }\n amount *= 2;\n if (amount < 1) {\n return -0.5 * Math.pow(2, 10 * (amount - 1)) * Math.sin((amount - 1.1) * 5 * Math.PI);\n }\n return 0.5 * Math.pow(2, -10 * (amount - 1)) * Math.sin((amount - 1.1) * 5 * Math.PI) + 1;\n },\n }),\n Back: Object.freeze({\n In: function (amount) {\n var s = 1.70158;\n return amount === 1 ? 1 : amount * amount * ((s + 1) * amount - s);\n },\n Out: function (amount) {\n var s = 1.70158;\n return amount === 0 ? 0 : --amount * amount * ((s + 1) * amount + s) + 1;\n },\n InOut: function (amount) {\n var s = 1.70158 * 1.525;\n if ((amount *= 2) < 1) {\n return 0.5 * (amount * amount * ((s + 1) * amount - s));\n }\n return 0.5 * ((amount -= 2) * amount * ((s + 1) * amount + s) + 2);\n },\n }),\n Bounce: Object.freeze({\n In: function (amount) {\n return 1 - Easing.Bounce.Out(1 - amount);\n },\n Out: function (amount) {\n if (amount < 1 / 2.75) {\n return 7.5625 * amount * amount;\n }\n else if (amount < 2 / 2.75) {\n return 7.5625 * (amount -= 1.5 / 2.75) * amount + 0.75;\n }\n else if (amount < 2.5 / 2.75) {\n return 7.5625 * (amount -= 2.25 / 2.75) * amount + 0.9375;\n }\n else {\n return 7.5625 * (amount -= 2.625 / 2.75) * amount + 0.984375;\n }\n },\n InOut: function (amount) {\n if (amount < 0.5) {\n return Easing.Bounce.In(amount * 2) * 0.5;\n }\n return Easing.Bounce.Out(amount * 2 - 1) * 0.5 + 0.5;\n },\n }),\n generatePow: function (power) {\n if (power === void 0) { power = 4; }\n power = power < Number.EPSILON ? Number.EPSILON : power;\n power = power > 10000 ? 10000 : power;\n return {\n In: function (amount) {\n return Math.pow(amount, power);\n },\n Out: function (amount) {\n return 1 - Math.pow((1 - amount), power);\n },\n InOut: function (amount) {\n if (amount < 0.5) {\n return Math.pow((amount * 2), power) / 2;\n }\n return (1 - Math.pow((2 - amount * 2), power)) / 2 + 0.5;\n },\n };\n },\n});\n\nvar now = function () { return performance.now(); };\n\n/**\n * Controlling groups of tweens\n *\n * Using the TWEEN singleton to manage your tweens can cause issues in large apps with many components.\n * In these cases, you may want to create your own smaller groups of tween\n */\nvar Group = /** @class */ (function () {\n function Group() {\n this._tweens = {};\n this._tweensAddedDuringUpdate = {};\n }\n Group.prototype.getAll = function () {\n var _this = this;\n return Object.keys(this._tweens).map(function (tweenId) {\n return _this._tweens[tweenId];\n });\n };\n Group.prototype.removeAll = function () {\n this._tweens = {};\n };\n Group.prototype.add = function (tween) {\n this._tweens[tween.getId()] = tween;\n this._tweensAddedDuringUpdate[tween.getId()] = tween;\n };\n Group.prototype.remove = function (tween) {\n delete this._tweens[tween.getId()];\n delete this._tweensAddedDuringUpdate[tween.getId()];\n };\n Group.prototype.update = function (time, preserve) {\n if (time === void 0) { time = now(); }\n if (preserve === void 0) { preserve = false; }\n var tweenIds = Object.keys(this._tweens);\n if (tweenIds.length === 0) {\n return false;\n }\n // Tweens are updated in \"batches\". If you add a new tween during an\n // update, then the new tween will be updated in the next batch.\n // If you remove a tween during an update, it may or may not be updated.\n // However, if the removed tween was added during the current batch,\n // then it will not be updated.\n while (tweenIds.length > 0) {\n this._tweensAddedDuringUpdate = {};\n for (var i = 0; i < tweenIds.length; i++) {\n var tween = this._tweens[tweenIds[i]];\n var autoStart = !preserve;\n if (tween && tween.update(time, autoStart) === false && !preserve) {\n delete this._tweens[tweenIds[i]];\n }\n }\n tweenIds = Object.keys(this._tweensAddedDuringUpdate);\n }\n return true;\n };\n return Group;\n}());\n\n/**\n *\n */\nvar Interpolation = {\n Linear: function (v, k) {\n var m = v.length - 1;\n var f = m * k;\n var i = Math.floor(f);\n var fn = Interpolation.Utils.Linear;\n if (k < 0) {\n return fn(v[0], v[1], f);\n }\n if (k > 1) {\n return fn(v[m], v[m - 1], m - f);\n }\n return fn(v[i], v[i + 1 > m ? m : i + 1], f - i);\n },\n Bezier: function (v, k) {\n var b = 0;\n var n = v.length - 1;\n var pw = Math.pow;\n var bn = Interpolation.Utils.Bernstein;\n for (var i = 0; i <= n; i++) {\n b += pw(1 - k, n - i) * pw(k, i) * v[i] * bn(n, i);\n }\n return b;\n },\n CatmullRom: function (v, k) {\n var m = v.length - 1;\n var f = m * k;\n var i = Math.floor(f);\n var fn = Interpolation.Utils.CatmullRom;\n if (v[0] === v[m]) {\n if (k < 0) {\n i = Math.floor((f = m * (1 + k)));\n }\n return fn(v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m], f - i);\n }\n else {\n if (k < 0) {\n return v[0] - (fn(v[0], v[0], v[1], v[1], -f) - v[0]);\n }\n if (k > 1) {\n return v[m] - (fn(v[m], v[m], v[m - 1], v[m - 1], f - m) - v[m]);\n }\n return fn(v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2], f - i);\n }\n },\n Utils: {\n Linear: function (p0, p1, t) {\n return (p1 - p0) * t + p0;\n },\n Bernstein: function (n, i) {\n var fc = Interpolation.Utils.Factorial;\n return fc(n) / fc(i) / fc(n - i);\n },\n Factorial: (function () {\n var a = [1];\n return function (n) {\n var s = 1;\n if (a[n]) {\n return a[n];\n }\n for (var i = n; i > 1; i--) {\n s *= i;\n }\n a[n] = s;\n return s;\n };\n })(),\n CatmullRom: function (p0, p1, p2, p3, t) {\n var v0 = (p2 - p0) * 0.5;\n var v1 = (p3 - p1) * 0.5;\n var t2 = t * t;\n var t3 = t * t2;\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\n },\n },\n};\n\n/**\n * Utils\n */\nvar Sequence = /** @class */ (function () {\n function Sequence() {\n }\n Sequence.nextId = function () {\n return Sequence._nextId++;\n };\n Sequence._nextId = 0;\n return Sequence;\n}());\n\nvar mainGroup = new Group();\n\n/**\n * Tween.js - Licensed under the MIT license\n * https://github.com/tweenjs/tween.js\n * ----------------------------------------------\n *\n * See https://github.com/tweenjs/tween.js/graphs/contributors for the full list of contributors.\n * Thank you all, you're awesome!\n */\nvar Tween = /** @class */ (function () {\n function Tween(_object, _group) {\n if (_group === void 0) { _group = mainGroup; }\n this._object = _object;\n this._group = _group;\n this._isPaused = false;\n this._pauseStart = 0;\n this._valuesStart = {};\n this._valuesEnd = {};\n this._valuesStartRepeat = {};\n this._duration = 1000;\n this._isDynamic = false;\n this._initialRepeat = 0;\n this._repeat = 0;\n this._yoyo = false;\n this._isPlaying = false;\n this._reversed = false;\n this._delayTime = 0;\n this._startTime = 0;\n this._easingFunction = Easing.Linear.None;\n this._interpolationFunction = Interpolation.Linear;\n // eslint-disable-next-line\n this._chainedTweens = [];\n this._onStartCallbackFired = false;\n this._onEveryStartCallbackFired = false;\n this._id = Sequence.nextId();\n this._isChainStopped = false;\n this._propertiesAreSetUp = false;\n this._goToEnd = false;\n }\n Tween.prototype.getId = function () {\n return this._id;\n };\n Tween.prototype.isPlaying = function () {\n return this._isPlaying;\n };\n Tween.prototype.isPaused = function () {\n return this._isPaused;\n };\n Tween.prototype.getDuration = function () {\n return this._duration;\n };\n Tween.prototype.to = function (target, duration) {\n if (duration === void 0) { duration = 1000; }\n if (this._isPlaying)\n throw new Error('Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.');\n this._valuesEnd = target;\n this._propertiesAreSetUp = false;\n this._duration = duration < 0 ? 0 : duration;\n return this;\n };\n Tween.prototype.duration = function (duration) {\n if (duration === void 0) { duration = 1000; }\n this._duration = duration < 0 ? 0 : duration;\n return this;\n };\n Tween.prototype.dynamic = function (dynamic) {\n if (dynamic === void 0) { dynamic = false; }\n this._isDynamic = dynamic;\n return this;\n };\n Tween.prototype.start = function (time, overrideStartingValues) {\n if (time === void 0) { time = now(); }\n if (overrideStartingValues === void 0) { overrideStartingValues = false; }\n if (this._isPlaying) {\n return this;\n }\n // eslint-disable-next-line\n this._group && this._group.add(this);\n this._repeat = this._initialRepeat;\n if (this._reversed) {\n // If we were reversed (f.e. using the yoyo feature) then we need to\n // flip the tween direction back to forward.\n this._reversed = false;\n for (var property in this._valuesStartRepeat) {\n this._swapEndStartRepeatValues(property);\n this._valuesStart[property] = this._valuesStartRepeat[property];\n }\n }\n this._isPlaying = true;\n this._isPaused = false;\n this._onStartCallbackFired = false;\n this._onEveryStartCallbackFired = false;\n this._isChainStopped = false;\n this._startTime = time;\n this._startTime += this._delayTime;\n if (!this._propertiesAreSetUp || overrideStartingValues) {\n this._propertiesAreSetUp = true;\n // If dynamic is not enabled, clone the end values instead of using the passed-in end values.\n if (!this._isDynamic) {\n var tmp = {};\n for (var prop in this._valuesEnd)\n tmp[prop] = this._valuesEnd[prop];\n this._valuesEnd = tmp;\n }\n this._setupProperties(this._object, this._valuesStart, this._valuesEnd, this._valuesStartRepeat, overrideStartingValues);\n }\n return this;\n };\n Tween.prototype.startFromCurrentValues = function (time) {\n return this.start(time, true);\n };\n Tween.prototype._setupProperties = function (_object, _valuesStart, _valuesEnd, _valuesStartRepeat, overrideStartingValues) {\n for (var property in _valuesEnd) {\n var startValue = _object[property];\n var startValueIsArray = Array.isArray(startValue);\n var propType = startValueIsArray ? 'array' : typeof startValue;\n var isInterpolationList = !startValueIsArray && Array.isArray(_valuesEnd[property]);\n // If `to()` specifies a property that doesn't exist in the source object,\n // we should not set that property in the object\n if (propType === 'undefined' || propType === 'function') {\n continue;\n }\n // Check if an Array was provided as property value\n if (isInterpolationList) {\n var endValues = _valuesEnd[property];\n if (endValues.length === 0) {\n continue;\n }\n // Handle an array of relative values.\n // Creates a local copy of the Array with the start value at the front\n var temp = [startValue];\n for (var i = 0, l = endValues.length; i < l; i += 1) {\n var value = this._handleRelativeValue(startValue, endValues[i]);\n if (isNaN(value)) {\n isInterpolationList = false;\n console.warn('Found invalid interpolation list. Skipping.');\n break;\n }\n temp.push(value);\n }\n if (isInterpolationList) {\n // if (_valuesStart[property] === undefined) { // handle end values only the first time. NOT NEEDED? setupProperties is now guarded by _propertiesAreSetUp.\n _valuesEnd[property] = temp;\n // }\n }\n }\n // handle the deepness of the values\n if ((propType === 'object' || startValueIsArray) && startValue && !isInterpolationList) {\n _valuesStart[property] = startValueIsArray ? [] : {};\n var nestedObject = startValue;\n for (var prop in nestedObject) {\n _valuesStart[property][prop] = nestedObject[prop];\n }\n // TODO? repeat nested values? And yoyo? And array values?\n _valuesStartRepeat[property] = startValueIsArray ? [] : {};\n var endValues = _valuesEnd[property];\n // If dynamic is not enabled, clone the end values instead of using the passed-in end values.\n if (!this._isDynamic) {\n var tmp = {};\n for (var prop in endValues)\n tmp[prop] = endValues[prop];\n _valuesEnd[property] = endValues = tmp;\n }\n this._setupProperties(nestedObject, _valuesStart[property], endValues, _valuesStartRepeat[property], overrideStartingValues);\n }\n else {\n // Save the starting value, but only once unless override is requested.\n if (typeof _valuesStart[property] === 'undefined' || overrideStartingValues) {\n _valuesStart[property] = startValue;\n }\n if (!startValueIsArray) {\n // eslint-disable-next-line\n // @ts-ignore FIXME?\n _valuesStart[property] *= 1.0; // Ensures we're using numbers, not strings\n }\n if (isInterpolationList) {\n // eslint-disable-next-line\n // @ts-ignore FIXME?\n _valuesStartRepeat[property] = _valuesEnd[property].slice().reverse();\n }\n else {\n _valuesStartRepeat[property] = _valuesStart[property] || 0;\n }\n }\n }\n };\n Tween.prototype.stop = function () {\n if (!this._isChainStopped) {\n this._isChainStopped = true;\n this.stopChainedTweens();\n }\n if (!this._isPlaying) {\n return this;\n }\n // eslint-disable-next-line\n this._group && this._group.remove(this);\n this._isPlaying = false;\n this._isPaused = false;\n if (this._onStopCallback) {\n this._onStopCallback(this._object);\n }\n return this;\n };\n Tween.prototype.end = function () {\n this._goToEnd = true;\n this.update(Infinity);\n return this;\n };\n Tween.prototype.pause = function (time) {\n if (time === void 0) { time = now(); }\n if (this._isPaused || !this._isPlaying) {\n return this;\n }\n this._isPaused = true;\n this._pauseStart = time;\n // eslint-disable-next-line\n this._group && this._group.remove(this);\n return this;\n };\n Tween.prototype.resume = function (time) {\n if (time === void 0) { time = now(); }\n if (!this._isPaused || !this._isPlaying) {\n return this;\n }\n this._isPaused = false;\n this._startTime += time - this._pauseStart;\n this._pauseStart = 0;\n // eslint-disable-next-line\n this._group && this._group.add(this);\n return this;\n };\n Tween.prototype.stopChainedTweens = function () {\n for (var i = 0, numChainedTweens = this._chainedTweens.length; i < numChainedTweens; i++) {\n this._chainedTweens[i].stop();\n }\n return this;\n };\n Tween.prototype.group = function (group) {\n if (group === void 0) { group = mainGroup; }\n this._group = group;\n return this;\n };\n Tween.prototype.delay = function (amount) {\n if (amount === void 0) { amount = 0; }\n this._delayTime = amount;\n return this;\n };\n Tween.prototype.repeat = function (times) {\n if (times === void 0) { times = 0; }\n this._initialRepeat = times;\n this._repeat = times;\n return this;\n };\n Tween.prototype.repeatDelay = function (amount) {\n this._repeatDelayTime = amount;\n return this;\n };\n Tween.prototype.yoyo = function (yoyo) {\n if (yoyo === void 0) { yoyo = false; }\n this._yoyo = yoyo;\n return this;\n };\n Tween.prototype.easing = function (easingFunction) {\n if (easingFunction === void 0) { easingFunction = Easing.Linear.None; }\n this._easingFunction = easingFunction;\n return this;\n };\n Tween.prototype.interpolation = function (interpolationFunction) {\n if (interpolationFunction === void 0) { interpolationFunction = Interpolation.Linear; }\n this._interpolationFunction = interpolationFunction;\n return this;\n };\n // eslint-disable-next-line\n Tween.prototype.chain = function () {\n var tweens = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n tweens[_i] = arguments[_i];\n }\n this._chainedTweens = tweens;\n return this;\n };\n Tween.prototype.onStart = function (callback) {\n this._onStartCallback = callback;\n return this;\n };\n Tween.prototype.onEveryStart = function (callback) {\n this._onEveryStartCallback = callback;\n return this;\n };\n Tween.prototype.onUpdate = function (callback) {\n this._onUpdateCallback = callback;\n return this;\n };\n Tween.prototype.onRepeat = function (callback) {\n this._onRepeatCallback = callback;\n return this;\n };\n Tween.prototype.onComplete = function (callback) {\n this._onCompleteCallback = callback;\n return this;\n };\n Tween.prototype.onStop = function (callback) {\n this._onStopCallback = callback;\n return this;\n };\n /**\n * @returns true if the tween is still playing after the update, false\n * otherwise (calling update on a paused tween still returns true because\n * it is still playing, just paused).\n */\n Tween.prototype.update = function (time, autoStart) {\n var _this = this;\n var _a;\n if (time === void 0) { time = now(); }\n if (autoStart === void 0) { autoStart = true; }\n if (this._isPaused)\n return true;\n var property;\n var endTime = this._startTime + this._duration;\n if (!this._goToEnd && !this._isPlaying) {\n if (time > endTime)\n return false;\n if (autoStart)\n this.start(time, true);\n }\n this._goToEnd = false;\n if (time < this._startTime) {\n return true;\n }\n if (this._onStartCallbackFired === false) {\n if (this._onStartCallback) {\n this._onStartCallback(this._object);\n }\n this._onStartCallbackFired = true;\n }\n if (this._onEveryStartCallbackFired === false) {\n if (this._onEveryStartCallback) {\n this._onEveryStartCallback(this._object);\n }\n this._onEveryStartCallbackFired = true;\n }\n var elapsedTime = time - this._startTime;\n var durationAndDelay = this._duration + ((_a = this._repeatDelayTime) !== null && _a !== void 0 ? _a : this._delayTime);\n var totalTime = this._duration + this._repeat * durationAndDelay;\n var calculateElapsedPortion = function () {\n if (_this._duration === 0)\n return 1;\n if (elapsedTime > totalTime) {\n return 1;\n }\n var timesRepeated = Math.trunc(elapsedTime / durationAndDelay);\n var timeIntoCurrentRepeat = elapsedTime - timesRepeated * durationAndDelay;\n // TODO use %?\n // const timeIntoCurrentRepeat = elapsedTime % durationAndDelay\n var portion = Math.min(timeIntoCurrentRepeat / _this._duration, 1);\n if (portion === 0 && elapsedTime === _this._duration) {\n return 1;\n }\n return portion;\n };\n var elapsed = calculateElapsedPortion();\n var value = this._easingFunction(elapsed);\n // properties transformations\n this._updateProperties(this._object, this._valuesStart, this._valuesEnd, value);\n if (this._onUpdateCallback) {\n this._onUpdateCallback(this._object, elapsed);\n }\n if (this._duration === 0 || elapsedTime >= this._duration) {\n if (this._repeat > 0) {\n var completeCount = Math.min(Math.trunc((elapsedTime - this._duration) / durationAndDelay) + 1, this._repeat);\n if (isFinite(this._repeat)) {\n this._repeat -= completeCount;\n }\n // Reassign starting values, restart by making startTime = now\n for (property in this._valuesStartRepeat) {\n if (!this._yoyo && typeof this._valuesEnd[property] === 'string') {\n this._valuesStartRepeat[property] =\n // eslint-disable-next-line\n // @ts-ignore FIXME?\n this._valuesStartRepeat[property] + parseFloat(this._valuesEnd[property]);\n }\n if (this._yoyo) {\n this._swapEndStartRepeatValues(property);\n }\n this._valuesStart[property] = this._valuesStartRepeat[property];\n }\n if (this._yoyo) {\n this._reversed = !this._reversed;\n }\n this._startTime += durationAndDelay * completeCount;\n if (this._onRepeatCallback) {\n this._onRepeatCallback(this._object);\n }\n this._onEveryStartCallbackFired = false;\n return true;\n }\n else {\n if (this._onCompleteCallback) {\n this._onCompleteCallback(this._object);\n }\n for (var i = 0, numChainedTweens = this._chainedTweens.length; i < numChainedTweens; i++) {\n // Make the chained tweens start exactly at the time they should,\n // even if the `update()` method was called way past the duration of the tween\n this._chainedTweens[i].start(this._startTime + this._duration, false);\n }\n this._isPlaying = false;\n return false;\n }\n }\n return true;\n };\n Tween.prototype._updateProperties = function (_object, _valuesStart, _valuesEnd, value) {\n for (var property in _valuesEnd) {\n // Don't update properties that do not exist in the source object\n if (_valuesStart[property] === undefined) {\n continue;\n }\n var start = _valuesStart[property] || 0;\n var end = _valuesEnd[property];\n var startIsArray = Array.isArray(_object[property]);\n var endIsArray = Array.isArray(end);\n var isInterpolationList = !startIsArray && endIsArray;\n if (isInterpolationList) {\n _object[property] = this._interpolationFunction(end, value);\n }\n else if (typeof end === 'object' && end) {\n // eslint-disable-next-line\n // @ts-ignore FIXME?\n this._updateProperties(_object[property], start, end, value);\n }\n else {\n // Parses relative end values with start as base (e.g.: +10, -3)\n end = this._handleRelativeValue(start, end);\n // Protect against non numeric properties.\n if (typeof end === 'number') {\n // eslint-disable-next-line\n // @ts-ignore FIXME?\n _object[property] = start + (end - start) * value;\n }\n }\n }\n };\n Tween.prototype._handleRelativeValue = function (start, end) {\n if (typeof end !== 'string') {\n return end;\n }\n if (end.charAt(0) === '+' || end.charAt(0) === '-') {\n return start + parseFloat(end);\n }\n return parseFloat(end);\n };\n Tween.prototype._swapEndStartRepeatValues = function (property) {\n var tmp = this._valuesStartRepeat[property];\n var endValue = this._valuesEnd[property];\n if (typeof endValue === 'string') {\n this._valuesStartRepeat[property] = this._valuesStartRepeat[property] + parseFloat(endValue);\n }\n else {\n this._valuesStartRepeat[property] = this._valuesEnd[property];\n }\n this._valuesEnd[property] = tmp;\n };\n return Tween;\n}());\n\nvar VERSION = '23.1.1';\n\n/**\n * Tween.js - Licensed under the MIT license\n * https://github.com/tweenjs/tween.js\n * ----------------------------------------------\n *\n * See https://github.com/tweenjs/tween.js/graphs/contributors for the full list of contributors.\n * Thank you all, you're awesome!\n */\nvar nextId = Sequence.nextId;\n/**\n * Controlling groups of tweens\n *\n * Using the TWEEN singleton to manage your tweens can cause issues in large apps with many components.\n * In these cases, you may want to create your own smaller groups of tweens.\n */\nvar TWEEN = mainGroup;\n// This is the best way to export things in a way that's compatible with both ES\n// Modules and CommonJS, without build hacks, and so as not to break the\n// existing API.\n// https://github.com/rollup/rollup/issues/1961#issuecomment-423037881\nvar getAll = TWEEN.getAll.bind(TWEEN);\nvar removeAll = TWEEN.removeAll.bind(TWEEN);\nvar add = TWEEN.add.bind(TWEEN);\nvar remove = TWEEN.remove.bind(TWEEN);\nvar update = TWEEN.update.bind(TWEEN);\nvar exports = {\n Easing: Easing,\n Group: Group,\n Interpolation: Interpolation,\n now: now,\n Sequence: Sequence,\n nextId: nextId,\n Tween: Tween,\n VERSION: VERSION,\n getAll: getAll,\n removeAll: removeAll,\n add: add,\n remove: remove,\n update: update,\n};\n\nexport { Easing, Group, Interpolation, Sequence, Tween, VERSION, add, exports as default, getAll, nextId, now, remove, removeAll, update };\n","export function random(min: number, max: number) {\n\tconst random = Math.random();\n\tmin = Math.round(min);\n\tmax = Math.floor(max);\n\n\treturn random * (max - min) + min;\n}\n","import { Coordinates } from './coordinates';\n\nclass InitialPlinkoCoordinatesClass {\n\t_plinkoCoordinates: Record;\n\n\tconstructor() {\n\t\tthis._plinkoCoordinates = {};\n\t}\n\n\tpublic add(label: string, coordinates: Coordinates) {\n\t\tthis._plinkoCoordinates[label] = coordinates;\n\t}\n\n\tpublic delete(label: string) {\n\t\tdelete this._plinkoCoordinates[label];\n\t}\n}\n\nexport const InitialPlinkoCoordinates = new InitialPlinkoCoordinatesClass();\n","export const randomizeElementFromArray = (arr: any[]) => {\n\treturn arr[Math.floor(Math.random() * arr.length)];\n};\n","import { randomizeElementFromArray } from '@common/methods/randomizeElementFromArray';\nimport { Coordinates } from './coordinates';\n\nconst createSimpleBounce = (\n\tfrom: Coordinates,\n\tto: Coordinates,\n): Array => {\n\tconst xDiff = to.x - from.x;\n\tconst yDiff = to.y - from.y;\n\treturn [\n\t\t{\n\t\t\tx: from.x,\n\t\t\ty: from.y,\n\t\t},\n\t\t{\n\t\t\tx: from.x + xDiff * 0.5,\n\t\t\ty: from.y + yDiff * -0.5,\n\t\t},\n\t\t{\n\t\t\tx: to.x,\n\t\t\ty: to.y,\n\t\t},\n\t];\n};\n\nconst createSimpleFall = (\n\tfrom: Coordinates,\n\tto: Coordinates,\n): Array => {\n\tconst xDiff = to.x - from.x;\n\tconst yDiff = to.y - from.y;\n\treturn [\n\t\t{\n\t\t\tx: from.x,\n\t\t\ty: from.y,\n\t\t},\n\t\t{\n\t\t\tx: from.x + xDiff * 1,\n\t\t\ty: from.y,\n\t\t},\n\t\t{\n\t\t\tx: to.x,\n\t\t\ty: to.y,\n\t\t},\n\t];\n};\n\nexport const createBounce = (\n\tfrom: Coordinates,\n\tto: Coordinates,\n): Array => {\n\tconst array = [createSimpleBounce, createSimpleFall];\n\treturn randomizeElementFromArray(array)(from, to);\n};\n","import * as TWEEN from '@tweenjs/tween.js';\nimport { DisplayObject } from 'pixi.js';\nimport { isTrueOrZero } from '@common/methods/isTrueOrZero';\nimport { random } from '@legacyApp/methods/math/random';\nimport { second } from '@legacyApp/client/modules/app/time';\nimport { roundNumber } from '@common/methods/roundNumber/roundNumber';\nimport { SubjectController } from '@common/controllers/subjectController';\nimport { config } from '@modules/games/PlinkoGame/components/playground/config';\nimport { LinesType } from '@modules/games/PlinkoGame/types';\nimport { getPayoutIndexFromPath } from '@modules/games/PlinkoGame/methods/getPayoutIndexFromPath';\nimport { PinsController } from '@modules/games/PlinkoGame/controllers/PinsController';\nimport { getDataFromBallLabel } from '@modules/games/PlinkoGame/methods/getDataFromBallLabel';\nimport { getBallRadius } from '@modules/games/PlinkoGame/methods/getBallRadius';\nimport { getPinRadius } from '@modules/games/PlinkoGame/methods/getPinRadius';\nimport { getBall } from '@modules/games/PlinkoGame/components/playground/PixiJS/methods/getBall';\nimport { Coordinates } from '@modules/games/PlinkoGame/components/playground/PixiJS/methods/coordinates';\nimport { InitialPlinkoCoordinates } from '@modules/games/PlinkoGame/components/playground/PixiJS/methods/initialPlinkoCoordinates';\nimport { createBounce } from '@modules/games/PlinkoGame/components/playground/PixiJS/methods/createBounce';\nimport { getPinsHorizontalSpace } from '@modules/games/PlinkoGame/components/playground/PixiJS/methods/getPinsHorizontalSpace';\nimport { PLINKO_PIN_COLLISION_EVENT } from '@modules/games/PlinkoGame/constants';\nimport { randomizeElementFromArray } from '@common/methods/randomizeElementFromArray';\n\nconst DURATION = (lines = 1) =>\n\troundNumber(random(1.5 * second, 2 * second) / lines, 0);\n\nconst DECIMAL = 8;\n\nconst getPinBallContactCoordinates = ({\n\tlines,\n\tindex,\n\tlevelIndex,\n}: {\n\tlines: LinesType;\n\tindex: number;\n\tlevelIndex: number;\n}) => {\n\tconst pinCoordinates = PinsController.getPinConfig(lines, levelIndex, index);\n\n\tconst pinRadius = getPinRadius(lines);\n\n\tconst ballRadius = getBallRadius(lines);\n\n\treturn {\n\t\tx: roundNumber(pinCoordinates.x, DECIMAL),\n\t\ty: roundNumber(pinCoordinates.y - ballRadius - pinRadius, DECIMAL),\n\t};\n};\n\nexport const checkCollisionCircleCircle = (\n\ta: {\n\t\tx: number;\n\t\ty: number;\n\t\tradius: number;\n\t},\n\tb: { x: number; y: number; radius: number },\n) => {\n\tconst dx = a.x - b.x;\n\n\tconst dy = a.y - b.y;\n\n\tconst distance = Math.sqrt(dx * dx + dy * dy);\n\n\treturn distance <= a.radius + b.radius;\n};\n\nconst checkPinCollision = async (ball: DisplayObject, object: Coordinates) => {\n\tif (!ball?._label) {\n\t\treturn;\n\t}\n\n\tconst { lines } = getDataFromBallLabel(ball._label);\n\n\tconst pinRadius = getPinRadius(lines);\n\n\tconst pinsConfig = PinsController.getConfig(lines);\n\n\tconst nextPinLevel = pinsConfig.pins.find((pin) => pin.y >= object.y);\n\n\tif (!nextPinLevel) {\n\t\treturn;\n\t}\n\n\tconst pins = pinsConfig.pins.filter((pin) => pin.y === nextPinLevel.y);\n\n\tif (!pins?.length) {\n\t\treturn;\n\t}\n\n\tconst ballRadius = getBallRadius(lines);\n\n\tconst nextBallConfig = {\n\t\tx: object.x,\n\t\ty: object.y,\n\t\tradius: ballRadius,\n\t};\n\n\tconst ballConfig = {\n\t\tx: ball.x,\n\t\ty: ball.y,\n\t\tradius: ballRadius,\n\t};\n\n\tconst pin = pins.find((pin) => {\n\t\tconst pinConfig = {\n\t\t\tx: pin.x,\n\t\t\ty: pin.y,\n\t\t\tradius: pinRadius * 2,\n\t\t};\n\n\t\tconst ballCollision = checkCollisionCircleCircle(pinConfig, ballConfig);\n\n\t\tif (ballCollision) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn checkCollisionCircleCircle(pinConfig, nextBallConfig);\n\t});\n\n\tconst wasBallCollisionWithPin = ball._collisions?.includes(pin?.label);\n\n\tif (pin?.label && !wasBallCollisionWithPin) {\n\t\tSubjectController.emit(PLINKO_PIN_COLLISION_EVENT, {\n\t\t\tpinLabel: pin.label,\n\t\t});\n\n\t\tball._collisions?.push(pin.label);\n\t}\n};\n\nconst onUpdate = async (object: Coordinates, ballLabel: string) => {\n\tif (!isTrueOrZero(object.x) || !isTrueOrZero(object.y)) {\n\t\tthrow new Error('Invalid coordinates');\n\t}\n\n\tconst ball = await getBall(ballLabel);\n\n\tif (!ball?._label) {\n\t\treturn;\n\t}\n\n\tball.position.set(object.x, object.y);\n\n\tcheckPinCollision(ball, object);\n};\n\ninterface CoordinateArray {\n\tx: number[];\n\ty: number[];\n}\n\nconst createTween = (\n\tfrom: Coordinates | CoordinateArray,\n\tto: CoordinateArray | Coordinates,\n\tballLabel: string,\n) => {\n\treturn new TWEEN.Tween(from)\n\t\t.to(to, DURATION(10))\n\t\t.interpolation(TWEEN.Interpolation.Bezier)\n\t\t.easing(\n\t\t\trandomizeElementFromArray([\n\t\t\t\tTWEEN.Easing.Cubic.InOut,\n\t\t\t\tTWEEN.Easing.Cubic.In,\n\t\t\t]),\n\t\t)\n\t\t.onUpdate(\n\t\t\t// @ts-expect-error - TWEEN types are not correct\n\t\t\tasync (object) => await onUpdate(object, ballLabel),\n\t\t);\n};\n\nexport const createPlinkoPathTween = (ballLabel: string, path: number[]) => {\n\tconst payoutIndex = getPayoutIndexFromPath(path);\n\n\tconst lines = path.length as LinesType;\n\n\tInitialPlinkoCoordinates._plinkoCoordinates[ballLabel] = {\n\t\tx: roundNumber(config.world.width / 2, DECIMAL),\n\t\ty: config.ball.y,\n\t};\n\n\tconst coordinates: Coordinates[] = [];\n\n\tfor (let i = 0; i < path.length; i++) {\n\t\tconst payoutIndex = getPayoutIndexFromPath(path.slice(0, i));\n\n\t\tconst props = {\n\t\t\tlines,\n\t\t\tindex: payoutIndex + 1,\n\t\t\tlevelIndex: i,\n\t\t};\n\n\t\tconst coordinates_ = getPinBallContactCoordinates(props);\n\n\t\tconst pinCoordinates: Coordinates = {\n\t\t\tx: roundNumber(coordinates_.x, DECIMAL),\n\t\t\ty: roundNumber(coordinates_.y, DECIMAL),\n\t\t};\n\n\t\tcoordinates.push(pinCoordinates);\n\t}\n\n\tconst horizontalSpace = getPinsHorizontalSpace(lines);\n\n\tconst multiplierCoordinates: Coordinates = {\n\t\tx: roundNumber(\n\t\t\tgetPinBallContactCoordinates({\n\t\t\t\tlines,\n\t\t\t\tlevelIndex: lines - 1,\n\t\t\t\tindex: payoutIndex,\n\t\t\t}).x + horizontalSpace,\n\t\t\tDECIMAL,\n\t\t),\n\t\ty: roundNumber(\n\t\t\tgetPinBallContactCoordinates({\n\t\t\t\tlines,\n\t\t\t\tlevelIndex: lines - 1,\n\t\t\t\tindex: payoutIndex,\n\t\t\t}).y +\n\t\t\t\t2 * getBallRadius(lines),\n\t\t\tDECIMAL,\n\t\t),\n\t};\n\n\tcoordinates.push(multiplierCoordinates);\n\n\tconst chainedCoordinates: Array = coordinates\n\t\t.map((from, index, arr) => {\n\t\t\tconst to = arr?.[index + 1];\n\n\t\t\tif (!to) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst nextTo = arr?.[index + 2];\n\n\t\t\tconst move = getPinRadius(lines) * 0.5;\n\n\t\t\tconst fromX = to.x > from.x ? from.x + move : from.x - move;\n\n\t\t\tconst toX = !nextTo ? to.x : nextTo.x > to.x ? to.x + move : to.x - move;\n\n\t\t\tconst path_ = createBounce(\n\t\t\t\t{\n\t\t\t\t\tx: fromX,\n\t\t\t\t\ty: from.y,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tx: toX,\n\t\t\t\t\ty: to.y,\n\t\t\t\t},\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tx: path_.map(({ x }) => x),\n\t\t\t\ty: path_.map(({ y }) => y),\n\t\t\t};\n\t\t})\n\t\t.filter(Boolean);\n\n\tconst tween = createTween(\n\t\t{ ...InitialPlinkoCoordinates._plinkoCoordinates[ballLabel] },\n\t\t{\n\t\t\tx: chainedCoordinates[0].x[0],\n\t\t\ty: chainedCoordinates[0].y[0],\n\t\t},\n\t\tballLabel,\n\t);\n\n\tconst tweens = [\n\t\ttween,\n\t\t...chainedCoordinates.map(({ x, y }) =>\n\t\t\tcreateTween(\n\t\t\t\t{\n\t\t\t\t\tx: x[0],\n\t\t\t\t\ty: y[0],\n\t\t\t\t},\n\t\t\t\t{ x: x.slice(1), y: y.slice(1) },\n\t\t\t\tballLabel,\n\t\t\t),\n\t\t),\n\t];\n\n\treturn tweens;\n};\n","import { roundNumber } from '@common/methods/roundNumber/roundNumber';\nimport { LinesType } from '../../../../types';\nimport { PinsController } from '../../../../controllers/PinsController';\n\nexport const getPinsHorizontalSpace = (lines: LinesType) => {\n\treturn roundNumber(\n\t\t(PinsController.getPinConfig(lines, 0, 1).x -\n\t\t\tPinsController.getPinConfig(lines, 0, 0).x) /\n\t\t\t2,\n\t\t0,\n\t);\n};\n","import * as TWEEN from '@tweenjs/tween.js';\nimport { isFunction } from '@common/methods/isFunction';\n\ninterface Constructor {\n\ttween?: TWEEN.Tween;\n\ttweens?: TWEEN.Tween[];\n\tonComplete?: () => Promise;\n}\n\nexport class AnimateComponent {\n\tprivate tween: Constructor['tween'];\n\tprivate tweens: Constructor['tweens'];\n\tprivate isAnimating: boolean;\n\tprivate readonly onComplete: Constructor['onComplete'];\n\tprivate activeTweenIndex: number;\n\n\tconstructor({ tweens, onComplete }: Constructor) {\n\t\tthis.isAnimating = false;\n\t\tthis.tweens = tweens;\n\t\tthis.onComplete = onComplete;\n\t\tthis.activeTweenIndex = 0;\n\t\tthis.start();\n\t}\n\n\tasync start(): Promise {\n\t\tthis.tween = this.tweens[this.activeTweenIndex];\n\t\tif (!this.tween) {\n\t\t\treturn;\n\t\t}\n\t\tthis.tween.start();\n\t\tthis.isAnimating = true;\n\t}\n\n\tasync reset(): Promise {\n\t\tif (isFunction(this.tween?.stop)) {\n\t\t\tthis.tween.stop();\n\t\t}\n\t\tthis.isAnimating = false;\n\t\tthis.tween = null;\n\t\tthis.tweens = [];\n\t\tthis.activeTweenIndex = 0;\n\t}\n\n\tasync stop(): Promise {\n\t\tif (\n\t\t\t!!this.tweens?.length &&\n\t\t\tthis.activeTweenIndex < this.tweens?.length - 1\n\t\t) {\n\t\t\tthis.activeTweenIndex++;\n\t\t\tawait this.start();\n\t\t\treturn true;\n\t\t}\n\t\tif (!this.isAnimating) {\n\t\t\treturn false;\n\t\t}\n\t\tawait this.reset();\n\t\tif (isFunction(this.onComplete)) {\n\t\t\tawait this.onComplete();\n\t\t}\n\t\treturn false;\n\t}\n\n\tcheckAnimation(): boolean {\n\t\treturn this.isAnimating;\n\t}\n\n\tasync step(timestamp?: number): Promise {\n\t\ttry {\n\t\t\tif (timestamp) {\n\t\t\t\tif (!isFunction(this.tween?.update)) {\n\t\t\t\t\tawait this.stop();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tconst isAnimation = this.tween.update(timestamp);\n\t\t\t\tif (!isAnimation) {\n\t\t\t\t\treturn await this.stop();\n\t\t\t\t}\n\t\t\t\treturn isAnimation;\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tawait this.stop();\n\t\t\tconsole.error(e);\n\t\t\treturn false;\n\t\t}\n\t}\n}\n","import { DisplayObject } from 'pixi.js';\nimport { isFunction } from '@common/methods/isFunction';\nimport { render } from './render';\n\nexport class Ticker {\n\tprivate objects: DisplayObject[];\n\tprivate isAnimating: boolean;\n\n\tconstructor() {\n\t\tthis.isAnimating = false;\n\t\tthis.objects = [];\n\t}\n\n\tprivate async start() {\n\t\tif (this.checkAnimation()) {\n\t\t\treturn;\n\t\t}\n\t\tthis.isAnimating = true;\n\t\tawait this.step();\n\t}\n\n\tprivate async stop() {\n\t\tif (!this.checkAnimation()) {\n\t\t\treturn;\n\t\t}\n\t\tthis.isAnimating = false;\n\t\tthis.objects = [];\n\t}\n\n\tpublic async add(object: DisplayObject) {\n\t\tthis.objects.push(object);\n\t\tif (!this.checkAnimation()) {\n\t\t\tawait this.start();\n\t\t}\n\t\tawait object._animateComponent.start();\n\t\tconsole.log('object._animateComponent.start()');\n\t}\n\n\tpublic checkAnimation() {\n\t\treturn this.isAnimating;\n\t}\n\n\tprivate async update(object: DisplayObject, timestamp: number) {\n\t\tif (!isFunction(object?._animateComponent?.step)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn object?._animateComponent.step(timestamp);\n\t}\n\n\tprivate async step(timestamp?: number) {\n\t\ttry {\n\t\t\tif (timestamp) {\n\t\t\t\tconst isAnimationArray = [];\n\t\t\t\tfor (const [key, object] of Object(this.objects).entries()) {\n\t\t\t\t\tconst isAnimation = object\n\t\t\t\t\t\t? await this.update(object, timestamp)\n\t\t\t\t\t\t: false;\n\t\t\t\t\tif (isAnimation) {\n\t\t\t\t\t\tisAnimationArray.push(true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.objects[key] = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst isAnimation = isAnimationArray.some(Boolean);\n\t\t\t\tif (!isAnimation) {\n\t\t\t\t\tawait this.stop();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tawait this.stop();\n\t\t\tconsole.error(e);\n\t\t}\n\t\tawait render();\n\t\tif (this.isAnimating) {\n\t\t\trequestAnimationFrame((time) => this.step(time));\n\t\t}\n\t}\n}\n\nexport const ticker = new Ticker();\n","import { DisplayObject } from 'pixi.js';\nimport { Body } from '@modules/games/PlinkoGame/types/ballsType';\nimport { getDataFromBallLabel } from '@modules/games/PlinkoGame/methods/getDataFromBallLabel';\nimport { removeBall } from '@modules/games/PlinkoGame/methods/removeBall';\nimport { getPayoutIndexFromPath } from '@modules/games/PlinkoGame/methods/getPayoutIndexFromPath';\nimport { createPlinkoPathTween } from '@modules/games/PlinkoGame/components/playground/PixiJS/methods/createPlinkoPathTween';\nimport { AnimateComponent } from '@modules/games/PlinkoGame/components/playground/PixiJS/methods/AnimateComponent';\nimport { ticker } from '@modules/games/PlinkoGame/components/playground/PixiJS/methods/Ticker';\nimport { plinkoResultEvent } from '@modules/games/PlinkoGame/methods/plinkoTriggerEvents';\n\nexport const addBallAnimation = async (ball: DisplayObject) => {\n\tconst label = ball._label as Body['label'];\n\tconst { path, lines } = getDataFromBallLabel(label);\n\tball._animateComponent = new AnimateComponent({\n\t\ttweens: createPlinkoPathTween(ball._label, path),\n\t\tonComplete: async () => {\n\t\t\tawait removeBall(label);\n\n\t\t\tplinkoResultEvent({\n\t\t\t\tlines,\n\t\t\t\tballLabel: label,\n\t\t\t\tpayoutIndex: getPayoutIndexFromPath(path),\n\t\t\t});\n\t\t},\n\t});\n\tawait ticker.add(ball);\n};\n","import * as PIXI from 'pixi.js';\nimport { roundNumber } from '@common/methods/roundNumber/roundNumber';\nimport { AddBallProps } from '../../../../methods/addBall';\nimport { createBallLabel } from '../../../../methods/getDataFromBallLabel';\nimport { config } from '../../config';\nimport { getBallRadius } from '../../../../methods/getBallRadius';\nimport { getBallColor } from './getBallColor';\nimport { pixiApp } from './instances.pixi';\n\nexport const createBall = async (props: AddBallProps) => {\n\tconst app = await pixiApp.get();\n\tconst ball = new PIXI.Graphics();\n\tball._label = createBallLabel(props);\n\tball._collisions = [];\n\tball.eventMode = 'none';\n\tball.interactiveChildren = false;\n\tconst radius = getBallRadius(props.lines);\n\tconst colors = getBallColor(props.risk);\n\tball.beginFill(colors.fill);\n\tball.drawCircle(0, config.ball.y, radius);\n\tball.lineStyle(radius / 2, colors.line, 1);\n\tapp.stage.addChild(ball);\n\tball.x = roundNumber(config.world.width / 2, 0);\n\tconsole.log('createBall', {\n\t\tapp,\n\t\tprops,\n\t\tball,\n\t\tlabel: ball._label,\n\t\tradius,\n\t\tcolors,\n\t});\n\treturn ball;\n};\n","import { roundNumber } from '@common/methods/roundNumber/roundNumber';\nimport { AddBallProps } from '../../../../methods/addBall';\nimport { createBallLabel } from '../../../../methods/getDataFromBallLabel';\nimport { config } from '../../config';\nimport { getWaitingBalls } from './getWaitingBalls';\nimport { addBallAnimation } from './addBallAnimation';\nimport { render } from './render';\nimport { createBall } from './createBall';\n\nexport const addBallPixiJs = async (props: AddBallProps) => {\n\tconst waitingBalls = await getWaitingBalls();\n\tlet label = null;\n\n\tif (waitingBalls?.length) {\n\t\tconst ball = waitingBalls[0];\n\t\tlabel = createBallLabel(props);\n\t\tball.position.set(roundNumber(config.world.width / 2, 0), config.ball.y);\n\t\tball._label = label;\n\t\tball._collisions = [];\n\n\t\tawait addBallAnimation(ball);\n\t} else {\n\t\tconst ball = await createBall(props);\n\n\t\tlabel = ball._label;\n\n\t\tawait addBallAnimation(ball);\n\t}\n\n\tawait render();\n\n\treturn label;\n};\n","import { LinesType, Risk } from '../types';\nimport { Mode } from '../components/playground/config/constants';\nimport { config } from '../components/playground/config';\nimport { addBallMatterJs } from '../components/playground/MatterJs/methods/addBallMatterJs';\nimport { addBallPixiJs } from '../components/playground/PixiJS/methods/addBallPixiJs';\n\nexport interface AddBallProps {\n\tposition: number | string;\n\tlines: LinesType;\n\tbetHash: string;\n\trisk: Risk;\n\tisMock?: boolean;\n\tpath: Array;\n}\n\nexport const addBall = async (props: AddBallProps) => {\n\tif (config.mode === Mode.PIXI) {\n\t\treturn await addBallPixiJs(props);\n\t}\n\tif (config.mode === Mode.MATTER) {\n\t\treturn await addBallMatterJs(props);\n\t}\n};\n","import { createGlobalStyle } from 'styled-components';\nimport { ThemeType } from '@legacyApp/client/modules/style/theme';\n\nexport const GamePlinkoGlobalStyles = createGlobalStyle<{ theme: ThemeType }>`\n`;\n","import dynamic from 'next/dynamic';\n\nexport const MatterJsGame = dynamic(() => import('./MatterJsGame'), {\n\tssr: false,\n});\n","import { getDataFromBallLabel } from '../../../../methods/getDataFromBallLabel';\nimport { getBalls } from './getBalls';\n\nexport const getFallingBalls = async () => {\n\treturn (await getBalls()).filter((ball) => {\n\t\tconst data = getDataFromBallLabel(ball._label);\n\t\treturn !String(data.position).includes('waiting');\n\t});\n};\n","import { removeBall } from '../../../../methods/removeBall';\nimport { getFallingBalls } from './getFallingBalls';\n\nexport const stopAllBalls = async () => {\n\tconst balls = await getFallingBalls();\n\tfor (const ball of balls) {\n\t\tremoveBall(ball._label);\n\t}\n};\n","import * as PIXI from 'pixi.js';\nimport { NEXT_CONFIG } from '@common/constants/config/nextConfig';\nimport { LinesType, Risk } from '../../../../types';\nimport { pixiApp } from './instances.pixi';\n\nexport const addTestText = async ({\n\tlines,\n\trisk,\n}: {\n\tlines: LinesType;\n\trisk: Risk;\n}) => {\n\tif (!NEXT_CONFIG.DEV) {\n\t\treturn;\n\t}\n\tconst text1 = new PIXI.Text(\n\t\t`Lines: ${lines} | Risk: ${risk}`,\n\t\tnew PIXI.TextStyle({ fontFamily: 'Roboto', fontSize: 12, fill: 'white' }),\n\t);\n\ttext1.y = 0;\n\ttext1.x = 0;\n\tconst app = await pixiApp.get();\n\tapp.stage.addChild(text1);\n};\n","import { getTimestamp } from '@legacyApp/client/modules/app/timeService';\nimport { getIncrId } from '@common/methods/incrementingId';\nimport { AddBallProps } from '../../../../methods/addBall';\nimport { createBall } from './createBall';\n\nexport const addInitBalls = async ({\n\tlines,\n\trisk,\n}: {\n\tlines: AddBallProps['lines'];\n\trisk: AddBallProps['risk'];\n}) => {\n\tconst props = {\n\t\tlines,\n\t\trisk,\n\t\tbetHash: null,\n\t\tisMock: null,\n\t\tpath: [],\n\t};\n\tArray.from({ length: 20 }).map(() => {\n\t\tconst id = getIncrId('createBall');\n\t\tcreateBall({\n\t\t\t...props,\n\t\t\tposition: `waiting-${getTimestamp()}-${id}`,\n\t\t});\n\t});\n};\n","import { FC, useCallback, useContext, useEffect } from 'react';\nimport { usePrevious } from '@legacyApp/hooks/render/usePrevious';\nimport { useOnMount } from '@common/hooks/useOnMount';\nimport { PlinkoGameBody } from '../components/GameBody';\nimport { usePlinkoLinesSelector } from '../../../../Game/store/plinko/selectors/usePlinkoLinesSelector';\nimport { usePlinkoRiskSelector } from '../../../../Game/store/plinko/selectors/usePlinkoRiskSelector';\nimport { GameContext } from '../../../../Game/context/GameContext';\nimport { useResetBalls } from '../hooks/useResetBalls';\nimport { WRAPPER_ID } from './constants/WRAPPER_ID';\nimport { addTestText } from './methods/addTestText';\nimport { pixiApp } from './methods/instances.pixi';\nimport { addInitBalls } from './methods/addInitBalls';\n\nexport const PixiJSGame: FC = () => {\n\tconst gameContext = useContext(GameContext);\n\tconst lines = usePlinkoLinesSelector();\n\tconst risk = usePlinkoRiskSelector();\n\tconst prevLines = usePrevious(lines);\n\tconst prevRisk = usePrevious(risk);\n\n\tuseResetBalls();\n\n\tconst init = useCallback(async () => {\n\t\tawait pixiApp.rebuild().then(() => {\n\t\t\tconsole.log(\n\t\t\t\t'PlinkoGame - PixiJSGame - init - pixiApp.rebuild - then - setLoaded',\n\t\t\t\tgameContext,\n\t\t\t);\n\t\t\tgameContext.setLoaded(true);\n\t\t});\n\t\tawait addInitBalls({\n\t\t\tlines,\n\t\t\trisk,\n\t\t});\n\t\tawait addTestText({\n\t\t\tlines,\n\t\t\trisk,\n\t\t});\n\t}, [lines, risk, gameContext]);\n\n\tuseOnMount(() => {\n\t\tinit();\n\t});\n\n\tuseEffect(() => {\n\t\tif (prevLines === lines && prevRisk === risk) {\n\t\t\treturn;\n\t\t}\n\t\tinit();\n\t});\n\n\treturn (\n\t\t\n\t\t\t
\n\t\t\n\t);\n};\n\nexport default PixiJSGame;\n","import { useCallback, useEffect, useRef } from 'react';\nimport { useAppVisible } from '@common/selectors/app.selectors';\nimport { useOptionEnabled } from '@common/selectors/options.selectors';\nimport { OPTIONS } from '@legacyApp/client/store/options/options.constants';\nimport { stopAllBalls } from '../PixiJS/methods/stopAllBalls';\nimport { useGameAutoBetActive } from '../../../../Game/store/gameAutobet/gameAutobet.selectors';\nimport { GameType } from '../../../../Game/constants/availableGames';\n\nconst DEFAULT_TIMEOUT = 500;\n\nexport const useResetBalls = (timeout?: number) => {\n\tconst timeoutRef = useRef(null);\n\tconst appVisible = useAppVisible();\n\tconst isHighSpeed = useOptionEnabled(OPTIONS.HIGH_SPEED);\n\tconst isAutoBet = useGameAutoBetActive(GameType.PLINKO);\n\n\tconst clearTimeout_ = useCallback(() => {\n\t\tif (timeoutRef.current) {\n\t\t\tclearTimeout(timeoutRef.current);\n\t\t}\n\t}, []);\n\n\tconst remove = useCallback(() => {\n\t\tif (isHighSpeed && isAutoBet) {\n\t\t\treturn;\n\t\t}\n\t\tclearTimeout_();\n\t\ttimeoutRef.current = setTimeout(() => {\n\t\t\tstopAllBalls();\n\t\t}, timeout || DEFAULT_TIMEOUT);\n\t}, [clearTimeout_, isAutoBet, isHighSpeed, timeout]);\n\n\tuseEffect(() => {\n\t\tif (appVisible) {\n\t\t\tclearTimeout_();\n\t\t} else {\n\t\t\tremove();\n\t\t}\n\t}, [appVisible, clearTimeout_, remove]);\n};\n","import React, { FC } from 'react';\nimport { config } from '../../config';\nimport { Mode } from '../../config/constants';\nimport { MatterJsGame } from '../../MatterJs';\nimport { PixiJSGame } from '../../PixiJS';\nimport { GameLoaded } from '../../../../../Game/components/GameLoaded';\n\nexport const Playground: FC = () => {\n\tif (config.mode === Mode.MATTER) {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\tif (config.mode === Mode.PIXI) {\n\t\treturn ;\n\t}\n\treturn null;\n};\n","import styled, { css } from 'styled-components';\n\nimport { plinkoResponsiveMixin } from '@modules/games/PlinkoGame/styles/plinkoResponsiveMixin';\n\nimport { BetAmountInputWrapper } from '@legacyApp/client/components/betAmountInput/betAmountInput';\nimport { InputWrapperStyle } from '@legacyApp/client/components/input/styled/inputWrapper.style';\nimport { PayoutInputWrapper } from '@legacyApp/client/components/payoutInput/payoutInput';\nimport { ProfitInputWrapper } from '@legacyApp/client/components/profitInput/profitInput';\nimport { WinChanceInputWrapper } from '@legacyApp/client/components/winChanceInput/winChanceInput';\nimport { StyledGameForm } from '@legacyApp/client/modules/style/components/GameForm.styled';\nimport { StyledGamePanel } from '@modules/games/Game/components/Game.components/GamePanel/gamePanel.styled';\nimport { LineSwitchWrapperStyled } from '@modules/games/PlinkoGame/components/LinesSwitch/LinesSwitch';\nimport { RiskInputWrapperStyled } from '@modules/games/PlinkoGame/components/playground/components/RiskSwitch/RiskSwitch';\nimport {\n\tCSSClassNameGamePanel,\n\tCSSClassNameGamePanelButtons,\n} from '@modules/games/Game/components/Game.components/GamePanel/GamePanel';\n\nexport const PlinkoFormStyled = styled.div`\n\talign-items: center;\n\tdisplay: flex;\n\tflex-direction: column;\n\tfloat: left;\n\tjustify-content: center;\n\tmax-width: 450px;\n\twidth: 100%;\n\n\t@media (min-width: ${(props) => props.theme.media.minWidthSmallTablet}) {\n\t\tmargin-top: 10px;\n\t}\n\n\t@media ((min-width: ${(props) =>\n\t\t\tprops.theme.media.minWidthTablet}) and (max-width: ${(props) =>\n\t\t\tprops.theme.media.maxWidthTablet})) {\n\t\tmargin-top: 4%;\n\t}\n\n\t${StyledGameForm} {\n\t\twidth: 100%;\n\t\tdisplay: grid;\n\t\tgrid-auto-flow: column;\n\t\tgrid-template-columns: repeat(20, 5%);\n\t\tmargin: 2px auto;\n\n\t\t${InputWrapperStyle} {\n\t\t\tdisplay: grid;\n\t\t\tpadding-top: 0;\n\t\t\tmargin-bottom: 5px;\n\n\t\t\tinput {\n\t\t\t\tbox-shadow: 0 0 13px -5px #051a34;\n\t\t\t}\n\t\t}\n\n\t\t${ProfitInputWrapper},\n\t\t${PayoutInputWrapper},\n\t\t${WinChanceInputWrapper} {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t${BetAmountInputWrapper} {\n\t\t\tgrid-column: 1/21;\n\t\t}\n\n\t\t${LineSwitchWrapperStyled} {\n\t\t\tgrid-column: 14/21;\n\t\t}\n\n\t\t${RiskInputWrapperStyled} {\n\t\t\tgrid-column: 1/14;\n\t\t}\n\t}\n\n\t${StyledGamePanel}, .${CSSClassNameGamePanel} {\n\t\t.${CSSClassNameGamePanelButtons} {\n\t\t\tmargin-top: 4px !important;\n\t\t}\n\t}\n\n\t${plinkoResponsiveMixin(\n\t\tcss`\n\t\t\t${StyledGameForm} {\n\t\t\t\tmax-width: unset;\n\t\t\t}\n\t\t`,\n\t\tcss`\n\t\t\t${LineSwitchWrapperStyled},\n\t\t\t${RiskInputWrapperStyled} {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t`,\n\t)}\n`;\n","import styled, { css } from 'styled-components';\nimport { chatViewport } from '@legacyApp/client/modules/style/methods/chatViewport';\nimport { calcStyle } from '@legacyApp/client/modules/style/methods/calcStyle';\nimport { RiskSwitchStyled } from '../components/playground/components/RiskSwitch/RiskSwitch';\nimport { LinesSwitchStyled } from '../components/LinesSwitch/LinesSwitch';\nimport { PlinkoGameBodyStyled } from '../components/playground/components/GameBody';\n\nexport const PlinkoPlaygroundStyled = styled.div`\n\talign-items: center;\n\tdisplay: flex;\n\tflex-direction: row;\n\tjustify-content: center;\n\tmax-width: 800px;\n\tposition: relative;\n\n\t${chatViewport(\n\t\t(viewportPadding) => css`\n\t\t\t@media (max-width: ${(props) =>\n\t\t\t\t\tcalcStyle({\n\t\t\t\t\t\ta: viewportPadding,\n\t\t\t\t\t\tb: props.theme.media.maxWidthMobile,\n\t\t\t\t\t})}) {\n\t\t\t\tmargin-bottom: -5%;\n\t\t\t}\n\n\t\t\t@media (max-width: ${(props) =>\n\t\t\t\t\tcalcStyle({\n\t\t\t\t\t\ta: viewportPadding,\n\t\t\t\t\t\tb: props.theme.media.maxWidthTablet,\n\t\t\t\t\t})}) {\n\t\t\t\tmargin-bottom: -8%;\n\t\t\t\twidth: 110%;\n\t\t\t}\n\n\t\t\t@media (min-width: ${(props) =>\n\t\t\t\t\tcalcStyle({\n\t\t\t\t\t\ta: viewportPadding,\n\t\t\t\t\t\tb: props.theme.media.minWidthDesktop,\n\t\t\t\t\t})}) {\n\t\t\t\tmargin-bottom: -45px;\n\t\t\t\twidth: 100%;\n\t\t\t\tmargin-top: -35px;\n\t\t\t}\n\t\t`,\n\t)}\n\n\t${RiskSwitchStyled} {\n\t\torder: 1;\n\t}\n\n\t${PlinkoGameBodyStyled} {\n\t\torder: 2;\n\t}\n\n\t${LinesSwitchStyled} {\n\t\torder: 3;\n\t}\n`;\n","type IdleCallbackFunction = (\n\tcallback: IdleRequestCallback,\n\toptions?: IdleRequestOptions,\n) => number;\ntype TimeoutCallbackFunction = (callback: any) => NodeJS.Timeout;\n\nconst requestIdleCallbackPolyfill:\n\t| IdleCallbackFunction\n\t| TimeoutCallbackFunction =\n\t(typeof window !== 'undefined' && window.requestIdleCallback) ||\n\tfunction (callback) {\n\t\tconst start = Date.now();\n\n\t\treturn setTimeout(function () {\n\t\t\tcallback({\n\t\t\t\tdidTimeout: false,\n\t\t\t\ttimeRemaining: function () {\n\t\t\t\t\treturn Math.max(0, 50 - (Date.now() - start));\n\t\t\t\t},\n\t\t\t});\n\t\t}, 1);\n\t};\n\ntype CancelIdleCallbackFunction = (id: number) => void;\n\nconst cancelIdleCallbackPolyfill: CancelIdleCallbackFunction =\n\t(typeof window !== 'undefined' && window.cancelIdleCallback) ||\n\tfunction (id) {\n\t\tclearTimeout(id);\n\t};\n\nexport { requestIdleCallbackPolyfill, cancelIdleCallbackPolyfill };\n","import React, { FC, useCallback, useEffect, useState } from 'react';\nimport classnames from 'classnames';\nimport { LOADING_IDS } from '@common/constants/fetch/loading.ids';\nimport { useOnUnmount } from '@common/hooks/useOnUnmount';\nimport { useStateEffect } from '@common/hooks/useStateEffect';\nimport { preventDefault } from '@common/methods/preventDefault';\nimport { useLoaderModule } from '@common/selectors/loader.selector';\nimport { useOptionEnabled } from '@common/selectors/options.selectors';\nimport { OPTIONS } from '@legacyApp/client/store/options/options.constants';\nimport { usePrevious } from '@legacyApp/hooks/render/usePrevious';\nimport { useAppDispatch } from '@legacyApp/hooks/store/useAppDispatch';\nimport { GameType } from '@modules/games/Game/constants/availableGames';\nimport { gameUpdateBetInAnimation } from '@modules/games/Game/store/game/game.actions';\nimport { gameResolvePendingAnimatedBetsThunk } from '@modules/games/Game/store/game/thunks/gameResolvePendingAnimatedBets.thunk';\nimport {\n\tuseGameAutoBetIsRolling,\n\tuseGameAutoBetStats,\n} from '@modules/games/Game/store/gameAutobet/gameAutobet.selectors';\nimport { usePlinkoLinesSelector } from '@modules/games/Game/store/plinko/selectors/usePlinkoLinesSelector';\nimport { usePlinkoRiskSelector } from '@modules/games/Game/store/plinko/selectors/usePlinkoRiskSelector';\nimport { plinkoBallResultThunk } from '@modules/games/Game/store/plinko/thunks/plinkoBallResult.thunk';\nimport { usePlinkoNewBet } from '@modules/games/PlinkoGame/hooks/usePlinkoNewBet';\nimport { usePlinkoUpdatePayout } from '@modules/games/PlinkoGame/hooks/usePlinkoUpdatePayout';\nimport { addBall } from '@modules/games/PlinkoGame/methods/addBall';\nimport { getDataFromBallLabel } from '@modules/games/PlinkoGame/methods/getDataFromBallLabel';\nimport { getPayoutIndexFromPath } from '@modules/games/PlinkoGame/methods/getPayoutIndexFromPath';\nimport {\n\tplinkoResultEvent,\n\tPlinkoResultEventDetails,\n} from '@modules/games/PlinkoGame/methods/plinkoTriggerEvents';\n\nimport { BetAmountInputContainer } from '@legacyApp/client/components/betAmountInput';\nimport { LastBets } from '@legacyApp/client/components/lastBets/LastBets';\nimport { ProfitInputContainer } from '@legacyApp/client/components/profitInput';\nimport { PayoutInputContainer } from '@legacyApp/client/components/payoutInput/payoutInput.container';\nimport { WinChanceInputContainer } from '@legacyApp/client/components/winChanceInput';\nimport { StyledGameForm } from '@legacyApp/client/modules/style/components/GameForm.styled';\nimport { AutoBetSessionSwitch } from '@modules/games/Game/components/Autobet/AutobetSessionSwitch/AutoBetSessionSwitch';\nimport { GamePanel } from '@modules/games/Game/components/Game.components/GamePanel/GamePanel';\nimport { GamePlinkoGlobalStyles } from '@modules/games/Game/components/Game.components/GameWrapper/StyledGame/game-plinko.global.styled';\nimport { GameStats } from '@modules/games/Game/components/Game.components/GameStats';\nimport { LinesSwitch } from '@modules/games/PlinkoGame/components/LinesSwitch/LinesSwitch';\nimport { Playground } from '@modules/games/PlinkoGame/components/playground/components/Playground/Playground';\nimport { RiskSwitch } from '@modules/games/PlinkoGame/components/playground/components/RiskSwitch/RiskSwitch';\nimport { PlinkoGameStyled } from '@modules/games/PlinkoGame/styles/PlinkoGameStyled';\nimport { PlinkoFormStyled } from '@modules/games/PlinkoGame/styles/PlinkoFormStyled';\nimport { PlinkoPlaygroundStyled } from '@modules/games/PlinkoGame/styles/PlinkoPlayground.styled';\nimport { SubjectController } from '@common/controllers/subjectController';\nimport { useAppVisible } from '@common/selectors/app.selectors';\nimport {\n\tPLINKO_BET_ERROR_EVENT,\n\tPLINKO_RESULT_EVENT,\n} from '@modules/games/PlinkoGame/constants';\nimport { requestIdleCallbackPolyfill } from '@common/helpers/requestIdleCallbackPolyfill';\n\nimport styles from './PlinkoGamePlayground.module.scss';\n\nexport const PlinkoGamePlayground: FC = () => {\n\tconst dispatch = useAppDispatch();\n\tconst autoBetRolling = useGameAutoBetIsRolling(GameType.PLINKO);\n\tconst autoStats = useGameAutoBetStats();\n\tconst isBetLoading = useLoaderModule(LOADING_IDS.PLACE_BET);\n\tconst lines = usePlinkoLinesSelector();\n\tconst risk = usePlinkoRiskSelector();\n\tconst animation = useOptionEnabled(OPTIONS.ANIMATION);\n\tconst highSpeed = useOptionEnabled(OPTIONS.HIGH_SPEED);\n\tconst isAppVisible = useAppVisible();\n\n\tconst [loading, setLoading] = useState(0);\n\tconst [loaded, setLoaded] = useState(true);\n\n\tconst prevIsBetLoading = usePrevious(isBetLoading);\n\tconst prevLoading = usePrevious(loading);\n\n\tconst incrementLoading = useCallback(() => {\n\t\tsetLoading((state) => state + 1);\n\t}, []);\n\n\tconst decrementLoading = useCallback(() => {\n\t\tsetLoading((state) => (state === 0 ? 0 : state - 1));\n\t}, []);\n\n\tconst bet = useCallback(\n\t\t(position: number, betHash: string, path: Array) => {\n\t\t\trequestIdleCallbackPolyfill(() => {\n\t\t\t\tif (animation) {\n\t\t\t\t\tincrementLoading();\n\n\t\t\t\t\taddBall({ risk, position, lines, betHash, path });\n\n\t\t\t\t\tdispatch(\n\t\t\t\t\t\tgameUpdateBetInAnimation({\n\t\t\t\t\t\t\tgame: GameType.PLINKO,\n\t\t\t\t\t\t\tvalue: {\n\t\t\t\t\t\t\t\tid: betHash,\n\t\t\t\t\t\t\t\tactive: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\n\t\t\t\t\tif (highSpeed && autoBetRolling) {\n\t\t\t\t\t\tdispatch(plinkoBallResultThunk(betHash));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdecrementLoading();\n\n\t\t\t\t\tconst payoutIndex = getPayoutIndexFromPath(path);\n\n\t\t\t\t\tif (payoutIndex) {\n\t\t\t\t\t\tplinkoResultEvent({\n\t\t\t\t\t\t\tballLabel: null,\n\t\t\t\t\t\t\tpayoutIndex,\n\t\t\t\t\t\t\tlines,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\tdispatch(plinkoBallResultThunk(betHash));\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t[\n\t\t\tanimation,\n\t\t\tincrementLoading,\n\t\t\trisk,\n\t\t\tlines,\n\t\t\thighSpeed,\n\t\t\tautoBetRolling,\n\t\t\tdispatch,\n\t\t\tdecrementLoading,\n\t\t],\n\t);\n\n\tconst onResult = (details: PlinkoResultEventDetails) => {\n\t\trequestIdleCallbackPolyfill(() => {\n\t\t\tconst item = details;\n\n\t\t\tif (!item?.ballLabel) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { betHash } = getDataFromBallLabel(item?.ballLabel);\n\n\t\t\tdispatch(\n\t\t\t\tgameUpdateBetInAnimation({\n\t\t\t\t\tgame: GameType.PLINKO,\n\t\t\t\t\tvalue: {\n\t\t\t\t\t\tid: betHash,\n\t\t\t\t\t\tactive: false,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\n\t\t\tdecrementLoading();\n\n\t\t\tdispatch(plinkoBallResultThunk(betHash));\n\t\t});\n\t};\n\n\tconst onBetError = () => {\n\t\tsetLoaded((prevState) => {\n\t\t\tif (!prevState) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\t};\n\n\tconst checkIsLoading = useCallback(() => {\n\t\treturn !!loading || isBetLoading || !loaded;\n\t}, [isBetLoading, loaded, loading]);\n\n\tconst disableForm = useStateEffect(\n\t\tuseCallback(() => {\n\t\t\treturn autoBetRolling || checkIsLoading();\n\t\t}, [autoBetRolling, checkIsLoading]),\n\t);\n\n\tusePlinkoUpdatePayout();\n\n\tusePlinkoNewBet(bet);\n\n\tuseEffect(() => {\n\t\tif (animation) {\n\t\t\tif (!prevIsBetLoading && isBetLoading) {\n\t\t\t\tsetLoaded(false);\n\t\t\t}\n\n\t\t\tif (!loading && !!prevLoading && !isBetLoading) {\n\t\t\t\tsetLoaded(true);\n\t\t\t}\n\t\t}\n\t}, [animation, isBetLoading, loading, prevIsBetLoading, prevLoading]);\n\n\tuseEffect(() => {\n\t\tif (!isAppVisible) {\n\t\t\tsetLoading(0);\n\t\t}\n\t}, [isAppVisible]);\n\n\tuseOnUnmount(() => {\n\t\tdispatch(gameResolvePendingAnimatedBetsThunk(GameType.PLINKO));\n\t});\n\n\tuseEffect(() => {\n\t\tconst handler = SubjectController.subscribe(PLINKO_RESULT_EVENT, onResult);\n\t\tconst betErrorhandler = SubjectController.subscribe(\n\t\t\tPLINKO_BET_ERROR_EVENT,\n\t\t\tonBetError,\n\t\t);\n\n\t\treturn () => {\n\t\t\thandler.unsubscribe();\n\t\t\tbetErrorhandler.unsubscribe();\n\t\t};\n\t}, []);\n\n\treturn (\n\t\t<>\n\t\t\t\n\n\t\t\t\n\t\t\t\t{autoBetRolling && (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t)}\n\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import { useCallback, useEffect } from 'react';\nimport { usePrevious } from '@legacyApp/hooks/render/usePrevious';\nimport { useAppDispatch } from '@legacyApp/hooks/store/useAppDispatch';\nimport { useOnMount } from '@common/hooks/useOnMount';\nimport { plinkoActions } from '../../Game/store/plinko/plinko.actions';\nimport { usePlinkoParsedPositionSelector } from '../../Game/store/plinko/selectors/usePlinkoPositionSelector';\n\nexport const usePlinkoNewBet = (\n\tcallback: (position: number, hash: string, path: Array) => void,\n) => {\n\tconst dispatch = useAppDispatch();\n\tconst { position, hash, path } = usePlinkoParsedPositionSelector();\n\tconst prevHash = usePrevious(hash);\n\n\tconst triggerNewBet = useCallback(\n\t\t(hash: string) => {\n\t\t\tif (hash) {\n\t\t\t\tcallback(position, hash, path);\n\t\t\t\tdispatch(plinkoActions.positionUpdate(null));\n\t\t\t}\n\t\t},\n\t\t[callback, dispatch, path, position],\n\t);\n\n\tuseEffect(() => {\n\t\tif (hash !== prevHash) {\n\t\t\ttriggerNewBet(hash);\n\t\t}\n\t}, [callback, hash, position, prevHash, path, dispatch, triggerNewBet]);\n\n\tuseOnMount(() => {\n\t\ttriggerNewBet(hash);\n\t});\n};\n","import React, { FC } from 'react';\nimport { useOptionEnabled } from '@common/selectors/options.selectors';\nimport { OPTIONS } from '@legacyApp/client/store/options/options.constants';\nimport { GameType } from '../Game/constants/availableGames';\nimport { AutoBetLayout } from '../Game/components/Autobet/AutobetLayout';\nimport {\n\tuseGameAutoBetActive,\n\tuseGameAutoBetIsRolling,\n} from '../Game/store/gameAutobet/gameAutobet.selectors';\nimport { AutoBetMode } from '../Game/store/game/thunks/handleBet.thunk';\nimport { PlinkoGamePlayground } from './components/PlinkoGame/PlinkoGamePlayground';\n\nexport const PlinkoGame: FC = () => {\n\tconst autoBetRolling = useGameAutoBetIsRolling(GameType.PLINKO);\n\tconst mode = useGameAutoBetActive(GameType.PLINKO);\n\tconst animation = useOptionEnabled(OPTIONS.ANIMATION);\n\n\tconst isAutoBetLayout =\n\t\tautoBetRolling && (mode === AutoBetMode.FLASH ? true : !animation);\n\n\tif (isAutoBetLayout) {\n\t\treturn (\n\t\t\t\n\t\t);\n\t}\n\n\treturn ;\n};\n","import Router from 'next/router';\n\nimport { pageEnhancer } from '@common/hoc/pageEnhancer';\nimport { handleGetStaticProps } from '@legacyApp/methods/router/handleGetStaticProps';\nimport { GameJsonLd } from '@common/components/seo/GameJsonLd';\nimport { ROUTING_ID } from '@common/constants/routing/ids.routing.constants';\nimport { TransNamespace } from '@legacyApp/client/modules/translation/TransNamespace';\nimport { DEFAULT_NAMESPACE } from '@legacyApp/client/modules/translation/translate.constants';\nimport { PlinkoGame } from '@modules/games/PlinkoGame';\nimport { GameType } from '@modules/games/Game/constants/availableGames';\nimport { isFeatureAvailable } from '@legacyApp/client/modules/app/featureService';\nimport { FEATURES_TYPE } from '@legacyApp/client/config';\nimport { FullscreenLoading } from '@legacyApp/client/components/loading/FullScreenLoading';\nimport GameLayout from '@common/components/games/GameWrapper/GameWrapper';\nimport { getPageData } from '@modules/cmsHandler/methods/getPageData';\nimport { getBreadcrumbsCasino, getBreadcrumbsCasinoGame } from '@pages/casino';\n\nconst PAGE_ID = ROUTING_ID.GAME;\nconst NO_INDEX = false;\n\nconst getBreadcrumbs = (locale) => [\n\t...getBreadcrumbsCasino(locale),\n\tgetBreadcrumbsCasinoGame(locale, GameType.PLINKO),\n];\n\nexport async function getStaticProps(props) {\n\tconst { page_content } = await getPageData(\n\t\t`${PAGE_ID}/${GameType.PLINKO}`,\n\t\tprops.locale,\n\t);\n\n\treturn await handleGetStaticProps(\n\t\t{\n\t\t\tlocale: props.locale,\n\t\t\tparams: {\n\t\t\t\t...props.params,\n\t\t\t\tpage_content,\n\t\t\t},\n\t\t},\n\t\t[DEFAULT_NAMESPACE, TransNamespace.PLINKO_PAGE_CONTENT],\n\t);\n}\n\nexport default pageEnhancer(\n\t({ params }) => {\n\t\tif (process.browser && !isFeatureAvailable(FEATURES_TYPE.PLINKO)) {\n\t\t\tRouter.push('/');\n\t\t\treturn ;\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t},\n\t{\n\t\tid: PAGE_ID,\n\t\tnoSeo: true,\n\t\tstructuredData: (locale) => (\n\t\t\t\n\t\t),\n\t\tgetBreadcrumbs,\n\t},\n);\n","\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/casino/plinko\",\n function () {\n return require(\"private-next-pages/casino/plinko.tsx\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/casino/plinko\"])\n });\n }\n ","// extracted by mini-css-extract-plugin\nmodule.exports = {\"maxWidthDesktop\":\"1450px\",\"maxWidthTablet\":\"820px\",\"maxWidthMobile\":\"420px\",\"maxWidthVerySmall\":\"359px\",\"maxWidthSmallTablet\":\"620px\",\"minWidthMobile\":\"360px\",\"minWidthSmallTablet\":\"421px\",\"minWidthTablet\":\"621px\",\"minWidthDesktop\":\"821px\",\"minWidthBigDesktop\":\"1451px\",\"blue\":\"#343434\",\"textBlue\":\"#3d639c\",\"darkBlue\":\"#022963\",\"turquoise\":\"#1bd6fe\",\"green\":\"#00bb39\",\"darkGreen\":\"#208e41\",\"red\":\"red\",\"orange\":\"orange\",\"orangeBanner\":\"#ff8400\",\"dark\":\"#3c3c3c\",\"lightGrey\":\"#ebebeb\",\"semiLightGrey\":\"#e2e2e2\",\"veryLightGrey\":\"#f9f9f9\",\"userPanelGrey\":\"#f7f7f7\",\"grey\":\"#9c9c9c\",\"darkGrey\":\"#484848\",\"lightblue\":\"#0553c5\",\"skyblue\":\"#1eaffc\",\"greyFont\":\"#9d9d9d\",\"alertError\":\"#990015\",\"alertInfo\":\"#1d5dca\",\"unrankedColor\":\"#4d4d4d\",\"hunterColor\":\"#bf3d3d\",\"warriorColor\":\"#3fbc80\",\"leadWarriorColor\":\"#3db0bf\",\"deltaColor\":\"#bf623d\",\"betaColor\":\"#bfbfbf\",\"alphaColor\":\"#c1a73d\",\"background\":\"#0c1420\",\"backgroundLight\":\"#003ea7\",\"text\":\"#fffdff\",\"textDisabled\":\"#a8a8a8\",\"veryLightBlue\":\"#a0ccff\",\"secondText\":\"#4272b4\",\"placeholderText\":\"#3d70ca\",\"positive\":\"var(--color-other-success)\",\"positiveLight\":\"#1dbb2f\",\"negative\":\"var(--color-other-red)\",\"negativeLight\":\"#f1001c\",\"gold\":\"#e0b201\",\"active\":\"var(--color-blue-blue-light)\",\"borderColor\":\"#495763\",\"passwordValidationColor\":\"#2d5482\",\"modalBg\":\"#001126\",\"sectionsBorder\":\"#0e386b\",\"inputBackgroundDisabled\":\"#011429\",\"inputBackgroundSolid\":\"#072349\",\"inputBackground\":\"rgba(7,35,73,.87)\",\"inputBackgroundActive\":\"#002a5b\",\"inputLightBackgroundSolid\":\"#013672\",\"inputLightBackground\":\"rgba(1,54,114,.87)\",\"inputLightBackgroundActive\":\"#023f86\",\"inputButton\":\"#0a58b9\",\"modalBackgroundSolid\":\"#031b3c\",\"modalBackground\":\"rgba(3,27,60,.93)\",\"modalBorderColor\":\"#1f1f1f\",\"buttonDefaultBackground\":\"rgba(7,35,73,.87)\",\"rowTitleBg\":\"#072349\",\"rowContentBg\":\"#0e2f5c\",\"settingsMenuBg\":\"#132136\",\"settingsPanelBg\":\"#080f1a\",\"metamask\":\"#f60\",\"tronlink\":\"#636acc\",\"scatter\":\"#00a8ff\",\"minTableWidth\":\"1050px\",\"callHeight\":\"30px\",\"tableBorderColor\":\"#495763\",\"tableBorderColorLight\":\"#3a4959\",\"containerSmall\":\"1020px\",\"containerBig\":\"1180px\",\"navbarHeight\":\"20px\",\"textSize\":\"12px\",\"textSizeDesktop\":\"16px\",\"textSizeBigScreen\":\"18px\",\"borderRadius\":\"3px\",\"noBorder\":\"0 solid transparent\",\"transition\":\".3s\",\"sideFullPadding\":\"20px\",\"verticalPadding\":\"15px\",\"buttonMargin\":\"15px\",\"dropdownBlue\":\"#0554ca\",\"dropdownSelectBlue\":\"#0043a6\",\"headerHeight\":\"45px\",\"headerHeightDesktop\":\"55px\",\"headerHeightBigDesktop\":\"55px\",\"headerColor\":\"transparent\",\"headerMobile\":\"31.5px\",\"footerHeight\":\"180px\",\"bottomMenuHeight\":\"60px\",\"navWidth\":\"400px\",\"navBorderColor\":\"rgba(0,0,0,.1)\",\"socialWidth\":\"50px\",\"inputHeight\":\"35px\",\"inputHeightMobile\":\"30px\",\"inputHeightDesktop\":\"44px\",\"inputHeightBigDesktop\":\"54px\",\"boxShadow\":\"0 0 45px -15px #000\",\"chatWidth\":\"320px\",\"chatWidthDesktop\":\"370px\",\"chatInputHeightBigDesktop\":\"100px\",\"chatInputHeightDesktop\":\"100px\",\"chatInputHeight\":\"75px\",\"chatHeaderHeight\":\"45px\",\"chatHeaderHeightDesktop\":\"55px\",\"chatHeaderHeightBigDesktop\":\"55px\",\"cardWidthScale\":\"2.3\",\"cardHeightScale\":\"3.5\",\"cardHeightToWidthScale\":\"1.5217391304\",\"cardScale\":\"70px\",\"smallCardScale\":\"23.3333333333px\",\"smallCardHeight\":\"81.6666666667px\",\"smallCardWidth\":\"53.6666666667px\",\"cardHeight\":\"245px\",\"cardWidth\":\"161px\",\"fontWieghtThin\":\"100\",\"fontWeightExtraThin\":\"200\",\"fontWeightLight\":\"300\",\"fontWeightRegular\":\"400\",\"fontWeightMedium\":\"500\",\"fontWeightSemiBold\":\"600\",\"fontWeightBold\":\"700\",\"fontWeightExtraBold\":\"800\",\"fontWeightBlack\":\"900\",\"regularFontHeight\":\"1.25\",\"Regular\":\"FontRegular,Maven Pro,Inter,regular-fallback\",\"Black\":\"LatoBlack,bold-fallback\",\"Bold\":\"FontBold,LatoBlack,bold-fallback\",\"topIndentation\":\"52px\",\"bottomIndentation\":\"70px\",\"sideMargin\":\"20px\",\"gameMobile\":\"318px\",\"gameMobileAutobet\":\"399px\",\"gameTablet\":\"356px\",\"gameTabletAutobet\":\"466px\",\"plinko-session-switch\":\"PlinkoGamePlayground_plinko-session-switch__olZlg\"};","var trigfillfactory=function(){return function(){\"use strict\";function t(){return\"0.9.2\"}function n(t,n){return t-Math.floor(t/n)*n}function e(t,n){return t-Math.floor(t/n+.5)*n}function a(t){var n=t*t*t;return t-n*P+n*t*t*x-n*n*t*y+n*n*n*g}function r(t){var n=t*t,e=n*n;return 1-.5*n+e*q-n*e*b+e*e*T}function f(t){return t-=Math.floor(t/M)*M,d>t?(t>=l&&(t=d-t),t>m?r(l-t):a(t)):(t-=d,t>=l&&(t=d-t),t>m?-0-r(l-t):-0-a(t))}function o(t){return f(l-t)}function i(t){var n=1,e=0,a=0;0>t&&(n=0,t=0-t),t>1&&(t=1/t,e=1),t>.26794919&&(t=(I*t-1)/(I+t),a=1);var r=t*t,f=r*r,o=f*f;return t=t-t*r*j+f*t*k-f*r*t*w+o*t*z-o*r*t*A,a&&(t+=l*p),e&&(t=l-t),n?t:-t}function u(t){var e=1,a=0,r=0;t=.9999999999999999*n(t,d),t>l&&(e=0,t=d-t),t>m&&(a=1,t=l-t),t>v&&(r=2,t=.5*t);var f=t*t*t,o=f*f;return t=t+f*B+f*t*t*C+o*t*D+o*f*E+o*f*t*t*F,r&&(t=2*t/(1-t*t)),a&&(t=1/t),t===1/0&&(t=0x3a052cf8639b6a),e?t:-t}function c(t){return-1==t?Math.PI:n(i(Math.sqrt(1-t*t)/t),Math.PI)}function s(t){return i(t/Math.sqrt(1-t*t))}function h(){Math.sin=f,Math.cos=o,Math.tan=u,Math.acos=c,Math.asin=s,Math.atan=i,Math.hasTrigfills=t()}var M=2*Math.PI,d=Math.PI,l=.5*Math.PI,m=.25*Math.PI,v=.125*Math.PI,p=1/3,I=1.7320508075688772,P=1e8/600000005,x=1/120,y=1e3/5039680,g=10/3628880,q=1e5/2399999,b=1e5/71998376,T=1e3/40578583,j=.3333333342477778,k=1e7/50000082,w=1e5/700011,z=1e4/90019,A=1e3/11768,B=1e9/2999999887,C=2e8/1500000678,D=17e4/3150457,E=6200/282874,F=1382/146286;return{sin:f,cos:o,tan:u,acos:c,asin:s,atan:i,setmaths:h,modp:n,modn:e,version:t}}()},mdname=\"trigfills\",facfnc=trigfillfactory;\"undefined\"!=typeof exports?\"undefined\"!=typeof module&&module.exports?exports=module.exports=facfnc({}):exports[mdname]=facfnc({}):\"function\"==typeof define&&define.amd?define(mdname,[],function(){return facfnc({})}):(0,eval)(\"this\")[mdname]=facfnc({});"],"names":["FLASHBET_RESULT","InstanceController","create","defaultValue","this","instance","rebuild","SubjectController","SubjectControllerClass","id","callback","subjects","Subject","subscribe","message","next","IncrementingIdClass","label","IncrementingId","getIncrId","trigf","MatterJS","getChangedBalanceThunk","data","dispatch","getState","state","currency","amount","balanceElement","getBalance","balance","balancesArray","newBalance","roundNumber","Number","config","amount_usd","stats","price","StyledGamePanel","styled","box","StyledGamePanelButton","css","StyledGamePanelButtonMain","props","$isDisabled","$isAutoBetRolling","$isNoClick","noclick","theme","media","minWidthDesktop","minWidthBigDesktop","StyledGamePanelLoadingLogo","LoadingLogo","$isHidden","checkExpertConfig","length","isEasyTemplate","every","el","command","when","filter","indexOf","name","type","parseFloat","value","checkEasyConfig","checkIsWinChanceDisabled","rule","game","GameType","checkIsSingleValue","RollRule","getStrategyFromState","isDefault","activeGame","getGameFromUrl","dice","rollDirection","betValues","getRuleBetValuesBetConfig","betValue","getDiceConfig","gameAutobet","user","activeCurrency","mode","configEasy","payoutValue","limbo","defaultPayout","getPayout","defaultWinChanceValue","rolls","risk","lines","rows","betAmount","defaultBetAmount","checkIsStrategyFromBetPayload","payload","auto","flash","createPlaceBetBodyThunk","isStrategy","body","strategy","parseEasyConfigForAPI","undefined","createPlaceBetUrl","gameLabel","gameResolvePendingAnimatedBetsThunk","gameState","betsInAnimation","Object","keys","forEach","betHash","gameUpdateBetInAnimation","active","betsAnimated","handleAnimatedBetThunk","hash","userBalance","isLastBetAnimatedBalance","betsAnimatedLastBalance","bet","profit","source","nextBet","stopReason","handleAutobetPlayResponseThunk","handleBetResponseThunk","gameUpdateBetAnimatedLastBalance","betUpdateAnimated","flashbetResult","actionSimple","status","text","url","sentryError","Error","jsonToString","sessions","autoBetRolling","autobetSummaryConnectionError","handleAutobetErrorThunk","betResult","lastBet","autoBet","uuid","autobetSetRollsCounter","autobetSetId","autobetPlay","result","lastBetTimestamp","autobet","counter","stopped","createPosition","position","path","join","parsePosition","isFunction","split","pos","map","getMarkedBallStyle","colors","getBallColor","backgroundColor","fill","border","line","MultiplierBox","multiplier","index","count","enableAnimation","marked","boxEl","useRef","timeoutRef","boxColorClassName","MultiplierColorCombinations","String","onResult","details","payoutIndex","audioService","Sounds","current","classList","add","clearTimeout","setTimeout","remove","useEffect","handler","PLINKO_RESULT_EVENT","unsubscribe","className","ref","style","toFixed","MultiplierBoxes","onModal","profitError","markedBoxIndex","styleGrid","compactView","stateLines","usePlinkoLinesSelector","lines_","stateRisk","usePlinkoRiskSelector","risk_","profitErrorState","useGameValidationProfitError","profitError_","multipliers","useStateEffect","useCallback","getMultiplierByLinesQnt","a","b","transactionService","localTheme","namespace","TransNamespace","content","isVisible","hideOnClick","gridTemplateColumns","gridTemplateRows","MultiplierColors","ORANGE","ORANGE_LIGHT","YELLOW_DARK","YELLOW","YELLOW_LIGHT","ORANGE_DARK","RED","RED_DARK","RED_DARKER","multiplyBlocksByLinesQnt","Risk","img","getMultiplier","getMinMaxWall","linesRatio","getLinesRatio","pinSize","getPinRadius","pinGap","maxX","minX","createBall","getMinMaxBallX","maxBallX","minBallX","alert","isStatic","radius","getBallRadius","restitution","friction","frictionAir","collisionFilter","group","render","visible","fillStyle","lineWidth","strokeStyle","createBallLabel","createPlayground","leftWall","angle","createLeftWall","rightWall","createRightWall","floor","getPyramidHeight","waitingBalls","itMayBeTrueTrustMe","NEXT_CONFIG","Array","from","isMock","lastMultiplierX","multipliersBodies","multiplierBody","blockSize","gap","x","y","createMultiplierBox","pins","PinsController","size","createMatterPins","getBalls","matterEngine","engine","world","includes","getWaitingBalls","ball","getDataFromBallLabel","createEngine","gravity","createRunner","isFixed","matterRunner","WRAPPER_ID","getBall","find","ball_","_label","pixiApp","app","stage","children","child","options","PIXI","powerPreference","premultipliedAlpha","createPixiRenderer","createPixiWebGLRenderer","console","error","then","mod","createPixiCanvasRenderer","initPixi","elementId","currInstance","wrapper","document","getElementById","renderer","appendChild","view","eventMode","interactiveChildren","removeChildren","width","height","backgroundAlpha","antialias","Pin","pinEl","useMemo","size_","x_","y_","left","top","onPinCollision","pinLabel","contains","PLINKO_PIN_COLLISION_EVENT","PinsLayer","memo","PinBoxesStyled","getMultiplierBoxesTop","scale","pinConfig","getPinConfig","pinsLastRowY","gapBig","getMultipliersWidth","space","getGap","PlinkoGameBody","elementRef","useAppWidth","useAppHeight","get","clientHeight","clientWidth","height_","width_","Math","min","useState","worldToCanvasRatio","setWorldToCanvasRatio","update","ratio","useWindowEventListener","GAME_LOADED_EVENT","usePlinkoWorldRatio","transform","styleGap","PlinkoGameBodyStyled","$scale","$rows","PlinkoCanvasWrapperStyled","parseImageSrc","maxWidthTablet","PLINKO_BET_ERROR_EVENT","createPinLabel","level","PinsControllerClass","l","linePins","i","levelIndex","pin","push","createPins","levelsPositions","reduce","acc","getConfig","setConfig","ballLabel","timestamp","isTrueOrZero","Boolean","getTimestamp","pinGapToPinSizeRatio","precision","max","getPayoutIndexFromPath","previousValue","currentValue","pyramidHeightToPinSizeRatio","plinkoResultEvent","removeBallMatterJs","removeBallPixiJs","removeChild","set","_animateComponent","reset","removeBall","Mode","plinkoBallResultThunk","usePlinkoParsedPositionSelector","useAppSelector","plinko","shallowEqual","usePlinkoUpdatePayout","useAppDispatch","payout","useGamePayout","getWinChanceFromPayout","validatePayout","updatePayoutThunk","winChance","updateWinChanceThunk","diceActions","parseSingleBetValue","changePayoutThunk","Composite","addBallMatterJs","Easing","freeze","Linear","None","In","Out","InOut","Quadratic","Cubic","Quartic","Quintic","Sinusoidal","sin","PI","Exponential","pow","Circular","sqrt","Elastic","Back","s","Bounce","generatePow","power","EPSILON","now","performance","Group","_tweens","_tweensAddedDuringUpdate","prototype","getAll","_this","tweenId","removeAll","tween","getId","time","preserve","tweenIds","autoStart","Interpolation","v","k","m","f","fn","Utils","Bezier","n","pw","bn","Bernstein","CatmullRom","p0","p1","t","fc","Factorial","p2","p3","v0","v1","t2","Sequence","nextId","_nextId","mainGroup","Tween","_object","_group","_isPaused","_pauseStart","_valuesStart","_valuesEnd","_valuesStartRepeat","_duration","_isDynamic","_initialRepeat","_repeat","_yoyo","_isPlaying","_reversed","_delayTime","_startTime","_easingFunction","_interpolationFunction","_chainedTweens","_onStartCallbackFired","_onEveryStartCallbackFired","_id","_isChainStopped","_propertiesAreSetUp","_goToEnd","isPlaying","isPaused","getDuration","to","target","duration","dynamic","start","overrideStartingValues","property","_swapEndStartRepeatValues","tmp","prop","_setupProperties","startFromCurrentValues","startValue","startValueIsArray","isArray","propType","isInterpolationList","endValues","temp","_handleRelativeValue","isNaN","warn","slice","reverse","nestedObject","stop","stopChainedTweens","_onStopCallback","end","Infinity","pause","resume","numChainedTweens","delay","repeat","times","repeatDelay","_repeatDelayTime","yoyo","easing","easingFunction","interpolation","interpolationFunction","chain","tweens","_i","arguments","onStart","_onStartCallback","onEveryStart","_onEveryStartCallback","onUpdate","_onUpdateCallback","onRepeat","_onRepeatCallback","onComplete","_onCompleteCallback","onStop","_a","endTime","elapsedTime","durationAndDelay","totalTime","elapsed","timesRepeated","trunc","timeIntoCurrentRepeat","portion","calculateElapsedPortion","_updateProperties","completeCount","isFinite","startIsArray","endIsArray","charAt","endValue","TWEEN","bind","random","round","InitialPlinkoCoordinates","InitialPlinkoCoordinatesClass","_plinkoCoordinates","coordinates","randomizeElementFromArray","arr","createSimpleBounce","xDiff","yDiff","createSimpleFall","getPinBallContactCoordinates","pinCoordinates","pinRadius","ballRadius","checkCollisionCircleCircle","dx","dy","checkPinCollision","object","pinsConfig","nextPinLevel","nextBallConfig","ballConfig","wasBallCollisionWithPin","_collisions","createTween","second","DURATION","createPlinkoPathTween","coordinates_","horizontalSpace","getPinsHorizontalSpace","multiplierCoordinates","chainedCoordinates","nextTo","move","fromX","toX","path_","createBounce","AnimateComponent","isAnimating","activeTweenIndex","isAnimation","Ticker","objects","checkAnimation","step","isAnimationArray","entries","key","some","requestAnimationFrame","ticker","addBallAnimation","beginFill","drawCircle","lineStyle","addChild","addBallPixiJs","addBall","GamePlinkoGlobalStyles","createGlobalStyle","MatterJsGame","ssr","getFallingBalls","stopAllBalls","balls","addTestText","text1","fontFamily","fontSize","addInitBalls","PixiJSGame","gameContext","useContext","GameContext","prevLines","usePrevious","prevRisk","timeout","appVisible","useAppVisible","isHighSpeed","useOptionEnabled","OPTIONS","isAutoBet","useGameAutoBetActive","clearTimeout_","useResetBalls","init","setLoaded","useOnMount","Playground","GameLoaded","loaded","PlinkoFormStyled","minWidthSmallTablet","minWidthTablet","StyledGameForm","InputWrapperStyle","ProfitInputWrapper","PayoutInputWrapper","WinChanceInputWrapper","BetAmountInputWrapper","LineSwitchWrapperStyled","RiskInputWrapperStyled","CSSClassNameGamePanel","CSSClassNameGamePanelButtons","plinkoResponsiveMixin","PlinkoPlaygroundStyled","chatViewport","viewportPadding","calcStyle","maxWidthMobile","RiskSwitchStyled","LinesSwitchStyled","requestIdleCallbackPolyfill","window","requestIdleCallback","Date","didTimeout","timeRemaining","cancelIdleCallback","PlinkoGamePlayground","useGameAutoBetIsRolling","autoStats","useGameAutoBetStats","isBetLoading","useLoaderModule","LOADING_IDS","animation","highSpeed","isAppVisible","loading","setLoading","prevIsBetLoading","prevLoading","incrementLoading","decrementLoading","item","onBetError","prevState","checkIsLoading","disableForm","prevHash","triggerNewBet","plinkoActions","usePlinkoNewBet","useOnUnmount","betErrorhandler","PlinkoGameStyled","classnames","styles","AutoBetSessionSwitch","LastBets","noAnimation","LinesSwitch","disabled","RiskSwitch","noValidate","onSubmit","preventDefault","disableButtons","hideTooltip","isDisabled","GamePanel","settingsAsList","GameStats","toggleLayoutHeightThreshold","PlinkoGame","AutoBetMode","disableProfit","PAGE_ID","ROUTING_ID","getBreadcrumbs","locale","getBreadcrumbsCasino","getBreadcrumbsCasinoGame","pageEnhancer","params","isFeatureAvailable","FEATURES_TYPE","title","seoProps","noindex","nofollow","pageParams","Router","initState","noSeo","structuredData","GameJsonLd","itemListElements","__NEXT_P","module","exports","facfnc","P","g","r","e","q","T","M","d","o","I","j","w","z","A","p","u","B","C","D","E","F","c","cos","tan","acos","asin","atan","setmaths","has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