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,1206 @@
1
+ "use strict";
2
+
3
+ import React, { useState, useEffect, useCallback, useRef } from 'react';
4
+ import { View, Text, FlatList, ActivityIndicator, Modal, StyleSheet } from 'react-native';
5
+ import { useQuery } from '@apollo/client/react';
6
+ import { COLORS } from "../constants.js";
7
+ import { theme } from "../theme.js";
8
+ import MonflowtsPressable from "../components/MonflowtsPressable.js";
9
+ import MonflowtsButton from "../components/MonflowtsButton.js";
10
+ import SvgIcon from "../Icons.js";
11
+ import { useLeaderboard } from "../hooks/useLeaderboard.js";
12
+ import { useCurrency } from "../hooks/useCurrency.js";
13
+ import { useNotifications } from "../hooks/useNotifications.js";
14
+ import { GET_LEADERBOARD_RAFFLE_HISTORY } from "../api/queries.js";
15
+ import { t, formatNumber, formatDate } from "../i18n.js";
16
+
17
+ // ─── Props ────────────────────────────────────────────────────────────────────
18
+
19
+ // ─── Derived entry type (from hook's exported interface) ──────────────────────
20
+
21
+ // ─── Raffle history (last-winner fallback) ─────────────────────────────────────
22
+
23
+ // EXPANSION R7c — one position in the full committed winner sequence.
24
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
25
+ // ─── Helpers ──────────────────────────────────────────────────────────────────
26
+
27
+ /** '1st' / '2nd' / '3rd' / '4th' … — used to label non-primary raffle winners. */
28
+ function ordinal(n) {
29
+ const rem100 = n % 100;
30
+ if (rem100 >= 11 && rem100 <= 13) return t('leaderboard.ordinal.th', {
31
+ n
32
+ });
33
+ switch (n % 10) {
34
+ case 1:
35
+ return t('leaderboard.ordinal.st', {
36
+ n
37
+ });
38
+ case 2:
39
+ return t('leaderboard.ordinal.nd', {
40
+ n
41
+ });
42
+ case 3:
43
+ return t('leaderboard.ordinal.rd', {
44
+ n
45
+ });
46
+ default:
47
+ return t('leaderboard.ordinal.th', {
48
+ n
49
+ });
50
+ }
51
+ }
52
+ function getInitials(name) {
53
+ const parts = name.trim().split(/\s+/).filter(Boolean);
54
+ if (parts.length >= 2) {
55
+ return ((parts[0]?.[0] ?? '') + (parts[1]?.[0] ?? '')).toUpperCase();
56
+ }
57
+ return (parts[0]?.[0] ?? '?').toUpperCase();
58
+ }
59
+ function buildCountdown(target) {
60
+ if (!target) return '—:—:—';
61
+ const diff = target.getTime() - Date.now();
62
+ if (diff <= 0) return '00:00:00';
63
+ const h = Math.floor(diff / 3_600_000);
64
+ const m = Math.floor(diff % 3_600_000 / 60_000);
65
+ const s = Math.floor(diff % 60_000 / 1_000);
66
+ return [h, m, s].map(n => String(n).padStart(2, '0')).join(':');
67
+ }
68
+
69
+ /** Relative time for recent notifications, falling back to a short date. */
70
+ function formatRelativeDate(iso) {
71
+ const date = new Date(iso);
72
+ const diffSec = Math.floor((Date.now() - date.getTime()) / 1000);
73
+ if (diffSec < 60) return t('leaderboard.justNow');
74
+ const diffMin = Math.floor(diffSec / 60);
75
+ if (diffMin < 60) return t('leaderboard.minutesAgo', {
76
+ n: diffMin
77
+ });
78
+ const diffHr = Math.floor(diffMin / 60);
79
+ if (diffHr < 24) return t('leaderboard.hoursAgo', {
80
+ n: diffHr
81
+ });
82
+ const diffDay = Math.floor(diffHr / 24);
83
+ if (diffDay < 7) return t('leaderboard.daysAgo', {
84
+ n: diffDay
85
+ });
86
+ return formatDate(date, {
87
+ month: 'short',
88
+ day: 'numeric'
89
+ });
90
+ }
91
+
92
+ // ─── Header phase (post-qualification states no longer show a ticking countdown) ──
93
+
94
+ // Screen-reader announcement fired once when we leave the ticking-countdown phases.
95
+ const PHASE_ANNOUNCEMENT_KEYS = {
96
+ locked: 'leaderboard.finalistsLockedAnnouncement',
97
+ drawing: 'leaderboard.drawInProgressAnnouncement',
98
+ announced: 'leaderboard.winnerAnnouncedAnnouncement'
99
+ };
100
+ function derivePhase(state) {
101
+ switch (state) {
102
+ case 'QUALIFICATION_CLOSING':
103
+ return 'closing';
104
+ case 'QUALIFICATION_CLOSED':
105
+ case 'SNAPSHOT_READY':
106
+ case 'DRAW_READY':
107
+ return 'locked';
108
+ case 'DRAW_IN_PROGRESS':
109
+ case 'RESULT_COMMITTED':
110
+ return 'drawing';
111
+ case 'RESULT_PUBLISHED':
112
+ case 'PRIZE_PROCESSING':
113
+ case 'COMPLETED':
114
+ return 'announced';
115
+ // QUALIFICATION_OPEN, any state earlier in the lifecycle (DRAFT/SCHEDULED),
116
+ // an absent/unknown state, and a null `active` all keep current behavior.
117
+ default:
118
+ return 'open';
119
+ }
120
+ }
121
+
122
+ // ─── Component ────────────────────────────────────────────────────────────────
123
+
124
+ const Leaderboard = ({
125
+ onBack
126
+ }) => {
127
+ const {
128
+ active,
129
+ leaderboard,
130
+ myPosition,
131
+ loading,
132
+ error,
133
+ refetch,
134
+ connected
135
+ } = useLeaderboard();
136
+ const currency = useCurrency();
137
+
138
+ // ── Notifications (bell + modal) ──
139
+ const {
140
+ notifications,
141
+ unreadCount,
142
+ error: notifError,
143
+ markRead
144
+ } = useNotifications();
145
+ const [notifModalVisible, setNotifModalVisible] = useState(false);
146
+
147
+ // ── Last-winner fallback — only queried while there's no live winner banner ──
148
+ const hasLiveWinner = !!active?.winner;
149
+ const historyQ = useQuery(GET_LEADERBOARD_RAFFLE_HISTORY, {
150
+ variables: {
151
+ limit: 1
152
+ },
153
+ fetchPolicy: 'cache-first',
154
+ skip: hasLiveWinner
155
+ });
156
+ const lastHistoryEntry = hasLiveWinner ? null : historyQ.data?.getLeaderboardRaffleHistory?.[0] ?? null;
157
+ const lastWinner = lastHistoryEntry?.winner ?? null;
158
+ // EXPANSION R7c — additional winners beyond position 1, for the "+N more" suffix.
159
+ const lastWinnerExtraCount = Math.max((lastHistoryEntry?.winners?.length ?? 0) - 1, 0);
160
+
161
+ // ── Header phase (derived from instance state — drives countdown vs. locked/drawing/announced) ──
162
+ const phase = derivePhase(active?.instance?.state);
163
+ const showsCountdown = phase === 'open' || phase === 'closing';
164
+
165
+ // ── Countdown ──
166
+ const closesAtStr = active?.instance?.qualificationClosesAt ?? null;
167
+ const [countdown, setCountdown] = useState(() => buildCountdown(closesAtStr ? new Date(closesAtStr) : null));
168
+ const prevMinRef = useRef(null);
169
+ const [srCountdown, setSrCountdown] = useState('');
170
+ useEffect(() => {
171
+ if (!showsCountdown) {
172
+ // Qualification is no longer open — stop ticking (no dead timer) and
173
+ // announce the phase change once instead of leaving stale countdown text.
174
+ prevMinRef.current = null;
175
+ const announcementKey = PHASE_ANNOUNCEMENT_KEYS[phase];
176
+ setSrCountdown(announcementKey ? t(announcementKey) : '');
177
+ return;
178
+ }
179
+ if (!closesAtStr) {
180
+ setCountdown('—:—:—');
181
+ return;
182
+ }
183
+ const target = new Date(closesAtStr);
184
+ const tick = () => {
185
+ const str = buildCountdown(target);
186
+ setCountdown(str);
187
+ const diff = target.getTime() - Date.now();
188
+ const m = diff > 0 ? Math.floor(diff % 3_600_000 / 60_000) : 0;
189
+ if (prevMinRef.current !== m) {
190
+ prevMinRef.current = m;
191
+ setSrCountdown(str);
192
+ }
193
+ };
194
+ tick();
195
+ const id = setInterval(tick, 1000);
196
+ return () => clearInterval(id);
197
+ }, [closesAtStr, showsCountdown, phase]);
198
+
199
+ // ── Score formatter ──
200
+ // EXPANSION R2 — honest formatting driven by scoreUnit ('POINTS' for a weighted
201
+ // multi-metric ranking, else the legacy metric name). Null-safe: falls back to
202
+ // instance.metric (today's behavior) when scoreUnit is absent (older cache/server).
203
+ const formatScore = useCallback(score => {
204
+ if (score == null) return '—';
205
+ const unit = active?.scoreUnit ?? active?.instance?.metric;
206
+ if (unit === 'POINTS') {
207
+ return t('leaderboard.points', {
208
+ score: formatNumber(score)
209
+ });
210
+ }
211
+ if (unit === 'TOTAL_STAKED_KOBO') {
212
+ return `${formatNumber(score / 100)} ${currency}`;
213
+ }
214
+ return String(score);
215
+ }, [active?.scoreUnit, active?.instance?.metric, currency]);
216
+
217
+ // ── Data ──
218
+ const entries = leaderboard?.entries ?? [];
219
+ const qualifyingPositions = leaderboard?.qualifyingPositions ?? 0;
220
+ const myRank = myPosition?.rank ?? null;
221
+ const isMyRankVisible = myRank != null && myRank <= entries.length;
222
+ const isMyRankOutside = myRank != null && myRank > entries.length;
223
+ // Optional "virtual competitors" count — non-null only when the raffle's
224
+ // config has bots.showBotCount enabled. Bots already render as normal rows;
225
+ // this only surfaces the count in the header subtitle below.
226
+ const botCount = active?.botCount ?? null;
227
+
228
+ // ── Phase row — countdown while qualification is open/closing, otherwise a static status ──
229
+ const renderPhaseRow = () => {
230
+ switch (phase) {
231
+ case 'open':
232
+ return /*#__PURE__*/_jsxs(View, {
233
+ style: styles.countdownRow,
234
+ children: [/*#__PURE__*/_jsx(Text, {
235
+ style: styles.countdownLabel,
236
+ children: t('leaderboard.closesIn')
237
+ }), /*#__PURE__*/_jsx(Text, {
238
+ style: styles.countdownValue,
239
+ children: countdown
240
+ })]
241
+ });
242
+ case 'closing':
243
+ return /*#__PURE__*/_jsxs(View, {
244
+ style: styles.countdownRow,
245
+ children: [/*#__PURE__*/_jsx(Text, {
246
+ style: styles.countdownLabel,
247
+ children: t('leaderboard.closingSoon')
248
+ }), /*#__PURE__*/_jsx(Text, {
249
+ style: styles.countdownValue,
250
+ children: countdown
251
+ })]
252
+ });
253
+ case 'locked':
254
+ return /*#__PURE__*/_jsxs(View, {
255
+ style: [styles.countdownRow, styles.phaseRowGold, theme.goldShadow],
256
+ children: [/*#__PURE__*/_jsx(Text, {
257
+ style: styles.phaseLabelGold,
258
+ children: t('leaderboard.finalistsLocked')
259
+ }), /*#__PURE__*/_jsxs(View, {
260
+ style: {
261
+ flexDirection: 'row',
262
+ alignItems: 'center',
263
+ gap: 4
264
+ },
265
+ children: [/*#__PURE__*/_jsx(SvgIcon, {
266
+ name: "timer",
267
+ size: 12,
268
+ color: COLORS.gold
269
+ }), /*#__PURE__*/_jsx(Text, {
270
+ style: styles.phaseValueGold,
271
+ children: t('leaderboard.drawComingSoon')
272
+ })]
273
+ })]
274
+ });
275
+ case 'drawing':
276
+ return /*#__PURE__*/_jsx(View, {
277
+ style: [styles.countdownRow, styles.phaseRowGold, theme.goldShadow],
278
+ children: /*#__PURE__*/_jsx(Text, {
279
+ style: styles.phaseValueGold,
280
+ children: t('leaderboard.drawInProgress')
281
+ })
282
+ });
283
+ case 'announced':
284
+ return /*#__PURE__*/_jsx(View, {
285
+ style: [styles.countdownRow, styles.phaseRowGold, theme.goldShadow],
286
+ children: /*#__PURE__*/_jsx(Text, {
287
+ style: styles.phaseValueGold,
288
+ children: t('leaderboard.winnerAnnounced')
289
+ })
290
+ });
291
+ default:
292
+ return null;
293
+ }
294
+ };
295
+
296
+ // ── Shared header ──
297
+ const renderHeader = () => /*#__PURE__*/_jsxs(View, {
298
+ style: styles.header,
299
+ children: [/*#__PURE__*/_jsxs(View, {
300
+ style: styles.headerTop,
301
+ children: [/*#__PURE__*/_jsx(MonflowtsPressable, {
302
+ style: styles.circleBtn,
303
+ onPress: onBack,
304
+ accessibilityLabel: t('leaderboard.goBack'),
305
+ accessibilityRole: "button",
306
+ children: /*#__PURE__*/_jsx(Text, {
307
+ style: styles.btnText,
308
+ children: "\u2039"
309
+ })
310
+ }), /*#__PURE__*/_jsxs(View, {
311
+ style: styles.headerCenter,
312
+ children: [/*#__PURE__*/_jsx(Text, {
313
+ style: styles.headerTitle,
314
+ numberOfLines: 1,
315
+ accessibilityRole: "header",
316
+ children: active?.displayName ?? t('leaderboard.weeklyLeaderboard')
317
+ }), /*#__PURE__*/_jsx(Text, {
318
+ style: styles.headerSubtitle,
319
+ accessibilityLabel: botCount != null && botCount > 0 ? t('leaderboard.subtitleA11y', {
320
+ players: leaderboard?.participantCount ?? 0,
321
+ finalists: active?.instance?.finalistCount ?? leaderboard?.qualifyingPositions ?? 0,
322
+ bots: botCount
323
+ }) : undefined,
324
+ children: botCount != null && botCount > 0 ? t('leaderboard.subtitleWithBots', {
325
+ players: leaderboard?.participantCount ?? 0,
326
+ finalists: active?.instance?.finalistCount ?? leaderboard?.qualifyingPositions ?? 0,
327
+ bots: botCount
328
+ }) : t('leaderboard.subtitle', {
329
+ players: leaderboard?.participantCount ?? 0,
330
+ finalists: active?.instance?.finalistCount ?? leaderboard?.qualifyingPositions ?? 0
331
+ })
332
+ })]
333
+ }), /*#__PURE__*/_jsxs(View, {
334
+ style: styles.headerRight,
335
+ children: [/*#__PURE__*/_jsxs(MonflowtsPressable, {
336
+ style: styles.bellBtn,
337
+ onPress: () => setNotifModalVisible(true),
338
+ accessibilityLabel: t('leaderboard.notifications'),
339
+ accessibilityRole: "button",
340
+ children: [/*#__PURE__*/_jsx(SvgIcon, {
341
+ name: "bell",
342
+ size: 16,
343
+ color: COLORS.gold,
344
+ style: styles.bellIcon
345
+ }), !notifError && unreadCount > 0 && /*#__PURE__*/_jsx(View, {
346
+ style: styles.bellBadge,
347
+ children: /*#__PURE__*/_jsx(Text, {
348
+ style: styles.bellBadgeText,
349
+ allowFontScaling: false,
350
+ children: unreadCount > 9 ? '9+' : unreadCount
351
+ })
352
+ })]
353
+ }), /*#__PURE__*/_jsxs(View, {
354
+ style: styles.liveRow,
355
+ children: [/*#__PURE__*/_jsx(View, {
356
+ style: [styles.liveDot, connected && styles.liveDotActive]
357
+ }), /*#__PURE__*/_jsx(Text, {
358
+ style: [styles.liveText, connected && styles.liveTextActive],
359
+ children: connected ? t('leaderboard.live') : t('leaderboard.updating')
360
+ })]
361
+ })]
362
+ })]
363
+ }), renderPhaseRow(), active?.scoringDescription && /*#__PURE__*/_jsx(Text, {
364
+ style: styles.scoringDescription,
365
+ numberOfLines: 2,
366
+ accessibilityLabel: t('leaderboard.scoringFormulaA11y', {
367
+ description: active.scoringDescription
368
+ }),
369
+ children: active.scoringDescription
370
+ }), /*#__PURE__*/_jsx(Text, {
371
+ accessibilityLiveRegion: "polite",
372
+ style: styles.srOnly,
373
+ children: srCountdown
374
+ })]
375
+ });
376
+
377
+ // ── Winner banner ──
378
+ // EXPANSION R7c — position-1 stays exactly as before; when the committed draw has
379
+ // additional positions, a compact gold-accent second line lists them.
380
+ const renderWinnerBanner = () => {
381
+ const w = active?.winner;
382
+ if (!w) return null;
383
+ const rankLabel = w.rank === 1 ? '#1' : t('leaderboard.rank', {
384
+ rank: w.rank
385
+ });
386
+ const otherWinners = (active?.winners ?? []).filter(entry => entry.position > 1).sort((a, b) => a.position - b.position);
387
+ const othersLine = otherWinners.length > 0 ? t('leaderboard.also', {
388
+ list: otherWinners.map(entry => `${ordinal(entry.position)} ${entry.displayName}`).join(' · ')
389
+ }) : null;
390
+ const othersAccessibilityText = otherWinners.length > 0 ? ` ${t('leaderboard.alsoWinningA11y', {
391
+ list: otherWinners.map(entry => t('leaderboard.placeEntryA11y', {
392
+ place: ordinal(entry.position),
393
+ name: entry.displayName,
394
+ rank: entry.rank
395
+ })).join('; ')
396
+ })}` : '';
397
+ return /*#__PURE__*/_jsxs(View, {
398
+ style: [styles.winnerBanner, theme.glassCard, theme.goldShadow],
399
+ accessible: true,
400
+ accessibilityLiveRegion: "polite",
401
+ accessibilityLabel: `${t('leaderboard.wonThisWeekA11y', {
402
+ name: w.displayName,
403
+ rank: rankLabel
404
+ })}${othersAccessibilityText}`,
405
+ children: [/*#__PURE__*/_jsxs(View, {
406
+ style: styles.winnerBannerTop,
407
+ children: [/*#__PURE__*/_jsx(SvgIcon, {
408
+ name: "trophy",
409
+ size: 22,
410
+ color: COLORS.gold,
411
+ style: styles.winnerTrophy
412
+ }), /*#__PURE__*/_jsx(Text, {
413
+ style: styles.winnerName,
414
+ numberOfLines: 2,
415
+ children: t('leaderboard.wonThisWeek', {
416
+ name: w.displayName
417
+ })
418
+ }), w.isDemo && /*#__PURE__*/_jsx(View, {
419
+ style: styles.demoTag,
420
+ children: /*#__PURE__*/_jsx(Text, {
421
+ style: styles.demoTagText,
422
+ allowFontScaling: false,
423
+ children: t('leaderboard.demo')
424
+ })
425
+ })]
426
+ }), /*#__PURE__*/_jsx(Text, {
427
+ style: styles.winnerRankLabel,
428
+ children: rankLabel
429
+ }), othersLine && /*#__PURE__*/_jsx(Text, {
430
+ style: styles.winnerOthersLine,
431
+ numberOfLines: 1,
432
+ children: othersLine
433
+ })]
434
+ });
435
+ };
436
+
437
+ // ── Last-winner fallback strip (no live winner banner — surfaces raffle history) ──
438
+ const renderLastWinnerStrip = () => {
439
+ if (!lastWinner) return null;
440
+ // EXPANSION R7c — trivial extension: note additional winners beyond position 1.
441
+ const extraSuffix = lastWinnerExtraCount > 0 ? ` ${t('leaderboard.plusMore', {
442
+ count: lastWinnerExtraCount
443
+ })}` : '';
444
+ const extraAccessibilitySuffix = lastWinnerExtraCount > 0 ? `, ${t(lastWinnerExtraCount === 1 ? 'leaderboard.plusMoreWinnersA11y_one' : 'leaderboard.plusMoreWinnersA11y_other', {
445
+ count: lastWinnerExtraCount
446
+ })}` : '';
447
+ return /*#__PURE__*/_jsxs(View, {
448
+ style: [theme.glassCard, styles.lastWinnerStrip, {
449
+ flexDirection: 'row',
450
+ alignItems: 'center',
451
+ gap: 5
452
+ }],
453
+ accessible: true,
454
+ accessibilityLabel: `${t('leaderboard.lastWinnerA11y', {
455
+ name: lastWinner.displayName,
456
+ rank: lastWinner.rank
457
+ })}${extraAccessibilitySuffix}`,
458
+ children: [/*#__PURE__*/_jsx(SvgIcon, {
459
+ name: "trophy",
460
+ size: 12,
461
+ color: COLORS.gold
462
+ }), /*#__PURE__*/_jsxs(Text, {
463
+ style: [styles.lastWinnerText, {
464
+ flex: 1
465
+ }],
466
+ numberOfLines: 1,
467
+ children: [t('leaderboard.lastWinnerPrefix'), " ", /*#__PURE__*/_jsx(Text, {
468
+ style: styles.lastWinnerName,
469
+ children: lastWinner.displayName
470
+ }), " (#", lastWinner.rank, ")", extraSuffix]
471
+ })]
472
+ });
473
+ };
474
+
475
+ // ── Notifications modal ──
476
+ const renderNotificationsModal = () => /*#__PURE__*/_jsx(Modal, {
477
+ visible: notifModalVisible,
478
+ transparent: true,
479
+ animationType: "fade",
480
+ onRequestClose: () => setNotifModalVisible(false),
481
+ statusBarTranslucent: true,
482
+ children: /*#__PURE__*/_jsx(View, {
483
+ style: styles.notifOverlay,
484
+ children: /*#__PURE__*/_jsxs(View, {
485
+ style: styles.notifSheet,
486
+ children: [/*#__PURE__*/_jsxs(View, {
487
+ style: styles.notifHeader,
488
+ children: [/*#__PURE__*/_jsx(Text, {
489
+ style: styles.notifTitle,
490
+ accessibilityRole: "header",
491
+ children: t('leaderboard.notifications')
492
+ }), /*#__PURE__*/_jsx(MonflowtsPressable, {
493
+ style: styles.notifCloseBtn,
494
+ onPress: () => setNotifModalVisible(false),
495
+ accessibilityLabel: t('leaderboard.closeNotifications'),
496
+ accessibilityRole: "button",
497
+ children: /*#__PURE__*/_jsx(Text, {
498
+ style: styles.notifCloseText,
499
+ children: "\u2715"
500
+ })
501
+ })]
502
+ }), /*#__PURE__*/_jsx(FlatList, {
503
+ data: notifications,
504
+ keyExtractor: n => n.id,
505
+ style: styles.notifList,
506
+ contentContainerStyle: styles.notifListContent,
507
+ renderItem: ({
508
+ item
509
+ }) => /*#__PURE__*/_jsxs(MonflowtsPressable, {
510
+ style: [styles.notifRow, !item.read && styles.notifRowUnread],
511
+ onPress: () => markRead(item.id),
512
+ disableSound: true,
513
+ accessibilityLabel: t('leaderboard.notificationA11y', {
514
+ title: item.title,
515
+ body: item.body,
516
+ status: item.read ? t('leaderboard.read') : t('leaderboard.unread')
517
+ }),
518
+ accessibilityRole: "button",
519
+ children: [/*#__PURE__*/_jsx(Text, {
520
+ style: styles.notifItemTitle,
521
+ numberOfLines: 1,
522
+ children: item.title
523
+ }), /*#__PURE__*/_jsx(Text, {
524
+ style: styles.notifItemBody,
525
+ numberOfLines: 3,
526
+ children: item.body
527
+ }), /*#__PURE__*/_jsx(Text, {
528
+ style: styles.notifItemDate,
529
+ children: formatRelativeDate(item.createdAt)
530
+ })]
531
+ }),
532
+ ListEmptyComponent: /*#__PURE__*/_jsx(View, {
533
+ style: styles.notifEmpty,
534
+ children: /*#__PURE__*/_jsx(Text, {
535
+ style: styles.notifEmptyText,
536
+ children: t('leaderboard.noNotifications')
537
+ })
538
+ })
539
+ })]
540
+ })
541
+ })
542
+ });
543
+
544
+ // ── Row renderer ──
545
+ const renderItem = useCallback(({
546
+ item
547
+ }) => {
548
+ const isMe = item.isCurrentPlayer;
549
+ const rankColor = item.rank <= 3 ? COLORS.gold : item.qualified ? COLORS.gold : COLORS.slateLight;
550
+ return /*#__PURE__*/_jsxs(_Fragment, {
551
+ children: [/*#__PURE__*/_jsxs(View, {
552
+ style: [styles.entryRow, theme.glassCard, item.reserve ? styles.reserveRow : null, isMe ? styles.myRow : null],
553
+ accessible: true,
554
+ accessibilityLabel: [t('leaderboard.rank', {
555
+ rank: item.rank
556
+ }), item.displayName, isMe ? t('leaderboard.you') : null, item.qualified ? t('leaderboard.finalist') : item.reserve ? t('leaderboard.reserve') : null, formatScore(item.score)].filter(Boolean).join(', '),
557
+ children: [/*#__PURE__*/_jsx(View, {
558
+ style: [styles.rankBadge, {
559
+ borderColor: rankColor
560
+ }],
561
+ children: /*#__PURE__*/_jsxs(Text, {
562
+ style: [styles.rankText, {
563
+ color: rankColor
564
+ }],
565
+ children: ["#", item.rank]
566
+ })
567
+ }), /*#__PURE__*/_jsx(View, {
568
+ style: [styles.avatar, isMe ? styles.myAvatar : null],
569
+ children: /*#__PURE__*/_jsx(Text, {
570
+ style: styles.avatarText,
571
+ children: getInitials(item.displayName)
572
+ })
573
+ }), /*#__PURE__*/_jsxs(View, {
574
+ style: styles.entryInfo,
575
+ children: [/*#__PURE__*/_jsxs(View, {
576
+ style: styles.nameRow,
577
+ children: [/*#__PURE__*/_jsx(Text, {
578
+ style: styles.displayName,
579
+ numberOfLines: 1,
580
+ children: item.displayName
581
+ }), isMe && /*#__PURE__*/_jsx(View, {
582
+ style: styles.youTag,
583
+ children: /*#__PURE__*/_jsx(Text, {
584
+ style: styles.youTagText,
585
+ allowFontScaling: false,
586
+ children: t('leaderboard.youTag')
587
+ })
588
+ })]
589
+ }), item.qualified && /*#__PURE__*/_jsx(Text, {
590
+ style: styles.finalistLabel,
591
+ children: t('leaderboard.finalistTag')
592
+ }), !item.qualified && item.reserve && /*#__PURE__*/_jsx(Text, {
593
+ style: styles.reserveLabel,
594
+ children: t('leaderboard.reserveTag')
595
+ })]
596
+ }), /*#__PURE__*/_jsx(Text, {
597
+ style: styles.scoreText,
598
+ children: formatScore(item.score)
599
+ })]
600
+ }), qualifyingPositions > 0 && item.rank === qualifyingPositions && /*#__PURE__*/_jsxs(View, {
601
+ style: styles.qualLine,
602
+ children: [/*#__PURE__*/_jsx(View, {
603
+ style: styles.qualLineDash
604
+ }), /*#__PURE__*/_jsx(Text, {
605
+ style: styles.qualLineLabel,
606
+ allowFontScaling: false,
607
+ children: t('leaderboard.qualificationLine')
608
+ }), /*#__PURE__*/_jsx(View, {
609
+ style: styles.qualLineDash
610
+ })]
611
+ })]
612
+ });
613
+ }, [qualifyingPositions, formatScore]);
614
+
615
+ // ── Error state (no cached data) ──
616
+ if (error && !leaderboard) {
617
+ return /*#__PURE__*/_jsxs(View, {
618
+ style: theme.screenContainer,
619
+ children: [renderHeader(), /*#__PURE__*/_jsxs(View, {
620
+ style: styles.errorContainer,
621
+ children: [/*#__PURE__*/_jsx(Text, {
622
+ style: styles.errorText,
623
+ children: t('leaderboard.loadFailed')
624
+ }), /*#__PURE__*/_jsx(MonflowtsButton, {
625
+ title: t('leaderboard.retry'),
626
+ onPress: refetch,
627
+ fullWidth: false,
628
+ style: styles.retryButton
629
+ })]
630
+ }), renderNotificationsModal()]
631
+ });
632
+ }
633
+
634
+ // ── Main render ──
635
+ return /*#__PURE__*/_jsxs(View, {
636
+ style: theme.screenContainer,
637
+ children: [renderHeader(), renderWinnerBanner(), renderLastWinnerStrip(), /*#__PURE__*/_jsx(FlatList, {
638
+ data: entries,
639
+ keyExtractor: e => e.entryId,
640
+ renderItem: renderItem,
641
+ contentContainerStyle: styles.listContent,
642
+ ListEmptyComponent: /*#__PURE__*/_jsx(View, {
643
+ style: styles.empty,
644
+ children: loading ? /*#__PURE__*/_jsxs(_Fragment, {
645
+ children: [/*#__PURE__*/_jsx(ActivityIndicator, {
646
+ size: "large",
647
+ color: COLORS.primary
648
+ }), /*#__PURE__*/_jsx(Text, {
649
+ style: styles.emptyText,
650
+ children: t('leaderboard.loading')
651
+ })]
652
+ }) : !active ? /*#__PURE__*/_jsx(Text, {
653
+ style: styles.emptyText,
654
+ children: t('leaderboard.noActiveRaffle')
655
+ }) : /*#__PURE__*/_jsx(Text, {
656
+ style: styles.emptyText,
657
+ children: t('leaderboard.beTheFirst')
658
+ })
659
+ })
660
+ }), isMyRankOutside ? /*#__PURE__*/_jsxs(View, {
661
+ style: styles.myPositionCard,
662
+ children: [/*#__PURE__*/_jsx(Text, {
663
+ style: styles.myPositionLabel,
664
+ children: t('leaderboard.yourPosition')
665
+ }), /*#__PURE__*/_jsx(Text, {
666
+ style: styles.myPositionText,
667
+ children: t('leaderboard.youreRanked', {
668
+ rank: myRank,
669
+ score: formatScore(myPosition?.score)
670
+ })
671
+ })]
672
+ }) : isMyRankVisible ? /*#__PURE__*/_jsx(View, {
673
+ style: styles.myPositionCardSubtle,
674
+ children: /*#__PURE__*/_jsx(Text, {
675
+ style: styles.myPositionSubtleText,
676
+ children: t('leaderboard.youreOnBoard', {
677
+ rank: myRank
678
+ })
679
+ })
680
+ }) : /*#__PURE__*/_jsx(View, {
681
+ style: styles.myPositionCardSubtle,
682
+ children: /*#__PURE__*/_jsx(Text, {
683
+ style: styles.myPositionSubtleText,
684
+ children: t('leaderboard.playToEnter')
685
+ })
686
+ }), renderNotificationsModal()]
687
+ });
688
+ };
689
+
690
+ // ─── Styles ───────────────────────────────────────────────────────────────────
691
+
692
+ const styles = StyleSheet.create({
693
+ // Header
694
+ header: {
695
+ paddingHorizontal: 16,
696
+ paddingTop: 52,
697
+ paddingBottom: 14,
698
+ backgroundColor: 'rgba(5,11,24,0.92)',
699
+ borderBottomWidth: 1,
700
+ borderBottomColor: COLORS.white10
701
+ },
702
+ headerTop: {
703
+ flexDirection: 'row',
704
+ alignItems: 'center',
705
+ justifyContent: 'space-between',
706
+ marginBottom: 14
707
+ },
708
+ circleBtn: {
709
+ width: 40,
710
+ height: 40,
711
+ borderRadius: 20,
712
+ backgroundColor: COLORS.white05,
713
+ borderWidth: 1,
714
+ borderColor: COLORS.white10,
715
+ alignItems: 'center',
716
+ justifyContent: 'center'
717
+ },
718
+ btnText: {
719
+ color: '#fff',
720
+ fontSize: 22
721
+ },
722
+ headerCenter: {
723
+ flex: 1,
724
+ alignItems: 'center',
725
+ paddingHorizontal: 8
726
+ },
727
+ headerTitle: {
728
+ fontSize: 18,
729
+ fontWeight: '700',
730
+ color: '#fff'
731
+ },
732
+ headerSubtitle: {
733
+ fontSize: 11,
734
+ color: COLORS.slateLight,
735
+ marginTop: 2
736
+ },
737
+ // Header right cluster (bell + live indicator)
738
+ headerRight: {
739
+ alignItems: 'flex-end',
740
+ gap: 6
741
+ },
742
+ // Live indicator
743
+ liveRow: {
744
+ flexDirection: 'row',
745
+ alignItems: 'center',
746
+ gap: 5
747
+ },
748
+ liveDot: {
749
+ width: 7,
750
+ height: 7,
751
+ borderRadius: 4,
752
+ backgroundColor: COLORS.slateLight
753
+ },
754
+ liveDotActive: {
755
+ backgroundColor: COLORS.winGreen
756
+ },
757
+ liveText: {
758
+ fontSize: 9,
759
+ fontWeight: '800',
760
+ color: COLORS.slateLight,
761
+ letterSpacing: 1
762
+ },
763
+ liveTextActive: {
764
+ color: COLORS.winGreen
765
+ },
766
+ // Notification bell
767
+ bellBtn: {
768
+ width: 32,
769
+ height: 32,
770
+ borderRadius: 16,
771
+ backgroundColor: COLORS.white05,
772
+ borderWidth: 1,
773
+ borderColor: COLORS.white10,
774
+ alignItems: 'center',
775
+ justifyContent: 'center'
776
+ },
777
+ bellIcon: {
778
+ fontSize: 14
779
+ },
780
+ bellBadge: {
781
+ position: 'absolute',
782
+ top: -4,
783
+ right: -4,
784
+ minWidth: 16,
785
+ height: 16,
786
+ borderRadius: 8,
787
+ paddingHorizontal: 3,
788
+ backgroundColor: COLORS.gold,
789
+ borderWidth: 1,
790
+ borderColor: COLORS.backgroundDark,
791
+ alignItems: 'center',
792
+ justifyContent: 'center'
793
+ },
794
+ bellBadgeText: {
795
+ fontSize: 9,
796
+ fontWeight: '800',
797
+ color: COLORS.navy
798
+ },
799
+ // Countdown
800
+ countdownRow: {
801
+ flexDirection: 'row',
802
+ alignItems: 'center',
803
+ justifyContent: 'center',
804
+ gap: 10,
805
+ paddingVertical: 7,
806
+ backgroundColor: COLORS.white05,
807
+ borderRadius: 10,
808
+ borderWidth: 1,
809
+ borderColor: COLORS.white10
810
+ },
811
+ countdownLabel: {
812
+ fontSize: 9,
813
+ fontWeight: '800',
814
+ color: COLORS.slateLight,
815
+ letterSpacing: 3
816
+ },
817
+ countdownValue: {
818
+ fontSize: 15,
819
+ fontWeight: '800',
820
+ color: '#fff',
821
+ fontVariant: ['tabular-nums']
822
+ },
823
+ // Phase row — locked / drawing / announced (post-qualification, gold accent)
824
+ phaseRowGold: {
825
+ backgroundColor: 'rgba(255,215,0,0.08)',
826
+ borderColor: 'rgba(255,215,0,0.35)'
827
+ },
828
+ phaseLabelGold: {
829
+ fontSize: 9,
830
+ fontWeight: '800',
831
+ color: COLORS.gold,
832
+ letterSpacing: 3
833
+ },
834
+ phaseValueGold: {
835
+ fontSize: 13,
836
+ fontWeight: '800',
837
+ color: COLORS.gold,
838
+ letterSpacing: 0.5
839
+ },
840
+ // Scoring-formula transparency line (EXPANSION R1 — muted, under the header)
841
+ scoringDescription: {
842
+ fontSize: 10,
843
+ color: COLORS.slateLight,
844
+ textAlign: 'center',
845
+ marginTop: 8,
846
+ lineHeight: 14
847
+ },
848
+ // List
849
+ listContent: {
850
+ paddingHorizontal: 14,
851
+ paddingTop: 10,
852
+ paddingBottom: 16
853
+ },
854
+ // Entry row (visual chrome comes from theme.glassCard)
855
+ entryRow: {
856
+ flexDirection: 'row',
857
+ alignItems: 'center',
858
+ padding: 12,
859
+ marginTop: 8,
860
+ gap: 10
861
+ },
862
+ reserveRow: {
863
+ opacity: 0.6
864
+ },
865
+ myRow: {
866
+ borderColor: COLORS.primary,
867
+ backgroundColor: 'rgba(127,19,236,0.12)',
868
+ shadowColor: COLORS.primary,
869
+ shadowOffset: {
870
+ width: 0,
871
+ height: 0
872
+ },
873
+ shadowOpacity: 0.3,
874
+ shadowRadius: 8
875
+ },
876
+ // Rank badge
877
+ rankBadge: {
878
+ width: 38,
879
+ height: 28,
880
+ borderRadius: 8,
881
+ borderWidth: 1,
882
+ alignItems: 'center',
883
+ justifyContent: 'center'
884
+ },
885
+ rankText: {
886
+ fontSize: 11,
887
+ fontWeight: '800'
888
+ },
889
+ // Avatar
890
+ avatar: {
891
+ width: 36,
892
+ height: 36,
893
+ borderRadius: 18,
894
+ backgroundColor: 'rgba(127,19,236,0.15)',
895
+ borderWidth: 1,
896
+ borderColor: 'rgba(127,19,236,0.3)',
897
+ alignItems: 'center',
898
+ justifyContent: 'center'
899
+ },
900
+ myAvatar: {
901
+ backgroundColor: 'rgba(127,19,236,0.35)',
902
+ borderColor: COLORS.primary
903
+ },
904
+ avatarText: {
905
+ fontSize: 12,
906
+ fontWeight: '800',
907
+ color: '#fff'
908
+ },
909
+ // Entry info
910
+ entryInfo: {
911
+ flex: 1
912
+ },
913
+ nameRow: {
914
+ flexDirection: 'row',
915
+ alignItems: 'center',
916
+ gap: 6
917
+ },
918
+ displayName: {
919
+ fontSize: 14,
920
+ fontWeight: '600',
921
+ color: '#fff',
922
+ flexShrink: 1
923
+ },
924
+ youTag: {
925
+ backgroundColor: COLORS.primary,
926
+ borderRadius: 4,
927
+ paddingHorizontal: 5,
928
+ paddingVertical: 1
929
+ },
930
+ youTagText: {
931
+ fontSize: 8,
932
+ fontWeight: '900',
933
+ color: '#fff',
934
+ letterSpacing: 1
935
+ },
936
+ finalistLabel: {
937
+ fontSize: 9,
938
+ fontWeight: '700',
939
+ color: COLORS.gold,
940
+ letterSpacing: 1,
941
+ marginTop: 2
942
+ },
943
+ reserveLabel: {
944
+ fontSize: 9,
945
+ fontWeight: '700',
946
+ color: COLORS.slateLight,
947
+ letterSpacing: 1,
948
+ marginTop: 2
949
+ },
950
+ // Score
951
+ scoreText: {
952
+ fontSize: 13,
953
+ fontWeight: '700',
954
+ color: '#fff',
955
+ textAlign: 'right'
956
+ },
957
+ // Qualification line
958
+ qualLine: {
959
+ flexDirection: 'row',
960
+ alignItems: 'center',
961
+ marginVertical: 6,
962
+ marginHorizontal: 2,
963
+ gap: 8
964
+ },
965
+ qualLineDash: {
966
+ flex: 1,
967
+ height: 1,
968
+ backgroundColor: COLORS.gold,
969
+ opacity: 0.4
970
+ },
971
+ qualLineLabel: {
972
+ fontSize: 8,
973
+ fontWeight: '800',
974
+ color: COLORS.gold,
975
+ letterSpacing: 2,
976
+ opacity: 0.85
977
+ },
978
+ // Empty state
979
+ empty: {
980
+ alignItems: 'center',
981
+ paddingTop: 80,
982
+ gap: 14
983
+ },
984
+ emptyText: {
985
+ fontSize: 14,
986
+ color: COLORS.slateLight,
987
+ textAlign: 'center',
988
+ lineHeight: 20
989
+ },
990
+ // Error state
991
+ errorContainer: {
992
+ flex: 1,
993
+ alignItems: 'center',
994
+ justifyContent: 'center',
995
+ gap: 16,
996
+ padding: 24
997
+ },
998
+ errorText: {
999
+ fontSize: 15,
1000
+ color: COLORS.slateLight,
1001
+ textAlign: 'center'
1002
+ },
1003
+ retryButton: {
1004
+ paddingHorizontal: 40
1005
+ },
1006
+ // Winner banner
1007
+ winnerBanner: {
1008
+ marginHorizontal: 14,
1009
+ marginTop: 12,
1010
+ marginBottom: 2,
1011
+ padding: 14,
1012
+ borderColor: COLORS.gold,
1013
+ borderWidth: 1,
1014
+ gap: 4
1015
+ },
1016
+ winnerBannerTop: {
1017
+ flexDirection: 'row',
1018
+ alignItems: 'center',
1019
+ gap: 8
1020
+ },
1021
+ winnerTrophy: {
1022
+ fontSize: 22
1023
+ },
1024
+ winnerName: {
1025
+ flex: 1,
1026
+ fontSize: 15,
1027
+ fontWeight: '700',
1028
+ color: COLORS.gold
1029
+ },
1030
+ winnerRankLabel: {
1031
+ fontSize: 11,
1032
+ fontWeight: '800',
1033
+ color: COLORS.gold,
1034
+ opacity: 0.75,
1035
+ letterSpacing: 1
1036
+ },
1037
+ // Multi-winner second line (EXPANSION R7c) — gold accent, compact
1038
+ winnerOthersLine: {
1039
+ fontSize: 11,
1040
+ fontWeight: '700',
1041
+ color: COLORS.gold,
1042
+ opacity: 0.85,
1043
+ marginTop: 2
1044
+ },
1045
+ demoTag: {
1046
+ backgroundColor: COLORS.slateDark,
1047
+ borderRadius: 4,
1048
+ paddingHorizontal: 5,
1049
+ paddingVertical: 2
1050
+ },
1051
+ demoTagText: {
1052
+ fontSize: 8,
1053
+ fontWeight: '900',
1054
+ color: '#fff',
1055
+ letterSpacing: 1
1056
+ },
1057
+ // Last-winner fallback strip (shown when there's no live winner banner)
1058
+ lastWinnerStrip: {
1059
+ marginHorizontal: 14,
1060
+ marginTop: 12,
1061
+ marginBottom: 2,
1062
+ paddingVertical: 9,
1063
+ paddingHorizontal: 14,
1064
+ borderColor: 'rgba(255,215,0,0.35)',
1065
+ borderWidth: 1
1066
+ },
1067
+ lastWinnerText: {
1068
+ fontSize: 12,
1069
+ fontWeight: '600',
1070
+ color: COLORS.slateLight,
1071
+ textAlign: 'center'
1072
+ },
1073
+ lastWinnerName: {
1074
+ fontWeight: '800',
1075
+ color: COLORS.gold
1076
+ },
1077
+ // MY POSITION banner — prominent (outside top)
1078
+ myPositionCard: {
1079
+ margin: 12,
1080
+ backgroundColor: 'rgba(127,19,236,0.15)',
1081
+ borderWidth: 1,
1082
+ borderColor: 'rgba(127,19,236,0.45)',
1083
+ borderRadius: 14,
1084
+ padding: 14,
1085
+ alignItems: 'center',
1086
+ gap: 4
1087
+ },
1088
+ myPositionLabel: {
1089
+ fontSize: 8,
1090
+ fontWeight: '900',
1091
+ color: COLORS.slateLight,
1092
+ letterSpacing: 3
1093
+ },
1094
+ myPositionText: {
1095
+ fontSize: 13,
1096
+ fontWeight: '700',
1097
+ color: '#fff',
1098
+ textAlign: 'center'
1099
+ },
1100
+ // MY POSITION banner — subtle (in-list or not-yet-ranked)
1101
+ myPositionCardSubtle: {
1102
+ marginHorizontal: 12,
1103
+ marginBottom: 12,
1104
+ backgroundColor: COLORS.white05,
1105
+ borderWidth: 1,
1106
+ borderColor: COLORS.white10,
1107
+ borderRadius: 12,
1108
+ padding: 10,
1109
+ alignItems: 'center'
1110
+ },
1111
+ myPositionSubtleText: {
1112
+ fontSize: 12,
1113
+ color: COLORS.slateLight
1114
+ },
1115
+ // SR-only (screen reader announce text, visually hidden)
1116
+ srOnly: {
1117
+ position: 'absolute',
1118
+ width: 1,
1119
+ height: 1,
1120
+ overflow: 'hidden'
1121
+ },
1122
+ // Notifications modal
1123
+ notifOverlay: {
1124
+ flex: 1,
1125
+ backgroundColor: 'rgba(0,0,0,0.7)',
1126
+ justifyContent: 'center',
1127
+ padding: 20
1128
+ },
1129
+ notifSheet: {
1130
+ maxHeight: '75%',
1131
+ borderRadius: 18,
1132
+ backgroundColor: '#0d1226',
1133
+ borderWidth: 1,
1134
+ borderColor: COLORS.white10,
1135
+ overflow: 'hidden'
1136
+ },
1137
+ notifHeader: {
1138
+ flexDirection: 'row',
1139
+ alignItems: 'center',
1140
+ justifyContent: 'space-between',
1141
+ paddingHorizontal: 16,
1142
+ paddingVertical: 14,
1143
+ borderBottomWidth: 1,
1144
+ borderBottomColor: COLORS.white10
1145
+ },
1146
+ notifTitle: {
1147
+ fontSize: 16,
1148
+ fontWeight: '700',
1149
+ color: '#fff'
1150
+ },
1151
+ notifCloseBtn: {
1152
+ width: 28,
1153
+ height: 28,
1154
+ borderRadius: 14,
1155
+ backgroundColor: COLORS.white10,
1156
+ alignItems: 'center',
1157
+ justifyContent: 'center'
1158
+ },
1159
+ notifCloseText: {
1160
+ color: COLORS.slateLight,
1161
+ fontSize: 13,
1162
+ fontWeight: '700'
1163
+ },
1164
+ notifList: {
1165
+ flexGrow: 0
1166
+ },
1167
+ notifListContent: {
1168
+ paddingVertical: 6
1169
+ },
1170
+ notifRow: {
1171
+ paddingHorizontal: 16,
1172
+ paddingVertical: 12,
1173
+ borderLeftWidth: 3,
1174
+ borderLeftColor: 'transparent',
1175
+ gap: 3
1176
+ },
1177
+ notifRowUnread: {
1178
+ borderLeftColor: COLORS.gold,
1179
+ backgroundColor: 'rgba(255,215,0,0.06)'
1180
+ },
1181
+ notifItemTitle: {
1182
+ fontSize: 13,
1183
+ fontWeight: '700',
1184
+ color: '#fff'
1185
+ },
1186
+ notifItemBody: {
1187
+ fontSize: 12,
1188
+ color: COLORS.slateLight,
1189
+ lineHeight: 17
1190
+ },
1191
+ notifItemDate: {
1192
+ fontSize: 10,
1193
+ color: COLORS.slateDark,
1194
+ marginTop: 1
1195
+ },
1196
+ notifEmpty: {
1197
+ alignItems: 'center',
1198
+ paddingVertical: 40
1199
+ },
1200
+ notifEmptyText: {
1201
+ fontSize: 13,
1202
+ color: COLORS.slateLight
1203
+ }
1204
+ });
1205
+ export default Leaderboard;
1206
+ //# sourceMappingURL=Leaderboard.js.map