react-native-monflowts 0.0.0-stage → 0.5.1

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 (479) hide show
  1. package/LICENSE +20 -0
  2. package/Monflowts.podspec +22 -0
  3. package/README.md +229 -2
  4. package/android/build.gradle +58 -0
  5. package/android/src/main/AndroidManifest.xml +8 -0
  6. package/android/src/main/java/com/monflowts/MonflowtsAssetsModule.kt +219 -0
  7. package/android/src/main/java/com/monflowts/MonflowtsCrashFeedModule.kt +175 -0
  8. package/android/src/main/java/com/monflowts/MonflowtsHapticModule.kt +170 -0
  9. package/android/src/main/java/com/monflowts/MonflowtsLottieView.kt +96 -0
  10. package/android/src/main/java/com/monflowts/MonflowtsLottieViewManager.kt +53 -0
  11. package/android/src/main/java/com/monflowts/MonflowtsPackage.kt +70 -0
  12. package/android/src/main/java/com/monflowts/MonflowtsSoundModule.kt +132 -0
  13. package/android/src/main/java/com/monflowts/MonflowtsSpeechModule.kt +81 -0
  14. package/android/src/main/java/com/monflowts/MonflowtsSvgView.kt +355 -0
  15. package/android/src/main/java/com/monflowts/MonflowtsSvgViewManager.kt +59 -0
  16. package/android/src/main/java/com/monflowts/MonflowtsWebView.kt +86 -0
  17. package/android/src/main/java/com/monflowts/MonflowtsWebViewManager.kt +33 -0
  18. package/android/src/main/java/com/monflowts/MonflowtsWheelView.kt +98 -0
  19. package/android/src/main/java/com/monflowts/MonflowtsWheelViewManager.kt +46 -0
  20. package/ios/Monflowts-Bridging-Header.h +5 -0
  21. package/ios/MonflowtsAssetsBridge.m +14 -0
  22. package/ios/MonflowtsAssetsModule.swift +217 -0
  23. package/ios/MonflowtsCrashFeedBridge.m +9 -0
  24. package/ios/MonflowtsCrashFeedModule.swift +88 -0
  25. package/ios/MonflowtsHTTP1EventSource.swift +296 -0
  26. package/ios/MonflowtsHapticBridge.m +8 -0
  27. package/ios/MonflowtsHapticModule.swift +55 -0
  28. package/ios/MonflowtsLottieBridge.m +12 -0
  29. package/ios/MonflowtsLottieUIView.swift +95 -0
  30. package/ios/MonflowtsLottieViewManager.swift +13 -0
  31. package/ios/MonflowtsSSEParser.swift +58 -0
  32. package/ios/MonflowtsSoundBridge.m +8 -0
  33. package/ios/MonflowtsSoundModule.swift +100 -0
  34. package/ios/MonflowtsSpeechBridge.m +9 -0
  35. package/ios/MonflowtsSpeechModule.swift +61 -0
  36. package/ios/MonflowtsSvgBridge.m +11 -0
  37. package/ios/MonflowtsSvgUIView.swift +431 -0
  38. package/ios/MonflowtsSvgViewManager.swift +13 -0
  39. package/ios/MonflowtsWebBridge.m +8 -0
  40. package/ios/MonflowtsWebUIView.swift +92 -0
  41. package/ios/MonflowtsWebViewManager.swift +14 -0
  42. package/ios/MonflowtsWheelBridge.m +7 -0
  43. package/ios/MonflowtsWheelUIView.swift +126 -0
  44. package/ios/MonflowtsWheelViewManager.swift +14 -0
  45. package/lib/module/HapticsManager.js +93 -0
  46. package/lib/module/HapticsManager.js.map +1 -0
  47. package/lib/module/HubContent.js +642 -0
  48. package/lib/module/HubContent.js.map +1 -0
  49. package/lib/module/Icons.js +64 -0
  50. package/lib/module/Icons.js.map +1 -0
  51. package/lib/module/MonflowtsHub.js +233 -0
  52. package/lib/module/MonflowtsHub.js.map +1 -0
  53. package/lib/module/NativeLottieView.js +6 -0
  54. package/lib/module/NativeLottieView.js.map +1 -0
  55. package/lib/module/NativeSvgView.js +6 -0
  56. package/lib/module/NativeSvgView.js.map +1 -0
  57. package/lib/module/NativeWebView.js +14 -0
  58. package/lib/module/NativeWebView.js.map +1 -0
  59. package/lib/module/NativeWheelView.js +6 -0
  60. package/lib/module/NativeWheelView.js.map +1 -0
  61. package/lib/module/SoundManager.js +120 -0
  62. package/lib/module/SoundManager.js.map +1 -0
  63. package/lib/module/SpeechManager.js +40 -0
  64. package/lib/module/SpeechManager.js.map +1 -0
  65. package/lib/module/api/client.js +109 -0
  66. package/lib/module/api/client.js.map +1 -0
  67. package/lib/module/api/gameTypes.js +2 -0
  68. package/lib/module/api/gameTypes.js.map +1 -0
  69. package/lib/module/api/http.js +252 -0
  70. package/lib/module/api/http.js.map +1 -0
  71. package/lib/module/api/mutations.js +359 -0
  72. package/lib/module/api/mutations.js.map +1 -0
  73. package/lib/module/api/playerTypes.js +2 -0
  74. package/lib/module/api/playerTypes.js.map +1 -0
  75. package/lib/module/api/queries.js +403 -0
  76. package/lib/module/api/queries.js.map +1 -0
  77. package/lib/module/api/sdkTypes.js +2 -0
  78. package/lib/module/api/sdkTypes.js.map +1 -0
  79. package/lib/module/assets/assetKeys.js +4 -0
  80. package/lib/module/assets/assetKeys.js.map +1 -0
  81. package/lib/module/assets/assetSync.js +61 -0
  82. package/lib/module/assets/assetSync.js.map +1 -0
  83. package/lib/module/assets/nativeAssets.js +25 -0
  84. package/lib/module/assets/nativeAssets.js.map +1 -0
  85. package/lib/module/assets/remote.js +47 -0
  86. package/lib/module/assets/remote.js.map +1 -0
  87. package/lib/module/components/AbandonPolicyNotice.js +200 -0
  88. package/lib/module/components/AbandonPolicyNotice.js.map +1 -0
  89. package/lib/module/components/AnimatedAmount.js +39 -0
  90. package/lib/module/components/AnimatedAmount.js.map +1 -0
  91. package/lib/module/components/CoinFlyOverlay.js +157 -0
  92. package/lib/module/components/CoinFlyOverlay.js.map +1 -0
  93. package/lib/module/components/GameCharacter.js +45 -0
  94. package/lib/module/components/GameCharacter.js.map +1 -0
  95. package/lib/module/components/GameRulesModal.js +279 -0
  96. package/lib/module/components/GameRulesModal.js.map +1 -0
  97. package/lib/module/components/HypeCallout.js +103 -0
  98. package/lib/module/components/HypeCallout.js.map +1 -0
  99. package/lib/module/components/InsufficientFundsOverlay.js +285 -0
  100. package/lib/module/components/InsufficientFundsOverlay.js.map +1 -0
  101. package/lib/module/components/JackpotNearMiss.js +89 -0
  102. package/lib/module/components/JackpotNearMiss.js.map +1 -0
  103. package/lib/module/components/JackpotTeaser.js +341 -0
  104. package/lib/module/components/JackpotTeaser.js.map +1 -0
  105. package/lib/module/components/MonflowtsButton.js +129 -0
  106. package/lib/module/components/MonflowtsButton.js.map +1 -0
  107. package/lib/module/components/MonflowtsChipGroup.js +40 -0
  108. package/lib/module/components/MonflowtsChipGroup.js.map +1 -0
  109. package/lib/module/components/MonflowtsPressable.js +42 -0
  110. package/lib/module/components/MonflowtsPressable.js.map +1 -0
  111. package/lib/module/components/QuitConfirmModal.js +180 -0
  112. package/lib/module/components/QuitConfirmModal.js.map +1 -0
  113. package/lib/module/components/SessionTimer.js +77 -0
  114. package/lib/module/components/SessionTimer.js.map +1 -0
  115. package/lib/module/components/SideDemoTab.js +110 -0
  116. package/lib/module/components/SideDemoTab.js.map +1 -0
  117. package/lib/module/components/StakeInput.js +138 -0
  118. package/lib/module/components/StakeInput.js.map +1 -0
  119. package/lib/module/constants.js +50 -0
  120. package/lib/module/constants.js.map +1 -0
  121. package/lib/module/content.js +21 -0
  122. package/lib/module/content.js.map +1 -0
  123. package/lib/module/effects/EffectBurst.js +56 -0
  124. package/lib/module/effects/EffectBurst.js.map +1 -0
  125. package/lib/module/effects/beaverStates.js +11 -0
  126. package/lib/module/effects/beaverStates.js.map +1 -0
  127. package/lib/module/effects/hypePhrases.js +67 -0
  128. package/lib/module/effects/hypePhrases.js.map +1 -0
  129. package/lib/module/effects/particleAnims.js +17 -0
  130. package/lib/module/effects/particleAnims.js.map +1 -0
  131. package/lib/module/hooks/useAvailableGames.js +29 -0
  132. package/lib/module/hooks/useAvailableGames.js.map +1 -0
  133. package/lib/module/hooks/useCrash.js +137 -0
  134. package/lib/module/hooks/useCrash.js.map +1 -0
  135. package/lib/module/hooks/useCrashFeed.js +49 -0
  136. package/lib/module/hooks/useCrashFeed.js.map +1 -0
  137. package/lib/module/hooks/useCurrency.js +13 -0
  138. package/lib/module/hooks/useCurrency.js.map +1 -0
  139. package/lib/module/hooks/useFairSeed.js +55 -0
  140. package/lib/module/hooks/useFairSeed.js.map +1 -0
  141. package/lib/module/hooks/useGameEvents.js +186 -0
  142. package/lib/module/hooks/useGameEvents.js.map +1 -0
  143. package/lib/module/hooks/useGameHistory.js +55 -0
  144. package/lib/module/hooks/useGameHistory.js.map +1 -0
  145. package/lib/module/hooks/useLeaderboard.js +83 -0
  146. package/lib/module/hooks/useLeaderboard.js.map +1 -0
  147. package/lib/module/hooks/useMines.js +166 -0
  148. package/lib/module/hooks/useMines.js.map +1 -0
  149. package/lib/module/hooks/useNotifications.js +66 -0
  150. package/lib/module/hooks/useNotifications.js.map +1 -0
  151. package/lib/module/hooks/usePlayGame.js +408 -0
  152. package/lib/module/hooks/usePlayGame.js.map +1 -0
  153. package/lib/module/hooks/usePlinko.js +75 -0
  154. package/lib/module/hooks/usePlinko.js.map +1 -0
  155. package/lib/module/hooks/useRaffleDrawState.js +57 -0
  156. package/lib/module/hooks/useRaffleDrawState.js.map +1 -0
  157. package/lib/module/hooks/useRefreshWallet.js +24 -0
  158. package/lib/module/hooks/useRefreshWallet.js.map +1 -0
  159. package/lib/module/hooks/useResponsive.js +16 -0
  160. package/lib/module/hooks/useResponsive.js.map +1 -0
  161. package/lib/module/hooks/useRevealWin.js +120 -0
  162. package/lib/module/hooks/useRevealWin.js.map +1 -0
  163. package/lib/module/hooks/useScreenShake.js +32 -0
  164. package/lib/module/hooks/useScreenShake.js.map +1 -0
  165. package/lib/module/hooks/useWallet.js +77 -0
  166. package/lib/module/hooks/useWallet.js.map +1 -0
  167. package/lib/module/i18n.js +104 -0
  168. package/lib/module/i18n.js.map +1 -0
  169. package/lib/module/index.js +22 -0
  170. package/lib/module/index.js.map +1 -0
  171. package/lib/module/lottieAnimations.js +15 -0
  172. package/lib/module/lottieAnimations.js.map +1 -0
  173. package/lib/module/package.json +1 -0
  174. package/lib/module/stores/assetStore.js +140 -0
  175. package/lib/module/stores/assetStore.js.map +1 -0
  176. package/lib/module/stores/authStore.js +47 -0
  177. package/lib/module/stores/authStore.js.map +1 -0
  178. package/lib/module/stores/gameStore.js +23 -0
  179. package/lib/module/stores/gameStore.js.map +1 -0
  180. package/lib/module/stores/sdkInitStore.js +155 -0
  181. package/lib/module/stores/sdkInitStore.js.map +1 -0
  182. package/lib/module/stores/settingsStore.js +40 -0
  183. package/lib/module/stores/settingsStore.js.map +1 -0
  184. package/lib/module/theme.js +160 -0
  185. package/lib/module/theme.js.map +1 -0
  186. package/lib/module/types.js +4 -0
  187. package/lib/module/types.js.map +1 -0
  188. package/lib/module/utils/apolloError.js +69 -0
  189. package/lib/module/utils/apolloError.js.map +1 -0
  190. package/lib/module/utils/crashMultiplier.js +8 -0
  191. package/lib/module/utils/crashMultiplier.js.map +1 -0
  192. package/lib/module/utils/crashMultiplier.test.js +34 -0
  193. package/lib/module/utils/crashMultiplier.test.js.map +1 -0
  194. package/lib/module/utils/deviceAnalytics.js +51 -0
  195. package/lib/module/utils/deviceAnalytics.js.map +1 -0
  196. package/lib/module/utils/idempotency.js +66 -0
  197. package/lib/module/utils/idempotency.js.map +1 -0
  198. package/lib/module/utils/layout.js +14 -0
  199. package/lib/module/utils/layout.js.map +1 -0
  200. package/lib/module/utils/safeInlineScript.js +12 -0
  201. package/lib/module/utils/safeInlineScript.js.map +1 -0
  202. package/lib/module/utils/sseClient.js +40 -0
  203. package/lib/module/utils/sseClient.js.map +1 -0
  204. package/lib/module/views/DepositSelect.js +275 -0
  205. package/lib/module/views/DepositSelect.js.map +1 -0
  206. package/lib/module/views/Dice.js +111 -0
  207. package/lib/module/views/Dice.js.map +1 -0
  208. package/lib/module/views/DiceBattle.js +815 -0
  209. package/lib/module/views/DiceBattle.js.map +1 -0
  210. package/lib/module/views/DiceLobby.js +577 -0
  211. package/lib/module/views/DiceLobby.js.map +1 -0
  212. package/lib/module/views/FortuneWheel.js +892 -0
  213. package/lib/module/views/FortuneWheel.js.map +1 -0
  214. package/lib/module/views/Freefall.js +808 -0
  215. package/lib/module/views/Freefall.js.map +1 -0
  216. package/lib/module/views/History.js +366 -0
  217. package/lib/module/views/History.js.map +1 -0
  218. package/lib/module/views/Home.js +554 -0
  219. package/lib/module/views/Home.js.map +1 -0
  220. package/lib/module/views/Jetstream.js +889 -0
  221. package/lib/module/views/Jetstream.js.map +1 -0
  222. package/lib/module/views/Leaderboard.js +1206 -0
  223. package/lib/module/views/Leaderboard.js.map +1 -0
  224. package/lib/module/views/MillionaireHunter.js +1697 -0
  225. package/lib/module/views/MillionaireHunter.js.map +1 -0
  226. package/lib/module/views/Minefield.js +826 -0
  227. package/lib/module/views/Minefield.js.map +1 -0
  228. package/lib/module/views/PaymentWebView.js +546 -0
  229. package/lib/module/views/PaymentWebView.js.map +1 -0
  230. package/lib/module/views/PlayerCard.js +184 -0
  231. package/lib/module/views/PlayerCard.js.map +1 -0
  232. package/lib/module/views/Profile.js +531 -0
  233. package/lib/module/views/Profile.js.map +1 -0
  234. package/lib/module/views/RaffleDraw.js +1242 -0
  235. package/lib/module/views/RaffleDraw.js.map +1 -0
  236. package/lib/module/views/RevealWin.js +1267 -0
  237. package/lib/module/views/RevealWin.js.map +1 -0
  238. package/lib/module/views/Splash.js +370 -0
  239. package/lib/module/views/Splash.js.map +1 -0
  240. package/lib/module/views/Success.js +363 -0
  241. package/lib/module/views/Success.js.map +1 -0
  242. package/lib/module/views/TicketShop.js +372 -0
  243. package/lib/module/views/TicketShop.js.map +1 -0
  244. package/lib/module/views/TriviaLobby.js +582 -0
  245. package/lib/module/views/TriviaLobby.js.map +1 -0
  246. package/lib/module/views/TriviaMaster.js +884 -0
  247. package/lib/module/views/TriviaMaster.js.map +1 -0
  248. package/lib/module/views/Wallet.js +622 -0
  249. package/lib/module/views/Wallet.js.map +1 -0
  250. package/lib/module/views/WithdrawFlow.js +445 -0
  251. package/lib/module/views/WithdrawFlow.js.map +1 -0
  252. package/lib/module/views/gridGeometry.js +26 -0
  253. package/lib/module/views/gridGeometry.js.map +1 -0
  254. package/lib/module/views/revealWinHelpers.js +29 -0
  255. package/lib/module/views/revealWinHelpers.js.map +1 -0
  256. package/lib/module/views/ticketBundlePresets.js +29 -0
  257. package/lib/module/views/ticketBundlePresets.js.map +1 -0
  258. package/lib/module/views/triviaHelpers.js +78 -0
  259. package/lib/module/views/triviaHelpers.js.map +1 -0
  260. package/lib/module/voiceClips.js +16 -0
  261. package/lib/module/voiceClips.js.map +1 -0
  262. package/lib/typescript/package.json +1 -0
  263. package/lib/typescript/src/HapticsManager.d.ts +28 -0
  264. package/lib/typescript/src/HapticsManager.d.ts.map +1 -0
  265. package/lib/typescript/src/HubContent.d.ts +7 -0
  266. package/lib/typescript/src/HubContent.d.ts.map +1 -0
  267. package/lib/typescript/src/Icons.d.ts +14 -0
  268. package/lib/typescript/src/Icons.d.ts.map +1 -0
  269. package/lib/typescript/src/MonflowtsHub.d.ts +5 -0
  270. package/lib/typescript/src/MonflowtsHub.d.ts.map +1 -0
  271. package/lib/typescript/src/NativeLottieView.d.ts +13 -0
  272. package/lib/typescript/src/NativeLottieView.d.ts.map +1 -0
  273. package/lib/typescript/src/NativeSvgView.d.ts +12 -0
  274. package/lib/typescript/src/NativeSvgView.d.ts.map +1 -0
  275. package/lib/typescript/src/NativeWebView.d.ts +22 -0
  276. package/lib/typescript/src/NativeWebView.d.ts.map +1 -0
  277. package/lib/typescript/src/NativeWheelView.d.ts +9 -0
  278. package/lib/typescript/src/NativeWheelView.d.ts.map +1 -0
  279. package/lib/typescript/src/SoundManager.d.ts +29 -0
  280. package/lib/typescript/src/SoundManager.d.ts.map +1 -0
  281. package/lib/typescript/src/SpeechManager.d.ts +10 -0
  282. package/lib/typescript/src/SpeechManager.d.ts.map +1 -0
  283. package/lib/typescript/src/api/client.d.ts +7 -0
  284. package/lib/typescript/src/api/client.d.ts.map +1 -0
  285. package/lib/typescript/src/api/gameTypes.d.ts +326 -0
  286. package/lib/typescript/src/api/gameTypes.d.ts.map +1 -0
  287. package/lib/typescript/src/api/http.d.ts +61 -0
  288. package/lib/typescript/src/api/http.d.ts.map +1 -0
  289. package/lib/typescript/src/api/mutations.d.ts +22 -0
  290. package/lib/typescript/src/api/mutations.d.ts.map +1 -0
  291. package/lib/typescript/src/api/playerTypes.d.ts +53 -0
  292. package/lib/typescript/src/api/playerTypes.d.ts.map +1 -0
  293. package/lib/typescript/src/api/queries.d.ts +21 -0
  294. package/lib/typescript/src/api/queries.d.ts.map +1 -0
  295. package/lib/typescript/src/api/sdkTypes.d.ts +87 -0
  296. package/lib/typescript/src/api/sdkTypes.d.ts.map +1 -0
  297. package/lib/typescript/src/assets/assetKeys.d.ts +3 -0
  298. package/lib/typescript/src/assets/assetKeys.d.ts.map +1 -0
  299. package/lib/typescript/src/assets/assetSync.d.ts +41 -0
  300. package/lib/typescript/src/assets/assetSync.d.ts.map +1 -0
  301. package/lib/typescript/src/assets/nativeAssets.d.ts +30 -0
  302. package/lib/typescript/src/assets/nativeAssets.d.ts.map +1 -0
  303. package/lib/typescript/src/assets/remote.d.ts +8 -0
  304. package/lib/typescript/src/assets/remote.d.ts.map +1 -0
  305. package/lib/typescript/src/components/AbandonPolicyNotice.d.ts +16 -0
  306. package/lib/typescript/src/components/AbandonPolicyNotice.d.ts.map +1 -0
  307. package/lib/typescript/src/components/AnimatedAmount.d.ts +12 -0
  308. package/lib/typescript/src/components/AnimatedAmount.d.ts.map +1 -0
  309. package/lib/typescript/src/components/CoinFlyOverlay.d.ts +17 -0
  310. package/lib/typescript/src/components/CoinFlyOverlay.d.ts.map +1 -0
  311. package/lib/typescript/src/components/GameCharacter.d.ts +14 -0
  312. package/lib/typescript/src/components/GameCharacter.d.ts.map +1 -0
  313. package/lib/typescript/src/components/GameRulesModal.d.ts +10 -0
  314. package/lib/typescript/src/components/GameRulesModal.d.ts.map +1 -0
  315. package/lib/typescript/src/components/HypeCallout.d.ts +11 -0
  316. package/lib/typescript/src/components/HypeCallout.d.ts.map +1 -0
  317. package/lib/typescript/src/components/InsufficientFundsOverlay.d.ts +12 -0
  318. package/lib/typescript/src/components/InsufficientFundsOverlay.d.ts.map +1 -0
  319. package/lib/typescript/src/components/JackpotNearMiss.d.ts +8 -0
  320. package/lib/typescript/src/components/JackpotNearMiss.d.ts.map +1 -0
  321. package/lib/typescript/src/components/JackpotTeaser.d.ts +13 -0
  322. package/lib/typescript/src/components/JackpotTeaser.d.ts.map +1 -0
  323. package/lib/typescript/src/components/MonflowtsButton.d.ts +21 -0
  324. package/lib/typescript/src/components/MonflowtsButton.d.ts.map +1 -0
  325. package/lib/typescript/src/components/MonflowtsChipGroup.d.ts +18 -0
  326. package/lib/typescript/src/components/MonflowtsChipGroup.d.ts.map +1 -0
  327. package/lib/typescript/src/components/MonflowtsPressable.d.ts +39 -0
  328. package/lib/typescript/src/components/MonflowtsPressable.d.ts.map +1 -0
  329. package/lib/typescript/src/components/QuitConfirmModal.d.ts +11 -0
  330. package/lib/typescript/src/components/QuitConfirmModal.d.ts.map +1 -0
  331. package/lib/typescript/src/components/SessionTimer.d.ts +14 -0
  332. package/lib/typescript/src/components/SessionTimer.d.ts.map +1 -0
  333. package/lib/typescript/src/components/SideDemoTab.d.ts +18 -0
  334. package/lib/typescript/src/components/SideDemoTab.d.ts.map +1 -0
  335. package/lib/typescript/src/components/StakeInput.d.ts +16 -0
  336. package/lib/typescript/src/components/StakeInput.d.ts.map +1 -0
  337. package/lib/typescript/src/constants.d.ts +21 -0
  338. package/lib/typescript/src/constants.d.ts.map +1 -0
  339. package/lib/typescript/src/content.d.ts +53 -0
  340. package/lib/typescript/src/content.d.ts.map +1 -0
  341. package/lib/typescript/src/effects/EffectBurst.d.ts +20 -0
  342. package/lib/typescript/src/effects/EffectBurst.d.ts.map +1 -0
  343. package/lib/typescript/src/effects/beaverStates.d.ts +4 -0
  344. package/lib/typescript/src/effects/beaverStates.d.ts.map +1 -0
  345. package/lib/typescript/src/effects/hypePhrases.d.ts +11 -0
  346. package/lib/typescript/src/effects/hypePhrases.d.ts.map +1 -0
  347. package/lib/typescript/src/effects/particleAnims.d.ts +9 -0
  348. package/lib/typescript/src/effects/particleAnims.d.ts.map +1 -0
  349. package/lib/typescript/src/hooks/useAvailableGames.d.ts +14 -0
  350. package/lib/typescript/src/hooks/useAvailableGames.d.ts.map +1 -0
  351. package/lib/typescript/src/hooks/useCrash.d.ts +13 -0
  352. package/lib/typescript/src/hooks/useCrash.d.ts.map +1 -0
  353. package/lib/typescript/src/hooks/useCrashFeed.d.ts +22 -0
  354. package/lib/typescript/src/hooks/useCrashFeed.d.ts.map +1 -0
  355. package/lib/typescript/src/hooks/useCurrency.d.ts +6 -0
  356. package/lib/typescript/src/hooks/useCurrency.d.ts.map +1 -0
  357. package/lib/typescript/src/hooks/useFairSeed.d.ts +8 -0
  358. package/lib/typescript/src/hooks/useFairSeed.d.ts.map +1 -0
  359. package/lib/typescript/src/hooks/useGameEvents.d.ts +50 -0
  360. package/lib/typescript/src/hooks/useGameEvents.d.ts.map +1 -0
  361. package/lib/typescript/src/hooks/useGameHistory.d.ts +14 -0
  362. package/lib/typescript/src/hooks/useGameHistory.d.ts.map +1 -0
  363. package/lib/typescript/src/hooks/useLeaderboard.d.ts +71 -0
  364. package/lib/typescript/src/hooks/useLeaderboard.d.ts.map +1 -0
  365. package/lib/typescript/src/hooks/useMines.d.ts +11 -0
  366. package/lib/typescript/src/hooks/useMines.d.ts.map +1 -0
  367. package/lib/typescript/src/hooks/useNotifications.d.ts +26 -0
  368. package/lib/typescript/src/hooks/useNotifications.d.ts.map +1 -0
  369. package/lib/typescript/src/hooks/usePlayGame.d.ts +62 -0
  370. package/lib/typescript/src/hooks/usePlayGame.d.ts.map +1 -0
  371. package/lib/typescript/src/hooks/usePlinko.d.ts +8 -0
  372. package/lib/typescript/src/hooks/usePlinko.d.ts.map +1 -0
  373. package/lib/typescript/src/hooks/useRaffleDrawState.d.ts +50 -0
  374. package/lib/typescript/src/hooks/useRaffleDrawState.d.ts.map +1 -0
  375. package/lib/typescript/src/hooks/useRefreshWallet.d.ts +8 -0
  376. package/lib/typescript/src/hooks/useRefreshWallet.d.ts.map +1 -0
  377. package/lib/typescript/src/hooks/useResponsive.d.ts +8 -0
  378. package/lib/typescript/src/hooks/useResponsive.d.ts.map +1 -0
  379. package/lib/typescript/src/hooks/useRevealWin.d.ts +10 -0
  380. package/lib/typescript/src/hooks/useRevealWin.d.ts.map +1 -0
  381. package/lib/typescript/src/hooks/useScreenShake.d.ts +14 -0
  382. package/lib/typescript/src/hooks/useScreenShake.d.ts.map +1 -0
  383. package/lib/typescript/src/hooks/useWallet.d.ts +23 -0
  384. package/lib/typescript/src/hooks/useWallet.d.ts.map +1 -0
  385. package/lib/typescript/src/i18n.d.ts +29 -0
  386. package/lib/typescript/src/i18n.d.ts.map +1 -0
  387. package/lib/typescript/src/index.d.ts +12 -0
  388. package/lib/typescript/src/index.d.ts.map +1 -0
  389. package/lib/typescript/src/lottieAnimations.d.ts +2 -0
  390. package/lib/typescript/src/lottieAnimations.d.ts.map +1 -0
  391. package/lib/typescript/src/stores/assetStore.d.ts +17 -0
  392. package/lib/typescript/src/stores/assetStore.d.ts.map +1 -0
  393. package/lib/typescript/src/stores/authStore.d.ts +25 -0
  394. package/lib/typescript/src/stores/authStore.d.ts.map +1 -0
  395. package/lib/typescript/src/stores/gameStore.d.ts +14 -0
  396. package/lib/typescript/src/stores/gameStore.d.ts.map +1 -0
  397. package/lib/typescript/src/stores/sdkInitStore.d.ts +38 -0
  398. package/lib/typescript/src/stores/sdkInitStore.d.ts.map +1 -0
  399. package/lib/typescript/src/stores/settingsStore.d.ts +23 -0
  400. package/lib/typescript/src/stores/settingsStore.d.ts.map +1 -0
  401. package/lib/typescript/src/theme.d.ts +149 -0
  402. package/lib/typescript/src/theme.d.ts.map +1 -0
  403. package/lib/typescript/src/types.d.ts +49 -0
  404. package/lib/typescript/src/types.d.ts.map +1 -0
  405. package/lib/typescript/src/utils/apolloError.d.ts +12 -0
  406. package/lib/typescript/src/utils/apolloError.d.ts.map +1 -0
  407. package/lib/typescript/src/utils/crashMultiplier.d.ts +2 -0
  408. package/lib/typescript/src/utils/crashMultiplier.d.ts.map +1 -0
  409. package/lib/typescript/src/utils/crashMultiplier.test.d.ts +2 -0
  410. package/lib/typescript/src/utils/crashMultiplier.test.d.ts.map +1 -0
  411. package/lib/typescript/src/utils/deviceAnalytics.d.ts +3 -0
  412. package/lib/typescript/src/utils/deviceAnalytics.d.ts.map +1 -0
  413. package/lib/typescript/src/utils/idempotency.d.ts +14 -0
  414. package/lib/typescript/src/utils/idempotency.d.ts.map +1 -0
  415. package/lib/typescript/src/utils/layout.d.ts +10 -0
  416. package/lib/typescript/src/utils/layout.d.ts.map +1 -0
  417. package/lib/typescript/src/utils/safeInlineScript.d.ts +5 -0
  418. package/lib/typescript/src/utils/safeInlineScript.d.ts.map +1 -0
  419. package/lib/typescript/src/utils/sseClient.d.ts +5 -0
  420. package/lib/typescript/src/utils/sseClient.d.ts.map +1 -0
  421. package/lib/typescript/src/views/DepositSelect.d.ts +9 -0
  422. package/lib/typescript/src/views/DepositSelect.d.ts.map +1 -0
  423. package/lib/typescript/src/views/Dice.d.ts +10 -0
  424. package/lib/typescript/src/views/Dice.d.ts.map +1 -0
  425. package/lib/typescript/src/views/DiceBattle.d.ts +15 -0
  426. package/lib/typescript/src/views/DiceBattle.d.ts.map +1 -0
  427. package/lib/typescript/src/views/DiceLobby.d.ts +12 -0
  428. package/lib/typescript/src/views/DiceLobby.d.ts.map +1 -0
  429. package/lib/typescript/src/views/FortuneWheel.d.ts +13 -0
  430. package/lib/typescript/src/views/FortuneWheel.d.ts.map +1 -0
  431. package/lib/typescript/src/views/Freefall.d.ts +13 -0
  432. package/lib/typescript/src/views/Freefall.d.ts.map +1 -0
  433. package/lib/typescript/src/views/History.d.ts +7 -0
  434. package/lib/typescript/src/views/History.d.ts.map +1 -0
  435. package/lib/typescript/src/views/Home.d.ts +13 -0
  436. package/lib/typescript/src/views/Home.d.ts.map +1 -0
  437. package/lib/typescript/src/views/Jetstream.d.ts +14 -0
  438. package/lib/typescript/src/views/Jetstream.d.ts.map +1 -0
  439. package/lib/typescript/src/views/Leaderboard.d.ts +8 -0
  440. package/lib/typescript/src/views/Leaderboard.d.ts.map +1 -0
  441. package/lib/typescript/src/views/MillionaireHunter.d.ts +13 -0
  442. package/lib/typescript/src/views/MillionaireHunter.d.ts.map +1 -0
  443. package/lib/typescript/src/views/Minefield.d.ts +13 -0
  444. package/lib/typescript/src/views/Minefield.d.ts.map +1 -0
  445. package/lib/typescript/src/views/PaymentWebView.d.ts +29 -0
  446. package/lib/typescript/src/views/PaymentWebView.d.ts.map +1 -0
  447. package/lib/typescript/src/views/PlayerCard.d.ts +15 -0
  448. package/lib/typescript/src/views/PlayerCard.d.ts.map +1 -0
  449. package/lib/typescript/src/views/Profile.d.ts +9 -0
  450. package/lib/typescript/src/views/Profile.d.ts.map +1 -0
  451. package/lib/typescript/src/views/RaffleDraw.d.ts +12 -0
  452. package/lib/typescript/src/views/RaffleDraw.d.ts.map +1 -0
  453. package/lib/typescript/src/views/RevealWin.d.ts +13 -0
  454. package/lib/typescript/src/views/RevealWin.d.ts.map +1 -0
  455. package/lib/typescript/src/views/Splash.d.ts +10 -0
  456. package/lib/typescript/src/views/Splash.d.ts.map +1 -0
  457. package/lib/typescript/src/views/Success.d.ts +12 -0
  458. package/lib/typescript/src/views/Success.d.ts.map +1 -0
  459. package/lib/typescript/src/views/TicketShop.d.ts +15 -0
  460. package/lib/typescript/src/views/TicketShop.d.ts.map +1 -0
  461. package/lib/typescript/src/views/TriviaLobby.d.ts +12 -0
  462. package/lib/typescript/src/views/TriviaLobby.d.ts.map +1 -0
  463. package/lib/typescript/src/views/TriviaMaster.d.ts +16 -0
  464. package/lib/typescript/src/views/TriviaMaster.d.ts.map +1 -0
  465. package/lib/typescript/src/views/Wallet.d.ts +10 -0
  466. package/lib/typescript/src/views/Wallet.d.ts.map +1 -0
  467. package/lib/typescript/src/views/WithdrawFlow.d.ts +9 -0
  468. package/lib/typescript/src/views/WithdrawFlow.d.ts.map +1 -0
  469. package/lib/typescript/src/views/gridGeometry.d.ts +19 -0
  470. package/lib/typescript/src/views/gridGeometry.d.ts.map +1 -0
  471. package/lib/typescript/src/views/revealWinHelpers.d.ts +15 -0
  472. package/lib/typescript/src/views/revealWinHelpers.d.ts.map +1 -0
  473. package/lib/typescript/src/views/ticketBundlePresets.d.ts +18 -0
  474. package/lib/typescript/src/views/ticketBundlePresets.d.ts.map +1 -0
  475. package/lib/typescript/src/views/triviaHelpers.d.ts +31 -0
  476. package/lib/typescript/src/views/triviaHelpers.d.ts.map +1 -0
  477. package/lib/typescript/src/voiceClips.d.ts +4 -0
  478. package/lib/typescript/src/voiceClips.d.ts.map +1 -0
  479. package/package.json +160 -4
@@ -0,0 +1,1242 @@
1
+ "use strict";
2
+
3
+ import React, { useState, useEffect, useRef, useCallback } from 'react';
4
+ import { View, Text, FlatList, ActivityIndicator, StyleSheet, Animated, AccessibilityInfo } from 'react-native';
5
+ import { COLORS } from "../constants.js";
6
+ import { theme } from "../theme.js";
7
+ import SvgIcon from "../Icons.js";
8
+ import MonflowtsButton from "../components/MonflowtsButton.js";
9
+ import MonflowtsPressable from "../components/MonflowtsPressable.js";
10
+ import GameRulesModal from "../components/GameRulesModal.js";
11
+ import SideDemoTab from "../components/SideDemoTab.js";
12
+ import { useCurrency } from "../hooks/useCurrency.js";
13
+ import { useRaffleDrawState } from "../hooks/useRaffleDrawState.js";
14
+ import { sounds } from "../SoundManager.js";
15
+ import { haptics } from "../HapticsManager.js";
16
+ import { t, formatNumber } from "../i18n.js";
17
+
18
+ // ─── Props ────────────────────────────────────────────────────────────────────
19
+
20
+ // ─── Phase (derived from server data, not stored directly) ────────────────────
21
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
22
+ // A draw newer than this is treated as "just happened" and plays the full
23
+ // unveil animation; anything older (e.g. first opening the screen long after
24
+ // a draw resolved) is shown statically — no replay of a stale reveal.
25
+ const RECENT_DRAW_WINDOW_MS = 3 * 60 * 1000;
26
+
27
+ // ─── Helpers ──────────────────────────────────────────────────────────────────
28
+
29
+ function getInitials(name) {
30
+ const parts = name.trim().split(/\s+/).filter(Boolean);
31
+ if (parts.length >= 2) {
32
+ return ((parts[0]?.[0] ?? '') + (parts[1]?.[0] ?? '')).toUpperCase();
33
+ }
34
+ return (parts[0]?.[0] ?? '?').toUpperCase();
35
+ }
36
+
37
+ /** '2nd' / '3rd' / '4th' … — used to label non-hero raffle winners. */
38
+ function ordinal(n) {
39
+ const rem100 = n % 100;
40
+ if (rem100 >= 11 && rem100 <= 13) return t('raffle.ordinal.th', {
41
+ n
42
+ });
43
+ switch (n % 10) {
44
+ case 1:
45
+ return t('raffle.ordinal.st', {
46
+ n
47
+ });
48
+ case 2:
49
+ return t('raffle.ordinal.nd', {
50
+ n
51
+ });
52
+ case 3:
53
+ return t('raffle.ordinal.rd', {
54
+ n
55
+ });
56
+ default:
57
+ return t('raffle.ordinal.th', {
58
+ n
59
+ });
60
+ }
61
+ }
62
+ function formatAmount(amountKobo, currency) {
63
+ return `${formatNumber(amountKobo / 100)} ${currency}`;
64
+ }
65
+
66
+ // ─── Small presentational pieces ───────────────────────────────────────────────
67
+
68
+ const TimeBox = ({
69
+ value,
70
+ label
71
+ }) => /*#__PURE__*/_jsxs(View, {
72
+ style: styles.timeBox,
73
+ children: [/*#__PURE__*/_jsx(Text, {
74
+ style: styles.timeValue,
75
+ children: value
76
+ }), /*#__PURE__*/_jsx(Text, {
77
+ style: styles.timeLabel,
78
+ children: label
79
+ })]
80
+ });
81
+ const PreDrawHero = ({
82
+ timeLeft,
83
+ jackpotDisplay,
84
+ currency,
85
+ myTickets
86
+ }) => /*#__PURE__*/_jsxs(View, {
87
+ style: styles.heroSection,
88
+ children: [/*#__PURE__*/_jsxs(View, {
89
+ style: styles.countdownSection,
90
+ children: [/*#__PURE__*/_jsx(Text, {
91
+ style: styles.countdownLabel,
92
+ children: t('raffle.drawStartsIn')
93
+ }), /*#__PURE__*/_jsxs(View, {
94
+ style: styles.countdownRow,
95
+ accessible: true,
96
+ accessibilityLabel: t('raffle.drawStartsInA11y', {
97
+ h: timeLeft.h,
98
+ m: timeLeft.m,
99
+ s: timeLeft.s
100
+ }),
101
+ children: [/*#__PURE__*/_jsx(TimeBox, {
102
+ value: timeLeft.h,
103
+ label: t('raffle.hrs')
104
+ }), /*#__PURE__*/_jsx(Text, {
105
+ style: styles.colonText,
106
+ children: ":"
107
+ }), /*#__PURE__*/_jsx(TimeBox, {
108
+ value: timeLeft.m,
109
+ label: t('raffle.min')
110
+ }), /*#__PURE__*/_jsx(Text, {
111
+ style: styles.colonText,
112
+ children: ":"
113
+ }), /*#__PURE__*/_jsx(TimeBox, {
114
+ value: timeLeft.s,
115
+ label: t('raffle.sec')
116
+ })]
117
+ })]
118
+ }), /*#__PURE__*/_jsxs(View, {
119
+ style: styles.jackpotCard,
120
+ children: [/*#__PURE__*/_jsx(Text, {
121
+ style: styles.jackpotLabel,
122
+ children: t('raffle.grandJackpot')
123
+ }), /*#__PURE__*/_jsxs(Text, {
124
+ style: styles.jackpotValue,
125
+ children: [jackpotDisplay, " ", currency]
126
+ }), /*#__PURE__*/_jsx(Text, {
127
+ style: styles.jackpotSub,
128
+ children: t(myTickets === 1 ? 'raffle.yourEntries_one' : 'raffle.yourEntries_other', {
129
+ count: formatNumber(myTickets)
130
+ })
131
+ })]
132
+ })]
133
+ });
134
+ const DrawingNowCard = ({
135
+ jackpotDisplay,
136
+ currency,
137
+ reduceMotion
138
+ }) => {
139
+ const pulse = useRef(new Animated.Value(0.5)).current;
140
+ useEffect(() => {
141
+ if (reduceMotion) return;
142
+ const loop = Animated.loop(Animated.sequence([Animated.timing(pulse, {
143
+ toValue: 1,
144
+ duration: 900,
145
+ useNativeDriver: true
146
+ }), Animated.timing(pulse, {
147
+ toValue: 0.5,
148
+ duration: 900,
149
+ useNativeDriver: true
150
+ })]));
151
+ loop.start();
152
+ return () => loop.stop();
153
+ }, [reduceMotion, pulse]);
154
+ return /*#__PURE__*/_jsxs(View, {
155
+ style: styles.heroSection,
156
+ children: [/*#__PURE__*/_jsxs(View, {
157
+ style: [styles.drawingNowCard, theme.goldShadow],
158
+ accessible: true,
159
+ accessibilityLiveRegion: "polite",
160
+ accessibilityLabel: t('raffle.drawingNowA11y'),
161
+ children: [/*#__PURE__*/_jsx(Animated.View, {
162
+ style: [styles.drawingDot, !reduceMotion && {
163
+ opacity: pulse
164
+ }]
165
+ }), /*#__PURE__*/_jsx(Text, {
166
+ style: styles.drawingNowText,
167
+ children: t('raffle.drawingNow')
168
+ }), /*#__PURE__*/_jsx(Text, {
169
+ style: styles.drawingNowSub,
170
+ children: t('raffle.revealingTheWinner')
171
+ })]
172
+ }), /*#__PURE__*/_jsxs(View, {
173
+ style: styles.jackpotCard,
174
+ children: [/*#__PURE__*/_jsx(Text, {
175
+ style: styles.jackpotLabel,
176
+ children: t('raffle.grandJackpot')
177
+ }), /*#__PURE__*/_jsxs(Text, {
178
+ style: styles.jackpotValue,
179
+ children: [jackpotDisplay, " ", currency]
180
+ })]
181
+ })]
182
+ });
183
+ };
184
+
185
+ // ─── Confetti burst (small particle pop — not a wheel) ─────────────────────────
186
+
187
+ const CONFETTI_COLORS = [COLORS.gold, COLORS.primary, COLORS.blue, COLORS.winGreen];
188
+ const CONFETTI_COUNT = 12;
189
+ const ConfettiBurst = () => {
190
+ const pieces = useRef(Array.from({
191
+ length: CONFETTI_COUNT
192
+ }, (_, i) => ({
193
+ translateX: new Animated.Value(0),
194
+ translateY: new Animated.Value(0),
195
+ opacity: new Animated.Value(1),
196
+ rotate: new Animated.Value(0),
197
+ angle: i / CONFETTI_COUNT * Math.PI * 2 + Math.random() * 0.4,
198
+ color: CONFETTI_COLORS[i % CONFETTI_COLORS.length] ?? COLORS.gold
199
+ }))).current;
200
+ useEffect(() => {
201
+ const anims = pieces.map(p => {
202
+ const distance = 55 + Math.random() * 45;
203
+ const tx = Math.cos(p.angle) * distance;
204
+ const ty = Math.sin(p.angle) * distance - 18;
205
+ return Animated.parallel([Animated.timing(p.translateX, {
206
+ toValue: tx,
207
+ duration: 700,
208
+ useNativeDriver: true
209
+ }), Animated.timing(p.translateY, {
210
+ toValue: ty,
211
+ duration: 700,
212
+ useNativeDriver: true
213
+ }), Animated.timing(p.rotate, {
214
+ toValue: 1,
215
+ duration: 700,
216
+ useNativeDriver: true
217
+ }), Animated.timing(p.opacity, {
218
+ toValue: 0,
219
+ duration: 500,
220
+ delay: 250,
221
+ useNativeDriver: true
222
+ })]);
223
+ });
224
+ Animated.stagger(14, anims).start();
225
+ // One-shot burst on mount — this component is only mounted the instant
226
+ // a fresh reveal completes.
227
+ // eslint-disable-next-line react-hooks/exhaustive-deps
228
+ }, []);
229
+ return /*#__PURE__*/_jsx(View, {
230
+ style: styles.confettiWrap,
231
+ pointerEvents: "none",
232
+ children: pieces.map((p, i) => /*#__PURE__*/_jsx(Animated.View, {
233
+ style: [styles.confettiPiece, {
234
+ backgroundColor: p.color,
235
+ opacity: p.opacity,
236
+ transform: [{
237
+ translateX: p.translateX
238
+ }, {
239
+ translateY: p.translateY
240
+ }, {
241
+ rotate: p.rotate.interpolate({
242
+ inputRange: [0, 1],
243
+ outputRange: ['0deg', '270deg']
244
+ })
245
+ }]
246
+ }]
247
+ }, i))
248
+ });
249
+ };
250
+
251
+ // ─── Winner unveil (suspenseful reveal — NOT a spinning wheel) ─────────────────
252
+
253
+ const WinnerUnveil = ({
254
+ winners,
255
+ currency,
256
+ animate,
257
+ reduceMotion,
258
+ namePool
259
+ }) => {
260
+ const hero = winners[0];
261
+ const others = winners.slice(1);
262
+ const [revealed, setRevealed] = useState(!animate);
263
+ const [cycleName, setCycleName] = useState(namePool[0] ?? hero?.displayName ?? '');
264
+ const cycleFade = useRef(new Animated.Value(1)).current;
265
+ const revealProgress = useRef(new Animated.Value(animate ? 0 : 1)).current;
266
+ const cardScale = useRef(new Animated.Value(animate ? 0.85 : 1)).current;
267
+ const glowPulse = useRef(new Animated.Value(0.6)).current;
268
+
269
+ // Ambient gold glow behind the card while the build-up is running.
270
+ useEffect(() => {
271
+ if (reduceMotion || revealed) return;
272
+ const loop = Animated.loop(Animated.sequence([Animated.timing(glowPulse, {
273
+ toValue: 1,
274
+ duration: 700,
275
+ useNativeDriver: true
276
+ }), Animated.timing(glowPulse, {
277
+ toValue: 0.6,
278
+ duration: 700,
279
+ useNativeDriver: true
280
+ })]));
281
+ loop.start();
282
+ return () => loop.stop();
283
+ }, [reduceMotion, revealed, glowPulse]);
284
+ useEffect(() => {
285
+ if (!animate || !hero) return;
286
+ let cancelled = false;
287
+ const timers = [];
288
+ const finish = () => {
289
+ if (cancelled) return;
290
+ setRevealed(true);
291
+ haptics.trigger('success');
292
+ sounds.playWinChime();
293
+ AccessibilityInfo.announceForAccessibility(`${hero.displayName} won ${formatAmount(hero.amountWonKobo, currency)}!`);
294
+ };
295
+ if (reduceMotion) {
296
+ // Reduced motion: simple fade-in reveal, no cycling/confetti/drumroll.
297
+ Animated.timing(revealProgress, {
298
+ toValue: 1,
299
+ duration: 350,
300
+ useNativeDriver: true
301
+ }).start(finish);
302
+ return () => {
303
+ cancelled = true;
304
+ };
305
+ }
306
+ sounds.playDrawSound();
307
+ const cadence = [90, 110, 140, 180, 230, 300];
308
+ let elapsed = 0;
309
+ if (namePool.length > 1) {
310
+ namePool.forEach((name, i) => {
311
+ elapsed += cadence[Math.min(i, cadence.length - 1)] ?? 300;
312
+ timers.push(setTimeout(() => {
313
+ if (cancelled) return;
314
+ setCycleName(name);
315
+ cycleFade.setValue(0.15);
316
+ Animated.timing(cycleFade, {
317
+ toValue: 1,
318
+ duration: 70,
319
+ useNativeDriver: true
320
+ }).start();
321
+ }, elapsed));
322
+ });
323
+ elapsed += 280;
324
+ } else {
325
+ elapsed = 650;
326
+ }
327
+ timers.push(setTimeout(() => {
328
+ if (cancelled) return;
329
+ Animated.parallel([Animated.timing(revealProgress, {
330
+ toValue: 1,
331
+ duration: 380,
332
+ useNativeDriver: true
333
+ }), Animated.spring(cardScale, {
334
+ toValue: 1,
335
+ friction: 5,
336
+ tension: 60,
337
+ useNativeDriver: true
338
+ })]).start(finish);
339
+ }, elapsed));
340
+ return () => {
341
+ cancelled = true;
342
+ timers.forEach(clearTimeout);
343
+ };
344
+ // Intentionally mount-only: the parent remounts this component (via
345
+ // `key={drawId}`) only when a genuinely new draw appears, so this
346
+ // build-up sequence must run exactly once per instance and never
347
+ // replay on subsequent polls of the same draw.
348
+ // eslint-disable-next-line react-hooks/exhaustive-deps
349
+ }, []);
350
+ if (!hero) return null;
351
+ const amountLabel = formatAmount(hero.amountWonKobo, currency);
352
+ const othersLabel = others.length > 0 ? t('raffle.alsoWon', {
353
+ list: others.map((w, i) => `${ordinal(i + 2)} ${w.displayName}`).join(', ')
354
+ }) : null;
355
+ return /*#__PURE__*/_jsx(View, {
356
+ style: styles.heroSection,
357
+ children: /*#__PURE__*/_jsxs(View, {
358
+ style: styles.unveilWrap,
359
+ children: [!revealed && /*#__PURE__*/_jsxs(Animated.View, {
360
+ style: [styles.buildUpCard, {
361
+ opacity: revealProgress.interpolate({
362
+ inputRange: [0, 1],
363
+ outputRange: [1, 0]
364
+ })
365
+ }],
366
+ accessible: true,
367
+ accessibilityLabel: t('raffle.revealingWinnerA11y'),
368
+ children: [/*#__PURE__*/_jsx(Animated.View, {
369
+ style: [styles.glowRing, {
370
+ opacity: glowPulse
371
+ }]
372
+ }), /*#__PURE__*/_jsxs(View, {
373
+ style: styles.buildUpIconRow,
374
+ children: [/*#__PURE__*/_jsx(SvgIcon, {
375
+ name: "sparkles",
376
+ size: 16,
377
+ color: COLORS.gold
378
+ }), /*#__PURE__*/_jsx(Text, {
379
+ style: styles.buildUpLabel,
380
+ children: t('raffle.revealingWinner')
381
+ }), /*#__PURE__*/_jsx(SvgIcon, {
382
+ name: "sparkles",
383
+ size: 16,
384
+ color: COLORS.gold
385
+ })]
386
+ }), /*#__PURE__*/_jsx(Animated.Text, {
387
+ style: [styles.buildUpName, {
388
+ opacity: cycleFade
389
+ }],
390
+ numberOfLines: 1,
391
+ children: cycleName
392
+ })]
393
+ }), revealed && /*#__PURE__*/_jsxs(Animated.View, {
394
+ style: [styles.winnerCard, theme.goldShadow, {
395
+ opacity: revealProgress,
396
+ transform: [{
397
+ scale: cardScale
398
+ }]
399
+ }],
400
+ accessible: true,
401
+ accessibilityLiveRegion: "polite",
402
+ accessibilityLabel: othersLabel ? t('raffle.winnerA11yWithOthers', {
403
+ name: hero.displayName,
404
+ amount: amountLabel,
405
+ others: othersLabel
406
+ }) : t('raffle.winnerA11y', {
407
+ name: hero.displayName,
408
+ amount: amountLabel
409
+ }),
410
+ children: [animate && !reduceMotion && /*#__PURE__*/_jsx(ConfettiBurst, {}), /*#__PURE__*/_jsx(View, {
411
+ style: styles.winnerTrophyWrap,
412
+ children: /*#__PURE__*/_jsx(SvgIcon, {
413
+ name: "trophy",
414
+ size: 28,
415
+ color: COLORS.gold
416
+ })
417
+ }), /*#__PURE__*/_jsx(Text, {
418
+ style: styles.winnerLabel,
419
+ children: t('raffle.winner')
420
+ }), /*#__PURE__*/_jsx(Text, {
421
+ style: styles.winnerName,
422
+ numberOfLines: 1,
423
+ children: hero.displayName
424
+ }), /*#__PURE__*/_jsx(Text, {
425
+ style: styles.winnerAmount,
426
+ children: amountLabel
427
+ }), othersLabel && /*#__PURE__*/_jsx(Text, {
428
+ style: styles.winnerOthers,
429
+ numberOfLines: 2,
430
+ children: othersLabel
431
+ })]
432
+ })]
433
+ })
434
+ });
435
+ };
436
+
437
+ // ─── Component ────────────────────────────────────────────────────────────────
438
+
439
+ const RaffleDraw = ({
440
+ onNavigate,
441
+ tickets = 0,
442
+ onBack,
443
+ game
444
+ }) => {
445
+ const currency = useCurrency();
446
+ const {
447
+ state,
448
+ loading,
449
+ error,
450
+ refetch
451
+ } = useRaffleDrawState(game?.id);
452
+ const [timeLeft, setTimeLeft] = useState({
453
+ h: '00',
454
+ m: '00',
455
+ s: '00'
456
+ });
457
+ const [drawExpired, setDrawExpired] = useState(false);
458
+ const [rulesVisible, setRulesVisible] = useState(false);
459
+ const [reduceMotion, setReduceMotion] = useState(false);
460
+ const [manualRefreshing, setManualRefreshing] = useState(false);
461
+
462
+ // ── Reduced-motion preference (fall back to a simple fade-in reveal) ──
463
+ useEffect(() => {
464
+ let mounted = true;
465
+ AccessibilityInfo.isReduceMotionEnabled().then(enabled => {
466
+ if (mounted) setReduceMotion(enabled);
467
+ }).catch(() => {});
468
+ const sub = AccessibilityInfo.addEventListener('reduceMotionChanged', enabled => {
469
+ setReduceMotion(enabled);
470
+ });
471
+ return () => {
472
+ mounted = false;
473
+ sub.remove();
474
+ };
475
+ }, []);
476
+
477
+ // ── Derive draw date + jackpot: prefer live server state, fall back to the
478
+ // game's static config while the query is loading/erroring so nothing blanks out ──
479
+ const drawDateStr = state?.drawDate ?? game?.gameplayRules?.drawDate;
480
+ const targetDate = drawDateStr ? new Date(drawDateStr) : null;
481
+ const jackpotKobo = state?.jackpotKobo ?? game?.gameplayRules?.jackpotAmountKobo;
482
+ const jackpotDisplay = jackpotKobo != null ? formatNumber(jackpotKobo / 100) : '--';
483
+ const myTickets = state?.myTicketCount ?? tickets;
484
+ const topHolders = state?.topHolders ?? [];
485
+ const totalActiveEntries = state?.totalActiveEntries ?? 0;
486
+ const latestDraw = state?.latestDraw ?? null;
487
+ useEffect(() => {
488
+ if (!targetDate) {
489
+ setTimeLeft({
490
+ h: '--',
491
+ m: '--',
492
+ s: '--'
493
+ });
494
+ setDrawExpired(false);
495
+ return;
496
+ }
497
+ const tick = () => {
498
+ const diff = targetDate.getTime() - Date.now();
499
+ if (diff <= 0) {
500
+ setTimeLeft({
501
+ h: '00',
502
+ m: '00',
503
+ s: '00'
504
+ });
505
+ setDrawExpired(true);
506
+ return;
507
+ }
508
+ setDrawExpired(false);
509
+ const hrs = Math.floor(diff / 3600000);
510
+ const mins = Math.floor(diff % 3600000 / 60000);
511
+ const secs = Math.floor(diff % 60000 / 1000);
512
+ setTimeLeft({
513
+ h: String(hrs).padStart(2, '0'),
514
+ m: String(mins).padStart(2, '0'),
515
+ s: String(secs).padStart(2, '0')
516
+ });
517
+ };
518
+ tick();
519
+ const timer = setInterval(tick, 1000);
520
+ return () => clearInterval(timer);
521
+ // `targetDate` is deliberately excluded — it's a new Date reference every
522
+ // render (derived from drawDateStr), so depending on it would tear down
523
+ // and recreate the interval on every render instead of only when the
524
+ // underlying date string actually changes.
525
+ // eslint-disable-next-line react-hooks/exhaustive-deps
526
+ }, [drawDateStr]);
527
+
528
+ // ── Phase: latestDraw always wins; otherwise future/unset drawDate = PRE_DRAW,
529
+ // past drawDate = DRAW_DUE. (See ticket verification cases a/b/c.) ──
530
+ const phase = latestDraw ? 'RESULT' : drawExpired ? 'DRAW_DUE' : 'PRE_DRAW';
531
+
532
+ // ── New-draw detection: only animate the unveil for a draw we haven't seen
533
+ // yet in this session AND that happened recently. Computed synchronously
534
+ // during render (not in an effect) so the very first paint of a new draw
535
+ // already reflects the right decision — no flash/replay. ──
536
+ const lastSeenDrawIdRef = useRef(null);
537
+ const animateDecisionRef = useRef(false);
538
+ if (latestDraw && lastSeenDrawIdRef.current !== latestDraw.drawId) {
539
+ lastSeenDrawIdRef.current = latestDraw.drawId;
540
+ const drawnAtMs = latestDraw.drawnAt ? new Date(latestDraw.drawnAt).getTime() : NaN;
541
+ const ageMs = Date.now() - drawnAtMs;
542
+ animateDecisionRef.current = Number.isFinite(ageMs) && ageMs >= 0 && ageMs < RECENT_DRAW_WINDOW_MS;
543
+ }
544
+ const animateThisReveal = !!latestDraw && lastSeenDrawIdRef.current === latestDraw.drawId && animateDecisionRef.current;
545
+ const heroWinner = latestDraw?.winners?.[0] ?? null;
546
+ const highlightPlayerId = heroWinner?.isTopHolder ? heroWinner.playerId : null;
547
+ const namePool = heroWinner ? [...topHolders.slice(0, 5).map(h => h.displayName).filter(n => n !== heroWinner.displayName), heroWinner.displayName] : [];
548
+ const handleManualRefresh = useCallback(() => {
549
+ setManualRefreshing(true);
550
+ Promise.resolve(refetch()).finally(() => setManualRefreshing(false));
551
+ }, [refetch]);
552
+ const renderHolderRow = useCallback(({
553
+ item,
554
+ index
555
+ }) => {
556
+ const isWinnerRow = highlightPlayerId != null && item.playerId === highlightPlayerId;
557
+ return /*#__PURE__*/_jsxs(View, {
558
+ style: [styles.holderRow, theme.glassCard, item.isMe && styles.myHolderRow, isWinnerRow && styles.winnerHolderRow],
559
+ accessible: true,
560
+ accessibilityLabel: [t('raffle.rankA11y', {
561
+ rank: index + 1
562
+ }), item.displayName, item.isMe ? t('raffle.you') : null, isWinnerRow ? t('raffle.winnerTag') : null, t(item.ticketCount === 1 ? 'raffle.ticketCount_one' : 'raffle.ticketCount_other', {
563
+ count: formatNumber(item.ticketCount)
564
+ })].filter(Boolean).join(', '),
565
+ children: [/*#__PURE__*/_jsx(View, {
566
+ style: [styles.rankBadge, isWinnerRow && styles.rankBadgeWinner],
567
+ children: /*#__PURE__*/_jsxs(Text, {
568
+ style: [styles.rankText, isWinnerRow && styles.rankTextWinner],
569
+ children: ["#", index + 1]
570
+ })
571
+ }), /*#__PURE__*/_jsx(View, {
572
+ style: [styles.avatar, item.isMe && styles.myAvatar],
573
+ children: /*#__PURE__*/_jsx(Text, {
574
+ style: styles.avatarText,
575
+ children: getInitials(item.displayName)
576
+ })
577
+ }), /*#__PURE__*/_jsx(View, {
578
+ style: styles.holderInfo,
579
+ children: /*#__PURE__*/_jsxs(View, {
580
+ style: styles.nameRow,
581
+ children: [/*#__PURE__*/_jsx(Text, {
582
+ style: styles.displayName,
583
+ numberOfLines: 1,
584
+ children: item.displayName
585
+ }), item.isMe && /*#__PURE__*/_jsx(View, {
586
+ style: styles.youTag,
587
+ children: /*#__PURE__*/_jsx(Text, {
588
+ style: styles.youTagText,
589
+ allowFontScaling: false,
590
+ children: t('raffle.youTag')
591
+ })
592
+ }), isWinnerRow && /*#__PURE__*/_jsx(View, {
593
+ style: styles.winnerTag,
594
+ children: /*#__PURE__*/_jsx(Text, {
595
+ style: styles.winnerTagText,
596
+ allowFontScaling: false,
597
+ children: t('raffle.winnerTag')
598
+ })
599
+ })]
600
+ })
601
+ }), /*#__PURE__*/_jsxs(View, {
602
+ style: styles.ticketCountWrap,
603
+ children: [/*#__PURE__*/_jsx(Text, {
604
+ style: styles.ticketCountValue,
605
+ children: formatNumber(item.ticketCount)
606
+ }), /*#__PURE__*/_jsx(Text, {
607
+ style: styles.ticketCountLabel,
608
+ children: t('raffle.ticketsLabel')
609
+ })]
610
+ })]
611
+ });
612
+ }, [highlightPlayerId]);
613
+
614
+ // ── No active raffle game at all — graceful empty screen (hooks above still ran) ──
615
+ if (!game) {
616
+ return /*#__PURE__*/_jsxs(View, {
617
+ style: styles.container,
618
+ children: [/*#__PURE__*/_jsxs(View, {
619
+ style: styles.header,
620
+ children: [/*#__PURE__*/_jsx(MonflowtsPressable, {
621
+ style: styles.circleBtn,
622
+ onPress: onBack,
623
+ accessibilityLabel: t('raffle.goBack'),
624
+ accessibilityRole: "button",
625
+ children: /*#__PURE__*/_jsx(Text, {
626
+ style: styles.btnText,
627
+ children: "\u2039"
628
+ })
629
+ }), /*#__PURE__*/_jsxs(View, {
630
+ style: styles.headerCenter,
631
+ children: [/*#__PURE__*/_jsx(Text, {
632
+ style: styles.headerTag,
633
+ children: t('raffle.exclusiveEvent')
634
+ }), /*#__PURE__*/_jsx(Text, {
635
+ style: styles.headerTitle,
636
+ children: t('raffle.superRaffle')
637
+ })]
638
+ }), /*#__PURE__*/_jsx(View, {
639
+ style: styles.headerSpacer
640
+ })]
641
+ }), /*#__PURE__*/_jsxs(View, {
642
+ style: styles.emptyGameContainer,
643
+ children: [/*#__PURE__*/_jsx(SvgIcon, {
644
+ name: "ticket",
645
+ size: 40,
646
+ color: COLORS.slateDark
647
+ }), /*#__PURE__*/_jsx(Text, {
648
+ style: styles.emptyGameText,
649
+ children: t('raffle.noActiveRaffle')
650
+ }), /*#__PURE__*/_jsx(Text, {
651
+ style: styles.emptyGameSub,
652
+ children: t('raffle.checkBackSoon')
653
+ })]
654
+ })]
655
+ });
656
+ }
657
+ return /*#__PURE__*/_jsxs(View, {
658
+ style: styles.container,
659
+ children: [/*#__PURE__*/_jsx(SideDemoTab, {
660
+ enabled: !!game?.demoConfig?.enabled
661
+ }), /*#__PURE__*/_jsxs(View, {
662
+ style: styles.header,
663
+ children: [/*#__PURE__*/_jsx(MonflowtsPressable, {
664
+ style: styles.circleBtn,
665
+ onPress: onBack,
666
+ accessibilityLabel: t('raffle.goBack'),
667
+ accessibilityRole: "button",
668
+ children: /*#__PURE__*/_jsx(Text, {
669
+ style: styles.btnText,
670
+ children: "\u2039"
671
+ })
672
+ }), /*#__PURE__*/_jsxs(View, {
673
+ style: styles.headerCenter,
674
+ children: [/*#__PURE__*/_jsx(Text, {
675
+ style: styles.headerTag,
676
+ children: game?.tagLine || t('raffle.exclusiveEvent')
677
+ }), /*#__PURE__*/_jsx(Text, {
678
+ style: styles.headerTitle,
679
+ children: game?.name || t('raffle.superRaffle')
680
+ })]
681
+ }), /*#__PURE__*/_jsxs(View, {
682
+ style: styles.headerRight,
683
+ children: [/*#__PURE__*/_jsx(View, {
684
+ style: styles.ticketBadge,
685
+ children: /*#__PURE__*/_jsxs(View, {
686
+ style: styles.ticketBadgeInner,
687
+ children: [/*#__PURE__*/_jsx(SvgIcon, {
688
+ name: "ticket",
689
+ size: 14,
690
+ color: "#ffffff"
691
+ }), /*#__PURE__*/_jsx(Text, {
692
+ style: styles.ticketText,
693
+ children: formatNumber(myTickets)
694
+ })]
695
+ })
696
+ }), /*#__PURE__*/_jsx(MonflowtsPressable, {
697
+ style: styles.circleBtn,
698
+ onPress: () => setRulesVisible(true),
699
+ accessibilityLabel: t('raffle.gameRules'),
700
+ accessibilityRole: "button",
701
+ children: /*#__PURE__*/_jsx(Text, {
702
+ style: styles.btnText,
703
+ children: "?"
704
+ })
705
+ })]
706
+ })]
707
+ }), phase === 'RESULT' && latestDraw ? /*#__PURE__*/_jsx(WinnerUnveil, {
708
+ winners: latestDraw.winners,
709
+ currency: currency,
710
+ animate: animateThisReveal,
711
+ reduceMotion: reduceMotion,
712
+ namePool: namePool
713
+ }, latestDraw.drawId) : phase === 'DRAW_DUE' ? /*#__PURE__*/_jsx(DrawingNowCard, {
714
+ jackpotDisplay: jackpotDisplay,
715
+ currency: currency,
716
+ reduceMotion: reduceMotion
717
+ }) : /*#__PURE__*/_jsx(PreDrawHero, {
718
+ timeLeft: timeLeft,
719
+ jackpotDisplay: jackpotDisplay,
720
+ currency: currency,
721
+ myTickets: myTickets
722
+ }), /*#__PURE__*/_jsx(FlatList, {
723
+ data: topHolders,
724
+ keyExtractor: h => h.playerId,
725
+ renderItem: renderHolderRow,
726
+ style: styles.holdersList,
727
+ contentContainerStyle: styles.holdersListContent,
728
+ refreshing: manualRefreshing,
729
+ onRefresh: handleManualRefresh,
730
+ ListHeaderComponent: /*#__PURE__*/_jsxs(View, {
731
+ style: styles.holdersHeader,
732
+ children: [/*#__PURE__*/_jsx(Text, {
733
+ style: styles.holdersTitle,
734
+ accessibilityRole: "header",
735
+ children: t('raffle.topTicketHolders')
736
+ }), totalActiveEntries > 0 && /*#__PURE__*/_jsx(Text, {
737
+ style: styles.holdersSubtitle,
738
+ children: t(totalActiveEntries === 1 ? 'raffle.activeEntries_one' : 'raffle.activeEntries_other', {
739
+ count: formatNumber(totalActiveEntries)
740
+ })
741
+ })]
742
+ }),
743
+ ListEmptyComponent: /*#__PURE__*/_jsx(View, {
744
+ style: styles.holdersEmpty,
745
+ children: loading ? /*#__PURE__*/_jsxs(_Fragment, {
746
+ children: [/*#__PURE__*/_jsx(ActivityIndicator, {
747
+ size: "small",
748
+ color: COLORS.primary
749
+ }), /*#__PURE__*/_jsx(Text, {
750
+ style: styles.holdersEmptyText,
751
+ children: t('raffle.loadingHolders')
752
+ })]
753
+ }) : error ? /*#__PURE__*/_jsx(Text, {
754
+ style: styles.holdersEmptyText,
755
+ children: t('raffle.holdersLoadFailed')
756
+ }) : /*#__PURE__*/_jsx(Text, {
757
+ style: styles.holdersEmptyText,
758
+ children: t('raffle.beTheFirst')
759
+ })
760
+ })
761
+ }), /*#__PURE__*/_jsx(View, {
762
+ style: styles.footer,
763
+ children: /*#__PURE__*/_jsx(MonflowtsButton, {
764
+ title: t('raffle.getMoreTickets'),
765
+ icon: /*#__PURE__*/_jsx(SvgIcon, {
766
+ name: "ticket",
767
+ size: 16,
768
+ color: "#ffffff"
769
+ }),
770
+ onPress: () => onNavigate('TICKET_SHOP'),
771
+ textStyle: styles.actionBtnText
772
+ })
773
+ }), /*#__PURE__*/_jsx(GameRulesModal, {
774
+ visible: rulesVisible,
775
+ onClose: () => setRulesVisible(false),
776
+ gameCode: game?.gameCode ?? 'RAFFLE_DRAW'
777
+ })]
778
+ });
779
+ };
780
+ const styles = StyleSheet.create({
781
+ container: {
782
+ flex: 1,
783
+ backgroundColor: '#0a061a',
784
+ paddingTop: 50
785
+ },
786
+ header: {
787
+ flexDirection: 'row',
788
+ alignItems: 'center',
789
+ justifyContent: 'space-between',
790
+ paddingHorizontal: 20
791
+ },
792
+ headerSpacer: {
793
+ width: 40
794
+ },
795
+ circleBtn: {
796
+ width: 40,
797
+ height: 40,
798
+ borderRadius: 20,
799
+ backgroundColor: COLORS.white05,
800
+ borderWidth: 1,
801
+ borderColor: COLORS.white10,
802
+ alignItems: 'center',
803
+ justifyContent: 'center'
804
+ },
805
+ btnText: {
806
+ color: '#fff',
807
+ fontSize: 22
808
+ },
809
+ headerCenter: {
810
+ alignItems: 'center'
811
+ },
812
+ headerTag: {
813
+ fontSize: 9,
814
+ fontWeight: '900',
815
+ color: COLORS.gold,
816
+ letterSpacing: 3
817
+ },
818
+ headerTitle: {
819
+ fontSize: 18,
820
+ fontWeight: '700',
821
+ color: '#fff'
822
+ },
823
+ headerRight: {
824
+ flexDirection: 'row',
825
+ alignItems: 'center',
826
+ gap: 8
827
+ },
828
+ ticketBadge: {
829
+ backgroundColor: 'rgba(127,19,236,0.2)',
830
+ borderWidth: 1,
831
+ borderColor: 'rgba(127,19,236,0.3)',
832
+ borderRadius: 20,
833
+ paddingHorizontal: 12,
834
+ paddingVertical: 6
835
+ },
836
+ ticketBadgeInner: {
837
+ flexDirection: 'row',
838
+ alignItems: 'center'
839
+ },
840
+ ticketText: {
841
+ color: COLORS.primary,
842
+ fontSize: 13,
843
+ fontWeight: '700',
844
+ marginLeft: 4
845
+ },
846
+ // Hero section (shared wrapper for the three phase-specific heroes)
847
+ heroSection: {
848
+ paddingTop: 20
849
+ },
850
+ // Countdown (PRE_DRAW)
851
+ countdownSection: {
852
+ alignItems: 'center'
853
+ },
854
+ countdownLabel: {
855
+ fontSize: 10,
856
+ fontWeight: '800',
857
+ color: COLORS.slateDark,
858
+ letterSpacing: 3,
859
+ marginBottom: 12
860
+ },
861
+ countdownRow: {
862
+ flexDirection: 'row',
863
+ alignItems: 'center',
864
+ gap: 8
865
+ },
866
+ timeBox: {
867
+ width: 60,
868
+ height: 64,
869
+ backgroundColor: 'rgba(15,23,42,0.6)',
870
+ borderWidth: 1,
871
+ borderColor: COLORS.white10,
872
+ borderRadius: 14,
873
+ alignItems: 'center',
874
+ justifyContent: 'center'
875
+ },
876
+ timeValue: {
877
+ fontSize: 24,
878
+ fontWeight: '800',
879
+ color: '#fff'
880
+ },
881
+ timeLabel: {
882
+ fontSize: 9,
883
+ fontWeight: '700',
884
+ color: COLORS.slateDark,
885
+ letterSpacing: 2,
886
+ marginTop: 2
887
+ },
888
+ colonText: {
889
+ fontSize: 22,
890
+ fontWeight: '800',
891
+ color: 'rgba(255,255,255,0.2)'
892
+ },
893
+ // Jackpot card (PRE_DRAW + DRAW_DUE)
894
+ jackpotCard: {
895
+ marginHorizontal: 20,
896
+ marginTop: 16,
897
+ backgroundColor: 'rgba(127,19,236,0.08)',
898
+ borderWidth: 1,
899
+ borderColor: 'rgba(127,19,236,0.2)',
900
+ borderRadius: 16,
901
+ padding: 18,
902
+ alignItems: 'center'
903
+ },
904
+ jackpotLabel: {
905
+ fontSize: 10,
906
+ fontWeight: '800',
907
+ color: COLORS.primary,
908
+ letterSpacing: 3
909
+ },
910
+ jackpotValue: {
911
+ fontSize: 30,
912
+ fontWeight: '800',
913
+ color: COLORS.gold,
914
+ marginVertical: 4
915
+ },
916
+ jackpotSub: {
917
+ fontSize: 12,
918
+ color: COLORS.slateLight
919
+ },
920
+ // Drawing-now holding state (DRAW_DUE)
921
+ drawingNowCard: {
922
+ marginHorizontal: 20,
923
+ backgroundColor: 'rgba(255,215,0,0.08)',
924
+ borderWidth: 1,
925
+ borderColor: 'rgba(255,215,0,0.35)',
926
+ borderRadius: 16,
927
+ paddingVertical: 18,
928
+ alignItems: 'center',
929
+ gap: 6
930
+ },
931
+ drawingDot: {
932
+ width: 10,
933
+ height: 10,
934
+ borderRadius: 5,
935
+ backgroundColor: COLORS.gold,
936
+ marginBottom: 4
937
+ },
938
+ drawingNowText: {
939
+ fontSize: 15,
940
+ fontWeight: '800',
941
+ color: COLORS.gold,
942
+ letterSpacing: 1
943
+ },
944
+ drawingNowSub: {
945
+ fontSize: 12,
946
+ color: COLORS.slateLight
947
+ },
948
+ // Top Ticket Holders list
949
+ holdersList: {
950
+ flex: 1,
951
+ marginTop: 8
952
+ },
953
+ holdersListContent: {
954
+ paddingHorizontal: 16,
955
+ paddingBottom: 16,
956
+ flexGrow: 1
957
+ },
958
+ holdersHeader: {
959
+ paddingTop: 14,
960
+ paddingBottom: 8
961
+ },
962
+ holdersTitle: {
963
+ fontSize: 11,
964
+ fontWeight: '800',
965
+ color: COLORS.slateLight,
966
+ letterSpacing: 2
967
+ },
968
+ holdersSubtitle: {
969
+ fontSize: 11,
970
+ color: COLORS.slateDark,
971
+ marginTop: 2
972
+ },
973
+ holdersEmpty: {
974
+ alignItems: 'center',
975
+ paddingTop: 40,
976
+ gap: 10
977
+ },
978
+ holdersEmptyText: {
979
+ fontSize: 13,
980
+ color: COLORS.slateLight,
981
+ textAlign: 'center'
982
+ },
983
+ holderRow: {
984
+ flexDirection: 'row',
985
+ alignItems: 'center',
986
+ padding: 12,
987
+ marginBottom: 8,
988
+ gap: 10
989
+ },
990
+ myHolderRow: {
991
+ borderColor: COLORS.primary,
992
+ backgroundColor: 'rgba(127,19,236,0.12)',
993
+ shadowColor: COLORS.primary,
994
+ shadowOffset: {
995
+ width: 0,
996
+ height: 0
997
+ },
998
+ shadowOpacity: 0.3,
999
+ shadowRadius: 8
1000
+ },
1001
+ winnerHolderRow: {
1002
+ borderColor: COLORS.gold,
1003
+ backgroundColor: 'rgba(255,215,0,0.1)',
1004
+ shadowColor: COLORS.gold,
1005
+ shadowOffset: {
1006
+ width: 0,
1007
+ height: 0
1008
+ },
1009
+ shadowOpacity: 0.4,
1010
+ shadowRadius: 10
1011
+ },
1012
+ rankBadge: {
1013
+ width: 36,
1014
+ height: 28,
1015
+ borderRadius: 8,
1016
+ borderWidth: 1,
1017
+ borderColor: COLORS.white10,
1018
+ alignItems: 'center',
1019
+ justifyContent: 'center'
1020
+ },
1021
+ rankBadgeWinner: {
1022
+ borderColor: COLORS.gold
1023
+ },
1024
+ rankText: {
1025
+ fontSize: 11,
1026
+ fontWeight: '800',
1027
+ color: COLORS.slateLight
1028
+ },
1029
+ rankTextWinner: {
1030
+ color: COLORS.gold
1031
+ },
1032
+ avatar: {
1033
+ width: 36,
1034
+ height: 36,
1035
+ borderRadius: 18,
1036
+ backgroundColor: 'rgba(127,19,236,0.15)',
1037
+ borderWidth: 1,
1038
+ borderColor: 'rgba(127,19,236,0.3)',
1039
+ alignItems: 'center',
1040
+ justifyContent: 'center'
1041
+ },
1042
+ myAvatar: {
1043
+ backgroundColor: 'rgba(127,19,236,0.35)',
1044
+ borderColor: COLORS.primary
1045
+ },
1046
+ avatarText: {
1047
+ fontSize: 12,
1048
+ fontWeight: '800',
1049
+ color: '#fff'
1050
+ },
1051
+ holderInfo: {
1052
+ flex: 1
1053
+ },
1054
+ nameRow: {
1055
+ flexDirection: 'row',
1056
+ alignItems: 'center',
1057
+ gap: 6
1058
+ },
1059
+ displayName: {
1060
+ fontSize: 14,
1061
+ fontWeight: '600',
1062
+ color: '#fff',
1063
+ flexShrink: 1
1064
+ },
1065
+ youTag: {
1066
+ backgroundColor: COLORS.primary,
1067
+ borderRadius: 4,
1068
+ paddingHorizontal: 5,
1069
+ paddingVertical: 1
1070
+ },
1071
+ youTagText: {
1072
+ fontSize: 8,
1073
+ fontWeight: '900',
1074
+ color: '#fff',
1075
+ letterSpacing: 1
1076
+ },
1077
+ winnerTag: {
1078
+ backgroundColor: COLORS.gold,
1079
+ borderRadius: 4,
1080
+ paddingHorizontal: 5,
1081
+ paddingVertical: 1
1082
+ },
1083
+ winnerTagText: {
1084
+ fontSize: 8,
1085
+ fontWeight: '900',
1086
+ color: COLORS.navy,
1087
+ letterSpacing: 1
1088
+ },
1089
+ ticketCountWrap: {
1090
+ alignItems: 'flex-end'
1091
+ },
1092
+ ticketCountValue: {
1093
+ fontSize: 15,
1094
+ fontWeight: '800',
1095
+ color: '#fff'
1096
+ },
1097
+ ticketCountLabel: {
1098
+ fontSize: 8,
1099
+ fontWeight: '700',
1100
+ color: COLORS.slateDark,
1101
+ letterSpacing: 1
1102
+ },
1103
+ // Winner unveil (RESULT)
1104
+ unveilWrap: {
1105
+ marginHorizontal: 20,
1106
+ minHeight: 160,
1107
+ alignItems: 'stretch',
1108
+ justifyContent: 'center'
1109
+ },
1110
+ buildUpCard: {
1111
+ backgroundColor: 'rgba(15,23,42,0.7)',
1112
+ borderWidth: 1,
1113
+ borderColor: 'rgba(255,215,0,0.25)',
1114
+ borderRadius: 18,
1115
+ paddingVertical: 28,
1116
+ alignItems: 'center',
1117
+ justifyContent: 'center',
1118
+ overflow: 'hidden'
1119
+ },
1120
+ glowRing: {
1121
+ position: 'absolute',
1122
+ width: 140,
1123
+ height: 140,
1124
+ borderRadius: 70,
1125
+ backgroundColor: 'rgba(255,215,0,0.12)'
1126
+ },
1127
+ buildUpIconRow: {
1128
+ flexDirection: 'row',
1129
+ alignItems: 'center',
1130
+ gap: 8,
1131
+ marginBottom: 10
1132
+ },
1133
+ buildUpLabel: {
1134
+ fontSize: 11,
1135
+ fontWeight: '800',
1136
+ color: COLORS.gold,
1137
+ letterSpacing: 3
1138
+ },
1139
+ buildUpName: {
1140
+ fontSize: 22,
1141
+ fontWeight: '800',
1142
+ color: '#fff'
1143
+ },
1144
+ winnerCard: {
1145
+ backgroundColor: 'rgba(15,23,42,0.8)',
1146
+ borderWidth: 1,
1147
+ borderColor: COLORS.gold,
1148
+ borderRadius: 18,
1149
+ paddingVertical: 26,
1150
+ paddingHorizontal: 20,
1151
+ alignItems: 'center',
1152
+ overflow: 'hidden'
1153
+ },
1154
+ winnerTrophyWrap: {
1155
+ width: 56,
1156
+ height: 56,
1157
+ borderRadius: 28,
1158
+ backgroundColor: 'rgba(255,215,0,0.15)',
1159
+ alignItems: 'center',
1160
+ justifyContent: 'center',
1161
+ marginBottom: 10
1162
+ },
1163
+ winnerLabel: {
1164
+ fontSize: 11,
1165
+ fontWeight: '800',
1166
+ color: COLORS.gold,
1167
+ letterSpacing: 3
1168
+ },
1169
+ winnerName: {
1170
+ fontSize: 22,
1171
+ fontWeight: '800',
1172
+ color: '#fff',
1173
+ marginTop: 6,
1174
+ maxWidth: '100%'
1175
+ },
1176
+ winnerAmount: {
1177
+ fontSize: 26,
1178
+ fontWeight: '800',
1179
+ color: COLORS.gold,
1180
+ marginTop: 6,
1181
+ textShadowColor: 'rgba(255,215,0,0.35)',
1182
+ textShadowOffset: {
1183
+ width: 0,
1184
+ height: 0
1185
+ },
1186
+ textShadowRadius: 10
1187
+ },
1188
+ winnerOthers: {
1189
+ fontSize: 12,
1190
+ color: COLORS.slateLight,
1191
+ marginTop: 10,
1192
+ textAlign: 'center'
1193
+ },
1194
+ confettiWrap: {
1195
+ position: 'absolute',
1196
+ top: '35%',
1197
+ left: '50%',
1198
+ width: 1,
1199
+ height: 1,
1200
+ zIndex: 5
1201
+ },
1202
+ confettiPiece: {
1203
+ position: 'absolute',
1204
+ width: 7,
1205
+ height: 10,
1206
+ borderRadius: 2,
1207
+ left: -3.5,
1208
+ top: -5
1209
+ },
1210
+ // Empty game state (no active raffle at all)
1211
+ emptyGameContainer: {
1212
+ flex: 1,
1213
+ alignItems: 'center',
1214
+ justifyContent: 'center',
1215
+ gap: 12,
1216
+ paddingHorizontal: 40
1217
+ },
1218
+ emptyGameText: {
1219
+ fontSize: 16,
1220
+ fontWeight: '700',
1221
+ color: '#fff',
1222
+ textAlign: 'center'
1223
+ },
1224
+ emptyGameSub: {
1225
+ fontSize: 13,
1226
+ color: COLORS.slateLight,
1227
+ textAlign: 'center'
1228
+ },
1229
+ // Footer
1230
+ footer: {
1231
+ paddingHorizontal: 20,
1232
+ paddingVertical: 24
1233
+ },
1234
+ actionBtnText: {
1235
+ fontSize: 16,
1236
+ fontWeight: '800',
1237
+ color: '#fff',
1238
+ letterSpacing: 2
1239
+ }
1240
+ });
1241
+ export default RaffleDraw;
1242
+ //# sourceMappingURL=RaffleDraw.js.map