@opexa/portal-components 0.0.35 → 0.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/dist/client/hooks/useAccountQuery.d.ts +1 -1
  2. package/dist/client/hooks/useAuthenticateMutation.d.ts +1 -1
  3. package/dist/client/hooks/useAvailablePromosQuery.d.ts +1 -1
  4. package/dist/client/hooks/useBetRecordsQuery.d.ts +1 -1
  5. package/dist/client/hooks/useBonusesQuery.d.ts +1 -1
  6. package/dist/client/hooks/useCashbacksQuery.d.ts +1 -1
  7. package/dist/client/hooks/useCreateGCashDepositMutation.d.ts +1 -1
  8. package/dist/client/hooks/useCreateGCashWithdrawalMutation.d.ts +1 -1
  9. package/dist/client/hooks/useCreateGameSessionMutation.d.ts +1 -1
  10. package/dist/client/hooks/useCreateGameSessionMutation.js +1 -1
  11. package/dist/client/hooks/useCreateInstapayWithdrawalMutation.d.ts +1 -1
  12. package/dist/client/hooks/useCreateMayaAppDepositMutation.d.ts +1 -1
  13. package/dist/client/hooks/useCreateMayaAppWithdrawalMutation.d.ts +1 -1
  14. package/dist/client/hooks/useCreateMayaDepositMutation.d.ts +1 -1
  15. package/dist/client/hooks/useCreateMayaWithdrawalMutation.d.ts +1 -1
  16. package/dist/client/hooks/useCreateOnlineBankDepositMutation.d.ts +1 -1
  17. package/dist/client/hooks/useCreateQRPHDepositMutation.d.ts +1 -1
  18. package/dist/client/hooks/useDepositQuery.d.ts +1 -1
  19. package/dist/client/hooks/useDepositRecordsQuery.d.ts +1 -1
  20. package/dist/client/hooks/useDepositsCountQuery.d.ts +1 -1
  21. package/dist/client/hooks/useEndGameSessionMutation.d.ts +1 -1
  22. package/dist/client/hooks/useEndGameSessionMutation.js +1 -1
  23. package/dist/client/hooks/useFavoriteGamesQuery.d.ts +1 -1
  24. package/dist/client/hooks/useGamesQuery.d.ts +1 -1
  25. package/dist/client/hooks/useInfiniteQueryHelper.d.ts +9 -1
  26. package/dist/client/hooks/useInfiniteQueryHelper.js +11 -9
  27. package/dist/client/hooks/useInstapayBankListQuery.d.ts +1 -1
  28. package/dist/client/hooks/useIsMayaSessionValidQuery.d.ts +1 -1
  29. package/dist/client/hooks/useJackpotPayoutsQuery.d.ts +1 -1
  30. package/dist/client/hooks/useJackpotPayoutsQuery.js +1 -1
  31. package/dist/client/hooks/useJackpotsQuery.d.ts +1 -1
  32. package/dist/client/hooks/useLocaleInfo.d.ts +1 -1
  33. package/dist/client/hooks/useMarkGameAsFavoriteMutation.d.ts +1 -1
  34. package/dist/client/hooks/useMarkMessageAsReadMutation.d.ts +1 -1
  35. package/dist/client/hooks/useMarkMessageAsReadMutation.js +1 -1
  36. package/dist/client/hooks/useMemberVerificationQuery.d.ts +1 -1
  37. package/dist/client/hooks/useMessagesQuery.d.ts +1 -1
  38. package/dist/client/hooks/usePaymentSettingsQuery.d.ts +1 -1
  39. package/dist/client/hooks/usePlatformQuery.d.ts +1 -1
  40. package/dist/client/hooks/useProfileCompletionQuery.d.ts +1 -1
  41. package/dist/client/hooks/usePromoQuery.d.ts +1 -1
  42. package/dist/client/hooks/usePromosQuery.d.ts +1 -1
  43. package/dist/client/hooks/useSendVerificationCodeMutation.d.ts +1 -1
  44. package/dist/client/hooks/useSessionQuery.d.ts +1 -1
  45. package/dist/client/hooks/useSignInMutation.d.ts +1 -1
  46. package/dist/client/hooks/useSignOutMutation.d.ts +1 -1
  47. package/dist/client/hooks/useSignUpMutation.d.ts +1 -1
  48. package/dist/client/hooks/useTopWinsQuery.d.ts +1 -1
  49. package/dist/client/hooks/useTournamentsQuery.d.ts +1 -1
  50. package/dist/client/hooks/useTransactionRecordsQuery.d.ts +1 -1
  51. package/dist/client/hooks/useUnmarkGameAsFavoriteMutation.d.ts +1 -1
  52. package/dist/client/hooks/useUnreadMessagesCountQuery.d.ts +1 -1
  53. package/dist/client/hooks/useWalletQuery.d.ts +1 -1
  54. package/dist/client/hooks/useWalletQuery.js +1 -1
  55. package/dist/client/hooks/useWithdrawalRecordsQuery.d.ts +1 -1
  56. package/dist/client/services/getSession.d.ts +1 -1
  57. package/dist/components/Account/Account.js +1 -1
  58. package/dist/components/AccountInfo/AccountInfo.js +1 -1
  59. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositVCA.js +1 -1
  60. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositQrCode.js +1 -1
  61. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.js +1 -1
  62. package/dist/components/DepositWithdrawal/DepositWithdrawal.js +1 -1
  63. package/dist/components/DepositWithdrawal/PaymentMethods.js +5 -5
  64. package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +1 -1
  65. package/dist/components/Disclaimer/Disclaimer.js +2 -2
  66. package/dist/components/GameProviders/GameProviders.d.ts +1 -1
  67. package/dist/components/Games/Game.d.ts +1 -0
  68. package/dist/components/Games/Game.js +34 -0
  69. package/dist/components/Games/GameContext.d.ts +3 -0
  70. package/dist/components/Games/GameContext.js +8 -0
  71. package/dist/components/Games/Games.d.ts +7 -14
  72. package/dist/components/Games/Games.js +3 -8
  73. package/dist/components/Games/GamesCarousel.client.d.ts +2 -0
  74. package/dist/components/Games/{Games.client.js → GamesCarousel.client.js} +6 -32
  75. package/dist/components/Games/GamesCarousel.d.ts +15 -0
  76. package/dist/components/Games/GamesCarousel.js +11 -0
  77. package/dist/components/Games/GamesList.client.d.ts +2 -0
  78. package/dist/components/Games/GamesList.client.js +14 -0
  79. package/dist/components/Games/GamesList.d.ts +10 -0
  80. package/dist/components/Games/GamesList.js +10 -0
  81. package/dist/components/GamesSearch/GamesSearch.js +1 -1
  82. package/dist/components/JackpotCounter/JackpotCounterItem.js +8 -10
  83. package/dist/components/Jackpots/JackpotGameProviders.d.ts +1 -1
  84. package/dist/components/Jackpots/JackpotItemDesktop.d.ts +1 -1
  85. package/dist/components/Jackpots/JackpotItemDesktop.js +8 -10
  86. package/dist/components/Jackpots/JackpotItemMobile.d.ts +1 -1
  87. package/dist/components/Jackpots/JackpotItemMobile.js +8 -13
  88. package/dist/components/Jackpots/Jackpots.d.ts +1 -1
  89. package/dist/components/Jackpots/Jackpots.js +1 -1
  90. package/dist/components/Jackpots/useJackpotItemData.d.ts +1 -1
  91. package/dist/components/Jackpots/useJackpotItemData.js +1 -1
  92. package/dist/components/Messages/utils.d.ts +1 -1
  93. package/dist/components/PortalProvider/PortalProvider.client.js +25 -13
  94. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +2 -2
  95. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +1 -1
  96. package/dist/components/Quests/WageringQuest/WageringQuest.js +1 -1
  97. package/dist/components/Quests/WageringQuest/WageringQuestModal.js +1 -1
  98. package/dist/components/SignIn/SignInForm.js +1 -1
  99. package/dist/components/TournamentCounter/TournamentCounterItem.js +7 -8
  100. package/dist/components/Tournaments/TournamentGameProviders.d.ts +1 -1
  101. package/dist/components/Tournaments/TournamentItemDesktop.d.ts +1 -1
  102. package/dist/components/Tournaments/TournamentItemDesktop.js +6 -7
  103. package/dist/components/Tournaments/TournamentItemMobile.d.ts +1 -1
  104. package/dist/components/Tournaments/TournamentItemMobile.js +6 -11
  105. package/dist/components/Tournaments/Tournaments.d.ts +1 -1
  106. package/dist/components/Tournaments/Tournaments.js +1 -1
  107. package/dist/components/Tournaments/useTournamentItemData.d.ts +1 -1
  108. package/dist/components/TransactionRecords/TableFilters.d.ts +1 -1
  109. package/dist/icons/index.d.ts +3 -0
  110. package/dist/icons/index.js +3 -0
  111. package/dist/server/services/getSession.d.ts +1 -1
  112. package/dist/tsconfig.build.tsbuildinfo +1 -1
  113. package/dist/utils/getPercentage.d.ts +1 -1
  114. package/dist/utils/getPercentage.js +6 -5
  115. package/dist/utils/index.d.ts +2 -0
  116. package/dist/utils/index.js +2 -0
  117. package/dist/utils/mask.d.ts +10 -0
  118. package/dist/utils/mask.js +10 -0
  119. package/package.json +6 -10
  120. package/dist/components/Games/Games.client.d.ts +0 -2
  121. package/dist/utils/maskDisplayName.d.ts +0 -1
  122. package/dist/utils/maskDisplayName.js +0 -8
@@ -0,0 +1,3 @@
1
+ import type { Game } from '@opexa/portal-sdk-core';
2
+ export declare const GameContext: import("react").Context<Game | null>;
3
+ export declare const useGameContext: () => Game;
@@ -0,0 +1,8 @@
1
+ import { createContext, useContext } from 'react';
2
+ import invariant from 'tiny-invariant';
3
+ export const GameContext = createContext(null);
4
+ export const useGameContext = () => {
5
+ const context = useContext(GameContext);
6
+ invariant(context);
7
+ return context;
8
+ };
@@ -1,15 +1,8 @@
1
- import type { GamesInput } from '@opexa/portal-sdk-core';
2
- export interface GamesProps {
3
- /** @default "Games" */
4
- heading?: string;
5
- /**
6
- * @description URL for viewing all games
7
- * @default "/games"
8
- */
9
- viewAllUrl?: string;
10
- /** @default 1 */
11
- numOfRows?: 1 | 2 | 3;
12
- className?: string;
13
- filter?: GamesInput['filter'];
14
- }
1
+ import { type GamesCarouselProps } from './GamesCarousel';
2
+ import { type GamesListProps } from './GamesList';
3
+ export type GamesProps = ({
4
+ layout: 'list';
5
+ } & GamesListProps) | ({
6
+ layout?: 'carousel';
7
+ } & GamesCarouselProps);
15
8
  export declare function Games(props: GamesProps): Promise<import("react/jsx-runtime").JSX.Element>;
@@ -1,11 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { prefetchGamesQuery } from '../../server/utils/index.js';
3
- import { Games__client } from './Games.client.js';
2
+ import { GamesCarousel } from './GamesCarousel.js';
3
+ import { GamesList } from './GamesList.js';
4
4
  export async function Games(props) {
5
- const numOfRows = props.numOfRows ?? 1;
6
- await prefetchGamesQuery({
7
- first: (numOfRows + 1) * 6,
8
- filter: props.filter,
9
- });
10
- return _jsx(Games__client, { ...props });
5
+ return props.layout === 'list' ? (_jsx(GamesList, { ...props })) : (_jsx(GamesCarousel, { ...props }));
11
6
  }
@@ -0,0 +1,2 @@
1
+ import type { GamesCarouselProps } from './GamesCarousel';
2
+ export declare function GamesCarousel__client(props: GamesCarouselProps): import("react/jsx-runtime").JSX.Element;
@@ -1,15 +1,15 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import useEmblaCarousel, {} from 'embla-carousel-react';
4
- import Image from 'next/image';
5
4
  import Link from 'next/link';
6
5
  import { useCallback, useEffect, useState } from 'react';
7
6
  import { twMerge } from 'tailwind-merge';
8
- import { useFavoriteGamesQuery, useGamesQuery, useMarkGameAsFavoriteMutation, useSessionQuery, useUnmarkGameAsFavoriteMutation, } from '../../client/hooks/index.js';
9
- import { ArrowLeftIcon, ArrowRightIcon, ChevronRightIcon, SpinnerIcon, Star01Icon, } from '../../icons/index.js';
7
+ import { useGamesQuery } from '../../client/hooks/index.js';
8
+ import { ArrowLeftIcon, ArrowRightIcon, ChevronRightIcon, SpinnerIcon, } from '../../icons/index.js';
10
9
  import { Button } from '../../ui/index.js';
11
- import { GameLaunchTrigger } from '../GameLaunch/index.js';
12
- export function Games__client(props) {
10
+ import { Game } from './Game.js';
11
+ import { GameContext } from './GameContext.js';
12
+ export function GamesCarousel__client(props) {
13
13
  const numOfRows = props.numOfRows ?? 1;
14
14
  const gamesQuery = useGamesQuery({
15
15
  first: (numOfRows + 1) * 6,
@@ -54,31 +54,5 @@ export function Games__client(props) {
54
54
  ? 'grid-rows-3'
55
55
  : numOfRows === 2
56
56
  ? 'grid-rows-2'
57
- : 'grid-rows-1'), children: games.map((game) => (_jsx(Item, { game: game }, game.id))) }) })] }));
58
- }
59
- function Item({ game }) {
60
- const sessionQuery = useSessionQuery();
61
- const session = sessionQuery.data;
62
- const favoriteGamesQuery = useFavoriteGamesQuery();
63
- const favoriteGames = favoriteGamesQuery.data ?? [];
64
- const markGameAsFavoriteMutation = useMarkGameAsFavoriteMutation();
65
- const unmarkGameAsFavoriteMutation = useUnmarkGameAsFavoriteMutation();
66
- const markedAsFavorite = favoriteGames.some((favoriteGame) => favoriteGame.id === game.id);
67
- return (_jsxs(GameLaunchTrigger, { game: game, className: "relative block w-full shadow-sm", children: [session?.status === 'authenticated' && (_jsx("div", { role: "button", onClick: (e) => {
68
- e.preventDefault();
69
- e.stopPropagation();
70
- if (markGameAsFavoriteMutation.isPending)
71
- return;
72
- if (unmarkGameAsFavoriteMutation.isPending)
73
- return;
74
- if (markedAsFavorite) {
75
- unmarkGameAsFavoriteMutation.mutate(game.reference);
76
- }
77
- else {
78
- markGameAsFavoriteMutation.mutate(game.reference);
79
- }
80
- }, "aria-disabled": markGameAsFavoriteMutation.isPending ||
81
- unmarkGameAsFavoriteMutation.isPending, className: "rounded-xs absolute right-2 top-2 flex size-9 items-center justify-center bg-black/65 blur-[0.5px]", children: _jsx(Star01Icon, { className: twMerge('size-5', markedAsFavorite
82
- ? 'fill-yellow-400 text-yellow-400'
83
- : 'text-white') }) })), _jsx(Image, { src: game.image, alt: "", width: 200, height: 200, priority: true, className: "aspect-square w-full rounded-t-md object-cover" }), _jsx("span", { className: "bg-bg-tertiary text-text-primary-brand block w-full truncate rounded-b-md px-2 py-2.5 text-center text-xs font-semibold", children: game.name })] }));
57
+ : 'grid-rows-1'), children: games.map((game) => (_jsx(GameContext, { value: game, children: _jsx(Game, {}) }, game.id))) }) })] }));
84
58
  }
@@ -0,0 +1,15 @@
1
+ import type { GamesInput } from '@opexa/portal-sdk-core';
2
+ export interface GamesCarouselProps {
3
+ /** @default "Games" */
4
+ heading?: string;
5
+ /**
6
+ * @description URL for viewing all games
7
+ * @default "/games"
8
+ */
9
+ viewAllUrl?: string;
10
+ /** @default 1 */
11
+ numOfRows?: 1 | 2 | 3;
12
+ filter?: GamesInput['filter'];
13
+ className?: string;
14
+ }
15
+ export declare function GamesCarousel(props: GamesCarouselProps): Promise<import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { prefetchGamesQuery } from '../../server/utils/index.js';
3
+ import { GamesCarousel__client } from './GamesCarousel.client.js';
4
+ export async function GamesCarousel(props) {
5
+ const numOfRows = props.numOfRows ?? 1;
6
+ await prefetchGamesQuery({
7
+ first: (numOfRows + 1) * 6,
8
+ filter: props.filter,
9
+ });
10
+ return _jsx(GamesCarousel__client, { ...props });
11
+ }
@@ -0,0 +1,2 @@
1
+ import type { GamesListProps } from './GamesList';
2
+ export declare function GamesList__client(props: GamesListProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { noop } from 'lodash-es';
4
+ import { useGamesQuery, useInfiniteQueryHelper } from '../../client/hooks/index.js';
5
+ import { Button, Progress } from '../../ui/index.js';
6
+ import { Game } from './Game.js';
7
+ import { GameContext } from './GameContext.js';
8
+ export function GamesList__client(props) {
9
+ const { availableRows, totalRows, totalAvailableRows, hasNextPage, next } = useInfiniteQueryHelper(useGamesQuery, {
10
+ first: props.first ?? 24,
11
+ filter: props.filter,
12
+ });
13
+ return (_jsxs("div", { className: props.className, children: [_jsx("h2", { className: "text-lg font-semibold", children: props.heading ?? 'Games' }), _jsx("div", { className: "mt-lg grid grid-cols-3 gap-1.5 lg:grid-cols-6 lg:gap-2.5", children: availableRows.map((game) => (_jsx(GameContext, { value: game, children: _jsx(Game, {}) }, game.id))) }), _jsxs("div", { className: "mt-3xl flex flex-col items-center", children: [_jsx(Progress.Root, { min: 0, max: totalRows, value: totalAvailableRows, onValueChange: noop, className: "w-[12.5rem]", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx("p", { className: "text-button-tertiary-fg mt-md text-sm", children: `Displaying ${totalAvailableRows} of ${totalRows}` }), hasNextPage && (_jsx(Button, { size: "sm", variant: "outline", fullWidth: false, onClick: next, className: "mt-lg", children: "Load More" }))] })] }));
14
+ }
@@ -0,0 +1,10 @@
1
+ import type { GamesInput } from '@opexa/portal-sdk-core';
2
+ export interface GamesListProps {
3
+ /** @default 24 */
4
+ first?: number;
5
+ filter?: GamesInput['filter'];
6
+ /** @default "Games"*/
7
+ heading?: string;
8
+ className?: string;
9
+ }
10
+ export declare function GamesList(props: GamesListProps): Promise<import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { prefetchGamesQuery } from '../../server/utils/index.js';
3
+ import { GamesList__client } from './GamesList.client.js';
4
+ export async function GamesList(props) {
5
+ await prefetchGamesQuery({
6
+ first: props.first ?? 24,
7
+ filter: props.filter,
8
+ });
9
+ return _jsx(GamesList__client, { ...props });
10
+ }
@@ -6,7 +6,7 @@ import { useRef, useState } from 'react';
6
6
  import { useShallow } from 'zustand/shallow';
7
7
  import { useGamesQuery, useGlobalStore } from '../../client/hooks/index.js';
8
8
  import { SearchLgIcon, XIcon } from '../../icons/index.js';
9
- import providerHacksaw from '~/images/hacksaw-gaming.png';
9
+ import providerHacksaw from '../../images/hacksaw-gaming.png';
10
10
  import { Button, Dialog, Field, IconButton, Presence } from '../../ui/index.js';
11
11
  import { GameLaunchTrigger } from '../GameLaunch/index.js';
12
12
  export function GamesSearch(props) {
@@ -9,13 +9,11 @@ import { useLocaleInfo } from '../../client/hooks/index.js';
9
9
  import { useJackpotPayoutsQuery } from '../../client/hooks/useJackpotPayoutsQuery.js';
10
10
  import { ArrowNarrowUpRightIcon, ChevronLeftIcon, ChevronRightIcon, Trophy01Icon, User01Icon, } from '../../icons/index.js';
11
11
  import { StarIcon } from '../../icons/StarIcon.js';
12
- import closeChest from '~/images/close-chest.png';
13
- import firstPlace from '~/images/first-place.png';
14
- import leaderboard from '~/images/leaderboard.png';
15
- import openChest from '~/images/open-chest.png';
16
- import { formatNumber } from '../../utils/index.js';
17
- import { getPercentage } from '../../utils/getPercentage.js';
18
- import { maskDisplayName } from '../../utils/maskDisplayName.js';
12
+ import closeChest from '../../images/close-chest.png';
13
+ import firstPlace from '../../images/first-place.png';
14
+ import leaderboard from '../../images/leaderboard.png';
15
+ import openChest from '../../images/open-chest.png';
16
+ import { formatNumber, getPercentage, mask } from '../../utils/index.js';
19
17
  import styles from './JackpotCounterItem.module.css';
20
18
  export function JackpotCounterItem({ jackpot, className, viewAllUrl, }) {
21
19
  const jackpotPayoutsQuery = useJackpotPayoutsQuery({
@@ -52,7 +50,7 @@ export function JackpotCounterItem({ jackpot, className, viewAllUrl, }) {
52
50
  currency: localeInfo.currency.code,
53
51
  minDecimalPlaces: 2,
54
52
  maxDecimalPlaces: 2,
55
- }) })] }), _jsx("div", { className: "z-1 bottom-[-60] right-0 lg:absolute", children: _jsx(Image, { width: 150, height: 150, src: isPayingOut ? openChest : closeChest, alt: "closeChest", quality: 100, className: "h-25 w-25 lg:h-37.5 lg:w-37.5 size-full p-2" }) })] }), topJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsxs("div", { className: "bg-bg-tertiary relative flex h-18 w-18 items-center justify-center rounded-full", children: [_jsx(User01Icon, { className: "text-text-quarterary-500 size-9" }), _jsx("div", { className: "bg-yellow-400 text-brand-950 border-bg-primary absolute bottom-0 right-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] text-xs font-bold", children: "1st" })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "border-utility-brand-200 bg-utility-brand-50 text-utility-brand-700 flex h-fit w-fit items-center gap-1 rounded-sm border px-2 py-0.5 text-xs font-medium", children: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "Top Payout"] }), _jsx("div", { className: "font-semibold", children: maskDisplayName(topJackpotPayout.member.name) }), _jsx("div", { className: "text-brand-400 text-2xl", children: formatNumber(topJackpotPayout.amount, {
53
+ }) })] }), _jsx("div", { className: "z-1 bottom-[-60] right-0 lg:absolute", children: _jsx(Image, { width: 150, height: 150, src: isPayingOut ? openChest : closeChest, alt: "closeChest", quality: 100, className: "h-25 w-25 lg:h-37.5 lg:w-37.5 size-full p-2" }) })] }), topJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsxs("div", { className: "bg-bg-tertiary relative flex h-18 w-18 items-center justify-center rounded-full", children: [_jsx(User01Icon, { className: "text-text-quarterary-500 size-9" }), _jsx("div", { className: "bg-yellow-400 text-brand-950 border-bg-primary absolute bottom-0 right-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] text-xs font-bold", children: "1st" })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "border-utility-brand-200 bg-utility-brand-50 text-utility-brand-700 flex h-fit w-fit items-center gap-1 rounded-sm border px-2 py-0.5 text-xs font-medium", children: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "Top Payout"] }), _jsx("div", { className: "font-semibold", children: topJackpotPayout.member.name }), _jsx("div", { className: "text-brand-400 text-2xl", children: formatNumber(topJackpotPayout.amount, {
56
54
  currency: localeInfo.currency.code,
57
55
  minDecimalPlaces: 2,
58
56
  maxDecimalPlaces: 2,
@@ -62,12 +60,12 @@ export function JackpotCounterItem({ jackpot, className, viewAllUrl, }) {
62
60
  }) }), _jsxs("div", { className: "relative flex items-center justify-end gap-1.5", children: [isPayingOut ? (_jsxs("div", { className: "flex w-6 items-center", children: [_jsx("div", { className: twMerge('absolute left-0', styles['animate-arrow-red-flash-1']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-1.5', styles['animate-arrow-red-flash-2']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-3', styles['animate-arrow-red-flash-3']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) })] })) : (_jsxs("div", { className: "flex w-6 items-center", children: [_jsx("div", { className: twMerge('absolute left-0', styles['animate-arrow-green-flash-1']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-1.5', styles['animate-arrow-green-flash-2']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-3', styles['animate-arrow-green-flash-3']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) })] })), _jsx("div", { className: "text-text-primary-900 text-xs font-semibold", children: formatNumber(jackpot?.maximumJackpotPoolLimit, {
63
61
  currency: localeInfo.currency.code,
64
62
  compact: true,
65
- }) })] })] }), _jsx(Progress.Root, { className: "bg-bg-primary h-2 w-full rounded-full lg:h-4", max: 100, value: getPercentage(Number(jackpot.pool), Number(jackpot.maximumJackpotPoolLimit)), children: _jsx(Progress.Track, { className: "bg-bg-primary h-full overflow-hidden rounded-full", children: _jsx(Progress.Range, { className: "bg-brand-500 relative h-full overflow-hidden rounded-full pl-1.5", children: _jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-start pl-1.5", "aria-hidden": "true", children: arrowImages }) }) }) }), _jsx("div", { className: "mt-1 block text-start text-2xs lg:hidden", children: isPayingOut
63
+ }) })] })] }), _jsx(Progress.Root, { className: "bg-bg-primary h-2 w-full rounded-full lg:h-4", max: 100, value: getPercentage(jackpot.pool, jackpot.maximumJackpotPoolLimit), children: _jsx(Progress.Track, { className: "bg-bg-primary h-full overflow-hidden rounded-full", children: _jsx(Progress.Range, { className: "bg-brand-500 relative h-full overflow-hidden rounded-full pl-1.5", children: _jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-start pl-1.5", "aria-hidden": "true", children: arrowImages }) }) }) }), _jsx("div", { className: "mt-1 block text-start text-2xs lg:hidden", children: isPayingOut
66
64
  ? `The pot has hit ${formatNumber(jackpot?.maximumJackpotPoolLimit, {
67
65
  currency: localeInfo.currency.code,
68
66
  compact: true,
69
67
  })} Play now for your chance to win big! 🔥`
70
- : getAccumulatingJackpotDescription(Number(jackpot?.pool) ?? 0, Number(jackpot?.maximumJackpotPoolLimit) ?? 0) })] })] }), _jsxs("div", { className: "z-1 hidden flex-1 space-y-4 lg:block", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex gap-2", children: [_jsx(Image, { width: 24, height: 24, src: leaderboard, quality: 100, alt: "leaderboardIcon", className: "size-full h-auto w-6" }), _jsx("div", { className: "text-text-primary-900 text-lg font-semibold", children: jackpotPayouts.length ? 'Leaderboard' : 'Starting soon!' })] }), _jsxs(Link, { className: "text-button-tertiary-fg flex text-sm font-semibold", href: viewAllUrl ?? '/jackpots', children: ["See details", _jsx(ChevronRightIcon, { className: "size-5" })] })] }), _jsx("div", { className: twMerge('max-h-[272px] overflow-y-scroll', styles['scrollArea']), children: _jsx("div", { className: "border-gray-200 overflow-hidden rounded-xl", children: _jsxs("table", { className: "w-full", children: [_jsx("thead", { children: _jsxs("tr", { className: "bg-bg-secondary text-text-tertiary-600 h-8 text-xs font-medium", children: [_jsx("th", { className: "w-[52px]", children: "#" }), _jsx("th", { children: "Player" }), _jsx("th", { children: "Multiplier" }), _jsx("th", { children: "Prize" })] }) }), _jsx("tbody", { children: jackpotPayouts.length ? (_jsx(_Fragment, { children: jackpotPayouts.map((jackpotPayout, i) => (_jsxs("tr", { className: "bg-bg-primary text-text-secondary-700 text-sm", children: [_jsx("td", { className: "border-border-secondary h-12 w-[52px] border-t-2", children: i + 1 < 6 ? (_jsxs("div", { className: "relative", children: [_jsx(StarIcon, { className: twMerge('mx-auto size-6.5', starTierStyles[i].starColor) }), _jsx("span", { className: twMerge('absolute inset-0 mt-0.5 flex items-center justify-center text-2xs font-bold', starTierStyles[i].numberColor), children: i + 1 })] })) : (i + 1) }), _jsx("td", { className: "border-border-secondary h-12 border-t-2", children: maskDisplayName(jackpotPayout.member.name) }), _jsxs("td", { className: "border-border-secondary h-12 border-t-2", children: [jackpotPayout.multiplier, "x"] }), _jsx("td", { className: "border-border-secondary text-brand-400 h-12 border-t-2", children: formatNumber(jackpotPayout.amount, {
68
+ : getAccumulatingJackpotDescription(Number(jackpot?.pool) ?? 0, Number(jackpot?.maximumJackpotPoolLimit) ?? 0) })] })] }), _jsxs("div", { className: "z-1 hidden flex-1 space-y-4 lg:block", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex gap-2", children: [_jsx(Image, { width: 24, height: 24, src: leaderboard, quality: 100, alt: "leaderboardIcon", className: "size-full h-auto w-6" }), _jsx("div", { className: "text-text-primary-900 text-lg font-semibold", children: jackpotPayouts.length ? 'Leaderboard' : 'Starting soon!' })] }), _jsxs(Link, { className: "text-button-tertiary-fg flex text-sm font-semibold", href: viewAllUrl ?? '/jackpots', children: ["See details", _jsx(ChevronRightIcon, { className: "size-5" })] })] }), _jsx("div", { className: twMerge('max-h-[272px] overflow-y-scroll', styles['scrollArea']), children: _jsx("div", { className: "border-gray-200 overflow-hidden rounded-xl", children: _jsxs("table", { className: "w-full", children: [_jsx("thead", { children: _jsxs("tr", { className: "bg-bg-secondary text-text-tertiary-600 h-8 text-xs font-medium", children: [_jsx("th", { className: "w-[52px]", children: "#" }), _jsx("th", { children: "Player" }), _jsx("th", { children: "Multiplier" }), _jsx("th", { children: "Prize" })] }) }), _jsx("tbody", { children: jackpotPayouts.length ? (_jsx(_Fragment, { children: jackpotPayouts.map((jackpotPayout, i) => (_jsxs("tr", { className: "bg-bg-primary text-text-secondary-700 text-sm", children: [_jsx("td", { className: "border-border-secondary h-12 w-[52px] border-t-2", children: i + 1 < 6 ? (_jsxs("div", { className: "relative", children: [_jsx(StarIcon, { className: twMerge('mx-auto size-6.5', starTierStyles[i].starColor) }), _jsx("span", { className: twMerge('absolute inset-0 mt-0.5 flex items-center justify-center text-2xs font-bold', starTierStyles[i].numberColor), children: i + 1 })] })) : (i + 1) }), _jsx("td", { className: "border-border-secondary h-12 border-t-2", children: mask(jackpotPayout.member.name) }), _jsxs("td", { className: "border-border-secondary h-12 border-t-2", children: [jackpotPayout.multiplier, "x"] }), _jsx("td", { className: "border-border-secondary text-brand-400 h-12 border-t-2", children: formatNumber(jackpotPayout.amount, {
71
69
  currency: localeInfo.currency.code,
72
70
  minDecimalPlaces: 2,
73
71
  maxDecimalPlaces: 2,
@@ -1,4 +1,4 @@
1
- import type { GameProviderData } from '~/types';
1
+ import type { GameProviderData } from '../../types';
2
2
  export interface JackpotGameProvidersProps {
3
3
  gameProviders: GameProviderData[];
4
4
  }
@@ -1,5 +1,5 @@
1
1
  import type { Jackpot } from '@opexa/portal-sdk-core';
2
- import type { GameProviderData } from '~/types';
2
+ import type { GameProviderData } from '../../types';
3
3
  export interface JackpotItemProps {
4
4
  jackpot: Jackpot;
5
5
  /** @default "/jackpots" */
@@ -5,13 +5,11 @@ import Image from 'next/image';
5
5
  import { twMerge } from 'tailwind-merge';
6
6
  import { ArrowNarrowUpRightIcon, ChevronLeftIcon, ChevronRightIcon, Trophy01Icon, User01Icon, } from '../../icons/index.js';
7
7
  import { StarIcon } from '../../icons/StarIcon.js';
8
- import closeChest from '~/images/close-chest.png';
9
- import firstPlace from '~/images/first-place.png';
10
- import leaderboard from '~/images/leaderboard.png';
11
- import openChest from '~/images/open-chest.png';
12
- import { formatNumber } from '../../utils/index.js';
13
- import { getPercentage } from '../../utils/getPercentage.js';
14
- import { maskDisplayName } from '../../utils/maskDisplayName.js';
8
+ import closeChest from '../../images/close-chest.png';
9
+ import firstPlace from '../../images/first-place.png';
10
+ import leaderboard from '../../images/leaderboard.png';
11
+ import openChest from '../../images/open-chest.png';
12
+ import { formatNumber, getPercentage, mask } from '../../utils/index.js';
15
13
  import styles from '../JackpotCounter/JackpotCounterItem.module.css';
16
14
  import { JackpotGameProviders } from './JackpotGameProviders.js';
17
15
  import { JackpotRules } from './JackpotRules.js';
@@ -22,7 +20,7 @@ export function JackpotItemDesktop({ jackpot, gameProviders, }) {
22
20
  currency: localeInfo.currency.code,
23
21
  minDecimalPlaces: 2,
24
22
  maxDecimalPlaces: 2,
25
- }) })] }), _jsx("div", { className: "z-1 bottom-[-60] right-0 block lg:absolute", children: _jsx(Image, { width: 150, height: 150, src: isPayingOut ? openChest : closeChest, alt: "closeChest", quality: 100, className: "h-25 w-25 lg:h-37.5 lg:w-37.5 size-full p-2" }) })] }), topJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsxs("div", { className: "bg-bg-tertiary relative flex h-18 w-18 items-center justify-center rounded-full", children: [_jsx(User01Icon, { className: "text-text-quarterary-500 size-9" }), _jsx("div", { className: "bg-yellow-400 text-brand-950 border-bg-primary absolute bottom-0 right-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] text-xs font-bold", children: "1st" })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "border-utility-brand-200 bg-utility-brand-50 text-utility-brand-700 flex h-fit w-fit items-center gap-1 rounded-sm border px-2 py-0.5 text-xs font-medium", children: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "Top Payout"] }), _jsx("div", { className: "font-semibold", children: maskDisplayName(topJackpotPayout.member.name) }), _jsx("div", { className: "text-brand-400 text-2xl", children: formatNumber(topJackpotPayout.amount, {
23
+ }) })] }), _jsx("div", { className: "z-1 bottom-[-60] right-0 block lg:absolute", children: _jsx(Image, { width: 150, height: 150, src: isPayingOut ? openChest : closeChest, alt: "closeChest", quality: 100, className: "h-25 w-25 lg:h-37.5 lg:w-37.5 size-full p-2" }) })] }), topJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsxs("div", { className: "bg-bg-tertiary relative flex h-18 w-18 items-center justify-center rounded-full", children: [_jsx(User01Icon, { className: "text-text-quarterary-500 size-9" }), _jsx("div", { className: "bg-yellow-400 text-brand-950 border-bg-primary absolute bottom-0 right-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] text-xs font-bold", children: "1st" })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "border-utility-brand-200 bg-utility-brand-50 text-utility-brand-700 flex h-fit w-fit items-center gap-1 rounded-sm border px-2 py-0.5 text-xs font-medium", children: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "Top Payout"] }), _jsx("div", { className: "font-semibold", children: mask(topJackpotPayout.member.name) }), _jsx("div", { className: "text-brand-400 text-2xl", children: formatNumber(topJackpotPayout.amount, {
26
24
  currency: localeInfo.currency.code,
27
25
  minDecimalPlaces: 2,
28
26
  maxDecimalPlaces: 2,
@@ -32,12 +30,12 @@ export function JackpotItemDesktop({ jackpot, gameProviders, }) {
32
30
  }) }), _jsxs("div", { className: "relative flex items-center justify-end gap-1.5", children: [isPayingOut ? (_jsxs("div", { className: "flex w-6 items-center", children: [_jsx("div", { className: twMerge('absolute left-0', styles['animate-arrow-red-flash-1']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-1.5', styles['animate-arrow-red-flash-2']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-3', styles['animate-arrow-red-flash-3']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) })] })) : (_jsxs("div", { className: "flex w-6 items-center", children: [_jsx("div", { className: twMerge('absolute left-0', styles['animate-arrow-green-flash-1']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-1.5', styles['animate-arrow-green-flash-2']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-3', styles['animate-arrow-green-flash-3']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) })] })), _jsx("div", { className: "text-text-primary-900 text-xs font-semibold", children: formatNumber(jackpot?.maximumJackpotPoolLimit, {
33
31
  currency: localeInfo.currency.code,
34
32
  compact: true,
35
- }) })] })] }), _jsx(Progress.Root, { className: "bg-bg-primary h-2 w-full rounded-full lg:h-4", max: 100, value: getPercentage(Number(jackpot.pool), Number(jackpot.maximumJackpotPoolLimit)), children: _jsx(Progress.Track, { className: "bg-bg-primary h-full overflow-hidden rounded-full", children: _jsx(Progress.Range, { className: "bg-brand-500 relative h-full overflow-hidden rounded-full pl-1.5", children: _jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-start pl-1.5", "aria-hidden": "true", children: arrowImages }) }) }) }), _jsx("div", { className: "mt-1 block text-start text-2xs lg:hidden", children: isPayingOut
33
+ }) })] })] }), _jsx(Progress.Root, { className: "bg-bg-primary h-2 w-full rounded-full lg:h-4", max: 100, value: getPercentage(jackpot.pool, jackpot.maximumJackpotPoolLimit), children: _jsx(Progress.Track, { className: "bg-bg-primary h-full overflow-hidden rounded-full", children: _jsx(Progress.Range, { className: "bg-brand-500 relative h-full overflow-hidden rounded-full pl-1.5", children: _jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-start pl-1.5", "aria-hidden": "true", children: arrowImages }) }) }) }), _jsx("div", { className: "mt-1 block text-start text-2xs lg:hidden", children: isPayingOut
36
34
  ? `The pot has hit ${formatNumber(jackpot?.maximumJackpotPoolLimit, {
37
35
  currency: localeInfo.currency.code,
38
36
  compact: true,
39
37
  })} Play now for your chance to win big! 🔥`
40
- : getAccumulatingJackpotDescription(Number(jackpot?.pool) ?? 0, Number(jackpot?.maximumJackpotPoolLimit) ?? 0) })] })] }), _jsxs("div", { className: "z-1 hidden flex-1 space-y-4 lg:block", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex gap-2", children: [_jsx(Image, { width: 24, height: 24, src: leaderboard, quality: 100, alt: "leaderboardIcon", className: "size-full h-auto w-6" }), _jsx("div", { className: "text-text-primary-900 text-lg font-semibold", children: jackpotPayouts.length ? 'Leaderboard' : 'Starting soon!' })] }), _jsx(JackpotRules, { jackpotRules: jackpot.description })] }), _jsx("div", { className: twMerge('max-h-[272px] overflow-y-scroll', styles['scrollArea']), children: _jsx("div", { className: "border-gray-200 overflow-hidden rounded-xl", children: _jsxs("table", { className: "w-full", children: [_jsx("thead", { children: _jsxs("tr", { className: "bg-bg-secondary text-text-tertiary-600 h-8 text-xs font-medium", children: [_jsx("th", { className: "w-[52px]", children: "#" }), _jsx("th", { children: "Player" }), _jsx("th", { children: "Multiplier" }), _jsx("th", { children: "Prize" })] }) }), _jsx("tbody", { children: jackpotPayouts.length ? (_jsx(_Fragment, { children: jackpotPayouts.map((jackpotPayout, i) => (_jsxs("tr", { className: "bg-bg-primary text-text-secondary-700 text-sm", children: [_jsx("td", { className: "border-border-secondary h-12 w-[52px] border-t-2", children: i + 1 < 6 ? (_jsxs("div", { className: "relative", children: [_jsx(StarIcon, { className: twMerge('mx-auto size-6.5', starTierStyles[i].starColor) }), _jsx("span", { className: twMerge('absolute inset-0 mt-0.5 flex items-center justify-center text-2xs font-bold', starTierStyles[i].numberColor), children: i + 1 })] })) : (i + 1) }), _jsx("td", { className: "border-border-secondary h-12 border-t-2", children: maskDisplayName(jackpotPayout.member.name) }), _jsxs("td", { className: "border-border-secondary h-12 border-t-2", children: [jackpotPayout.multiplier, "x"] }), _jsx("td", { className: "border-border-secondary text-brand-400 h-12 border-t-2", children: formatNumber(jackpotPayout.amount, {
38
+ : getAccumulatingJackpotDescription(Number(jackpot?.pool) ?? 0, Number(jackpot?.maximumJackpotPoolLimit) ?? 0) })] })] }), _jsxs("div", { className: "z-1 hidden flex-1 space-y-4 lg:block", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex gap-2", children: [_jsx(Image, { width: 24, height: 24, src: leaderboard, quality: 100, alt: "leaderboardIcon", className: "size-full h-auto w-6" }), _jsx("div", { className: "text-text-primary-900 text-lg font-semibold", children: jackpotPayouts.length ? 'Leaderboard' : 'Starting soon!' })] }), _jsx(JackpotRules, { jackpotRules: jackpot.description })] }), _jsx("div", { className: twMerge('max-h-[272px] overflow-y-scroll', styles['scrollArea']), children: _jsx("div", { className: "border-gray-200 overflow-hidden rounded-xl", children: _jsxs("table", { className: "w-full", children: [_jsx("thead", { children: _jsxs("tr", { className: "bg-bg-secondary text-text-tertiary-600 h-8 text-xs font-medium", children: [_jsx("th", { className: "w-[52px]", children: "#" }), _jsx("th", { children: "Player" }), _jsx("th", { children: "Multiplier" }), _jsx("th", { children: "Prize" })] }) }), _jsx("tbody", { children: jackpotPayouts.length ? (_jsx(_Fragment, { children: jackpotPayouts.map((jackpotPayout, i) => (_jsxs("tr", { className: "bg-bg-primary text-text-secondary-700 text-sm", children: [_jsx("td", { className: "border-border-secondary h-12 w-[52px] border-t-2", children: i + 1 < 6 ? (_jsxs("div", { className: "relative", children: [_jsx(StarIcon, { className: twMerge('mx-auto size-6.5', starTierStyles[i].starColor) }), _jsx("span", { className: twMerge('absolute inset-0 mt-0.5 flex items-center justify-center text-2xs font-bold', starTierStyles[i].numberColor), children: i + 1 })] })) : (i + 1) }), _jsx("td", { className: "border-border-secondary h-12 border-t-2", children: mask(jackpotPayout.member.name) }), _jsxs("td", { className: "border-border-secondary h-12 border-t-2", children: [jackpotPayout.multiplier, "x"] }), _jsx("td", { className: "border-border-secondary text-brand-400 h-12 border-t-2", children: formatNumber(jackpotPayout.amount, {
41
39
  currency: localeInfo.currency.code,
42
40
  minDecimalPlaces: 2,
43
41
  maxDecimalPlaces: 2,
@@ -1,5 +1,5 @@
1
1
  import type { Jackpot } from '@opexa/portal-sdk-core';
2
- import type { GameProviderData } from '~/types';
2
+ import type { GameProviderData } from '../../types';
3
3
  export interface JackpotItemMobileProps {
4
4
  jackpot: Jackpot;
5
5
  /** @default "/jackpots" */
@@ -4,17 +4,12 @@ import { Progress } from '@ark-ui/react';
4
4
  import Image from 'next/image';
5
5
  import { useState } from 'react';
6
6
  import { twMerge } from 'tailwind-merge';
7
- import { ArrowNarrowUpRightIcon, ChevronLeftIcon, ChevronRightIcon, Trophy01Icon, User01Icon, } from '../../icons/index.js';
8
- import { ArrowNarrowDownIcon } from '../../icons/ArrowNarrowDownIcon.js';
9
- import { ArrowNarrowUpIcon } from '../../icons/ArrowNarrowUpIcon.js';
10
- import { StarIcon } from '../../icons/StarIcon.js';
11
- import closeChest from '~/images/close-chest.png';
12
- import firstPlace from '~/images/first-place.png';
13
- import openChest from '~/images/open-chest.png';
7
+ import { ArrowNarrowDownIcon, ArrowNarrowUpIcon, ArrowNarrowUpRightIcon, ChevronLeftIcon, ChevronRightIcon, StarIcon, Trophy01Icon, User01Icon, } from '../../icons/index.js';
8
+ import closeChest from '../../images/close-chest.png';
9
+ import firstPlace from '../../images/first-place.png';
10
+ import openChest from '../../images/open-chest.png';
14
11
  import { Button } from '../../ui/index.js';
15
- import { formatNumber } from '../../utils/index.js';
16
- import { getPercentage } from '../../utils/getPercentage.js';
17
- import { maskDisplayName } from '../../utils/maskDisplayName.js';
12
+ import { formatNumber, getPercentage, mask } from '../../utils/index.js';
18
13
  import styles from '../JackpotCounter/JackpotCounterItem.module.css';
19
14
  import { JackpotGameProviders } from './JackpotGameProviders.js';
20
15
  import { JackpotRules } from './JackpotRules.js';
@@ -32,16 +27,16 @@ export function JackpotItemMobile({ jackpot, gameProviders, }) {
32
27
  }) }), _jsxs("div", { className: "relative flex items-center justify-end gap-1.5", children: [isPayingOut ? (_jsxs("div", { className: "flex w-6 items-center", children: [_jsx("div", { className: twMerge('absolute left-0', styles['animate-arrow-red-flash-1']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-1.5', styles['animate-arrow-red-flash-2']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-3', styles['animate-arrow-red-flash-3']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) })] })) : (_jsxs("div", { className: "flex w-6 items-center", children: [_jsx("div", { className: twMerge('absolute left-0', styles['animate-arrow-green-flash-1']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-1.5', styles['animate-arrow-green-flash-2']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-3', styles['animate-arrow-green-flash-3']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) })] })), _jsx("div", { className: "text-text-primary-900 text-xs font-semibold", children: formatNumber(jackpot?.maximumJackpotPoolLimit, {
33
28
  currency: localeInfo.currency.code,
34
29
  compact: true,
35
- }) })] })] }), _jsx(Progress.Root, { className: "bg-bg-primary h-2 w-full rounded-full lg:h-4", max: 100, value: getPercentage(Number(jackpot.pool), Number(jackpot.maximumJackpotPoolLimit)), children: _jsx(Progress.Track, { className: "bg-bg-primary h-full overflow-hidden rounded-full", children: _jsx(Progress.Range, { className: "bg-brand-500 relative h-full overflow-hidden rounded-full pl-1.5", children: _jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-start pl-1.5", "aria-hidden": "true", children: arrowImages }) }) }) }), _jsx("div", { className: "mt-1 block text-start text-2xs lg:hidden", children: isPayingOut
30
+ }) })] })] }), _jsx(Progress.Root, { className: "bg-bg-primary h-2 w-full rounded-full lg:h-4", max: 100, value: getPercentage(jackpot.pool, jackpot.maximumJackpotPoolLimit), children: _jsx(Progress.Track, { className: "bg-bg-primary h-full overflow-hidden rounded-full", children: _jsx(Progress.Range, { className: "bg-brand-500 relative h-full overflow-hidden rounded-full pl-1.5", children: _jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-start pl-1.5", "aria-hidden": "true", children: arrowImages }) }) }) }), _jsx("div", { className: "mt-1 block text-start text-2xs lg:hidden", children: isPayingOut
36
31
  ? `The pot has hit ${formatNumber(jackpot?.maximumJackpotPoolLimit, {
37
32
  currency: localeInfo.currency.code,
38
33
  compact: true,
39
34
  })} Play now for your chance to win big! 🔥`
40
- : getAccumulatingJackpotDescription(Number(jackpot?.pool) ?? 0, Number(jackpot?.maximumJackpotPoolLimit) ?? 0) })] }), topJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "bg-bg-primary relative mt-4 flex w-full gap-4 rounded-lg p-4", children: [_jsxs("div", { className: "bg-bg-tertiary relative flex h-18 w-18 items-center justify-center rounded-full", children: [_jsx(User01Icon, { className: "text-text-quarterary-500 size-9" }), _jsx("div", { className: "bg-yellow-400 text-brand-950 border-bg-primary absolute bottom-0 right-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] text-xs font-bold", children: "1st" })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "border-utility-brand-200 bg-utility-brand-50 text-utility-brand-700 flex h-fit w-fit items-center gap-1 rounded-sm border px-2 py-0.5 text-xs font-medium", children: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "Top Payout"] }), _jsx("div", { className: "font-semibold", children: maskDisplayName(topJackpotPayout.member.name) }), _jsx("div", { className: "text-brand-400 text-2xl", children: formatNumber(topJackpotPayout.amount, {
35
+ : getAccumulatingJackpotDescription(Number(jackpot?.pool) ?? 0, Number(jackpot?.maximumJackpotPoolLimit) ?? 0) })] }), topJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "bg-bg-primary relative mt-4 flex w-full gap-4 rounded-lg p-4", children: [_jsxs("div", { className: "bg-bg-tertiary relative flex h-18 w-18 items-center justify-center rounded-full", children: [_jsx(User01Icon, { className: "text-text-quarterary-500 size-9" }), _jsx("div", { className: "bg-yellow-400 text-brand-950 border-bg-primary absolute bottom-0 right-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] text-xs font-bold", children: "1st" })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "border-utility-brand-200 bg-utility-brand-50 text-utility-brand-700 flex h-fit w-fit items-center gap-1 rounded-sm border px-2 py-0.5 text-xs font-medium", children: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "Top Payout"] }), _jsx("div", { className: "font-semibold", children: mask(topJackpotPayout.member.name) }), _jsx("div", { className: "text-brand-400 text-2xl", children: formatNumber(topJackpotPayout.amount, {
41
36
  currency: localeInfo.currency.code,
42
37
  minDecimalPlaces: 2,
43
38
  maxDecimalPlaces: 2,
44
- }) })] })] }) })) : (_jsxs("div", { className: "bg-bg-primary relative mt-4 flex w-full gap-4 rounded-lg p-4", children: [_jsx(Image, { width: 66, height: 87, src: firstPlace, alt: "closeChest", className: "size-full h-auto w-[66px] mix-blend-luminosity" }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "border-utility-brand-200 bg-utility-brand-50 text-utility-brand-700 flex h-fit w-fit items-center gap-1 rounded-sm border px-2 py-0.5 text-xs font-medium", children: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "Top Payout"] }), _jsx("div", { className: "font-semibold", children: "No winners yet" }), _jsx("div", { className: "text-text-secondary-700 text-xs", children: "You could be the first to win the tournament!" })] })] })), _jsx(Button, { variant: "outline", className: twMerge('mt-5.5 px-3.5 py-2.5 text-sm', isDetailsVisible ? 'hidden' : 'flex'), onClick: () => setIsDetailsVisible(!isDetailsVisible), children: _jsxs("div", { className: "flex gap-1.5", children: ["See Details", _jsx(ArrowNarrowDownIcon, { className: "size-5" })] }) })] }), isPayingOut && (_jsx("div", { className: twMerge(styles['light-rays'], 'absolute right-0 top-0 rounded-2xl [--light-rays-top:15%] lg:[--light-rays-top:150px]') }))] }), isDetailsVisible && (_jsxs("div", { children: [_jsxs("div", { className: "z-1 flex-1", children: [_jsxs("div", { className: "flex items-center justify-between p-3", children: [_jsx("div", { className: "flex gap-2", children: _jsx("div", { className: "text-text-primary-900 text-lg font-semibold", children: jackpotPayouts.length ? 'Leaderboard' : 'Starting soon!' }) }), _jsx(JackpotRules, { jackpotRules: jackpot.description })] }), _jsx("div", { children: _jsx("div", { className: "border-gray-200 overflow-hidden", children: _jsxs("table", { className: "w-full", children: [_jsx("thead", { children: _jsxs("tr", { className: "bg-bg-secondary text-text-tertiary-600 h-8 text-center text-xs font-medium", children: [_jsx("th", { className: "w-[52px]", children: "#" }), _jsx("th", { children: "Player" }), _jsx("th", { children: "Multiplier" }), _jsx("th", { children: "Prize" })] }) }), _jsx("tbody", { children: jackpotPayouts.length ? (_jsx(_Fragment, { children: jackpotPayouts.map((jackpotPayout, i) => (_jsxs("tr", { className: "bg-bg-primary text-text-secondary-700 text-center text-sm", children: [_jsx("td", { className: "border-border-secondary h-12 w-[52px] border-t-2", children: i + 1 < 6 ? (_jsxs("div", { className: "relative", children: [_jsx(StarIcon, { className: twMerge('mx-auto size-6.5', starTierStyles[i].starColor) }), _jsx("span", { className: twMerge('absolute inset-0 mt-0.5 flex items-center justify-center text-2xs font-bold', starTierStyles[i].numberColor), children: i + 1 })] })) : (i + 1) }), _jsx("td", { className: "border-border-secondary h-12 border-t-2", children: maskDisplayName(jackpotPayout.member.name) }), _jsxs("td", { className: "border-border-secondary h-12 border-t-2", children: [jackpotPayout.multiplier, "x"] }), _jsx("td", { className: "border-border-secondary text-brand-400 h-12 border-t-2", children: formatNumber(jackpotPayout.amount, {
39
+ }) })] })] }) })) : (_jsxs("div", { className: "bg-bg-primary relative mt-4 flex w-full gap-4 rounded-lg p-4", children: [_jsx(Image, { width: 66, height: 87, src: firstPlace, alt: "closeChest", className: "size-full h-auto w-[66px] mix-blend-luminosity" }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "border-utility-brand-200 bg-utility-brand-50 text-utility-brand-700 flex h-fit w-fit items-center gap-1 rounded-sm border px-2 py-0.5 text-xs font-medium", children: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "Top Payout"] }), _jsx("div", { className: "font-semibold", children: "No winners yet" }), _jsx("div", { className: "text-text-secondary-700 text-xs", children: "You could be the first to win the tournament!" })] })] })), _jsx(Button, { variant: "outline", className: twMerge('mt-5.5 px-3.5 py-2.5 text-sm', isDetailsVisible ? 'hidden' : 'flex'), onClick: () => setIsDetailsVisible(!isDetailsVisible), children: _jsxs("div", { className: "flex gap-1.5", children: ["See Details", _jsx(ArrowNarrowDownIcon, { className: "size-5" })] }) })] }), isPayingOut && (_jsx("div", { className: twMerge(styles['light-rays'], 'absolute right-0 top-0 rounded-2xl [--light-rays-top:15%] lg:[--light-rays-top:150px]') }))] }), isDetailsVisible && (_jsxs("div", { children: [_jsxs("div", { className: "z-1 flex-1", children: [_jsxs("div", { className: "flex items-center justify-between p-3", children: [_jsx("div", { className: "flex gap-2", children: _jsx("div", { className: "text-text-primary-900 text-lg font-semibold", children: jackpotPayouts.length ? 'Leaderboard' : 'Starting soon!' }) }), _jsx(JackpotRules, { jackpotRules: jackpot.description })] }), _jsx("div", { children: _jsx("div", { className: "border-gray-200 overflow-hidden", children: _jsxs("table", { className: "w-full", children: [_jsx("thead", { children: _jsxs("tr", { className: "bg-bg-secondary text-text-tertiary-600 h-8 text-center text-xs font-medium", children: [_jsx("th", { className: "w-[52px]", children: "#" }), _jsx("th", { children: "Player" }), _jsx("th", { children: "Multiplier" }), _jsx("th", { children: "Prize" })] }) }), _jsx("tbody", { children: jackpotPayouts.length ? (_jsx(_Fragment, { children: jackpotPayouts.map((jackpotPayout, i) => (_jsxs("tr", { className: "bg-bg-primary text-text-secondary-700 text-center text-sm", children: [_jsx("td", { className: "border-border-secondary h-12 w-[52px] border-t-2", children: i + 1 < 6 ? (_jsxs("div", { className: "relative", children: [_jsx(StarIcon, { className: twMerge('mx-auto size-6.5', starTierStyles[i].starColor) }), _jsx("span", { className: twMerge('absolute inset-0 mt-0.5 flex items-center justify-center text-2xs font-bold', starTierStyles[i].numberColor), children: i + 1 })] })) : (i + 1) }), _jsx("td", { className: "border-border-secondary h-12 border-t-2", children: mask(jackpotPayout.member.name) }), _jsxs("td", { className: "border-border-secondary h-12 border-t-2", children: [jackpotPayout.multiplier, "x"] }), _jsx("td", { className: "border-border-secondary text-brand-400 h-12 border-t-2", children: formatNumber(jackpotPayout.amount, {
45
40
  currency: localeInfo.currency.code,
46
41
  minDecimalPlaces: 2,
47
42
  maxDecimalPlaces: 2,
@@ -1,4 +1,4 @@
1
- import type { GameProviderData } from '~/types';
1
+ import type { GameProviderData } from '../../types';
2
2
  export interface JackpotsProps {
3
3
  /** @default "Promos" */
4
4
  heading?: string;
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import Image from 'next/image';
4
4
  import { useJackpotsQuery } from '../../client/hooks/index.js';
5
- import closeChest from '~/images/close-chest.png';
5
+ import closeChest from '../../images/close-chest.png';
6
6
  import { JackpotItemDesktop } from './JackpotItemDesktop.js';
7
7
  import { JackpotItemMobile } from './JackpotItemMobile.js';
8
8
  export function Jackpots(props) {
@@ -1,5 +1,5 @@
1
1
  import type { Jackpot } from '@opexa/portal-sdk-core';
2
- import type { GameProviderData } from '~/types';
2
+ import type { GameProviderData } from '../../types';
3
3
  export interface JackpotItemProps {
4
4
  jackpot: Jackpot;
5
5
  gameProviders: GameProviderData[];
@@ -22,7 +22,7 @@ export function useJackpotItemData({ jackpot, gameProviders, }) {
22
22
  const topJackpotPayout = jackpotPayouts[0] ?? [];
23
23
  const enabledJackpotGameProviders = useMemo(() => {
24
24
  const gameProvider = Object.entries(jackpot?.jackpotTurnoverContributionPercentagePerGameProvider ?? {})
25
- .filter(([_, value]) => Number(value) > 0)
25
+ .filter(([, value]) => Number(value) > 0)
26
26
  .map(([key]) => key);
27
27
  return gameProvider;
28
28
  }, [jackpot]);
@@ -1,3 +1,3 @@
1
1
  import type { MessageIcon } from '@opexa/portal-sdk-core';
2
- import { BellRingIcon } from '~/icons';
2
+ import { BellRingIcon } from '../../icons';
3
3
  export declare function getMessageIcon(logo: MessageIcon): typeof BellRingIcon;
@@ -10,17 +10,29 @@ import { FacebookPixel, GoogleRecaptcha } from '../../third-parties/index.js';
10
10
  import { getQueryClient } from '../../utils/index.js';
11
11
  export function PortalProvider__client({ googleAnalyticsId, googleTagManagerId, googleRecaptchaSiteKey, facebookPixelId, children, }) {
12
12
  const queryClient = getQueryClient();
13
- return (_jsxs(QueryClientProvider, { client: queryClient, children: [children, _jsx(Toaster, { toaster: toaster, children: (toast) => (_jsxs(Toast.Root, { className: "shadow-xs border-gray-300 group z-[var(--z-index)] flex h-[var(--height)] w-[860px] max-w-full scale-[var(--scale)] items-center gap-lg rounded-xl border bg-white p-xl opacity-[var(--opacity)] transition-all duration-300 [translate:var(--x)_var(--y)_0]", children: [_jsx("div", { className: twMerge('flex size-9.5 items-center justify-center rounded-full border-2', toast.type === 'error'
14
- ? 'border-red-500/15'
15
- : 'border-green-500/15'), children: _jsx("div", { className: twMerge('flex size-7 items-center justify-center rounded-full border-2', toast.type === 'error'
16
- ? 'border-red-500/35'
17
- : 'border-green-500/35'), children: _jsx(AlertCircleIcon, { className: twMerge('size-5', toast.type === 'error' ? 'text-red-500' : 'text-green-500') }) }) }), _jsxs("div", { className: "grow text-sm leading-none", children: [_jsx(Toast.Title, { className: "font-semibold", children: toast.title
18
- ? toast.title
19
- : toast.type === 'error'
20
- ? 'Error'
21
- : 'Success' }), _jsx(Toast.Description, { className: "text-gray-700 mt-1", children: toast.description
22
- ? toast.description
23
- : toast.type === 'error'
24
- ? 'Something went wrong.'
25
- : 'Operation completed successfully.' })] }), _jsx(Toast.CloseTrigger, { className: "text-gray-400 hover:text-gray-500 self-start", children: _jsx(XIcon, { className: "size-5" }) })] }, toast.id)) }), facebookPixelId && _jsx(FacebookPixel, { fbId: facebookPixelId }), googleAnalyticsId && _jsx(GoogleAnalytics, { gaId: googleAnalyticsId }), googleTagManagerId && _jsx(GoogleTagManager, { gtmId: googleTagManagerId }), googleRecaptchaSiteKey && (_jsx(GoogleRecaptcha, { siteKey: googleRecaptchaSiteKey }))] }));
13
+ return (_jsxs(QueryClientProvider, { client: queryClient, children: [children, _jsx(Toaster, { toaster: toaster, children: (toast) => (_jsxs(Toast.Root, { className: twMerge('group', 'p-xl', 'border', 'border-border-primary', 'bg-bg-primary-alt', 'flex', 'items-start', 'gap-lg', 'w-[21.438rem]', 'lg:w-[1200px]', 'max-w-full', 'rounded-xl', 'shadow-xs', 'h-[var(--height)]', 'z-[var(--z-index)]', 'scale-[var(--scale)]', 'opacity-[var(--opacity)]', '[translate:var(--x)_var(--y)_0]', 'transition-all', 'duration-300'), children: [_jsxs("div", { className: "flex grow flex-col gap-xl lg:flex-row lg:gap-lg", children: [_jsx("div", { className: twMerge('flex size-9.5 items-center justify-center rounded-full border-2', toast.type === 'error'
14
+ ? 'border-text-error-primary/15'
15
+ : toast.type === 'warning'
16
+ ? 'border-text-warning-primary/15'
17
+ : 'border-text-success-primary/15'), children: _jsx("div", { className: twMerge('flex size-7 items-center justify-center rounded-full border-2', toast.type === 'error'
18
+ ? 'border-text-error-primary/35'
19
+ : toast.type === 'warning'
20
+ ? 'border-text-warning-primary/35'
21
+ : 'border-text-success-primary/35'), children: _jsx(AlertCircleIcon, { className: twMerge('size-5', toast.type === 'error'
22
+ ? 'text-text-error-primary'
23
+ : toast.type === 'warning'
24
+ ? 'text-text-warning-primary'
25
+ : 'text-text-success-primary') }) }) }), _jsxs("div", { className: "grow text-sm leading-none", children: [_jsx(Toast.Title, { className: "text-text-secondary-700 font-semibold", children: toast.title
26
+ ? toast.title
27
+ : toast.type === 'error'
28
+ ? 'Error'
29
+ : toast.type === 'warning'
30
+ ? 'Warning'
31
+ : 'Success' }), _jsx(Toast.Description, { className: "text-text-tertiary-600 mt-xs", children: toast.description
32
+ ? toast.description
33
+ : toast.type === 'error'
34
+ ? 'Something went wrong.'
35
+ : toast.type === 'warning'
36
+ ? 'Please be cautious.'
37
+ : 'Operation completed successfully.' })] })] }), _jsx(Toast.CloseTrigger, { className: "text-text-secondary-700", children: _jsx(XIcon, { className: "size-5" }) })] }, toast.id)) }), facebookPixelId && _jsx(FacebookPixel, { fbId: facebookPixelId }), googleAnalyticsId && _jsx(GoogleAnalytics, { gaId: googleAnalyticsId }), googleTagManagerId && _jsx(GoogleTagManager, { gtmId: googleTagManagerId }), googleRecaptchaSiteKey && (_jsx(GoogleRecaptcha, { siteKey: googleRecaptchaSiteKey }))] }));
26
38
  }
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { CalendarIcon, ClockStopWatchIcon, InfoCircleIcon } from '../../../icons/index.js';
3
+ import { useState } from 'react';
4
4
  import { twMerge } from 'tailwind-merge';
5
+ import { CalendarIcon, ClockStopWatchIcon, InfoCircleIcon, } from '../../../icons/index.js';
5
6
  import { Button } from '../../../ui/index.js';
6
- import { useState } from 'react';
7
7
  import { DailyCheckInQuestModal } from './DailyCheckInQuestModal.js';
8
8
  export default function DailyCheckInQuest() {
9
9
  const [showRules, setShowRules] = useState(false);
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Button, Dialog } from '../../../ui/index.js';
4
3
  import { Portal } from '@ark-ui/react';
5
4
  import { XIcon } from '../../../icons/index.js';
5
+ import { Button, Dialog } from '../../../ui/index.js';
6
6
  export function DailyCheckInQuestModal(props) {
7
7
  return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: props.modalState.isOpen, onOpenChange: ({ open }) => props.modalState.setIsOpen(open), closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "min-h-auto mx-auto max-w-[343px] rounded-xl px-4 pb-0 pt-5", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "flex flex-col space-y-5", children: [_jsx("p", { className: "text-text-primary-900 text-[18px] font-semibold", children: "Daily Check-In Rules" }), _jsxs("ul", { className: "text-text-tertiary-600 group list-disc text-wrap pl-4 text-sm font-normal", children: [_jsx("li", { children: "Earn rewards just for checking in each day!" }), _jsx("li", { children: "Stay consistent to unlock special rewards on the 3rd, 5th, and 7th day." }), _jsx("li", { children: "Missing a day will reset your streak, starting again from Day 1." }), _jsx("li", { children: "Each check-in unlocks the next one on the following day." }), _jsx("li", { children: "Successfully check in for 7 consecutive days to complete the quest and reset the cycle." })] })] }), _jsx("div", { className: "pb-4 pt-6", children: _jsx(Button, { onClick: () => props.modalState.setIsOpen(false), children: "Ok" }) })] }) })] }) }));
8
8
  }
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useState } from 'react';
3
4
  import { ClockStopWatchIcon, InfoCircleIcon } from '../../../icons/index.js';
4
5
  import { Button } from '../../../ui/index.js';
5
- import { useState } from 'react';
6
6
  import { WageringQuestModal } from './WageringQuestModal.js';
7
7
  export default function WageringQuest() {
8
8
  const [showRules, setShowRules] = useState(false);
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Button, Dialog } from '../../../ui/index.js';
4
3
  import { Portal } from '@ark-ui/react';
5
4
  import { XIcon } from '../../../icons/index.js';
5
+ import { Button, Dialog } from '../../../ui/index.js';
6
6
  export function WageringQuestModal(props) {
7
7
  return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: props.modalState.isOpen, onOpenChange: ({ open }) => props.modalState.setIsOpen(open), closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "min-h-auto mx-auto max-w-[343px] rounded-xl px-4 pb-0 pt-5", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "flex flex-col space-y-5", children: [_jsx("p", { className: "text-text-primary-900 text-[18px] font-semibold", children: "Slots - total bet Rules" }), _jsxs("ul", { className: "text-text-tertiary-600 group list-disc text-wrap pl-4 text-sm font-normal", children: [_jsx("li", { children: "Earn extra rewards just by playing Slots, every bet counts, win or lose!" }), _jsx("li", { children: "Reach the wagering requirement in bets to complete the quest and claim your reward." })] })] }), _jsx("div", { className: "pb-4 pt-6", children: _jsx(Button, { onClick: () => props.modalState.setIsOpen(false), children: "Ok" }) })] }) })] }) }));
8
8
  }
@@ -8,7 +8,7 @@ import { z } from 'zod';
8
8
  import { useShallow } from 'zustand/shallow';
9
9
  import { useCooldown, useGlobalStore, useLocaleInfo, useMobileNumberParser, useSendVerificationCodeMutation, useSignInMutation, } from '../../client/hooks/index.js';
10
10
  import { toaster } from '../../client/utils/index.js';
11
- import { ArrowLeftIcon, CheckIcon, FacebookIcon, GoogleIcon } from '../../icons/index.js';
11
+ import { ArrowLeftIcon, CheckIcon, FacebookIcon, GoogleIcon, } from '../../icons/index.js';
12
12
  import { Button, Checkbox, Field, PinInput } from '../../ui/index.js';
13
13
  export function SignInForm() {
14
14
  const [step, setStep] = useState(1);