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AMzc,MAAb,CACF,IAAI2F,KAAKuB,OAAOuV,GAAQ,IAAxB,CAA8BC,EAA9B,GAKA,IAAI/W,KAAKuB,OAAOuV,GAAhB,CAAuBC,EAAvB,EACR,AAEJ","sources":["webpack://_N_E/./apis/bet-record/index.ts","webpack://_N_E/./components/biz/GameLink.tsx","webpack://_N_E/./components/biz/MoneyWithCurrencyIcon.tsx","webpack://_N_E/./components/features/casino/MyBetsTable.tsx","webpack://_N_E/./components/features/common/Bets/hooks/useBetColumns.tsx","webpack://_N_E/./components/features/common/Bets/hooks/useGeneralBetRecordData.ts","webpack://_N_E/./components/features/game/helper.ts","webpack://_N_E/./components/ui/CatchError/index.tsx","webpack://_N_E/./components/ui/LazyLoadedImage/index.tsx","webpack://_N_E/./components/ui/WrappedTable/helper.ts","webpack://_N_E/./components/ui/WrappedTable/index.tsx","webpack://_N_E/./components/ui/common/TokenIcon.tsx","webpack://_N_E/./constants/decimal.ts","webpack://_N_E/./hooks/requests/useAnchoredPaginationParams.ts","webpack://_N_E/./helper/getDeviceUid.ts","webpack://_N_E/./hooks/useGlobalWebsocket/index.tsx","webpack://_N_E/./hooks/usePageVisibility/index.ts","webpack://_N_E/./types/WS.ts","webpack://_N_E/./utils/number/addComma.ts","webpack://_N_E/./utils/index.ts","webpack://_N_E/./utils/time/formatTime.ts","webpack://_N_E/"],"sourcesContent":["import request from '@/apis';\nimport { TCurrencyInfo, TIAnchoredList } from '@/types/api';\nimport { WebSocketCommandsEnum } from '@/types/WS';\nimport { BET_RECORD_DEFAULT_PAGE_SIZE } from '@/constants/common';\nimport { TGameListItem } from '@/apis/hub88';\n\nexport interface IBetRecord {\n gameId: string;\n gameName: string;\n provider: TGameListItem['provider'];\n id: string;\n userId: string;\n userName: string;\n thumbUrl?: string;\n timestamp: string;\n multiplier: string;\n amount: string;\n payout: string;\n currency: string;\n currencyInfo: TCurrencyInfo;\n command: WebSocketCommandsEnum;\n}\n\n// export const getBetRecordAll = (limit = BET_RECORD_DEFAULT_PAGE_SIZE) => {\n// return request>({\n// method: 'post',\n// url: '/api/mc-api/game/bet-record/all',\n// data: {\n// limit,\n// },\n// });\n// };\n\nexport const getBetRecordHighRoller = (\n limit = BET_RECORD_DEFAULT_PAGE_SIZE,\n) => {\n return request>({\n method: 'post',\n url: '/api/mc-api/game/bet-record/high-roller',\n data: {\n limit,\n },\n });\n};\n\nexport const getUserBetRecord = (params: {\n currency?: string;\n pageSize: number;\n nextId?: string;\n prevId?: string;\n page: number;\n beginTime?: number;\n}) => {\n return request>({\n method: 'post',\n url: '/api/mc-api/game/bet-record/user',\n data: params,\n });\n};\n\nexport const getAllBets = (limit = BET_RECORD_DEFAULT_PAGE_SIZE) =>\n request>({\n method: 'post',\n url: '/api/mc-api/game/bet-record/all',\n data: {\n limit,\n },\n });\n\nexport const getLuckyBets = (limit = BET_RECORD_DEFAULT_PAGE_SIZE) =>\n request>({\n method: 'post',\n url: '/api/mc-api/game/bet-record/lucky-bet',\n data: {\n limit,\n },\n });\n\nexport const getMyBets = (limit = BET_RECORD_DEFAULT_PAGE_SIZE) =>\n request>({\n method: 'post',\n url: '/api/mc-api/game/bet-record/user',\n data: {\n limit,\n },\n });\n","import { TGameListItem } from '@/apis/hub88';\nimport Link from 'next/link';\nimport { styled } from '@mui/material/styles';\nimport ImgFallback from '@/components/ui/LazyLoadedImage';\nimport React from 'react';\nimport { getGameCoverPath } from '@/components/features/game/helper';\n\nconst Wrapper = styled(Link)(({ theme }) => ({\n display: 'flex',\n alignItems: 'center',\n // gap: theme.spacing(1),\n position: 'relative',\n whiteSpace: 'nowrap',\n}));\n\nconst GameLink = ({\n game,\n children,\n showThumb = false,\n sx = {},\n}: {\n game: TGameListItem;\n showThumb?: boolean;\n children: React.ReactNode;\n sx?: Record;\n}) => {\n const { gameId, provider, thumbUrl, gameSlug } = game;\n const coverImg = getGameCoverPath(game);\n return (\n \n {showThumb ? (\n \n ) : null}\n {children}\n \n );\n};\n\nexport default GameLink;\n","import { formatMoneyByCurrency } from '@/utils';\nimport { StyledTokenIcon } from '@/components/ui/common/TokenIcon';\nimport { Box } from '@mui/material';\nimport { isRelease } from '@/utils/checkRuntime';\nimport { styled } from '@mui/material/styles';\nimport { getDecimal } from '@/constants/decimal';\n\nconst Wrapper = styled(Box)`\n white-space: nowrap;\n font-size: inherit;\n font-weight: inherit;\n color: inherit;\n display: inline-flex;\n align-items: center;\n gap: 0.2em;\n`;\n\nconst MoneyWithCurrencyIcon = (\n props: Parameters[1] & {\n value: any;\n },\n) => {\n const { value, currency = 'USDT', ...rest } = props;\n return (\n \n {formatMoneyByCurrency(value, {\n currency,\n decimal: getDecimal(currency, value),\n ...rest,\n })}\n \n \n );\n};\n\nexport default MoneyWithCurrencyIcon;\n","import * as React from 'react';\nimport { useEffect } from 'react';\nimport useAnchoredPaginationParams from '@/hooks/requests/useAnchoredPaginationParams';\nimport useGeneralBetRecordData from '@/components/features/common/Bets/hooks/useGeneralBetRecordData';\nimport queryKeysFactory from '@/reactQueryKeys/keysFactory';\nimport { getUserBetRecord, IBetRecord } from '@/apis/bet-record';\nimport { WebSocketCommandsEnum } from '@/types/WS';\nimport { useBetColumns } from '@/components/features/common/Bets/hooks/useBetColumns';\nimport WrappedTable from '@/components/ui/WrappedTable';\nimport { PropsOf } from '@emotion/react';\n\nconst MyBetsTable: React.FC<\n {\n filters?: Record;\n } & Partial>\n> = (props) => {\n const { filters: extraFilters, ...rest } = props;\n const [usedData, setUsedData] = React.useState(undefined);\n\n const { params, onClickPrev, onClickNext } = useAnchoredPaginationParams(\n usedData,\n extraFilters,\n );\n\n const { data, isLoading } = useGeneralBetRecordData(\n queryKeysFactory.casino.queryMyBets(JSON.stringify(params)),\n () => getUserBetRecord(params),\n WebSocketCommandsEnum.USER_BET_HISTORY_COMMAND,\n );\n\n useEffect(() => {\n if (data) {\n setUsedData(data);\n }\n }, [data]);\n\n const columns = useBetColumns();\n\n return (\n \n columns={columns}\n data={data.list}\n loading={isLoading}\n anchoredButtonsConfig={{\n onClickPrev,\n onClickNext,\n }}\n {...rest}\n />\n );\n};\n\nexport default MyBetsTable;\n","import useTheme from '@/theme/useTheme';\nimport { Box, Tooltip, useMediaQuery } from '@mui/material';\nimport { useTranslation } from 'next-i18next';\nimport { IBetRecord } from '@/apis/bet-record';\nimport { timeAgo } from '@/utils/time';\nimport { ColumnProps } from '@/components/ui/WrappedTable';\nimport { useInterval } from 'ahooks';\nimport React, { useMemo, useState } from 'react';\nimport GameLink from '@/components/biz/GameLink';\nimport formatTime from '@/utils/time/formatTime';\nimport MoneyWithCurrencyIcon from '@/components/biz/MoneyWithCurrencyIcon';\n\nexport const TimeAgo: React.FC<{\n start: number;\n}> = ({ start }) => {\n const [time, setTime] = useState(new Date());\n useInterval(() => {\n setTime(new Date());\n }, 1000);\n return (\n \n \n {timeAgo(new Date(start))}\n \n \n );\n};\n\nexport const useBetColumns = () => {\n const { t } = useTranslation();\n const { theme } = useTheme();\n\n const pcColumns: ColumnProps[] = [\n {\n width: 160,\n title: t('Game'),\n dataKey: 'gameName',\n render: (index, value, row) => {\n return (\n \n {value}\n \n );\n },\n },\n {\n width: 160,\n align: 'center',\n title: t('Player'),\n dataKey: 'userName',\n numeric: true,\n },\n {\n width: 160,\n title: t('Time'),\n dataKey: 'timestamp',\n numeric: true,\n render: (_, value, row) => (\n \n ),\n },\n {\n width: 120,\n title: t('Wager'),\n dataKey: 'amount',\n numeric: true,\n render: (index, value, row) => {\n return (\n \n \n \n );\n },\n },\n {\n width: 120,\n title: t('Multiplier'),\n dataKey: 'multiplier',\n numeric: true,\n render: (index, value) => {\n return value ? Number(value).toFixed(2) + 'x' : '-';\n },\n },\n {\n width: 120,\n title: t('Payout'),\n dataKey: 'payout',\n numeric: true,\n render: (index, value, row) => {\n return (\n \n \n \n );\n },\n },\n ];\n const mobileColumn: ColumnProps[] = [\n pcColumns[0],\n pcColumns[2],\n pcColumns[pcColumns.length - 1],\n ];\n const isSmallScreen = useMediaQuery(theme.breakpoints.down('sm'));\n return useMemo(\n () => (isSmallScreen ? mobileColumn : pcColumns),\n [isSmallScreen],\n );\n};\n","import { QueryKey, useQuery } from '@tanstack/react-query';\nimport { WebSocketCategoryEnum, WebSocketCommandsEnum } from '@/types/WS';\nimport useGlobalWebsocket from '@/hooks/useGlobalWebsocket';\nimport queryClient from '@/reactQueryKeys/queryClient';\nimport { IBetRecord } from '@/apis/bet-record';\nimport { useMemo, useRef } from 'react';\nimport { BET_RECORD_DEFAULT_PAGE_SIZE } from '@/constants/common';\nimport { RECORD_UPDATE_DELAY_MS } from '@/constants/biz';\nimport { useAtomValue } from 'jotai';\nimport { userInfoState } from '@/state/userInfo';\n\nconst useGeneralBetRecordData = (\n queryKey: QueryKey,\n api: any,\n command: WebSocketCommandsEnum,\n) => {\n const { data: allData, isFetching } = useQuery({\n queryKey: queryKey,\n queryFn: async () => {\n const res = await api();\n if (res.status.code === '0') {\n return res.data;\n } else {\n return { list: [] };\n }\n },\n keepPreviousData: true,\n });\n\n const lastMessage = useRef(new Date().getTime());\n\n const { userMetaData } = useAtomValue(userInfoState);\n\n const userName = userMetaData?.name;\n\n useGlobalWebsocket({\n category: WebSocketCategoryEnum.RECORD,\n command: command,\n onMessage: (data) => {\n // console.log('%c~LOG~', 'color: yellow; font-size: 16px;', data);\n const betUserName = data.data.data.userName;\n const currentTime = new Date().getTime();\n if (\n currentTime - lastMessage.current < 1000 &&\n betUserName !== userName\n ) {\n return;\n }\n\n lastMessage.current = currentTime;\n setTimeout(() => {\n queryClient.setQueryData(\n queryKey,\n (oldData: { list: IBetRecord[] }) => {\n return {\n ...oldData,\n list: [\n { ...data.data.data, animateItem: true },\n ...(oldData?.list || []),\n ].slice(0, BET_RECORD_DEFAULT_PAGE_SIZE),\n };\n },\n );\n }, RECORD_UPDATE_DELAY_MS);\n },\n });\n\n const returned = useMemo(() => {\n return {\n data: allData ?? {\n list: [],\n },\n isLoading: isFetching,\n };\n }, [allData, isFetching]);\n\n return returned;\n};\n\nexport default useGeneralBetRecordData;\n","import { TGameListItem } from '@/apis/hub88';\nimport { GAME_PROVIDERS } from '@/constants/biz';\nimport { getStaticAsset } from '@/utils/staticAsset';\n\nconst getGameId = (game: TGameListItem) => {\n if (!game) {\n return '';\n }\n return game.gameId || game.gameSlug || game.gameName || '';\n};\n\nexport const getGameCoverPath = (game: TGameListItem) => {\n let res = '';\n if (!game?.provider) {\n return res;\n }\n if (game.provider === 'SELF') {\n res = getStaticAsset(\n `/assets/images/casino/game-covers/moon-club/${getGameId(game)}.png`,\n );\n } else if (GAME_PROVIDERS[game.provider.toUpperCase()]) {\n res = getStaticAsset(\n `/assets/images/casino/game-covers/${game.provider.toLowerCase()}/${getGameId(\n game,\n )}.png`,\n );\n }\n\n // if (game?.provider === GAME_PROVIDERS.HUB88) {\n // res = getStaticAsset(\n // `/assets/images/casino/game-covers/hub88/${getGameSlug(game)}.png`,\n // );\n // }\n\n // if (game?.provider === GAME_PROVIDERS.HACKSAW) {\n // res = getStaticAsset(\n // `/assets/images/casino/game-covers/hacksaw/${getGameSlug(game)}.png`,\n // );\n // }\n\n return res;\n};\n","import React, { ErrorInfo } from 'react';\n\nconst FallbackComp = () => {\n return
Oops, Something went wrong!
;\n};\n\nclass CatchErrorComp extends React.Component<{\n fallback?: React.ReactNode;\n component: React.ReactNode;\n}> {\n public state = {\n error: null,\n errorInfo: null,\n };\n\n public componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n console.log(error);\n this.setState({\n error,\n errorInfo,\n });\n }\n\n render() {\n return this.state.error\n ? this.props.fallback || \n : this.props.component;\n }\n}\n\nexport default CatchErrorComp;\n\nexport const CatchErrorHighOrder = (Component: React.ComponentType) => {\n return (props) => {\n return (\n }\n component={}\n >\n );\n };\n};\n","import { getStaticAsset } from '@/utils/staticAsset';\nimport { styled } from '@mui/system';\nimport React, { useState } from 'react';\nimport { PropsOf } from '@emotion/react';\nimport classNames from 'clsx';\n\nconst StyledImage = styled('img')<{\n loaded?: boolean;\n}>`\n opacity: 0;\n transition: opacity 0.3s ease-in-out;\n\n &.loaded {\n opacity: 1;\n }\n\n &.noTransition {\n transition: none;\n }\n`;\n\nconst successList = new Set();\nconst failureList = new Set();\n\nconst fallbackSrc = getStaticAsset('/assets/images/logo/m-logo.svg');\n\nconst ImgFallback = ({\n src,\n onLoad,\n onError,\n onErrored,\n className,\n ...props\n}: {\n src: string[] | string;\n onErrored?: (e: React.SyntheticEvent) => void;\n} & Omit, 'src'>) => {\n const [imgIndex, setImgIndex] = useState(0);\n\n const usedSrcs = (Array.isArray(src) ? src : [src]).filter(Boolean);\n\n const imgAlreadyLoaded = usedSrcs.find((src) => successList.has(src));\n\n return (\n {\n onLoad?.(e);\n try {\n if (new URL((e.target as any).src).pathname === fallbackSrc) {\n onErrored?.(e);\n }\n } catch (e) {}\n if (imgAlreadyLoaded) return;\n successList.add(usedSrcs[imgIndex]);\n (e.target as HTMLImageElement).classList.add('loaded');\n }}\n key={imgIndex}\n onError={(e) => {\n onError?.(e);\n if (imgIndex < usedSrcs.length - 1) {\n setImgIndex(imgIndex + 1);\n } else {\n if ((e.target as HTMLImageElement).classList.contains('errored')) {\n return;\n }\n (e.target as HTMLImageElement).src = fallbackSrc;\n (e.target as HTMLImageElement).classList.add('errored');\n (e.target as HTMLImageElement).onerror = null;\n failureList.add(usedSrcs.join(''));\n }\n }}\n {...props}\n />\n );\n};\n\nexport default ImgFallback;\n","import { sliderIn } from '@/components/features/casino/crash/GameBox/PreviourRoundResult/styles';\n\nexport const getTableRowProps = (item: any, loading?: boolean) => {\n return {\n sx: {\n animation: item.animateItem ? `${sliderIn} 0.3s ease-in-out` : undefined,\n opacity: loading ? 0.5 : undefined,\n pointerEvents: loading ? 'none' : undefined,\n },\n onAnimationStart: (e) => {\n if (e.animationName === sliderIn.name) {\n item.animateItem = false;\n }\n },\n };\n};\n","import Paper from '@mui/material/Paper';\nimport Table from '@mui/material/Table';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport TableCell from '@mui/material/TableCell';\nimport TableBody from '@mui/material/TableBody';\nimport TableContainer from '@mui/material/TableContainer';\nimport * as React from 'react';\nimport { Key, memo } from 'react';\nimport Skeleton from '@mui/material/Skeleton';\nimport {\n Box,\n Button,\n Pagination,\n PaginationProps,\n Stack,\n SxProps,\n} from '@mui/material';\nimport { useTranslation } from 'next-i18next';\nimport { Theme } from '@mui/system';\nimport { getTableRowProps } from '@/components/ui/WrappedTable/helper';\nimport CatchErrorComp from '@/components/ui/CatchError';\nimport useTheme from '@/theme/useTheme';\nimport { useIsomorphicLayoutEffect } from 'ahooks';\n\nexport type ColumnProps = {\n [K in keyof T]: InferredColumnProps;\n}[keyof T];\n\ninterface InferredColumnProps {\n dataKey?: K;\n title: React.ReactNode;\n width?: number | string;\n numeric?: boolean;\n\n align?: 'left' | 'right' | 'center';\n render?: (index: number, value: T[K], row: T) => React.ReactNode;\n hidden?: boolean;\n}\n\ninterface WrappedTableProps {\n columns: ColumnProps[];\n data: (T & {\n animateItem?: boolean;\n })[];\n getRowKey?: (row: T) => Key;\n loading?: boolean;\n loadingRows?: number;\n sxs?: {\n tableContainerSX?: SxProps;\n containerSX?: SxProps;\n };\n paginationConfig?: PaginationProps;\n anchoredButtonsConfig?: {\n onClickPrev?: () => void;\n onClickNext?: () => void;\n };\n}\n\nconst WrappedTableCell = (props: {\n column: ColumnProps;\n index: number;\n cellProps?: any;\n d: any;\n}) => {\n const { column, index, d, cellProps = {} } = props;\n return (\n \n {column.render\n ? column.render(index, d[column?.dataKey as unknown as string], d)\n : (d[column?.dataKey as unknown as string] as React.ReactNode)}\n \n );\n};\n\nconst WrappedTable = ({\n data = [],\n columns = [],\n getRowKey,\n loading,\n loadingRows = 10,\n sxs = {},\n paginationConfig,\n anchoredButtonsConfig,\n}: WrappedTableProps) => {\n const [t] = useTranslation();\n const { theme } = useTheme();\n\n const getCommonCellProps = (column: ColumnProps) => {\n return {\n align: column.align\n ? column.align\n : column.numeric || false\n ? 'right'\n : 'left',\n sx: {\n width: column.width,\n },\n };\n };\n\n const hasData = !!data.length;\n\n const showPagination = paginationConfig && hasData;\n\n const showPrevAndNext =\n anchoredButtonsConfig &&\n hasData &&\n (anchoredButtonsConfig.onClickNext || anchoredButtonsConfig.onClickPrev);\n\n const containerRef = React.useRef(null);\n\n // const [scrollState, setScrollState] = React.useState<\n // undefined | 'middle' | 'head' | 'rear'\n // >();\n\n useIsomorphicLayoutEffect(() => {\n if (!containerRef.current) return;\n const container = containerRef.current;\n const isScrollable = container?.scrollWidth > container?.clientWidth;\n // @ts-ignore\n let listener;\n const shadeLeft = container.querySelector('.shade-left') as HTMLDivElement;\n const shadeRight = container.querySelector(\n '.shade-right',\n ) as HTMLDivElement;\n if (isScrollable) {\n shadeLeft.style.display = 'block';\n shadeRight.style.display = 'block';\n listener = (e: MouseEvent) => {\n const target = e.target as HTMLDivElement;\n const { scrollLeft, scrollWidth, clientWidth } = target;\n /**\n * head\n */\n if (scrollLeft === 0) {\n shadeLeft.style.backgroundPositionX = '100%';\n shadeRight.style.backgroundPositionX = '100%';\n /**\n * rear\n */\n } else if (Math.abs(scrollLeft + clientWidth - scrollWidth) <= 1) {\n shadeLeft.style.backgroundPositionX = '0%';\n shadeRight.style.backgroundPositionX = '0%';\n /**\n * middle\n */\n } else {\n shadeLeft.style.backgroundPositionX = '0%';\n shadeRight.style.backgroundPositionX = '100%';\n }\n };\n // @ts-ignore\n container.addEventListener('scroll', listener);\n shadeRight.style.backgroundPositionX = '100%';\n shadeLeft.style.backgroundPositionX = '100%';\n }\n return () => {\n // @ts-ignore\n if (listener && container) {\n container.removeEventListener('scroll', listener);\n }\n };\n }, [data]);\n\n // console.log(scrollState);\n\n return (\n \n (\n \n )}\n >\n \n \n \n \n {columns.map((column, index) => {\n return (\n \n {column.title}\n \n );\n })}\n \n \n \n {loading && !hasData ? (\n Array.from(Array(loadingRows).keys()).map((index) => (\n \n {columns.map((column, index) => {\n return (\n \n \n \n );\n })}\n \n ))\n ) : hasData ? (\n data.map((d) => {\n return (\n \n {columns.map((column, index) => {\n const cellProps = {\n scope: 'row',\n key: index,\n ...getCommonCellProps(column),\n };\n return (\n --}\n component={\n \n }\n >\n );\n })}\n \n );\n })\n ) : (\n \n \n {t('No Record')}\n \n \n )}\n \n
\n \n \n {showPagination && }\n {showPrevAndNext && (\n \n \n {t('Prev')}\n \n \n {t('Next')}\n \n \n )}\n \n );\n};\n\nexport default memo(WrappedTable) as typeof WrappedTable;\n","import { walletInfoCurrentSelectedWallet } from '@/state/userInfo';\nimport {\n MoonCryptoTokenEth2,\n MoonCryptoTokenUsdc,\n MoonCryptoTokenUsdt,\n MoonCryptoTokenDoge,\n MoonCryptoTokenBtc,\n MoonCryptoTokenBnb,\n MoonCryptoTokenTrx,\n MoonCryptoTokenAvax,\n MoonCryptoTokenBch,\n MoonCryptoTokenChz,\n MoonCryptoTokenDaii,\n MoonCryptoTokenMatic,\n} from '@crownbit/icons';\nimport { useAtom, useAtomValue } from 'jotai';\n\ninterface TokenIconProps {\n style?: Record;\n fontSize?: 'inherit' | 'small' | 'medium' | 'large';\n currency?: string;\n}\n\nexport function TokenIcon({\n style = {},\n fontSize = 'small',\n currency,\n}: TokenIconProps = {}) {\n const currentSelectedWallet = useAtomValue(walletInfoCurrentSelectedWallet);\n if (!currency) {\n currency = currentSelectedWallet?.coin || 'usdt';\n }\n switch (currency.toLowerCase()) {\n case 'usdt':\n return ;\n case 'usdc':\n return ;\n case 'eth':\n return ;\n case 'doge':\n return ;\n case 'btc':\n return ;\n case 'bnb':\n return ;\n case 'trx':\n return ;\n case 'avax':\n return ;\n case 'bch':\n return ;\n case 'chz':\n return ;\n case 'daii':\n return ;\n case 'matic':\n return ;\n default:\n return ;\n }\n}\n\nexport function StyledTokenIcon({\n fontSize = 'small',\n currency,\n}: TokenIconProps = {}) {\n return ;\n}\n","import { CURRENCY_NAME, IsStableCoin } from '@/constants/currency';\nimport { isNumber } from 'lodash-es';\n\nexport const USDT_DECIMAL = 2;\nexport const OTHER_DECIMAL = 8;\nexport const getDecimal = (currency = CURRENCY_NAME.USDT, value?: number) => {\n if (IsStableCoin(currency)) {\n if (isNumber(value) && value < 1) {\n const match = String(value).match(/\\.0+/);\n const zersCount = !match ? 0 : match[0].length - 1;\n return zersCount + 2;\n }\n return USDT_DECIMAL;\n } else {\n return OTHER_DECIMAL;\n }\n};\n\nexport const getCrashDecimal = (currency = CURRENCY_NAME.USDT) => {\n if (IsStableCoin(currency)) {\n return 4;\n } else {\n return 8;\n }\n};\nexport const getMinAmount = (currency) => {\n const zero = '0';\n const decimal = getCrashDecimal(currency);\n return Number('0.' + zero.repeat(decimal - 1) + '1');\n};\n","import * as React from 'react';\nimport { SAnchoredData, TInferSchemaType } from '@/constants/schemas';\nimport { DEFAULT_PAGE_SIZE } from '@/constants/config';\n\nconst paramsInitialState = {\n page: 1,\n nextId: undefined,\n prevId: undefined,\n pageSize: DEFAULT_PAGE_SIZE,\n};\n\nconst useAnchoredPaginationParams = >(\n data: TInferSchemaType>,\n extraFilters: T = {} as T,\n): {\n params: {\n page: number;\n nextId?: string;\n prevId?: string;\n pageSize: number;\n } & T;\n onClickPrev: () => void;\n onClickNext: () => void;\n setParams: React.Dispatch<\n React.SetStateAction<{\n page: number;\n nextId?: string;\n prevId?: string;\n pageSize?: number;\n } & T>\n >;\n} => {\n const [params, setParams] = React.useState(paramsInitialState);\n const { prevId, nextId, hasNext } = data || {};\n\n // console.log('%c~LOG~', 'color: yellow; font-size: 16px;', data);\n\n const onClickNext = nextId\n ? () => {\n setParams((prev) => ({\n ...prev,\n page: prev.page + 1,\n nextId,\n prevId: undefined,\n }));\n }\n : undefined;\n\n const onClickPrev = prevId\n ? () => {\n setParams((prev) => ({\n ...prev,\n page: prev.page - 1,\n prevId,\n nextId: undefined,\n }));\n }\n : undefined;\n \n return {\n params: {\n ...params,\n ...extraFilters,\n },\n onClickPrev,\n onClickNext,\n setParams: setParams as any,\n };\n};\n\nexport default useAnchoredPaginationParams;\n","import { getLocalStorage, setLocalStorage } from '@/utils/localStoreHelper';\nimport { LOCAL_KEY_USER_UUID } from '@/constants/localStorageKeys';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport const getDeviceUid = () => {\n let deviceUid = getLocalStorage(LOCAL_KEY_USER_UUID);\n\n if (!deviceUid) {\n deviceUid = uuidv4();\n setLocalStorage(LOCAL_KEY_USER_UUID, deviceUid);\n }\n\n return deviceUid;\n};\n\nexport default getDeviceUid;\n","import useWebSocket, { ReadyState } from 'react-use-websocket';\nimport * as configs from '@/configs';\nimport { useCallback, useEffect, useRef, useState } from 'react';\n\nimport { useAtomValue } from 'jotai';\nimport { isLoggedIn } from '@/state/userInfo';\nimport { COOKIE_KEY_USER_TOKEN } from '@/constants/cookieStorageKeys';\nimport Cookie from '@/utils/cookies';\n\nimport getDeviceUid from '@/helper/getDeviceUid';\nimport {\n IWebSocketData,\n WebSocketCategoryEnum,\n WebSocketCommandsEnum,\n} from '@/types/WS';\nimport { getLocalStorage } from '@/utils/localStoreHelper';\nimport { LOCAL_KEY_USER_TOKEN } from '@/constants/localStorageKeys';\nimport { usePageVisibility } from '@/hooks/usePageVisibility';\n\nconst deviceUid = getDeviceUid();\nconst socketUrl = configs.env.endpoints.websocket;\n\nexport const useGlobalWebsocket = ({\n onMessage,\n category,\n command,\n shouldConnect: shouldReconnectProp,\n}: {\n onMessage?: (data: { data: IWebSocketData[T] }) => void;\n category: T;\n command?: WebSocketCommandsEnum;\n shouldConnect?: boolean;\n}) => {\n const isPageActive = usePageVisibility();\n const [deviceOrUserInfoRegistered, setDeviceOrUserInfoRegistered] =\n useState(false);\n const wsConnectedPromiseRef = useRef>();\n const wsConnectedResolveRef =\n useRef<(ins: WebSocketEventMap['open']) => void>();\n const isLogin = useAtomValue(isLoggedIn);\n const shouldConnect = true;\n\n const {\n sendMessage,\n sendJsonMessage,\n readyState,\n lastJsonMessage,\n getWebSocket,\n lastMessage,\n } = useWebSocket(\n socketUrl,\n {\n share: true,\n //Will attempt to reconnect on all close events, such as server shutting down\n shouldReconnect: (closeEvent) => isPageActive,\n heartbeat: {\n message: 'ping',\n returnMessage: 'pong',\n timeout: 60000, // 1 minute, if no response is received, the connection will be closed\n interval: 25000, // every 25 seconds, a ping message will be sent\n },\n filter: (message) => {\n if (message.data === 'pong') {\n return true;\n }\n const inComingMessage = JSON.parse(message.data);\n if (command === undefined && category === undefined) return true;\n return command === undefined\n ? inComingMessage.data?.category === category\n : inComingMessage.data?.category === category &&\n inComingMessage.data?.command === command;\n },\n onOpen: (ins) => {\n if (wsConnectedResolveRef.current) {\n wsConnectedResolveRef.current(ins);\n }\n },\n onClose: () => {\n console.log('WebSocket close');\n },\n onError: (e) => {\n console.error('WebSocket error', e);\n },\n onMessage: ({ data }) => {\n try {\n if (data === 'pong' || !data) return;\n const metaData = JSON.parse(data);\n // reconnect\n if (metaData?.command === WebSocketCommandsEnum.RECONNECT) {\n if (!isLogin) {\n registerDeviceInfo();\n return;\n }\n\n if (isLogin) {\n registerUserInfo();\n }\n }\n\n if (category === undefined && command === undefined) {\n return onMessage?.({ data: metaData });\n }\n if (category !== undefined && command !== undefined) {\n return (\n metaData?.data?.category === category &&\n metaData?.data?.command === command &&\n onMessage?.({ data: metaData })\n );\n }\n if (\n metaData?.data?.category === category ||\n metaData?.data?.command === command\n ) {\n return onMessage?.({ data: metaData });\n }\n } catch (e) {\n console.error(\n `useGlobalWebsocket onMessage error, category ${category}`,\n e,\n );\n }\n },\n },\n // shouldReconnect: true,\n shouldConnect,\n );\n\n const advancedSendJsonMessage = (message?: any) => {\n if (readyState === ReadyState.OPEN) {\n sendJsonMessage({\n ...message,\n });\n }\n };\n\n const registerDeviceInfo = useCallback(() => {\n if (readyState !== ReadyState.OPEN) return;\n sendJsonMessage({\n deviceUid,\n command: WebSocketCommandsEnum.LOGIN_REQUEST,\n });\n }, [readyState, sendJsonMessage]);\n\n const registerUserInfo = useCallback(() => {\n if (readyState !== ReadyState.OPEN) return;\n const { cookie } = new Cookie();\n const token =\n cookie.get(COOKIE_KEY_USER_TOKEN) ||\n getLocalStorage(LOCAL_KEY_USER_TOKEN);\n sendJsonMessage({\n deviceUid,\n token: token,\n command: WebSocketCommandsEnum.LOGIN_REQUEST,\n });\n }, [readyState, sendJsonMessage]);\n\n const clearUserInfo = () => {\n if (readyState !== ReadyState.OPEN) return;\n sendJsonMessage({\n deviceUid,\n command: 1,\n });\n setDeviceOrUserInfoRegistered(false);\n };\n\n useEffect(() => {\n wsConnectedPromiseRef.current = new Promise(\n (resolve) => {\n wsConnectedResolveRef.current = resolve;\n },\n );\n }, []);\n\n useEffect(() => {\n if (readyState === ReadyState.CONNECTING) return;\n\n if (!isLogin) {\n registerDeviceInfo();\n return;\n }\n\n if (isLogin) {\n registerUserInfo();\n }\n }, [readyState, isLogin, registerDeviceInfo, registerUserInfo]);\n\n return {\n readyState,\n sendMessage,\n sendJsonMessage: advancedSendJsonMessage,\n lastMessage,\n lastJsonMessage,\n registerDeviceInfo,\n registerUserInfo,\n };\n};\n\nexport default useGlobalWebsocket;\n","import { useEffect, useState } from 'react';\n\nexport const usePageVisibility = () => {\n const [isPageActive, setIsPageActive] = useState(true);\n\n useEffect(() => {\n const handleVisibilityChange = () => {\n setIsPageActive(!document.hidden);\n };\n\n document.addEventListener('visibilitychange', handleVisibilityChange);\n\n return () => {\n document.removeEventListener('visibilitychange', handleVisibilityChange);\n };\n }, []);\n\n return isPageActive;\n};\n","import { IBetRecord } from '@/apis/bet-record';\nimport { TInferSchemaType, wsBalanceChangeSchema } from '@/constants/schemas';\n\nexport enum WebSocketCategoryEnum {\n /**\n * placeholder\n */\n UNKNOWN = 0,\n /**\n * message from websocket system\n */\n WEBSOCKET = 1,\n /**\n * message from Crash game\n */\n CRASH_GAME = 2,\n /**\n * message from Rush game\n */\n RUSH_GAME = 3,\n /**\n * message from payment system\n */\n PAYMENT = 4,\n /**\n * currently for betting record\n */\n RECORD = 5,\n}\n\nexport enum WebSocketCommandsEnum {\n UNKNOWN_COMMAND = 0,\n\n LOGIN_REQUEST = 1,\n\n LOGIN_RESPONSE = 2,\n\n GAME_ENTER_REQUEST = 3,\n\n GAME_ENTER_RESPONSE = 4,\n\n GAME_QUIT_REQUEST = 5,\n\n GAME_QUIT_RESPONSE = 6,\n\n MOON_CRASH_STATUS_NOTIFY_COMMAND = 7,\n\n MOON_CRASH_CASH_OUT_EVENT_NOTIFY_COMMAND = 8,\n\n MOON_CRASH_BET_EVENT_NOTIFY_COMMAND = 9,\n\n USER_ACCOUNT_CHANGE_COMMAND = 10,\n\n RECONNECT = 11,\n\n CRASH_ONLINE_USER_COMMAND = 12,\n\n GLOBAL_BET_HISTORY_COMMAND = 13,\n\n USER_BET_HISTORY_COMMAND = 14,\n\n HIGH_ROLLER_HISTORY_COMMAND = 15,\n\n /**\n * 推送rush最新的游戏状态\n */\n RUSH_STATUS_NOTIFY_COMMAND = 16,\n\n LIVE_WINS_LATEST_COMMAND = 21,\n LUCKY_BET_HISTORY_COMMAND = 20,\n\n RUSH_BET_EVENT = 22,\n\n // command logout\n}\n\nexport interface IWebSocketData {\n [WebSocketCategoryEnum.UNKNOWN]: any;\n [WebSocketCategoryEnum.WEBSOCKET]: any;\n [WebSocketCategoryEnum.CRASH_GAME]: any;\n [WebSocketCategoryEnum.RUSH_GAME]: any;\n [WebSocketCategoryEnum.PAYMENT]: {\n data: TInferSchemaType;\n };\n [WebSocketCategoryEnum.RECORD]: {\n data: IBetRecord;\n };\n}\n\nexport enum WsEvent {\n Subscribe = 'subscribe',\n Complete = 'complete',\n Unsubscribe = 'complete',\n}\n\nexport enum WsQuery {\n AllHouseBetsSubscription = 'AllHouseBetsSubscription',\n Crash = 'Crash',\n LuckyPot = 'LuckyPot',\n}\n\nexport interface WsRequest {\n id: string;\n type: WsEvent;\n payload: {\n query: WsQuery;\n };\n}\n","const addCommaToDecimal = (x: string) => {\n const parts = x.toString().split('.');\n parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n return parts.join('.');\n};\n\nexport default addCommaToDecimal;\n","import { formatCurrency } from '@coingecko/cryptoformat';\n\n/* ====================== *\n * get random id *\n * https://stackoverflow.com/questions/1349404/generate-random-string-characters-in-javascript\n * * ====================== */\nimport { getDecimal, USDT_DECIMAL } from '@/constants/decimal';\nimport { CURRENCY_NAME, CURRENCY_SYMBOLS } from '@/constants/currency';\nimport addCommatoNumber from './number/addComma';\n\nexport function getRandomId(\n length = 8,\n chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',\n) {\n let result = '';\n for (let i = length; i > 0; --i)\n result += chars[Math.floor(Math.random() * chars.length)];\n return result;\n}\n\nexport function getUUid() {\n return `${getRandomId(8)}-${getRandomId(4)}-${getRandomId(4)}-${getRandomId(\n 4,\n )}-${getRandomId(12)}`;\n}\n\n/* ====================== *\n * copy to clipboard *\n * ====================== */\nexport const copyToClipboard = (text: string): Promise => {\n return new Promise((resolve, reject) => {\n if (navigator.clipboard && navigator.clipboard.writeText) {\n // 使用 Clipboard API\n navigator.clipboard\n .writeText(text)\n .then(() => {\n resolve(true); // 成功时返回 true\n })\n .catch((error) => {\n reject(false); // 失败时返回 false\n });\n } else if (\n document.queryCommandSupported &&\n document.queryCommandSupported('copy')\n ) {\n // 使用 execCommand\n const textarea = document.createElement('textarea');\n textarea.value = text;\n document.body.appendChild(textarea);\n textarea.select();\n try {\n document.execCommand('copy');\n resolve(true); // 成功时返回 true\n } catch (error) {\n reject(false); // 失败时返回 false\n }\n document.body.removeChild(textarea);\n } else {\n reject(false); // 不支持复制到剪贴板时返回 false\n }\n });\n};\n\nexport function sleep(ms) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\nexport function formatMoney(value: any, decimal = USDT_DECIMAL) {\n try {\n if (value === undefined || value === null) return '-';\n if (isNaN(value)) return '-';\n return formatCurrency(Number(value), 'usd', 'en', true, {\n decimalPlaces: decimal,\n });\n } catch (e) {\n console.log('🍎🍎🍎formatMoney error value:', value);\n throw new Error(e);\n }\n}\n\nexport function formatMoneyByCurrency(\n value,\n {\n commas = true,\n decimal = undefined,\n withCurrencySymbol = false,\n currency = CURRENCY_NAME.USDT,\n } = {},\n) {\n const usedDecimal = decimal ?? getDecimal(currency);\n const shouldAddCommas = commas && Number(value) >= 1000;\n const formattedValue = shouldAddCommas\n ? addCommatoNumber(formatMoney(value, usedDecimal))\n : formatMoney(value, usedDecimal);\n return withCurrencySymbol\n ? CURRENCY_SYMBOLS[currency] + formattedValue\n : formattedValue;\n}\n","import { UTCStringTemplate } from '@/types/common';\n\nconst formatTime = (\n time?: UTCStringTemplate | string | Date | number,\n method:\n | 'toLocaleString'\n | 'toLocaleTimeString'\n | 'toLocaleDateString'\n | 'toUTCString' = 'toLocaleString',\n) => {\n if (!time) return '';\n /**\n * 1699182730\n */\n const usedMethod = method || 'toLocaleString';\n if (Number(time) === time) {\n if (time < 10e9) {\n return new Date(time * 1000)[usedMethod]();\n /**\n * 1699182730292\n */\n } else if (time > 10e14) {\n return new Date(time / 1000)[usedMethod]();\n } else {\n return new Date(time)[usedMethod]();\n }\n }\n if (time instanceof Date) {\n return time[usedMethod]();\n }\n /**\n * '2023-11-05T11:11:10.208Z'\n */\n if (String(time).includes('Z')) {\n return new Date(time)[usedMethod]();\n } else {\n /**\n * '1699182686'\n */\n if (String(time).length === 10) {\n return new Date(Number(time) * 1000)[usedMethod]();\n /**\n * '1699866199831000'\n */\n } else if (String(time).length === 16) {\n return new Date(Number(time) / 1000)[usedMethod]();\n /**\n * '1699182686848'\n */\n } else {\n return new Date(Number(time))[usedMethod]();\n }\n }\n};\n\nexport default formatTime;\n"],"names":["getUserBetRecord","params","request","method","url","data","getAllBets","limit","arguments","length","undefined","BET_RECORD_DEFAULT_PAGE_SIZE","getLuckyBets","Wrapper","styled","Link","_ref","theme","display","alignItems","position","whiteSpace","__webpack_exports__","_ref2","game","children","_ref2$showThumb","showThumb","_ref2$sx","sx","gameId","provider","thumbUrl","gameSlug","coverImg","getGameCoverPath","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__","jsxs","href","concat","jsx","_components_ui_LazyLoadedImage__WEBPACK_IMPORTED_MODULE_1__","Z","src","alt","style","width","height","borderRadius","objectFit","marginRight","_mui_material_Box__WEBPACK_IMPORTED_MODULE_6__","_templateObject","_codebuild_output_src2472147443_src_crownbit_frontend_node_modules_next_dist_compiled_babel_runtime_helpers_esm_taggedTemplateLiteral_js__WEBPACK_IMPORTED_MODULE_7__","props","value","_props$currency","currency","rest","_codebuild_output_src2472147443_src_crownbit_frontend_node_modules_next_dist_compiled_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_8__","_excluded","component","formatMoneyByCurrency","_objectSpread","decimal","getDecimal","_components_ui_common_TokenIcon__WEBPACK_IMPORTED_MODULE_2__","j","extraFilters","filters","_codebuild_output_src2472147443_src_crownbit_frontend_node_modules_next_dist_compiled_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_10__","_React$useState","React","_React$useState2","_codebuild_output_src2472147443_src_crownbit_frontend_node_modules_next_dist_compiled_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_11__","usedData","setUsedData","_useAnchoredPaginatio","useAnchoredPaginationParams","onClickPrev","onClickNext","_useGeneralBetRecordD","useGeneralBetRecordData","queryKeysFactory","JSON","stringify","WebSocketCommandsEnum","isLoading","useEffect","columns","useBetColumns","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__","_components_ui_WrappedTable__WEBPACK_IMPORTED_MODULE_8__","list","loading","anchoredButtonsConfig","TimeAgo","start","_useState","useState","Date","setTime","useInterval","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__","_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_8__","title","formatTime","_mui_material_Box__WEBPACK_IMPORTED_MODULE_10__","timeAgo","t","_useTranslation","useTranslation","_useTheme","useTheme","pcColumns","dataKey","render","index","row","_components_biz_GameLink__WEBPACK_IMPORTED_MODULE_4__","align","numeric","_","Number","timestamp","_components_biz_MoneyWithCurrencyIcon__WEBPACK_IMPORTED_MODULE_5__","toFixed","mobileColumn","isSmallScreen","_mui_material_useMediaQuery__WEBPACK_IMPORTED_MODULE_11__","breakpoints","down","useMemo","queryKey","api","command","_queryFn","_useQuery","useQuery","queryFn","_codebuild_output_src2472147443_src_crownbit_frontend_node_modules_next_dist_compiled_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_10__","_codebuild_output_src2472147443_src_crownbit_frontend_node_modules_next_dist_compiled_babel_runtime_regenerator_index_js__WEBPACK_IMPORTED_MODULE_1___default","mark","_callee","res","wrap","_context","prev","next","sent","status","code","abrupt","stop","apply","keepPreviousData","allData","isFetching","lastMessage","useRef","getTime","userMetaData","_useAtomValue","useAtomValue","userInfoState","userName","name","useGlobalWebsocket","category","WebSocketCategoryEnum","onMessage","betUserName","currentTime","current","setTimeout","queryClient","oldData","animateItem","_codebuild_output_src2472147443_src_crownbit_frontend_node_modules_next_dist_compiled_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_12__","slice","RECORD_UPDATE_DELAY_MS","getGameId","gameName","getStaticAsset","GAME_PROVIDERS","toUpperCase","toLowerCase","FallbackComp","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__","CatchErrorComp","error","errorInfo","console","log","setState","state","fallback","StyledImage","_codebuild_output_src2472147443_src_crownbit_frontend_node_modules_next_dist_compiled_babel_runtime_helpers_esm_taggedTemplateLiteral_js__WEBPACK_IMPORTED_MODULE_5__","successList","Set","failureList","fallbackSrc","onLoad","onError","onErrored","className","_codebuild_output_src2472147443_src_crownbit_frontend_node_modules_next_dist_compiled_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_6__","imgIndex","setImgIndex","usedSrcs","Array","isArray","filter","Boolean","imgAlreadyLoaded","find","has","join","classNames","noTransition","loaded","e","URL","target","pathname","add","classList","contains","onerror","getTableRowProps","item","animation","sliderIn","opacity","pointerEvents","onAnimationStart","animationName","WrappedTableCell","column","d","_props$cellProps","cellProps","_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_7__","memo","_objectSpread2","_ref$data","_ref$columns","getRowKey","_ref$loadingRows","loadingRows","_ref$sxs","sxs","paginationConfig","_useTranslation2","_codebuild_output_src2472147443_src_crownbit_frontend_node_modules_next_dist_compiled_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_8__","getCommonCellProps","hasData","showPagination","showPrevAndNext","containerRef","useIsomorphicLayoutEffect","listener","container","isScrollable","scrollWidth","clientWidth","shadeLeft","querySelector","shadeRight","scrollLeft","backgroundPositionX","Math","abs","addEventListener","removeEventListener","_mui_material_Stack__WEBPACK_IMPORTED_MODULE_10__","gap","containerSX","_codebuild_output_src2472147443_src_crownbit_frontend_node_modules_next_dist_compiled_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__","top","bottom","zIndex","transition","backgroundSize","right","left","backgroundImage","borderTopRightRadius","borderBottomRightRadius","borderTopLeftRadius","borderBottomLeftRadius","paddingBottom","_mui_material_TableContainer__WEBPACK_IMPORTED_MODULE_11__","_mui_material_Paper__WEBPACK_IMPORTED_MODULE_12__","ref","boxShadow","border","palette","normal","tableContainerSX","_mui_material_Box__WEBPACK_IMPORTED_MODULE_13__","_mui_material_Table__WEBPACK_IMPORTED_MODULE_14__","stickyHeader","_mui_material_TableHead__WEBPACK_IMPORTED_MODULE_15__","_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_16__","map","textTransform","_mui_material_TableBody__WEBPACK_IMPORTED_MODULE_17__","from","keys","scope","_mui_material_Skeleton__WEBPACK_IMPORTED_MODULE_18__","variant","key","_components_ui_CatchError__WEBPACK_IMPORTED_MODULE_4__","colSpan","_mui_material_Pagination__WEBPACK_IMPORTED_MODULE_19__","justifyContent","direction","_mui_material_Button__WEBPACK_IMPORTED_MODULE_20__","disabled","onClick","TokenIcon","_ref$style","_ref$fontSize","fontSize","currentSelectedWallet","walletInfoCurrentSelectedWallet","coin","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__","_crownbit_icons__WEBPACK_IMPORTED_MODULE_1__","Pqz","lSB","i33","kVA","b4z","cJi","u0x","O8H","edh","znK","BeF","k3B","StyledTokenIcon","_ref2$fontSize","USDT_DECIMAL","CURRENCY_NAME","IsStableCoin","isNumber","match","String","zersCount","getCrashDecimal","getMinAmount","zero","repeat","paramsInitialState","page","nextId","prevId","pageSize","DEFAULT_PAGE_SIZE","_codebuild_output_src2472147443_src_crownbit_frontend_node_modules_next_dist_compiled_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__","setParams","hasNext","deviceUid","getLocalStorage","LOCAL_KEY_USER_UUID","uuidv4","setLocalStorage","socketUrl","configs","hooks_useGlobalWebsocket","shouldConnect","isPageActive","usePageVisibility","wsConnectedPromiseRef","wsConnectedResolveRef","isLogin","isLoggedIn","_useWebSocket","useWebSocket","share","shouldReconnect","closeEvent","heartbeat","message","returnMessage","timeout","interval","_inComingMessage$data","_inComingMessage$data2","_inComingMessage$data3","inComingMessage","parse","onOpen","ins","onClose","_metaData$data3","_metaData$data4","_metaData$data","_metaData$data2","metaData","registerDeviceInfo","registerUserInfo","sendMessage","sendJsonMessage","readyState","lastJsonMessage","getWebSocket","useCallback","ReadyState","LOGIN_REQUEST","token","cookie","Cookie","get","COOKIE_KEY_USER_TOKEN","LOCAL_KEY_USER_TOKEN","Promise","resolve","setIsPageActive","handleVisibilityChange","document","hidden","WsEvent","WsQuery","addComma","x","parts","toString","split","replace","copyToClipboard","text","reject","navigator","clipboard","writeText","then","queryCommandSupported","textarea","createElement","body","appendChild","select","execCommand","removeChild","sleep","ms","formatMoney","isNaN","formatCurrency","decimalPlaces","_ref$commas","commas","_ref$decimal","_ref$withCurrencySymb","withCurrencySymbol","_ref$currency","usedDecimal","formattedValue","shouldAddCommas","addCommatoNumber","CURRENCY_SYMBOLS","time","usedMethod","includes"],"sourceRoot":""}