@opexa/portal-components 0.0.282 β†’ 0.0.284

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 (305) hide show
  1. package/dist/components/Banner/Banner.client.d.ts +12 -0
  2. package/dist/components/Banner/Banner.client.js +49 -0
  3. package/dist/components/Banner/Banner.d.ts +3 -11
  4. package/dist/components/Banner/Banner.js +7 -38
  5. package/dist/components/Bonus/Bonus.client.js +1 -1
  6. package/dist/components/Cashback/Cashback.client.js +1 -1
  7. package/dist/components/CustomPromo/CustomPromo.d.ts +1 -1
  8. package/dist/components/CustomPromo/CustomPromo.js +2 -2
  9. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositDetails.js +1 -1
  10. package/dist/components/GameLaunch/GameLaunch.lazy.js +1 -1
  11. package/dist/components/GameLaunch/GameLaunchTrigger.js +8 -9
  12. package/dist/components/GameProviders/GameProviders.d.ts +1 -1
  13. package/dist/components/GameProviders/GameProviders.js +1 -1
  14. package/dist/components/Games/Game.js +1 -2
  15. package/dist/components/GamesSearch/GamesSearch.js +1 -1
  16. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.js +10 -5
  17. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
  18. package/dist/components/Jackpots/JackpotsList/JackpotsList.js +1 -1
  19. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
  20. package/dist/components/Jackpots/JackpotsList/JackpotsListItemDesktop.js +9 -4
  21. package/dist/components/Jackpots/JackpotsList/JackpotsListItemMobile.js +8 -3
  22. package/dist/components/KYC/utils.js +18 -18
  23. package/dist/components/Marquee/Marquee.d.ts +1 -1
  24. package/dist/components/Marquee/Marquee.js +1 -1
  25. package/dist/components/News/News.d.ts +1 -1
  26. package/dist/components/News/News.js +2 -2
  27. package/dist/components/NewsFeed/News.d.ts +1 -1
  28. package/dist/components/NewsFeed/News.js +1 -1
  29. package/dist/components/PortalProvider/FeatureFlag.js +1 -1
  30. package/dist/components/Promo/Promo.client.js +1 -1
  31. package/dist/components/Quests/DailyCheckInQuest.js +1 -1
  32. package/dist/components/Quests/OnboardingQuest.js +1 -1
  33. package/dist/components/Quests/Quests.client.js +1 -1
  34. package/dist/components/Quests/WageringQuest.js +1 -1
  35. package/dist/components/ResponsibleGaming/ResponsibleGaming.lazy.js +1 -1
  36. package/dist/components/Search/Search.lazy.js +1 -1
  37. package/dist/components/SignUp/SignUpDefault/SignUpForm.js +3 -7
  38. package/dist/components/SignUp/SignUpKYC/SignUpKYC.lazy.js +1 -1
  39. package/dist/components/SignUp/SignUpKYC/utils.js +18 -18
  40. package/dist/components/TermsAndConditions/TermsAndConditions.lazy.js +1 -1
  41. package/dist/components/TermsOfUse/TermsOfUse.lazy.js +1 -1
  42. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.js +5 -5
  43. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
  44. package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
  45. package/dist/components/Tournaments/TournamentsList/TournamentsList.js +1 -1
  46. package/dist/components/Tournaments/TournamentsList/TournamentsListItemDesktop.js +5 -5
  47. package/dist/components/Tournaments/TournamentsList/TournamentsListItemMobile.js +5 -5
  48. package/dist/constants/PisoPayBanks.js +43 -43
  49. package/dist/handlers/postTransformIdFrontImage.d.ts +3 -0
  50. package/dist/handlers/postTransformIdFrontImage.js +82 -0
  51. package/dist/handlers/postTransformSelfieImage.d.ts +3 -0
  52. package/dist/handlers/postTransformSelfieImage.js +82 -0
  53. package/dist/services/portal.js +1 -9
  54. package/dist/services/queries.js +2574 -2574
  55. package/dist/styles/theme.css +697 -695
  56. package/dist/ui/AlertDialog/AlertDialog.d.ts +88 -88
  57. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +8 -8
  58. package/dist/ui/Badge/Badge.d.ts +12 -12
  59. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  60. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  61. package/dist/ui/Carousel/Carousel.d.ts +99 -99
  62. package/dist/ui/Carousel/carousel.recipe.d.ts +11 -11
  63. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  64. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  65. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  66. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  67. package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
  68. package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
  69. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  70. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  71. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  72. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  73. package/dist/ui/Dialog/Dialog.d.ts +88 -88
  74. package/dist/ui/Dialog/dialog.recipe.d.ts +8 -8
  75. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  76. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  77. package/dist/ui/Field/Field.d.ts +21 -21
  78. package/dist/ui/Field/field.recipe.d.ts +3 -3
  79. package/dist/ui/Menu/Menu.d.ts +306 -306
  80. package/dist/ui/Menu/menu.recipe.d.ts +17 -17
  81. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  82. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
  83. package/dist/ui/Popover/Popover.d.ts +88 -88
  84. package/dist/ui/Popover/popover.recipe.d.ts +8 -8
  85. package/dist/ui/Progress/Progress.d.ts +27 -27
  86. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  87. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  88. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  89. package/dist/ui/Select/Select.d.ts +45 -45
  90. package/dist/ui/Select/select.recipe.d.ts +3 -3
  91. package/dist/ui/Table/Table.d.ts +21 -21
  92. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  93. package/dist/ui/Table/table.recipe.d.ts +3 -3
  94. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  95. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  96. package/dist/utils/formatNumber.d.ts +1 -1
  97. package/dist/utils/formatNumber.js +3 -2
  98. package/dist/utils/getGameImageUrl.js +4 -3
  99. package/dist/utils/mask.d.ts +10 -0
  100. package/dist/utils/mask.js +10 -0
  101. package/dist/utils/validateFile.d.ts +1 -1
  102. package/dist/utils/validateFile.js +3 -2
  103. package/package.json +163 -163
  104. package/dist/client/hooks/index.d.ts +0 -65
  105. package/dist/client/hooks/index.js +0 -65
  106. package/dist/client/services/index.d.ts +0 -4
  107. package/dist/client/services/index.js +0 -4
  108. package/dist/client/utils/index.d.ts +0 -3
  109. package/dist/client/utils/index.js +0 -3
  110. package/dist/components/CashbackBonus/CashbackBonus.client.d.ts +0 -2
  111. package/dist/components/CashbackBonus/CashbackBonus.client.js +0 -9
  112. package/dist/components/CashbackBonus/CashbackBonus.d.ts +0 -10
  113. package/dist/components/CashbackBonus/CashbackBonus.js +0 -5
  114. package/dist/components/CashbackBonus/index.d.ts +0 -1
  115. package/dist/components/CashbackBonus/index.js +0 -1
  116. package/dist/components/Empty.d.ts +0 -9
  117. package/dist/components/Empty.js +0 -7
  118. package/dist/components/FeatureFlag/FeatureFlag.d.ts +0 -1
  119. package/dist/components/FeatureFlag/FeatureFlag.js +0 -29
  120. package/dist/components/FeatureFlag/index.d.ts +0 -1
  121. package/dist/components/FeatureFlag/index.js +0 -1
  122. package/dist/components/Games/GameContext.d.ts +0 -2
  123. package/dist/components/Games/GameContext.js +0 -2
  124. package/dist/components/InfiniteScroll.d.ts +0 -10
  125. package/dist/components/InfiniteScroll.js +0 -25
  126. package/dist/components/JackpotCounter/JackpotCounter.client.d.ts +0 -2
  127. package/dist/components/JackpotCounter/JackpotCounter.client.js +0 -66
  128. package/dist/components/JackpotCounter/JackpotCounter.d.ts +0 -17
  129. package/dist/components/JackpotCounter/JackpotCounter.js +0 -21
  130. package/dist/components/JackpotCounter/JackpotCounterItem.d.ts +0 -18
  131. package/dist/components/JackpotCounter/JackpotCounterItem.js +0 -109
  132. package/dist/components/JackpotCounter/JackpotCounterItem.module.css +0 -184
  133. package/dist/components/JackpotCounter/index.d.ts +0 -1
  134. package/dist/components/JackpotCounter/index.js +0 -1
  135. package/dist/components/Jackpots/JackpotDesktop.d.ts +0 -1
  136. package/dist/components/Jackpots/JackpotDesktop.js +0 -45
  137. package/dist/components/Jackpots/JackpotGameProviders.d.ts +0 -5
  138. package/dist/components/Jackpots/JackpotGameProviders.js +0 -41
  139. package/dist/components/Jackpots/JackpotItemDesktop.d.ts +0 -9
  140. package/dist/components/Jackpots/JackpotItemDesktop.js +0 -43
  141. package/dist/components/Jackpots/JackpotItemMobile.d.ts +0 -9
  142. package/dist/components/Jackpots/JackpotItemMobile.js +0 -44
  143. package/dist/components/Jackpots/JackpotMobile.d.ts +0 -1
  144. package/dist/components/Jackpots/JackpotMobile.js +0 -46
  145. package/dist/components/Jackpots/JackpotRules.d.ts +0 -5
  146. package/dist/components/Jackpots/JackpotRules.js +0 -11
  147. package/dist/components/Jackpots/Jackpots.client.d.ts +0 -2
  148. package/dist/components/Jackpots/Jackpots.client.js +0 -29
  149. package/dist/components/Jackpots/JackpotsContext.d.ts +0 -4
  150. package/dist/components/Jackpots/JackpotsContext.js +0 -3
  151. package/dist/components/Jackpots/useJackpotData.d.ts +0 -14
  152. package/dist/components/Jackpots/useJackpotData.js +0 -93
  153. package/dist/components/Jackpots/useJackpotItemData.d.ts +0 -20
  154. package/dist/components/Jackpots/useJackpotItemData.js +0 -87
  155. package/dist/components/KYC/AutoOpen.d.ts +0 -1
  156. package/dist/components/KYC/AutoOpen.js +0 -45
  157. package/dist/components/KYC/Header.d.ts +0 -1
  158. package/dist/components/KYC/Header.js +0 -8
  159. package/dist/components/KYC/Step1.d.ts +0 -1
  160. package/dist/components/KYC/Step1.js +0 -13
  161. package/dist/components/KYC/Step2.d.ts +0 -1
  162. package/dist/components/KYC/Step2.js +0 -13
  163. package/dist/components/KYC/Step3.d.ts +0 -1
  164. package/dist/components/KYC/Step3.js +0 -13
  165. package/dist/components/KYC/Step4.d.ts +0 -1
  166. package/dist/components/KYC/Step4.js +0 -7
  167. package/dist/components/KYC/backup/Header.d.ts +0 -1
  168. package/dist/components/KYC/backup/Header.js +0 -8
  169. package/dist/components/KYC/backup/Indicator.d.ts +0 -1
  170. package/dist/components/KYC/backup/Indicator.js +0 -9
  171. package/dist/components/KYC/backup/KYC.d.ts +0 -1
  172. package/dist/components/KYC/backup/KYC.js +0 -14
  173. package/dist/components/KYC/backup/KYC.lazy.d.ts +0 -1
  174. package/dist/components/KYC/backup/KYC.lazy.js +0 -26
  175. package/dist/components/KYC/backup/KYCContext.d.ts +0 -6
  176. package/dist/components/KYC/backup/KYCContext.js +0 -2
  177. package/dist/components/KYC/backup/Step1.d.ts +0 -1
  178. package/dist/components/KYC/backup/Step1.js +0 -13
  179. package/dist/components/KYC/backup/Step2.d.ts +0 -1
  180. package/dist/components/KYC/backup/Step2.js +0 -13
  181. package/dist/components/KYC/backup/Step3.d.ts +0 -1
  182. package/dist/components/KYC/backup/Step3.js +0 -13
  183. package/dist/components/KYC/backup/Step4.d.ts +0 -1
  184. package/dist/components/KYC/backup/Step4.js +0 -7
  185. package/dist/components/KYC/backup/useKYC.d.ts +0 -10
  186. package/dist/components/KYC/backup/useKYC.js +0 -8
  187. package/dist/components/KYC/loadModels.d.ts +0 -1
  188. package/dist/components/KYC/loadModels.js +0 -9
  189. package/dist/components/Messages/Message.d.ts +0 -1
  190. package/dist/components/Messages/Message.js +0 -34
  191. package/dist/components/Messages/MessageContext.d.ts +0 -6
  192. package/dist/components/Messages/MessageContext.js +0 -2
  193. package/dist/components/Messages/MessageItem.d.ts +0 -4
  194. package/dist/components/Messages/MessageItem.js +0 -34
  195. package/dist/components/Messages/MessagePopup.d.ts +0 -1
  196. package/dist/components/Messages/MessagePopup.js +0 -19
  197. package/dist/components/Messages/MessageTrigger.d.ts +0 -8
  198. package/dist/components/Messages/MessageTrigger.js +0 -19
  199. package/dist/components/Promo/PromoContent.d.ts +0 -2
  200. package/dist/components/Promo/PromoContent.js +0 -9
  201. package/dist/components/Promos/PromoCarousel.d.ts +0 -2
  202. package/dist/components/Promos/PromoCarousel.js +0 -41
  203. package/dist/components/Promos/PromoGrid.d.ts +0 -2
  204. package/dist/components/Promos/PromoGrid.js +0 -12
  205. package/dist/components/Promos/PromoItem.d.ts +0 -7
  206. package/dist/components/Promos/PromoItem.js +0 -10
  207. package/dist/components/Quests/CountdownTimer.d.ts +0 -15
  208. package/dist/components/Quests/CountdownTimer.js +0 -33
  209. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +0 -4
  210. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +0 -78
  211. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +0 -8
  212. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +0 -9
  213. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +0 -4
  214. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +0 -4
  215. package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +0 -4
  216. package/dist/components/Quests/WageringQuest/WageringQuest.js +0 -20
  217. package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +0 -9
  218. package/dist/components/Quests/WageringQuest/WageringQuestModal.js +0 -9
  219. package/dist/components/SignUp/SignUp.lazy.d.ts +0 -12
  220. package/dist/components/SignUp/SignUp.lazy.js +0 -18
  221. package/dist/components/SignUp/SignUpContext.d.ts +0 -6
  222. package/dist/components/SignUp/SignUpContext.js +0 -2
  223. package/dist/components/SignUp/SignUpForm.d.ts +0 -1
  224. package/dist/components/SignUp/SignUpForm.js +0 -288
  225. package/dist/components/TournamentCounter/TournamentCounter.client.d.ts +0 -2
  226. package/dist/components/TournamentCounter/TournamentCounter.client.js +0 -50
  227. package/dist/components/TournamentCounter/TournamentCounter.d.ts +0 -8
  228. package/dist/components/TournamentCounter/TournamentCounter.js +0 -21
  229. package/dist/components/TournamentCounter/TournamentCounterItem.d.ts +0 -8
  230. package/dist/components/TournamentCounter/TournamentCounterItem.js +0 -106
  231. package/dist/components/TournamentCounter/index.d.ts +0 -1
  232. package/dist/components/TournamentCounter/index.js +0 -1
  233. package/dist/components/Tournaments/TournamentDesktop.d.ts +0 -1
  234. package/dist/components/Tournaments/TournamentDesktop.js +0 -57
  235. package/dist/components/Tournaments/TournamentGameProviders.d.ts +0 -5
  236. package/dist/components/Tournaments/TournamentGameProviders.js +0 -38
  237. package/dist/components/Tournaments/TournamentItemDesktop.d.ts +0 -7
  238. package/dist/components/Tournaments/TournamentItemDesktop.js +0 -56
  239. package/dist/components/Tournaments/TournamentItemMobile.d.ts +0 -7
  240. package/dist/components/Tournaments/TournamentItemMobile.js +0 -54
  241. package/dist/components/Tournaments/TournamentMobile.d.ts +0 -1
  242. package/dist/components/Tournaments/TournamentMobile.js +0 -55
  243. package/dist/components/Tournaments/TournamentRules.d.ts +0 -5
  244. package/dist/components/Tournaments/TournamentRules.js +0 -11
  245. package/dist/components/Tournaments/Tournaments.client.d.ts +0 -2
  246. package/dist/components/Tournaments/Tournaments.client.js +0 -20
  247. package/dist/components/Tournaments/TournamentsContext.d.ts +0 -4
  248. package/dist/components/Tournaments/TournamentsContext.js +0 -3
  249. package/dist/components/Tournaments/useTournamentData.d.ts +0 -10
  250. package/dist/components/Tournaments/useTournamentData.js +0 -72
  251. package/dist/components/Tournaments/useTournamentItemData.d.ts +0 -16
  252. package/dist/components/Tournaments/useTournamentItemData.js +0 -64
  253. package/dist/components/index.d.ts +0 -33
  254. package/dist/components/index.js +0 -33
  255. package/dist/components/shared/IdDocumentField.client.d.ts +0 -25
  256. package/dist/components/shared/IdDocumentField.client.js +0 -204
  257. package/dist/components/shared/IdDocumentField.d.ts +0 -2
  258. package/dist/components/shared/IdDocumentField.js +0 -11
  259. package/dist/components/shared/SelfieField.client.d.ts +0 -20
  260. package/dist/components/shared/SelfieField.client.js +0 -327
  261. package/dist/components/shared/SelfieField.d.ts +0 -2
  262. package/dist/components/shared/SelfieField.js +0 -11
  263. package/dist/constants/BranchCode.d.ts +0 -4
  264. package/dist/constants/BranchCode.js +0 -42
  265. package/dist/constants/endpoints.d.ts +0 -10
  266. package/dist/constants/endpoints.js +0 -41
  267. package/dist/constants/envVars.d.ts +0 -5
  268. package/dist/constants/envVars.js +0 -28
  269. package/dist/constants/gameProviders.d.ts +0 -76
  270. package/dist/constants/gameProviders.js +0 -361
  271. package/dist/constants/gameTypes.d.ts +0 -3
  272. package/dist/constants/gameTypes.js +0 -64
  273. package/dist/constants/headerKeys.d.ts +0 -2
  274. package/dist/constants/headerKeys.js +0 -2
  275. package/dist/constants/secretQuestions.d.ts +0 -3
  276. package/dist/constants/secretQuestions.js +0 -24
  277. package/dist/constants/storageKeys.d.ts +0 -2
  278. package/dist/constants/storageKeys.js +0 -2
  279. package/dist/handlers.d.ts +0 -43
  280. package/dist/handlers.js +0 -297
  281. package/dist/icons/BellRingIcon.d.ts +0 -2
  282. package/dist/icons/BellRingIcon.js +0 -4
  283. package/dist/icons/index.d.ts +0 -65
  284. package/dist/icons/index.js +0 -65
  285. package/dist/images/hacksaw-gaming.png +0 -0
  286. package/dist/server/services/index.d.ts +0 -4
  287. package/dist/server/services/index.js +0 -4
  288. package/dist/server/utils/index.d.ts +0 -29
  289. package/dist/server/utils/index.js +0 -29
  290. package/dist/ui/Presence.d.ts +0 -2
  291. package/dist/ui/Presence.js +0 -7
  292. package/dist/ui/Prose.d.ts +0 -2
  293. package/dist/ui/Prose.js +0 -5
  294. package/dist/ui/index.d.ts +0 -26
  295. package/dist/ui/index.js +0 -26
  296. package/dist/utils/createErrorFromCode.d.ts +0 -2
  297. package/dist/utils/createErrorFromCode.js +0 -11
  298. package/dist/utils/dataUrlToBlob.d.ts +0 -1
  299. package/dist/utils/dataUrlToBlob.js +0 -11
  300. package/dist/utils/index.d.ts +0 -17
  301. package/dist/utils/index.js +0 -17
  302. package/dist/utils/isMobile.d.ts +0 -5
  303. package/dist/utils/isMobile.js +0 -9
  304. package/dist/utils/resizeImageSize.d.ts +0 -1
  305. package/dist/utils/resizeImageSize.js +0 -6
@@ -0,0 +1,12 @@
1
+ import type { ImageProps } from 'next/image';
2
+ export interface BannerEntry {
3
+ src: ImageProps['src'];
4
+ redirectUrl?: string;
5
+ }
6
+ export interface BannerProps {
7
+ banners: BannerEntry[];
8
+ imageWidth?: number | [mobile: number, desktop: number];
9
+ imageHeight?: number | [mobile: number, desktop: number];
10
+ className?: string;
11
+ }
12
+ export declare function Banner__client(props: BannerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,49 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import emblaCarouselAutoplay from 'embla-carousel-autoplay';
4
+ import useEmblaCarousel, {} from 'embla-carousel-react';
5
+ import isMobile from 'is-mobile';
6
+ import Image from 'next/image';
7
+ import Link from 'next/link';
8
+ import { Fragment, useEffect, useState } from 'react';
9
+ import { twMerge } from 'tailwind-merge';
10
+ import { dataAttr } from '../../utils/dataAttr.js';
11
+ export function Banner__client(props) {
12
+ const [emblaRef, emblaApi] = useEmblaCarousel({
13
+ loop: true,
14
+ align: 'start',
15
+ }, [
16
+ emblaCarouselAutoplay({
17
+ playOnInit: true,
18
+ delay: 5000,
19
+ }),
20
+ ]);
21
+ const [currentIndex, setCurrentIndex] = useState(0);
22
+ useEffect(() => {
23
+ function handler(detail) {
24
+ setCurrentIndex(detail?.selectedScrollSnap() ?? 0);
25
+ }
26
+ emblaApi?.on('scroll', handler);
27
+ emblaApi?.on('init', handler);
28
+ return () => {
29
+ emblaApi?.on('init', handler);
30
+ emblaApi?.off('scroll', handler);
31
+ };
32
+ }, [emblaApi]);
33
+ const imageWidth = !props.imageWidth
34
+ ? [400, 1200]
35
+ : Array.isArray(props.imageWidth)
36
+ ? props.imageWidth
37
+ : [props.imageWidth, props.imageWidth];
38
+ const imageHeight = !props.imageHeight
39
+ ? [225, 300]
40
+ : Array.isArray(props.imageHeight)
41
+ ? props.imageHeight
42
+ : [props.imageHeight, props.imageHeight];
43
+ return (_jsxs("div", { className: twMerge('relative', props.className), children: [_jsx("div", { ref: emblaRef, className: "overflow-hidden", children: _jsx("div", { className: "flex gap-2", children: props.banners.map((banner, index) => {
44
+ const img = (_jsx(Image, { src: banner.src, alt: "", width: isMobile() ? imageWidth[0] : imageWidth[1], height: isMobile() ? imageHeight[0] : imageHeight[1], className: "block h-auto w-full", priority: index === 0 }));
45
+ return (_jsx(Fragment, { children: !banner.redirectUrl ? (_jsx("div", { className: "w-full shrink-0", children: img })) : (_jsx(Link, { href: banner.redirectUrl, className: "block w-full shrink-0", "aria-label": `Open ${banner.redirectUrl}`, children: img })) }, index));
46
+ }) }) }), _jsx("div", { className: "absolute bottom-lg left-1/2 flex w-fit -translate-x-1/2 gap-2", children: props.banners.map((_, index) => (_jsx("button", { type: "button", className: "ui-active:bg-brand-500 bg-gray-300 size-3 shrink-0 rounded-full border border-white transition-all duration-300 ui-active:w-9", onClick: () => {
47
+ emblaApi?.scrollTo(index);
48
+ }, "aria-label": `Go to slide ${index + 1}`, "data-active": dataAttr(index === currentIndex) }, index))) })] }));
49
+ }
@@ -1,11 +1,3 @@
1
- import type { ImageProps } from 'next/image';
2
- interface BannerEntry {
3
- src: ImageProps['src'];
4
- redirectUrl?: string;
5
- }
6
- export interface BannerProps {
7
- banners: BannerEntry[];
8
- className?: string;
9
- }
10
- export declare function Banner(props: BannerProps): import("react/jsx-runtime").JSX.Element;
11
- export {};
1
+ import { type BannerEntry, type BannerProps } from './Banner.client';
2
+ export declare function Banner(props: BannerProps): Promise<import("react/jsx-runtime").JSX.Element>;
3
+ export type { BannerEntry, BannerProps };
@@ -1,39 +1,8 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import emblaCarouselAutoplay from 'embla-carousel-autoplay';
4
- import useEmblaCarousel, {} from 'embla-carousel-react';
5
- import isMobile from 'is-mobile';
6
- import Image from 'next/image';
7
- import Link from 'next/link';
8
- import { Fragment, useEffect, useState } from 'react';
9
- import { twMerge } from 'tailwind-merge';
10
- import { dataAttr } from '../../utils/dataAttr.js';
11
- export function Banner(props) {
12
- const [emblaRef, emblaApi] = useEmblaCarousel({
13
- loop: true,
14
- align: 'start',
15
- }, [
16
- emblaCarouselAutoplay({
17
- playOnInit: true,
18
- delay: 5000,
19
- }),
20
- ]);
21
- const [currentIndex, setCurrentIndex] = useState(0);
22
- useEffect(() => {
23
- function handler(detail) {
24
- setCurrentIndex(detail?.selectedScrollSnap() ?? 0);
25
- }
26
- emblaApi?.on('scroll', handler);
27
- emblaApi?.on('init', handler);
28
- return () => {
29
- emblaApi?.on('init', handler);
30
- emblaApi?.off('scroll', handler);
31
- };
32
- }, [emblaApi]);
33
- return (_jsxs("div", { className: twMerge('relative', props.className), children: [_jsx("div", { ref: emblaRef, className: "overflow-hidden", children: _jsx("div", { className: "flex gap-2", children: props.banners.map((banner, index) => {
34
- const img = (_jsx(Image, { src: banner.src, alt: "", width: isMobile() ? 400 : 1200, height: isMobile() ? 225 : 300, className: "block h-auto w-full", priority: index === 0 }));
35
- return (_jsx(Fragment, { children: !banner.redirectUrl ? (_jsx("div", { className: "w-full shrink-0", children: img })) : (_jsx(Link, { href: banner.redirectUrl, className: "block w-full shrink-0", "aria-label": `Open ${banner.redirectUrl}`, children: img })) }, index));
36
- }) }) }), _jsx("div", { className: "absolute bottom-lg left-1/2 flex w-fit -translate-x-1/2 gap-2", children: props.banners.map((_, index) => (_jsx("button", { type: "button", className: "ui-active:bg-brand-500 bg-gray-300 size-3 shrink-0 rounded-full border border-white transition-all duration-300 ui-active:w-9", onClick: () => {
37
- emblaApi?.scrollTo(index);
38
- }, "aria-label": `Go to slide ${index + 1}`, "data-active": dataAttr(index === currentIndex) }, index))) })] }));
1
+ 'use cache';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { unstable_cacheLife as cacheLife } from 'next/cache';
4
+ import { Banner__client, } from './Banner.client.js';
5
+ export async function Banner(props) {
6
+ cacheLife('days');
7
+ return _jsx(Banner__client, { ...props });
39
8
  }
@@ -13,7 +13,7 @@ import piggyBank from '../../images/piggy-bank.png';
13
13
  import { Badge } from '../../ui/Badge/index.js';
14
14
  import { Collapsible } from '../../ui/Collapsible/index.js';
15
15
  import { Progress } from '../../ui/Progress/index.js';
16
- import { Prose } from '../../ui/Prose.js';
16
+ import { Prose } from '../../ui/Prose/index.js';
17
17
  import { capitalize } from '../../utils/capitalize.js';
18
18
  import { formatNumber } from '../../utils/formatNumber.js';
19
19
  import { parseDecimal } from '../../utils/parseDecimal.js';
@@ -11,7 +11,7 @@ import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
11
11
  import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
12
12
  import { ChevronLeftIcon } from '../../icons/ChevronLeftIcon.js';
13
13
  import { Button } from '../../ui/Button/index.js';
14
- import { Prose } from '../../ui/Prose.js';
14
+ import { Prose } from '../../ui/Prose/index.js';
15
15
  export function Cashback__client(props) {
16
16
  const availablePromosQuery = useAvailablePromosQuery();
17
17
  const cashbackQuery = useCashbackQuery(props.id);
@@ -4,4 +4,4 @@ export interface CustomPromoProps {
4
4
  viewAllPromosUrl?: string;
5
5
  className?: string;
6
6
  }
7
- export declare function CustomPromo(props: CustomPromoProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function CustomPromo(props: CustomPromoProps): Promise<import("react/jsx-runtime").JSX.Element>;
@@ -3,9 +3,9 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
3
3
  import Image from 'next/image';
4
4
  import Link from 'next/link';
5
5
  import { ChevronLeftIcon } from '../../icons/ChevronLeftIcon.js';
6
- import { Prose } from '../../ui/Prose.js';
6
+ import { Prose } from '../../ui/Prose/index.js';
7
7
  import { stripTags } from '../../utils/stripTags.js';
8
- export function CustomPromo(props) {
8
+ export async function CustomPromo(props) {
9
9
  return (_jsxs(_Fragment, { children: [_jsx("meta", { name: "description", content: stripTags(props.promo.description) }), _jsx("meta", { name: "og:title", content: props.promo.name }), _jsx("meta", { name: "og:description", content: stripTags(props.promo.description) }), _jsx("meta", { name: "og:image", content: props.promo.banner }), _jsx("meta", { name: "twitter:title", content: props.promo.name }), _jsx("meta", { name: "twitter:description", content: stripTags(props.promo.description) }), _jsx("meta", { name: "twitter:image", content: props.promo.banner }), _jsx("meta", { name: "twitter:card", content: "summary_large_image" }), _jsxs("div", { className: props.className, children: [_jsxs(Link, { href: props.viewAllPromosUrl ?? '/promos', className: "text-button-tertiary-fg flex w-fit items-center gap-lg text-lg font-semibold", children: [_jsx(ChevronLeftIcon, { className: "size-6" }), "Back to all Promotions"] }), _jsx(Image, { src: props.promo.banner, alt: "", width: 1024, height: 600, priority: true, unoptimized: true, className: "mt-xl h-auto w-full rounded-xl lg:mt-6" }), _jsx("h1", { className: "mt-xl text-2xl font-semibold lg:mt-6 lg:text-3xl", children: props.promo.name }), _jsx(Prose, { className: "mt-2xl lg:mt-6", dangerouslySetInnerHTML: {
10
10
  __html: props.promo.description,
11
11
  } })] })] }));
@@ -15,5 +15,5 @@ export function OnlineBankDepositDetails() {
15
15
  return (_jsxs("div", { className: "bg-bg-primary-alt rounded-lg p-2xl", children: [_jsx(Image, { src: bankIcon, alt: "", width: 52, height: 44.2, className: "mx-auto h-auto w-[3.25rem]" }), _jsx("p", { className: "mt-8 text-center font-semibold", children: "Your unique Virtual Collection Account (VCA) is:" }), _jsx(Clipboard.Root, { value: context.deposit?.vca ?? '', className: "mx-auto mt-6 max-w-[22.5rem]", children: _jsxs(Clipboard.Control, { className: "flex flex-col gap-4 lg:flex-row", children: [_jsx(Clipboard.Input, { className: "lg:grow" }), _jsx(Clipboard.Context, { children: (ctx) => (_jsx(Clipboard.Trigger, { asChild: true, children: _jsx(Button, { fullWidth: false, className: "w-full shrink-0 lg:w-28", children: ctx.copied ? 'Copied' : 'Copy VCA' }) })) })] }) }), _jsx(Instruction, {})] }));
16
16
  }
17
17
  function Instruction() {
18
- return (_jsxs("p", { className: "text-text-tertiary-600 mt-6 text-center text-xs", children: ["Need help using the online bank for payment?", ' ', _jsxs(Dialog.Root, { lazyMount: true, unmountOnExit: true, children: [_jsx(Dialog.Trigger, { className: "text-text-warning-primary-600", children: "See instructions" }), _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "mx-auto w-[calc(100%-2rem)] rounded-lg p-4xl lg:w-[33.625rem] overflow-y-auto", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(Dialog.Body, { children: [_jsxs("div", { className: "flex items-center gap-xl", children: [_jsx("div", { className: "border-border-primary shadow-xs text-gray-700 text-text-secondary-700 flex size-11 items-center justify-center rounded-lg border", children: _jsx(BankIcon, { className: "size-6" }) }), _jsx(Dialog.Title, { className: "text-lg font-semibold", children: "How to Use Online Bank for Payment" })] }), _jsx(Dialog.Description, { className: "mt-5", children: "Follow these simple steps to complete your transaction:" }), _jsxs("ol", { className: "mt-3 list-inside list-decimal space-y-3", children: [_jsx("li", { children: "Click the 'Copy VCA' button to save your unique account number." }), _jsx("li", { children: "Log in to your Online Banking: Open your bank's app or website." }), _jsx("li", { children: "Initiate a Deposit: Choose the option to make a deposit." }), _jsx("li", { children: "Enter VCA: Paste your VCA in the designated field." }), _jsx("li", { children: "Complete Transaction: Follow your bank's prompts to finalize the deposit." })] }), _jsx("p", { className: "mt-3", children: "Note: Please ensure that the deposit amount you enter matches exactly." })] })] }) })] })] })] }));
18
+ return (_jsxs("p", { className: "text-text-tertiary-600 mt-6 text-center text-xs", children: ["Need help using the online bank for payment?", ' ', _jsxs(Dialog.Root, { lazyMount: true, unmountOnExit: true, children: [_jsx(Dialog.Trigger, { className: "text-text-warning-primary-600", children: "See instructions" }), _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "mx-auto w-[calc(100%-2rem)] overflow-y-auto rounded-lg p-4xl lg:w-[33.625rem]", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(Dialog.Body, { children: [_jsxs("div", { className: "flex items-center gap-xl", children: [_jsx("div", { className: "border-border-primary shadow-xs text-gray-700 text-text-secondary-700 flex size-11 items-center justify-center rounded-lg border", children: _jsx(BankIcon, { className: "size-6" }) }), _jsx(Dialog.Title, { className: "text-lg font-semibold", children: "How to Use Online Bank for Payment" })] }), _jsx(Dialog.Description, { className: "mt-5", children: "Follow these simple steps to complete your transaction:" }), _jsxs("ol", { className: "mt-3 list-inside list-decimal space-y-3", children: [_jsx("li", { children: "Click the 'Copy VCA' button to save your unique account number." }), _jsx("li", { children: "Log in to your Online Banking: Open your bank's app or website." }), _jsx("li", { children: "Initiate a Deposit: Choose the option to make a deposit." }), _jsx("li", { children: "Enter VCA: Paste your VCA in the designated field." }), _jsx("li", { children: "Complete Transaction: Follow your bank's prompts to finalize the deposit." })] }), _jsx("p", { className: "mt-3", children: "Note: Please ensure that the deposit amount you enter matches exactly." })] })] }) })] })] })] }));
19
19
  }
@@ -22,7 +22,7 @@ import { AlertDialog } from '../../ui/AlertDialog/index.js';
22
22
  import { Button } from '../../ui/Button/index.js';
23
23
  import { IconButton } from '../../ui/IconButton/index.js';
24
24
  import { Portal } from '../../ui/Portal/index.js';
25
- import { Presence } from '../../ui/Presence.js';
25
+ import { Presence } from '../../ui/Presence/index.js';
26
26
  export function GameLaunch() {
27
27
  const globalStore = useGlobalStore(useShallow((ctx) => ({
28
28
  gameLaunch: ctx.gameLaunch,
@@ -6,8 +6,6 @@ import { useCreateGameSessionMutation } from '../../client/hooks/useCreateGameSe
6
6
  import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
7
7
  import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
8
8
  import { toaster } from '../../client/utils/toaster.js';
9
- import { GAMES_AVAILABLE_3PM_TO_3AM } from '../../utils/gamesAvailable3pmTo3am.js';
10
- import { isBetween3amAnd3pm } from '../../utils/isBetween3amAnd3pm.js';
11
9
  export function GameLaunchTrigger(props) {
12
10
  const sessionQuery = useSessionQuery();
13
11
  const createGameSessionMutation = useCreateGameSessionMutation();
@@ -15,11 +13,17 @@ export function GameLaunchTrigger(props) {
15
13
  signIn: ctx.signIn,
16
14
  gameLaunch: ctx.gameLaunch,
17
15
  })));
16
+ const currentHour = new Date().getHours();
17
+ const between3amAnd3pm = currentHour >= 15 || currentHour < 3;
18
+ const unavailable = !between3amAnd3pm &&
19
+ ['Hwd1wEWHU6Gvfwecuh', 'HwdcKd7wDpwSPHGksq'].includes('reference' in props.game ? props.game.reference : props.game.id);
18
20
  const disabled = sessionQuery.data?.status === 'unauthenticated'
19
21
  ? false
20
- : globalStore.gameLaunch.details.status !== 'WAITING'
22
+ : unavailable
21
23
  ? true
22
- : props.disabled;
24
+ : globalStore.gameLaunch.details.status !== 'WAITING'
25
+ ? true
26
+ : props.disabled;
23
27
  return (_jsx(ark.button, { type: "button", "aria-label": `Play ${props.game.name}`, "data-state": sessionQuery.data?.status === 'unauthenticated'
24
28
  ? globalStore.signIn.open
25
29
  ? 'open'
@@ -27,11 +31,6 @@ export function GameLaunchTrigger(props) {
27
31
  : globalStore.gameLaunch.details.status === 'WAITING'
28
32
  ? 'closed'
29
33
  : 'open', ...props, disabled: disabled, onClick: async (e) => {
30
- // prevent game launch for games that are only available between 3 PM and 3 AM
31
- if (!isBetween3amAnd3pm() &&
32
- GAMES_AVAILABLE_3PM_TO_3AM.includes(props.game.name)) {
33
- return;
34
- }
35
34
  if (sessionQuery.data?.status === 'unauthenticated') {
36
35
  globalStore.signIn.setOpen(true);
37
36
  return props.onClick?.(e);
@@ -1,4 +1,4 @@
1
1
  import { type GameProvidersCarouselProps } from './GameProvidersCarousel';
2
2
  import { type GameProvidersListProps } from './GameProvidersList';
3
3
  export type GameProvidersProps = GameProvidersCarouselProps | GameProvidersListProps;
4
- export declare function GameProviders(props: GameProvidersProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare function GameProviders(props: GameProvidersProps): Promise<import("react/jsx-runtime").JSX.Element>;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { GameProvidersCarousel, } from './GameProvidersCarousel.js';
3
3
  import { GameProvidersList, } from './GameProvidersList.js';
4
- export function GameProviders(props) {
4
+ export async function GameProviders(props) {
5
5
  if (props.layout === 'list') {
6
6
  return _jsx(GameProvidersList, { ...props });
7
7
  }
@@ -9,7 +9,6 @@ import { useUnmarkGameAsFavoriteMutation } from '../../client/hooks/useUnmarkGam
9
9
  import { toaster } from '../../client/utils/toaster.js';
10
10
  import { Star01Icon } from '../../icons/Star01Icon.js';
11
11
  import { getGameImageUrl } from '../../utils/getGameImageUrl.js';
12
- import { getGameName } from '../../utils/getGameName.js';
13
12
  import { GameLaunchTrigger } from '../GameLaunch/index.js';
14
13
  import { BadgeNew } from './BadgeNew.js';
15
14
  import { BadgePopular } from './BadgePopular.js';
@@ -70,5 +69,5 @@ export function Game(props) {
70
69
  : 'text-white') }) })), _jsx(Image, { src: getGameImageUrl({
71
70
  reference: game.reference,
72
71
  provider: game.provider,
73
- }), alt: "", width: 200, height: 200, loading: "lazy", unoptimized: true, className: "aspect-square w-full rounded-t-md object-cover" }), _jsx("span", { className: twMerge('bg-bg-tertiary text-text-primary-brand block w-full truncate rounded-b-md px-2 py-3.5 text-center text-xs font-semibold', classNames.title), children: getGameName(game.reference, game.name) })] }));
72
+ }), alt: "", width: 200, height: 200, loading: "lazy", unoptimized: true, className: "aspect-square w-full rounded-t-md object-cover" }), _jsx("span", { className: twMerge('bg-bg-tertiary text-text-primary-brand block w-full truncate rounded-b-md px-2 py-3.5 text-center text-xs font-semibold', classNames.title), children: game.name })] }));
74
73
  }
@@ -10,7 +10,7 @@ import { SearchLgIcon } from '../../icons/SearchLgIcon.js';
10
10
  import { Button } from '../../ui/Button/index.js';
11
11
  import { Combobox } from '../../ui/Combobox/index.js';
12
12
  import { Portal } from '../../ui/Portal/index.js';
13
- import { Presence } from '../../ui/Presence.js';
13
+ import { Presence } from '../../ui/Presence/index.js';
14
14
  import { getGameImageUrl } from '../../utils/getGameImageUrl.js';
15
15
  import { GameLaunchTrigger } from '../GameLaunch/index.js';
16
16
  export function GamesSearch(props) {
@@ -20,8 +20,8 @@ import openChest from '../../../images/open-chest.png';
20
20
  import * as Tooltip from '../../../ui/Tooltip/Tooltip.js';
21
21
  import { capitalize } from '../../../utils/capitalize.js';
22
22
  import { formatNumber } from '../../../utils/formatNumber.js';
23
- import { getPercentage } from '../../../utils/getPercentage.js';
24
23
  import { mask } from '../../../utils/mask.js';
24
+ import { parseDecimal } from '../../../utils/parseDecimal.js';
25
25
  import { useJackpotsCarouselItemContext } from './JackpotsCarouselContext.js';
26
26
  import styles from './JackpotsCarouselItem.module.css';
27
27
  export function JackpotsCarouselItem({ style, className, viewAllUrl, animate = true, }) {
@@ -58,13 +58,13 @@ export function JackpotsCarouselItem({ style, className, viewAllUrl, animate = t
58
58
  currency: localeInfo.currency.code,
59
59
  minDecimalPlaces: 2,
60
60
  maxDecimalPlaces: 2,
61
- }) })] }), _jsx("div", { className: "min-w-25 hidden lg:block" }), _jsx("div", { className: "z-1 min-w-25 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" }) })] }), latestJackpotPayout.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" }), _jsxs("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: [latestJackpotPayout.multiplier, "x"] })] }), _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" }), "Recent Payout"] }), _jsx("div", { className: "font-semibold", children: mask(latestJackpotPayout.member.name, {
61
+ }) })] }), _jsx("div", { className: "min-w-25 hidden lg:block" }), _jsx("div", { className: "z-1 min-w-25 bottom-[-60] right-0 lg:absolute", children: _jsx(Image, { width: 150, height: 150, src: isPayingOut ? openChest : closeChest, alt: "closeChest", className: "h-25 w-25 lg:h-37.5 lg:w-37.5 size-full p-2" }) })] }), latestJackpotPayout.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" }), _jsxs("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: [latestJackpotPayout.multiplier, "x"] })] }), _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" }), "Recent Payout"] }), _jsx("div", { className: "font-semibold", children: mask(latestJackpotPayout.member.name, {
62
62
  totalCharsCount: 6,
63
63
  }) }), _jsx("div", { className: "text-brand-400 text-2xl", children: formatNumber(latestJackpotPayout.amount, {
64
64
  currency: localeInfo.currency.code,
65
65
  minDecimalPlaces: 2,
66
66
  maxDecimalPlaces: 2,
67
- }) })] })] }) })) : (_jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsx(Image, { width: 66, height: 87, src: firstPlace, alt: "firstPlace", 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" }), "Recent 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!" })] })] }))] }) }) }), _jsxs("div", { className: "mt-3 lg:mt-4", children: [_jsxs("div", { className: "mb-1 flex justify-between", children: [_jsx("div", { className: "text-text-primary-900 text-xs font-semibold", children: formatNumber(0, {
67
+ }) })] })] }) })) : (_jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsx(Image, { width: 66, height: 87, src: firstPlace, alt: "firstPlace", className: "size-full h-auto w-[4.125rem] 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" }), "Recent 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!" })] })] }))] }) }) }), _jsxs("div", { className: "mt-3 lg:mt-4", children: [_jsxs("div", { className: "mb-1 flex justify-between", children: [_jsx("div", { className: "text-text-primary-900 text-xs font-semibold", children: formatNumber(0, {
68
68
  currency: localeInfo.currency.code,
69
69
  compact: true,
70
70
  }) }), _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, {
@@ -85,7 +85,7 @@ export function JackpotsCarouselItem({ style, className, viewAllUrl, animate = t
85
85
  currency: localeInfo.currency.code,
86
86
  compact: true,
87
87
  })} Play now for your chance to win big! πŸ”₯`
88
- : 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 ? 'Recent payouts' : '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: _jsx("tr", { className: "bg-bg-secondary text-text-tertiary-600 h-8 whitespace-nowrap text-left text-xs font-medium", children: [
88
+ : 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, alt: "leaderboardIcon", className: "size-full h-auto w-6" }), _jsx("div", { className: "text-text-primary-900 text-lg font-semibold", children: jackpotPayouts.length ? 'Recent payouts' : '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-[17rem] 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: _jsx("tr", { className: "bg-bg-secondary text-text-tertiary-600 h-8 whitespace-nowrap text-left text-xs font-medium", children: [
89
89
  'Player',
90
90
  'Game Provider',
91
91
  'Multiplier',
@@ -99,7 +99,7 @@ export function JackpotsCarouselItem({ style, className, viewAllUrl, animate = t
99
99
  currency: localeInfo.currency.code,
100
100
  minDecimalPlaces: 2,
101
101
  maxDecimalPlaces: 2,
102
- }) }), _jsx("td", { className: "border-border-secondary h-12 border-t-2 px-4", children: format(new Date(jackpotPayout.dateTimeCreated), 'dd MMM yyyy h:mm a') })] }, i))) })) : (_jsx(_Fragment, { children: Array.from({ length: 10 }).map((_, i) => (_jsxs("tr", { className: "bg-bg-primary text-text-secondary-700 text-sm", children: [_jsx("td", { className: "border-border-secondary h-12 border-t-2", children: "-" }), _jsx("td", { className: "border-border-secondary h-12 border-t-2", children: "-" }), _jsx("td", { className: "border-border-secondary h-12 border-t-2", children: "-" }), _jsx("td", { className: "border-border-secondary h-12 border-t-2", children: "-" }), _jsx("td", { className: "border-border-secondary h-12 border-t-2", children: "-" })] }, i))) })) })] }) }) })] }), isPayingOut && animate && (_jsx("div", { className: twMerge(styles['light-rays'], 'absolute right-0 top-0 rounded-2xl [--light-rays-top:25%] lg:[--light-rays-top:150px]') }))] }));
102
+ }) }), _jsx("td", { className: "border-border-secondary h-12 border-t-2 px-4", children: format(new Date(jackpotPayout.dateTimeCreated), 'dd MMM yyyy h:mm a') })] }, i))) })) : (_jsx(_Fragment, { children: Array.from({ length: 10 }).map((_, i) => (_jsxs("tr", { className: "bg-bg-primary text-text-secondary-700 text-sm", children: [_jsx("td", { className: "border-border-secondary h-12 border-t-2", children: "-" }), _jsx("td", { className: "border-border-secondary h-12 border-t-2", children: "-" }), _jsx("td", { className: "border-border-secondary h-12 border-t-2", children: "-" }), _jsx("td", { className: "border-border-secondary h-12 border-t-2", children: "-" }), _jsx("td", { className: "border-border-secondary h-12 border-t-2", children: "-" })] }, i))) })) })] }) }) })] }), isPayingOut && animate && (_jsx("div", { className: twMerge(styles['light-rays'], 'absolute right-0 top-0 rounded-2xl [--light-rays-top:25%] lg:[--light-rays-top:9.375rem]') }))] }));
103
103
  }
104
104
  const getAccumulatingJackpotDescription = (part, total) => {
105
105
  const percentage = total === 0 ? 0 : (part / total) * 100;
@@ -107,3 +107,8 @@ const getAccumulatingJackpotDescription = (part, total) => {
107
107
  ? 'The jackpot is heating up! Keep playing to stay in the action and watch it grow!'
108
108
  : 'πŸ”₯ It’s about to pop! Stay in the game for your shot at the prize!';
109
109
  };
110
+ function getPercentage(value, total) {
111
+ const v = parseDecimal(value, 0);
112
+ const t = parseDecimal(total, 0);
113
+ return t === 0 ? 0 : (v / t) * 100;
114
+ }