@onairos/react-native 3.7.2 → 3.7.4
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/lib/commonjs/api/index.js +219 -9
- package/lib/commonjs/components/BodyText.js +27 -9
- package/lib/commonjs/components/BrandMark.js +111 -10
- package/lib/commonjs/components/CodeInput.js +120 -9
- package/lib/commonjs/components/EmailInput.js +30 -8
- package/lib/commonjs/components/GoogleButton.js +56 -9
- package/lib/commonjs/components/HeadingGroup.js +43 -9
- package/lib/commonjs/components/LLMDataInputModal.js +664 -14
- package/lib/commonjs/components/ModalHeader.js +99 -9
- package/lib/commonjs/components/ModalSheet.js +47 -9
- package/lib/commonjs/components/Onairos.js +380 -14
- package/lib/commonjs/components/OnairosButton.js +313 -13
- package/lib/commonjs/components/OnairosSignInButton.js +130 -12
- package/lib/commonjs/components/Overlay.js +465 -13
- package/lib/commonjs/components/PersonaImage.js +137 -10
- package/lib/commonjs/components/PersonaLoadingScreen.js +318 -12
- package/lib/commonjs/components/PersonalizationConsentScreen.js +467 -13
- package/lib/commonjs/components/PinCreationScreen.js +403 -12
- package/lib/commonjs/components/PinInput.js +464 -9
- package/lib/commonjs/components/PlatformConnectorsStep.js +1311 -23
- package/lib/commonjs/components/PlatformList.js +137 -10
- package/lib/commonjs/components/PlatformToggle.js +180 -9
- package/lib/commonjs/components/PrimaryButton.js +180 -10
- package/lib/commonjs/components/SignInMatchAnimation.js +197 -9
- package/lib/commonjs/components/SignInStep.js +345 -12
- package/lib/commonjs/components/UniversalOnboarding.js +2780 -30
- package/lib/commonjs/components/VerificationStep.js +176 -11
- package/lib/commonjs/components/WelcomeScreen.js +461 -22
- package/lib/commonjs/components/icons/Basicproficon.js +37 -8
- package/lib/commonjs/components/icons/Basicprofile.js +21 -8
- package/lib/commonjs/components/icons/Checkbox.js +21 -8
- package/lib/commonjs/components/icons/Checkmark.js +27 -8
- package/lib/commonjs/components/icons/Contentanalysis.js +21 -8
- package/lib/commonjs/components/icons/Contenticon.js +39 -8
- package/lib/commonjs/components/icons/EnochE.js +41 -8
- package/lib/commonjs/components/icons/Personalityicon.js +30 -8
- package/lib/commonjs/components/icons/Personalityprofile.js +21 -8
- package/lib/commonjs/components/icons/Personalitytraits.js +21 -8
- package/lib/commonjs/components/icons/Userpreferences.js +21 -8
- package/lib/commonjs/components/icons/index.js +84 -17
- package/lib/commonjs/components/onboarding/OAuthWebView.js +1754 -18
- package/lib/commonjs/components/onboarding/OnboardingHeader.js +74 -10
- package/lib/commonjs/components/onboarding/PinInput.js +283 -10
- package/lib/commonjs/components/onboarding/PlatformConnector.js +249 -11
- package/lib/commonjs/config/PLATFORM_APIS.md +849 -0
- package/lib/commonjs/config/api.js +56 -7
- package/lib/commonjs/constants/index.js +120 -7
- package/lib/commonjs/context/AuthContext.js +345 -10
- package/lib/commonjs/hooks/useConnectedAccounts.js +111 -9
- package/lib/commonjs/hooks/useConnections.js +102 -8
- package/lib/commonjs/hooks/useCredentials.js +178 -10
- package/lib/commonjs/hooks/useUserConnections.js +148 -10
- package/lib/commonjs/index.js +439 -34
- package/lib/commonjs/services/apiClient.js +298 -8
- package/lib/commonjs/services/biometricPinService.js +180 -8
- package/lib/commonjs/services/chatGPTConversationExtractor.js +155 -8
- package/lib/commonjs/services/chatGPTConversationService.js +275 -9
- package/lib/commonjs/services/claudeConversationExtractor.js +103 -8
- package/lib/commonjs/services/claudeConversationService.js +158 -9
- package/lib/commonjs/services/connectedAccountsService.js +310 -10
- package/lib/commonjs/services/googleAuthService.js +252 -11
- package/lib/commonjs/services/hingeDataExtractor.js +105 -8
- package/lib/commonjs/services/hingeDataService.js +150 -9
- package/lib/commonjs/services/imageCompressionService.js +260 -7
- package/lib/commonjs/services/instagramDataExtractor.js +126 -8
- package/lib/commonjs/services/instagramDataService.js +163 -9
- package/lib/commonjs/services/jwtStorageService.js +276 -7
- package/lib/commonjs/services/linkedinDOMExtractor.js +245 -7
- package/lib/commonjs/services/linkedinProfileService.js +222 -9
- package/lib/commonjs/services/linkedinScrapingService.js +230 -8
- package/lib/commonjs/services/llmDataStorage.js +294 -8
- package/lib/commonjs/services/mobileTrainingService.js +186 -8
- package/lib/commonjs/services/netflixDataExtractor.js +120 -8
- package/lib/commonjs/services/netflixDataService.js +198 -9
- package/lib/commonjs/services/pinEncryptionService.js +84 -8
- package/lib/commonjs/services/pinStorageUtils.js +105 -7
- package/lib/commonjs/services/platformAuthService.js +1484 -12
- package/lib/commonjs/services/sephoraDataExtractor.js +140 -8
- package/lib/commonjs/services/sephoraDataService.js +200 -9
- package/lib/commonjs/services/spotifyDataExtractor.js +148 -8
- package/lib/commonjs/services/spotifyDataService.js +241 -9
- package/lib/commonjs/services/storageService.js +404 -8
- package/lib/commonjs/services/telegramDataExtractor.js +115 -8
- package/lib/commonjs/services/telegramDataService.js +499 -9
- package/lib/commonjs/services/trainingApiHelpers.js +73 -7
- package/lib/commonjs/services/userConnectionsService.js +340 -10
- package/lib/commonjs/services/youtubeMigrationService.js +416 -10
- package/lib/commonjs/theme/index.js +250 -7
- package/lib/commonjs/types/ambient.d.js +2 -1
- package/lib/commonjs/types/declarations.d.js +2 -1
- package/lib/commonjs/types/index.js +6 -1
- package/lib/commonjs/types/node-fix.d.js +2 -1
- package/lib/commonjs/types/node-override.d.js +2 -1
- package/lib/commonjs/types/opacity.d.js +2 -1
- package/lib/commonjs/types.js +14 -1
- package/lib/commonjs/utils/Portal.js +98 -8
- package/lib/commonjs/utils/api.js +130 -9
- package/lib/commonjs/utils/assetRegistry.js +210 -35
- package/lib/commonjs/utils/auth.js +112 -9
- package/lib/commonjs/utils/connectorTests.js +613 -29
- package/lib/commonjs/utils/crypto.js +62 -8
- package/lib/commonjs/utils/debugHelper.js +64 -1
- package/lib/commonjs/utils/encryption.js +76 -7
- package/lib/commonjs/utils/eventUtils.js +288 -1
- package/lib/commonjs/utils/haptics.js +66 -9
- package/lib/commonjs/utils/imagePreloader.js +6 -1
- package/lib/commonjs/utils/networkDiagnostics.js +226 -8
- package/lib/commonjs/utils/onairosApi.js +350 -9
- package/lib/commonjs/utils/programmaticFlow.js +117 -9
- package/lib/commonjs/utils/retryHelper.js +220 -1
- package/lib/commonjs/utils/secureStorage.js +349 -10
- package/lib/commonjs/utils/webviewScripts/chatgpt.js +551 -1
- package/lib/commonjs/utils/webviewScripts/claude.js +376 -1
- package/lib/commonjs/utils/webviewScripts/hinge.js +411 -1
- package/lib/commonjs/utils/webviewScripts/index.js +698 -15
- package/lib/commonjs/utils/webviewScripts/instagram.js +454 -1
- package/lib/commonjs/utils/webviewScripts/linkedin.js +880 -1
- package/lib/commonjs/utils/webviewScripts/netflix.js +382 -1
- package/lib/commonjs/utils/webviewScripts/sephora.js +516 -1
- package/lib/commonjs/utils/webviewScripts/spotify.js +419 -1
- package/lib/commonjs/utils/webviewScripts/telegram.js +678 -1
- package/lib/module/api/index.js +211 -1
- package/lib/module/components/BodyText.js +20 -1
- package/lib/module/components/BrandMark.js +104 -1
- package/lib/module/components/CodeInput.js +113 -1
- package/lib/module/components/EmailInput.js +23 -1
- package/lib/module/components/GoogleButton.js +49 -1
- package/lib/module/components/HeadingGroup.js +36 -1
- package/lib/module/components/LLMDataInputModal.js +656 -7
- package/lib/module/components/ModalHeader.js +92 -1
- package/lib/module/components/ModalSheet.js +39 -1
- package/lib/module/components/Onairos.js +373 -1
- package/lib/module/components/OnairosButton.js +305 -1
- package/lib/module/components/OnairosSignInButton.js +121 -1
- package/lib/module/components/Overlay.js +456 -1
- package/lib/module/components/PersonaImage.js +129 -1
- package/lib/module/components/PersonaLoadingScreen.js +310 -1
- package/lib/module/components/PersonalizationConsentScreen.js +460 -1
- package/lib/module/components/PinCreationScreen.js +396 -1
- package/lib/module/components/PinInput.js +456 -1
- package/lib/module/components/PlatformConnectorsStep.js +1302 -6
- package/lib/module/components/PlatformList.js +129 -1
- package/lib/module/components/PlatformToggle.js +173 -1
- package/lib/module/components/PrimaryButton.js +172 -1
- package/lib/module/components/SignInMatchAnimation.js +189 -1
- package/lib/module/components/SignInStep.js +338 -1
- package/lib/module/components/UniversalOnboarding.js +2770 -1
- package/lib/module/components/VerificationStep.js +168 -1
- package/lib/module/components/WelcomeScreen.js +453 -1
- package/lib/module/components/icons/Basicproficon.js +30 -1
- package/lib/module/components/icons/Basicprofile.js +14 -1
- package/lib/module/components/icons/Checkbox.js +14 -1
- package/lib/module/components/icons/Checkmark.js +20 -1
- package/lib/module/components/icons/Contentanalysis.js +14 -1
- package/lib/module/components/icons/Contenticon.js +32 -1
- package/lib/module/components/icons/EnochE.js +34 -1
- package/lib/module/components/icons/Personalityicon.js +23 -1
- package/lib/module/components/icons/Personalityprofile.js +14 -1
- package/lib/module/components/icons/Personalitytraits.js +14 -1
- package/lib/module/components/icons/Userpreferences.js +14 -1
- package/lib/module/components/icons/index.js +13 -1
- package/lib/module/components/onboarding/OAuthWebView.js +1746 -1
- package/lib/module/components/onboarding/OnboardingHeader.js +66 -1
- package/lib/module/components/onboarding/PinInput.js +274 -1
- package/lib/module/components/onboarding/PlatformConnector.js +240 -1
- package/lib/module/config/PLATFORM_APIS.md +849 -0
- package/lib/module/config/api.js +47 -1
- package/lib/module/constants/index.js +114 -1
- package/lib/module/context/AuthContext.js +335 -1
- package/lib/module/hooks/useConnectedAccounts.js +106 -1
- package/lib/module/hooks/useConnections.js +95 -1
- package/lib/module/hooks/useCredentials.js +171 -6
- package/lib/module/hooks/useUserConnections.js +140 -1
- package/lib/module/index.js +172 -1
- package/lib/module/services/apiClient.js +295 -1
- package/lib/module/services/biometricPinService.js +169 -1
- package/lib/module/services/chatGPTConversationExtractor.js +149 -1
- package/lib/module/services/chatGPTConversationService.js +268 -1
- package/lib/module/services/claudeConversationExtractor.js +97 -1
- package/lib/module/services/claudeConversationService.js +151 -1
- package/lib/module/services/connectedAccountsService.js +293 -1
- package/lib/module/services/googleAuthService.js +241 -1
- package/lib/module/services/hingeDataExtractor.js +99 -1
- package/lib/module/services/hingeDataService.js +143 -1
- package/lib/module/services/imageCompressionService.js +250 -1
- package/lib/module/services/instagramDataExtractor.js +120 -1
- package/lib/module/services/instagramDataService.js +156 -1
- package/lib/module/services/jwtStorageService.js +257 -1
- package/lib/module/services/linkedinDOMExtractor.js +234 -1
- package/lib/module/services/linkedinProfileService.js +210 -1
- package/lib/module/services/linkedinScrapingService.js +219 -1
- package/lib/module/services/llmDataStorage.js +277 -1
- package/lib/module/services/mobileTrainingService.js +173 -1
- package/lib/module/services/netflixDataExtractor.js +114 -1
- package/lib/module/services/netflixDataService.js +191 -1
- package/lib/module/services/pinEncryptionService.js +74 -6
- package/lib/module/services/pinStorageUtils.js +93 -1
- package/lib/module/services/platformAuthService.js +1461 -1
- package/lib/module/services/sephoraDataExtractor.js +134 -1
- package/lib/module/services/sephoraDataService.js +193 -1
- package/lib/module/services/spotifyDataExtractor.js +142 -1
- package/lib/module/services/spotifyDataService.js +234 -1
- package/lib/module/services/storageService.js +383 -1
- package/lib/module/services/telegramDataExtractor.js +109 -1
- package/lib/module/services/telegramDataService.js +493 -1
- package/lib/module/services/trainingApiHelpers.js +67 -1
- package/lib/module/services/userConnectionsService.js +329 -1
- package/lib/module/services/youtubeMigrationService.js +405 -1
- package/lib/module/theme/index.js +245 -1
- package/lib/module/types.js +10 -1
- package/lib/module/utils/Portal.js +90 -1
- package/lib/module/utils/api.js +118 -1
- package/lib/module/utils/assetRegistry.js +200 -34
- package/lib/module/utils/auth.js +100 -1
- package/lib/module/utils/connectorTests.js +600 -27
- package/lib/module/utils/crypto.js +54 -1
- package/lib/module/utils/debugHelper.js +54 -1
- package/lib/module/utils/encryption.js +67 -1
- package/lib/module/utils/eventUtils.js +270 -1
- package/lib/module/utils/haptics.js +59 -8
- package/lib/module/utils/imagePreloader.js +3 -1
- package/lib/module/utils/networkDiagnostics.js +217 -1
- package/lib/module/utils/onairosApi.js +333 -1
- package/lib/module/utils/programmaticFlow.js +111 -1
- package/lib/module/utils/retryHelper.js +211 -1
- package/lib/module/utils/secureStorage.js +330 -6
- package/lib/module/utils/webviewScripts/chatgpt.js +545 -1
- package/lib/module/utils/webviewScripts/claude.js +370 -1
- package/lib/module/utils/webviewScripts/hinge.js +405 -1
- package/lib/module/utils/webviewScripts/index.js +434 -1
- package/lib/module/utils/webviewScripts/instagram.js +448 -1
- package/lib/module/utils/webviewScripts/linkedin.js +874 -1
- package/lib/module/utils/webviewScripts/netflix.js +376 -1
- package/lib/module/utils/webviewScripts/sephora.js +510 -1
- package/lib/module/utils/webviewScripts/spotify.js +413 -1
- package/lib/module/utils/webviewScripts/telegram.js +672 -1
- package/package.json +2 -2
|
@@ -1 +1,310 @@
|
|
|
1
|
-
import React,{useEffect,useRef,useState}from'react';import{View,Text,StyleSheet,Animated}from'react-native';import _0xe0a37 from'lottie-react-native';import{COLORS}from'../theme';function _0x3a22(_0x3a9d0a,_0x3a22dd){_0x3a9d0a=_0x3a9d0a-0x0;const _0x2203d7=_0x3a9d();let _0x14448c=_0x2203d7[_0x3a9d0a];return _0x14448c;}import{triggerHaptic,HapticType}from'../utils/haptics';import{ANIMATIONS}from'../utils/assetRegistry';function _0x3a9d(){const _0x256d03=['Keeping\x20your\x20data\x20private','You\x27re\x20more\x20interesting\x20than\x20I\x20expected','Almost\x20done','Complete!','random','izXmV','floor','rFrQl','PKFcL','JoFNl','rIyzW','WBdYy','tTeFf','short','OmlUx','PzKgx','XfGYE','guBWR','100%','TWiuy','Value','BXjFC','current','xxQOG','oYSRx','utyzl','QJHnj','mqRxC','TOEOe','loop','timing','start','IrfxO','OTGmH','RZnrG','OfIYr','ciuEL','forEach','rzZdH','WNzxq','YAwNn','sRHSl','hikba','minProgress','maxProgress','text','VUaww','ENCve','DeUXa','iCFIk','XanrT','max','push','sort','LuAyI','medium','long','oFame','NvtfB','NAUnO','DpBDi','cikqN','reqJk','dvGlc','SUCCESS','map','ekfhb','progress','sRiXR','mdMxe','nMYCA','ypHmc','RVXvQ','AjvRN','PyFyF','AYsnJ','JAUtE','IOxjq','min','Rgrww','length','lWyvh','yKNln','pwsXJ','OYeKM','BEASG','hWjDx','createElement','container','content','contain','loadingText','dotsContainer','dot','Text','progressTrack','View','interpolate','gyfiq','create','surface','center','IBM\x20Plex\x20Sans','600','grey800','row','#E5E5E5','hidden'];_0x3a9d=function(){return _0x256d03;};return _0x3a9d();}const STATUS_MESSAGES=[{'text':_0x3a22(0x0),'minProgress':0x0,'maxProgress':0x19},{'text':'Trying\x20to\x20understand\x20your\x20mind','minProgress':0x14,'maxProgress':0x2d},{'text':_0x3a22(0x1),'minProgress':0x28,'maxProgress':0x41},{'text':'Finalizing\x20your\x20unique\x20persona','minProgress':0x3c,'maxProgress':0x55},{'text':_0x3a22(0x2),'minProgress':0x50,'maxProgress':0x5f},{'text':_0x3a22(0x3),'minProgress':0x64,'maxProgress':0x64}],randomInRange=(_0x2d2eee,_0x26d32a)=>{const _0x53aabc={'tixdO':function(_0x27e653,_0x4d1e3c){return _0x27e653+_0x4d1e3c;},'NResV':function(_0x196559,_0x35c52d){return _0x196559*_0x35c52d;},'izXmV':function(_0x469816,_0x19f4b9){return _0x469816-_0x19f4b9;}};return _0x53aabc['tixdO'](_0x53aabc['NResV'](Math[_0x3a22(0x4)](),_0x53aabc[_0x3a22(0x5)](_0x26d32a,_0x2d2eee)),_0x2d2eee);},randomIntInRange=(_0x4a9ed0,_0x2f64e0)=>{const _0x7bcbf1={'rFrQl':function(_0x44b0fd,_0x10defd){return _0x44b0fd+_0x10defd;}};return Math[_0x3a22(0x6)](randomInRange(_0x4a9ed0,_0x7bcbf1[_0x3a22(0x7)](_0x2f64e0,0x1)));},PersonaLoadingScreen=({visible:_0x52aa90,onComplete:_0x5458d7})=>{const _0x6515f7={'TOEOe':function(_0x4fcfdf,_0x40db11){return _0x4fcfdf!==_0x40db11;},'BxLcI':_0x3a22(0x8),'mqRxC':function(_0x28d5b8,_0x4ed507,_0x3588f4){return _0x28d5b8(_0x4ed507,_0x3588f4);},'dvGlc':function(_0x5ce650,_0x3927fc){return _0x5ce650(_0x3927fc);},'ekfhb':_0x3a22(0x9),'mdMxe':function(_0x22d22c,_0x4ff6b3){return _0x22d22c!==_0x4ff6b3;},'nMYCA':_0x3a22(0xa),'FBvaQ':_0x3a22(0xb),'rzZdH':function(_0x4296a6,_0x5b584b){return _0x4296a6(_0x5b584b);},'ypHmc':function(_0x14941b,_0xa4b320){return _0x14941b!==_0xa4b320;},'RVXvQ':'AjvRN','Rgrww':function(_0x2adc77,_0x2d2641){return _0x2adc77<_0x2d2641;},'pwsXJ':function(_0x2bbadd,_0x4ebc2b){return _0x2bbadd>=_0x4ebc2b;},'lWyvh':function(_0x49c993,_0x2be8d1){return _0x49c993(_0x2be8d1);},'yKNln':function(_0x28f5c7,_0x2f30b5){return _0x28f5c7/_0x2f30b5;},'DpBDi':function(_0x360e7d,_0x2646db,_0xf56966){return _0x360e7d(_0x2646db,_0xf56966);},'hWjDx':function(_0x560621,_0x16b760,_0x6b3b3d){return _0x560621(_0x16b760,_0x6b3b3d);},'nExAZ':function(_0x4cf332,_0x1b778c,_0x3a63ea){return _0x4cf332(_0x1b778c,_0x3a63ea);},'OTGmH':function(_0x426110,_0x1dd605){return _0x426110*_0x1dd605;},'RZnrG':function(_0x3efb6a,_0x4a473b){return _0x3efb6a+_0x4a473b;},'OfIYr':_0x3a22(0xc),'TWiuy':function(_0x31f328,_0x295754){return _0x31f328(_0x295754);},'GQyWp':'Keeping\x20your\x20data\x20private','WNzxq':function(_0x172a98,_0x4b4384,_0x1aa9af){return _0x172a98(_0x4b4384,_0x1aa9af);},'YAwNn':function(_0x35a14d,_0x5dfc0c){return _0x35a14d!==_0x5dfc0c;},'sRHSl':'hikba','VUaww':function(_0x1995d5,_0x59e69c){return _0x1995d5-_0x59e69c;},'ENCve':function(_0x43cd7e,_0x55250b){return _0x43cd7e*_0x55250b;},'DeUXa':function(_0x34af79,_0x588432){return _0x34af79+_0x588432;},'iCFIk':function(_0x3061f5,_0x5a2f84){return _0x3061f5*_0x5a2f84;},'XanrT':function(_0x7e2b2f,_0x56ca33){return _0x7e2b2f/_0x56ca33;},'LuAyI':_0x3a22(0xd),'oFame':'PFBdZ','NvtfB':function(_0x15edbd,_0x486e35){return _0x15edbd===_0x486e35;},'DQZqc':_0x3a22(0xe),'NAUnO':_0x3a22(0xf),'FAYXE':function(_0x51fa29,_0x58282f){return _0x51fa29===_0x58282f;},'reqJk':_0x3a22(0x10),'NIryz':function(_0x2fbf64,_0x2cf30b,_0x537f4a){return _0x2fbf64(_0x2cf30b,_0x537f4a);},'DjCKS':_0x3a22(0x11),'sRiXR':function(_0xd0d827,_0x24364c,_0x1955d2){return _0xd0d827(_0x24364c,_0x1955d2);},'BXjFC':function(_0x107572,_0x5d118b){return _0x107572(_0x5d118b);},'xxQOG':function(_0x4b1565,_0x4207f4){return _0x4b1565(_0x4207f4);},'oYSRx':function(_0x27d673,_0x418403){return _0x27d673(_0x418403);},'utyzl':function(_0x2953ee,_0x339474){return _0x2953ee(_0x339474);},'QJHnj':function(_0x18a9ff,_0x26c1e5,_0x4bef98){return _0x18a9ff(_0x26c1e5,_0x4bef98);},'gyfiq':_0x3a22(0x12)},_0x128e84=_0x6515f7[_0x3a22(0x13)](useRef,new Animated[(_0x3a22(0x14))](0x0))['current'],_0x16fdd9=useRef(new Animated[(_0x3a22(0x14))](0.3))['current'],_0x33a8b4=_0x6515f7[_0x3a22(0x15)](useRef,new Animated[(_0x3a22(0x14))](0.3))[_0x3a22(0x16)],_0x342e81=_0x6515f7[_0x3a22(0x17)](useRef,new Animated[(_0x3a22(0x14))](0.3))['current'],[_0x15c9f2,_0x17b5e2]=_0x6515f7[_0x3a22(0x18)](useState,0x0),[_0x545b8a,_0x4a5722]=_0x6515f7[_0x3a22(0x19)](useState,'Keeping\x20your\x20data\x20private'),_0xb6e58b=_0x6515f7[_0x3a22(0x17)](useRef,[]);_0x6515f7[_0x3a22(0x1a)](useEffect,()=>{const _0x2a2867={'IrfxO':function(_0x440569,_0x179b6e,_0x1878a9){return _0x6515f7[_0x3a22(0x1b)](_0x440569,_0x179b6e,_0x1878a9);}};if(!_0x52aa90)return;const _0x4e5a37=(_0x564d8c,_0xd39304)=>{if(_0x6515f7[_0x3a22(0x1c)](_0x6515f7['BxLcI'],'PKFcL'))_0x447d2a['current']['forEach'](_0x18b2fb=>_0xf63e04(_0x18b2fb)),_0x15e3e2[_0x3a22(0x16)]=[];else return Animated[_0x3a22(0x1d)](Animated['sequence']([Animated[_0x3a22(0x1e)](_0x564d8c,{'toValue':0x1,'duration':0x258,'useNativeDriver':!![]}),Animated['timing'](_0x564d8c,{'toValue':0.3,'duration':0x258,'useNativeDriver':!![]})]),{'iterations':-0x1});};setTimeout(()=>{_0x6515f7[_0x3a22(0x1b)](_0x4e5a37,_0x16fdd9,0x0)[_0x3a22(0x1f)]();},0x12c),setTimeout(()=>{_0x6515f7[_0x3a22(0x1b)](_0x4e5a37,_0x33a8b4,0xc8)[_0x3a22(0x1f)]();},0x1f4),_0x6515f7[_0x3a22(0x1b)](setTimeout,()=>{_0x2a2867[_0x3a22(0x20)](_0x4e5a37,_0x342e81,0x190)[_0x3a22(0x1f)]();},0x2bc);},[_0x52aa90,_0x16fdd9,_0x33a8b4,_0x342e81]),useEffect(()=>{const _0x2b5de5={'ciuEL':function(_0x9c3b4e,_0x470b7a,_0x250ae9){return _0x6515f7['nExAZ'](_0x9c3b4e,_0x470b7a,_0x250ae9);},'PyFyF':function(_0x3f872c,_0x3c350c){return _0x3f872c-_0x3c350c;},'AYsnJ':function(_0x5288f9,_0x2de2f2){return _0x6515f7[_0x3a22(0x21)](_0x5288f9,_0x2de2f2);},'JAUtE':function(_0x3bd145,_0x2dbdb4){return _0x6515f7[_0x3a22(0x22)](_0x3bd145,_0x2dbdb4);},'LuGJR':function(_0x36ce55,_0x4edde7){return _0x6515f7['yKNln'](_0x36ce55,_0x4edde7);},'IOxjq':function(_0x4e2199,_0x3d2c59){return _0x6515f7['yKNln'](_0x4e2199,_0x3d2c59);}};if(_0x6515f7[_0x3a22(0x1c)](_0x6515f7[_0x3a22(0x23)],_0x6515f7[_0x3a22(0x23)]))_0x1bf71a=_0x2b5de5[_0x3a22(0x24)](_0x379d4a,0x320,0x4b0);else{if(!_0x52aa90){_0xb6e58b[_0x3a22(0x16)][_0x3a22(0x25)](_0x258620=>clearTimeout(_0x258620)),_0xb6e58b[_0x3a22(0x16)]=[];return;}_0x6515f7[_0x3a22(0x26)](_0x17b5e2,0x0),_0x6515f7[_0x3a22(0x13)](_0x4a5722,_0x6515f7['GQyWp']),_0x128e84['setValue'](0x0);const _0x2f3bb6=_0x6515f7[_0x3a22(0x27)](randomInRange,0x1b58,0x2ee0),_0x4d97a1=_0x6515f7['mqRxC'](randomIntInRange,0x5,0x8),_0xd8be61=[0x0];for(let _0x396ff=0x0;_0x6515f7['Rgrww'](_0x396ff,_0x4d97a1-0x1);_0x396ff++){if(_0x6515f7[_0x3a22(0x28)](_0x6515f7[_0x3a22(0x29)],_0x3a22(0x2a))){const _0x1aa04e=_0x459c90(_0x18e2b5[_0x3a22(0x2b)],_0x343875[_0x3a22(0x2c)]);_0x421e84['push']({'progress':_0x1aa04e,'message':_0x5cea3b[_0x3a22(0x2d)]});}else{const _0x2ba2f0=_0x6515f7[_0x3a22(0x2e)](_0x6515f7[_0x3a22(0x2f)](_0x6515f7[_0x3a22(0x30)](_0x396ff,0x1),0x64/_0x4d97a1),0xa),_0x238c81=_0x6515f7['RZnrG'](_0x6515f7[_0x3a22(0x31)](_0x6515f7[_0x3a22(0x30)](_0x396ff,0x1),_0x6515f7[_0x3a22(0x32)](0x64,_0x4d97a1)),0xa);_0xd8be61['push'](_0x6515f7['nExAZ'](randomIntInRange,Math[_0x3a22(0x33)](0xa,_0x2ba2f0),Math['min'](0x5a,_0x238c81)));}}_0xd8be61[_0x3a22(0x34)](0x64),_0xd8be61[_0x3a22(0x35)]((_0x38bd6f,_0x74c47e)=>_0x38bd6f-_0x74c47e);const _0x208c6e=[_0x6515f7[_0x3a22(0x36)],_0x3a22(0x37),_0x3a22(0x38)],_0x393f3c=[];let _0x52894f=0x0;for(let _0x1603da=0x0;_0x1603da<_0x4d97a1;_0x1603da++){if(_0x6515f7[_0x3a22(0x28)](_0x6515f7[_0x3a22(0x39)],_0x6515f7['oFame']))_0x545a39=_0x6515f7[_0x3a22(0x1b)](_0x360c28,0x1f4,0x320);else{const _0x445315=_0x208c6e[randomIntInRange(0x0,0x2)];let _0x218e4f;if(_0x6515f7[_0x3a22(0x3a)](_0x445315,_0x6515f7[_0x3a22(0x36)])){if(_0x6515f7[_0x3a22(0x3a)](_0x6515f7['DQZqc'],_0x6515f7[_0x3a22(0x3b)]))return Animated['loop'](Animated['sequence']([Animated['timing'](_0x12dd68,{'toValue':0x1,'duration':0x258,'useNativeDriver':!![]}),Animated[_0x3a22(0x1e)](_0xd3a0da,{'toValue':0.3,'duration':0x258,'useNativeDriver':!![]})]),{'iterations':-0x1});else _0x218e4f=_0x6515f7[_0x3a22(0x3c)](randomInRange,0xfa,0x1f4);}else _0x6515f7['FAYXE'](_0x445315,'medium')?_0x6515f7[_0x3a22(0x3a)](_0x3a22(0x3d),_0x6515f7[_0x3a22(0x3e)])?(_0x6515f7[_0x3a22(0x3f)](_0x3d504a,_0x536c6c[_0x3a22(0x40)]),_0x2404a7()):_0x218e4f=randomInRange(0x1f4,0x320):_0x218e4f=_0x6515f7['NIryz'](randomInRange,0x320,0x4b0);_0x393f3c['push'](_0x218e4f),_0x52894f+=_0x218e4f;}}const _0x53603d=0x190,_0x48f399=_0x4d97a1*_0x53603d,_0x2636c8=_0x6515f7['VUaww'](_0x2f3bb6,_0x48f399),_0x58e26d=_0x6515f7[_0x3a22(0x32)](_0x2636c8,_0x52894f),_0x567d21=_0x393f3c[_0x3a22(0x41)](_0x33f968=>_0x33f968*_0x58e26d),_0x29f64a=[];STATUS_MESSAGES[_0x3a22(0x25)](_0x329684=>{if(_0x6515f7['ekfhb']===_0x6515f7[_0x3a22(0x42)]){if(_0x329684[_0x3a22(0x2b)]===0x64)_0x29f64a[_0x3a22(0x34)]({'progress':0x64,'message':_0x329684[_0x3a22(0x2d)]});else{const _0x7da606=_0x6515f7[_0x3a22(0x1b)](randomInRange,_0x329684[_0x3a22(0x2b)],_0x329684[_0x3a22(0x2c)]);_0x29f64a[_0x3a22(0x34)]({'progress':_0x7da606,'message':_0x329684[_0x3a22(0x2d)]});}}else _0x1d48a9(_0x567ed7,0x190)[_0x3a22(0x1f)]();}),_0x29f64a[_0x3a22(0x35)]((_0x3474c3,_0xfaae3b)=>_0x3474c3[_0x3a22(0x43)]-_0xfaae3b[_0x3a22(0x43)]);let _0x2f011c=0x0,_0x249d42=0x0;for(let _0x1acbb0=0x1;_0x1acbb0<=_0x4d97a1;_0x1acbb0++){if(_0x6515f7[_0x3a22(0x3a)]('guBWR',_0x6515f7['DjCKS'])){const _0x1edfb1=_0xd8be61[_0x1acbb0],_0x3cc34d=_0x567d21[_0x6515f7[_0x3a22(0x2e)](_0x1acbb0,0x1)];_0x2f011c+=_0x3cc34d;const _0x4f3b48=_0x6515f7[_0x3a22(0x44)](setTimeout,()=>{const _0x5303ec={'OYeKM':function(_0x215442,_0x2f979a){return _0x6515f7[_0x3a22(0x45)](_0x215442,_0x2f979a);},'tPEdl':_0x6515f7[_0x3a22(0x46)],'BEASG':_0x6515f7['FBvaQ'],'hiutb':function(_0x1e002e,_0x1a6302){return _0x6515f7[_0x3a22(0x26)](_0x1e002e,_0x1a6302);}};if(_0x6515f7[_0x3a22(0x47)](_0x6515f7[_0x3a22(0x48)],_0x3a22(0x49))){const _0x394adc=_0x2b5de5[_0x3a22(0x4a)](_0x2b5de5[_0x3a22(0x4b)](_0x2b5de5[_0x3a22(0x4c)](_0x22f536,0x1),_0x2b5de5['LuGJR'](0x64,_0x11b6cb)),0xa),_0x58547d=_0x2b5de5[_0x3a22(0x4c)](_0x2b5de5['AYsnJ'](_0x2b5de5[_0x3a22(0x4c)](_0x4694dd,0x1),_0x2b5de5[_0x3a22(0x4d)](0x64,_0x28d28c)),0xa);_0x32b1ad[_0x3a22(0x34)](_0x2b5de5['ciuEL'](_0x516b42,_0x3c6e61[_0x3a22(0x33)](0xa,_0x394adc),_0x38755d[_0x3a22(0x4e)](0x5a,_0x58547d)));}else{while(_0x6515f7[_0x3a22(0x4f)](_0x249d42,_0x29f64a[_0x3a22(0x50)])&&_0x6515f7['pwsXJ'](_0x1edfb1,_0x29f64a[_0x249d42][_0x3a22(0x43)])){_0x6515f7[_0x3a22(0x51)](_0x4a5722,_0x29f64a[_0x249d42]['message']),_0x249d42++;}_0x6515f7['lWyvh'](_0x17b5e2,_0x1edfb1),Animated['timing'](_0x128e84,{'toValue':_0x6515f7[_0x3a22(0x52)](_0x1edfb1,0x64),'duration':_0x53603d,'useNativeDriver':![]})[_0x3a22(0x1f)](),_0x6515f7[_0x3a22(0x53)](_0x1edfb1,0x64)&&_0x6515f7[_0x3a22(0x3c)](setTimeout,()=>{if(_0x5303ec[_0x3a22(0x54)](_0x5303ec['tPEdl'],_0x5303ec[_0x3a22(0x55)]))_0x5303ec['hiutb'](triggerHaptic,HapticType[_0x3a22(0x40)]),_0x5458d7();else{_0x33006b[_0x3a22(0x16)][_0x3a22(0x25)](_0x520432=>_0x1ba095(_0x520432)),_0x25aa5e[_0x3a22(0x16)]=[];return;}},0x1f4);}},_0x2f011c);_0xb6e58b['current'][_0x3a22(0x34)](_0x4f3b48),_0x2f011c+=_0x53603d;}else _0x3d8f5d=_0x6515f7[_0x3a22(0x56)](_0x211ce6,0xfa,0x1f4);}return()=>{_0xb6e58b[_0x3a22(0x16)]['forEach'](_0x4a0df8=>clearTimeout(_0x4a0df8)),_0xb6e58b['current']=[];};}},[_0x52aa90,_0x5458d7,_0x128e84]);if(!_0x52aa90)return null;return React[_0x3a22(0x57)](View,{'style':styles[_0x3a22(0x58)]},React[_0x3a22(0x57)](View,{'style':styles[_0x3a22(0x59)]},React[_0x3a22(0x57)](View,{'style':styles['lottieContainer']},React[_0x3a22(0x57)](_0xe0a37,{'source':ANIMATIONS['loader'],'autoPlay':!![],'loop':!![],'style':styles['lottieAnimation'],'resizeMode':_0x3a22(0x5a)})),React[_0x3a22(0x57)](View,{'style':styles['textContainer']},React[_0x3a22(0x57)](Text,{'style':styles[_0x3a22(0x5b)]},_0x545b8a),React[_0x3a22(0x57)](View,{'style':styles[_0x3a22(0x5c)]},React[_0x3a22(0x57)](Animated['Text'],{'style':[styles[_0x3a22(0x5d)],{'opacity':_0x16fdd9}]},'.'),React[_0x3a22(0x57)](Animated[_0x3a22(0x5e)],{'style':[styles[_0x3a22(0x5d)],{'opacity':_0x33a8b4}]},'.'),React[_0x3a22(0x57)](Animated[_0x3a22(0x5e)],{'style':[styles[_0x3a22(0x5d)],{'opacity':_0x342e81}]},'.'))),React[_0x3a22(0x57)](View,{'style':styles['progressContainer']},React['createElement'](View,{'style':styles[_0x3a22(0x5f)]},React[_0x3a22(0x57)](Animated[_0x3a22(0x60)],{'style':[styles['progressFill'],{'width':_0x128e84[_0x3a22(0x61)]({'inputRange':[0x0,0x1],'outputRange':['0%',_0x6515f7[_0x3a22(0x62)]]})}]})))));},styles=StyleSheet[_0x3a22(0x63)]({'container':{'flex':0x1,'backgroundColor':COLORS[_0x3a22(0x64)]},'content':{'flex':0x1,'justifyContent':_0x3a22(0x65),'alignItems':_0x3a22(0x65),'paddingHorizontal':0x18,'marginTop':-0x50},'lottieContainer':{'width':0x168,'height':0x168,'marginBottom':0x20,'alignItems':_0x3a22(0x65),'justifyContent':_0x3a22(0x65)},'lottieAnimation':{'width':_0x3a22(0x12),'height':_0x3a22(0x12)},'textContainer':{'flexDirection':'row','alignItems':_0x3a22(0x65),'marginBottom':0x30},'loadingText':{'fontSize':0x18,'fontFamily':_0x3a22(0x66),'fontWeight':_0x3a22(0x67),'color':COLORS[_0x3a22(0x68)]},'dotsContainer':{'flexDirection':_0x3a22(0x69),'marginLeft':0x4},'dot':{'fontSize':0x18,'fontFamily':_0x3a22(0x66),'fontWeight':_0x3a22(0x67),'color':COLORS[_0x3a22(0x68)],'marginLeft':0x2},'progressContainer':{'width':_0x3a22(0x12),'maxWidth':0x118},'progressTrack':{'height':0x6,'backgroundColor':_0x3a22(0x6a),'borderRadius':0x3,'overflow':_0x3a22(0x6b)},'progressFill':{'height':_0x3a22(0x12),'backgroundColor':COLORS[_0x3a22(0x68)],'borderRadius':0x3}});export default PersonaLoadingScreen;
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { View, Text, StyleSheet, Animated } from 'react-native';
|
|
3
|
+
import LottieView from 'lottie-react-native';
|
|
4
|
+
import { COLORS } from '../theme';
|
|
5
|
+
import { triggerHaptic, HapticType } from '../utils/haptics';
|
|
6
|
+
import { ANIMATIONS } from '../utils/assetRegistry';
|
|
7
|
+
// Status messages with their progress ranges
|
|
8
|
+
const STATUS_MESSAGES = [{
|
|
9
|
+
text: 'Keeping your data private',
|
|
10
|
+
minProgress: 0,
|
|
11
|
+
maxProgress: 25
|
|
12
|
+
}, {
|
|
13
|
+
text: 'Trying to understand your mind',
|
|
14
|
+
minProgress: 20,
|
|
15
|
+
maxProgress: 45
|
|
16
|
+
}, {
|
|
17
|
+
text: "You're more interesting than I expected",
|
|
18
|
+
minProgress: 40,
|
|
19
|
+
maxProgress: 65
|
|
20
|
+
}, {
|
|
21
|
+
text: 'Finalizing your unique persona',
|
|
22
|
+
minProgress: 60,
|
|
23
|
+
maxProgress: 85
|
|
24
|
+
}, {
|
|
25
|
+
text: 'Almost done',
|
|
26
|
+
minProgress: 80,
|
|
27
|
+
maxProgress: 95
|
|
28
|
+
}, {
|
|
29
|
+
text: 'Complete!',
|
|
30
|
+
minProgress: 100,
|
|
31
|
+
maxProgress: 100
|
|
32
|
+
}];
|
|
33
|
+
|
|
34
|
+
// Helper function to get random number in range
|
|
35
|
+
const randomInRange = (min, max) => {
|
|
36
|
+
return Math.random() * (max - min) + min;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// Helper function to get random integer in range
|
|
40
|
+
const randomIntInRange = (min, max) => {
|
|
41
|
+
return Math.floor(randomInRange(min, max + 1));
|
|
42
|
+
};
|
|
43
|
+
const PersonaLoadingScreen = ({
|
|
44
|
+
visible,
|
|
45
|
+
onComplete
|
|
46
|
+
}) => {
|
|
47
|
+
const progressValue = useRef(new Animated.Value(0)).current;
|
|
48
|
+
const dotOpacity1 = useRef(new Animated.Value(0.3)).current;
|
|
49
|
+
const dotOpacity2 = useRef(new Animated.Value(0.3)).current;
|
|
50
|
+
const dotOpacity3 = useRef(new Animated.Value(0.3)).current;
|
|
51
|
+
|
|
52
|
+
// Loading state
|
|
53
|
+
const [currentProgress, setCurrentProgress] = useState(0);
|
|
54
|
+
const [currentStatus, setCurrentStatus] = useState('Keeping your data private');
|
|
55
|
+
const loadingTimeoutsRef = useRef([]);
|
|
56
|
+
|
|
57
|
+
// Pulsing dots animation
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
if (!visible) return;
|
|
60
|
+
const createDotAnimation = (opacity, delay) => {
|
|
61
|
+
return Animated.loop(Animated.sequence([Animated.timing(opacity, {
|
|
62
|
+
toValue: 1,
|
|
63
|
+
duration: 600,
|
|
64
|
+
useNativeDriver: true
|
|
65
|
+
}), Animated.timing(opacity, {
|
|
66
|
+
toValue: 0.3,
|
|
67
|
+
duration: 600,
|
|
68
|
+
useNativeDriver: true
|
|
69
|
+
})]), {
|
|
70
|
+
iterations: -1
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
// Start dot animations with staggered delays
|
|
75
|
+
setTimeout(() => {
|
|
76
|
+
createDotAnimation(dotOpacity1, 0).start();
|
|
77
|
+
}, 300);
|
|
78
|
+
setTimeout(() => {
|
|
79
|
+
createDotAnimation(dotOpacity2, 200).start();
|
|
80
|
+
}, 500);
|
|
81
|
+
setTimeout(() => {
|
|
82
|
+
createDotAnimation(dotOpacity3, 400).start();
|
|
83
|
+
}, 700);
|
|
84
|
+
}, [visible, dotOpacity1, dotOpacity2, dotOpacity3]);
|
|
85
|
+
|
|
86
|
+
// Variable loading sequence effect
|
|
87
|
+
useEffect(() => {
|
|
88
|
+
if (!visible) {
|
|
89
|
+
// Clear any existing timeouts
|
|
90
|
+
loadingTimeoutsRef.current.forEach(timeout => clearTimeout(timeout));
|
|
91
|
+
loadingTimeoutsRef.current = [];
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Reset state
|
|
96
|
+
setCurrentProgress(0);
|
|
97
|
+
setCurrentStatus('Keeping your data private');
|
|
98
|
+
progressValue.setValue(0);
|
|
99
|
+
|
|
100
|
+
// Generate random loading sequence
|
|
101
|
+
const totalDuration = randomInRange(7000, 12000); // 7-12 seconds
|
|
102
|
+
const numStages = randomIntInRange(5, 8); // 5-8 progress stages
|
|
103
|
+
|
|
104
|
+
// Generate random progress points (excluding 0 and 100)
|
|
105
|
+
const progressPoints = [0];
|
|
106
|
+
for (let i = 0; i < numStages - 1; i++) {
|
|
107
|
+
// Distribute progress points somewhat evenly but with randomness
|
|
108
|
+
const minProgress = (i + 1) * (100 / numStages) - 10;
|
|
109
|
+
const maxProgress = (i + 1) * (100 / numStages) + 10;
|
|
110
|
+
progressPoints.push(randomIntInRange(Math.max(10, minProgress), Math.min(90, maxProgress)));
|
|
111
|
+
}
|
|
112
|
+
progressPoints.push(100);
|
|
113
|
+
progressPoints.sort((a, b) => a - b);
|
|
114
|
+
|
|
115
|
+
// Generate pause durations
|
|
116
|
+
const pauseTypes = ['short', 'medium', 'long'];
|
|
117
|
+
const pauseDurations = [];
|
|
118
|
+
let totalPauseDuration = 0;
|
|
119
|
+
for (let i = 0; i < numStages; i++) {
|
|
120
|
+
const pauseType = pauseTypes[randomIntInRange(0, 2)];
|
|
121
|
+
let duration;
|
|
122
|
+
if (pauseType === 'short') {
|
|
123
|
+
duration = randomInRange(250, 500);
|
|
124
|
+
} else if (pauseType === 'medium') {
|
|
125
|
+
duration = randomInRange(500, 800);
|
|
126
|
+
} else {
|
|
127
|
+
duration = randomInRange(800, 1200);
|
|
128
|
+
}
|
|
129
|
+
pauseDurations.push(duration);
|
|
130
|
+
totalPauseDuration += duration;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Adjust animation durations to fit total time budget
|
|
134
|
+
const animationDuration = 400; // Duration for each progress bar animation
|
|
135
|
+
const totalAnimationTime = numStages * animationDuration;
|
|
136
|
+
const availableTime = totalDuration - totalAnimationTime;
|
|
137
|
+
const scaleFactor = availableTime / totalPauseDuration;
|
|
138
|
+
|
|
139
|
+
// Scale all pauses proportionally
|
|
140
|
+
const scaledPauseDurations = pauseDurations.map(d => d * scaleFactor);
|
|
141
|
+
|
|
142
|
+
// Generate status message change points
|
|
143
|
+
const statusChangePoints = [];
|
|
144
|
+
STATUS_MESSAGES.forEach(msg => {
|
|
145
|
+
if (msg.minProgress === 100) {
|
|
146
|
+
statusChangePoints.push({
|
|
147
|
+
progress: 100,
|
|
148
|
+
message: msg.text
|
|
149
|
+
});
|
|
150
|
+
} else {
|
|
151
|
+
const randomProgress = randomInRange(msg.minProgress, msg.maxProgress);
|
|
152
|
+
statusChangePoints.push({
|
|
153
|
+
progress: randomProgress,
|
|
154
|
+
message: msg.text
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
statusChangePoints.sort((a, b) => a.progress - b.progress);
|
|
159
|
+
|
|
160
|
+
// Execute loading sequence
|
|
161
|
+
let cumulativeTime = 0;
|
|
162
|
+
let currentStatusIndex = 0;
|
|
163
|
+
for (let i = 1; i <= numStages; i++) {
|
|
164
|
+
const targetProgress = progressPoints[i];
|
|
165
|
+
const pauseDuration = scaledPauseDurations[i - 1];
|
|
166
|
+
cumulativeTime += pauseDuration;
|
|
167
|
+
|
|
168
|
+
// Schedule progress update
|
|
169
|
+
const timeout = setTimeout(() => {
|
|
170
|
+
// Update status if we've crossed a threshold
|
|
171
|
+
while (currentStatusIndex < statusChangePoints.length && targetProgress >= statusChangePoints[currentStatusIndex].progress) {
|
|
172
|
+
setCurrentStatus(statusChangePoints[currentStatusIndex].message);
|
|
173
|
+
currentStatusIndex++;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Update progress
|
|
177
|
+
setCurrentProgress(targetProgress);
|
|
178
|
+
|
|
179
|
+
// Animate progress bar
|
|
180
|
+
Animated.timing(progressValue, {
|
|
181
|
+
toValue: targetProgress / 100,
|
|
182
|
+
duration: animationDuration,
|
|
183
|
+
useNativeDriver: false
|
|
184
|
+
}).start();
|
|
185
|
+
|
|
186
|
+
// Complete when reaching 100%
|
|
187
|
+
if (targetProgress >= 100) {
|
|
188
|
+
setTimeout(() => {
|
|
189
|
+
triggerHaptic(HapticType.SUCCESS);
|
|
190
|
+
onComplete();
|
|
191
|
+
}, 500);
|
|
192
|
+
}
|
|
193
|
+
}, cumulativeTime);
|
|
194
|
+
loadingTimeoutsRef.current.push(timeout);
|
|
195
|
+
cumulativeTime += animationDuration;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// Cleanup function
|
|
199
|
+
return () => {
|
|
200
|
+
loadingTimeoutsRef.current.forEach(timeout => clearTimeout(timeout));
|
|
201
|
+
loadingTimeoutsRef.current = [];
|
|
202
|
+
};
|
|
203
|
+
}, [visible, onComplete, progressValue]);
|
|
204
|
+
if (!visible) return null;
|
|
205
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
206
|
+
style: styles.container
|
|
207
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
208
|
+
style: styles.content
|
|
209
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
210
|
+
style: styles.lottieContainer
|
|
211
|
+
}, /*#__PURE__*/React.createElement(LottieView, {
|
|
212
|
+
source: ANIMATIONS.loader,
|
|
213
|
+
autoPlay: true,
|
|
214
|
+
loop: true,
|
|
215
|
+
style: styles.lottieAnimation,
|
|
216
|
+
resizeMode: "contain"
|
|
217
|
+
})), /*#__PURE__*/React.createElement(View, {
|
|
218
|
+
style: styles.textContainer
|
|
219
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
220
|
+
style: styles.loadingText
|
|
221
|
+
}, currentStatus), /*#__PURE__*/React.createElement(View, {
|
|
222
|
+
style: styles.dotsContainer
|
|
223
|
+
}, /*#__PURE__*/React.createElement(Animated.Text, {
|
|
224
|
+
style: [styles.dot, {
|
|
225
|
+
opacity: dotOpacity1
|
|
226
|
+
}]
|
|
227
|
+
}, "."), /*#__PURE__*/React.createElement(Animated.Text, {
|
|
228
|
+
style: [styles.dot, {
|
|
229
|
+
opacity: dotOpacity2
|
|
230
|
+
}]
|
|
231
|
+
}, "."), /*#__PURE__*/React.createElement(Animated.Text, {
|
|
232
|
+
style: [styles.dot, {
|
|
233
|
+
opacity: dotOpacity3
|
|
234
|
+
}]
|
|
235
|
+
}, "."))), /*#__PURE__*/React.createElement(View, {
|
|
236
|
+
style: styles.progressContainer
|
|
237
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
238
|
+
style: styles.progressTrack
|
|
239
|
+
}, /*#__PURE__*/React.createElement(Animated.View, {
|
|
240
|
+
style: [styles.progressFill, {
|
|
241
|
+
width: progressValue.interpolate({
|
|
242
|
+
inputRange: [0, 1],
|
|
243
|
+
outputRange: ['0%', '100%']
|
|
244
|
+
})
|
|
245
|
+
}]
|
|
246
|
+
})))));
|
|
247
|
+
};
|
|
248
|
+
const styles = StyleSheet.create({
|
|
249
|
+
container: {
|
|
250
|
+
flex: 1,
|
|
251
|
+
backgroundColor: COLORS.surface
|
|
252
|
+
},
|
|
253
|
+
content: {
|
|
254
|
+
flex: 1,
|
|
255
|
+
justifyContent: 'center',
|
|
256
|
+
alignItems: 'center',
|
|
257
|
+
paddingHorizontal: 24,
|
|
258
|
+
marginTop: -80 // Raise the content up
|
|
259
|
+
},
|
|
260
|
+
lottieContainer: {
|
|
261
|
+
width: 360,
|
|
262
|
+
height: 360,
|
|
263
|
+
marginBottom: 32,
|
|
264
|
+
alignItems: 'center',
|
|
265
|
+
justifyContent: 'center'
|
|
266
|
+
},
|
|
267
|
+
lottieAnimation: {
|
|
268
|
+
width: '100%',
|
|
269
|
+
height: '100%'
|
|
270
|
+
},
|
|
271
|
+
textContainer: {
|
|
272
|
+
flexDirection: 'row',
|
|
273
|
+
alignItems: 'center',
|
|
274
|
+
marginBottom: 48
|
|
275
|
+
},
|
|
276
|
+
loadingText: {
|
|
277
|
+
fontSize: 24,
|
|
278
|
+
fontFamily: 'IBM Plex Sans',
|
|
279
|
+
fontWeight: '600',
|
|
280
|
+
color: COLORS.grey800
|
|
281
|
+
},
|
|
282
|
+
dotsContainer: {
|
|
283
|
+
flexDirection: 'row',
|
|
284
|
+
marginLeft: 4
|
|
285
|
+
},
|
|
286
|
+
dot: {
|
|
287
|
+
fontSize: 24,
|
|
288
|
+
fontFamily: 'IBM Plex Sans',
|
|
289
|
+
fontWeight: '600',
|
|
290
|
+
color: COLORS.grey800,
|
|
291
|
+
marginLeft: 2
|
|
292
|
+
},
|
|
293
|
+
progressContainer: {
|
|
294
|
+
width: '100%',
|
|
295
|
+
maxWidth: 280
|
|
296
|
+
},
|
|
297
|
+
progressTrack: {
|
|
298
|
+
height: 6,
|
|
299
|
+
backgroundColor: '#E5E5E5',
|
|
300
|
+
borderRadius: 3,
|
|
301
|
+
overflow: 'hidden'
|
|
302
|
+
},
|
|
303
|
+
progressFill: {
|
|
304
|
+
height: '100%',
|
|
305
|
+
backgroundColor: COLORS.grey800,
|
|
306
|
+
borderRadius: 3
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
export default PersonaLoadingScreen;
|
|
310
|
+
//# sourceMappingURL=PersonaLoadingScreen.js.map
|