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,808 @@
1
+ "use strict";
2
+
3
+ import React, { useEffect, useMemo, useRef, useState, useCallback } from 'react';
4
+ import { View, Text, StyleSheet, Animated, Easing, ScrollView } from 'react-native';
5
+ import { COLORS } from "../constants.js";
6
+ import { sounds } from "../SoundManager.js";
7
+ import { haptics } from "../HapticsManager.js";
8
+ import MonflowtsButton from "../components/MonflowtsButton.js";
9
+ import MonflowtsPressable from "../components/MonflowtsPressable.js";
10
+ import SideDemoTab from "../components/SideDemoTab.js";
11
+ import AnimatedAmount from "../components/AnimatedAmount.js";
12
+ import CoinFlyOverlay from "../components/CoinFlyOverlay.js";
13
+ import { BurstLayer } from "../effects/EffectBurst.js";
14
+ import { sparkBurstAnim, coinBurstAnim } from "../effects/particleAnims.js";
15
+ import HypeCallout from "../components/HypeCallout.js";
16
+ import { HYPE_PHRASES, pickPhrase } from "../effects/hypePhrases.js";
17
+ import { useScreenShake } from "../hooks/useScreenShake.js";
18
+ import { usePlinko } from "../hooks/usePlinko.js";
19
+ import { useCurrency } from "../hooks/useCurrency.js";
20
+ import { useResponsive } from "../hooks/useResponsive.js";
21
+ import { useGameStore } from "../stores/gameStore.js";
22
+ import { gameRules } from "../content.js";
23
+ import { useSettingsStore } from "../stores/settingsStore.js";
24
+ import { t, formatNumber } from "../i18n.js";
25
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
26
+ const RISK_LABEL_KEYS = {
27
+ LOW: 'plinko.risk.low',
28
+ MED: 'plinko.risk.med',
29
+ HIGH: 'plinko.risk.high'
30
+ };
31
+ const BOARD_MAX_WIDTH = 380;
32
+ function bucketColor(m) {
33
+ if (m >= 10) return '#E8A33D';
34
+ if (m >= 3) return '#8B8CE8';
35
+ if (m >= 1) return '#5B50D6';
36
+ return '#2A3042';
37
+ }
38
+ function bucketLabelColor(m) {
39
+ if (m >= 10) return '#E8A33D';
40
+ if (m >= 3) return '#A9AAF0';
41
+ if (m >= 1) return '#8F86E8';
42
+ return '#8A93A8';
43
+ }
44
+ function fmtMult(m) {
45
+ if (m >= 10) return `${Math.round(m)}x`;
46
+ return `${Math.round(m * 10) / 10}x`;
47
+ }
48
+ const Freefall = ({
49
+ onBack,
50
+ onWin,
51
+ onLose,
52
+ balance,
53
+ game
54
+ }) => {
55
+ const currency = useCurrency();
56
+ const {
57
+ drop,
58
+ isBusy,
59
+ errorRef
60
+ } = usePlinko();
61
+ const demoMode = useGameStore(s => s.demoMode);
62
+ const demoBalance = useGameStore(s => s.demoBalance);
63
+ const reducedMotion = useSettingsStore(s => s.reducedMotion);
64
+ const displayBalance = demoMode ? demoBalance : balance;
65
+ const {
66
+ shake,
67
+ shakeStyle
68
+ } = useScreenShake();
69
+ const {
70
+ width,
71
+ columnWidth
72
+ } = useResponsive();
73
+ const boardWidth = Math.min(columnWidth - 40, BOARD_MAX_WIDTH);
74
+ const rules = game?.gameplayRules ?? {};
75
+ const fallbackRules = gameRules('PLINKO');
76
+ const rowsOptions = rules.rowsOptions ?? fallbackRules.rowsOptions ?? [];
77
+ const riskOptions = rules.riskLevels ?? fallbackRules.riskLevels ?? [];
78
+ const stakeOptionsKobo = rules.stakeOptions ?? fallbackRules.stakeOptions ?? [];
79
+ const stakeOptions = useMemo(() => stakeOptionsKobo.map(s => Math.max(1, Math.round(s / 100))), [stakeOptionsKobo]);
80
+ const [rows, setRows] = useState(rules.defaultRows ?? rowsOptions[Math.floor(rowsOptions.length / 2)] ?? 12);
81
+ const [risk, setRisk] = useState(rules.defaultRisk ?? fallbackRules.defaultRisk ?? riskOptions[0] ?? '');
82
+ const [stake, setStake] = useState(stakeOptions[Math.floor(stakeOptions.length / 2)] ?? 100);
83
+ const [result, setResult] = useState(null);
84
+ const [lastResults, setLastResults] = useState([]);
85
+ const [dropping, setDropping] = useState(false);
86
+ useEffect(() => {
87
+ sounds.playGameTheme('plinko');
88
+ }, []);
89
+ const [activeRow, setActiveRow] = useState(-1);
90
+ const [hitSlot, setHitSlot] = useState(-1);
91
+ const [bursts, setBursts] = useState([]);
92
+ const burstId = useRef(0);
93
+ const coinFlyRef = useRef(null);
94
+ const hypeRef = useRef(null);
95
+ const balancePillRef = useRef(null);
96
+ const resultTimerRef = useRef(null);
97
+ const table = rules.riskTables?.[risk]?.[String(rows)] ?? [];
98
+ const ballX = useRef(new Animated.Value(0)).current;
99
+ const ballY = useRef(new Animated.Value(0)).current;
100
+ const ballOpacity = useRef(new Animated.Value(0)).current;
101
+ const resultScale = useRef(new Animated.Value(0)).current;
102
+ const slotPulse = useRef(new Animated.Value(1)).current;
103
+ const slotWidth = boardWidth / (rows + 1);
104
+ const rowHeight = Math.min(18, 280 / rows);
105
+ const boardHeight = rowHeight * rows;
106
+ const spawnBurst = useCallback((make, x, y, size = 160) => {
107
+ const id = ++burstId.current;
108
+ setBursts(prev => [...prev, {
109
+ id,
110
+ make,
111
+ x,
112
+ y,
113
+ size
114
+ }]);
115
+ }, []);
116
+ const removeBurst = useCallback(id => {
117
+ setBursts(prev => prev.filter(b => b.id !== id));
118
+ }, []);
119
+ const animateDrop = useCallback(outcome => new Promise(resolve => {
120
+ if (reducedMotion) {
121
+ setActiveRow(-1);
122
+ resolve();
123
+ return;
124
+ }
125
+ const path = outcome.path;
126
+ const pocketY = boardHeight + 60;
127
+ let offset = 0;
128
+ ballX.setValue(0);
129
+ ballY.setValue(0);
130
+ ballOpacity.setValue(1);
131
+ const runStep = i => {
132
+ if (i >= path.length) {
133
+ setActiveRow(-1);
134
+ Animated.parallel([Animated.timing(ballY, {
135
+ toValue: pocketY,
136
+ duration: 110,
137
+ easing: Easing.in(Easing.quad),
138
+ useNativeDriver: true
139
+ }), Animated.timing(ballOpacity, {
140
+ toValue: 0,
141
+ duration: 130,
142
+ delay: 70,
143
+ useNativeDriver: true
144
+ })]).start(() => resolve());
145
+ return;
146
+ }
147
+ setActiveRow(i);
148
+ sounds.playMetalPing(i);
149
+ offset += (path[i] === 'R' ? 1 : -1) * (slotWidth / 2);
150
+ const dur = Math.max(34, 120 / Math.sqrt(i + 1));
151
+ Animated.parallel([Animated.timing(ballY, {
152
+ toValue: (i + 1) * rowHeight,
153
+ duration: dur,
154
+ easing: Easing.linear,
155
+ useNativeDriver: true
156
+ }), Animated.timing(ballX, {
157
+ toValue: offset,
158
+ duration: dur,
159
+ easing: Easing.out(Easing.quad),
160
+ useNativeDriver: true
161
+ })]).start(() => runStep(i + 1));
162
+ };
163
+ runStep(0);
164
+ }), [ballX, ballY, ballOpacity, slotWidth, rowHeight, boardHeight, reducedMotion]);
165
+ const onDrop = useCallback(async () => {
166
+ if (dropping || isBusy) return;
167
+ if (resultTimerRef.current) clearTimeout(resultTimerRef.current);
168
+ setResult(null);
169
+ setHitSlot(-1);
170
+ resultScale.setValue(0);
171
+ setDropping(true);
172
+ sounds.playWhoosh();
173
+ haptics.selection();
174
+ const outcome = await drop(rows, risk, stake * 100);
175
+ if (!outcome) {
176
+ setDropping(false);
177
+ return;
178
+ }
179
+ await animateDrop(outcome);
180
+ setHitSlot(outcome.slot);
181
+ const slotX = outcome.slot * slotWidth + slotWidth / 2;
182
+ const slotY = boardHeight + 52;
183
+ spawnBurst(sparkBurstAnim, slotX, slotY, 140);
184
+ Animated.sequence([Animated.timing(slotPulse, {
185
+ toValue: 1.35,
186
+ duration: 110,
187
+ useNativeDriver: true
188
+ }), Animated.spring(slotPulse, {
189
+ toValue: 1,
190
+ friction: 3,
191
+ useNativeDriver: true
192
+ })]).start();
193
+ setResult(outcome);
194
+ setLastResults(prev => [outcome.multiplier, ...prev].slice(0, 5));
195
+ Animated.spring(resultScale, {
196
+ toValue: 1,
197
+ friction: 5,
198
+ tension: 90,
199
+ useNativeDriver: true
200
+ }).start();
201
+ if (resultTimerRef.current) clearTimeout(resultTimerRef.current);
202
+ resultTimerRef.current = setTimeout(() => {
203
+ Animated.timing(resultScale, {
204
+ toValue: 0,
205
+ duration: 180,
206
+ useNativeDriver: true
207
+ }).start(() => setResult(null));
208
+ }, 4000);
209
+ setDropping(false);
210
+ if (outcome.amountWonKobo > 0) {
211
+ shake(0.7);
212
+ spawnBurst(coinBurstAnim, slotX, slotY, 220);
213
+ sounds.playWinChime();
214
+ haptics.success();
215
+ hypeRef.current?.show(pickPhrase(outcome.multiplier >= 10 ? HYPE_PHRASES.plinko.bigWin : HYPE_PHRASES.plinko.win), outcome.multiplier >= 10 ? 'boost' : 'win');
216
+ if (outcome.multiplier >= 10) sounds.playBigWin();
217
+ coinFlyRef.current?.measureTarget();
218
+ coinFlyRef.current?.fly(width / 2, 430);
219
+ onWin(Math.round(outcome.amountWonKobo / 100));
220
+ } else {
221
+ shake(0.4);
222
+ sounds.playPoof();
223
+ haptics.warning();
224
+ hypeRef.current?.show(pickPhrase(HYPE_PHRASES.plinko.loss), 'loss');
225
+ setTimeout(() => sounds.playNearMiss(), 400);
226
+ onLose?.();
227
+ }
228
+ }, [dropping, isBusy, drop, rows, risk, stake, animateDrop, onWin, onLose, ballOpacity, slotWidth, boardHeight, spawnBurst, shake, resultScale, slotPulse, width]);
229
+ return /*#__PURE__*/_jsxs(View, {
230
+ style: styles.container,
231
+ children: [/*#__PURE__*/_jsxs(View, {
232
+ style: styles.header,
233
+ children: [/*#__PURE__*/_jsx(MonflowtsPressable, {
234
+ style: styles.circleBtn,
235
+ onPress: onBack,
236
+ children: /*#__PURE__*/_jsx(Text, {
237
+ style: styles.circleBtnText,
238
+ children: '‹'
239
+ })
240
+ }), /*#__PURE__*/_jsxs(View, {
241
+ style: styles.titleWrap,
242
+ children: [/*#__PURE__*/_jsx(Text, {
243
+ style: styles.title,
244
+ children: t('plinko.title')
245
+ }), /*#__PURE__*/_jsx(Text, {
246
+ style: [styles.modeBadge, demoMode ? styles.modeDemo : styles.modeLive],
247
+ children: demoMode ? t('plinko.mode.demo') : t('plinko.mode.live')
248
+ })]
249
+ }), /*#__PURE__*/_jsx(View, {
250
+ ref: balancePillRef,
251
+ onLayout: () => coinFlyRef.current?.measureTarget(),
252
+ style: styles.balancePill,
253
+ children: /*#__PURE__*/_jsx(AnimatedAmount, {
254
+ value: displayBalance,
255
+ prefix: `${currency} `,
256
+ style: styles.balanceText
257
+ })
258
+ })]
259
+ }), /*#__PURE__*/_jsx(SideDemoTab, {
260
+ enabled: !!game?.demoConfig?.enabled
261
+ }), /*#__PURE__*/_jsxs(ScrollView, {
262
+ contentContainerStyle: styles.scroll,
263
+ children: [/*#__PURE__*/_jsxs(Animated.View, {
264
+ style: [styles.scene, shakeStyle],
265
+ children: [/*#__PURE__*/_jsx(HypeCallout, {
266
+ ref: hypeRef,
267
+ style: {
268
+ top: 120
269
+ }
270
+ }), /*#__PURE__*/_jsx(View, {
271
+ style: [styles.board, {
272
+ width: boardWidth,
273
+ height: boardHeight + 40
274
+ }],
275
+ children: Array.from({
276
+ length: rows
277
+ }).map((_, r) => /*#__PURE__*/_jsx(View, {
278
+ style: [styles.pegRow, {
279
+ top: r * rowHeight + 8
280
+ }],
281
+ children: Array.from({
282
+ length: r + 2
283
+ }).map((__, c) => /*#__PURE__*/_jsx(View, {
284
+ style: [styles.pegCell, {
285
+ width: slotWidth
286
+ }],
287
+ children: /*#__PURE__*/_jsx(View, {
288
+ style: [styles.peg, activeRow === r && styles.pegActive]
289
+ })
290
+ }, c))
291
+ }, r))
292
+ }), /*#__PURE__*/_jsx(View, {
293
+ style: [styles.slotRow, {
294
+ width: boardWidth
295
+ }],
296
+ children: table.map((m, i) => /*#__PURE__*/_jsxs(Animated.View, {
297
+ style: [styles.bucketWrap, {
298
+ width: slotWidth
299
+ }, hitSlot === i && {
300
+ transform: [{
301
+ scale: slotPulse
302
+ }]
303
+ }],
304
+ children: [/*#__PURE__*/_jsx(View, {
305
+ style: [styles.bucket, {
306
+ width: Math.max(12, slotWidth - 10),
307
+ borderTopWidth: Math.min(30, slotWidth * 1.05),
308
+ borderTopColor: bucketColor(m)
309
+ }, hitSlot === i && styles.bucketHit]
310
+ }), /*#__PURE__*/_jsx(Text, {
311
+ style: [styles.bucketLabel, {
312
+ color: bucketLabelColor(m)
313
+ }],
314
+ numberOfLines: 1,
315
+ adjustsFontSizeToFit: true,
316
+ minimumFontScale: 0.5,
317
+ children: fmtMult(m)
318
+ })]
319
+ }, i))
320
+ }), /*#__PURE__*/_jsx(Animated.View, {
321
+ pointerEvents: "none",
322
+ style: [styles.ball, {
323
+ left: boardWidth / 2 - 7,
324
+ opacity: ballOpacity,
325
+ transform: [{
326
+ translateX: ballX
327
+ }, {
328
+ translateY: ballY
329
+ }]
330
+ }]
331
+ }), /*#__PURE__*/_jsx(BurstLayer, {
332
+ bursts: bursts,
333
+ onDone: removeBurst
334
+ }), result && /*#__PURE__*/_jsxs(Animated.View, {
335
+ pointerEvents: "none",
336
+ style: [styles.resultCard, result.amountWonKobo > 0 ? styles.resultWin : styles.resultLoss, {
337
+ top: boardHeight + 104,
338
+ transform: [{
339
+ scale: resultScale
340
+ }]
341
+ }],
342
+ children: [/*#__PURE__*/_jsxs(Text, {
343
+ style: styles.resultMult,
344
+ children: [result.multiplier, "x"]
345
+ }), result.amountWonKobo > 0 ? /*#__PURE__*/_jsx(AnimatedAmount, {
346
+ value: Math.round(result.amountWonKobo / 100),
347
+ prefix: `+${currency} `,
348
+ style: styles.resultAmount
349
+ }) : /*#__PURE__*/_jsx(Text, {
350
+ style: styles.resultAmount,
351
+ children: t('plinko.noPayout')
352
+ }), /*#__PURE__*/_jsx(Text, {
353
+ style: styles.fairText,
354
+ children: t('plinko.fair', {
355
+ hash: result.serverSeedHash.slice(0, 16),
356
+ nonce: result.nonce
357
+ })
358
+ })]
359
+ })]
360
+ }), lastResults.length > 0 && /*#__PURE__*/_jsxs(View, {
361
+ style: styles.lastRow,
362
+ children: [/*#__PURE__*/_jsx(Text, {
363
+ style: styles.lastLabel,
364
+ children: t('plinko.last')
365
+ }), lastResults.map((m, i) => /*#__PURE__*/_jsx(View, {
366
+ style: [styles.lastChip, m >= 1 && styles.lastChipWin],
367
+ children: /*#__PURE__*/_jsxs(Text, {
368
+ style: [styles.lastChipText, m >= 1 && styles.lastChipTextWin],
369
+ children: [m, "x"]
370
+ })
371
+ }, i))]
372
+ }), /*#__PURE__*/_jsxs(View, {
373
+ style: styles.controlsRow,
374
+ children: [/*#__PURE__*/_jsxs(View, {
375
+ style: styles.controlCard,
376
+ children: [/*#__PURE__*/_jsx(Text, {
377
+ style: styles.betLabel,
378
+ children: t('plinko.rows')
379
+ }), /*#__PURE__*/_jsx(View, {
380
+ style: styles.segRow,
381
+ children: rowsOptions.map(r => /*#__PURE__*/_jsx(MonflowtsPressable, {
382
+ disabled: dropping,
383
+ onPress: () => setRows(r),
384
+ style: [styles.segBtn, rows === r && styles.segBtnActive],
385
+ children: /*#__PURE__*/_jsx(Text, {
386
+ style: [styles.segText, rows === r && styles.segTextActive],
387
+ children: r
388
+ })
389
+ }, r))
390
+ })]
391
+ }), /*#__PURE__*/_jsxs(View, {
392
+ style: styles.controlCard,
393
+ children: [/*#__PURE__*/_jsx(Text, {
394
+ style: styles.betLabel,
395
+ children: t('plinko.risk')
396
+ }), /*#__PURE__*/_jsx(View, {
397
+ style: styles.segRow,
398
+ children: riskOptions.map(r => /*#__PURE__*/_jsx(MonflowtsPressable, {
399
+ disabled: dropping,
400
+ onPress: () => setRisk(r),
401
+ style: [styles.segBtn, risk === r && styles.segBtnActive],
402
+ children: /*#__PURE__*/_jsx(Text, {
403
+ style: [styles.segText, risk === r && styles.segTextActive],
404
+ children: RISK_LABEL_KEYS[r] ? t(RISK_LABEL_KEYS[r]) : r
405
+ })
406
+ }, r))
407
+ })]
408
+ })]
409
+ }), /*#__PURE__*/_jsxs(View, {
410
+ style: styles.betCard,
411
+ children: [/*#__PURE__*/_jsxs(View, {
412
+ children: [/*#__PURE__*/_jsx(Text, {
413
+ style: styles.betLabel,
414
+ children: t('plinko.bet')
415
+ }), /*#__PURE__*/_jsxs(View, {
416
+ style: styles.stepperRow,
417
+ children: [/*#__PURE__*/_jsx(MonflowtsPressable, {
418
+ style: styles.stepBtn,
419
+ disabled: dropping,
420
+ onPress: () => {
421
+ const i = stakeOptions.indexOf(stake);
422
+ if (i > 0) setStake(stakeOptions[i - 1]);
423
+ haptics.selection();
424
+ },
425
+ children: /*#__PURE__*/_jsx(Text, {
426
+ style: styles.stepBtnText,
427
+ children: "\u2212"
428
+ })
429
+ }), /*#__PURE__*/_jsx(Text, {
430
+ style: styles.betValue,
431
+ children: formatNumber(stake)
432
+ }), /*#__PURE__*/_jsx(MonflowtsPressable, {
433
+ style: styles.stepBtn,
434
+ disabled: dropping,
435
+ onPress: () => {
436
+ const i = stakeOptions.indexOf(stake);
437
+ if (i >= 0 && i < stakeOptions.length - 1) setStake(stakeOptions[i + 1]);
438
+ haptics.selection();
439
+ },
440
+ children: /*#__PURE__*/_jsx(Text, {
441
+ style: styles.stepBtnText,
442
+ children: "+"
443
+ })
444
+ })]
445
+ })]
446
+ }), /*#__PURE__*/_jsxs(View, {
447
+ style: styles.betRight,
448
+ children: [/*#__PURE__*/_jsx(Text, {
449
+ style: styles.betLabel,
450
+ children: t('plinko.maxWin')
451
+ }), /*#__PURE__*/_jsx(Text, {
452
+ style: styles.maxWin,
453
+ children: formatNumber(Math.floor(stake * (table.length ? Math.max(...table) : 1)))
454
+ })]
455
+ })]
456
+ }), errorRef.current && !dropping && /*#__PURE__*/_jsx(Text, {
457
+ style: styles.error,
458
+ children: errorRef.current
459
+ })]
460
+ }), /*#__PURE__*/_jsx(CoinFlyOverlay, {
461
+ ref: coinFlyRef,
462
+ targetRef: balancePillRef
463
+ }), /*#__PURE__*/_jsx(View, {
464
+ style: styles.footer,
465
+ children: /*#__PURE__*/_jsx(MonflowtsButton, {
466
+ title: dropping ? t('plinko.dropping') : t('plinko.dropBall', {
467
+ amount: formatNumber(stake)
468
+ }),
469
+ onPress: onDrop,
470
+ pulse: !dropping,
471
+ loading: dropping || isBusy,
472
+ disabled: dropping || isBusy || stake > displayBalance,
473
+ variant: "shine"
474
+ })
475
+ })]
476
+ });
477
+ };
478
+ const styles = StyleSheet.create({
479
+ container: {
480
+ flex: 1,
481
+ backgroundColor: COLORS.backgroundDark
482
+ },
483
+ header: {
484
+ flexDirection: 'row',
485
+ alignItems: 'center',
486
+ justifyContent: 'space-between',
487
+ paddingHorizontal: 16,
488
+ paddingTop: 52,
489
+ paddingBottom: 12
490
+ },
491
+ circleBtn: {
492
+ width: 40,
493
+ height: 40,
494
+ borderRadius: 20,
495
+ backgroundColor: COLORS.white10,
496
+ alignItems: 'center',
497
+ justifyContent: 'center'
498
+ },
499
+ circleBtnText: {
500
+ color: '#fff',
501
+ fontSize: 24,
502
+ marginTop: -2
503
+ },
504
+ titleWrap: {
505
+ flexDirection: 'row',
506
+ alignItems: 'center',
507
+ gap: 8
508
+ },
509
+ title: {
510
+ color: '#fff',
511
+ fontSize: 20,
512
+ fontWeight: '800'
513
+ },
514
+ modeBadge: {
515
+ fontSize: 10,
516
+ fontWeight: '800',
517
+ paddingHorizontal: 6,
518
+ paddingVertical: 2,
519
+ borderRadius: 6,
520
+ overflow: 'hidden'
521
+ },
522
+ modeDemo: {
523
+ backgroundColor: COLORS.gold,
524
+ color: '#000'
525
+ },
526
+ modeLive: {
527
+ backgroundColor: COLORS.winGreen,
528
+ color: '#fff'
529
+ },
530
+ balancePill: {
531
+ backgroundColor: COLORS.white10,
532
+ paddingHorizontal: 12,
533
+ paddingVertical: 6,
534
+ borderRadius: 16
535
+ },
536
+ balanceText: {
537
+ color: COLORS.gold,
538
+ fontWeight: '700',
539
+ fontSize: 13
540
+ },
541
+ scroll: {
542
+ alignItems: 'center',
543
+ paddingBottom: 24
544
+ },
545
+ scene: {
546
+ alignItems: 'center',
547
+ zIndex: 20,
548
+ elevation: 20
549
+ },
550
+ board: {
551
+ backgroundColor: COLORS.cardDarker,
552
+ borderRadius: 18,
553
+ marginTop: 8,
554
+ overflow: 'hidden',
555
+ borderWidth: 1,
556
+ borderColor: COLORS.white10
557
+ },
558
+ pegRow: {
559
+ position: 'absolute',
560
+ width: '100%',
561
+ flexDirection: 'row',
562
+ justifyContent: 'center'
563
+ },
564
+ pegCell: {
565
+ alignItems: 'center',
566
+ justifyContent: 'center'
567
+ },
568
+ peg: {
569
+ width: 8,
570
+ height: 8,
571
+ borderRadius: 4,
572
+ backgroundColor: '#3d4761'
573
+ },
574
+ pegActive: {
575
+ backgroundColor: '#F5D08C'
576
+ },
577
+ ball: {
578
+ position: 'absolute',
579
+ top: 10,
580
+ width: 15,
581
+ height: 15,
582
+ borderRadius: 8,
583
+ backgroundColor: '#F5D08C',
584
+ shadowColor: '#F5A83D',
585
+ shadowOpacity: 0.9,
586
+ shadowRadius: 7,
587
+ shadowOffset: {
588
+ width: 0,
589
+ height: 0
590
+ },
591
+ zIndex: 5
592
+ },
593
+ slotRow: {
594
+ flexDirection: 'row',
595
+ justifyContent: 'center',
596
+ marginTop: 4
597
+ },
598
+ bucketWrap: {
599
+ alignItems: 'center'
600
+ },
601
+ bucket: {
602
+ height: 0,
603
+ borderLeftWidth: 5,
604
+ borderRightWidth: 5,
605
+ borderLeftColor: 'transparent',
606
+ borderRightColor: 'transparent'
607
+ },
608
+ bucketHit: {
609
+ opacity: 0.85
610
+ },
611
+ bucketLabel: {
612
+ fontSize: 10,
613
+ fontWeight: '800',
614
+ marginTop: 4
615
+ },
616
+ lastRow: {
617
+ flexDirection: 'row',
618
+ alignItems: 'center',
619
+ gap: 8,
620
+ alignSelf: 'flex-start',
621
+ paddingHorizontal: 22,
622
+ marginTop: 14
623
+ },
624
+ lastLabel: {
625
+ color: COLORS.slateLight,
626
+ fontSize: 13,
627
+ fontWeight: '600'
628
+ },
629
+ lastChip: {
630
+ paddingHorizontal: 12,
631
+ paddingVertical: 5,
632
+ borderRadius: 12,
633
+ backgroundColor: COLORS.cardDark
634
+ },
635
+ lastChipWin: {
636
+ backgroundColor: 'rgba(34,197,94,0.15)'
637
+ },
638
+ lastChipText: {
639
+ color: COLORS.slateLight,
640
+ fontSize: 13,
641
+ fontWeight: '700'
642
+ },
643
+ lastChipTextWin: {
644
+ color: COLORS.winGreen
645
+ },
646
+ controlsRow: {
647
+ flexDirection: 'row',
648
+ gap: 10,
649
+ width: '92%',
650
+ alignSelf: 'center',
651
+ marginTop: 14
652
+ },
653
+ controlCard: {
654
+ flex: 1,
655
+ backgroundColor: COLORS.cardDark,
656
+ borderRadius: 16,
657
+ padding: 12,
658
+ borderWidth: 1,
659
+ borderColor: COLORS.white05
660
+ },
661
+ segRow: {
662
+ flexDirection: 'row',
663
+ backgroundColor: 'rgba(0,0,0,0.35)',
664
+ borderRadius: 12,
665
+ padding: 3,
666
+ marginTop: 8
667
+ },
668
+ segBtn: {
669
+ flex: 1,
670
+ paddingVertical: 8,
671
+ borderRadius: 9,
672
+ alignItems: 'center'
673
+ },
674
+ segBtnActive: {
675
+ backgroundColor: '#5B50D6'
676
+ },
677
+ segText: {
678
+ color: COLORS.slateLight,
679
+ fontSize: 14,
680
+ fontWeight: '700'
681
+ },
682
+ segTextActive: {
683
+ color: '#fff'
684
+ },
685
+ resultCard: {
686
+ position: 'absolute',
687
+ alignSelf: 'center',
688
+ paddingVertical: 14,
689
+ paddingHorizontal: 28,
690
+ borderRadius: 18,
691
+ alignItems: 'center',
692
+ borderWidth: 1,
693
+ backgroundColor: 'rgba(10,14,26,0.92)',
694
+ zIndex: 30
695
+ },
696
+ resultWin: {
697
+ backgroundColor: 'rgba(14,38,26,0.95)',
698
+ borderColor: COLORS.winGreen,
699
+ shadowColor: COLORS.winGreen,
700
+ shadowOpacity: 0.5,
701
+ shadowRadius: 12
702
+ },
703
+ resultLoss: {
704
+ backgroundColor: 'rgba(40,17,20,0.95)',
705
+ borderColor: COLORS.lossRed
706
+ },
707
+ resultMult: {
708
+ color: '#fff',
709
+ fontSize: 32,
710
+ fontWeight: '900'
711
+ },
712
+ resultAmount: {
713
+ color: COLORS.gold,
714
+ fontSize: 17,
715
+ fontWeight: '800',
716
+ marginTop: 2
717
+ },
718
+ fairText: {
719
+ color: COLORS.slateLight,
720
+ fontSize: 10,
721
+ marginTop: 6
722
+ },
723
+ selectorLabel: {
724
+ color: COLORS.slateLight,
725
+ alignSelf: 'flex-start',
726
+ marginLeft: 24,
727
+ marginTop: 16,
728
+ marginBottom: 6,
729
+ fontSize: 12,
730
+ fontWeight: '700',
731
+ textTransform: 'uppercase'
732
+ },
733
+ chipRow: {
734
+ flexDirection: 'row',
735
+ flexWrap: 'wrap',
736
+ paddingHorizontal: 18,
737
+ gap: 8
738
+ },
739
+ error: {
740
+ color: COLORS.lossRed,
741
+ marginTop: 12,
742
+ paddingHorizontal: 24,
743
+ textAlign: 'center'
744
+ },
745
+ footer: {
746
+ padding: 16,
747
+ paddingBottom: 28
748
+ },
749
+ betCard: {
750
+ flexDirection: 'row',
751
+ alignItems: 'center',
752
+ justifyContent: 'space-between',
753
+ alignSelf: 'center',
754
+ width: '90%',
755
+ marginTop: 18,
756
+ paddingVertical: 14,
757
+ paddingHorizontal: 18,
758
+ borderRadius: 18,
759
+ backgroundColor: COLORS.cardDark,
760
+ borderWidth: 1,
761
+ borderColor: COLORS.white05
762
+ },
763
+ betLabel: {
764
+ color: COLORS.slateLight,
765
+ fontSize: 11,
766
+ fontWeight: '700',
767
+ textTransform: 'uppercase',
768
+ letterSpacing: 0.5
769
+ },
770
+ stepperRow: {
771
+ flexDirection: 'row',
772
+ alignItems: 'center',
773
+ gap: 12,
774
+ marginTop: 8
775
+ },
776
+ stepBtn: {
777
+ width: 36,
778
+ height: 36,
779
+ borderRadius: 11,
780
+ backgroundColor: COLORS.white10,
781
+ alignItems: 'center',
782
+ justifyContent: 'center'
783
+ },
784
+ stepBtnText: {
785
+ color: '#fff',
786
+ fontSize: 20,
787
+ fontWeight: '800',
788
+ marginTop: -2
789
+ },
790
+ betValue: {
791
+ color: COLORS.gold,
792
+ fontSize: 20,
793
+ fontWeight: '900',
794
+ minWidth: 64,
795
+ textAlign: 'center'
796
+ },
797
+ betRight: {
798
+ alignItems: 'flex-end'
799
+ },
800
+ maxWin: {
801
+ color: COLORS.winGreen,
802
+ fontSize: 20,
803
+ fontWeight: '900',
804
+ marginTop: 8
805
+ }
806
+ });
807
+ export default Freefall;
808
+ //# sourceMappingURL=Freefall.js.map