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.
- package/LICENSE +20 -0
- package/Monflowts.podspec +22 -0
- package/README.md +229 -2
- package/android/build.gradle +58 -0
- package/android/src/main/AndroidManifest.xml +8 -0
- package/android/src/main/java/com/monflowts/MonflowtsAssetsModule.kt +219 -0
- package/android/src/main/java/com/monflowts/MonflowtsCrashFeedModule.kt +175 -0
- package/android/src/main/java/com/monflowts/MonflowtsHapticModule.kt +170 -0
- package/android/src/main/java/com/monflowts/MonflowtsLottieView.kt +96 -0
- package/android/src/main/java/com/monflowts/MonflowtsLottieViewManager.kt +53 -0
- package/android/src/main/java/com/monflowts/MonflowtsPackage.kt +70 -0
- package/android/src/main/java/com/monflowts/MonflowtsSoundModule.kt +132 -0
- package/android/src/main/java/com/monflowts/MonflowtsSpeechModule.kt +81 -0
- package/android/src/main/java/com/monflowts/MonflowtsSvgView.kt +355 -0
- package/android/src/main/java/com/monflowts/MonflowtsSvgViewManager.kt +59 -0
- package/android/src/main/java/com/monflowts/MonflowtsWebView.kt +86 -0
- package/android/src/main/java/com/monflowts/MonflowtsWebViewManager.kt +33 -0
- package/android/src/main/java/com/monflowts/MonflowtsWheelView.kt +98 -0
- package/android/src/main/java/com/monflowts/MonflowtsWheelViewManager.kt +46 -0
- package/ios/Monflowts-Bridging-Header.h +5 -0
- package/ios/MonflowtsAssetsBridge.m +14 -0
- package/ios/MonflowtsAssetsModule.swift +217 -0
- package/ios/MonflowtsCrashFeedBridge.m +9 -0
- package/ios/MonflowtsCrashFeedModule.swift +88 -0
- package/ios/MonflowtsHTTP1EventSource.swift +296 -0
- package/ios/MonflowtsHapticBridge.m +8 -0
- package/ios/MonflowtsHapticModule.swift +55 -0
- package/ios/MonflowtsLottieBridge.m +12 -0
- package/ios/MonflowtsLottieUIView.swift +95 -0
- package/ios/MonflowtsLottieViewManager.swift +13 -0
- package/ios/MonflowtsSSEParser.swift +58 -0
- package/ios/MonflowtsSoundBridge.m +8 -0
- package/ios/MonflowtsSoundModule.swift +100 -0
- package/ios/MonflowtsSpeechBridge.m +9 -0
- package/ios/MonflowtsSpeechModule.swift +61 -0
- package/ios/MonflowtsSvgBridge.m +11 -0
- package/ios/MonflowtsSvgUIView.swift +431 -0
- package/ios/MonflowtsSvgViewManager.swift +13 -0
- package/ios/MonflowtsWebBridge.m +8 -0
- package/ios/MonflowtsWebUIView.swift +92 -0
- package/ios/MonflowtsWebViewManager.swift +14 -0
- package/ios/MonflowtsWheelBridge.m +7 -0
- package/ios/MonflowtsWheelUIView.swift +126 -0
- package/ios/MonflowtsWheelViewManager.swift +14 -0
- package/lib/module/HapticsManager.js +93 -0
- package/lib/module/HapticsManager.js.map +1 -0
- package/lib/module/HubContent.js +642 -0
- package/lib/module/HubContent.js.map +1 -0
- package/lib/module/Icons.js +64 -0
- package/lib/module/Icons.js.map +1 -0
- package/lib/module/MonflowtsHub.js +233 -0
- package/lib/module/MonflowtsHub.js.map +1 -0
- package/lib/module/NativeLottieView.js +6 -0
- package/lib/module/NativeLottieView.js.map +1 -0
- package/lib/module/NativeSvgView.js +6 -0
- package/lib/module/NativeSvgView.js.map +1 -0
- package/lib/module/NativeWebView.js +14 -0
- package/lib/module/NativeWebView.js.map +1 -0
- package/lib/module/NativeWheelView.js +6 -0
- package/lib/module/NativeWheelView.js.map +1 -0
- package/lib/module/SoundManager.js +120 -0
- package/lib/module/SoundManager.js.map +1 -0
- package/lib/module/SpeechManager.js +40 -0
- package/lib/module/SpeechManager.js.map +1 -0
- package/lib/module/api/client.js +109 -0
- package/lib/module/api/client.js.map +1 -0
- package/lib/module/api/gameTypes.js +2 -0
- package/lib/module/api/gameTypes.js.map +1 -0
- package/lib/module/api/http.js +252 -0
- package/lib/module/api/http.js.map +1 -0
- package/lib/module/api/mutations.js +359 -0
- package/lib/module/api/mutations.js.map +1 -0
- package/lib/module/api/playerTypes.js +2 -0
- package/lib/module/api/playerTypes.js.map +1 -0
- package/lib/module/api/queries.js +403 -0
- package/lib/module/api/queries.js.map +1 -0
- package/lib/module/api/sdkTypes.js +2 -0
- package/lib/module/api/sdkTypes.js.map +1 -0
- package/lib/module/assets/assetKeys.js +4 -0
- package/lib/module/assets/assetKeys.js.map +1 -0
- package/lib/module/assets/assetSync.js +61 -0
- package/lib/module/assets/assetSync.js.map +1 -0
- package/lib/module/assets/nativeAssets.js +25 -0
- package/lib/module/assets/nativeAssets.js.map +1 -0
- package/lib/module/assets/remote.js +47 -0
- package/lib/module/assets/remote.js.map +1 -0
- package/lib/module/components/AbandonPolicyNotice.js +200 -0
- package/lib/module/components/AbandonPolicyNotice.js.map +1 -0
- package/lib/module/components/AnimatedAmount.js +39 -0
- package/lib/module/components/AnimatedAmount.js.map +1 -0
- package/lib/module/components/CoinFlyOverlay.js +157 -0
- package/lib/module/components/CoinFlyOverlay.js.map +1 -0
- package/lib/module/components/GameCharacter.js +45 -0
- package/lib/module/components/GameCharacter.js.map +1 -0
- package/lib/module/components/GameRulesModal.js +279 -0
- package/lib/module/components/GameRulesModal.js.map +1 -0
- package/lib/module/components/HypeCallout.js +103 -0
- package/lib/module/components/HypeCallout.js.map +1 -0
- package/lib/module/components/InsufficientFundsOverlay.js +285 -0
- package/lib/module/components/InsufficientFundsOverlay.js.map +1 -0
- package/lib/module/components/JackpotNearMiss.js +89 -0
- package/lib/module/components/JackpotNearMiss.js.map +1 -0
- package/lib/module/components/JackpotTeaser.js +341 -0
- package/lib/module/components/JackpotTeaser.js.map +1 -0
- package/lib/module/components/MonflowtsButton.js +129 -0
- package/lib/module/components/MonflowtsButton.js.map +1 -0
- package/lib/module/components/MonflowtsChipGroup.js +40 -0
- package/lib/module/components/MonflowtsChipGroup.js.map +1 -0
- package/lib/module/components/MonflowtsPressable.js +42 -0
- package/lib/module/components/MonflowtsPressable.js.map +1 -0
- package/lib/module/components/QuitConfirmModal.js +180 -0
- package/lib/module/components/QuitConfirmModal.js.map +1 -0
- package/lib/module/components/SessionTimer.js +77 -0
- package/lib/module/components/SessionTimer.js.map +1 -0
- package/lib/module/components/SideDemoTab.js +110 -0
- package/lib/module/components/SideDemoTab.js.map +1 -0
- package/lib/module/components/StakeInput.js +138 -0
- package/lib/module/components/StakeInput.js.map +1 -0
- package/lib/module/constants.js +50 -0
- package/lib/module/constants.js.map +1 -0
- package/lib/module/content.js +21 -0
- package/lib/module/content.js.map +1 -0
- package/lib/module/effects/EffectBurst.js +56 -0
- package/lib/module/effects/EffectBurst.js.map +1 -0
- package/lib/module/effects/beaverStates.js +11 -0
- package/lib/module/effects/beaverStates.js.map +1 -0
- package/lib/module/effects/hypePhrases.js +67 -0
- package/lib/module/effects/hypePhrases.js.map +1 -0
- package/lib/module/effects/particleAnims.js +17 -0
- package/lib/module/effects/particleAnims.js.map +1 -0
- package/lib/module/hooks/useAvailableGames.js +29 -0
- package/lib/module/hooks/useAvailableGames.js.map +1 -0
- package/lib/module/hooks/useCrash.js +137 -0
- package/lib/module/hooks/useCrash.js.map +1 -0
- package/lib/module/hooks/useCrashFeed.js +49 -0
- package/lib/module/hooks/useCrashFeed.js.map +1 -0
- package/lib/module/hooks/useCurrency.js +13 -0
- package/lib/module/hooks/useCurrency.js.map +1 -0
- package/lib/module/hooks/useFairSeed.js +55 -0
- package/lib/module/hooks/useFairSeed.js.map +1 -0
- package/lib/module/hooks/useGameEvents.js +186 -0
- package/lib/module/hooks/useGameEvents.js.map +1 -0
- package/lib/module/hooks/useGameHistory.js +55 -0
- package/lib/module/hooks/useGameHistory.js.map +1 -0
- package/lib/module/hooks/useLeaderboard.js +83 -0
- package/lib/module/hooks/useLeaderboard.js.map +1 -0
- package/lib/module/hooks/useMines.js +166 -0
- package/lib/module/hooks/useMines.js.map +1 -0
- package/lib/module/hooks/useNotifications.js +66 -0
- package/lib/module/hooks/useNotifications.js.map +1 -0
- package/lib/module/hooks/usePlayGame.js +408 -0
- package/lib/module/hooks/usePlayGame.js.map +1 -0
- package/lib/module/hooks/usePlinko.js +75 -0
- package/lib/module/hooks/usePlinko.js.map +1 -0
- package/lib/module/hooks/useRaffleDrawState.js +57 -0
- package/lib/module/hooks/useRaffleDrawState.js.map +1 -0
- package/lib/module/hooks/useRefreshWallet.js +24 -0
- package/lib/module/hooks/useRefreshWallet.js.map +1 -0
- package/lib/module/hooks/useResponsive.js +16 -0
- package/lib/module/hooks/useResponsive.js.map +1 -0
- package/lib/module/hooks/useRevealWin.js +120 -0
- package/lib/module/hooks/useRevealWin.js.map +1 -0
- package/lib/module/hooks/useScreenShake.js +32 -0
- package/lib/module/hooks/useScreenShake.js.map +1 -0
- package/lib/module/hooks/useWallet.js +77 -0
- package/lib/module/hooks/useWallet.js.map +1 -0
- package/lib/module/i18n.js +104 -0
- package/lib/module/i18n.js.map +1 -0
- package/lib/module/index.js +22 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/lottieAnimations.js +15 -0
- package/lib/module/lottieAnimations.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/stores/assetStore.js +140 -0
- package/lib/module/stores/assetStore.js.map +1 -0
- package/lib/module/stores/authStore.js +47 -0
- package/lib/module/stores/authStore.js.map +1 -0
- package/lib/module/stores/gameStore.js +23 -0
- package/lib/module/stores/gameStore.js.map +1 -0
- package/lib/module/stores/sdkInitStore.js +155 -0
- package/lib/module/stores/sdkInitStore.js.map +1 -0
- package/lib/module/stores/settingsStore.js +40 -0
- package/lib/module/stores/settingsStore.js.map +1 -0
- package/lib/module/theme.js +160 -0
- package/lib/module/theme.js.map +1 -0
- package/lib/module/types.js +4 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/utils/apolloError.js +69 -0
- package/lib/module/utils/apolloError.js.map +1 -0
- package/lib/module/utils/crashMultiplier.js +8 -0
- package/lib/module/utils/crashMultiplier.js.map +1 -0
- package/lib/module/utils/crashMultiplier.test.js +34 -0
- package/lib/module/utils/crashMultiplier.test.js.map +1 -0
- package/lib/module/utils/deviceAnalytics.js +51 -0
- package/lib/module/utils/deviceAnalytics.js.map +1 -0
- package/lib/module/utils/idempotency.js +66 -0
- package/lib/module/utils/idempotency.js.map +1 -0
- package/lib/module/utils/layout.js +14 -0
- package/lib/module/utils/layout.js.map +1 -0
- package/lib/module/utils/safeInlineScript.js +12 -0
- package/lib/module/utils/safeInlineScript.js.map +1 -0
- package/lib/module/utils/sseClient.js +40 -0
- package/lib/module/utils/sseClient.js.map +1 -0
- package/lib/module/views/DepositSelect.js +275 -0
- package/lib/module/views/DepositSelect.js.map +1 -0
- package/lib/module/views/Dice.js +111 -0
- package/lib/module/views/Dice.js.map +1 -0
- package/lib/module/views/DiceBattle.js +815 -0
- package/lib/module/views/DiceBattle.js.map +1 -0
- package/lib/module/views/DiceLobby.js +577 -0
- package/lib/module/views/DiceLobby.js.map +1 -0
- package/lib/module/views/FortuneWheel.js +892 -0
- package/lib/module/views/FortuneWheel.js.map +1 -0
- package/lib/module/views/Freefall.js +808 -0
- package/lib/module/views/Freefall.js.map +1 -0
- package/lib/module/views/History.js +366 -0
- package/lib/module/views/History.js.map +1 -0
- package/lib/module/views/Home.js +554 -0
- package/lib/module/views/Home.js.map +1 -0
- package/lib/module/views/Jetstream.js +889 -0
- package/lib/module/views/Jetstream.js.map +1 -0
- package/lib/module/views/Leaderboard.js +1206 -0
- package/lib/module/views/Leaderboard.js.map +1 -0
- package/lib/module/views/MillionaireHunter.js +1697 -0
- package/lib/module/views/MillionaireHunter.js.map +1 -0
- package/lib/module/views/Minefield.js +826 -0
- package/lib/module/views/Minefield.js.map +1 -0
- package/lib/module/views/PaymentWebView.js +546 -0
- package/lib/module/views/PaymentWebView.js.map +1 -0
- package/lib/module/views/PlayerCard.js +184 -0
- package/lib/module/views/PlayerCard.js.map +1 -0
- package/lib/module/views/Profile.js +531 -0
- package/lib/module/views/Profile.js.map +1 -0
- package/lib/module/views/RaffleDraw.js +1242 -0
- package/lib/module/views/RaffleDraw.js.map +1 -0
- package/lib/module/views/RevealWin.js +1267 -0
- package/lib/module/views/RevealWin.js.map +1 -0
- package/lib/module/views/Splash.js +370 -0
- package/lib/module/views/Splash.js.map +1 -0
- package/lib/module/views/Success.js +363 -0
- package/lib/module/views/Success.js.map +1 -0
- package/lib/module/views/TicketShop.js +372 -0
- package/lib/module/views/TicketShop.js.map +1 -0
- package/lib/module/views/TriviaLobby.js +582 -0
- package/lib/module/views/TriviaLobby.js.map +1 -0
- package/lib/module/views/TriviaMaster.js +884 -0
- package/lib/module/views/TriviaMaster.js.map +1 -0
- package/lib/module/views/Wallet.js +622 -0
- package/lib/module/views/Wallet.js.map +1 -0
- package/lib/module/views/WithdrawFlow.js +445 -0
- package/lib/module/views/WithdrawFlow.js.map +1 -0
- package/lib/module/views/gridGeometry.js +26 -0
- package/lib/module/views/gridGeometry.js.map +1 -0
- package/lib/module/views/revealWinHelpers.js +29 -0
- package/lib/module/views/revealWinHelpers.js.map +1 -0
- package/lib/module/views/ticketBundlePresets.js +29 -0
- package/lib/module/views/ticketBundlePresets.js.map +1 -0
- package/lib/module/views/triviaHelpers.js +78 -0
- package/lib/module/views/triviaHelpers.js.map +1 -0
- package/lib/module/voiceClips.js +16 -0
- package/lib/module/voiceClips.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/HapticsManager.d.ts +28 -0
- package/lib/typescript/src/HapticsManager.d.ts.map +1 -0
- package/lib/typescript/src/HubContent.d.ts +7 -0
- package/lib/typescript/src/HubContent.d.ts.map +1 -0
- package/lib/typescript/src/Icons.d.ts +14 -0
- package/lib/typescript/src/Icons.d.ts.map +1 -0
- package/lib/typescript/src/MonflowtsHub.d.ts +5 -0
- package/lib/typescript/src/MonflowtsHub.d.ts.map +1 -0
- package/lib/typescript/src/NativeLottieView.d.ts +13 -0
- package/lib/typescript/src/NativeLottieView.d.ts.map +1 -0
- package/lib/typescript/src/NativeSvgView.d.ts +12 -0
- package/lib/typescript/src/NativeSvgView.d.ts.map +1 -0
- package/lib/typescript/src/NativeWebView.d.ts +22 -0
- package/lib/typescript/src/NativeWebView.d.ts.map +1 -0
- package/lib/typescript/src/NativeWheelView.d.ts +9 -0
- package/lib/typescript/src/NativeWheelView.d.ts.map +1 -0
- package/lib/typescript/src/SoundManager.d.ts +29 -0
- package/lib/typescript/src/SoundManager.d.ts.map +1 -0
- package/lib/typescript/src/SpeechManager.d.ts +10 -0
- package/lib/typescript/src/SpeechManager.d.ts.map +1 -0
- package/lib/typescript/src/api/client.d.ts +7 -0
- package/lib/typescript/src/api/client.d.ts.map +1 -0
- package/lib/typescript/src/api/gameTypes.d.ts +326 -0
- package/lib/typescript/src/api/gameTypes.d.ts.map +1 -0
- package/lib/typescript/src/api/http.d.ts +61 -0
- package/lib/typescript/src/api/http.d.ts.map +1 -0
- package/lib/typescript/src/api/mutations.d.ts +22 -0
- package/lib/typescript/src/api/mutations.d.ts.map +1 -0
- package/lib/typescript/src/api/playerTypes.d.ts +53 -0
- package/lib/typescript/src/api/playerTypes.d.ts.map +1 -0
- package/lib/typescript/src/api/queries.d.ts +21 -0
- package/lib/typescript/src/api/queries.d.ts.map +1 -0
- package/lib/typescript/src/api/sdkTypes.d.ts +87 -0
- package/lib/typescript/src/api/sdkTypes.d.ts.map +1 -0
- package/lib/typescript/src/assets/assetKeys.d.ts +3 -0
- package/lib/typescript/src/assets/assetKeys.d.ts.map +1 -0
- package/lib/typescript/src/assets/assetSync.d.ts +41 -0
- package/lib/typescript/src/assets/assetSync.d.ts.map +1 -0
- package/lib/typescript/src/assets/nativeAssets.d.ts +30 -0
- package/lib/typescript/src/assets/nativeAssets.d.ts.map +1 -0
- package/lib/typescript/src/assets/remote.d.ts +8 -0
- package/lib/typescript/src/assets/remote.d.ts.map +1 -0
- package/lib/typescript/src/components/AbandonPolicyNotice.d.ts +16 -0
- package/lib/typescript/src/components/AbandonPolicyNotice.d.ts.map +1 -0
- package/lib/typescript/src/components/AnimatedAmount.d.ts +12 -0
- package/lib/typescript/src/components/AnimatedAmount.d.ts.map +1 -0
- package/lib/typescript/src/components/CoinFlyOverlay.d.ts +17 -0
- package/lib/typescript/src/components/CoinFlyOverlay.d.ts.map +1 -0
- package/lib/typescript/src/components/GameCharacter.d.ts +14 -0
- package/lib/typescript/src/components/GameCharacter.d.ts.map +1 -0
- package/lib/typescript/src/components/GameRulesModal.d.ts +10 -0
- package/lib/typescript/src/components/GameRulesModal.d.ts.map +1 -0
- package/lib/typescript/src/components/HypeCallout.d.ts +11 -0
- package/lib/typescript/src/components/HypeCallout.d.ts.map +1 -0
- package/lib/typescript/src/components/InsufficientFundsOverlay.d.ts +12 -0
- package/lib/typescript/src/components/InsufficientFundsOverlay.d.ts.map +1 -0
- package/lib/typescript/src/components/JackpotNearMiss.d.ts +8 -0
- package/lib/typescript/src/components/JackpotNearMiss.d.ts.map +1 -0
- package/lib/typescript/src/components/JackpotTeaser.d.ts +13 -0
- package/lib/typescript/src/components/JackpotTeaser.d.ts.map +1 -0
- package/lib/typescript/src/components/MonflowtsButton.d.ts +21 -0
- package/lib/typescript/src/components/MonflowtsButton.d.ts.map +1 -0
- package/lib/typescript/src/components/MonflowtsChipGroup.d.ts +18 -0
- package/lib/typescript/src/components/MonflowtsChipGroup.d.ts.map +1 -0
- package/lib/typescript/src/components/MonflowtsPressable.d.ts +39 -0
- package/lib/typescript/src/components/MonflowtsPressable.d.ts.map +1 -0
- package/lib/typescript/src/components/QuitConfirmModal.d.ts +11 -0
- package/lib/typescript/src/components/QuitConfirmModal.d.ts.map +1 -0
- package/lib/typescript/src/components/SessionTimer.d.ts +14 -0
- package/lib/typescript/src/components/SessionTimer.d.ts.map +1 -0
- package/lib/typescript/src/components/SideDemoTab.d.ts +18 -0
- package/lib/typescript/src/components/SideDemoTab.d.ts.map +1 -0
- package/lib/typescript/src/components/StakeInput.d.ts +16 -0
- package/lib/typescript/src/components/StakeInput.d.ts.map +1 -0
- package/lib/typescript/src/constants.d.ts +21 -0
- package/lib/typescript/src/constants.d.ts.map +1 -0
- package/lib/typescript/src/content.d.ts +53 -0
- package/lib/typescript/src/content.d.ts.map +1 -0
- package/lib/typescript/src/effects/EffectBurst.d.ts +20 -0
- package/lib/typescript/src/effects/EffectBurst.d.ts.map +1 -0
- package/lib/typescript/src/effects/beaverStates.d.ts +4 -0
- package/lib/typescript/src/effects/beaverStates.d.ts.map +1 -0
- package/lib/typescript/src/effects/hypePhrases.d.ts +11 -0
- package/lib/typescript/src/effects/hypePhrases.d.ts.map +1 -0
- package/lib/typescript/src/effects/particleAnims.d.ts +9 -0
- package/lib/typescript/src/effects/particleAnims.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useAvailableGames.d.ts +14 -0
- package/lib/typescript/src/hooks/useAvailableGames.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useCrash.d.ts +13 -0
- package/lib/typescript/src/hooks/useCrash.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useCrashFeed.d.ts +22 -0
- package/lib/typescript/src/hooks/useCrashFeed.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useCurrency.d.ts +6 -0
- package/lib/typescript/src/hooks/useCurrency.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useFairSeed.d.ts +8 -0
- package/lib/typescript/src/hooks/useFairSeed.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useGameEvents.d.ts +50 -0
- package/lib/typescript/src/hooks/useGameEvents.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useGameHistory.d.ts +14 -0
- package/lib/typescript/src/hooks/useGameHistory.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useLeaderboard.d.ts +71 -0
- package/lib/typescript/src/hooks/useLeaderboard.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useMines.d.ts +11 -0
- package/lib/typescript/src/hooks/useMines.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useNotifications.d.ts +26 -0
- package/lib/typescript/src/hooks/useNotifications.d.ts.map +1 -0
- package/lib/typescript/src/hooks/usePlayGame.d.ts +62 -0
- package/lib/typescript/src/hooks/usePlayGame.d.ts.map +1 -0
- package/lib/typescript/src/hooks/usePlinko.d.ts +8 -0
- package/lib/typescript/src/hooks/usePlinko.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useRaffleDrawState.d.ts +50 -0
- package/lib/typescript/src/hooks/useRaffleDrawState.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useRefreshWallet.d.ts +8 -0
- package/lib/typescript/src/hooks/useRefreshWallet.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useResponsive.d.ts +8 -0
- package/lib/typescript/src/hooks/useResponsive.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useRevealWin.d.ts +10 -0
- package/lib/typescript/src/hooks/useRevealWin.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useScreenShake.d.ts +14 -0
- package/lib/typescript/src/hooks/useScreenShake.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useWallet.d.ts +23 -0
- package/lib/typescript/src/hooks/useWallet.d.ts.map +1 -0
- package/lib/typescript/src/i18n.d.ts +29 -0
- package/lib/typescript/src/i18n.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +12 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/lottieAnimations.d.ts +2 -0
- package/lib/typescript/src/lottieAnimations.d.ts.map +1 -0
- package/lib/typescript/src/stores/assetStore.d.ts +17 -0
- package/lib/typescript/src/stores/assetStore.d.ts.map +1 -0
- package/lib/typescript/src/stores/authStore.d.ts +25 -0
- package/lib/typescript/src/stores/authStore.d.ts.map +1 -0
- package/lib/typescript/src/stores/gameStore.d.ts +14 -0
- package/lib/typescript/src/stores/gameStore.d.ts.map +1 -0
- package/lib/typescript/src/stores/sdkInitStore.d.ts +38 -0
- package/lib/typescript/src/stores/sdkInitStore.d.ts.map +1 -0
- package/lib/typescript/src/stores/settingsStore.d.ts +23 -0
- package/lib/typescript/src/stores/settingsStore.d.ts.map +1 -0
- package/lib/typescript/src/theme.d.ts +149 -0
- package/lib/typescript/src/theme.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +49 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/lib/typescript/src/utils/apolloError.d.ts +12 -0
- package/lib/typescript/src/utils/apolloError.d.ts.map +1 -0
- package/lib/typescript/src/utils/crashMultiplier.d.ts +2 -0
- package/lib/typescript/src/utils/crashMultiplier.d.ts.map +1 -0
- package/lib/typescript/src/utils/crashMultiplier.test.d.ts +2 -0
- package/lib/typescript/src/utils/crashMultiplier.test.d.ts.map +1 -0
- package/lib/typescript/src/utils/deviceAnalytics.d.ts +3 -0
- package/lib/typescript/src/utils/deviceAnalytics.d.ts.map +1 -0
- package/lib/typescript/src/utils/idempotency.d.ts +14 -0
- package/lib/typescript/src/utils/idempotency.d.ts.map +1 -0
- package/lib/typescript/src/utils/layout.d.ts +10 -0
- package/lib/typescript/src/utils/layout.d.ts.map +1 -0
- package/lib/typescript/src/utils/safeInlineScript.d.ts +5 -0
- package/lib/typescript/src/utils/safeInlineScript.d.ts.map +1 -0
- package/lib/typescript/src/utils/sseClient.d.ts +5 -0
- package/lib/typescript/src/utils/sseClient.d.ts.map +1 -0
- package/lib/typescript/src/views/DepositSelect.d.ts +9 -0
- package/lib/typescript/src/views/DepositSelect.d.ts.map +1 -0
- package/lib/typescript/src/views/Dice.d.ts +10 -0
- package/lib/typescript/src/views/Dice.d.ts.map +1 -0
- package/lib/typescript/src/views/DiceBattle.d.ts +15 -0
- package/lib/typescript/src/views/DiceBattle.d.ts.map +1 -0
- package/lib/typescript/src/views/DiceLobby.d.ts +12 -0
- package/lib/typescript/src/views/DiceLobby.d.ts.map +1 -0
- package/lib/typescript/src/views/FortuneWheel.d.ts +13 -0
- package/lib/typescript/src/views/FortuneWheel.d.ts.map +1 -0
- package/lib/typescript/src/views/Freefall.d.ts +13 -0
- package/lib/typescript/src/views/Freefall.d.ts.map +1 -0
- package/lib/typescript/src/views/History.d.ts +7 -0
- package/lib/typescript/src/views/History.d.ts.map +1 -0
- package/lib/typescript/src/views/Home.d.ts +13 -0
- package/lib/typescript/src/views/Home.d.ts.map +1 -0
- package/lib/typescript/src/views/Jetstream.d.ts +14 -0
- package/lib/typescript/src/views/Jetstream.d.ts.map +1 -0
- package/lib/typescript/src/views/Leaderboard.d.ts +8 -0
- package/lib/typescript/src/views/Leaderboard.d.ts.map +1 -0
- package/lib/typescript/src/views/MillionaireHunter.d.ts +13 -0
- package/lib/typescript/src/views/MillionaireHunter.d.ts.map +1 -0
- package/lib/typescript/src/views/Minefield.d.ts +13 -0
- package/lib/typescript/src/views/Minefield.d.ts.map +1 -0
- package/lib/typescript/src/views/PaymentWebView.d.ts +29 -0
- package/lib/typescript/src/views/PaymentWebView.d.ts.map +1 -0
- package/lib/typescript/src/views/PlayerCard.d.ts +15 -0
- package/lib/typescript/src/views/PlayerCard.d.ts.map +1 -0
- package/lib/typescript/src/views/Profile.d.ts +9 -0
- package/lib/typescript/src/views/Profile.d.ts.map +1 -0
- package/lib/typescript/src/views/RaffleDraw.d.ts +12 -0
- package/lib/typescript/src/views/RaffleDraw.d.ts.map +1 -0
- package/lib/typescript/src/views/RevealWin.d.ts +13 -0
- package/lib/typescript/src/views/RevealWin.d.ts.map +1 -0
- package/lib/typescript/src/views/Splash.d.ts +10 -0
- package/lib/typescript/src/views/Splash.d.ts.map +1 -0
- package/lib/typescript/src/views/Success.d.ts +12 -0
- package/lib/typescript/src/views/Success.d.ts.map +1 -0
- package/lib/typescript/src/views/TicketShop.d.ts +15 -0
- package/lib/typescript/src/views/TicketShop.d.ts.map +1 -0
- package/lib/typescript/src/views/TriviaLobby.d.ts +12 -0
- package/lib/typescript/src/views/TriviaLobby.d.ts.map +1 -0
- package/lib/typescript/src/views/TriviaMaster.d.ts +16 -0
- package/lib/typescript/src/views/TriviaMaster.d.ts.map +1 -0
- package/lib/typescript/src/views/Wallet.d.ts +10 -0
- package/lib/typescript/src/views/Wallet.d.ts.map +1 -0
- package/lib/typescript/src/views/WithdrawFlow.d.ts +9 -0
- package/lib/typescript/src/views/WithdrawFlow.d.ts.map +1 -0
- package/lib/typescript/src/views/gridGeometry.d.ts +19 -0
- package/lib/typescript/src/views/gridGeometry.d.ts.map +1 -0
- package/lib/typescript/src/views/revealWinHelpers.d.ts +15 -0
- package/lib/typescript/src/views/revealWinHelpers.d.ts.map +1 -0
- package/lib/typescript/src/views/ticketBundlePresets.d.ts +18 -0
- package/lib/typescript/src/views/ticketBundlePresets.d.ts.map +1 -0
- package/lib/typescript/src/views/triviaHelpers.d.ts +31 -0
- package/lib/typescript/src/views/triviaHelpers.d.ts.map +1 -0
- package/lib/typescript/src/voiceClips.d.ts +4 -0
- package/lib/typescript/src/voiceClips.d.ts.map +1 -0
- package/package.json +160 -4
|
@@ -0,0 +1,892 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useState, useRef, useCallback, useMemo, useEffect } from 'react';
|
|
4
|
+
import { View, Text, StyleSheet, Alert, Animated, KeyboardAvoidingView, Platform, ScrollView, BackHandler } from 'react-native';
|
|
5
|
+
import CoinFlyOverlay from "../components/CoinFlyOverlay.js";
|
|
6
|
+
import MonflowtsPressable from "../components/MonflowtsPressable.js";
|
|
7
|
+
import MonflowtsWheelView from "../NativeWheelView.js";
|
|
8
|
+
import { COLORS } from "../constants.js";
|
|
9
|
+
import QuitConfirmModal from "../components/QuitConfirmModal.js";
|
|
10
|
+
import SideDemoTab from "../components/SideDemoTab.js";
|
|
11
|
+
import SvgIcon from "../Icons.js";
|
|
12
|
+
import { sounds } from "../SoundManager.js";
|
|
13
|
+
import HypeCallout from "../components/HypeCallout.js";
|
|
14
|
+
import { HYPE_PHRASES, pickPhrase } from "../effects/hypePhrases.js";
|
|
15
|
+
import MonflowtsButton from "../components/MonflowtsButton.js";
|
|
16
|
+
import MonflowtsChipGroup from "../components/MonflowtsChipGroup.js";
|
|
17
|
+
import SessionTimer from "../components/SessionTimer.js";
|
|
18
|
+
import AbandonPolicyNotice from "../components/AbandonPolicyNotice.js";
|
|
19
|
+
import InsufficientFundsOverlay from "../components/InsufficientFundsOverlay.js";
|
|
20
|
+
import StakeInput from "../components/StakeInput.js";
|
|
21
|
+
import GameRulesModal from "../components/GameRulesModal.js";
|
|
22
|
+
import JackpotNearMiss from "../components/JackpotNearMiss.js";
|
|
23
|
+
import { usePlayGame, useInitPlay } from "../hooks/usePlayGame.js";
|
|
24
|
+
import { useCurrency } from "../hooks/useCurrency.js";
|
|
25
|
+
import { useResponsive } from "../hooks/useResponsive.js";
|
|
26
|
+
import { useGameStore } from "../stores/gameStore.js";
|
|
27
|
+
import { gameContent, gameRules, randomMessageKey } from "../content.js";
|
|
28
|
+
import { t, formatNumber, errorText } from "../i18n.js";
|
|
29
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
30
|
+
const WHEEL_MAX_SIZE = 460;
|
|
31
|
+
const FortuneWheel = ({
|
|
32
|
+
onBack,
|
|
33
|
+
balance,
|
|
34
|
+
onWin,
|
|
35
|
+
onLose,
|
|
36
|
+
game,
|
|
37
|
+
onTopUp
|
|
38
|
+
}) => {
|
|
39
|
+
// ── Derive segments from server game config ──
|
|
40
|
+
const currency = useCurrency();
|
|
41
|
+
const {
|
|
42
|
+
columnWidth
|
|
43
|
+
} = useResponsive();
|
|
44
|
+
const demoMode = useGameStore(s => s.demoMode);
|
|
45
|
+
const toggleDemoMode = useGameStore(s => s.toggleDemoMode);
|
|
46
|
+
const segments = useMemo(() => {
|
|
47
|
+
const content = gameContent('SPIN_WHEEL');
|
|
48
|
+
const source = game?.gameplayRules?.segments?.length ? game.gameplayRules.segments : content.rules?.segments ?? [];
|
|
49
|
+
const palette = content.segmentColors ?? [];
|
|
50
|
+
return source.map((seg, i) => ({
|
|
51
|
+
label: seg.label,
|
|
52
|
+
value: seg.payoutKobo != null ? seg.payoutKobo / 100 : seg.value ?? 0,
|
|
53
|
+
color: seg.color ?? palette[i % palette.length] ?? '#4f46e5'
|
|
54
|
+
}));
|
|
55
|
+
}, [game]);
|
|
56
|
+
|
|
57
|
+
// Derive actual play cost from game config (kobo → VG)
|
|
58
|
+
const actualCostVG = useMemo(() => {
|
|
59
|
+
if (!game?.playCost) return 0;
|
|
60
|
+
if (game.playCost.type === 'BY_CHANNEL' && game.playCost.channelPricing?.length) {
|
|
61
|
+
const mobile = game.playCost.channelPricing.find(cp => cp.channel === 'MOBILE');
|
|
62
|
+
if (mobile) return Math.round(mobile.amountKobo / 100);
|
|
63
|
+
}
|
|
64
|
+
return Math.round((game.playCost.fixedAmountKobo ?? 0) / 100);
|
|
65
|
+
}, [game?.playCost]);
|
|
66
|
+
const hasStakeOptions = !!game?.gameplayRules?.stakeOptions?.length;
|
|
67
|
+
const stakeOptions = (hasStakeOptions ? game.gameplayRules.stakeOptions : gameRules('SPIN_WHEEL').stakeOptions ?? []).map(s => Math.round(s / 100));
|
|
68
|
+
const [activeStake, setActiveStake] = useState(hasStakeOptions ? stakeOptions[Math.floor(stakeOptions.length / 2)] ?? 250 : actualCostVG || (stakeOptions[Math.floor(stakeOptions.length / 2)] ?? 250));
|
|
69
|
+
const effectiveCostVG = hasStakeOptions ? activeStake : actualCostVG || activeStake;
|
|
70
|
+
|
|
71
|
+
// Multi-play session support
|
|
72
|
+
const stakeCountOptions = game?.gameplayRules?.stakeCountOptions ?? [];
|
|
73
|
+
const hasStakeCount = stakeCountOptions.length > 1;
|
|
74
|
+
const [selectedStakeCount, setSelectedStakeCount] = useState(stakeCountOptions[0] ?? 1);
|
|
75
|
+
const isMultiRound = selectedStakeCount > 1;
|
|
76
|
+
const totalCostVG = effectiveCostVG * selectedStakeCount;
|
|
77
|
+
const [roundNum, setRoundNum] = useState(0);
|
|
78
|
+
const [sessionWins, setSessionWins] = useState(0);
|
|
79
|
+
const [sessionTotalWon, setSessionTotalWon] = useState(0);
|
|
80
|
+
const [sessionComplete, setSessionComplete] = useState(false);
|
|
81
|
+
const [isSpinning, setIsSpinning] = useState(false);
|
|
82
|
+
const [showFundsOverlay, setShowFundsOverlay] = useState(false);
|
|
83
|
+
const [showResultOverlay, setShowResultOverlay] = useState(false);
|
|
84
|
+
const wheelLive = isSpinning || roundNum > 0 && !sessionComplete && !showResultOverlay;
|
|
85
|
+
const [quitVisible, setQuitVisible] = useState(false);
|
|
86
|
+
const handleBack = useCallback(() => {
|
|
87
|
+
if (!wheelLive) {
|
|
88
|
+
onBack();
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
setQuitVisible(true);
|
|
92
|
+
}, [wheelLive, onBack]);
|
|
93
|
+
useEffect(() => {
|
|
94
|
+
const sub = BackHandler.addEventListener('hardwareBackPress', () => {
|
|
95
|
+
handleBack();
|
|
96
|
+
return true;
|
|
97
|
+
});
|
|
98
|
+
return () => sub.remove();
|
|
99
|
+
}, [handleBack]);
|
|
100
|
+
const [lastAmountWon, setLastAmountWon] = useState(0);
|
|
101
|
+
const [rulesVisible, setRulesVisible] = useState(false);
|
|
102
|
+
const [rotation, setRotation] = useState(0);
|
|
103
|
+
const rotationRef = useRef(0);
|
|
104
|
+
const lastTickSegment = useRef(0);
|
|
105
|
+
const animFrameRef = useRef(null);
|
|
106
|
+
const {
|
|
107
|
+
play
|
|
108
|
+
} = usePlayGame();
|
|
109
|
+
|
|
110
|
+
// Coin fly animation refs
|
|
111
|
+
const balancePillRef = useRef(null);
|
|
112
|
+
const wheelAreaRef = useRef(null);
|
|
113
|
+
const coinFlyRef = useRef(null);
|
|
114
|
+
const hypeRef = useRef(null);
|
|
115
|
+
const balancePulse = useRef(new Animated.Value(1)).current;
|
|
116
|
+
|
|
117
|
+
// Two-phase play support
|
|
118
|
+
const abandonPolicy = game?.gameplayRules?.abandonPolicy ?? null;
|
|
119
|
+
const initPlay = useInitPlay(game?.gameCode ?? 'SPIN_WHEEL', abandonPolicy);
|
|
120
|
+
|
|
121
|
+
// Reset session when demo mode toggles so a new session with the correct flag is started
|
|
122
|
+
const prevDemoRef = useRef(demoMode);
|
|
123
|
+
useEffect(() => {
|
|
124
|
+
if (prevDemoRef.current !== demoMode) {
|
|
125
|
+
prevDemoRef.current = demoMode;
|
|
126
|
+
if (initPlay.enabled) {
|
|
127
|
+
initPlay.reset();
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}, [demoMode, initPlay]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
131
|
+
|
|
132
|
+
const spin = useCallback(async () => {
|
|
133
|
+
if (isSpinning || !game || sessionComplete) return;
|
|
134
|
+
if (initPlay.enabled && initPlay.isExpired) return;
|
|
135
|
+
if (!demoMode && !initPlay.session && balance < effectiveCostVG) {
|
|
136
|
+
setShowFundsOverlay(true);
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
sounds.resume();
|
|
140
|
+
setIsSpinning(true);
|
|
141
|
+
setRoundNum(r => r + 1);
|
|
142
|
+
|
|
143
|
+
// ── Call server to determine outcome ──
|
|
144
|
+
const gameInputPayload = isMultiRound ? {
|
|
145
|
+
stakeCount: selectedStakeCount
|
|
146
|
+
} : null;
|
|
147
|
+
let serverResult = null;
|
|
148
|
+
try {
|
|
149
|
+
if (initPlay.enabled) {
|
|
150
|
+
const activeSession = initPlay.session ?? (await initPlay.startSession(effectiveCostVG * 100));
|
|
151
|
+
serverResult = await initPlay.completeSession(gameInputPayload ?? undefined, activeSession);
|
|
152
|
+
} else {
|
|
153
|
+
serverResult = await play(game.gameCode, gameInputPayload, undefined, effectiveCostVG * 100);
|
|
154
|
+
}
|
|
155
|
+
} catch (e) {
|
|
156
|
+
console.warn('[FortuneWheel] play failed:', e?.message ?? e);
|
|
157
|
+
const msg = (e?.message || '').toLowerCase();
|
|
158
|
+
if (msg.includes('insufficient') || msg.includes('balance')) {
|
|
159
|
+
setShowFundsOverlay(true);
|
|
160
|
+
} else {
|
|
161
|
+
Alert.alert(t('wheel.playError'), errorText(e, 'wheel.somethingWentWrong'));
|
|
162
|
+
}
|
|
163
|
+
setIsSpinning(false);
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// ── Determine landing index strictly from the server result ──
|
|
168
|
+
const gameResult = serverResult?.gameResult;
|
|
169
|
+
const amountWonVG = (serverResult?.amountWonKobo ?? 0) / 100;
|
|
170
|
+
let serverSegmentIndex;
|
|
171
|
+
if (typeof gameResult?.segmentIndex === 'number' && gameResult.segmentIndex >= 0 && gameResult.segmentIndex < segments.length) {
|
|
172
|
+
// The server chose this slice — authoritative.
|
|
173
|
+
serverSegmentIndex = gameResult.segmentIndex;
|
|
174
|
+
} else {
|
|
175
|
+
// Never fabricate a (possibly winning) slice when the server omits the
|
|
176
|
+
// index. Land on a segment consistent with the money actually paid: a
|
|
177
|
+
// matching prize if we won, otherwise the lowest/zero segment — so the
|
|
178
|
+
// wheel can never visibly stop on a big prize while paying nothing.
|
|
179
|
+
const matchIdx = amountWonVG > 0 ? segments.findIndex(s => s.value === amountWonVG) : segments.findIndex(s => s.value === 0);
|
|
180
|
+
serverSegmentIndex = matchIdx >= 0 ? matchIdx : segments.reduce((lo, s, i, a) => s.value < (a[lo]?.value ?? Infinity) ? i : lo, 0);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// Calculate spin to land on server-determined segment.
|
|
184
|
+
//
|
|
185
|
+
// The pointer is fixed at 12 o'clock (top). Both iOS and Android draw
|
|
186
|
+
// segments clockwise starting from the top:
|
|
187
|
+
// segment 0 occupies [0°, segAngle°)
|
|
188
|
+
// segment 1 occupies [segAngle°, 2·segAngle°), etc.
|
|
189
|
+
//
|
|
190
|
+
// When the wheel rotates clockwise by T°, the original angle under the
|
|
191
|
+
// pointer becomes (360 − T%360) % 360. So segment i (spanning original
|
|
192
|
+
// angles [i·segAngle, (i+1)·segAngle)) is under the pointer when:
|
|
193
|
+
//
|
|
194
|
+
// T%360 ∈ ( (N−i−1)·segAngle , (N−i)·segAngle )
|
|
195
|
+
//
|
|
196
|
+
// We use the lower bound + a random offset within (0.15, 0.85) of the
|
|
197
|
+
// segment width to land naturally within the segment.
|
|
198
|
+
const N = segments.length;
|
|
199
|
+
const segmentAngle = 360 / N;
|
|
200
|
+
const lowerBound = (N - serverSegmentIndex - 1 + N) % N * segmentAngle;
|
|
201
|
+
const offset = segmentAngle * (0.15 + Math.random() * 0.7);
|
|
202
|
+
const targetRotation = lowerBound + offset;
|
|
203
|
+
const currentAngle = (rotationRef.current % 360 + 360) % 360;
|
|
204
|
+
const extraDegrees = ((targetRotation - currentAngle) % 360 + 360) % 360;
|
|
205
|
+
const fullSpins = 8 + Math.floor(Math.random() * 5);
|
|
206
|
+
const totalNewRotation = rotationRef.current + 360 * fullSpins + extraDegrees;
|
|
207
|
+
|
|
208
|
+
// Honor the admin-configured spin duration; fall back to 6s if unset.
|
|
209
|
+
const duration = game?.gameplayRules?.spinDurationMs ?? gameRules('SPIN_WHEEL').spinDurationMs ?? 0;
|
|
210
|
+
const startTime = Date.now();
|
|
211
|
+
const startRotation = rotationRef.current;
|
|
212
|
+
const animate = () => {
|
|
213
|
+
const elapsed = Date.now() - startTime;
|
|
214
|
+
const progress = Math.min(elapsed / duration, 1);
|
|
215
|
+
|
|
216
|
+
// Quartic ease out
|
|
217
|
+
const easedProgress = 1 - Math.pow(1 - progress, 4);
|
|
218
|
+
const currentRot = startRotation + (totalNewRotation - startRotation) * easedProgress;
|
|
219
|
+
setRotation(currentRot);
|
|
220
|
+
rotationRef.current = currentRot;
|
|
221
|
+
|
|
222
|
+
// Segment-crossing tick sound
|
|
223
|
+
const segSize = 360 / segments.length;
|
|
224
|
+
const currentSegment = Math.floor((currentRot + segSize / 2) % 360 / segSize);
|
|
225
|
+
if (currentSegment !== lastTickSegment.current) {
|
|
226
|
+
sounds.playRollTick();
|
|
227
|
+
lastTickSegment.current = currentSegment;
|
|
228
|
+
}
|
|
229
|
+
if (progress < 1) {
|
|
230
|
+
animFrameRef.current = requestAnimationFrame(animate);
|
|
231
|
+
} else {
|
|
232
|
+
// Finish spin
|
|
233
|
+
rotationRef.current = totalNewRotation;
|
|
234
|
+
setRotation(totalNewRotation);
|
|
235
|
+
setIsSpinning(false);
|
|
236
|
+
const amountWon = (serverResult?.amountWonKobo ?? 0) / 100;
|
|
237
|
+
const session = gameResult?.session;
|
|
238
|
+
const isLastRound = session?.isLastRound ?? true;
|
|
239
|
+
if (isMultiRound) {
|
|
240
|
+
if (amountWon > 0) {
|
|
241
|
+
setSessionWins(w => w + 1);
|
|
242
|
+
setSessionTotalWon(t => t + amountWon);
|
|
243
|
+
sounds.playWinChime();
|
|
244
|
+
hypeRef.current?.show(pickPhrase(amountWon >= 5000 ? HYPE_PHRASES.wheel.bigWin : HYPE_PHRASES.wheel.win), amountWon >= 5000 ? 'boost' : 'win');
|
|
245
|
+
if (!demoMode) {
|
|
246
|
+
coinFlyRef.current?.measureTarget();
|
|
247
|
+
wheelAreaRef.current?.measureInWindow?.((x, y, w, h) => {
|
|
248
|
+
coinFlyRef.current?.fly(x + w / 2, y + h / 2);
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
} else {
|
|
252
|
+
sounds.playDrawSound();
|
|
253
|
+
hypeRef.current?.show(pickPhrase(HYPE_PHRASES.wheel.loss), 'loss');
|
|
254
|
+
}
|
|
255
|
+
if (isLastRound) {
|
|
256
|
+
setSessionComplete(true);
|
|
257
|
+
const totalWon = sessionTotalWon + amountWon;
|
|
258
|
+
setLastAmountWon(totalWon);
|
|
259
|
+
setShowResultOverlay(true);
|
|
260
|
+
}
|
|
261
|
+
} else {
|
|
262
|
+
// Single round: show result overlay
|
|
263
|
+
setLastAmountWon(amountWon);
|
|
264
|
+
if (amountWon > 0) {
|
|
265
|
+
sounds.playWinChime();
|
|
266
|
+
hypeRef.current?.show(pickPhrase(amountWon >= 5000 ? HYPE_PHRASES.wheel.bigWin : HYPE_PHRASES.wheel.win), amountWon >= 5000 ? 'boost' : 'win');
|
|
267
|
+
if (!demoMode) {
|
|
268
|
+
coinFlyRef.current?.measureTarget();
|
|
269
|
+
wheelAreaRef.current?.measureInWindow?.((x, y, w, h) => {
|
|
270
|
+
coinFlyRef.current?.fly(x + w / 2, y + h / 2);
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
} else {
|
|
274
|
+
sounds.playDrawSound();
|
|
275
|
+
hypeRef.current?.show(pickPhrase(HYPE_PHRASES.wheel.loss), 'loss');
|
|
276
|
+
}
|
|
277
|
+
setShowResultOverlay(true);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
animFrameRef.current = requestAnimationFrame(animate);
|
|
282
|
+
}, [isSpinning, balance, effectiveCostVG, game, segments, play, onWin, onLose, initPlay, isMultiRound, selectedStakeCount, sessionTotalWon, sessionComplete]);
|
|
283
|
+
const wheelSize = Math.min(columnWidth - 80, WHEEL_MAX_SIZE);
|
|
284
|
+
const rotateDeg = `${rotation}deg`;
|
|
285
|
+
const resultMsgKey = useMemo(() => randomMessageKey(lastAmountWon > 0 ? 'wheel.win' : 'wheel.loss'), [showResultOverlay] // eslint-disable-line react-hooks/exhaustive-deps
|
|
286
|
+
);
|
|
287
|
+
const handleResultPlayAgain = useCallback(() => {
|
|
288
|
+
setShowResultOverlay(false);
|
|
289
|
+
setSessionComplete(false);
|
|
290
|
+
setRoundNum(0);
|
|
291
|
+
setSessionWins(0);
|
|
292
|
+
setSessionTotalWon(0);
|
|
293
|
+
setLastAmountWon(0);
|
|
294
|
+
if (initPlay.enabled) initPlay.reset();
|
|
295
|
+
}, [initPlay]);
|
|
296
|
+
const handleResultExit = useCallback(() => {
|
|
297
|
+
if (lastAmountWon > 0) {
|
|
298
|
+
onWin(lastAmountWon);
|
|
299
|
+
} else {
|
|
300
|
+
onLose?.();
|
|
301
|
+
}
|
|
302
|
+
}, [lastAmountWon, onWin, onLose]);
|
|
303
|
+
return /*#__PURE__*/_jsxs(KeyboardAvoidingView, {
|
|
304
|
+
style: {
|
|
305
|
+
flex: 1
|
|
306
|
+
},
|
|
307
|
+
behavior: Platform.OS === 'ios' ? 'padding' : undefined,
|
|
308
|
+
children: [/*#__PURE__*/_jsx(HypeCallout, {
|
|
309
|
+
ref: hypeRef,
|
|
310
|
+
style: {
|
|
311
|
+
top: 240
|
|
312
|
+
}
|
|
313
|
+
}), /*#__PURE__*/_jsx(SideDemoTab, {
|
|
314
|
+
enabled: !!game?.demoConfig?.enabled
|
|
315
|
+
}), /*#__PURE__*/_jsxs(ScrollView, {
|
|
316
|
+
style: styles.container,
|
|
317
|
+
contentContainerStyle: {
|
|
318
|
+
flexGrow: 1
|
|
319
|
+
},
|
|
320
|
+
keyboardShouldPersistTaps: "handled",
|
|
321
|
+
bounces: false,
|
|
322
|
+
children: [initPlay.enabled && initPlay.session && /*#__PURE__*/_jsx(SessionTimer, {
|
|
323
|
+
secondsLeft: initPlay.secondsLeft,
|
|
324
|
+
isExpired: initPlay.isExpired
|
|
325
|
+
}), initPlay.enabled && initPlay.isExpired && /*#__PURE__*/_jsxs(View, {
|
|
326
|
+
style: styles.expiredOverlay,
|
|
327
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
328
|
+
style: styles.expiredTitle,
|
|
329
|
+
children: t('wheel.timesUp')
|
|
330
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
331
|
+
style: styles.expiredText,
|
|
332
|
+
children: t('wheel.stakeForfeited')
|
|
333
|
+
}), /*#__PURE__*/_jsx(MonflowtsButton, {
|
|
334
|
+
title: t('wheel.goBack'),
|
|
335
|
+
onPress: onBack
|
|
336
|
+
})]
|
|
337
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
338
|
+
style: styles.header,
|
|
339
|
+
children: [/*#__PURE__*/_jsx(QuitConfirmModal, {
|
|
340
|
+
visible: quitVisible,
|
|
341
|
+
message: t('wheel.quitMessage'),
|
|
342
|
+
onKeepPlaying: () => setQuitVisible(false),
|
|
343
|
+
onQuit: () => {
|
|
344
|
+
setQuitVisible(false);
|
|
345
|
+
onBack();
|
|
346
|
+
}
|
|
347
|
+
}), /*#__PURE__*/_jsx(MonflowtsPressable, {
|
|
348
|
+
style: styles.circleBtn,
|
|
349
|
+
onPress: handleBack,
|
|
350
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
351
|
+
style: styles.btnText,
|
|
352
|
+
children: "\u2039"
|
|
353
|
+
})
|
|
354
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
355
|
+
style: styles.headerCenter,
|
|
356
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
357
|
+
style: styles.headerTag,
|
|
358
|
+
children: t('wheel.spinAndWin')
|
|
359
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
360
|
+
style: styles.headerTitle,
|
|
361
|
+
children: t('wheel.title')
|
|
362
|
+
})]
|
|
363
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
364
|
+
style: {
|
|
365
|
+
flexDirection: 'row',
|
|
366
|
+
alignItems: 'center',
|
|
367
|
+
gap: 8
|
|
368
|
+
},
|
|
369
|
+
children: [isMultiRound && roundNum > 0 && /*#__PURE__*/_jsx(View, {
|
|
370
|
+
style: styles.roundBadge,
|
|
371
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
372
|
+
style: styles.roundText,
|
|
373
|
+
children: t('wheel.roundBadge', {
|
|
374
|
+
round: roundNum,
|
|
375
|
+
total: selectedStakeCount
|
|
376
|
+
})
|
|
377
|
+
})
|
|
378
|
+
}), /*#__PURE__*/_jsx(Animated.View, {
|
|
379
|
+
ref: balancePillRef,
|
|
380
|
+
style: [styles.balancePill, {
|
|
381
|
+
transform: [{
|
|
382
|
+
scale: balancePulse
|
|
383
|
+
}]
|
|
384
|
+
}],
|
|
385
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
386
|
+
style: {
|
|
387
|
+
flexDirection: 'row',
|
|
388
|
+
alignItems: 'center'
|
|
389
|
+
},
|
|
390
|
+
children: [/*#__PURE__*/_jsx(SvgIcon, {
|
|
391
|
+
name: "diamond",
|
|
392
|
+
size: 14,
|
|
393
|
+
color: COLORS.gold
|
|
394
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
395
|
+
style: [styles.balanceText, {
|
|
396
|
+
marginLeft: 4
|
|
397
|
+
}],
|
|
398
|
+
children: formatNumber(balance)
|
|
399
|
+
})]
|
|
400
|
+
})
|
|
401
|
+
}), /*#__PURE__*/_jsx(MonflowtsPressable, {
|
|
402
|
+
style: styles.circleBtn,
|
|
403
|
+
onPress: () => setRulesVisible(true),
|
|
404
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
405
|
+
style: styles.btnText,
|
|
406
|
+
children: "?"
|
|
407
|
+
})
|
|
408
|
+
})]
|
|
409
|
+
})]
|
|
410
|
+
}), /*#__PURE__*/_jsx(AbandonPolicyNotice, {
|
|
411
|
+
abandonPolicy: abandonPolicy
|
|
412
|
+
}), initPlay.enabled && initPlay.error && !initPlay.session && /*#__PURE__*/_jsxs(View, {
|
|
413
|
+
style: {
|
|
414
|
+
padding: 12,
|
|
415
|
+
backgroundColor: '#fef2f2',
|
|
416
|
+
borderRadius: 8,
|
|
417
|
+
margin: 8,
|
|
418
|
+
alignItems: 'center'
|
|
419
|
+
},
|
|
420
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
421
|
+
style: {
|
|
422
|
+
color: '#b91c1c',
|
|
423
|
+
fontSize: 13,
|
|
424
|
+
marginBottom: 8,
|
|
425
|
+
textAlign: 'center'
|
|
426
|
+
},
|
|
427
|
+
children: initPlay.error
|
|
428
|
+
}), /*#__PURE__*/_jsx(MonflowtsButton, {
|
|
429
|
+
title: t('wheel.retry'),
|
|
430
|
+
onPress: () => initPlay.reset()
|
|
431
|
+
})]
|
|
432
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
433
|
+
ref: wheelAreaRef,
|
|
434
|
+
style: styles.wheelArea,
|
|
435
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
436
|
+
style: [styles.wheelContainer, {
|
|
437
|
+
width: wheelSize,
|
|
438
|
+
height: wheelSize
|
|
439
|
+
}],
|
|
440
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
441
|
+
style: styles.pointer,
|
|
442
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
443
|
+
style: styles.pointerText,
|
|
444
|
+
children: "\u25BC"
|
|
445
|
+
})
|
|
446
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
447
|
+
style: [{
|
|
448
|
+
width: wheelSize,
|
|
449
|
+
height: wheelSize
|
|
450
|
+
}, {
|
|
451
|
+
transform: [{
|
|
452
|
+
rotate: rotateDeg
|
|
453
|
+
}]
|
|
454
|
+
}],
|
|
455
|
+
children: /*#__PURE__*/_jsx(MonflowtsWheelView, {
|
|
456
|
+
segments: segments,
|
|
457
|
+
style: {
|
|
458
|
+
width: wheelSize,
|
|
459
|
+
height: wheelSize
|
|
460
|
+
}
|
|
461
|
+
})
|
|
462
|
+
})]
|
|
463
|
+
})
|
|
464
|
+
}), (hasStakeOptions || !actualCostVG) && /*#__PURE__*/_jsxs(View, {
|
|
465
|
+
style: styles.stakeSection,
|
|
466
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
467
|
+
style: styles.stakeLabel,
|
|
468
|
+
children: t('wheel.selectBet')
|
|
469
|
+
}), /*#__PURE__*/_jsx(MonflowtsChipGroup, {
|
|
470
|
+
options: stakeOptions,
|
|
471
|
+
selectedValue: activeStake,
|
|
472
|
+
onSelect: stake => {
|
|
473
|
+
sounds.playSelect();
|
|
474
|
+
setActiveStake(stake);
|
|
475
|
+
},
|
|
476
|
+
containerStyle: styles.stakeRow
|
|
477
|
+
}), /*#__PURE__*/_jsx(StakeInput, {
|
|
478
|
+
value: activeStake,
|
|
479
|
+
min: stakeOptions[0] ?? 100,
|
|
480
|
+
onConfirm: stake => setActiveStake(stake),
|
|
481
|
+
disabled: isSpinning
|
|
482
|
+
})]
|
|
483
|
+
}), hasStakeCount && /*#__PURE__*/_jsxs(View, {
|
|
484
|
+
style: styles.stakeSection,
|
|
485
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
486
|
+
style: styles.stakeLabel,
|
|
487
|
+
children: t('wheel.spinsPerSession')
|
|
488
|
+
}), /*#__PURE__*/_jsx(MonflowtsChipGroup, {
|
|
489
|
+
options: stakeCountOptions,
|
|
490
|
+
selectedValue: selectedStakeCount,
|
|
491
|
+
onSelect: count => {
|
|
492
|
+
sounds.playSelect();
|
|
493
|
+
setSelectedStakeCount(count);
|
|
494
|
+
},
|
|
495
|
+
containerStyle: styles.stakeRow,
|
|
496
|
+
getLabel: v => t('wheel.roundsOption', {
|
|
497
|
+
count: v
|
|
498
|
+
})
|
|
499
|
+
}), isMultiRound && /*#__PURE__*/_jsx(Text, {
|
|
500
|
+
style: {
|
|
501
|
+
color: COLORS.slateLight,
|
|
502
|
+
fontSize: 11,
|
|
503
|
+
textAlign: 'center',
|
|
504
|
+
marginTop: 6
|
|
505
|
+
},
|
|
506
|
+
children: t('wheel.total', {
|
|
507
|
+
amount: formatNumber(totalCostVG)
|
|
508
|
+
})
|
|
509
|
+
})]
|
|
510
|
+
}), isMultiRound && roundNum > 0 && /*#__PURE__*/_jsxs(View, {
|
|
511
|
+
style: styles.sessionBar,
|
|
512
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
513
|
+
style: styles.sessionBarText,
|
|
514
|
+
children: t('wheel.wonAmount', {
|
|
515
|
+
amount: sessionTotalWon
|
|
516
|
+
})
|
|
517
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
518
|
+
style: styles.sessionBarText,
|
|
519
|
+
children: t('wheel.spinsWon', {
|
|
520
|
+
won: sessionWins,
|
|
521
|
+
total: roundNum
|
|
522
|
+
})
|
|
523
|
+
})]
|
|
524
|
+
}), sessionComplete ? /*#__PURE__*/_jsxs(View, {
|
|
525
|
+
style: {
|
|
526
|
+
alignItems: 'center',
|
|
527
|
+
marginBottom: 36,
|
|
528
|
+
paddingHorizontal: 20
|
|
529
|
+
},
|
|
530
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
531
|
+
style: {
|
|
532
|
+
color: COLORS.gold,
|
|
533
|
+
fontSize: 16,
|
|
534
|
+
fontWeight: '700',
|
|
535
|
+
marginBottom: 8
|
|
536
|
+
},
|
|
537
|
+
children: t('wheel.sessionComplete')
|
|
538
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
539
|
+
style: {
|
|
540
|
+
color: COLORS.slateLight,
|
|
541
|
+
fontSize: 13
|
|
542
|
+
},
|
|
543
|
+
children: t('wheel.sessionSummary', {
|
|
544
|
+
won: sessionWins,
|
|
545
|
+
total: selectedStakeCount,
|
|
546
|
+
result: sessionTotalWon > 0 ? t('wheel.winningsAmount', {
|
|
547
|
+
amount: sessionTotalWon
|
|
548
|
+
}) : t('wheel.noWinnings')
|
|
549
|
+
})
|
|
550
|
+
})]
|
|
551
|
+
}) : /*#__PURE__*/_jsx(MonflowtsButton, {
|
|
552
|
+
title: isMultiRound && roundNum > 0 ? t('wheel.spinProgress', {
|
|
553
|
+
round: roundNum,
|
|
554
|
+
total: selectedStakeCount
|
|
555
|
+
}) : t('wheel.spinTheWheel'),
|
|
556
|
+
icon: /*#__PURE__*/_jsx(SvgIcon, {
|
|
557
|
+
name: "slotMachine",
|
|
558
|
+
size: 18,
|
|
559
|
+
color: "#ffffff"
|
|
560
|
+
}),
|
|
561
|
+
loading: isSpinning,
|
|
562
|
+
loadingText: t('wheel.spinning'),
|
|
563
|
+
onPress: spin,
|
|
564
|
+
style: styles.spinBtnWrap,
|
|
565
|
+
textStyle: styles.spinBtnText
|
|
566
|
+
}), /*#__PURE__*/_jsx(InsufficientFundsOverlay, {
|
|
567
|
+
visible: showFundsOverlay,
|
|
568
|
+
balance: balance,
|
|
569
|
+
required: effectiveCostVG,
|
|
570
|
+
onDismiss: () => setShowFundsOverlay(false),
|
|
571
|
+
onTopUp: onTopUp
|
|
572
|
+
}), /*#__PURE__*/_jsx(CoinFlyOverlay, {
|
|
573
|
+
ref: coinFlyRef,
|
|
574
|
+
targetRef: balancePillRef,
|
|
575
|
+
balancePulse: balancePulse
|
|
576
|
+
}), /*#__PURE__*/_jsx(GameRulesModal, {
|
|
577
|
+
visible: rulesVisible,
|
|
578
|
+
onClose: () => setRulesVisible(false),
|
|
579
|
+
gameCode: game?.gameCode ?? 'SPIN_WHEEL'
|
|
580
|
+
}), showResultOverlay && /*#__PURE__*/_jsx(View, {
|
|
581
|
+
style: styles.resultOverlay,
|
|
582
|
+
children: /*#__PURE__*/_jsx(ScrollView, {
|
|
583
|
+
contentContainerStyle: styles.resultScrollContent,
|
|
584
|
+
showsVerticalScrollIndicator: false,
|
|
585
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
586
|
+
style: styles.resultContent,
|
|
587
|
+
children: [lastAmountWon > 0 ? /*#__PURE__*/_jsx(SvgIcon, {
|
|
588
|
+
name: "trophy",
|
|
589
|
+
size: 48,
|
|
590
|
+
color: COLORS.gold
|
|
591
|
+
}) : /*#__PURE__*/_jsx(SvgIcon, {
|
|
592
|
+
name: "slotMachine",
|
|
593
|
+
size: 48,
|
|
594
|
+
color: COLORS.primary
|
|
595
|
+
}), /*#__PURE__*/_jsxs(Text, {
|
|
596
|
+
style: styles.resultTitle,
|
|
597
|
+
children: [t(`${resultMsgKey}.title`), /*#__PURE__*/_jsx(Text, {
|
|
598
|
+
style: {
|
|
599
|
+
color: lastAmountWon > 0 ? COLORS.gold : COLORS.primary
|
|
600
|
+
},
|
|
601
|
+
children: t(`${resultMsgKey}.highlight`)
|
|
602
|
+
})]
|
|
603
|
+
}), lastAmountWon > 0 && /*#__PURE__*/_jsx(Text, {
|
|
604
|
+
style: styles.resultAmount,
|
|
605
|
+
children: t('wheel.winAmount', {
|
|
606
|
+
amount: formatNumber(lastAmountWon),
|
|
607
|
+
currency
|
|
608
|
+
})
|
|
609
|
+
}), isMultiRound && /*#__PURE__*/_jsx(Text, {
|
|
610
|
+
style: {
|
|
611
|
+
color: COLORS.slateLight,
|
|
612
|
+
fontSize: 12,
|
|
613
|
+
marginBottom: 4
|
|
614
|
+
},
|
|
615
|
+
children: t('wheel.spinsWon', {
|
|
616
|
+
won: sessionWins,
|
|
617
|
+
total: selectedStakeCount
|
|
618
|
+
})
|
|
619
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
620
|
+
style: styles.resultSubtitle,
|
|
621
|
+
children: t(`${resultMsgKey}.sub`)
|
|
622
|
+
}), /*#__PURE__*/_jsx(JackpotNearMiss, {
|
|
623
|
+
jackpotAmountKobo: game?.gameplayRules?.jackpotAmountKobo ?? 0,
|
|
624
|
+
currency: currency
|
|
625
|
+
}), demoMode ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
626
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
627
|
+
style: styles.demoHookText,
|
|
628
|
+
children: lastAmountWon > 0 ? t('wheel.demoHookWin') : t('wheel.demoHookLoss')
|
|
629
|
+
}), /*#__PURE__*/_jsx(MonflowtsButton, {
|
|
630
|
+
title: t('wheel.playForReal'),
|
|
631
|
+
icon: /*#__PURE__*/_jsx(SvgIcon, {
|
|
632
|
+
name: "lightning",
|
|
633
|
+
size: 16,
|
|
634
|
+
color: "#ffffff"
|
|
635
|
+
}),
|
|
636
|
+
onPress: () => {
|
|
637
|
+
toggleDemoMode();
|
|
638
|
+
handleResultPlayAgain();
|
|
639
|
+
},
|
|
640
|
+
style: styles.liveCtaButton
|
|
641
|
+
}), /*#__PURE__*/_jsx(MonflowtsButton, {
|
|
642
|
+
title: t('wheel.keepPracticing'),
|
|
643
|
+
variant: "outline",
|
|
644
|
+
icon: /*#__PURE__*/_jsx(SvgIcon, {
|
|
645
|
+
name: "refresh",
|
|
646
|
+
size: 16,
|
|
647
|
+
color: "#ffffff"
|
|
648
|
+
}),
|
|
649
|
+
onPress: handleResultPlayAgain,
|
|
650
|
+
style: {
|
|
651
|
+
marginTop: 12
|
|
652
|
+
}
|
|
653
|
+
})]
|
|
654
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
655
|
+
children: [/*#__PURE__*/_jsx(MonflowtsButton, {
|
|
656
|
+
title: lastAmountWon > 0 ? t('wheel.collectAndSpinAgain') : t('wheel.spinAgain'),
|
|
657
|
+
icon: /*#__PURE__*/_jsx(SvgIcon, {
|
|
658
|
+
name: "refresh",
|
|
659
|
+
size: 16,
|
|
660
|
+
color: "#ffffff"
|
|
661
|
+
}),
|
|
662
|
+
onPress: handleResultPlayAgain
|
|
663
|
+
}), /*#__PURE__*/_jsx(MonflowtsButton, {
|
|
664
|
+
title: lastAmountWon > 0 ? t('wheel.collectAndExit') : t('wheel.exit'),
|
|
665
|
+
variant: "outline",
|
|
666
|
+
onPress: handleResultExit,
|
|
667
|
+
style: {
|
|
668
|
+
marginTop: 12
|
|
669
|
+
}
|
|
670
|
+
})]
|
|
671
|
+
})]
|
|
672
|
+
})
|
|
673
|
+
})
|
|
674
|
+
})]
|
|
675
|
+
})]
|
|
676
|
+
});
|
|
677
|
+
};
|
|
678
|
+
const styles = StyleSheet.create({
|
|
679
|
+
container: {
|
|
680
|
+
flex: 1,
|
|
681
|
+
backgroundColor: COLORS.backgroundDark,
|
|
682
|
+
paddingTop: 50
|
|
683
|
+
},
|
|
684
|
+
header: {
|
|
685
|
+
flexDirection: 'row',
|
|
686
|
+
alignItems: 'center',
|
|
687
|
+
justifyContent: 'space-between',
|
|
688
|
+
paddingHorizontal: 20,
|
|
689
|
+
paddingBottom: 12
|
|
690
|
+
},
|
|
691
|
+
circleBtn: {
|
|
692
|
+
width: 40,
|
|
693
|
+
height: 40,
|
|
694
|
+
borderRadius: 20,
|
|
695
|
+
backgroundColor: COLORS.white05,
|
|
696
|
+
borderWidth: 1,
|
|
697
|
+
borderColor: COLORS.white10,
|
|
698
|
+
alignItems: 'center',
|
|
699
|
+
justifyContent: 'center'
|
|
700
|
+
},
|
|
701
|
+
btnText: {
|
|
702
|
+
color: '#fff',
|
|
703
|
+
fontSize: 22
|
|
704
|
+
},
|
|
705
|
+
headerCenter: {
|
|
706
|
+
alignItems: 'center'
|
|
707
|
+
},
|
|
708
|
+
headerTag: {
|
|
709
|
+
fontSize: 9,
|
|
710
|
+
fontWeight: '800',
|
|
711
|
+
color: COLORS.blue,
|
|
712
|
+
letterSpacing: 3
|
|
713
|
+
},
|
|
714
|
+
headerTitle: {
|
|
715
|
+
fontSize: 18,
|
|
716
|
+
fontWeight: '700',
|
|
717
|
+
color: '#fff'
|
|
718
|
+
},
|
|
719
|
+
balancePill: {
|
|
720
|
+
backgroundColor: COLORS.white05,
|
|
721
|
+
borderWidth: 1,
|
|
722
|
+
borderColor: COLORS.white10,
|
|
723
|
+
borderRadius: 20,
|
|
724
|
+
paddingHorizontal: 12,
|
|
725
|
+
paddingVertical: 6
|
|
726
|
+
},
|
|
727
|
+
balanceText: {
|
|
728
|
+
color: COLORS.gold,
|
|
729
|
+
fontSize: 13,
|
|
730
|
+
fontWeight: '700'
|
|
731
|
+
},
|
|
732
|
+
wheelArea: {
|
|
733
|
+
flex: 1,
|
|
734
|
+
alignItems: 'center',
|
|
735
|
+
justifyContent: 'center'
|
|
736
|
+
},
|
|
737
|
+
wheelContainer: {
|
|
738
|
+
alignItems: 'center',
|
|
739
|
+
justifyContent: 'center'
|
|
740
|
+
},
|
|
741
|
+
pointer: {
|
|
742
|
+
position: 'absolute',
|
|
743
|
+
top: -24,
|
|
744
|
+
zIndex: 10,
|
|
745
|
+
alignSelf: 'center',
|
|
746
|
+
shadowColor: COLORS.gold,
|
|
747
|
+
shadowOffset: {
|
|
748
|
+
width: 0,
|
|
749
|
+
height: 0
|
|
750
|
+
},
|
|
751
|
+
shadowOpacity: 0.8,
|
|
752
|
+
shadowRadius: 10
|
|
753
|
+
},
|
|
754
|
+
pointerText: {
|
|
755
|
+
fontSize: 32,
|
|
756
|
+
color: COLORS.gold
|
|
757
|
+
},
|
|
758
|
+
stakeSection: {
|
|
759
|
+
paddingHorizontal: 20,
|
|
760
|
+
marginBottom: 16
|
|
761
|
+
},
|
|
762
|
+
stakeLabel: {
|
|
763
|
+
fontSize: 10,
|
|
764
|
+
fontWeight: '800',
|
|
765
|
+
color: COLORS.slateDark,
|
|
766
|
+
letterSpacing: 2,
|
|
767
|
+
textAlign: 'center',
|
|
768
|
+
marginBottom: 10,
|
|
769
|
+
textTransform: 'uppercase'
|
|
770
|
+
},
|
|
771
|
+
stakeRow: {
|
|
772
|
+
flexDirection: 'row',
|
|
773
|
+
justifyContent: 'center',
|
|
774
|
+
gap: 8
|
|
775
|
+
},
|
|
776
|
+
spinBtnWrap: {
|
|
777
|
+
marginBottom: 36
|
|
778
|
+
},
|
|
779
|
+
spinBtnText: {
|
|
780
|
+
fontSize: 18,
|
|
781
|
+
fontWeight: '800',
|
|
782
|
+
color: '#fff',
|
|
783
|
+
letterSpacing: 2
|
|
784
|
+
},
|
|
785
|
+
roundBadge: {
|
|
786
|
+
backgroundColor: COLORS.white05,
|
|
787
|
+
borderWidth: 1,
|
|
788
|
+
borderColor: COLORS.white10,
|
|
789
|
+
borderRadius: 20,
|
|
790
|
+
paddingHorizontal: 10,
|
|
791
|
+
paddingVertical: 4
|
|
792
|
+
},
|
|
793
|
+
roundText: {
|
|
794
|
+
fontSize: 11,
|
|
795
|
+
fontWeight: '700',
|
|
796
|
+
color: COLORS.primary
|
|
797
|
+
},
|
|
798
|
+
sessionBar: {
|
|
799
|
+
flexDirection: 'row',
|
|
800
|
+
justifyContent: 'space-between',
|
|
801
|
+
marginHorizontal: 20,
|
|
802
|
+
paddingHorizontal: 16,
|
|
803
|
+
paddingVertical: 8,
|
|
804
|
+
backgroundColor: COLORS.white05,
|
|
805
|
+
borderRadius: 12,
|
|
806
|
+
borderWidth: 1,
|
|
807
|
+
borderColor: COLORS.white10,
|
|
808
|
+
marginBottom: 12
|
|
809
|
+
},
|
|
810
|
+
sessionBarText: {
|
|
811
|
+
fontSize: 11,
|
|
812
|
+
fontWeight: '700',
|
|
813
|
+
color: COLORS.slateLight
|
|
814
|
+
},
|
|
815
|
+
expiredOverlay: {
|
|
816
|
+
...StyleSheet.absoluteFill,
|
|
817
|
+
backgroundColor: 'rgba(0,0,0,0.85)',
|
|
818
|
+
zIndex: 200,
|
|
819
|
+
alignItems: 'center',
|
|
820
|
+
justifyContent: 'center',
|
|
821
|
+
paddingHorizontal: 32
|
|
822
|
+
},
|
|
823
|
+
expiredTitle: {
|
|
824
|
+
fontSize: 28,
|
|
825
|
+
fontWeight: '800',
|
|
826
|
+
color: COLORS.lossRed,
|
|
827
|
+
marginBottom: 12
|
|
828
|
+
},
|
|
829
|
+
expiredText: {
|
|
830
|
+
fontSize: 16,
|
|
831
|
+
color: COLORS.slateLight,
|
|
832
|
+
textAlign: 'center',
|
|
833
|
+
marginBottom: 24
|
|
834
|
+
},
|
|
835
|
+
resultOverlay: {
|
|
836
|
+
...StyleSheet.absoluteFill,
|
|
837
|
+
backgroundColor: 'rgba(0,0,0,0.9)',
|
|
838
|
+
zIndex: 300
|
|
839
|
+
},
|
|
840
|
+
resultScrollContent: {
|
|
841
|
+
flexGrow: 1,
|
|
842
|
+
alignItems: 'center',
|
|
843
|
+
justifyContent: 'center',
|
|
844
|
+
paddingHorizontal: 32,
|
|
845
|
+
paddingVertical: 40
|
|
846
|
+
},
|
|
847
|
+
resultContent: {
|
|
848
|
+
alignItems: 'center',
|
|
849
|
+
maxWidth: 320,
|
|
850
|
+
width: '100%'
|
|
851
|
+
},
|
|
852
|
+
resultTitle: {
|
|
853
|
+
fontSize: 24,
|
|
854
|
+
fontWeight: '800',
|
|
855
|
+
color: '#fff',
|
|
856
|
+
textAlign: 'center',
|
|
857
|
+
marginTop: 16,
|
|
858
|
+
marginBottom: 8
|
|
859
|
+
},
|
|
860
|
+
resultAmount: {
|
|
861
|
+
fontSize: 28,
|
|
862
|
+
fontWeight: '800',
|
|
863
|
+
color: COLORS.gold,
|
|
864
|
+
marginBottom: 4
|
|
865
|
+
},
|
|
866
|
+
resultSubtitle: {
|
|
867
|
+
fontSize: 14,
|
|
868
|
+
color: COLORS.slateLight,
|
|
869
|
+
textAlign: 'center',
|
|
870
|
+
marginBottom: 24,
|
|
871
|
+
lineHeight: 20
|
|
872
|
+
},
|
|
873
|
+
demoHookText: {
|
|
874
|
+
fontSize: 15,
|
|
875
|
+
fontWeight: '800',
|
|
876
|
+
color: COLORS.gold,
|
|
877
|
+
textAlign: 'center',
|
|
878
|
+
marginBottom: 12
|
|
879
|
+
},
|
|
880
|
+
liveCtaButton: {
|
|
881
|
+
backgroundColor: COLORS.winGreen,
|
|
882
|
+
shadowColor: COLORS.winGreen,
|
|
883
|
+
shadowOffset: {
|
|
884
|
+
width: 0,
|
|
885
|
+
height: 4
|
|
886
|
+
},
|
|
887
|
+
shadowOpacity: 0.4,
|
|
888
|
+
shadowRadius: 12
|
|
889
|
+
}
|
|
890
|
+
});
|
|
891
|
+
export default FortuneWheel;
|
|
892
|
+
//# sourceMappingURL=FortuneWheel.js.map
|