{"version":3,"file":"static/chunks/3089-79f067f0b6010cf9.js","sources":["webpack://_N_E/./src/common/constants/events/index.ts","webpack://_N_E/./src/common/controllers/subjectController.ts","webpack://_N_E/./src/common/hooks/useCustomEventListener.ts","webpack://_N_E/./src/common/icons/ui/flame-icon.tsx","webpack://_N_E/./src/common/methods/reducerInitialStateMethods.ts","webpack://_N_E/./src/common/selectors/options.selectors.ts","webpack://_N_E/./src/modules/games/Game/store/game/slices/risk.slice.ts","webpack://_N_E/./src/modules/games/Game/store/gameValidation/gameValidation.selectors.ts","webpack://_N_E/./src/modules/games/Game/store/plinko/plinko.actions.ts","webpack://_N_E/./src/modules/games/Game/store/plinko/selectors/usePlinkoLinesSelector.ts","webpack://_N_E/./src/modules/games/Game/store/plinko/plinkoInitialState.ts","webpack://_N_E/./src/modules/games/Game/store/plinko/slices/lines.slice.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/LinesSwitch/LinesSwitch.tsx","webpack://_N_E/./src/modules/games/PlinkoGame/hooks/usePlinko.ts","webpack://_N_E/./src/modules/games/PlinkoGame/components/playground/components/RiskSwitch/RiskSwitch.tsx","webpack://_N_E/./src/ui/components/verticalOptions/index.tsx"],"sourceRoot":"","sourcesContent":["import { GameType } from '@modules/games/Game/constants/availableGames';\n\nexport const EVENTS = {\n\tGAME_LOADED: 'game:event:loaded',\n\tGAME_RESULT: (game: GameType) => `${game}:event:result`,\n\tGAME_BET_ERROR: (game: GameType) => `${game}:event:bet-error`,\n\tPLINKO_PIN_COLLISION: `${GameType.PLINKO}:event:pin-collision`,\n\tKENO_INIT_SUMMARY: `${GameType.KENO}:event:init-summary`,\n\tKENO_INIT_TILE_ANIMATION: (tileNumber: number) =>\n\t\t`${GameType.KENO}:event:init-tile-animation:${tileNumber}`,\n\tKENO_SHOW_BET_RESULT: `${GameType.KENO}:event:show-bet-result`,\n} as const;\n\ntype Events = keyof typeof EVENTS;\nexport type EventsType = (typeof EVENTS)[Events];\n","import { Subject } from 'rxjs';\n\nclass SubjectControllerClass {\n\tprivate subjects: Record<string, Subject<any>> = {};\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","import { useCallback, useEffect, useRef } from 'react';\nimport { SubjectController } from '@common/controllers/subjectController';\nimport { Subscription } from 'rxjs';\n\nexport const emitCustomEvent = <T>(eventName: string, details?: T) => {\n\t// console.log('emitCustomEvent', eventName, details);\n\tSubjectController.emit(eventName, details);\n};\n\nexport const useCustomEventListener = <T>(\n\teventName: string,\n\thandler: (details: T) => void,\n) => {\n\tconst handlerRef = useRef<Subscription>(null);\n\n\tconst handler_ = useCallback(\n\t\t(details: T) => {\n\t\t\t// console.log('useCustomEventListener - handler', eventName, details);\n\t\t\thandler(details);\n\t\t},\n\t\t[handler],\n\t);\n\n\tuseEffect(() => {\n\t\tif (!eventName) {\n\t\t\treturn;\n\t\t}\n\t\thandlerRef.current = SubjectController.subscribe(eventName, handler_);\n\n\t\treturn () => {\n\t\t\thandlerRef.current.unsubscribe();\n\t\t};\n\t}, [eventName, handler_]);\n};\n","import { FC } from 'react';\nimport { IconProps } from '@icons/all-bets';\nimport { Svg } from '@legacyApp/client/components/svg/Svg';\n\nexport const FlameIcon: FC<IconProps> = ({ fill, height, width }) => {\n\treturn (\n\t\t<Svg\n\t\t\tcontent={\n\t\t\t\t<path\n\t\t\t\t\td=\"M16.5221 6.48129C16.5221 6.48129 16.8934 4.28763 15.3728 3.33496C15.3502 3.71194 15.2483 4.0799 15.0738 4.41482C14.8993 4.74974 14.6561 5.04409 14.3601 5.27863C13.7098 5.85029 12.4871 7.13496 12.5001 8.50496C12.4958 9.09067 12.6552 9.66593 12.9603 10.1659C13.2653 10.6659 13.704 11.0708 14.2268 11.335C14.2454 11.0706 14.3167 10.8125 14.4364 10.576C14.5561 10.3395 14.7218 10.1293 14.9238 9.95763C15.095 9.82601 15.2383 9.66159 15.3452 9.47399C15.4522 9.28638 15.5207 9.07934 15.5468 8.86496C15.9943 9.10282 16.3725 9.45276 16.6443 9.88057C16.9161 10.3084 17.0723 10.7994 17.0974 11.3056V11.3123C17.5905 11.086 18.0113 10.7277 18.3135 10.2772C18.6157 9.82665 18.7875 9.30134 18.8098 8.75929C18.9178 7.47163 18.2124 5.72196 17.5871 5.14996C17.351 5.67705 16.9845 6.13525 16.5221 6.48129Z\"\n\t\t\t\t\tfill={fill}\n\t\t\t\t/>\n\t\t\t}\n\t\t\twidth={width || 14}\n\t\t\theight={height || 14}\n\t\t\tviewBox=\"11.75 3.5 8 8\"\n\t\t/>\n\t);\n};\n","import { lsGet } from '@modules/localStorage/methods/lsGet';\nimport { lsSet } from '@modules/localStorage/methods/lsSet';\nimport { lsClear } from '@modules/localStorage/methods/lsClear';\nimport { generateInitialStateKey } from '@modules/localStorage/types/localStorageKeys.type';\n\nexport const reducerInitialStateMethods = (key: string) => {\n\tconst names = [];\n\treturn {\n\t\tgetInitialState: (name) => lsGet(generateInitialStateKey(name, key)),\n\t\tsetInitialState: (name, data) => {\n\t\t\tif (names.indexOf(name) === -1) {\n\t\t\t\tnames.push(name);\n\t\t\t}\n\t\t\tlsSet(generateInitialStateKey(name, key), data);\n\t\t},\n\t\tclearState: () => {\n\t\t\tnames.forEach((name) => {\n\t\t\t\tlsClear(generateInitialStateKey(name, key));\n\t\t\t});\n\t\t},\n\t};\n};\n","import { shallowEqual } from 'react-redux';\nimport { useAppSelector } from '@legacyApp/hooks/store/useAppSelector';\nimport { OptionsType } from '@legacyApp/client/store/options/options.constants';\n\nexport const useOptionEnabled = (optionLabel: OptionsType) =>\n\tuseAppSelector<boolean>(\n\t\t(state) => state.options?.[optionLabel],\n\t\tshallowEqual,\n\t);\n","import ReduxToolkit, { createSlice } from '@reduxjs/toolkit';\n\nimport { GameType } from '@modules/games/Game/constants/availableGames';\nimport { capitalize } from '@legacyApp/client/modules/app/appService';\nimport { Risk } from '@modules/games/Game/types/GameRisk';\n\nconst NAME = (game: GameType) => `risk${capitalize(game)}`;\n\nexport type ValueType = Risk;\n\nconst initialState: ValueType = Risk.LOW as ValueType;\n\nconst setAction: ReduxToolkit.CaseReducer<\n\tValueType,\n\tReduxToolkit.PayloadAction<ValueType>\n> = (state, action) => {\n\treturn !action?.payload ? initialState : action.payload;\n};\n\nexport const riskSlice = (game: GameType) =>\n\tcreateSlice({\n\t\tname: NAME(game),\n\t\tinitialState,\n\t\treducers: {\n\t\t\triskUpdate: setAction,\n\t\t},\n\t});\n","import { shallowEqual } from 'react-redux';\n\nimport { useAppSelector } from '@legacyApp/hooks/store/useAppSelector';\nimport { GameType } from '@modules/games/Game/constants/availableGames';\n\nexport const useGameValidationFormError = (game: GameType) =>\n\tuseAppSelector(\n\t\t(state) => state.gameValidation?.formError?.[game],\n\t\tshallowEqual,\n\t);\nexport const useGameValidationProfitError = (game: GameType) =>\n\tuseAppSelector(\n\t\t(state) => state.gameValidation?.profitError?.[game],\n\t\tshallowEqual,\n\t);\n","import { riskSlice } from '@modules/games/Game/store/game/slices/risk.slice';\nimport { GameType } from '@modules/games/Game/constants/availableGames';\nimport { linesSlice } from './slices/lines.slice';\n\nexport const plinkoActions = {\n\t...riskSlice(GameType.PLINKO).actions,\n\t...linesSlice.actions,\n};\n","import { shallowEqual } from 'react-redux';\nimport { useAppSelector } from '@legacyApp/hooks/store/useAppSelector';\nimport { RootState } from '@legacyApp/client/store/configure.store';\nimport { GameType } from '@modules/games/Game/constants/availableGames';\n\nexport const usePlinkoLinesSelector = () =>\n\tuseAppSelector<RootState[GameType.PLINKO]['lines']>(\n\t\t(state) => state.plinko?.lines,\n\t\tshallowEqual,\n\t);\n","import { reducerInitialStateMethods } from '@common/methods/reducerInitialStateMethods';\nimport { GameType } from '../../constants/availableGames';\n\nexport const plinkoInitialState = reducerInitialStateMethods(GameType.PLINKO);\n","import ReduxToolkit, { createSlice } from '@reduxjs/toolkit';\nimport { plinkoInitialState } from '../plinkoInitialState';\nimport { LinesType } from '../../../../PlinkoGame/types';\n\nconst NAME = 'lines';\n\nexport type ValueType = LinesType;\n\nconst initialState: ValueType =\n\t(Number(plinkoInitialState.getInitialState(NAME)) as LinesType) || 8;\n\nconst setAction: ReduxToolkit.CaseReducer<\n\tValueType,\n\tReduxToolkit.PayloadAction<ValueType>\n> = (state, action) => {\n\tplinkoInitialState.setInitialState(NAME, action.payload);\n\n\treturn Number(action.payload) as ValueType;\n};\n\nexport const linesSlice = createSlice({\n\tname: NAME,\n\tinitialState,\n\treducers: {\n\t\tlinesUpdate: setAction,\n\t},\n});\n","import { FC, useCallback } from 'react';\nimport styled from 'styled-components';\nimport { VerticalOptions } from '@ui/verticalOptions';\nimport { Dropdown, StyledDropdownButtonWrapper } from '@ui/dropdown';\nimport { Button, CSSClassNameButton } from '@ui/button';\nimport { isFunction } from '@common/methods/isFunction';\nimport { Trans, trans } from '@legacyApp/client/modules/translation/translate';\nimport { Size } from '@uiTypes/Size';\nimport { ButtonStyleType } from '@uiTypes/ButtonStyleType';\nimport { InputWrapperStyle } from '@legacyApp/client/components/input/styled/inputWrapper.style';\nimport { InputLabelStyle } from '@legacyApp/client/components/input/styled/inputLabelStyle';\nimport { inputHeight } from '@legacyApp/client/modules/style/defaults';\nimport { useAppMobile } from '@common/selectors/app.selectors';\nimport { MODAL_ID } from '@common/constants/modal/ids.modal.constants';\nimport { useAppDispatch } from '@legacyApp/hooks/store/useAppDispatch';\nimport { openModal } from '@modules/modals/store/modal.actions';\nimport { useGameAutoBetMode } from 'src/modules/games/Game/store/gameAutobet/gameAutobet.selectors';\nimport { LinesType } from '../../types';\nimport { usePlinko } from '../../hooks/usePlinko';\n\nconst maxLinesQnt = 16;\nconst linesOptions: LinesType[] = [];\nfor (let i = 8; i <= maxLinesQnt; i++) {\n\tlinesOptions.push(i as LinesType);\n}\n\nexport const LinesSwitch: FC<{\n\tupdate?: (lines: LinesType) => void;\n\tvalue?: LinesType;\n\tcompactView?: boolean;\n\tdisabled?: boolean;\n\tsize?: Size;\n}> = ({ update, value, compactView, disabled, size }) => {\n\tconst isMobile = useAppMobile();\n\tconst dispatch = useAppDispatch();\n\n\tconst mode = useGameAutoBetMode();\n\tconst { setLines, lines: linesState } = usePlinko();\n\n\tconst lines = value || linesState;\n\n\tconst handleChangeLines = useCallback(\n\t\t(value: LinesType) => {\n\t\t\tif (disabled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (isFunction(update)) {\n\t\t\t\treturn update(value);\n\t\t\t}\n\t\t\tsetLines(value);\n\t\t},\n\t\t[setLines, update, disabled],\n\t);\n\n\tconst openExtendedModal = useCallback(() => {\n\t\tif (!isMobile || disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tdispatch(\n\t\t\topenModal(MODAL_ID.INPUT_EXTEND, 'LinesSwitch', {\n\t\t\t\tarray: linesOptions,\n\t\t\t\tvalue: lines,\n\t\t\t\tonChange: handleChangeLines,\n\t\t\t\tdisableInput: true,\n\t\t\t\ttitle: 'Rows',\n\t\t\t}),\n\t\t);\n\t}, [dispatch, handleChangeLines, isMobile, lines, disabled]);\n\n\tif (compactView) {\n\t\treturn (\n\t\t\t<LineSwitchWrapperStyled onClick={openExtendedModal}>\n\t\t\t\t<InputLabelStyle>\n\t\t\t\t\t<Trans label=\"row\" />\n\t\t\t\t</InputLabelStyle>\n\t\t\t\t<Dropdown\n\t\t\t\t\tkey={mode}\n\t\t\t\t\tdisabled={isMobile || disabled}\n\t\t\t\t\tportalId={'lines_switch'}\n\t\t\t\t\tlist={linesOptions.map((value) => ({\n\t\t\t\t\t\tid: value.toString(),\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tstyleType={ButtonStyleType.CLEAR}\n\t\t\t\t\t\t\t\tsize={Size.SMALL}\n\t\t\t\t\t\t\t\tlabel={value}\n\t\t\t\t\t\t\t\tclassName=\"text-style-caption-medium\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t}))}\n\t\t\t\t\tbuttonProps={{\n\t\t\t\t\t\tlabel: lines,\n\t\t\t\t\t\tdisabled: disabled,\n\t\t\t\t\t\t...(size && { size }),\n\t\t\t\t\t}}\n\t\t\t\t\tactiveContent={null}\n\t\t\t\t\tdefaultActiveId={String(lines)}\n\t\t\t\t\tonSelect={\n\t\t\t\t\t\t!isMobile && ((id) => handleChangeLines(Number(id) as LinesType))\n\t\t\t\t\t}\n\t\t\t\t\tsize={size || Size.MEDIUM}\n\t\t\t\t\tmaxHeight={200}\n\t\t\t\t/>\n\t\t\t</LineSwitchWrapperStyled>\n\t\t);\n\t}\n\n\treturn (\n\t\t<LinesSwitchStyled>\n\t\t\t<VerticalOptions\n\t\t\t\tdisabled={disabled}\n\t\t\t\ttitle={trans({ label: 'row' })}\n\t\t\t\tdefaultValue={value || lines}\n\t\t\t\tid=\"lines\"\n\t\t\t\toptions={linesOptions}\n\t\t\t\tonChange={handleChangeLines}\n\t\t\t\tkey={value || lines}\n\t\t\t/>\n\t\t</LinesSwitchStyled>\n\t);\n};\n\nexport const LineSwitchWrapperStyled = styled(InputWrapperStyle)`\n\t${StyledDropdownButtonWrapper} {\n\t\t.${CSSClassNameButton} {\n\t\t\t${inputHeight};\n\t\t\tborder-radius: 2px;\n\t\t}\n\t}\n`;\n\nexport const LinesSwitchStyled = styled.div``;\n","import { useCallback } from 'react';\nimport { useAppDispatch } from '@legacyApp/hooks/store/useAppDispatch';\nimport { Risk } from '@modules/games/Game/types/GameRisk';\nimport { useGameRisk } from '@modules/games/Game/store/game/game.selectors';\nimport { GameType } from '@modules/games/Game/constants/availableGames';\nimport { usePlinkoLinesSelector } from '../../Game/store/plinko/selectors/usePlinkoLinesSelector';\nimport { LinesType } from '../types';\nimport { plinkoActions } from '../../Game/store/plinko/plinko.actions';\n\nexport const usePlinko = () => {\n\tconst dispatch = useAppDispatch();\n\tconst lines = usePlinkoLinesSelector();\n\tconst setLines = useCallback(\n\t\t(lines: LinesType) => {\n\t\t\tdispatch(plinkoActions.linesUpdate(lines));\n\t\t},\n\t\t[dispatch],\n\t);\n\tconst risk = useGameRisk(GameType.PLINKO);\n\tconst setRisk = useCallback(\n\t\t(risk: Risk) => {\n\t\t\tdispatch(plinkoActions.riskUpdate(risk));\n\t\t},\n\t\t[dispatch],\n\t);\n\n\treturn {\n\t\tlines,\n\t\tsetLines,\n\t\trisk,\n\t\tsetRisk,\n\t};\n};\n","import { FC, useCallback } from 'react';\nimport styled from 'styled-components';\nimport { VerticalOptions } from '@ui/verticalOptions';\nimport { FlameIcon } from '@icons/ui/flame-icon';\nimport { Button, CSSClassNameButton } from '@ui/button';\nimport { isFunction } from '@common/methods/isFunction';\nimport { Trans, trans } from '@legacyApp/client/modules/translation/translate';\nimport { ButtonStyleType } from '@uiTypes/ButtonStyleType';\nimport { InputWrapperStyle } from '@legacyApp/client/components/input/styled/inputWrapper.style';\nimport { InputLabelStyle } from '@legacyApp/client/components/input/styled/inputLabelStyle';\nimport { inputHeightWithMove } from '@legacyApp/client/modules/style/defaults';\nimport { InputStyleType } from '@uiTypes/InputStyleType';\nimport { Risk } from '@modules/games/Game/types/GameRisk';\nimport { RiskSwitchType } from '@modules/games/PlinkoGame/components/playground/components/RiskSwitch/RiskSwitch.type';\n\nconst flamesCount = {\n\t[Risk.LOW]: 1,\n\t[Risk.MEDIUM]: 2,\n\t[Risk.HIGH]: 3,\n};\n\nconst riskOptions = Object.keys(Risk).map((key) => {\n\treturn {\n\t\tvalue: Risk[key],\n\t\tlabel: ({ active }: { active: boolean }) => (\n\t\t\t<RiskOptionsStyled className=\"break-word\">\n\t\t\t\t<div>\n\t\t\t\t\t{Array.from(Array(flamesCount[Risk[key]]).keys()).map((_, i) => (\n\t\t\t\t\t\t<FlameIcon\n\t\t\t\t\t\t\tkey={i}\n\t\t\t\t\t\t\tfill={active ? 'white' : 'var(--color-dark-200)'}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t\t<span className=\"whitespace-normal\">\n\t\t\t\t\t<Trans label={Risk[key]} />\n\t\t\t\t</span>\n\t\t\t</RiskOptionsStyled>\n\t\t),\n\t\tcolor:\n\t\t\tRisk[key] === Risk.LOW\n\t\t\t\t? 'var(--color-other-success)'\n\t\t\t\t: Risk[key] === Risk.MEDIUM\n\t\t\t\t? `var(--color-other-orange)`\n\t\t\t\t: Risk[key] === Risk.HIGH\n\t\t\t\t? `var(--color-other-red)`\n\t\t\t\t: null,\n\t};\n});\n\nexport const RiskSwitch: FC<RiskSwitchType> = ({\n\tupdate,\n\tvalue,\n\tcompactView,\n\tdisabled,\n}) => {\n\tconst handleChangeRisk = useCallback(\n\t\t(value: Risk) => {\n\t\t\tif (disabled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (isFunction(update)) {\n\t\t\t\treturn update(value);\n\t\t\t}\n\t\t},\n\t\t[update, disabled],\n\t);\n\n\tif (compactView) {\n\t\treturn (\n\t\t\t<RiskInputWrapperStyled>\n\t\t\t\t<InputLabelStyle>\n\t\t\t\t\t<Trans label={'risk'} />\n\t\t\t\t</InputLabelStyle>\n\t\t\t\t<RiskMobileStyled>\n\t\t\t\t\t{riskOptions.map((option) => {\n\t\t\t\t\t\tconst isActive = option.value === value;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\t\t\tkey={option.value}\n\t\t\t\t\t\t\t\tborderType={InputStyleType.SQUARE}\n\t\t\t\t\t\t\t\tlabel={trans({ label: option.value })}\n\t\t\t\t\t\t\t\tstyleType={\n\t\t\t\t\t\t\t\t\tisActive ? ButtonStyleType.SECONDARY : ButtonStyleType.CLEAR\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\tbackground: isActive ? option.color : undefined,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tonClick={() => handleChangeRisk(option.value)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</RiskMobileStyled>\n\t\t\t</RiskInputWrapperStyled>\n\t\t);\n\t}\n\n\treturn (\n\t\t<RiskSwitchStyled>\n\t\t\t<VerticalOptions\n\t\t\t\tdisabled={disabled}\n\t\t\t\tdefaultValue={value}\n\t\t\t\tid=\"risk\"\n\t\t\t\tonChange={handleChangeRisk}\n\t\t\t\ttitle={trans({ label: 'risk' })}\n\t\t\t\toptions={riskOptions}\n\t\t\t\tkey={value}\n\t\t\t/>\n\t\t</RiskSwitchStyled>\n\t);\n};\n\nexport const RiskMobileStyled = styled.div`\n\talign-items: center;\n\talign-self: stretch;\n\tbackground: var(--color-dark-500);\n\tborder-radius: 2px;\n\tdisplay: grid;\n\tgap: 4px;\n\tgrid-template-columns: repeat(3, 1fr);\n\tjustify-content: center;\n\tpadding: 3px 4px;\n\n\t.${CSSClassNameButton} {\n\t\tpadding-left: 8px;\n\t\t${inputHeightWithMove(-6)};\n\t\tpadding-right: 8px;\n\t\ttext-transform: capitalize;\n\n\t\tspan {\n\t\t\tdisplay: inline-block;\n\t\t\ttext-align: center;\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t&.${ButtonStyleType.CLEAR} {\n\t\t\tcolor: var(--color-white-white-50);\n\t\t}\n\t}\n`;\n\nexport const RiskOptionsStyled = styled.div`\n\talign-items: center;\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\tpadding-top: 4px;\n\n\tsvg {\n\t\theight: 12px;\n\t}\n`;\n\nexport const RiskInputWrapperStyled = styled(InputWrapperStyle)``;\n\nexport const RiskSwitchStyled = styled.div``;\n","import {\n\tAllHTMLAttributes,\n\tDetailedHTMLProps,\n\tFC,\n\tReactNode,\n\tuseCallback,\n\tuseState,\n} from 'react';\nimport { Button, CSSClassNameButton } from '@ui/button';\nimport styled, { css } from 'styled-components';\nimport classnames from 'classnames';\nimport { isFunction } from '@common/methods/isFunction';\nimport { useOnMount } from '@common/hooks/useOnMount';\nimport { ButtonStyleType } from '@uiTypes/ButtonStyleType';\n\ntype OptionValue = string | number;\n\nexport interface VerticalOptionsProps\n\textends Omit<\n\t\tDetailedHTMLProps<AllHTMLAttributes<HTMLDivElement>, HTMLDivElement>,\n\t\t'children' | 'onChange' | 'title'\n\t> {\n\toptions: Array<\n\t\t| OptionValue\n\t\t| {\n\t\t\t\tvalue: OptionValue;\n\t\t\t\tlabel: FC<{ active: boolean }>;\n\t\t\t\tcolor: string;\n\t\t  }\n\t>;\n\tdisabled?: boolean;\n\ttitle?: ReactNode | string;\n\tdefaultValue?: OptionValue;\n\tonChange?: (value: OptionValue) => void;\n}\n\nexport const VerticalOptions: FC<VerticalOptionsProps> = ({\n\toptions,\n\tdefaultValue,\n\tonChange,\n\ttitle,\n\tdisabled,\n\t...props\n}) => {\n\tconst [active, setActive] = useState<OptionValue>(defaultValue);\n\n\tconst onChange_ = useCallback(\n\t\t(value: OptionValue) => {\n\t\t\tif (disabled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (value === active) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (isFunction(onChange)) {\n\t\t\t\tonChange(value);\n\t\t\t}\n\t\t\tsetActive(value);\n\t\t},\n\t\t[active, disabled, onChange],\n\t);\n\n\tuseOnMount(() => {\n\t\tonChange_(defaultValue);\n\t});\n\n\treturn (\n\t\t// @ts-expect-error invalid type\n\t\t<VerticalOptionsStyled {...props} $disabled={disabled}>\n\t\t\t{title && <p className=\"text-style-label-cap\">{title}</p>}\n\t\t\t<div>\n\t\t\t\t{options.map((option) => {\n\t\t\t\t\tconst key = typeof option === 'object' ? option.value : option;\n\t\t\t\t\tconst isActive = key === active;\n\t\t\t\t\tconst label =\n\t\t\t\t\t\ttypeof option === 'object'\n\t\t\t\t\t\t\t? option.label({ active: isActive })\n\t\t\t\t\t\t\t: option;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName={classnames('text-style-caption-medium', {\n\t\t\t\t\t\t\t\t['active-option']: isActive,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\tisActive\n\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\tbackground:\n\t\t\t\t\t\t\t\t\t\t\t\ttypeof option === 'object' ? option.color : undefined,\n\t\t\t\t\t\t\t\t\t  }\n\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstyleType={\n\t\t\t\t\t\t\t\tisActive ? ButtonStyleType.PRIMARY : ButtonStyleType.SECONDARY\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonClick={() => onChange_(key)}\n\t\t\t\t\t\t\tkey={key}\n\t\t\t\t\t\t\tlabel={label}\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</div>\n\t\t</VerticalOptionsStyled>\n\t);\n};\n\nexport const VerticalOptionsStyled = styled.div<{\n\t$disabled?: boolean;\n}>`\n\talign-items: center;\n\tbackdrop-filter: blur(2px);\n\tbackground-color: var(--color-dark-500);\n\tborder: 1px solid var(--color-dark-400);\n\tborder-radius: 8px;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tjustify-content: center;\n\tpadding: 8px 6px;\n\twidth: 95px;\n\n\t${(props) =>\n\t\tprops.$disabled &&\n\t\tcss`\n\t\t\tcursor: not-allowed;\n\n\t\t\t* {\n\t\t\t\tcursor: not-allowed;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t`}\n\n\t> p {\n\t\ttext-align: center;\n\t\ttext-transform: uppercase;\n\t\tmargin: 0;\n\t\tline-height: 20px;\n\t}\n\n\t> div {\n\t\talign-items: center;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 4px;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\n\t\t.${CSSClassNameButton} {\n\t\t\talign-items: center;\n\t\t\tborder-radius: 6px;\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: center;\n\t\t\tpadding: 4px;\n\t\t\ttext-align: center;\n\t\t\ttext-transform: capitalize;\n\t\t\twidth: 100%;\n\n\t\t\t&.${ButtonStyleType.SECONDARY} {\n\t\t\t\tbackground-color: var(--color-dark-600);\n\t\t\t\tcolor: var(--color-dark-200);\n\t\t\t}\n\t\t}\n\t}\n`;\n"],"names":["EVENTS","GAME_LOADED","GAME_RESULT","game","GAME_BET_ERROR","PLINKO_PIN_COLLISION","GameType","KENO_INIT_SUMMARY","KENO_INIT_TILE_ANIMATION","tileNumber","KENO_SHOW_BET_RESULT","SubjectController","SubjectControllerClass","id","callback","this","subjects","Subject","subscribe","message","next","emitCustomEvent","eventName","details","emit","useCustomEventListener","handler","handlerRef","useRef","handler_","useCallback","useEffect","current","unsubscribe","FlameIcon","fill","height","width","content","d","viewBox","reducerInitialStateMethods","key","names","getInitialState","name","lsGet","generateInitialStateKey","setInitialState","data","indexOf","push","lsSet","clearState","forEach","lsClear","useOptionEnabled","optionLabel","useAppSelector","state","options","shallowEqual","NAME","capitalize","initialState","Risk","setAction","action","payload","riskSlice","createSlice","reducers","riskUpdate","useGameValidationFormError","gameValidation","formError","useGameValidationProfitError","profitError","plinkoActions","actions","linesSlice","usePlinkoLinesSelector","plinko","lines","plinkoInitialState","Number","linesUpdate","linesOptions","i","LinesSwitch","update","value","compactView","disabled","size","isMobile","useAppMobile","dispatch","useAppDispatch","mode","useGameAutoBetMode","setLines","risk","useGameRisk","setRisk","usePlinko","linesState","handleChangeLines","isFunction","openExtendedModal","openModal","MODAL_ID","array","onChange","disableInput","title","LineSwitchWrapperStyled","onClick","label","portalId","list","map","toString","styleType","ButtonStyleType","Size","className","buttonProps","activeContent","defaultActiveId","String","onSelect","maxHeight","LinesSwitchStyled","trans","defaultValue","styled","InputWrapperStyle","StyledDropdownButtonWrapper","CSSClassNameButton","inputHeight","flamesCount","riskOptions","Object","keys","active","RiskOptionsStyled","Array","from","_","color","RiskSwitch","handleChangeRisk","RiskInputWrapperStyled","RiskMobileStyled","option","isActive","borderType","InputStyleType","style","background","undefined","RiskSwitchStyled","inputHeightWithMove","VerticalOptions","props","useState","setActive","onChange_","useOnMount","VerticalOptionsStyled","$disabled","classnames","css"],"mappings":";;2IAEaA,EAAS,CACrBC,YAAa,oBACbC,YAAa,SAACC,GAAD,gBAAuBA,EAAvB,kBACbC,eAAgB,SAACD,GAAD,gBAAuBA,EAAvB,qBAChBE,qBAAsB,GAAF,OAAKC,EAAAA,EAAAA,OAAL,wBACpBC,kBAAmB,GAAF,OAAKD,EAAAA,EAAAA,KAAL,uBACjBE,yBAA0B,SAACC,GAAD,gBACtBH,EAAAA,EAAAA,KADsB,sCACqBG,IAC/CC,qBAAsB,GAAF,OAAKJ,EAAAA,EAAAA,KAAL,4B,wICYRK,EAAoB,IApB3BC,WAGL,cAAc,uCAFmC,I,wCAMjD,SAAiBC,EAAIC,GAKpB,OAJKC,KAAKC,SAASH,KAClBE,KAAKC,SAASH,GAAM,IAAII,EAAAA,IAGlBF,KAAKC,SAASH,GAAIK,UAAUJ,K,kBAGpC,SAAYD,EAAIM,GAAS,MACxB,UAAAJ,KAAKC,SAASH,UAAd,SAAmBO,KAAKD,O,EAhBpBP,ICEOS,EAAkB,SAAIC,EAAmBC,GAErDZ,EAAkBa,KAAKF,EAAWC,IAGtBE,EAAyB,SACrCH,EACAI,GAEA,IAAMC,GAAaC,EAAAA,EAAAA,QAAqB,MAElCC,GAAWC,EAAAA,EAAAA,cAChB,SAACP,GAEAG,EAAQH,KAET,CAACG,KAGFK,EAAAA,EAAAA,YAAU,WACT,GAAKT,EAKL,OAFAK,EAAWK,QAAUrB,EAAkBO,UAAUI,EAAWO,GAErD,WACNF,EAAWK,QAAQC,iBAElB,CAACX,EAAWO,M,+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