@onairos/react-native 3.4.1 → 3.6.0
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/README.md +423 -374
- package/lib/commonjs/api/index.js +9 -145
- package/lib/commonjs/assets/animations/loaderani.json +1 -0
- package/lib/commonjs/assets/animations/persona-animation.json +1 -0
- package/lib/commonjs/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
- package/lib/commonjs/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
- package/lib/commonjs/assets/icons/Facebookicon.png +0 -0
- package/lib/commonjs/assets/icons/Gmail.png +0 -0
- package/lib/commonjs/assets/icons/Linkedinicon.png +0 -0
- package/lib/commonjs/assets/icons/Redditicon.png +0 -0
- package/lib/commonjs/assets/icons/YouTubeicon2.png +0 -0
- package/lib/commonjs/assets/icons/YouTubeicon3.png +0 -0
- package/lib/commonjs/assets/icons/chatgpt.png +0 -0
- package/lib/commonjs/assets/icons/claude.png +0 -0
- package/lib/commonjs/assets/icons/gemini.png +0 -0
- package/lib/commonjs/assets/icons/grok.png +0 -0
- package/lib/commonjs/assets/images/Checkbox.svg +3 -0
- package/lib/commonjs/assets/images/EnochE.svg +19 -0
- package/lib/commonjs/assets/images/Enochicon1.png +0 -0
- package/lib/commonjs/assets/images/Face_ID_logo.png +0 -0
- package/lib/commonjs/assets/images/Facebookicon.png +0 -0
- package/lib/commonjs/assets/images/Gmail.png +0 -0
- package/lib/commonjs/assets/images/Googlelogo.png +0 -0
- package/lib/commonjs/assets/images/Linkedinicon.png +0 -0
- package/lib/commonjs/assets/images/OnairosNewLogo.png +0 -0
- package/lib/commonjs/assets/images/Onairoslogo.png +0 -0
- package/lib/commonjs/assets/images/Personalityprofile.svg +3 -0
- package/lib/commonjs/assets/images/Personalitytraits.svg +3 -0
- package/lib/commonjs/assets/images/Redditicon.png +0 -0
- package/lib/commonjs/assets/images/Userpreferences.svg +3 -0
- package/lib/commonjs/assets/images/YouTubeicon3.png +0 -0
- package/lib/commonjs/assets/images/arrow.svg +20 -0
- package/lib/commonjs/assets/images/basicproficon.svg +43 -0
- package/lib/commonjs/assets/images/basicprofile.svg +3 -0
- package/lib/commonjs/assets/images/chatgpt.png +0 -0
- package/lib/commonjs/assets/images/checkmark.svg +4 -0
- package/lib/commonjs/assets/images/claude.png +0 -0
- package/lib/commonjs/assets/images/contentanalysis.svg +3 -0
- package/lib/commonjs/assets/images/contenticon.svg +23 -0
- package/lib/commonjs/assets/images/gemini.png +0 -0
- package/lib/commonjs/assets/images/grok.png +0 -0
- package/lib/commonjs/assets/images/persona1.png +0 -0
- package/lib/commonjs/assets/images/persona2.png +0 -0
- package/lib/commonjs/assets/images/persona3.png +0 -0
- package/lib/commonjs/assets/images/persona4.png +0 -0
- package/lib/commonjs/assets/images/persona5.png +0 -0
- package/lib/commonjs/assets/images/personalityicon.svg +18 -0
- package/lib/commonjs/assets/images/x-close.svg +3 -0
- package/lib/commonjs/components/BodyText.js +9 -0
- package/lib/commonjs/components/BrandMark.js +10 -0
- package/lib/commonjs/components/CodeInput.js +9 -0
- package/lib/commonjs/components/EmailInput.js +8 -0
- package/lib/commonjs/components/GoogleButton.js +9 -0
- package/lib/commonjs/components/HeadingGroup.js +9 -0
- package/lib/commonjs/components/LLMDataInputModal.js +14 -0
- package/lib/commonjs/components/ModalHeader.js +9 -0
- package/lib/commonjs/components/ModalSheet.js +9 -0
- package/lib/commonjs/components/Onairos.js +14 -374
- package/lib/commonjs/components/OnairosButton.js +13 -309
- package/lib/commonjs/components/OnairosSignInButton.js +12 -0
- package/lib/commonjs/components/Overlay.js +13 -483
- package/lib/commonjs/components/PersonaImage.js +10 -0
- package/lib/commonjs/components/PersonaLoadingScreen.js +12 -0
- package/lib/commonjs/components/PersonalizationConsentScreen.js +13 -0
- package/lib/commonjs/components/PinCreationScreen.js +12 -0
- package/lib/commonjs/components/PinInput.js +9 -302
- package/lib/commonjs/components/PlatformConnectorsStep.js +23 -0
- package/lib/commonjs/components/PlatformList.js +10 -137
- package/lib/commonjs/components/PlatformToggle.js +9 -0
- package/lib/commonjs/components/PrimaryButton.js +10 -0
- package/lib/commonjs/components/SignInMatchAnimation.js +9 -0
- package/lib/commonjs/components/SignInStep.js +12 -0
- package/lib/commonjs/components/UniversalOnboarding.js +30 -1702
- package/lib/commonjs/components/VerificationStep.js +11 -0
- package/lib/commonjs/components/WelcomeScreen.js +22 -0
- package/lib/commonjs/components/icons/Basicproficon.js +8 -0
- package/lib/commonjs/components/icons/Basicprofile.js +8 -0
- package/lib/commonjs/components/icons/Checkbox.js +8 -0
- package/lib/commonjs/components/icons/Checkmark.js +8 -0
- package/lib/commonjs/components/icons/Contentanalysis.js +8 -0
- package/lib/commonjs/components/icons/Contenticon.js +8 -0
- package/lib/commonjs/components/icons/EnochE.js +8 -0
- package/lib/commonjs/components/icons/Personalityicon.js +8 -0
- package/lib/commonjs/components/icons/Personalityprofile.js +8 -0
- package/lib/commonjs/components/icons/Personalitytraits.js +8 -0
- package/lib/commonjs/components/icons/Userpreferences.js +8 -0
- package/lib/commonjs/components/icons/index.js +17 -0
- package/lib/commonjs/components/onboarding/OAuthWebView.js +18 -827
- package/lib/commonjs/components/onboarding/OnboardingHeader.js +10 -74
- package/lib/commonjs/components/onboarding/PinInput.js +10 -283
- package/lib/commonjs/components/onboarding/PlatformConnector.js +11 -249
- package/lib/commonjs/config/api.js +7 -0
- package/lib/commonjs/constants/index.js +7 -83
- package/lib/commonjs/context/AuthContext.js +10 -0
- package/lib/commonjs/hooks/useConnectedAccounts.js +9 -0
- package/lib/commonjs/hooks/useConnections.js +8 -159
- package/lib/commonjs/hooks/useCredentials.js +10 -177
- package/lib/commonjs/hooks/useUserConnections.js +10 -0
- package/lib/commonjs/index.js +34 -106
- package/lib/commonjs/services/SDK_API_KEY_VALIDATION.md +421 -421
- package/lib/commonjs/services/apiClient.js +8 -0
- package/lib/commonjs/services/apiKeyService.js +9 -952
- package/lib/commonjs/services/authService.js +10 -0
- package/lib/commonjs/services/biometricPinService.js +8 -0
- package/lib/commonjs/services/chatGPTConversationExtractor.js +8 -0
- package/lib/commonjs/services/chatGPTConversationService.js +9 -0
- package/lib/commonjs/services/claudeConversationExtractor.js +8 -0
- package/lib/commonjs/services/claudeConversationService.js +9 -0
- package/lib/commonjs/services/connectedAccountsService.js +10 -0
- package/lib/commonjs/services/googleAuthService.js +11 -0
- package/lib/commonjs/services/hingeDataExtractor.js +8 -0
- package/lib/commonjs/services/hingeDataService.js +9 -0
- package/lib/commonjs/services/imageCompressionService.js +7 -0
- package/lib/commonjs/services/instagramDataExtractor.js +8 -0
- package/lib/commonjs/services/instagramDataService.js +9 -0
- package/lib/commonjs/services/jwtStorageService.js +7 -0
- package/lib/commonjs/services/linkedinDOMExtractor.js +7 -0
- package/lib/commonjs/services/linkedinProfileService.js +9 -0
- package/lib/commonjs/services/linkedinScrapingService.js +8 -0
- package/lib/commonjs/services/llmDataStorage.js +8 -0
- package/lib/commonjs/services/mobileTrainingService.js +8 -0
- package/lib/commonjs/services/oauthService.js +11 -390
- package/lib/commonjs/services/pinEncryptionService.js +8 -0
- package/lib/commonjs/services/pinStorageUtils.js +7 -0
- package/lib/commonjs/services/platformAuthService.js +12 -1067
- package/lib/commonjs/services/sephoraDataExtractor.js +8 -0
- package/lib/commonjs/services/sephoraDataService.js +9 -0
- package/lib/commonjs/services/storageService.js +8 -0
- package/lib/commonjs/services/telegramDataExtractor.js +8 -0
- package/lib/commonjs/services/telegramDataService.js +11 -0
- package/lib/commonjs/services/trainingApiHelpers.js +7 -0
- package/lib/commonjs/services/userConnectionsService.js +10 -0
- package/lib/commonjs/services/youtubeMigrationService.js +10 -0
- package/lib/commonjs/theme/index.js +7 -0
- package/lib/commonjs/types/ambient.d.js +1 -2
- package/lib/commonjs/types/declarations.d.js +1 -2
- package/lib/commonjs/types/index.js +1 -6
- package/lib/commonjs/types/node-fix.d.js +1 -2
- package/lib/commonjs/types/node-override.d.js +1 -2
- package/lib/commonjs/types/opacity.d.js +1 -2
- package/lib/commonjs/types.js +1 -14
- package/lib/commonjs/utils/Portal.js +8 -98
- package/lib/commonjs/utils/api.js +9 -129
- package/lib/commonjs/utils/assetRegistry.js +33 -0
- package/lib/commonjs/utils/auth.js +9 -111
- package/lib/commonjs/utils/connectorTests.js +29 -0
- package/lib/commonjs/utils/crypto.js +8 -62
- package/lib/commonjs/utils/debugHelper.js +1 -64
- package/lib/commonjs/utils/encryption.js +7 -76
- package/lib/commonjs/utils/eventUtils.js +1 -0
- package/lib/commonjs/utils/haptics.js +9 -0
- package/lib/commonjs/utils/imagePreloader.js +1 -0
- package/lib/commonjs/utils/networkDiagnostics.js +8 -0
- package/lib/commonjs/utils/onairosApi.js +9 -350
- package/lib/commonjs/utils/programmaticFlow.js +9 -117
- package/lib/commonjs/utils/retryHelper.js +1 -220
- package/lib/commonjs/utils/secureStorage.js +10 -349
- package/lib/commonjs/utils/webviewScripts/chatgpt.js +1 -0
- package/lib/commonjs/utils/webviewScripts/claude.js +1 -0
- package/lib/commonjs/utils/webviewScripts/hinge.js +1 -0
- package/lib/commonjs/utils/webviewScripts/index.js +13 -0
- package/lib/commonjs/utils/webviewScripts/instagram.js +1 -0
- package/lib/commonjs/utils/webviewScripts/linkedin.js +1 -0
- package/lib/commonjs/utils/webviewScripts/sephora.js +1 -0
- package/lib/commonjs/utils/webviewScripts/telegram.js +1 -0
- package/lib/module/api/index.js +1 -139
- package/lib/module/assets/animations/loaderani.json +1 -0
- package/lib/module/assets/animations/persona-animation.json +1 -0
- package/lib/module/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
- package/lib/module/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
- package/lib/module/assets/icons/Facebookicon.png +0 -0
- package/lib/module/assets/icons/Gmail.png +0 -0
- package/lib/module/assets/icons/Linkedinicon.png +0 -0
- package/lib/module/assets/icons/Redditicon.png +0 -0
- package/lib/module/assets/icons/YouTubeicon2.png +0 -0
- package/lib/module/assets/icons/YouTubeicon3.png +0 -0
- package/lib/module/assets/icons/chatgpt.png +0 -0
- package/lib/module/assets/icons/claude.png +0 -0
- package/lib/module/assets/icons/farcaster.png +0 -0
- package/lib/module/assets/icons/gemini.png +0 -0
- package/lib/module/assets/icons/grok.png +0 -0
- package/lib/module/assets/icons/instagram.png +0 -0
- package/lib/module/assets/icons/pinterest.png +0 -0
- package/lib/module/assets/icons/swerv_logo.png +0 -0
- package/lib/module/assets/icons/twitter.jpg +0 -0
- package/lib/module/assets/images/Checkbox.svg +3 -0
- package/lib/module/assets/images/EnochE.svg +19 -0
- package/lib/module/assets/images/Enochicon1.png +0 -0
- package/lib/module/assets/images/Face_ID_logo.png +0 -0
- package/lib/module/assets/images/Facebookicon.png +0 -0
- package/lib/module/assets/images/Gmail.png +0 -0
- package/lib/module/assets/images/Googlelogo.png +0 -0
- package/lib/module/assets/images/Linkedinicon.png +0 -0
- package/lib/module/assets/images/OnairosNewLogo.png +0 -0
- package/lib/module/assets/images/Onairoslogo.png +0 -0
- package/lib/module/assets/images/Personalityprofile.svg +3 -0
- package/lib/module/assets/images/Personalitytraits.svg +3 -0
- package/lib/module/assets/images/Redditicon.png +0 -0
- package/lib/module/assets/images/Userpreferences.svg +3 -0
- package/lib/module/assets/images/YouTubeicon3.png +0 -0
- package/lib/module/assets/images/arrow.svg +20 -0
- package/lib/module/assets/images/basicproficon.svg +43 -0
- package/lib/module/assets/images/basicprofile.svg +3 -0
- package/lib/module/assets/images/chatgpt.png +0 -0
- package/lib/module/assets/images/checkmark.svg +4 -0
- package/lib/module/assets/images/claude.png +0 -0
- package/lib/module/assets/images/contentanalysis.svg +3 -0
- package/lib/module/assets/images/contenticon.svg +23 -0
- package/lib/module/assets/images/gemini.png +0 -0
- package/lib/module/assets/images/grok.png +0 -0
- package/lib/module/assets/images/persona1.png +0 -0
- package/lib/module/assets/images/persona2.png +0 -0
- package/lib/module/assets/images/persona3.png +0 -0
- package/lib/module/assets/images/persona4.png +0 -0
- package/lib/module/assets/images/persona5.png +0 -0
- package/lib/module/assets/images/personalityicon.svg +18 -0
- package/lib/module/assets/images/x-close.svg +3 -0
- package/lib/module/components/BodyText.js +1 -0
- package/lib/module/components/BrandMark.js +1 -0
- package/lib/module/components/CodeInput.js +1 -0
- package/lib/module/components/EmailInput.js +1 -0
- package/lib/module/components/GoogleButton.js +1 -0
- package/lib/module/components/HeadingGroup.js +1 -0
- package/lib/module/components/LLMDataInputModal.js +8 -0
- package/lib/module/components/ModalHeader.js +1 -0
- package/lib/module/components/ModalSheet.js +1 -0
- package/lib/module/components/Onairos.js +1 -367
- package/lib/module/components/OnairosButton.js +1 -302
- package/lib/module/components/OnairosSignInButton.js +1 -0
- package/lib/module/components/Overlay.js +1 -474
- package/lib/module/components/PersonaImage.js +1 -0
- package/lib/module/components/PersonaLoadingScreen.js +1 -0
- package/lib/module/components/PersonalizationConsentScreen.js +1 -0
- package/lib/module/components/PinCreationScreen.js +1 -0
- package/lib/module/components/PinInput.js +1 -293
- package/lib/module/components/PlatformConnectorsStep.js +7 -0
- package/lib/module/components/PlatformList.js +1 -129
- package/lib/module/components/PlatformToggle.js +1 -0
- package/lib/module/components/PrimaryButton.js +1 -0
- package/lib/module/components/SignInMatchAnimation.js +1 -0
- package/lib/module/components/SignInStep.js +1 -0
- package/lib/module/components/UniversalOnboarding.js +1 -1693
- package/lib/module/components/VerificationStep.js +1 -0
- package/lib/module/components/WelcomeScreen.js +1 -0
- package/lib/module/components/icons/Basicproficon.js +1 -0
- package/lib/module/components/icons/Basicprofile.js +1 -0
- package/lib/module/components/icons/Checkbox.js +1 -0
- package/lib/module/components/icons/Checkmark.js +1 -0
- package/lib/module/components/icons/Contentanalysis.js +1 -0
- package/lib/module/components/icons/Contenticon.js +1 -0
- package/lib/module/components/icons/EnochE.js +1 -0
- package/lib/module/components/icons/Personalityicon.js +1 -0
- package/lib/module/components/icons/Personalityprofile.js +1 -0
- package/lib/module/components/icons/Personalitytraits.js +1 -0
- package/lib/module/components/icons/Userpreferences.js +1 -0
- package/lib/module/components/icons/index.js +1 -0
- package/lib/module/components/onboarding/OAuthWebView.js +1 -818
- package/lib/module/components/onboarding/OnboardingHeader.js +1 -66
- package/lib/module/components/onboarding/PinInput.js +1 -274
- package/lib/module/components/onboarding/PlatformConnector.js +1 -240
- package/lib/module/config/api.js +1 -0
- package/lib/module/constants/index.js +1 -77
- package/lib/module/context/AuthContext.js +1 -0
- package/lib/module/hooks/useConnectedAccounts.js +1 -0
- package/lib/module/hooks/useConnections.js +1 -152
- package/lib/module/hooks/useCredentials.js +6 -169
- package/lib/module/hooks/useUserConnections.js +1 -0
- package/lib/module/index.js +1 -32
- package/lib/module/services/SDK_API_KEY_VALIDATION.md +421 -421
- package/lib/module/services/apiClient.js +1 -0
- package/lib/module/services/apiKeyService.js +1 -925
- package/lib/module/services/authService.js +1 -0
- package/lib/module/services/biometricPinService.js +1 -0
- package/lib/module/services/chatGPTConversationExtractor.js +1 -0
- package/lib/module/services/chatGPTConversationService.js +1 -0
- package/lib/module/services/claudeConversationExtractor.js +1 -0
- package/lib/module/services/claudeConversationService.js +1 -0
- package/lib/module/services/connectedAccountsService.js +1 -0
- package/lib/module/services/googleAuthService.js +1 -0
- package/lib/module/services/hingeDataExtractor.js +1 -0
- package/lib/module/services/hingeDataService.js +1 -0
- package/lib/module/services/imageCompressionService.js +1 -0
- package/lib/module/services/instagramDataExtractor.js +1 -0
- package/lib/module/services/instagramDataService.js +1 -0
- package/lib/module/services/jwtStorageService.js +1 -0
- package/lib/module/services/linkedinDOMExtractor.js +1 -0
- package/lib/module/services/linkedinProfileService.js +1 -0
- package/lib/module/services/linkedinScrapingService.js +1 -0
- package/lib/module/services/llmDataStorage.js +1 -0
- package/lib/module/services/mobileTrainingService.js +1 -0
- package/lib/module/services/oauthService.js +1 -380
- package/lib/module/services/pinEncryptionService.js +7 -0
- package/lib/module/services/pinStorageUtils.js +1 -0
- package/lib/module/services/platformAuthService.js +1 -1041
- package/lib/module/services/sephoraDataExtractor.js +1 -0
- package/lib/module/services/sephoraDataService.js +1 -0
- package/lib/module/services/storageService.js +1 -0
- package/lib/module/services/telegramDataExtractor.js +1 -0
- package/lib/module/services/telegramDataService.js +8 -0
- package/lib/module/services/trainingApiHelpers.js +1 -0
- package/lib/module/services/userConnectionsService.js +1 -0
- package/lib/module/services/youtubeMigrationService.js +1 -0
- package/lib/module/theme/index.js +1 -0
- package/lib/module/types.js +1 -10
- package/lib/module/utils/Portal.js +1 -90
- package/lib/module/utils/api.js +1 -117
- package/lib/module/utils/assetRegistry.js +33 -0
- package/lib/module/utils/auth.js +1 -99
- package/lib/module/utils/connectorTests.js +28 -0
- package/lib/module/utils/crypto.js +1 -54
- package/lib/module/utils/debugHelper.js +1 -54
- package/lib/module/utils/encryption.js +1 -67
- package/lib/module/utils/eventUtils.js +1 -0
- package/lib/module/utils/haptics.js +8 -0
- package/lib/module/utils/imagePreloader.js +1 -0
- package/lib/module/utils/networkDiagnostics.js +1 -0
- package/lib/module/utils/onairosApi.js +1 -333
- package/lib/module/utils/programmaticFlow.js +1 -111
- package/lib/module/utils/retryHelper.js +1 -211
- package/lib/module/utils/secureStorage.js +6 -330
- package/lib/module/utils/webviewScripts/chatgpt.js +1 -0
- package/lib/module/utils/webviewScripts/claude.js +1 -0
- package/lib/module/utils/webviewScripts/hinge.js +1 -0
- package/lib/module/utils/webviewScripts/index.js +1 -0
- package/lib/module/utils/webviewScripts/instagram.js +1 -0
- package/lib/module/utils/webviewScripts/linkedin.js +1 -0
- package/lib/module/utils/webviewScripts/sephora.js +1 -0
- package/lib/module/utils/webviewScripts/telegram.js +1 -0
- package/package.json +62 -39
- package/lib/commonjs/api/index.js.map +0 -1
- package/lib/commonjs/assets/images/email.png +0 -0
- package/lib/commonjs/assets/images/linkedin.png +0 -0
- package/lib/commonjs/assets/images/reddit.png +0 -0
- package/lib/commonjs/assets/images/youtube.png +0 -0
- package/lib/commonjs/components/DataRequestModal.js +0 -228
- package/lib/commonjs/components/DataRequestModal.js.map +0 -1
- package/lib/commonjs/components/DataRequestScreen.js +0 -329
- package/lib/commonjs/components/DataRequestScreen.js.map +0 -1
- package/lib/commonjs/components/EmailVerificationModal.js +0 -320
- package/lib/commonjs/components/EmailVerificationModal.js.map +0 -1
- package/lib/commonjs/components/Onairos.js.map +0 -1
- package/lib/commonjs/components/OnairosButton.js.map +0 -1
- package/lib/commonjs/components/Overlay.js.map +0 -1
- package/lib/commonjs/components/PinInput.js.map +0 -1
- package/lib/commonjs/components/PlatformList.js.map +0 -1
- package/lib/commonjs/components/TrainingModal.js +0 -717
- package/lib/commonjs/components/TrainingModal.js.map +0 -1
- package/lib/commonjs/components/UniversalOnboarding.js.map +0 -1
- package/lib/commonjs/components/UniversalOnboarding.tsx.new +0 -455
- package/lib/commonjs/components/onboarding/OAuthWebView.js.map +0 -1
- package/lib/commonjs/components/onboarding/OnboardingHeader.js.map +0 -1
- package/lib/commonjs/components/onboarding/PinInput.js.map +0 -1
- package/lib/commonjs/components/onboarding/PlatformConnector.js.map +0 -1
- package/lib/commonjs/components/screens/ConnectorScreen.js +0 -146
- package/lib/commonjs/components/screens/ConnectorScreen.js.map +0 -1
- package/lib/commonjs/components/screens/LoadingScreen.js +0 -91
- package/lib/commonjs/components/screens/LoadingScreen.js.map +0 -1
- package/lib/commonjs/components/screens/PinCreationScreen.js +0 -61
- package/lib/commonjs/components/screens/PinCreationScreen.js.map +0 -1
- package/lib/commonjs/constants/index.js.map +0 -1
- package/lib/commonjs/hooks/useConnections.js.map +0 -1
- package/lib/commonjs/hooks/useCredentials.js.map +0 -1
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/services/apiKeyService.js.map +0 -1
- package/lib/commonjs/services/oauthService.js.map +0 -1
- package/lib/commonjs/services/platformAuthService.js.map +0 -1
- package/lib/commonjs/types/ambient.d.js.map +0 -1
- package/lib/commonjs/types/declarations.d.js.map +0 -1
- package/lib/commonjs/types/index.d.js.map +0 -1
- package/lib/commonjs/types/index.js.map +0 -1
- package/lib/commonjs/types/node-fix.d.js.map +0 -1
- package/lib/commonjs/types/node-override.d.js.map +0 -1
- package/lib/commonjs/types/opacity.d.js.map +0 -1
- package/lib/commonjs/types/types.d.js.map +0 -1
- package/lib/commonjs/types.js.map +0 -1
- package/lib/commonjs/utils/Portal.js.map +0 -1
- package/lib/commonjs/utils/api.js.map +0 -1
- package/lib/commonjs/utils/auth.js.map +0 -1
- package/lib/commonjs/utils/crypto.js.map +0 -1
- package/lib/commonjs/utils/debugHelper.js.map +0 -1
- package/lib/commonjs/utils/encryption.js.map +0 -1
- package/lib/commonjs/utils/onairosApi.js.map +0 -1
- package/lib/commonjs/utils/programmaticFlow.js.map +0 -1
- package/lib/commonjs/utils/retryHelper.js.map +0 -1
- package/lib/commonjs/utils/secureStorage.js.map +0 -1
- package/lib/module/api/index.js.map +0 -1
- package/lib/module/assets/images/email.png +0 -0
- package/lib/module/assets/images/linkedin.png +0 -0
- package/lib/module/assets/images/reddit.png +0 -0
- package/lib/module/assets/images/youtube.png +0 -0
- package/lib/module/components/DataRequestModal.js +0 -220
- package/lib/module/components/DataRequestModal.js.map +0 -1
- package/lib/module/components/DataRequestScreen.js +0 -321
- package/lib/module/components/DataRequestScreen.js.map +0 -1
- package/lib/module/components/EmailVerificationModal.js +0 -311
- package/lib/module/components/EmailVerificationModal.js.map +0 -1
- package/lib/module/components/Onairos.js.map +0 -1
- package/lib/module/components/OnairosButton.js.map +0 -1
- package/lib/module/components/Overlay.js.map +0 -1
- package/lib/module/components/PinInput.js.map +0 -1
- package/lib/module/components/PlatformList.js.map +0 -1
- package/lib/module/components/TrainingModal.js +0 -708
- package/lib/module/components/TrainingModal.js.map +0 -1
- package/lib/module/components/UniversalOnboarding.js.map +0 -1
- package/lib/module/components/UniversalOnboarding.tsx.new +0 -455
- package/lib/module/components/onboarding/OAuthWebView.js.map +0 -1
- package/lib/module/components/onboarding/OnboardingHeader.js.map +0 -1
- package/lib/module/components/onboarding/PinInput.js.map +0 -1
- package/lib/module/components/onboarding/PlatformConnector.js.map +0 -1
- package/lib/module/components/screens/ConnectorScreen.js +0 -138
- package/lib/module/components/screens/ConnectorScreen.js.map +0 -1
- package/lib/module/components/screens/LoadingScreen.js +0 -83
- package/lib/module/components/screens/LoadingScreen.js.map +0 -1
- package/lib/module/components/screens/PinCreationScreen.js +0 -53
- package/lib/module/components/screens/PinCreationScreen.js.map +0 -1
- package/lib/module/constants/index.js.map +0 -1
- package/lib/module/hooks/useConnections.js.map +0 -1
- package/lib/module/hooks/useCredentials.js.map +0 -1
- package/lib/module/index.js.map +0 -1
- package/lib/module/services/apiKeyService.js.map +0 -1
- package/lib/module/services/oauthService.js.map +0 -1
- package/lib/module/services/platformAuthService.js.map +0 -1
- package/lib/module/types/ambient.d.js.map +0 -1
- package/lib/module/types/declarations.d.js.map +0 -1
- package/lib/module/types/index.d.js.map +0 -1
- package/lib/module/types/index.js.map +0 -1
- package/lib/module/types/node-fix.d.js.map +0 -1
- package/lib/module/types/node-override.d.js.map +0 -1
- package/lib/module/types/opacity.d.js.map +0 -1
- package/lib/module/types/types.d.js.map +0 -1
- package/lib/module/types.js.map +0 -1
- package/lib/module/utils/Portal.js.map +0 -1
- package/lib/module/utils/api.js.map +0 -1
- package/lib/module/utils/auth.js.map +0 -1
- package/lib/module/utils/crypto.js.map +0 -1
- package/lib/module/utils/debugHelper.js.map +0 -1
- package/lib/module/utils/encryption.js.map +0 -1
- package/lib/module/utils/onairosApi.js.map +0 -1
- package/lib/module/utils/programmaticFlow.js.map +0 -1
- package/lib/module/utils/retryHelper.js.map +0 -1
- package/lib/module/utils/secureStorage.js.map +0 -1
- package/lib/typescript/api/index.d.ts +0 -8
- package/lib/typescript/api/index.d.ts.map +0 -1
- package/lib/typescript/components/DataRequestModal.d.ts +0 -11
- package/lib/typescript/components/DataRequestModal.d.ts.map +0 -1
- package/lib/typescript/components/DataRequestScreen.d.ts +0 -11
- package/lib/typescript/components/DataRequestScreen.d.ts.map +0 -1
- package/lib/typescript/components/EmailVerificationModal.d.ts +0 -11
- package/lib/typescript/components/EmailVerificationModal.d.ts.map +0 -1
- package/lib/typescript/components/Onairos.d.ts +0 -4
- package/lib/typescript/components/Onairos.d.ts.map +0 -1
- package/lib/typescript/components/OnairosButton.d.ts +0 -12
- package/lib/typescript/components/OnairosButton.d.ts.map +0 -1
- package/lib/typescript/components/Overlay.d.ts +0 -4
- package/lib/typescript/components/Overlay.d.ts.map +0 -1
- package/lib/typescript/components/PinInput.d.ts +0 -4
- package/lib/typescript/components/PinInput.d.ts.map +0 -1
- package/lib/typescript/components/PlatformList.d.ts +0 -4
- package/lib/typescript/components/PlatformList.d.ts.map +0 -1
- package/lib/typescript/components/TrainingModal.d.ts +0 -4
- package/lib/typescript/components/TrainingModal.d.ts.map +0 -1
- package/lib/typescript/components/UniversalOnboarding.d.ts +0 -4
- package/lib/typescript/components/UniversalOnboarding.d.ts.map +0 -1
- package/lib/typescript/components/onboarding/OAuthWebView.d.ts +0 -10
- package/lib/typescript/components/onboarding/OAuthWebView.d.ts.map +0 -1
- package/lib/typescript/components/onboarding/OnboardingHeader.d.ts +0 -11
- package/lib/typescript/components/onboarding/OnboardingHeader.d.ts.map +0 -1
- package/lib/typescript/components/onboarding/PinInput.d.ts +0 -4
- package/lib/typescript/components/onboarding/PinInput.d.ts.map +0 -1
- package/lib/typescript/components/onboarding/PlatformConnector.d.ts +0 -13
- package/lib/typescript/components/onboarding/PlatformConnector.d.ts.map +0 -1
- package/lib/typescript/components/screens/ConnectorScreen.d.ts +0 -9
- package/lib/typescript/components/screens/ConnectorScreen.d.ts.map +0 -1
- package/lib/typescript/components/screens/LoadingScreen.d.ts +0 -9
- package/lib/typescript/components/screens/LoadingScreen.d.ts.map +0 -1
- package/lib/typescript/components/screens/PinCreationScreen.d.ts +0 -10
- package/lib/typescript/components/screens/PinCreationScreen.d.ts.map +0 -1
- package/lib/typescript/constants/index.d.ts +0 -53
- package/lib/typescript/constants/index.d.ts.map +0 -1
- package/lib/typescript/hooks/useConnections.d.ts +0 -9
- package/lib/typescript/hooks/useConnections.d.ts.map +0 -1
- package/lib/typescript/hooks/useCredentials.d.ts +0 -9
- package/lib/typescript/hooks/useCredentials.d.ts.map +0 -1
- package/lib/typescript/index.d.ts +0 -18
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/services/apiKeyService.d.ts +0 -132
- package/lib/typescript/services/apiKeyService.d.ts.map +0 -1
- package/lib/typescript/services/oauthService.d.ts +0 -50
- package/lib/typescript/services/oauthService.d.ts.map +0 -1
- package/lib/typescript/services/platformAuthService.d.ts +0 -144
- package/lib/typescript/services/platformAuthService.d.ts.map +0 -1
- package/lib/typescript/types/index.d.ts +0 -231
- package/lib/typescript/types/index.d.ts.map +0 -1
- package/lib/typescript/types.d.ts +0 -270
- package/lib/typescript/types.d.ts.map +0 -1
- package/lib/typescript/utils/Portal.d.ts +0 -14
- package/lib/typescript/utils/Portal.d.ts.map +0 -1
- package/lib/typescript/utils/api.d.ts +0 -6
- package/lib/typescript/utils/api.d.ts.map +0 -1
- package/lib/typescript/utils/auth.d.ts +0 -6
- package/lib/typescript/utils/auth.d.ts.map +0 -1
- package/lib/typescript/utils/crypto.d.ts +0 -4
- package/lib/typescript/utils/crypto.d.ts.map +0 -1
- package/lib/typescript/utils/debugHelper.d.ts +0 -29
- package/lib/typescript/utils/debugHelper.d.ts.map +0 -1
- package/lib/typescript/utils/encryption.d.ts +0 -19
- package/lib/typescript/utils/encryption.d.ts.map +0 -1
- package/lib/typescript/utils/onairosApi.d.ts +0 -87
- package/lib/typescript/utils/onairosApi.d.ts.map +0 -1
- package/lib/typescript/utils/programmaticFlow.d.ts +0 -23
- package/lib/typescript/utils/programmaticFlow.d.ts.map +0 -1
- package/lib/typescript/utils/retryHelper.d.ts +0 -69
- package/lib/typescript/utils/retryHelper.d.ts.map +0 -1
- package/lib/typescript/utils/secureStorage.d.ts +0 -94
- package/lib/typescript/utils/secureStorage.d.ts.map +0 -1
- package/src/api/index.ts +0 -111
- package/src/assets/images/email.png +0 -0
- package/src/assets/images/linkedin.png +0 -0
- package/src/assets/images/onairos_logo.png +0 -0
- package/src/assets/images/reddit.png +0 -0
- package/src/assets/images/youtube.png +0 -0
- package/src/components/DataRequestModal.tsx +0 -227
- package/src/components/DataRequestScreen.tsx +0 -356
- package/src/components/EmailVerificationModal.tsx +0 -364
- package/src/components/Onairos.tsx +0 -425
- package/src/components/OnairosButton.tsx +0 -359
- package/src/components/Overlay.tsx +0 -506
- package/src/components/PinInput.tsx +0 -343
- package/src/components/PlatformList.tsx +0 -145
- package/src/components/TrainingModal.tsx +0 -737
- package/src/components/UniversalOnboarding.tsx +0 -1839
- package/src/components/UniversalOnboarding.tsx.new +0 -455
- package/src/components/onboarding/OAuthWebView.tsx +0 -838
- package/src/components/onboarding/OnboardingHeader.tsx +0 -70
- package/src/components/onboarding/PinInput.tsx +0 -356
- package/src/components/onboarding/PlatformConnector.tsx +0 -302
- package/src/components/screens/ConnectorScreen.tsx +0 -153
- package/src/components/screens/LoadingScreen.tsx +0 -100
- package/src/components/screens/PinCreationScreen.tsx +0 -67
- package/src/constants/index.ts +0 -83
- package/src/hooks/useConnections.ts +0 -163
- package/src/hooks/useCredentials.ts +0 -175
- package/src/index.js +0 -14
- package/src/index.ts +0 -50
- package/src/services/SDK_API_KEY_VALIDATION.md +0 -421
- package/src/services/apiKeyService.ts +0 -984
- package/src/services/oauthService.ts +0 -412
- package/src/services/platformAuthService.ts +0 -1113
- package/src/types/ambient.d.ts +0 -29
- package/src/types/declarations.d.ts +0 -26
- package/src/types/index.d.ts +0 -274
- package/src/types/index.ts +0 -244
- package/src/types/node-fix.d.ts +0 -19
- package/src/types/node-override.d.ts +0 -24
- package/src/types/opacity.d.ts +0 -16
- package/src/types/types.d.ts +0 -18
- package/src/types.ts +0 -298
- package/src/utils/Portal.tsx +0 -83
- package/src/utils/api.js +0 -112
- package/src/utils/auth.js +0 -104
- package/src/utils/crypto.js +0 -60
- package/src/utils/debugHelper.ts +0 -53
- package/src/utils/encryption.ts +0 -69
- package/src/utils/onairosApi.ts +0 -391
- package/src/utils/programmaticFlow.ts +0 -113
- package/src/utils/retryHelper.ts +0 -275
- package/src/utils/secureStorage.ts +0 -361
- package/types/index.d.ts +0 -218
- package/types/node-env.d.ts +0 -15
- /package/{src/assets/images → lib/commonjs/assets/icons}/farcaster.png +0 -0
- /package/{src/assets/images → lib/commonjs/assets/icons}/instagram.png +0 -0
- /package/{src/assets/images → lib/commonjs/assets/icons}/pinterest.png +0 -0
- /package/{src/assets/images → lib/commonjs/assets/icons}/swerv_logo.png +0 -0
- /package/{src/assets/images → lib/commonjs/assets/icons}/twitter.jpg +0 -0
|
@@ -1,66 +1 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
|
-
import Icon from 'react-native-vector-icons/MaterialIcons';
|
|
4
|
-
import { COLORS } from '../../constants';
|
|
5
|
-
export const OnboardingHeader = ({
|
|
6
|
-
title,
|
|
7
|
-
subtitle,
|
|
8
|
-
showBackButton = false,
|
|
9
|
-
onBack,
|
|
10
|
-
onClose
|
|
11
|
-
}) => {
|
|
12
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
13
|
-
style: styles.header
|
|
14
|
-
}, showBackButton && /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
15
|
-
style: styles.backButton,
|
|
16
|
-
onPress: onBack
|
|
17
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
18
|
-
name: "arrow-back",
|
|
19
|
-
size: 24,
|
|
20
|
-
color: "#000"
|
|
21
|
-
})), /*#__PURE__*/React.createElement(View, {
|
|
22
|
-
style: styles.titleContainer
|
|
23
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
24
|
-
style: styles.title
|
|
25
|
-
}, title), subtitle && /*#__PURE__*/React.createElement(Text, {
|
|
26
|
-
style: styles.subtitle
|
|
27
|
-
}, subtitle)), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
28
|
-
style: styles.closeButton,
|
|
29
|
-
onPress: onClose
|
|
30
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
31
|
-
name: "close",
|
|
32
|
-
size: 24,
|
|
33
|
-
color: "#000"
|
|
34
|
-
})));
|
|
35
|
-
};
|
|
36
|
-
const styles = StyleSheet.create({
|
|
37
|
-
header: {
|
|
38
|
-
flexDirection: 'row',
|
|
39
|
-
alignItems: 'center',
|
|
40
|
-
padding: 16,
|
|
41
|
-
backgroundColor: COLORS.headerBg,
|
|
42
|
-
borderTopLeftRadius: 16,
|
|
43
|
-
borderTopRightRadius: 16
|
|
44
|
-
},
|
|
45
|
-
backButton: {
|
|
46
|
-
padding: 8,
|
|
47
|
-
marginRight: 8
|
|
48
|
-
},
|
|
49
|
-
titleContainer: {
|
|
50
|
-
flex: 1
|
|
51
|
-
},
|
|
52
|
-
title: {
|
|
53
|
-
fontSize: 18,
|
|
54
|
-
fontWeight: '600',
|
|
55
|
-
color: '#000'
|
|
56
|
-
},
|
|
57
|
-
subtitle: {
|
|
58
|
-
fontSize: 14,
|
|
59
|
-
color: '#666',
|
|
60
|
-
marginTop: 4
|
|
61
|
-
},
|
|
62
|
-
closeButton: {
|
|
63
|
-
padding: 8
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
//# sourceMappingURL=OnboardingHeader.js.map
|
|
1
|
+
function _0x1c15(_0x57d27c,_0x1c159d){_0x57d27c=_0x57d27c-0x0;const _0x58873e=_0x57d2();let _0x1c98c0=_0x58873e[_0x57d27c];return _0x1c98c0;}import React from'react';import{View,Text,StyleSheet,TouchableOpacity}from'react-native';import _0xb3e6dc from'react-native-vector-icons/MaterialIcons';import{COLORS}from'../../constants';export const OnboardingHeader=({title:_0x554673,subtitle:_0x230d11,showBackButton:showBackButton=![],onBack:_0x572fed,onClose:_0x2c3c04})=>{const _0x4ed13d={'leofb':'arrow-back','YekLl':_0x1c15(0x0),'yOotw':_0x1c15(0x1)};return React[_0x1c15(0x2)](View,{'style':styles[_0x1c15(0x3)]},showBackButton&&React[_0x1c15(0x2)](TouchableOpacity,{'style':styles[_0x1c15(0x4)],'onPress':_0x572fed},React['createElement'](_0xb3e6dc,{'name':_0x4ed13d[_0x1c15(0x5)],'size':0x18,'color':_0x4ed13d[_0x1c15(0x6)]})),React[_0x1c15(0x2)](View,{'style':styles['titleContainer']},React[_0x1c15(0x2)](Text,{'style':styles[_0x1c15(0x7)]},_0x554673),_0x230d11&&React[_0x1c15(0x2)](Text,{'style':styles[_0x1c15(0x8)]},_0x230d11)),React[_0x1c15(0x2)](TouchableOpacity,{'style':styles[_0x1c15(0x9)],'onPress':_0x2c3c04},React[_0x1c15(0x2)](_0xb3e6dc,{'name':_0x4ed13d[_0x1c15(0xa)],'size':0x18,'color':_0x4ed13d[_0x1c15(0x6)]})));};function _0x57d2(){const _0x225a69=['#000','close','createElement','header','backButton','leofb','YekLl','title','subtitle','closeButton','yOotw','create','center','headerBg','#666'];_0x57d2=function(){return _0x225a69;};return _0x57d2();}const styles=StyleSheet[_0x1c15(0xb)]({'header':{'flexDirection':'row','alignItems':_0x1c15(0xc),'padding':0x10,'backgroundColor':COLORS[_0x1c15(0xd)],'borderTopLeftRadius':0x10,'borderTopRightRadius':0x10},'backButton':{'padding':0x8,'marginRight':0x8},'titleContainer':{'flex':0x1},'title':{'fontSize':0x12,'fontWeight':'600','color':_0x1c15(0x0)},'subtitle':{'fontSize':0xe,'color':_0x1c15(0xe),'marginTop':0x4},'closeButton':{'padding':0x8}});
|
|
@@ -1,274 +1 @@
|
|
|
1
|
-
import React, { useState, useCallback, useEffect } from 'react';
|
|
2
|
-
import { View, Text, StyleSheet, TextInput, TouchableOpacity, Keyboard, KeyboardAvoidingView, Platform } from 'react-native';
|
|
3
|
-
import Icon from 'react-native-vector-icons/MaterialIcons';
|
|
4
|
-
import { COLORS } from '../../constants';
|
|
5
|
-
export const PinInput = ({
|
|
6
|
-
onSubmit,
|
|
7
|
-
minLength = 6,
|
|
8
|
-
requireSpecialChar = true,
|
|
9
|
-
requireNumber = true
|
|
10
|
-
}) => {
|
|
11
|
-
const [pin, setPin] = useState('');
|
|
12
|
-
const [confirmPin, setConfirmPin] = useState('');
|
|
13
|
-
const [showPin, setShowPin] = useState(false);
|
|
14
|
-
const [errors, setErrors] = useState([]);
|
|
15
|
-
const [step, setStep] = useState('create');
|
|
16
|
-
|
|
17
|
-
// Validate pin whenever it changes
|
|
18
|
-
useEffect(() => {
|
|
19
|
-
if (step === 'create') {
|
|
20
|
-
validatePin(pin);
|
|
21
|
-
}
|
|
22
|
-
}, [pin, step]);
|
|
23
|
-
|
|
24
|
-
// Validate PIN strength and requirements
|
|
25
|
-
const validatePin = useCallback(value => {
|
|
26
|
-
const newErrors = [];
|
|
27
|
-
if (value.length < minLength) {
|
|
28
|
-
newErrors.push(`PIN must be at least ${minLength} characters`);
|
|
29
|
-
}
|
|
30
|
-
if (requireNumber && !/\d/.test(value)) {
|
|
31
|
-
newErrors.push('PIN must include at least one number');
|
|
32
|
-
}
|
|
33
|
-
if (requireSpecialChar && !/[!@#$%^&*(),.?":{}|<>]/.test(value)) {
|
|
34
|
-
newErrors.push('PIN must include at least one special character');
|
|
35
|
-
}
|
|
36
|
-
setErrors(newErrors);
|
|
37
|
-
return newErrors.length === 0;
|
|
38
|
-
}, [minLength, requireNumber, requireSpecialChar]);
|
|
39
|
-
|
|
40
|
-
// Handle PIN submission
|
|
41
|
-
const handleSubmit = useCallback(() => {
|
|
42
|
-
if (step === 'create') {
|
|
43
|
-
if (validatePin(pin)) {
|
|
44
|
-
setStep('confirm');
|
|
45
|
-
}
|
|
46
|
-
} else {
|
|
47
|
-
// Confirm PIN
|
|
48
|
-
if (pin === confirmPin) {
|
|
49
|
-
Keyboard.dismiss();
|
|
50
|
-
onSubmit(pin);
|
|
51
|
-
} else {
|
|
52
|
-
setErrors(['PINs do not match']);
|
|
53
|
-
setConfirmPin('');
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}, [pin, confirmPin, step, validatePin, onSubmit]);
|
|
57
|
-
|
|
58
|
-
// Go back to PIN creation step
|
|
59
|
-
const handleBack = useCallback(() => {
|
|
60
|
-
setStep('create');
|
|
61
|
-
setConfirmPin('');
|
|
62
|
-
setErrors([]);
|
|
63
|
-
}, []);
|
|
64
|
-
|
|
65
|
-
// Toggle PIN visibility
|
|
66
|
-
const togglePinVisibility = useCallback(() => {
|
|
67
|
-
setShowPin(!showPin);
|
|
68
|
-
}, [showPin]);
|
|
69
|
-
return /*#__PURE__*/React.createElement(KeyboardAvoidingView, {
|
|
70
|
-
behavior: Platform.OS === 'ios' ? 'padding' : 'height',
|
|
71
|
-
style: styles.container
|
|
72
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
73
|
-
style: styles.content
|
|
74
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
75
|
-
style: styles.title
|
|
76
|
-
}, step === 'create' ? 'Create a PIN' : 'Confirm your PIN'), /*#__PURE__*/React.createElement(Text, {
|
|
77
|
-
style: styles.subtitle
|
|
78
|
-
}, step === 'create' ? 'This PIN will protect your Onairos account' : 'Please re-enter your PIN to confirm'), /*#__PURE__*/React.createElement(View, {
|
|
79
|
-
style: styles.inputContainer
|
|
80
|
-
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
81
|
-
style: styles.input,
|
|
82
|
-
value: step === 'create' ? pin : confirmPin,
|
|
83
|
-
onChangeText: step === 'create' ? setPin : setConfirmPin,
|
|
84
|
-
secureTextEntry: !showPin,
|
|
85
|
-
keyboardType: "default",
|
|
86
|
-
autoCapitalize: "none",
|
|
87
|
-
autoCorrect: false,
|
|
88
|
-
placeholder: step === 'create' ? 'Enter PIN' : 'Confirm PIN',
|
|
89
|
-
placeholderTextColor: "#999",
|
|
90
|
-
returnKeyType: "done",
|
|
91
|
-
onSubmitEditing: handleSubmit
|
|
92
|
-
}), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
93
|
-
style: styles.visibilityToggle,
|
|
94
|
-
onPress: togglePinVisibility
|
|
95
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
96
|
-
name: showPin ? 'visibility-off' : 'visibility',
|
|
97
|
-
size: 24,
|
|
98
|
-
color: "#999"
|
|
99
|
-
}))), errors.length > 0 && /*#__PURE__*/React.createElement(View, {
|
|
100
|
-
style: styles.errorContainer
|
|
101
|
-
}, errors.map((error, index) => /*#__PURE__*/React.createElement(View, {
|
|
102
|
-
key: index,
|
|
103
|
-
style: styles.errorItem
|
|
104
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
105
|
-
name: "error-outline",
|
|
106
|
-
size: 16,
|
|
107
|
-
color: "#f44336"
|
|
108
|
-
}), /*#__PURE__*/React.createElement(Text, {
|
|
109
|
-
style: styles.errorText
|
|
110
|
-
}, error)))), step === 'create' && /*#__PURE__*/React.createElement(View, {
|
|
111
|
-
style: styles.requirementsContainer
|
|
112
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
113
|
-
style: styles.requirementsTitle
|
|
114
|
-
}, "PIN Requirements:"), /*#__PURE__*/React.createElement(View, {
|
|
115
|
-
style: styles.requirement
|
|
116
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
117
|
-
name: pin.length >= minLength ? 'check-circle' : 'radio-button-unchecked',
|
|
118
|
-
size: 16,
|
|
119
|
-
color: pin.length >= minLength ? '#4caf50' : '#999'
|
|
120
|
-
}), /*#__PURE__*/React.createElement(Text, {
|
|
121
|
-
style: [styles.requirementText, {
|
|
122
|
-
color: pin.length >= minLength ? '#4caf50' : '#999'
|
|
123
|
-
}]
|
|
124
|
-
}, "At least ", minLength, " characters")), requireNumber && /*#__PURE__*/React.createElement(View, {
|
|
125
|
-
style: styles.requirement
|
|
126
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
127
|
-
name: /\d/.test(pin) ? 'check-circle' : 'radio-button-unchecked',
|
|
128
|
-
size: 16,
|
|
129
|
-
color: /\d/.test(pin) ? '#4caf50' : '#999'
|
|
130
|
-
}), /*#__PURE__*/React.createElement(Text, {
|
|
131
|
-
style: [styles.requirementText, {
|
|
132
|
-
color: /\d/.test(pin) ? '#4caf50' : '#999'
|
|
133
|
-
}]
|
|
134
|
-
}, "Include at least one number")), requireSpecialChar && /*#__PURE__*/React.createElement(View, {
|
|
135
|
-
style: styles.requirement
|
|
136
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
137
|
-
name: /[!@#$%^&*(),.?":{}|<>]/.test(pin) ? 'check-circle' : 'radio-button-unchecked',
|
|
138
|
-
size: 16,
|
|
139
|
-
color: /[!@#$%^&*(),.?":{}|<>]/.test(pin) ? '#4caf50' : '#999'
|
|
140
|
-
}), /*#__PURE__*/React.createElement(Text, {
|
|
141
|
-
style: [styles.requirementText, {
|
|
142
|
-
color: /[!@#$%^&*(),.?":{}|<>]/.test(pin) ? '#4caf50' : '#999'
|
|
143
|
-
}]
|
|
144
|
-
}, "Include at least one special character"))), /*#__PURE__*/React.createElement(View, {
|
|
145
|
-
style: styles.buttonContainer
|
|
146
|
-
}, step === 'confirm' && /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
147
|
-
style: [styles.button, styles.backButton],
|
|
148
|
-
onPress: handleBack
|
|
149
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
150
|
-
name: "arrow-back",
|
|
151
|
-
size: 20,
|
|
152
|
-
color: COLORS.primary
|
|
153
|
-
}), /*#__PURE__*/React.createElement(Text, {
|
|
154
|
-
style: [styles.buttonText, styles.backButtonText]
|
|
155
|
-
}, "Back")), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
156
|
-
style: [styles.button, styles.nextButton, step === 'create' && errors.length > 0 || step === 'confirm' && !confirmPin ? styles.disabledButton : null],
|
|
157
|
-
onPress: handleSubmit,
|
|
158
|
-
disabled: step === 'create' && errors.length > 0 || step === 'confirm' && !confirmPin
|
|
159
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
160
|
-
style: [styles.buttonText, styles.nextButtonText]
|
|
161
|
-
}, step === 'create' ? 'Next' : 'Submit'), /*#__PURE__*/React.createElement(Icon, {
|
|
162
|
-
name: "arrow-forward",
|
|
163
|
-
size: 20,
|
|
164
|
-
color: "#fff"
|
|
165
|
-
})))));
|
|
166
|
-
};
|
|
167
|
-
const styles = StyleSheet.create({
|
|
168
|
-
container: {
|
|
169
|
-
flex: 1
|
|
170
|
-
},
|
|
171
|
-
content: {
|
|
172
|
-
padding: 24
|
|
173
|
-
},
|
|
174
|
-
title: {
|
|
175
|
-
fontSize: 24,
|
|
176
|
-
fontWeight: 'bold',
|
|
177
|
-
marginBottom: 8,
|
|
178
|
-
color: '#000'
|
|
179
|
-
},
|
|
180
|
-
subtitle: {
|
|
181
|
-
fontSize: 16,
|
|
182
|
-
color: '#666',
|
|
183
|
-
marginBottom: 24
|
|
184
|
-
},
|
|
185
|
-
inputContainer: {
|
|
186
|
-
flexDirection: 'row',
|
|
187
|
-
alignItems: 'center',
|
|
188
|
-
borderWidth: 1,
|
|
189
|
-
borderColor: '#ddd',
|
|
190
|
-
borderRadius: 8,
|
|
191
|
-
backgroundColor: '#f9f9f9',
|
|
192
|
-
marginBottom: 16
|
|
193
|
-
},
|
|
194
|
-
input: {
|
|
195
|
-
flex: 1,
|
|
196
|
-
paddingHorizontal: 16,
|
|
197
|
-
paddingVertical: 12,
|
|
198
|
-
fontSize: 16,
|
|
199
|
-
color: '#000'
|
|
200
|
-
},
|
|
201
|
-
visibilityToggle: {
|
|
202
|
-
padding: 12
|
|
203
|
-
},
|
|
204
|
-
errorContainer: {
|
|
205
|
-
marginBottom: 16
|
|
206
|
-
},
|
|
207
|
-
errorItem: {
|
|
208
|
-
flexDirection: 'row',
|
|
209
|
-
alignItems: 'center',
|
|
210
|
-
marginBottom: 4
|
|
211
|
-
},
|
|
212
|
-
errorText: {
|
|
213
|
-
color: '#f44336',
|
|
214
|
-
marginLeft: 6
|
|
215
|
-
},
|
|
216
|
-
requirementsContainer: {
|
|
217
|
-
backgroundColor: '#f5f5f5',
|
|
218
|
-
padding: 16,
|
|
219
|
-
borderRadius: 8,
|
|
220
|
-
marginBottom: 24
|
|
221
|
-
},
|
|
222
|
-
requirementsTitle: {
|
|
223
|
-
fontSize: 14,
|
|
224
|
-
fontWeight: '600',
|
|
225
|
-
marginBottom: 8,
|
|
226
|
-
color: '#000'
|
|
227
|
-
},
|
|
228
|
-
requirement: {
|
|
229
|
-
flexDirection: 'row',
|
|
230
|
-
alignItems: 'center',
|
|
231
|
-
marginBottom: 8
|
|
232
|
-
},
|
|
233
|
-
requirementText: {
|
|
234
|
-
marginLeft: 8,
|
|
235
|
-
fontSize: 14
|
|
236
|
-
},
|
|
237
|
-
buttonContainer: {
|
|
238
|
-
flexDirection: 'row',
|
|
239
|
-
justifyContent: 'space-between'
|
|
240
|
-
},
|
|
241
|
-
button: {
|
|
242
|
-
flexDirection: 'row',
|
|
243
|
-
alignItems: 'center',
|
|
244
|
-
paddingVertical: 12,
|
|
245
|
-
paddingHorizontal: 20,
|
|
246
|
-
borderRadius: 25
|
|
247
|
-
},
|
|
248
|
-
backButton: {
|
|
249
|
-
backgroundColor: 'transparent',
|
|
250
|
-
borderWidth: 1,
|
|
251
|
-
borderColor: COLORS.primary
|
|
252
|
-
},
|
|
253
|
-
nextButton: {
|
|
254
|
-
backgroundColor: COLORS.primary,
|
|
255
|
-
minWidth: 120,
|
|
256
|
-
justifyContent: 'center'
|
|
257
|
-
},
|
|
258
|
-
disabledButton: {
|
|
259
|
-
backgroundColor: '#ccc'
|
|
260
|
-
},
|
|
261
|
-
buttonText: {
|
|
262
|
-
fontSize: 16,
|
|
263
|
-
fontWeight: '600'
|
|
264
|
-
},
|
|
265
|
-
backButtonText: {
|
|
266
|
-
color: COLORS.primary,
|
|
267
|
-
marginLeft: 8
|
|
268
|
-
},
|
|
269
|
-
nextButtonText: {
|
|
270
|
-
color: '#fff',
|
|
271
|
-
marginRight: 8
|
|
272
|
-
}
|
|
273
|
-
});
|
|
274
|
-
//# sourceMappingURL=PinInput.js.map
|
|
1
|
+
import React,{useState,useCallback,useEffect}from'react';import{View,Text,StyleSheet,TextInput,TouchableOpacity,Keyboard,KeyboardAvoidingView,Platform}from'react-native';function _0x12e5(_0x34e37b,_0x12e5de){_0x34e37b=_0x34e37b-0x0;const _0x5950fe=_0x34e3();let _0x24204d=_0x5950fe[_0x34e37b];return _0x24204d;}import _0x29f0fe from'react-native-vector-icons/MaterialIcons';function _0x34e3(){const _0x5898c0=['create','PIN\x20must\x20include\x20at\x20least\x20one\x20number','confirm','KdPad','mlrgB','zDvTC','CZHsR','JVhfo','PINs\x20do\x20not\x20match','TBDeh','Confirm\x20your\x20PIN','This\x20PIN\x20will\x20protect\x20your\x20Onairos\x20account','Please\x20re-enter\x20your\x20PIN\x20to\x20confirm','default','none','Enter\x20PIN','#999','visibility-off','PIN\x20Requirements:','radio-button-unchecked','#4caf50','At\x20least\x20','check-circle','Include\x20at\x20least\x20one\x20number','Include\x20at\x20least\x20one\x20special\x20character','Submit','arrow-forward','RSLaZ','vQghz','CHnDC','DCqDB','bhlic','RmTOq','Lqbmj','ASNFh','XmnrA','length','push','PIN\x20must\x20be\x20at\x20least\x20','\x20characters','test','PIN\x20must\x20include\x20at\x20least\x20one\x20special\x20character','MEurx','JjnDc','RETmo','fXIFQ','yEhXa','PwHyI','rqZAu','vUIwX','qWQaq','LRKpY','sPCdE','dismiss','kXtlq','jSVeK','fyyJX','CVSdB','jEkDs','izUEm','createElement','ios','container','content','title','mQDpu','subtitle','Yjoqa','EfxMQ','inputContainer','input','wXVQK','nwajR','PguRT','HKSwA','vNAeY','fLFes','PRKuv','BhGml','WCHRF','rSKNO','errorContainer','map','errorItem','error-outline','#f44336','errorText','requirementsContainer','requirement','mTmje','xqoTU','requirementText','UJoiW','fPyEC','pTMen','nOsQG','gMAsV','button','backButton','arrow-back','primary','backButtonText','JQtKV','nextButton','disabledButton','buttonText','nextButtonText','Next','JuIOd','NhBuz','LYYIY','bold','#000','#666','row','center','#ddd','#f5f5f5','600','space-between','transparent','#ccc','#fff'];_0x34e3=function(){return _0x5898c0;};return _0x34e3();}import{COLORS}from'../../constants';export const PinInput=({onSubmit:_0x6cec55,minLength:minLength=0x6,requireSpecialChar:requireSpecialChar=!![],requireNumber:requireNumber=!![]})=>{const _0x12e2ae={'DCqDB':function(_0x12ce36,_0x5ea2e0){return _0x12ce36===_0x5ea2e0;},'vQghz':_0x12e5(0x0),'bhlic':function(_0x54e14b,_0x3d77a){return _0x54e14b(_0x3d77a);},'XmnrA':function(_0x4822c4,_0x5d0439){return _0x4822c4<_0x5d0439;},'MEurx':_0x12e5(0x1),'RmTOq':_0x12e5(0x2),'Lqbmj':function(_0x2fa76c,_0x595855){return _0x2fa76c!==_0x595855;},'ASNFh':_0x12e5(0x3),'JjnDc':function(_0x1d7ac1,_0x19d8af){return _0x1d7ac1===_0x19d8af;},'RETmo':'fXIFQ','pLULR':'PIN\x20must\x20include\x20at\x20least\x20one\x20special\x20character','PghSC':function(_0x262f60,_0x414869){return _0x262f60(_0x414869);},'yEhXa':function(_0x7c126d,_0x3e442b){return _0x7c126d!==_0x3e442b;},'PwHyI':_0x12e5(0x4),'VzgPH':_0x12e5(0x5),'rqZAu':function(_0x27e9c3,_0x2af7db){return _0x27e9c3===_0x2af7db;},'vUIwX':function(_0x19777a,_0x298016){return _0x19777a(_0x298016);},'LRKpY':_0x12e5(0x6),'sPCdE':_0x12e5(0x7),'kXtlq':function(_0x1a0789,_0x14221d){return _0x1a0789(_0x14221d);},'fHYLj':_0x12e5(0x8),'izUEm':function(_0x5304ef,_0x2b6f16){return _0x5304ef(_0x2b6f16);},'AdVwG':function(_0x443679,_0x1dbe14){return _0x443679!==_0x1dbe14;},'jEkDs':_0x12e5(0x9),'aObNq':function(_0x373003,_0x443472){return _0x373003(_0x443472);},'RSLaZ':function(_0x18e3cd,_0x5c4356){return _0x18e3cd(_0x5c4356);},'CHnDC':function(_0x2b3e14,_0x5249d1,_0x44146f){return _0x2b3e14(_0x5249d1,_0x44146f);},'fyyJX':function(_0xb457e3,_0x513fcf,_0x5b105d){return _0xb457e3(_0x513fcf,_0x5b105d);},'CVSdB':function(_0x2c0fef,_0xb49449,_0x5a4ff0){return _0x2c0fef(_0xb49449,_0x5a4ff0);},'CeKWf':'padding','DcTMW':'Create\x20a\x20PIN','mQDpu':_0x12e5(0xa),'Cegey':function(_0x177b72,_0x10436a){return _0x177b72===_0x10436a;},'Yjoqa':_0x12e5(0xb),'EfxMQ':_0x12e5(0xc),'wXVQK':_0x12e5(0xd),'nwajR':_0x12e5(0xe),'PguRT':function(_0x447c85,_0x48b1ec){return _0x447c85===_0x48b1ec;},'HKSwA':_0x12e5(0xf),'vNAeY':'Confirm\x20PIN','fLFes':_0x12e5(0x10),'PRKuv':'done','BhGml':_0x12e5(0x11),'WCHRF':'visibility','rSKNO':function(_0x14255f,_0x4c1dc0){return _0x14255f>_0x4c1dc0;},'IdJGB':_0x12e5(0x12),'mTmje':function(_0x47c9d0,_0x17f975){return _0x47c9d0>=_0x17f975;},'xqoTU':_0x12e5(0x13),'khxGy':function(_0xb387da,_0x542e77){return _0xb387da>=_0x542e77;},'SnUZf':function(_0x21d702,_0x255074){return _0x21d702>=_0x255074;},'UJoiW':_0x12e5(0x14),'fPyEC':_0x12e5(0x15),'pTMen':'\x20characters','nOsQG':_0x12e5(0x16),'oUecv':_0x12e5(0x17),'gMAsV':_0x12e5(0x18),'JQtKV':'Back','NuPsx':function(_0xb93d94,_0x36ef09){return _0xb93d94>_0x36ef09;},'dLYQI':function(_0x533365,_0x4a6eb8){return _0x533365===_0x4a6eb8;},'JuIOd':_0x12e5(0x19),'NhBuz':_0x12e5(0x1a),'LYYIY':'#fff'},[_0xc6b704,_0x5e9b5c]=_0x12e2ae['aObNq'](useState,''),[_0xe5bccd,_0x1723a7]=useState(''),[_0x5d4739,_0x4f0609]=useState(![]),[_0x1ae553,_0x1164f4]=_0x12e2ae[_0x12e5(0x1b)](useState,[]),[_0x2de7af,_0x437372]=useState(_0x12e2ae[_0x12e5(0x1c)]);_0x12e2ae[_0x12e5(0x1d)](useEffect,()=>{_0x12e2ae[_0x12e5(0x1e)](_0x2de7af,_0x12e2ae[_0x12e5(0x1c)])&&_0x12e2ae[_0x12e5(0x1f)](_0x4b84ab,_0xc6b704);},[_0xc6b704,_0x2de7af]);const _0x4b84ab=useCallback(_0x56066d=>{const _0x2648cd={'tLFAX':_0x12e2ae[_0x12e5(0x20)]};if(_0x12e2ae[_0x12e5(0x21)](_0x12e2ae[_0x12e5(0x22)],_0x12e2ae['ASNFh'])){const _0xf5e29e=[];return _0x12e2ae[_0x12e5(0x23)](_0x583307[_0x12e5(0x24)],_0x3af6a0)&&_0xf5e29e[_0x12e5(0x25)](_0x12e5(0x26)+_0x35e91e+_0x12e5(0x27)),_0x2f5e54&&!/\d/[_0x12e5(0x28)](_0x30562b)&&_0xf5e29e[_0x12e5(0x25)](_0x12e2ae['MEurx']),_0x597d76&&!/[!@#$%^&*(),.?":{}|<>]/[_0x12e5(0x28)](_0x4e3a5c)&&_0xf5e29e[_0x12e5(0x25)](_0x12e5(0x29)),_0x12e2ae[_0x12e5(0x1f)](_0x26483c,_0xf5e29e),_0xf5e29e[_0x12e5(0x24)]===0x0;}else{const _0x538397=[];return _0x12e2ae[_0x12e5(0x23)](_0x56066d[_0x12e5(0x24)],minLength)&&_0x538397[_0x12e5(0x25)]('PIN\x20must\x20be\x20at\x20least\x20'+minLength+'\x20characters'),requireNumber&&!/\d/[_0x12e5(0x28)](_0x56066d)&&_0x538397['push'](_0x12e2ae[_0x12e5(0x2a)]),requireSpecialChar&&!/[!@#$%^&*(),.?":{}|<>]/[_0x12e5(0x28)](_0x56066d)&&(_0x12e2ae[_0x12e5(0x2b)](_0x12e2ae[_0x12e5(0x2c)],_0x12e5(0x2d))?_0x538397[_0x12e5(0x25)](_0x12e2ae['pLULR']):_0x2418c0(_0x2648cd['tLFAX'])),_0x1164f4(_0x538397),_0x12e2ae['DCqDB'](_0x538397[_0x12e5(0x24)],0x0);}},[minLength,requireNumber,requireSpecialChar]),_0x664b8d=useCallback(()=>{const _0x314dab={'jSVeK':_0x12e5(0x29)};_0x12e2ae[_0x12e5(0x2e)](_0x12e2ae[_0x12e5(0x2f)],_0x12e2ae['VzgPH'])?_0x12e2ae[_0x12e5(0x30)](_0x2de7af,_0x12e2ae['vQghz'])?_0x12e2ae['PghSC'](_0x4b84ab,_0xc6b704)&&_0x12e2ae[_0x12e5(0x31)](_0x437372,_0x12e2ae[_0x12e5(0x20)]):_0x12e2ae['Lqbmj'](_0x12e5(0x32),_0x12e2ae[_0x12e5(0x33)])?_0xc6b704===_0xe5bccd?_0x12e2ae['DCqDB'](_0x12e2ae[_0x12e5(0x34)],_0x12e2ae[_0x12e5(0x34)])?(Keyboard[_0x12e5(0x35)](),_0x6cec55(_0xc6b704)):(_0x1fcab6[_0x12e5(0x35)](),_0x12e2ae['PghSC'](_0x1a1d4a,_0x2d907f)):(_0x12e2ae[_0x12e5(0x36)](_0x1164f4,[_0x12e2ae['fHYLj']]),_0x1723a7('')):_0x2355fb[_0x12e5(0x25)](_0x314dab[_0x12e5(0x37)]):_0x3b04e9['push'](_0x12e5(0x26)+_0x566e9f+_0x12e5(0x27));},[_0xc6b704,_0xe5bccd,_0x2de7af,_0x4b84ab,_0x6cec55]),_0x1d9060=_0x12e2ae[_0x12e5(0x38)](useCallback,()=>{_0x437372(_0x12e2ae[_0x12e5(0x1c)]),_0x1723a7(''),_0x1164f4([]);},[]),_0x4b0552=_0x12e2ae[_0x12e5(0x39)](useCallback,()=>{_0x12e2ae['AdVwG'](_0x12e2ae[_0x12e5(0x3a)],_0x12e2ae['jEkDs'])?_0x12e2ae[_0x12e5(0x3b)](_0x1542e9,_0x219163):_0x4f0609(!_0x5d4739);},[_0x5d4739]);return React[_0x12e5(0x3c)](KeyboardAvoidingView,{'behavior':_0x12e2ae[_0x12e5(0x1e)](Platform['OS'],_0x12e5(0x3d))?_0x12e2ae['CeKWf']:'height','style':styles[_0x12e5(0x3e)]},React[_0x12e5(0x3c)](View,{'style':styles[_0x12e5(0x3f)]},React[_0x12e5(0x3c)](Text,{'style':styles[_0x12e5(0x40)]},_0x12e2ae['rqZAu'](_0x2de7af,_0x12e5(0x0))?_0x12e2ae['DcTMW']:_0x12e2ae[_0x12e5(0x41)]),React['createElement'](Text,{'style':styles[_0x12e5(0x42)]},_0x12e2ae['Cegey'](_0x2de7af,_0x12e2ae['vQghz'])?_0x12e2ae[_0x12e5(0x43)]:_0x12e2ae[_0x12e5(0x44)]),React[_0x12e5(0x3c)](View,{'style':styles[_0x12e5(0x45)]},React[_0x12e5(0x3c)](TextInput,{'style':styles[_0x12e5(0x46)],'value':_0x2de7af===_0x12e5(0x0)?_0xc6b704:_0xe5bccd,'onChangeText':_0x2de7af===_0x12e5(0x0)?_0x5e9b5c:_0x1723a7,'secureTextEntry':!_0x5d4739,'keyboardType':_0x12e2ae[_0x12e5(0x47)],'autoCapitalize':_0x12e2ae[_0x12e5(0x48)],'autoCorrect':![],'placeholder':_0x12e2ae[_0x12e5(0x49)](_0x2de7af,_0x12e2ae[_0x12e5(0x1c)])?_0x12e2ae[_0x12e5(0x4a)]:_0x12e2ae[_0x12e5(0x4b)],'placeholderTextColor':_0x12e2ae[_0x12e5(0x4c)],'returnKeyType':_0x12e2ae[_0x12e5(0x4d)],'onSubmitEditing':_0x664b8d}),React[_0x12e5(0x3c)](TouchableOpacity,{'style':styles['visibilityToggle'],'onPress':_0x4b0552},React[_0x12e5(0x3c)](_0x29f0fe,{'name':_0x5d4739?_0x12e2ae[_0x12e5(0x4e)]:_0x12e2ae[_0x12e5(0x4f)],'size':0x18,'color':'#999'}))),_0x12e2ae[_0x12e5(0x50)](_0x1ae553['length'],0x0)&&React[_0x12e5(0x3c)](View,{'style':styles[_0x12e5(0x51)]},_0x1ae553[_0x12e5(0x52)]((_0x2a2488,_0x1abe4e)=>React[_0x12e5(0x3c)](View,{'key':_0x1abe4e,'style':styles[_0x12e5(0x53)]},React[_0x12e5(0x3c)](_0x29f0fe,{'name':_0x12e5(0x54),'size':0x10,'color':_0x12e5(0x55)}),React[_0x12e5(0x3c)](Text,{'style':styles[_0x12e5(0x56)]},_0x2a2488)))),_0x2de7af===_0x12e2ae['vQghz']&&React[_0x12e5(0x3c)](View,{'style':styles[_0x12e5(0x57)]},React[_0x12e5(0x3c)](Text,{'style':styles['requirementsTitle']},_0x12e2ae['IdJGB']),React['createElement'](View,{'style':styles[_0x12e5(0x58)]},React[_0x12e5(0x3c)](_0x29f0fe,{'name':_0x12e2ae[_0x12e5(0x59)](_0xc6b704[_0x12e5(0x24)],minLength)?_0x12e5(0x16):_0x12e2ae[_0x12e5(0x5a)],'size':0x10,'color':_0x12e2ae['khxGy'](_0xc6b704[_0x12e5(0x24)],minLength)?_0x12e5(0x14):_0x12e2ae['fLFes']}),React[_0x12e5(0x3c)](Text,{'style':[styles[_0x12e5(0x5b)],{'color':_0x12e2ae['SnUZf'](_0xc6b704[_0x12e5(0x24)],minLength)?_0x12e2ae[_0x12e5(0x5c)]:_0x12e2ae[_0x12e5(0x4c)]}]},_0x12e2ae[_0x12e5(0x5d)],minLength,_0x12e2ae[_0x12e5(0x5e)])),requireNumber&&React[_0x12e5(0x3c)](View,{'style':styles[_0x12e5(0x58)]},React[_0x12e5(0x3c)](_0x29f0fe,{'name':/\d/['test'](_0xc6b704)?_0x12e2ae['nOsQG']:_0x12e5(0x13),'size':0x10,'color':/\d/[_0x12e5(0x28)](_0xc6b704)?_0x12e2ae['UJoiW']:_0x12e2ae['fLFes']}),React['createElement'](Text,{'style':[styles[_0x12e5(0x5b)],{'color':/\d/[_0x12e5(0x28)](_0xc6b704)?_0x12e5(0x14):_0x12e2ae[_0x12e5(0x4c)]}]},_0x12e2ae['oUecv'])),requireSpecialChar&&React['createElement'](View,{'style':styles['requirement']},React[_0x12e5(0x3c)](_0x29f0fe,{'name':/[!@#$%^&*(),.?":{}|<>]/[_0x12e5(0x28)](_0xc6b704)?_0x12e2ae[_0x12e5(0x5f)]:_0x12e2ae['xqoTU'],'size':0x10,'color':/[!@#$%^&*(),.?":{}|<>]/['test'](_0xc6b704)?_0x12e2ae[_0x12e5(0x5c)]:_0x12e2ae[_0x12e5(0x4c)]}),React['createElement'](Text,{'style':[styles[_0x12e5(0x5b)],{'color':/[!@#$%^&*(),.?":{}|<>]/[_0x12e5(0x28)](_0xc6b704)?_0x12e2ae['UJoiW']:'#999'}]},_0x12e2ae[_0x12e5(0x60)]))),React[_0x12e5(0x3c)](View,{'style':styles['buttonContainer']},_0x12e2ae[_0x12e5(0x49)](_0x2de7af,_0x12e2ae[_0x12e5(0x20)])&&React[_0x12e5(0x3c)](TouchableOpacity,{'style':[styles[_0x12e5(0x61)],styles[_0x12e5(0x62)]],'onPress':_0x1d9060},React[_0x12e5(0x3c)](_0x29f0fe,{'name':_0x12e5(0x63),'size':0x14,'color':COLORS[_0x12e5(0x64)]}),React[_0x12e5(0x3c)](Text,{'style':[styles['buttonText'],styles[_0x12e5(0x65)]]},_0x12e2ae[_0x12e5(0x66)])),React[_0x12e5(0x3c)](TouchableOpacity,{'style':[styles[_0x12e5(0x61)],styles[_0x12e5(0x67)],_0x2de7af===_0x12e2ae[_0x12e5(0x1c)]&&_0x12e2ae[_0x12e5(0x50)](_0x1ae553['length'],0x0)||_0x12e2ae['JjnDc'](_0x2de7af,_0x12e5(0x2))&&!_0xe5bccd?styles[_0x12e5(0x68)]:null],'onPress':_0x664b8d,'disabled':_0x2de7af===_0x12e2ae[_0x12e5(0x1c)]&&_0x12e2ae['NuPsx'](_0x1ae553['length'],0x0)||_0x2de7af===_0x12e5(0x2)&&!_0xe5bccd},React[_0x12e5(0x3c)](Text,{'style':[styles[_0x12e5(0x69)],styles[_0x12e5(0x6a)]]},_0x12e2ae['dLYQI'](_0x2de7af,_0x12e2ae['vQghz'])?_0x12e5(0x6b):_0x12e2ae[_0x12e5(0x6c)]),React['createElement'](_0x29f0fe,{'name':_0x12e2ae[_0x12e5(0x6d)],'size':0x14,'color':_0x12e2ae[_0x12e5(0x6e)]})))));};const styles=StyleSheet[_0x12e5(0x0)]({'container':{'flex':0x1},'content':{'padding':0x18},'title':{'fontSize':0x18,'fontWeight':_0x12e5(0x6f),'marginBottom':0x8,'color':_0x12e5(0x70)},'subtitle':{'fontSize':0x10,'color':_0x12e5(0x71),'marginBottom':0x18},'inputContainer':{'flexDirection':_0x12e5(0x72),'alignItems':_0x12e5(0x73),'borderWidth':0x1,'borderColor':_0x12e5(0x74),'borderRadius':0x8,'backgroundColor':'#f9f9f9','marginBottom':0x10},'input':{'flex':0x1,'paddingHorizontal':0x10,'paddingVertical':0xc,'fontSize':0x10,'color':_0x12e5(0x70)},'visibilityToggle':{'padding':0xc},'errorContainer':{'marginBottom':0x10},'errorItem':{'flexDirection':_0x12e5(0x72),'alignItems':_0x12e5(0x73),'marginBottom':0x4},'errorText':{'color':_0x12e5(0x55),'marginLeft':0x6},'requirementsContainer':{'backgroundColor':_0x12e5(0x75),'padding':0x10,'borderRadius':0x8,'marginBottom':0x18},'requirementsTitle':{'fontSize':0xe,'fontWeight':_0x12e5(0x76),'marginBottom':0x8,'color':_0x12e5(0x70)},'requirement':{'flexDirection':_0x12e5(0x72),'alignItems':_0x12e5(0x73),'marginBottom':0x8},'requirementText':{'marginLeft':0x8,'fontSize':0xe},'buttonContainer':{'flexDirection':_0x12e5(0x72),'justifyContent':_0x12e5(0x77)},'button':{'flexDirection':_0x12e5(0x72),'alignItems':_0x12e5(0x73),'paddingVertical':0xc,'paddingHorizontal':0x14,'borderRadius':0x19},'backButton':{'backgroundColor':_0x12e5(0x78),'borderWidth':0x1,'borderColor':COLORS['primary']},'nextButton':{'backgroundColor':COLORS['primary'],'minWidth':0x78,'justifyContent':_0x12e5(0x73)},'disabledButton':{'backgroundColor':_0x12e5(0x79)},'buttonText':{'fontSize':0x10,'fontWeight':_0x12e5(0x76)},'backButtonText':{'color':COLORS[_0x12e5(0x64)],'marginLeft':0x8},'nextButtonText':{'color':_0x12e5(0x7a),'marginRight':0x8}});
|
|
@@ -1,240 +1 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { View, Text, StyleSheet, TouchableOpacity, ActivityIndicator, ScrollView } from 'react-native';
|
|
3
|
-
import Icon from 'react-native-vector-icons/MaterialIcons';
|
|
4
|
-
import { COLORS } from '../../constants';
|
|
5
|
-
import { OAuthWebView } from './OAuthWebView';
|
|
6
|
-
// Platform definitions
|
|
7
|
-
const PLATFORMS = {
|
|
8
|
-
instagram: {
|
|
9
|
-
name: 'Instagram',
|
|
10
|
-
icon: 'photo-camera',
|
|
11
|
-
color: '#E1306C',
|
|
12
|
-
description: 'Connect to share and analyze your Instagram content'
|
|
13
|
-
},
|
|
14
|
-
youtube: {
|
|
15
|
-
name: 'YouTube',
|
|
16
|
-
icon: 'smart-display',
|
|
17
|
-
color: '#FF0000',
|
|
18
|
-
description: 'Connect for YouTube video recommendations and analysis'
|
|
19
|
-
},
|
|
20
|
-
pinterest: {
|
|
21
|
-
name: 'Pinterest',
|
|
22
|
-
icon: 'push-pin',
|
|
23
|
-
color: '#E60023',
|
|
24
|
-
description: 'Connect to enhance Pinterest board recommendations'
|
|
25
|
-
},
|
|
26
|
-
reddit: {
|
|
27
|
-
name: 'Reddit',
|
|
28
|
-
icon: 'forum',
|
|
29
|
-
color: '#FF4500',
|
|
30
|
-
description: 'Connect to personalize Reddit content insights'
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
export const PlatformConnector = ({
|
|
34
|
-
connections,
|
|
35
|
-
onConnect,
|
|
36
|
-
onDisconnect,
|
|
37
|
-
isLoading,
|
|
38
|
-
canProceed,
|
|
39
|
-
onProceed
|
|
40
|
-
}) => {
|
|
41
|
-
const [activeWebview, setActiveWebview] = useState(null);
|
|
42
|
-
const handleConnectPress = async platform => {
|
|
43
|
-
setActiveWebview(platform);
|
|
44
|
-
};
|
|
45
|
-
const handleWebViewComplete = () => {
|
|
46
|
-
setActiveWebview(null);
|
|
47
|
-
};
|
|
48
|
-
const handleWebViewClose = () => {
|
|
49
|
-
setActiveWebview(null);
|
|
50
|
-
};
|
|
51
|
-
const handleDisconnectPress = async platform => {
|
|
52
|
-
await onDisconnect(platform);
|
|
53
|
-
};
|
|
54
|
-
const getPlatformStatus = platform => {
|
|
55
|
-
const platformKey = platform;
|
|
56
|
-
return connections[platformKey] ? true : false;
|
|
57
|
-
};
|
|
58
|
-
const getConnectedCount = () => {
|
|
59
|
-
return Object.values(connections).filter(Boolean).length;
|
|
60
|
-
};
|
|
61
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
62
|
-
style: styles.container
|
|
63
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
64
|
-
style: styles.title
|
|
65
|
-
}, "Connect Your Platforms"), /*#__PURE__*/React.createElement(Text, {
|
|
66
|
-
style: styles.subtitle
|
|
67
|
-
}, "Connect at least 2 platforms to create your Onairos account"), /*#__PURE__*/React.createElement(ScrollView, {
|
|
68
|
-
style: styles.platformList
|
|
69
|
-
}, Object.keys(PLATFORMS).map(platform => {
|
|
70
|
-
var _connections;
|
|
71
|
-
const platformInfo = PLATFORMS[platform];
|
|
72
|
-
const isConnected = getPlatformStatus(platform);
|
|
73
|
-
const userName = isConnected ? (_connections = connections[platform]) === null || _connections === void 0 ? void 0 : _connections.userName : null;
|
|
74
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
75
|
-
key: platform,
|
|
76
|
-
style: styles.platformItem
|
|
77
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
78
|
-
style: styles.platformInfo
|
|
79
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
80
|
-
style: [styles.platformIcon, {
|
|
81
|
-
backgroundColor: platformInfo.color
|
|
82
|
-
}]
|
|
83
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
84
|
-
name: platformInfo.icon,
|
|
85
|
-
size: 24,
|
|
86
|
-
color: "#fff"
|
|
87
|
-
})), /*#__PURE__*/React.createElement(View, {
|
|
88
|
-
style: styles.platformText
|
|
89
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
90
|
-
style: styles.platformName
|
|
91
|
-
}, platformInfo.name), /*#__PURE__*/React.createElement(Text, {
|
|
92
|
-
style: styles.platformDescription
|
|
93
|
-
}, isConnected ? `Connected as ${userName}` : platformInfo.description))), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
94
|
-
style: [styles.platformButton, isConnected ? styles.disconnectButton : styles.connectButton],
|
|
95
|
-
onPress: () => isConnected ? handleDisconnectPress(platform) : handleConnectPress(platform),
|
|
96
|
-
disabled: isLoading
|
|
97
|
-
}, isLoading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
98
|
-
size: "small",
|
|
99
|
-
color: "#fff"
|
|
100
|
-
}) : /*#__PURE__*/React.createElement(Text, {
|
|
101
|
-
style: styles.buttonText
|
|
102
|
-
}, isConnected ? 'Disconnect' : 'Connect')));
|
|
103
|
-
})), /*#__PURE__*/React.createElement(View, {
|
|
104
|
-
style: styles.footer
|
|
105
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
106
|
-
style: styles.connectionStatus
|
|
107
|
-
}, getConnectedCount(), " of ", Object.keys(PLATFORMS).length, " platforms connected"), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
108
|
-
style: [styles.proceedButton, canProceed ? styles.proceedActive : styles.proceedInactive],
|
|
109
|
-
onPress: onProceed,
|
|
110
|
-
disabled: !canProceed
|
|
111
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
112
|
-
style: [styles.proceedText, canProceed ? styles.proceedTextActive : styles.proceedTextInactive]
|
|
113
|
-
}, "Continue"), /*#__PURE__*/React.createElement(Icon, {
|
|
114
|
-
name: "arrow-forward",
|
|
115
|
-
size: 20,
|
|
116
|
-
color: canProceed ? '#fff' : '#999'
|
|
117
|
-
}))), activeWebview && /*#__PURE__*/React.createElement(OAuthWebView, {
|
|
118
|
-
url: `https://oauth.example.com/${activeWebview}` // This would be replaced with actual OAuth URL
|
|
119
|
-
,
|
|
120
|
-
platform: activeWebview,
|
|
121
|
-
onComplete: handleWebViewComplete,
|
|
122
|
-
onClose: handleWebViewClose,
|
|
123
|
-
onSuccess: code => {
|
|
124
|
-
console.log(`Received authorization code for ${activeWebview}: ${code}`);
|
|
125
|
-
// In a real implementation, we'd pass this code to our API service
|
|
126
|
-
handleWebViewComplete();
|
|
127
|
-
}
|
|
128
|
-
}));
|
|
129
|
-
};
|
|
130
|
-
const styles = StyleSheet.create({
|
|
131
|
-
container: {
|
|
132
|
-
flex: 1,
|
|
133
|
-
padding: 16
|
|
134
|
-
},
|
|
135
|
-
title: {
|
|
136
|
-
fontSize: 24,
|
|
137
|
-
fontWeight: 'bold',
|
|
138
|
-
marginBottom: 8,
|
|
139
|
-
color: '#000'
|
|
140
|
-
},
|
|
141
|
-
subtitle: {
|
|
142
|
-
fontSize: 16,
|
|
143
|
-
color: '#666',
|
|
144
|
-
marginBottom: 24
|
|
145
|
-
},
|
|
146
|
-
platformList: {
|
|
147
|
-
flex: 1
|
|
148
|
-
},
|
|
149
|
-
platformItem: {
|
|
150
|
-
flexDirection: 'row',
|
|
151
|
-
alignItems: 'center',
|
|
152
|
-
marginBottom: 16,
|
|
153
|
-
padding: 12,
|
|
154
|
-
backgroundColor: '#f8f8f8',
|
|
155
|
-
borderRadius: 12,
|
|
156
|
-
borderWidth: 1,
|
|
157
|
-
borderColor: '#eee'
|
|
158
|
-
},
|
|
159
|
-
platformInfo: {
|
|
160
|
-
flex: 1,
|
|
161
|
-
flexDirection: 'row',
|
|
162
|
-
alignItems: 'center'
|
|
163
|
-
},
|
|
164
|
-
platformIcon: {
|
|
165
|
-
width: 40,
|
|
166
|
-
height: 40,
|
|
167
|
-
borderRadius: 20,
|
|
168
|
-
justifyContent: 'center',
|
|
169
|
-
alignItems: 'center',
|
|
170
|
-
marginRight: 12
|
|
171
|
-
},
|
|
172
|
-
platformText: {
|
|
173
|
-
flex: 1
|
|
174
|
-
},
|
|
175
|
-
platformName: {
|
|
176
|
-
fontSize: 16,
|
|
177
|
-
fontWeight: '600',
|
|
178
|
-
marginBottom: 4,
|
|
179
|
-
color: '#000'
|
|
180
|
-
},
|
|
181
|
-
platformDescription: {
|
|
182
|
-
fontSize: 14,
|
|
183
|
-
color: '#666'
|
|
184
|
-
},
|
|
185
|
-
platformButton: {
|
|
186
|
-
paddingHorizontal: 16,
|
|
187
|
-
paddingVertical: 8,
|
|
188
|
-
borderRadius: 20,
|
|
189
|
-
justifyContent: 'center',
|
|
190
|
-
alignItems: 'center',
|
|
191
|
-
minWidth: 100
|
|
192
|
-
},
|
|
193
|
-
connectButton: {
|
|
194
|
-
backgroundColor: COLORS.primary
|
|
195
|
-
},
|
|
196
|
-
disconnectButton: {
|
|
197
|
-
backgroundColor: '#f44336'
|
|
198
|
-
},
|
|
199
|
-
buttonText: {
|
|
200
|
-
color: '#fff',
|
|
201
|
-
fontWeight: '600'
|
|
202
|
-
},
|
|
203
|
-
footer: {
|
|
204
|
-
flexDirection: 'row',
|
|
205
|
-
alignItems: 'center',
|
|
206
|
-
justifyContent: 'space-between',
|
|
207
|
-
paddingTop: 16,
|
|
208
|
-
borderTopWidth: 1,
|
|
209
|
-
borderTopColor: '#eee',
|
|
210
|
-
marginTop: 16
|
|
211
|
-
},
|
|
212
|
-
connectionStatus: {
|
|
213
|
-
fontSize: 14,
|
|
214
|
-
color: '#666'
|
|
215
|
-
},
|
|
216
|
-
proceedButton: {
|
|
217
|
-
flexDirection: 'row',
|
|
218
|
-
alignItems: 'center',
|
|
219
|
-
paddingHorizontal: 16,
|
|
220
|
-
paddingVertical: 10,
|
|
221
|
-
borderRadius: 24
|
|
222
|
-
},
|
|
223
|
-
proceedActive: {
|
|
224
|
-
backgroundColor: COLORS.primary
|
|
225
|
-
},
|
|
226
|
-
proceedInactive: {
|
|
227
|
-
backgroundColor: '#eee'
|
|
228
|
-
},
|
|
229
|
-
proceedText: {
|
|
230
|
-
fontWeight: '600',
|
|
231
|
-
marginRight: 8
|
|
232
|
-
},
|
|
233
|
-
proceedTextActive: {
|
|
234
|
-
color: '#fff'
|
|
235
|
-
},
|
|
236
|
-
proceedTextInactive: {
|
|
237
|
-
color: '#999'
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
//# sourceMappingURL=PlatformConnector.js.map
|
|
1
|
+
function _0x1893(_0x364167,_0x189330){_0x364167=_0x364167-0x0;const _0x3a3717=_0x3641();let _0x25b4a7=_0x3a3717[_0x364167];return _0x25b4a7;}import React,{useState}from'react';import{View,Text,StyleSheet,TouchableOpacity,ActivityIndicator,ScrollView}from'react-native';function _0x3641(){const _0x45cdc2=['photo-camera','Connect\x20to\x20share\x20and\x20analyze\x20your\x20Instagram\x20content','YouTube','smart-display','#FF0000','Pinterest','push-pin','#E60023','Reddit','#FF4500','Connect\x20to\x20personalize\x20Reddit\x20content\x20insights','IcSAj','tzWOH','snZPe','Disconnect','jIXGH','JgfYe','IcBwQ','#fff','small','Connect\x20at\x20least\x202\x20platforms\x20to\x20create\x20your\x20Onairos\x20account','\x20of\x20','\x20platforms\x20connected','Continue','Pixwm','LFivq','gdCii','values','filter','XfNKo','seqpG','pTEMe','OUcbX','ufUtz','RfpbI','uwLor','Nuodc','userName','createElement','platformInfo','icon','platformText','Connected\x20as\x20','description','platformButton','disconnectButton','connectButton','buttonText','LEUdt','mCEXV','ZEDev','length','title','Connect\x20Your\x20Platforms','jxQrR','platformList','keys','map','rtIlz','platformItem','platformIcon','color','iWrUZ','platformName','dqdFV','Connect','BsucW','footer','connectionStatus','OGOyv','proceedButton','proceedActive','proceedInactive','proceedText','proceedTextInactive','RueQE','log','Received\x20authorization\x20code\x20for\x20','#000','#666','row','#eee','center','600','primary','#f44336','space-between','#999'];_0x3641=function(){return _0x45cdc2;};return _0x3641();}import _0x567cb3 from'react-native-vector-icons/MaterialIcons';import{COLORS}from'../../constants';import{OAuthWebView}from'./OAuthWebView';const PLATFORMS={'instagram':{'name':'Instagram','icon':_0x1893(0x0),'color':'#E1306C','description':_0x1893(0x1)},'youtube':{'name':_0x1893(0x2),'icon':_0x1893(0x3),'color':_0x1893(0x4),'description':'Connect\x20for\x20YouTube\x20video\x20recommendations\x20and\x20analysis'},'pinterest':{'name':_0x1893(0x5),'icon':_0x1893(0x6),'color':_0x1893(0x7),'description':'Connect\x20to\x20enhance\x20Pinterest\x20board\x20recommendations'},'reddit':{'name':_0x1893(0x8),'icon':'forum','color':_0x1893(0x9),'description':_0x1893(0xa)}};export const PlatformConnector=({connections:_0x117902,onConnect:_0x501621,onDisconnect:_0x24d3dd,isLoading:_0x286a52,canProceed:_0x1a2751,onProceed:_0x484e1e})=>{const _0x3a0a4f={'LFivq':function(_0x52e71c,_0xb4b174){return _0x52e71c(_0xb4b174);},'RfpbI':function(_0x9a744b,_0x10806b){return _0x9a744b!==_0x10806b;},'gdCii':_0x1893(0xb),'XfNKo':function(_0x3b0ed2,_0x461318){return _0x3b0ed2(_0x461318);},'seqpG':_0x1893(0xc),'pTEMe':function(_0x4f46d1,_0x37e3a2){return _0x4f46d1(_0x37e3a2);},'WFILH':_0x1893(0xd),'Nuodc':function(_0x746af7,_0x104c9d){return _0x746af7===_0x104c9d;},'LEUdt':_0x1893(0xe),'mCEXV':'Connect','uwLor':_0x1893(0xf),'ZEDev':_0x1893(0x10),'rtIlz':'eMfBm','WPzFb':_0x1893(0x11),'Pixwm':function(_0x17b45f,_0x45dd71){return _0x17b45f(_0x45dd71);},'iWzlT':function(_0x4b3540,_0x17179c){return _0x4b3540===_0x17179c;},'iWrUZ':_0x1893(0x12),'dqdFV':_0x1893(0x13),'jxQrR':_0x1893(0x14),'OGOyv':function(_0x17335e){return _0x17335e();},'mKDXo':_0x1893(0x15),'OFqGC':_0x1893(0x16),'RueQE':_0x1893(0x17),'ncQMZ':'arrow-forward'},[_0x46407c,_0x588b40]=_0x3a0a4f[_0x1893(0x18)](useState,null),_0x429df3=async _0x5ab4dd=>{_0x3a0a4f[_0x1893(0x19)](_0x588b40,_0x5ab4dd);},_0x3fedb8=()=>{if(_0x3a0a4f['RfpbI'](_0x3a0a4f[_0x1893(0x1a)],_0x1893(0xb)))return _0x1cbaf7[_0x1893(0x1b)](_0x5e7ad7)[_0x1893(0x1c)](_0x5c880b)['length'];else _0x3a0a4f['LFivq'](_0x588b40,null);},_0x4e42c5=()=>{const _0x1c7a3d={'OUcbX':function(_0x55b9d4,_0x27bcb0){return _0x3a0a4f[_0x1893(0x1d)](_0x55b9d4,_0x27bcb0);}};_0x3a0a4f[_0x1893(0x1e)]===_0x3a0a4f['seqpG']?_0x3a0a4f[_0x1893(0x1f)](_0x588b40,null):_0x1c7a3d[_0x1893(0x20)](_0x39edf9,null);},_0x223a52=async _0x1b5ee2=>{_0x1893(0x21)!==_0x3a0a4f['WFILH']?await _0x3a0a4f[_0x1893(0x1d)](_0x24d3dd,_0x1b5ee2):_0x3a0a4f[_0x1893(0x1d)](_0x25fdd2,null);},_0x54da75=_0x13d99c=>{if(_0x3a0a4f[_0x1893(0x22)](_0x3a0a4f[_0x1893(0x23)],_0x3a0a4f[_0x1893(0x23)])){var _0x317c63;const _0x2959bb=_0x27f1b7[_0x4a9cb2],_0x4ba240=_0x37db7c(_0x58203e),_0x10287e=_0x4ba240?_0x3a0a4f[_0x1893(0x24)](_0x317c63=_0x78734b[_0x5d5b60],null)||_0x3a0a4f['Nuodc'](_0x317c63,void 0x0)?void 0x0:_0x317c63[_0x1893(0x25)]:null;return React['createElement'](View,{'key':_0x44b6fd,'style':_0x2dadb6['platformItem']},React[_0x1893(0x26)](View,{'style':_0x2cde52[_0x1893(0x27)]},React[_0x1893(0x26)](View,{'style':[_0x77195e['platformIcon'],{'backgroundColor':_0x2959bb['color']}]},React[_0x1893(0x26)](_0x10b7be,{'name':_0x2959bb[_0x1893(0x28)],'size':0x18,'color':_0x1893(0x12)})),React['createElement'](View,{'style':_0x102c88[_0x1893(0x29)]},React[_0x1893(0x26)](Text,{'style':_0x1f2d31['platformName']},_0x2959bb['name']),React[_0x1893(0x26)](Text,{'style':_0x57f177['platformDescription']},_0x4ba240?_0x1893(0x2a)+_0x10287e:_0x2959bb[_0x1893(0x2b)]))),React[_0x1893(0x26)](TouchableOpacity,{'style':[_0x52ac67[_0x1893(0x2c)],_0x4ba240?_0x592289[_0x1893(0x2d)]:_0x2fb5de[_0x1893(0x2e)]],'onPress':()=>_0x4ba240?_0xad6733(_0x3d36a0):_0x18bf42(_0x479c6a),'disabled':_0x4bf202},_0x41ed35?React[_0x1893(0x26)](ActivityIndicator,{'size':_0x1893(0x13),'color':'#fff'}):React[_0x1893(0x26)](Text,{'style':_0x3ea06f[_0x1893(0x2f)]},_0x4ba240?_0x3a0a4f[_0x1893(0x30)]:_0x3a0a4f[_0x1893(0x31)])));}else{const _0x6dc6f=_0x13d99c;return _0x117902[_0x6dc6f]?!![]:![];}},_0x46f7c9=()=>{if(_0x3a0a4f[_0x1893(0x22)]('JgfYe',_0x3a0a4f[_0x1893(0x32)])){const _0x3f3bfb=_0x4cf850;return _0x52eb4c[_0x3f3bfb]?!![]:![];}else return Object[_0x1893(0x1b)](_0x117902)[_0x1893(0x1c)](Boolean)[_0x1893(0x33)];};return React[_0x1893(0x26)](View,{'style':styles['container']},React[_0x1893(0x26)](Text,{'style':styles[_0x1893(0x34)]},_0x1893(0x35)),React[_0x1893(0x26)](Text,{'style':styles['subtitle']},_0x3a0a4f[_0x1893(0x36)]),React[_0x1893(0x26)](ScrollView,{'style':styles[_0x1893(0x37)]},Object[_0x1893(0x38)](PLATFORMS)[_0x1893(0x39)](_0x8acfcf=>{const _0x178024={'BsucW':function(_0x17b2e0,_0x1b64d2){return _0x3a0a4f[_0x1893(0x1d)](_0x17b2e0,_0x1b64d2);}};if(_0x3a0a4f['RfpbI'](_0x3a0a4f[_0x1893(0x3a)],_0x3a0a4f['WPzFb'])){var _0x186acb;const _0x21ef20=PLATFORMS[_0x8acfcf],_0x11c0df=_0x3a0a4f[_0x1893(0x18)](_0x54da75,_0x8acfcf),_0x1b44a8=_0x11c0df?_0x3a0a4f['Nuodc'](_0x186acb=_0x117902[_0x8acfcf],null)||_0x3a0a4f['iWzlT'](_0x186acb,void 0x0)?void 0x0:_0x186acb[_0x1893(0x25)]:null;return React['createElement'](View,{'key':_0x8acfcf,'style':styles[_0x1893(0x3b)]},React[_0x1893(0x26)](View,{'style':styles[_0x1893(0x27)]},React[_0x1893(0x26)](View,{'style':[styles[_0x1893(0x3c)],{'backgroundColor':_0x21ef20[_0x1893(0x3d)]}]},React[_0x1893(0x26)](_0x567cb3,{'name':_0x21ef20[_0x1893(0x28)],'size':0x18,'color':_0x3a0a4f[_0x1893(0x3e)]})),React['createElement'](View,{'style':styles[_0x1893(0x29)]},React[_0x1893(0x26)](Text,{'style':styles[_0x1893(0x3f)]},_0x21ef20['name']),React['createElement'](Text,{'style':styles['platformDescription']},_0x11c0df?'Connected\x20as\x20'+_0x1b44a8:_0x21ef20[_0x1893(0x2b)]))),React[_0x1893(0x26)](TouchableOpacity,{'style':[styles[_0x1893(0x2c)],_0x11c0df?styles[_0x1893(0x2d)]:styles[_0x1893(0x2e)]],'onPress':()=>_0x11c0df?_0x223a52(_0x8acfcf):_0x429df3(_0x8acfcf),'disabled':_0x286a52},_0x286a52?React[_0x1893(0x26)](ActivityIndicator,{'size':_0x3a0a4f[_0x1893(0x40)],'color':_0x3a0a4f['iWrUZ']}):React['createElement'](Text,{'style':styles['buttonText']},_0x11c0df?_0x3a0a4f['LEUdt']:_0x1893(0x41))));}else _0x178024[_0x1893(0x42)](_0xb0f3f6,_0x2d8182);})),React[_0x1893(0x26)](View,{'style':styles[_0x1893(0x43)]},React['createElement'](Text,{'style':styles[_0x1893(0x44)]},_0x3a0a4f[_0x1893(0x45)](_0x46f7c9),_0x3a0a4f['mKDXo'],Object[_0x1893(0x38)](PLATFORMS)[_0x1893(0x33)],_0x3a0a4f['OFqGC']),React[_0x1893(0x26)](TouchableOpacity,{'style':[styles[_0x1893(0x46)],_0x1a2751?styles[_0x1893(0x47)]:styles[_0x1893(0x48)]],'onPress':_0x484e1e,'disabled':!_0x1a2751},React[_0x1893(0x26)](Text,{'style':[styles[_0x1893(0x49)],_0x1a2751?styles['proceedTextActive']:styles[_0x1893(0x4a)]]},_0x3a0a4f[_0x1893(0x4b)]),React[_0x1893(0x26)](_0x567cb3,{'name':_0x3a0a4f['ncQMZ'],'size':0x14,'color':_0x1a2751?_0x3a0a4f[_0x1893(0x3e)]:'#999'}))),_0x46407c&&React[_0x1893(0x26)](OAuthWebView,{'url':'https://oauth.example.com/'+_0x46407c,'platform':_0x46407c,'onComplete':_0x3fedb8,'onClose':_0x4e42c5,'onSuccess':_0xd25fc8=>{console[_0x1893(0x4c)](_0x1893(0x4d)+_0x46407c+':\x20'+_0xd25fc8),_0x3fedb8();}}));};const styles=StyleSheet['create']({'container':{'flex':0x1,'padding':0x10},'title':{'fontSize':0x18,'fontWeight':'bold','marginBottom':0x8,'color':_0x1893(0x4e)},'subtitle':{'fontSize':0x10,'color':_0x1893(0x4f),'marginBottom':0x18},'platformList':{'flex':0x1},'platformItem':{'flexDirection':_0x1893(0x50),'alignItems':'center','marginBottom':0x10,'padding':0xc,'backgroundColor':'#f8f8f8','borderRadius':0xc,'borderWidth':0x1,'borderColor':_0x1893(0x51)},'platformInfo':{'flex':0x1,'flexDirection':_0x1893(0x50),'alignItems':'center'},'platformIcon':{'width':0x28,'height':0x28,'borderRadius':0x14,'justifyContent':_0x1893(0x52),'alignItems':_0x1893(0x52),'marginRight':0xc},'platformText':{'flex':0x1},'platformName':{'fontSize':0x10,'fontWeight':_0x1893(0x53),'marginBottom':0x4,'color':_0x1893(0x4e)},'platformDescription':{'fontSize':0xe,'color':_0x1893(0x4f)},'platformButton':{'paddingHorizontal':0x10,'paddingVertical':0x8,'borderRadius':0x14,'justifyContent':_0x1893(0x52),'alignItems':_0x1893(0x52),'minWidth':0x64},'connectButton':{'backgroundColor':COLORS[_0x1893(0x54)]},'disconnectButton':{'backgroundColor':_0x1893(0x55)},'buttonText':{'color':_0x1893(0x12),'fontWeight':_0x1893(0x53)},'footer':{'flexDirection':_0x1893(0x50),'alignItems':_0x1893(0x52),'justifyContent':_0x1893(0x56),'paddingTop':0x10,'borderTopWidth':0x1,'borderTopColor':_0x1893(0x51),'marginTop':0x10},'connectionStatus':{'fontSize':0xe,'color':_0x1893(0x4f)},'proceedButton':{'flexDirection':_0x1893(0x50),'alignItems':'center','paddingHorizontal':0x10,'paddingVertical':0xa,'borderRadius':0x18},'proceedActive':{'backgroundColor':COLORS[_0x1893(0x54)]},'proceedInactive':{'backgroundColor':_0x1893(0x51)},'proceedText':{'fontWeight':'600','marginRight':0x8},'proceedTextActive':{'color':_0x1893(0x12)},'proceedTextInactive':{'color':_0x1893(0x57)}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _0x26e1(_0x519907,_0x26e198){_0x519907=_0x519907-0x0;const _0x15d960=_0x5199();let _0x582cd6=_0x15d960[_0x519907];return _0x582cd6;}function _0x5199(){const _0x3b5b28=['/auth','/connections','/training','/oauth','Bearer\x20','bNYIF'];_0x5199=function(){return _0x3b5b28;};return _0x5199();}import{getAuthToken}from'../services/authService';export const API_CONFIG={'BASE_URL':'https://api2.onairos.uk','ENDPOINTS':{'AUTH':_0x26e1(0x0),'USER':'/user','CONNECTIONS':_0x26e1(0x1),'TRAINING':_0x26e1(0x2),'OAUTH':_0x26e1(0x3)},'TIMEOUT':0x7530};export const getApiHeaders=()=>({'Content-Type':'application/json','Accept':'application/json'});export const getAuthHeaders=_0x17faa9=>({...getApiHeaders(),..._0x17faa9&&{'Authorization':_0x26e1(0x4)+_0x17faa9}});export const getUserAuthHeaders=async()=>{const _0x505652={'bNYIF':function(_0x53bc09){return _0x53bc09();}},_0x1ee606=await getAuthToken();if(!_0x1ee606)throw new Error('User\x20not\x20authenticated\x20-\x20no\x20JWT\x20token\x20found');return{..._0x505652[_0x26e1(0x5)](getApiHeaders),'Authorization':_0x26e1(0x4)+_0x1ee606};};
|