@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,77 +1 @@
|
|
|
1
|
-
export const COLORS = {
|
|
2
|
-
primary: '#1BA9D4',
|
|
3
|
-
headerBg: '#F8F9FA',
|
|
4
|
-
text: {
|
|
5
|
-
primary: '#000000',
|
|
6
|
-
secondary: '#666666'
|
|
7
|
-
},
|
|
8
|
-
border: '#E5E5E5',
|
|
9
|
-
success: '#34C759',
|
|
10
|
-
error: '#FF3B30',
|
|
11
|
-
instagram: '#E1306C',
|
|
12
|
-
pinterest: '#E60023',
|
|
13
|
-
reddit: '#FF4500',
|
|
14
|
-
youtube: '#FF0000',
|
|
15
|
-
white: '#FFFFFF',
|
|
16
|
-
black: '#000000',
|
|
17
|
-
gray: '#666666',
|
|
18
|
-
lightGray: '#E5E5E5'
|
|
19
|
-
};
|
|
20
|
-
export const PLATFORMS = {
|
|
21
|
-
instagram: {
|
|
22
|
-
name: 'Instagram',
|
|
23
|
-
icon: 'instagram',
|
|
24
|
-
color: COLORS.instagram,
|
|
25
|
-
description: 'Connect your Instagram account to train your AI model'
|
|
26
|
-
},
|
|
27
|
-
pinterest: {
|
|
28
|
-
name: 'Pinterest',
|
|
29
|
-
icon: 'pinterest',
|
|
30
|
-
color: COLORS.pinterest,
|
|
31
|
-
description: 'Use your Pinterest boards for AI training'
|
|
32
|
-
},
|
|
33
|
-
reddit: {
|
|
34
|
-
name: 'Reddit',
|
|
35
|
-
icon: 'reddit',
|
|
36
|
-
color: COLORS.reddit,
|
|
37
|
-
description: 'Connect Reddit to enhance your AI model'
|
|
38
|
-
},
|
|
39
|
-
youtube: {
|
|
40
|
-
name: 'YouTube',
|
|
41
|
-
icon: 'youtube',
|
|
42
|
-
color: COLORS.youtube,
|
|
43
|
-
description: 'Use YouTube data to improve AI recommendations'
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
export const API_ENDPOINTS = {
|
|
47
|
-
base: 'https://api2.onairos.uk',
|
|
48
|
-
oauth: {
|
|
49
|
-
instagram: '/instagram/auth',
|
|
50
|
-
pinterest: '/pinterest/auth',
|
|
51
|
-
reddit: '/reddit/auth',
|
|
52
|
-
youtube: '/youtube/auth'
|
|
53
|
-
},
|
|
54
|
-
callback: {
|
|
55
|
-
instagram: '/instagram/callback',
|
|
56
|
-
pinterest: '/pinterest/callback',
|
|
57
|
-
reddit: '/reddit/callback',
|
|
58
|
-
youtube: '/youtube/callback'
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
export const STORAGE_KEYS = {
|
|
62
|
-
credentials: 'onairos_credentials',
|
|
63
|
-
connections: 'onairos_connections'
|
|
64
|
-
};
|
|
65
|
-
export const PIN_REQUIREMENTS = {
|
|
66
|
-
minLength: 8,
|
|
67
|
-
requireUppercase: true,
|
|
68
|
-
requireLowercase: true,
|
|
69
|
-
requireNumber: true,
|
|
70
|
-
requireSpecialChar: true
|
|
71
|
-
};
|
|
72
|
-
export const DEEP_LINK_CONFIG = {
|
|
73
|
-
scheme: 'onairosanime',
|
|
74
|
-
host: 'authenticate',
|
|
75
|
-
redirectUri: 'onairosanime://auth/'
|
|
76
|
-
};
|
|
77
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import{API_CONFIG}from'../config/api';export const COLORS={'primary':'#1BA9D4','headerBg':_0x35f8(0x0),'text':{'primary':_0x35f8(0x1),'secondary':_0x35f8(0x2)},'border':_0x35f8(0x3),'success':_0x35f8(0x4),'error':_0x35f8(0x5),'instagram':'#E1306C','pinterest':_0x35f8(0x6),'reddit':'#FF4500','youtube':_0x35f8(0x7),'chatgpt':_0x35f8(0x8),'llm':_0x35f8(0x8),'white':_0x35f8(0x9),'black':'#000000','gray':_0x35f8(0x2),'lightGray':'#E5E5E5'};export const PLATFORMS={'instagram':{'name':'Instagram','icon':_0x35f8(0xa),'color':COLORS['instagram'],'description':_0x35f8(0xb)},'pinterest':{'name':_0x35f8(0xc),'icon':_0x35f8(0xd),'color':COLORS[_0x35f8(0xd)],'description':'Use\x20your\x20Pinterest\x20boards\x20for\x20AI\x20training'},'reddit':{'name':_0x35f8(0xe),'icon':_0x35f8(0xf),'color':COLORS[_0x35f8(0xf)],'description':_0x35f8(0x10)},'youtube':{'name':_0x35f8(0x11),'icon':_0x35f8(0x12),'color':COLORS[_0x35f8(0x12)],'description':_0x35f8(0x13)},'chatgpt':{'name':_0x35f8(0x14),'icon':_0x35f8(0x15),'color':COLORS[_0x35f8(0x16)],'description':_0x35f8(0x17)},'llm':{'name':_0x35f8(0x18),'icon':'psychology','color':COLORS[_0x35f8(0x19)],'description':_0x35f8(0x1a)}};function _0x1f5c(){const _0x569a25=['#F8F9FA','#000000','#666666','#E5E5E5','#34C759','#FF3B30','#E60023','#FF0000','#10A37F','#FFFFFF','instagram','Connect\x20your\x20Instagram\x20account\x20to\x20train\x20your\x20AI\x20model','Pinterest','pinterest','Reddit','reddit','Connect\x20Reddit\x20to\x20enhance\x20your\x20AI\x20model','YouTube','youtube','Use\x20YouTube\x20data\x20to\x20improve\x20AI\x20recommendations','ChatGPT','chat','chatgpt','Connect\x20your\x20ChatGPT\x20conversations\x20for\x20AI\x20insights','LLM\x20Data','llm','Connect\x20your\x20AI\x20conversation\x20data','/pinterest/auth','/reddit/auth','/youtube/auth','/chatgpt/auth','/instagram/callback','/pinterest/callback','/reddit/callback','/youtube/callback','/chatgpt/callback','/llmdata','onairos_credentials','onairos_connections'];_0x1f5c=function(){return _0x569a25;};return _0x1f5c();}export const API_ENDPOINTS={'base':API_CONFIG['BASE_URL'],'oauth':{'instagram':'/instagram/auth','pinterest':_0x35f8(0x1b),'reddit':_0x35f8(0x1c),'youtube':_0x35f8(0x1d),'chatgpt':_0x35f8(0x1e),'llm':_0x35f8(0x1e)},'callback':{'instagram':_0x35f8(0x1f),'pinterest':_0x35f8(0x20),'reddit':_0x35f8(0x21),'youtube':_0x35f8(0x22),'chatgpt':_0x35f8(0x23),'llm':_0x35f8(0x23)},'llm':{'dataIngest':_0x35f8(0x24),'dataRequest':'/llmdata/request'}};export const STORAGE_KEYS={'credentials':_0x35f8(0x25),'connections':_0x35f8(0x26)};export const PIN_REQUIREMENTS={'minLength':0x8,'requireUppercase':!![],'requireLowercase':!![],'requireNumber':!![],'requireSpecialChar':!![]};function _0x35f8(_0x1f5c82,_0x35f884){_0x1f5c82=_0x1f5c82-0x0;const _0x93dd16=_0x1f5c();let _0x1965b6=_0x93dd16[_0x1f5c82];return _0x1965b6;}export const DEEP_LINK_CONFIG={'scheme':'onairosanime','host':'authenticate','redirectUri':'onairosanime://auth/'};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import React,{createContext,useState,useEffect,useContext}from'react';import AsyncStorage from'@react-native-async-storage/async-storage';function _0x4480(){const _0x33375f=['Failed\x20to\x20delete\x20account:','💾\x20Network\x20unreachable,\x20trusting\x20local\x20authentication\x20state','TQUWb','🎯\x20Found\x20event\x20access\x20token\x20-\x20user\x20has\x20completed\x20onboarding,\x20authentication\x20confirmed','oHeCz','oYhux','HLbJO','ctXlM','UHFzQ','XnJHg','xDBIB','Failed\x20to\x20fetch\x20user\x20profile:','401','fygos','Onairos\x20User','tMLoe','onboardingCompleted','AaBlZ','Failed\x20to\x20load\x20authentication\x20state:','user','Failed\x20to\x20save\x20user\x20data:','5|4|1|2|0|3','auth_method','oarbQ','lastConnectedAt','🔗\x20Stored\x20Onairos\x20connection\x20status:','🔗\x20No\x20Onairos\x20connection\x20info\x20from\x20backend,\x20defaulting\x20to\x20false','🍎\x20Apple\x20sign-in\x20completed\x20-\x20auth_method\x20set\x20to\x20\x22apple\x22','Apple\x20sign-in\x20failed:','daTit','HzYvr','Failed\x20to\x20update\x20user\x20data:','Failed\x20to\x20remove\x20user\x20data:','HPkBc','hpWWF','LtEKJ','Failed\x20to\x20complete\x20onboarding:','qUbOv','Failed\x20to\x20update\x20onboarded\x20status:','gIVzh','fZVBv','SMphD','gMZnL','nIckF','error','rhfVE','nZDuD','useAuth\x20must\x20be\x20used\x20within\x20an\x20AuthProvider','XQJlt','Rwdsd','getItem','log','gUYDf','parse','HPwLr','orcQP','xwKjT','sjoqS','GqGxo','xGmUW','bxcFZ','yRMWR','fDKaW','egUoq','uPEla','zneKy','jJphY','AyxED','PQjmL','message','includes','403','🌐\x20Profile\x20fetch\x20failed\x20(likely\x20network),\x20keeping\x20authentication\x20state','warn','ASVcT','diDDT','SEFqH','user@onairos.com','setItem','yOPeF','jJsZG','NolYj','true','gtakx','ieejE','yCEGX','stringify','email','XjEbp','onairos','name','lmGeC','YNCRz','DCIJg','dgxlE','VQlBi','token','hasConnectedOnairos','toString','onairosUserId','fuFls','pTzLh','PDFhj','rNXef','Lrggx','PytDR','ewxxY','profilePicture','MRQZl','wVRIW','kgloF','GEgDh','bZTve','xHqAp','split','yEvTe','rsJph','MLTrK','FrPQb','dtjsL','gCZFg','mnzMu','IOJkK','CssGA','OlvQg','MOLyT','ApyQL','WVbUG','WZMsC','foCZo','ggKjE','EMcvi','xZzJU','BSXEi','jLwGi','NOARC','jxVjY','SwcxW','BdiJZ','KCRgo','gKDOY','ohbef','removeItem','createElement','Provider','qwCyR','Cczyc'];_0x4480=function(){return _0x33375f;};return _0x4480();}import{saveAuthToken,getAuthToken,removeAuthToken,verifyToken,getUserProfile,authenticateWithApple,authenticateWithOnairos,updateUserOnboardedStatus}from'../services/authService';import{saveAuthState,clearUserData,getResumeTarget,markStepCompleted,updateLastScreen,isReturningUser,markEventPageReached,hasEventAccessToken}from'../services/storageService';function _0x1ec2(_0x4480af,_0x1ec2d9){_0x4480af=_0x4480af-0x0;const _0x4ef89e=_0x4480();let _0x5d54af=_0x4ef89e[_0x4480af];return _0x5d54af;}const AuthContext=createContext(undefined);export const AuthProvider=({children:_0x267eac})=>{const _0x39e2b5={'rhfVE':_0x1ec2(0x0),'nZDuD':'🌐\x20Network\x20verification\x20failed,\x20using\x20local\x20token\x20validation:','bxcFZ':_0x1ec2(0x1),'XQJlt':function(_0x18efae,_0x2a613d){return _0x18efae!==_0x2a613d;},'GhWUz':_0x1ec2(0x2),'orcQP':function(_0x54b546){return _0x54b546();},'wDdwD':function(_0x21cbcf,_0x30f5f1){return _0x21cbcf&&_0x30f5f1;},'gUYDf':_0x1ec2(0x3),'gMZnL':function(_0x3a1f32,_0xc544c6){return _0x3a1f32(_0xc544c6);},'KwrqC':_0x1ec2(0x4),'HPwLr':_0x1ec2(0x5),'xwKjT':function(_0x4196b3,_0x1606fa){return _0x4196b3!==_0x1606fa;},'sjoqS':_0x1ec2(0x6),'yRMWR':function(_0x1e37c6,_0x11f2e4){return _0x1e37c6===_0x11f2e4;},'wOfcL':_0x1ec2(0x7),'UWPfm':'wPwuL','uPEla':function(_0x48fc23,_0x4afbab){return _0x48fc23!==_0x4afbab;},'egUoq':_0x1ec2(0x8),'zneKy':_0x1ec2(0x9),'jJphY':_0x1ec2(0xa),'AyxED':_0x1ec2(0xb),'PQjmL':function(_0x109766,_0x2e68bb){return _0x109766 instanceof _0x2e68bb;},'RaDrU':_0x1ec2(0xc),'UdGDy':_0x1ec2(0xd),'NvdkS':'offline_user','SEFqH':_0x1ec2(0xe),'yOPeF':_0x1ec2(0xf),'gtakx':function(_0x344874){return _0x344874();},'NolYj':_0x1ec2(0x10),'nIckF':_0x1ec2(0x11),'ieejE':_0x1ec2(0x12),'kgloF':function(_0x1b21a8,_0x191c54){return _0x1b21a8===_0x191c54;},'yCEGX':'pDuGk','MRQZl':_0x1ec2(0x13),'XjEbp':'apple','DGpKg':'authentication','YNCRz':_0x1ec2(0x14),'dgxlE':function(_0x5f27c8,_0x3b8561){return _0x5f27c8(_0x3b8561);},'DCIJg':_0x1ec2(0x15),'VQlBi':function(_0x2dd8fd,_0xc597fa){return _0x2dd8fd(_0xc597fa);},'hArPd':_0x1ec2(0x16),'fuFls':function(_0x4b0a5b,_0x4b1862){return _0x4b0a5b===_0x4b1862;},'pTzLh':_0x1ec2(0x17),'PDFhj':'sXUSM','vWZFq':'onairosUserId','rNXef':_0x1ec2(0x18),'Lrggx':_0x1ec2(0x19),'PytDR':'hasConnectedOnairos','ewxxY':'false','GgVpx':_0x1ec2(0x1a),'SMphD':function(_0x31f92b,_0x553194){return _0x31f92b(_0x553194);},'wVRIW':_0x1ec2(0x1b),'GEgDh':'liNIS','bZTve':_0x1ec2(0x1c),'MLTrK':function(_0xb78629,_0x4497bc){return _0xb78629(_0x4497bc);},'dtjsL':function(_0x59d4e9,_0x59db37){return _0x59d4e9(_0x59db37);},'FrPQb':_0x1ec2(0x1d),'gCZFg':function(_0x16e343,_0x2fd63a){return _0x16e343(_0x2fd63a);},'mnzMu':'🔑\x20Onairos\x20sign-in\x20completed\x20-\x20auth_method\x20set\x20to\x20\x22onairos\x22','IOJkK':'Onairos\x20sign-in\x20failed:','CssGA':_0x1ec2(0x1e),'ApyQL':_0x1ec2(0x1f),'EFebA':_0x1ec2(0x20),'MOLyT':_0x1ec2(0x21),'WVbUG':function(_0x5dfb23,_0x2828fe){return _0x5dfb23===_0x2828fe;},'WZMsC':_0x1ec2(0x22),'EHIyJ':function(_0x5c2a3c){return _0x5c2a3c();},'foCZo':function(_0x431da2,_0x28aa6d){return _0x431da2(_0x28aa6d);},'ggKjE':function(_0x25c240,_0x16e7a7){return _0x25c240(_0x16e7a7);},'xZzJU':_0x1ec2(0x23),'tSGIy':_0x1ec2(0x24),'jLwGi':function(_0x33c45a,_0x515a3f){return _0x33c45a!==_0x515a3f;},'NOARC':'zlzZc','jxVjY':function(_0x50e22d,_0x495874){return _0x50e22d(_0x495874);},'fZVBv':function(_0x3173ce,_0x3ac86f){return _0x3173ce(_0x3ac86f);},'fWADi':function(_0xfec12a){return _0xfec12a();},'SwcxW':function(_0x217c81,_0x26530c){return _0x217c81!==_0x26530c;},'BdiJZ':_0x1ec2(0x25),'gKDOY':_0x1ec2(0x26),'ohbef':function(_0xa9eeb4,_0x25e611){return _0xa9eeb4(_0x25e611);},'SUqSc':function(_0x46922f,_0x1b35cc){return _0x46922f(_0x1b35cc);},'gIVzh':function(_0x18b833,_0x35b106){return _0x18b833(_0x35b106);}},[_0x16932c,_0x4de386]=_0x39e2b5['SUqSc'](useState,null),[_0x34a2a7,_0x2785b5]=_0x39e2b5[_0x1ec2(0x27)](useState,!![]),[_0x65fc12,_0x141e2b]=_0x39e2b5[_0x1ec2(0x28)](useState,![]),[_0x5a59c7,_0x437415]=_0x39e2b5[_0x1ec2(0x29)](useState,![]);useEffect(()=>{const _0x156641={'VXMFy':'💾\x20Network\x20unreachable,\x20trusting\x20local\x20authentication\x20state','GqGxo':function(_0x45e834,_0xba8877){return _0x45e834(_0xba8877);},'xGmUW':function(_0x1c117d,_0x37910a){return _0x39e2b5['yRMWR'](_0x1c117d,_0x37910a);},'fDKaW':function(_0x595b8c,_0x29cfcd){return _0x39e2b5[_0x1ec2(0x2a)](_0x595b8c,_0x29cfcd);},'jJsZG':_0x1ec2(0x1c)};if(_0x39e2b5[_0x1ec2(0x2b)]!==_0x39e2b5[_0x1ec2(0x2b)]){_0x14550f[_0x1ec2(0x2c)](_0x39e2b5[_0x1ec2(0x2d)],_0x4d1291);throw _0x53c348;}else{const _0x155b3c=async()=>{const _0x823237={'Rwdsd':_0x1ec2(0x24),'ASVcT':_0x39e2b5[_0x1ec2(0x2e)],'diDDT':_0x39e2b5['bxcFZ'],'segTS':_0x1ec2(0x2f)};try{if(_0x39e2b5[_0x1ec2(0x30)](_0x39e2b5['GhWUz'],'TQUWb')){_0x15dff4[_0x1ec2(0x2c)](_0x823237[_0x1ec2(0x31)],_0x2c3d36);throw _0x3f59c7;}else{const _0x1105d0=await _0x39e2b5['orcQP'](hasEventAccessToken),_0x329df2=await AsyncStorage[_0x1ec2(0x32)](_0x1ec2(0x13));if(_0x39e2b5['wDdwD'](_0x1105d0,_0x329df2)){console[_0x1ec2(0x33)](_0x39e2b5[_0x1ec2(0x34)]),_0x4de386(JSON[_0x1ec2(0x35)](_0x329df2)),_0x39e2b5['gMZnL'](_0x437415,!![]),_0x39e2b5['gMZnL'](_0x141e2b,!![]),_0x39e2b5['gMZnL'](_0x2785b5,![]);return;}const _0x3cdc6b=await getAuthToken();if(_0x3cdc6b){if(_0x39e2b5['KwrqC']===_0x1ec2(0x4)){let _0x343690=![];try{_0x39e2b5[_0x1ec2(0x36)]!==_0x39e2b5['HPwLr']?(_0x18f50c[_0x1ec2(0x33)](_0x156641['VXMFy']),_0x56377a=!![]):_0x343690=await _0x39e2b5[_0x1ec2(0x37)](verifyToken);}catch(_0x5c41e9){if(_0x39e2b5[_0x1ec2(0x38)](_0x39e2b5[_0x1ec2(0x39)],_0x39e2b5['sjoqS'])){const _0xb484e1=_0x156641[_0x1ec2(0x3a)](useContext,_0x5937be);if(_0x156641[_0x1ec2(0x3b)](_0xb484e1,_0x56cfe9))throw new _0xe664fa(_0x1ec2(0x2f));return _0xb484e1;}else console['warn'](_0x39e2b5[_0x1ec2(0x2e)],_0x5c41e9),_0x329df2&&(console[_0x1ec2(0x33)](_0x39e2b5[_0x1ec2(0x3c)]),_0x343690=!![]);}if(_0x343690){if(_0x39e2b5[_0x1ec2(0x3d)](_0x39e2b5['wOfcL'],_0x39e2b5['UWPfm']))_0x156641[_0x1ec2(0x3e)](_0xb40ca,_0x40d43f['parse'](_0x18c1d8)),_0x156641[_0x1ec2(0x3e)](_0x40d877,!![]);else{if(_0x329df2){if(_0x39e2b5['uPEla']('UHFzQ',_0x39e2b5[_0x1ec2(0x3f)])){_0x3adb8c[_0x1ec2(0x2c)](_0x1ec2(0x26),_0x4d097b);throw _0x26669e;}else _0x39e2b5[_0x1ec2(0x2a)](_0x4de386,JSON[_0x1ec2(0x35)](_0x329df2)),_0x39e2b5['gMZnL'](_0x437415,!![]);}else{if(_0x39e2b5[_0x1ec2(0x40)](_0x39e2b5[_0x1ec2(0x41)],_0x39e2b5[_0x1ec2(0x42)]))try{const _0x1cadee=await getUserProfile();await AsyncStorage['setItem']('user',JSON['stringify'](_0x1cadee)),_0x39e2b5[_0x1ec2(0x2a)](_0x4de386,_0x1cadee),_0x39e2b5[_0x1ec2(0x2a)](_0x437415,!![]);}catch(_0x553455){console[_0x1ec2(0x2c)](_0x39e2b5[_0x1ec2(0x43)],_0x553455);const _0x55ef83=_0x39e2b5[_0x1ec2(0x44)](_0x553455,Error)?_0x553455[_0x1ec2(0x45)]:_0x39e2b5[_0x1ec2(0x2a)](String,_0x553455);if(_0x55ef83[_0x1ec2(0x46)](_0x39e2b5['RaDrU'])||_0x55ef83[_0x1ec2(0x46)](_0x1ec2(0x47)))await _0x39e2b5[_0x1ec2(0x37)](removeAuthToken);else{console[_0x1ec2(0x33)](_0x1ec2(0x48));if(_0x3cdc6b){if(_0x39e2b5[_0x1ec2(0x30)](_0x39e2b5['UdGDy'],_0x39e2b5['UdGDy']))_0x291d55[_0x1ec2(0x49)](_0x823237[_0x1ec2(0x4a)],_0x46db62),_0x39d287&&(_0x29c92d[_0x1ec2(0x33)](_0x823237[_0x1ec2(0x4b)]),_0x28430f=!![]);else{const _0x4e70c2={'id':_0x39e2b5['NvdkS'],'name':_0x39e2b5[_0x1ec2(0x4c)],'email':_0x1ec2(0x4d),'onboarded':![]};await AsyncStorage[_0x1ec2(0x4e)](_0x1ec2(0x13),JSON['stringify'](_0x4e70c2)),_0x39e2b5[_0x1ec2(0x2a)](_0x4de386,_0x4e70c2),_0x39e2b5[_0x1ec2(0x2a)](_0x437415,!![]);}}}}else throw new _0x4b14ef(_0x823237['segTS']);}}}else _0x39e2b5['yRMWR'](_0x39e2b5[_0x1ec2(0x4f)],_0x1ec2(0xf))?await _0x39e2b5['gtakx'](removeAuthToken):_0x2ad39c(![]);}else{_0x633247[_0x1ec2(0x2c)](_0x156641[_0x1ec2(0x50)],_0x5977d5);throw _0x2f9ccd;}}const _0x21fe4b=await AsyncStorage[_0x1ec2(0x32)](_0x39e2b5[_0x1ec2(0x51)]);_0x39e2b5[_0x1ec2(0x3d)](_0x21fe4b,_0x1ec2(0x52))&&_0x141e2b(!![]);}}catch(_0x23c7ca){console['error'](_0x1ec2(0x12),_0x23c7ca);}finally{_0x2785b5(![]);}};_0x39e2b5[_0x1ec2(0x53)](_0x155b3c);}},[]);const _0x514a43=async _0x43bc71=>{const _0x3e8d6a={'lmGeC':_0x39e2b5[_0x1ec2(0x54)]};try{if(_0x39e2b5['kgloF'](_0x39e2b5['yCEGX'],_0x39e2b5[_0x1ec2(0x55)])){var _0x2589fc;const _0x51b4d4={..._0x43bc71,'onboarded':![]};await AsyncStorage['setItem'](_0x39e2b5['MRQZl'],JSON[_0x1ec2(0x56)](_0x51b4d4)),_0x4de386(_0x51b4d4),_0x437415(!![]),await _0x39e2b5[_0x1ec2(0x2a)](saveAuthState,{'isAuthenticated':!![],'authMethod':(_0x2589fc=_0x43bc71[_0x1ec2(0x57)])!==null&&_0x39e2b5['xwKjT'](_0x2589fc,void 0x0)&&_0x2589fc['includes'](_0x39e2b5[_0x1ec2(0x58)])?_0x39e2b5['XjEbp']:_0x1ec2(0x59),'hasValidToken':!![],'userEmail':_0x43bc71[_0x1ec2(0x57)],'userName':_0x43bc71[_0x1ec2(0x5a)]}),await markStepCompleted(_0x39e2b5['DGpKg']),console[_0x1ec2(0x33)]('User\x20logged\x20in\x20with\x20onboarded=false:',_0x51b4d4);}else _0x2ccc8d[_0x1ec2(0x2c)](_0x3e8d6a[_0x1ec2(0x5b)],_0x494efb);}catch(_0x4df72e){console[_0x1ec2(0x2c)](_0x39e2b5[_0x1ec2(0x5c)],_0x4df72e);}},_0x497114=async _0x1db626=>{const _0x4efb56={'xHqAp':_0x39e2b5[_0x1ec2(0x5d)],'yEvTe':function(_0x4b4b47,_0xe59fb8){return _0x39e2b5['VQlBi'](_0x4b4b47,_0xe59fb8);},'rsJph':_0x39e2b5[_0x1ec2(0x34)]};try{_0x39e2b5[_0x1ec2(0x5e)](_0x2785b5,!![]);const _0x57f3db=await _0x39e2b5[_0x1ec2(0x5f)](authenticateWithApple,_0x1db626);await _0x39e2b5[_0x1ec2(0x5f)](saveAuthToken,_0x57f3db[_0x1ec2(0x60)]),await AsyncStorage[_0x1ec2(0x4e)](_0x39e2b5['hArPd'],_0x39e2b5[_0x1ec2(0x58)]);_0x57f3db[_0x1ec2(0x59)]?(await AsyncStorage[_0x1ec2(0x4e)](_0x1ec2(0x61),_0x57f3db['onairos'][_0x1ec2(0x61)][_0x1ec2(0x62)]()),_0x57f3db[_0x1ec2(0x59)][_0x1ec2(0x63)]&&(_0x39e2b5[_0x1ec2(0x64)](_0x39e2b5[_0x1ec2(0x65)],_0x39e2b5[_0x1ec2(0x66)])?_0x39e2b5['dgxlE'](_0x5c67df,![]):await AsyncStorage[_0x1ec2(0x4e)](_0x39e2b5['vWZFq'],_0x57f3db['onairos']['onairosUserId'])),_0x57f3db[_0x1ec2(0x59)][_0x1ec2(0x18)]&&await AsyncStorage[_0x1ec2(0x4e)](_0x39e2b5[_0x1ec2(0x67)],_0x57f3db[_0x1ec2(0x59)][_0x1ec2(0x18)]),console[_0x1ec2(0x33)](_0x39e2b5[_0x1ec2(0x68)],_0x57f3db[_0x1ec2(0x59)][_0x1ec2(0x61)])):(await AsyncStorage[_0x1ec2(0x4e)](_0x39e2b5[_0x1ec2(0x69)],_0x39e2b5[_0x1ec2(0x6a)]),console[_0x1ec2(0x33)](_0x39e2b5['GgVpx']));const _0x5b72cc={'id':_0x57f3db['user']['id'],'name':_0x57f3db[_0x1ec2(0x13)][_0x1ec2(0x5a)]||_0x39e2b5['SEFqH'],'email':_0x57f3db['user']['email'],'profilePicture':_0x57f3db[_0x1ec2(0x13)][_0x1ec2(0x6b)],'onboarded':![]};return await AsyncStorage[_0x1ec2(0x4e)](_0x39e2b5[_0x1ec2(0x6c)],JSON[_0x1ec2(0x56)](_0x5b72cc)),_0x39e2b5['SMphD'](_0x4de386,_0x5b72cc),_0x437415(!![]),console[_0x1ec2(0x33)](_0x39e2b5[_0x1ec2(0x6d)]),_0x5b72cc;}catch(_0x43492c){if(_0x39e2b5[_0x1ec2(0x6e)](_0x39e2b5[_0x1ec2(0x6f)],_0x39e2b5[_0x1ec2(0x6f)])){console[_0x1ec2(0x2c)](_0x39e2b5[_0x1ec2(0x70)],_0x43492c);throw _0x43492c;}else{const _0x512dc5=_0x4efb56[_0x1ec2(0x71)][_0x1ec2(0x72)]('|');let _0x6eb333=0x0;while(!![]){switch(_0x512dc5[_0x6eb333++]){case'0':_0x4efb56[_0x1ec2(0x73)](_0x1aa2a2,![]);continue;case'1':_0x36c04c(!![]);continue;case'2':_0x8c70ef(!![]);continue;case'3':return;case'4':_0x4efb56[_0x1ec2(0x73)](_0x2ea642,_0x2debe8[_0x1ec2(0x35)](_0x47429c));continue;case'5':_0x3d8a10[_0x1ec2(0x33)](_0x4efb56[_0x1ec2(0x74)]);continue;}break;}}}finally{_0x39e2b5[_0x1ec2(0x75)](_0x2785b5,![]);}},_0x4a5684=async _0x47ab72=>{const _0x575912={'OlvQg':'Onairos\x20sign-in\x20failed:'};if(_0x39e2b5[_0x1ec2(0x38)]('ucDWb',_0x39e2b5[_0x1ec2(0x76)]))try{_0x2785b5(!![]);const _0x2d9310=await _0x39e2b5[_0x1ec2(0x29)](authenticateWithOnairos,_0x47ab72);await _0x39e2b5[_0x1ec2(0x77)](saveAuthToken,_0x2d9310[_0x1ec2(0x60)]),await AsyncStorage[_0x1ec2(0x4e)](_0x1ec2(0x16),_0x1ec2(0x59));const _0x266771={'id':_0x2d9310['user']['id'],'name':_0x2d9310['user'][_0x1ec2(0x5a)]||_0x39e2b5[_0x1ec2(0x4c)],'email':_0x2d9310[_0x1ec2(0x13)][_0x1ec2(0x57)],'profilePicture':_0x2d9310[_0x1ec2(0x13)][_0x1ec2(0x6b)],'onboarded':![]};return await AsyncStorage[_0x1ec2(0x4e)](_0x39e2b5['MRQZl'],JSON[_0x1ec2(0x56)](_0x266771)),_0x39e2b5[_0x1ec2(0x78)](_0x4de386,_0x266771),_0x39e2b5[_0x1ec2(0x29)](_0x437415,!![]),console[_0x1ec2(0x33)](_0x39e2b5[_0x1ec2(0x79)]),_0x266771;}catch(_0x9b5883){console[_0x1ec2(0x2c)](_0x39e2b5[_0x1ec2(0x7a)],_0x9b5883);throw _0x9b5883;}finally{if(_0x39e2b5[_0x1ec2(0x40)](_0x39e2b5[_0x1ec2(0x7b)],'pTwRu'))_0x2785b5(![]);else{_0x28264b[_0x1ec2(0x2c)](_0x575912[_0x1ec2(0x7c)],_0x41b45c);throw _0x3fbade;}}else _0x39e2b5[_0x1ec2(0x77)](_0xa457e8,![]);},_0x44a3a0=async()=>{const _0x468d8e={'BSXEi':_0x39e2b5['EFebA']};if('HPkBc'!==_0x39e2b5[_0x1ec2(0x7d)])_0x17684d[_0x1ec2(0x2c)](_0x39e2b5[_0x1ec2(0x7e)],_0x59807d);else try{_0x39e2b5[_0x1ec2(0x7f)](_0x39e2b5[_0x1ec2(0x80)],_0x1ec2(0x22))?(await _0x39e2b5['EHIyJ'](clearUserData),_0x39e2b5[_0x1ec2(0x81)](_0x4de386,null),_0x39e2b5[_0x1ec2(0x82)](_0x437415,![])):_0x39e2b5['dgxlE'](_0x3a3e04,![]);}catch(_0xff2e79){_0x1ec2(0x83)===_0x39e2b5[_0x1ec2(0x84)]?_0x223f84[_0x1ec2(0x2c)](_0x468d8e[_0x1ec2(0x85)],_0x426140):console[_0x1ec2(0x2c)](_0x1ec2(0x20),_0xff2e79);}},_0xbe08=async _0x282303=>{try{const _0xd7895={..._0x16932c,..._0x282303};await AsyncStorage[_0x1ec2(0x4e)](_0x39e2b5[_0x1ec2(0x6c)],JSON['stringify'](_0xd7895)),_0x4de386(_0xd7895),await _0x33c284();}catch(_0x1c6db2){console[_0x1ec2(0x2c)](_0x39e2b5['tSGIy'],_0x1c6db2);throw _0x1c6db2;}},_0x273190=async _0x265ab2=>{if(_0x39e2b5[_0x1ec2(0x86)](_0x39e2b5[_0x1ec2(0x87)],_0x39e2b5[_0x1ec2(0x87)]))_0x2f6e7['error'](_0x1ec2(0x14),_0x31d124);else try{if(!_0x16932c)return;const _0x577b45={..._0x16932c,..._0x265ab2};await AsyncStorage[_0x1ec2(0x4e)](_0x1ec2(0x13),JSON[_0x1ec2(0x56)](_0x577b45)),_0x39e2b5['jxVjY'](_0x4de386,_0x577b45);}catch(_0x8d7ef1){console[_0x1ec2(0x2c)](_0x39e2b5[_0x1ec2(0x7e)],_0x8d7ef1);}},_0x33c284=async()=>{try{_0x39e2b5[_0x1ec2(0x88)](_0x2785b5,!![]),await _0x39e2b5['fWADi'](updateUserOnboardedStatus);if(_0x16932c){const _0x3712f0={..._0x16932c,'onboarded':!![]};await AsyncStorage[_0x1ec2(0x4e)](_0x39e2b5[_0x1ec2(0x6c)],JSON['stringify'](_0x3712f0)),_0x39e2b5[_0x1ec2(0x5f)](_0x4de386,_0x3712f0);}}catch(_0x9d6ecc){if(_0x39e2b5[_0x1ec2(0x89)](_0x39e2b5[_0x1ec2(0x8a)],_0x1ec2(0x8b))){console[_0x1ec2(0x2c)](_0x39e2b5[_0x1ec2(0x8c)],_0x9d6ecc);throw _0x9d6ecc;}else _0x39e2b5[_0x1ec2(0x28)](_0x2b7cc6,!![]);}finally{_0x39e2b5[_0x1ec2(0x8d)](_0x2785b5,![]);}},_0x43bd92=async()=>{try{await AsyncStorage[_0x1ec2(0x8e)](_0x39e2b5[_0x1ec2(0x6c)]),await removeAuthToken(),await AsyncStorage[_0x1ec2(0x8e)](_0x39e2b5[_0x1ec2(0x51)]),_0x39e2b5[_0x1ec2(0x81)](_0x4de386,null),_0x39e2b5[_0x1ec2(0x29)](_0x437415,![]),_0x141e2b(![]),console[_0x1ec2(0x33)]('Account\x20deleted\x20successfully');}catch(_0x5ebf31){console[_0x1ec2(0x2c)](_0x39e2b5[_0x1ec2(0x2d)],_0x5ebf31);throw _0x5ebf31;}};return React[_0x1ec2(0x8f)](AuthContext[_0x1ec2(0x90)],{'value':{'user':_0x16932c,'isLoading':_0x34a2a7,'hasCompletedOnboarding':_0x65fc12,'login':_0x514a43,'logout':_0x44a3a0,'deleteAccount':_0x43bd92,'completeOnboarding':_0xbe08,'updateUser':_0x273190,'appleSignIn':_0x497114,'onairosSignIn':_0x4a5684,'isAuthenticated':_0x5a59c7,'updateOnboardedStatus':_0x33c284,'getResumeTarget':getResumeTarget,'markStepCompleted':markStepCompleted,'updateLastScreen':updateLastScreen,'isReturningUser':isReturningUser,'markEventPageReached':markEventPageReached,'hasEventAccessToken':hasEventAccessToken}},_0x267eac);};export const useAuth=()=>{const _0x44e1e7={'HDFZt':function(_0xfc3023,_0x8d9170){return _0xfc3023(_0x8d9170);},'qwCyR':function(_0x2bae1e,_0xe2f2ad){return _0x2bae1e===_0xe2f2ad;},'Cczyc':_0x1ec2(0x2f)},_0x481068=_0x44e1e7['HDFZt'](useContext,AuthContext);if(_0x44e1e7[_0x1ec2(0x91)](_0x481068,undefined))throw new Error(_0x44e1e7[_0x1ec2(0x92)]);return _0x481068;};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _0x34ac(_0x37381f,_0x34ac9c){_0x37381f=_0x37381f-0x0;const _0x446b47=_0x3738();let _0x42d10d=_0x446b47[_0x37381f];return _0x42d10d;}function _0x3738(){const _0x57dcc2=['MOVPr','🔍\x20No\x20user\x20available\x20for\x20fetching\x20connected\x20accounts','🚀\x20[HOOK]\x20Starting\x20connected\x20accounts\x20fetch\x20with\x20new\x20smart\x20API...','🚀\x20[HOOK]\x20User\x20info\x20available:','ZEGIF','youiI','Failed\x20to\x20load\x20connected\x20accounts','eMUWe','🔄\x20[HOOK]\x20Refreshing\x20connected\x20accounts...','GvWpJ','UkQzk','oJEEY','APBqr','PkCek','widZF','hLfge','uwoUA','iaaOf','QYazj','XJGcG','fYpqd','some','platform','toLowerCase','map','log','MWaCU','hICKx','bSMuY','email','name','TxNfj','✅\x20[HOOK]\x20Connected\x20accounts\x20loaded\x20via\x20smart\x20API:\x20','length','\x20accounts','vKnao','lcvFj','lgxgs','rLAnm','❌\x20[HOOK]\x20Error\x20fetching\x20connected\x20accounts:','VxjHb','KcFEr','CYqzl','.com/','KZOqz','✅\x20[HOOK]\x20Account\x20added\x20locally:','FzlVj','HamIv','RmjfX','https://','JdGzT','YFJVx','gXEPX','error','eaONl','filter','NEmLf'];_0x3738=function(){return _0x57dcc2;};return _0x3738();}import{useState,useEffect,useCallback}from'react';import{getConnectedAccountsSmart}from'../services/connectedAccountsService';import{useAuth}from'../context/AuthContext';export const useConnectedAccounts=()=>{const _0x1bd832={'APBqr':function(_0x2a12c7,_0x58d0fd){return _0x2a12c7(_0x58d0fd);},'hLfge':function(_0x49a3e5,_0x305a34){return _0x49a3e5(_0x305a34);},'iaaOf':'uiQtr','QYazj':function(_0x6f68a4,_0x4d89ab){return _0x6f68a4===_0x4d89ab;},'fYpqd':_0x34ac(0x0),'CwQGR':_0x34ac(0x1),'MWaCU':function(_0x6fbcbd,_0x50c3b4){return _0x6fbcbd(_0x50c3b4);},'hICKx':_0x34ac(0x2),'bSMuY':_0x34ac(0x3),'TxNfj':function(_0x4c82c8,_0x2b586e,_0x2e380d,_0x1dce96){return _0x4c82c8(_0x2b586e,_0x2e380d,_0x1dce96);},'vKnao':function(_0x39a418,_0x4facc8){return _0x39a418(_0x4facc8);},'lcvFj':function(_0x2489fc,_0x9d193d){return _0x2489fc!==_0x9d193d;},'lgxgs':_0x34ac(0x4),'rLAnm':_0x34ac(0x5),'UmrHa':function(_0x478b30,_0x7f7fd5){return _0x478b30(_0x7f7fd5);},'VxjHb':_0x34ac(0x6),'KcFEr':function(_0x4f8a64,_0x6a1cc1){return _0x4f8a64===_0x6a1cc1;},'CYqzl':_0x34ac(0x7),'FzlVj':_0x34ac(0x8),'pEsFt':_0x34ac(0x9),'YFJVx':_0x34ac(0xa),'gXEPX':'tPByy','RmjfX':function(_0xeb00e4,_0x24d087){return _0xeb00e4(_0x24d087);},'JdGzT':function(_0x3c3beb,_0x2dfa24){return _0x3c3beb(_0x2dfa24);},'NEmLf':function(_0x391f84){return _0x391f84();},'oJEEY':function(_0x3b2700){return _0x3b2700();},'PkCek':function(_0x54e0cb,_0x128b36){return _0x54e0cb(_0x128b36);},'widZF':function(_0x342a3f,_0x5e370a,_0x34a32d){return _0x342a3f(_0x5e370a,_0x34a32d);},'HamIv':function(_0x53ea54,_0x611dda,_0x504985){return _0x53ea54(_0x611dda,_0x504985);}},{user:_0xde9a60}=_0x1bd832[_0x34ac(0xb)](useAuth),[_0x3fef99,_0x293895]=_0x1bd832[_0x34ac(0xc)](useState,[]),[_0x48fa50,_0x175ad4]=useState(!![]),[_0x144373,_0xe948c9]=_0x1bd832[_0x34ac(0xd)](useState,null),_0x5ddade=_0x1bd832[_0x34ac(0xe)](useCallback,async()=>{const _0x561082={'KZOqz':function(_0x41eab2,_0x1ae6e0){return _0x1bd832[_0x34ac(0xf)](_0x41eab2,_0x1ae6e0);}};if(_0x34ac(0x10)===_0x1bd832[_0x34ac(0x11)])_0x1bd832[_0x34ac(0xc)](_0x3a6b3b,![]);else{if(!_0xde9a60){if(_0x1bd832[_0x34ac(0x12)](_0x34ac(0x13),_0x1bd832[_0x34ac(0x14)])){const _0x5ec62c=_0x4d7ebd[_0x34ac(0x15)](_0x1ff37c=>_0x1ff37c[_0x34ac(0x16)][_0x34ac(0x17)]()===_0x5331d7[_0x34ac(0x17)]());return _0x5ec62c?_0x59982f[_0x34ac(0x18)](_0x302b01=>_0x302b01[_0x34ac(0x16)][_0x34ac(0x17)]()===_0x2b3160[_0x34ac(0x17)]()?_0x24e220:_0x302b01):[..._0x4b88fc,_0x30adfc];}else{console[_0x34ac(0x19)](_0x1bd832['CwQGR']),_0x1bd832[_0x34ac(0x1a)](_0x175ad4,![]);return;}}try{_0x175ad4(!![]),_0xe948c9(null),console[_0x34ac(0x19)](_0x1bd832[_0x34ac(0x1b)]),console['log'](_0x1bd832[_0x34ac(0x1c)],{'email':_0xde9a60[_0x34ac(0x1d)],'id':_0xde9a60['id'],'name':_0xde9a60[_0x34ac(0x1e)]});const _0x20ff11=await _0x1bd832[_0x34ac(0x1f)](getConnectedAccountsSmart,_0xde9a60[_0x34ac(0x1d)],_0xde9a60['id'],_0xde9a60[_0x34ac(0x1e)]);console[_0x34ac(0x19)](_0x34ac(0x20)+_0x20ff11[_0x34ac(0x21)]+_0x34ac(0x22)),_0x1bd832[_0x34ac(0x23)](_0x293895,_0x20ff11);}catch(_0x3fc694){_0x1bd832[_0x34ac(0x24)](_0x1bd832[_0x34ac(0x25)],_0x1bd832[_0x34ac(0x26)])?(console['error'](_0x34ac(0x27),_0x3fc694),_0x1bd832['UmrHa'](_0xe948c9,_0x1bd832[_0x34ac(0x28)])):_0x42ba1f();}finally{if(_0x1bd832[_0x34ac(0x29)](_0x1bd832[_0x34ac(0x2a)],_0x1bd832[_0x34ac(0x2a)]))_0x175ad4(![]);else{const _0x1ab371='https://'+_0x1a31b9[_0x34ac(0x17)]()+_0x34ac(0x2b)+_0x460549,_0x3474f1={'platform':_0x3a9472,'username':_0x5e0dc1,'url':_0x1ab371};_0x561082[_0x34ac(0x2c)](_0x51b111,_0x266f28=>{const _0x50173f=_0x266f28['some'](_0x18da65=>_0x18da65[_0x34ac(0x16)][_0x34ac(0x17)]()===_0x1b59b2[_0x34ac(0x17)]());return _0x50173f?_0x266f28[_0x34ac(0x18)](_0x1b642b=>_0x1b642b['platform'][_0x34ac(0x17)]()===_0x2208b2[_0x34ac(0x17)]()?_0x3474f1:_0x1b642b):[..._0x266f28,_0x3474f1];}),_0x43a852['log'](_0x34ac(0x2d),_0x3474f1);}}}},[_0xde9a60]),_0x4cc307=_0x1bd832['widZF'](useCallback,async()=>{console[_0x34ac(0x19)](_0x1bd832[_0x34ac(0x2e)]),await _0x5ddade();},[_0x5ddade]),_0x3da3bc=_0x1bd832[_0x34ac(0x2f)](useCallback,(_0x524b70,_0x239fc0)=>{const _0x55de3e={'eaONl':function(_0x207a28,_0x149b18){return _0x1bd832[_0x34ac(0x30)](_0x207a28,_0x149b18);},'UJRjB':'✅\x20[HOOK]\x20Account\x20removed\x20locally:'},_0x2777c9=_0x34ac(0x31)+_0x524b70[_0x34ac(0x17)]()+_0x34ac(0x2b)+_0x239fc0,_0x1629ce={'platform':_0x524b70,'username':_0x239fc0,'url':_0x2777c9};_0x1bd832[_0x34ac(0x32)](_0x293895,_0x3bc847=>{const _0x39708c={'CLNRl':_0x1bd832[_0x34ac(0x28)]};if(_0x1bd832[_0x34ac(0x12)](_0x1bd832['pEsFt'],_0x34ac(0x9))){const _0x30a428=_0x3bc847[_0x34ac(0x15)](_0x44cddc=>_0x44cddc[_0x34ac(0x16)][_0x34ac(0x17)]()===_0x524b70[_0x34ac(0x17)]());if(_0x30a428)return _0x3bc847['map'](_0x1ba9c2=>_0x1ba9c2[_0x34ac(0x16)][_0x34ac(0x17)]()===_0x524b70[_0x34ac(0x17)]()?_0x1629ce:_0x1ba9c2);else{if(_0x1bd832[_0x34ac(0x33)]===_0x1bd832[_0x34ac(0x34)])_0x112f80[_0x34ac(0x35)](_0x34ac(0x27),_0x3600e8),_0x4023a3(_0x39708c['CLNRl']);else return[..._0x3bc847,_0x1629ce];}}else _0x55de3e[_0x34ac(0x36)](_0x552ff4,_0x2d0e9b=>_0x2d0e9b[_0x34ac(0x37)](_0x28fdd7=>_0x28fdd7[_0x34ac(0x16)][_0x34ac(0x17)]()!==_0x14b925[_0x34ac(0x17)]())),_0x4e8500[_0x34ac(0x19)](_0x55de3e['UJRjB'],_0x4fe6f1);}),console[_0x34ac(0x19)](_0x34ac(0x2d),_0x1629ce);},[]),_0x5e9c0f=useCallback(_0x523e72=>{_0x1bd832[_0x34ac(0x30)](_0x293895,_0x1c5238=>_0x1c5238[_0x34ac(0x37)](_0xdc13b4=>_0xdc13b4[_0x34ac(0x16)][_0x34ac(0x17)]()!==_0x523e72[_0x34ac(0x17)]())),console[_0x34ac(0x19)]('✅\x20[HOOK]\x20Account\x20removed\x20locally:',_0x523e72);},[]);return useEffect(()=>{_0x1bd832[_0x34ac(0x38)](_0x5ddade);},[_0x5ddade]),{'connectedAccounts':_0x3fef99,'isLoading':_0x48fa50,'error':_0x144373,'refreshAccounts':_0x4cc307,'addAccount':_0x3da3bc,'removeAccount':_0x5e9c0f};};
|
|
@@ -1,152 +1 @@
|
|
|
1
|
-
import { useState, useCallback }
|
|
2
|
-
import { STORAGE_KEYS } from '../constants';
|
|
3
|
-
// Create a mock storage for environments without Keychain access (like Expo Go)
|
|
4
|
-
const mockConnectionStorage = {};
|
|
5
|
-
|
|
6
|
-
// Try to import Keychain, but provide fallbacks if not available
|
|
7
|
-
let Keychain = null;
|
|
8
|
-
try {
|
|
9
|
-
// This import might fail in Expo Go or environments without native modules
|
|
10
|
-
Keychain = require('react-native-keychain');
|
|
11
|
-
} catch (error) {
|
|
12
|
-
console.warn('react-native-keychain module not available in useConnections, using mock storage');
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// Check if Keychain is properly initialized and available
|
|
16
|
-
const isKeychainAvailable = () => {
|
|
17
|
-
try {
|
|
18
|
-
return Keychain && typeof Keychain.getGenericPassword === 'function';
|
|
19
|
-
} catch (e) {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
export const useConnections = () => {
|
|
24
|
-
const [isConnecting, setIsConnecting] = useState(false);
|
|
25
|
-
const getConnectionStatus = useCallback(async () => {
|
|
26
|
-
try {
|
|
27
|
-
if (isKeychainAvailable()) {
|
|
28
|
-
try {
|
|
29
|
-
const stored = await Keychain.getGenericPassword({
|
|
30
|
-
service: STORAGE_KEYS.connections
|
|
31
|
-
});
|
|
32
|
-
if (stored && stored.password) {
|
|
33
|
-
const parsed = JSON.parse(stored.password);
|
|
34
|
-
// Validate the parsed data structure
|
|
35
|
-
if (parsed && typeof parsed === 'object') {
|
|
36
|
-
return parsed;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
} catch (keychainError) {
|
|
40
|
-
console.warn('Keychain access failed, using fallback:', keychainError);
|
|
41
|
-
// Clear corrupted data
|
|
42
|
-
try {
|
|
43
|
-
await Keychain.resetGenericPassword({
|
|
44
|
-
service: STORAGE_KEYS.connections
|
|
45
|
-
});
|
|
46
|
-
} catch (resetError) {
|
|
47
|
-
console.warn('Failed to reset keychain:', resetError);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// Use in-memory mock storage if Keychain is not available or failed
|
|
53
|
-
const mockData = mockConnectionStorage[STORAGE_KEYS.connections] || {};
|
|
54
|
-
console.log('Using mock connection storage:', mockData);
|
|
55
|
-
return mockData;
|
|
56
|
-
} catch (error) {
|
|
57
|
-
console.error('Error getting connection status:', error);
|
|
58
|
-
|
|
59
|
-
// Always return empty object as safe fallback
|
|
60
|
-
console.log('Returning empty connections due to error');
|
|
61
|
-
return {};
|
|
62
|
-
}
|
|
63
|
-
}, []);
|
|
64
|
-
const saveConnectionStatus = useCallback(async status => {
|
|
65
|
-
try {
|
|
66
|
-
if (isKeychainAvailable()) {
|
|
67
|
-
await Keychain.setGenericPassword('connections', JSON.stringify(status), {
|
|
68
|
-
service: STORAGE_KEYS.connections
|
|
69
|
-
});
|
|
70
|
-
} else {
|
|
71
|
-
// Use in-memory mock storage if Keychain is not available
|
|
72
|
-
mockConnectionStorage[STORAGE_KEYS.connections] = status;
|
|
73
|
-
}
|
|
74
|
-
} catch (error) {
|
|
75
|
-
console.error('Error saving connection status:', error);
|
|
76
|
-
// Save to mock storage as fallback
|
|
77
|
-
mockConnectionStorage[STORAGE_KEYS.connections] = status;
|
|
78
|
-
}
|
|
79
|
-
}, []);
|
|
80
|
-
const connectPlatform = useCallback(async platform => {
|
|
81
|
-
setIsConnecting(true);
|
|
82
|
-
try {
|
|
83
|
-
console.log(`[Mock] Connecting to ${platform}`);
|
|
84
|
-
|
|
85
|
-
// Simulate connection delay
|
|
86
|
-
await new Promise(resolve => {
|
|
87
|
-
setTimeout(() => resolve(), 1000);
|
|
88
|
-
});
|
|
89
|
-
const status = await getConnectionStatus();
|
|
90
|
-
status[platform] = {
|
|
91
|
-
userName: `Mock User (${platform})`,
|
|
92
|
-
connected: true
|
|
93
|
-
};
|
|
94
|
-
await saveConnectionStatus(status);
|
|
95
|
-
console.log(`[Mock] Successfully connected to ${platform}`);
|
|
96
|
-
} catch (error) {
|
|
97
|
-
console.error(`Error connecting to ${platform}:`, error);
|
|
98
|
-
// In development, provide mock data even on error
|
|
99
|
-
if (__DEV__) {
|
|
100
|
-
const status = {
|
|
101
|
-
[platform]: {
|
|
102
|
-
userName: `Fallback User (${platform})`,
|
|
103
|
-
connected: true
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
await saveConnectionStatus(status);
|
|
107
|
-
} else {
|
|
108
|
-
throw error;
|
|
109
|
-
}
|
|
110
|
-
} finally {
|
|
111
|
-
setIsConnecting(false);
|
|
112
|
-
}
|
|
113
|
-
}, [getConnectionStatus, saveConnectionStatus]);
|
|
114
|
-
const disconnectPlatform = useCallback(async platform => {
|
|
115
|
-
try {
|
|
116
|
-
const status = await getConnectionStatus();
|
|
117
|
-
if (status && platform in status) {
|
|
118
|
-
delete status[platform];
|
|
119
|
-
await saveConnectionStatus(status);
|
|
120
|
-
}
|
|
121
|
-
} catch (error) {
|
|
122
|
-
console.error(`Error disconnecting ${platform}:`, error);
|
|
123
|
-
// Don't throw in development mode
|
|
124
|
-
if (!__DEV__) {
|
|
125
|
-
throw error;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}, [getConnectionStatus, saveConnectionStatus]);
|
|
129
|
-
const handleOAuthCallback = useCallback(async (platform, data) => {
|
|
130
|
-
try {
|
|
131
|
-
console.log(`[Mock] Handling callback for ${platform}`);
|
|
132
|
-
const status = await getConnectionStatus();
|
|
133
|
-
status[platform] = {
|
|
134
|
-
userName: data.userName || `Mock User (${platform})`,
|
|
135
|
-
connected: true
|
|
136
|
-
};
|
|
137
|
-
await saveConnectionStatus(status);
|
|
138
|
-
return true;
|
|
139
|
-
} catch (error) {
|
|
140
|
-
console.error('Error handling callback:', error);
|
|
141
|
-
return false;
|
|
142
|
-
}
|
|
143
|
-
}, [getConnectionStatus, saveConnectionStatus]);
|
|
144
|
-
return {
|
|
145
|
-
isConnecting,
|
|
146
|
-
connectPlatform,
|
|
147
|
-
disconnectPlatform,
|
|
148
|
-
getConnectionStatus,
|
|
149
|
-
handleOAuthCallback
|
|
150
|
-
};
|
|
151
|
-
};
|
|
152
|
-
//# sourceMappingURL=useConnections.js.map
|
|
1
|
+
function _0x2b04(_0x323bff,_0x2b0411){_0x323bff=_0x323bff-0x0;const _0x1dfa0d=_0x323b();let _0xf706ce=_0x1dfa0d[_0x323bff];return _0xf706ce;}import{useState,useCallback}from'react';function _0x323b(){const _0x43281d=['ℹ️\x20NOTE:\x20Backend\x20sync\x20removed\x20from\x20SDK\x20-\x20app\x20should\x20call\x20/enoch/users/update\x20if\x20needed','VDyhr','AkhNo','XkHWI','youtube','instagram','lZWjw','NuFFU','cvHFt','IPQsY','hGiFn','iaPwx','sjsdV','hEabP','log','✅\x20Platform\x20','\x20connected\x20locally','tyRtI','PNlCr','YXSuK','kFBGY','BtJMJ','iZWvm','error','OOITB','pbnLr','Error\x20connecting\x20platform\x20','eobXL','uJHal','LvnRD','\x20disconnected\x20locally','YPziR','Error\x20disconnecting\x20platform\x20','mnQEQ','mAnpf','sPDUW','Wzdia'];_0x323b=function(){return _0x43281d;};return _0x323b();}import{initiateNativeAuth}from'../services/platformAuthService';export const useConnections=()=>{const _0x3d575e={'hEabP':function(_0x3339e1,_0x2aee33){return _0x3339e1(_0x2aee33);},'tyRtI':_0x2b04(0x0),'iaPwx':function(_0x8900cd,_0x366f0b){return _0x8900cd===_0x366f0b;},'fbyTm':_0x2b04(0x1),'sjsdV':_0x2b04(0x2),'PNlCr':_0x2b04(0x3),'YXSuK':'MTcng','CXSRq':function(_0x4567c8,_0xe91633){return _0x4567c8(_0xe91633);},'kFBGY':_0x2b04(0x4),'xacol':_0x2b04(0x5),'sEyvA':function(_0x3fbaa4,_0x2c8ae3){return _0x3fbaa4!==_0x2c8ae3;},'BtJMJ':_0x2b04(0x6),'hGiFn':function(_0x1c836b,_0x553f25,_0x46da3e){return _0x1c836b(_0x553f25,_0x46da3e);},'SoqoK':_0x2b04(0x7),'OOITB':function(_0x31b4ca,_0x10a9ee){return _0x31b4ca(_0x10a9ee);},'qosoN':function(_0x50cbcd,_0x178914){return _0x50cbcd!==_0x178914;},'pbnLr':'YAUAy','eobXL':function(_0x40f912,_0x42a91e){return _0x40f912(_0x42a91e);},'mAnpf':function(_0x2150c2,_0x32f973){return _0x2150c2(_0x32f973);},'mnQEQ':_0x2b04(0x8),'sPDUW':function(_0x420c5c,_0x2ffc37){return _0x420c5c===_0x2ffc37;},'Wzdia':_0x2b04(0x9)},[_0x3674dd,_0x12f46b]=useState({}),[_0x14d9e1,_0x442635]=useState(![]),_0x160c1a=_0x3d575e[_0x2b04(0xa)](useCallback,async(_0x5905bd,_0x1875a1)=>{if(_0x3d575e[_0x2b04(0xb)](_0x3d575e['fbyTm'],_0x3d575e[_0x2b04(0xc)]))return _0x3d575e[_0x2b04(0xd)](_0xdecec5,_0x28810e=>({..._0x28810e,[_0xfb935f]:{'userName':_0x544470,'connected':!![]}})),_0x2c8c47[_0x2b04(0xe)](_0x2b04(0xf)+_0x5cf7c0+_0x2b04(0x10)),_0x275ccf[_0x2b04(0xe)](_0x3d575e[_0x2b04(0x11)]),!![];else try{if(_0x3d575e['iaPwx'](_0x3d575e[_0x2b04(0x12)],_0x3d575e[_0x2b04(0x13)])){const _0x15d96f={..._0x1ba8aa};return delete _0x15d96f[_0x595047],_0x15d96f;}else{_0x3d575e['CXSRq'](_0x442635,!![]);const useNativeSDK=_0x3d575e[_0x2b04(0xb)](_0x5905bd,_0x3d575e[_0x2b04(0x14)])||_0x3d575e['iaPwx'](_0x5905bd,_0x3d575e['xacol']);let _0x103305=![];if(useNativeSDK){if(_0x3d575e['sEyvA'](_0x3d575e[_0x2b04(0x15)],_0x2b04(0x16)))_0x103305=await _0x3d575e[_0x2b04(0xa)](initiateNativeAuth,_0x5905bd,_0x1875a1);else return _0x38c49f[_0x2b04(0x17)]('Error\x20disconnecting\x20platform\x20'+_0x322195+':',_0x504956),![];}else await new Promise(_0x5cd608=>setTimeout(()=>_0x5cd608(undefined),0x3e8)),_0x103305=!![];if(_0x103305)return _0x3d575e['sEyvA'](_0x3d575e['SoqoK'],_0x3d575e['SoqoK'])?_0x48fb13:(_0x3d575e[_0x2b04(0x18)](_0x12f46b,_0x220154=>({..._0x220154,[_0x5905bd]:{'userName':_0x1875a1,'connected':!![]}})),console['log'](_0x2b04(0xf)+_0x5905bd+'\x20connected\x20locally'),console[_0x2b04(0xe)](_0x3d575e[_0x2b04(0x11)]),!![]);return![];}}catch(_0x1d6833){return _0x3d575e['qosoN'](_0x3d575e[_0x2b04(0x19)],_0x3d575e[_0x2b04(0x19)])?(_0x1a51fa[_0x2b04(0x17)](_0x2b04(0x1a)+_0x9ee635+':',_0x599771),![]):(console[_0x2b04(0x17)](_0x2b04(0x1a)+_0x5905bd+':',_0x1d6833),![]);}finally{_0x3d575e[_0x2b04(0x1b)](_0x442635,![]);}},[]),_0x44e036=_0x3d575e[_0x2b04(0xa)](useCallback,async(_0x3851e6,_0x131830)=>{const _0x4717bd={'YPziR':_0x2b04(0x0),'IGLdc':function(_0x53e379,_0x53775b){return _0x3d575e[_0x2b04(0x1b)](_0x53e379,_0x53775b);}};if(_0x3d575e[_0x2b04(0xb)](_0x2b04(0x1c),_0x2b04(0x1d)))try{return _0x1e10aa(_0x9aa756=>{const _0x272c54={..._0x9aa756};return delete _0x272c54[_0x3f3759],_0x272c54;}),_0xf89ff5[_0x2b04(0xe)](_0x2b04(0xf)+_0x1e4463+_0x2b04(0x1e)),_0x4e0fca['log'](_0x4717bd[_0x2b04(0x1f)]),!![];}catch(_0x2237e1){return _0x30afe3[_0x2b04(0x17)](_0x2b04(0x20)+_0x105a8a+':',_0x2237e1),![];}else try{return _0x3d575e['mnQEQ']===_0x3d575e[_0x2b04(0x21)]?(_0x12f46b(_0x5013eb=>{const _0x53465a={..._0x5013eb};return delete _0x53465a[_0x3851e6],_0x53465a;}),console[_0x2b04(0xe)]('✅\x20Platform\x20'+_0x3851e6+_0x2b04(0x1e)),console[_0x2b04(0xe)](_0x2b04(0x0)),!![]):(_0x3d575e[_0x2b04(0x22)](_0x10ed27,_0x26eb59=>{const _0x2eef0c={..._0x26eb59};return delete _0x2eef0c[_0x49cf3d],_0x2eef0c;}),_0xec9b39[_0x2b04(0xe)](_0x2b04(0xf)+_0x8a59c3+_0x2b04(0x1e)),_0x502fb2[_0x2b04(0xe)](_0x3d575e[_0x2b04(0x11)]),!![]);}catch(_0x4d350b){if(_0x3d575e[_0x2b04(0x23)](_0x3d575e[_0x2b04(0x24)],_0x3d575e[_0x2b04(0x24)]))return console[_0x2b04(0x17)](_0x2b04(0x20)+_0x3851e6+':',_0x4d350b),![];else _0x4717bd['IGLdc'](_0x483dce,![]);}},[]),_0x57d9e4=_0x3d575e[_0x2b04(0xa)](useCallback,async()=>{return _0x3674dd;},[_0x3674dd]);return{'connections':_0x3674dd,'connectPlatform':_0x160c1a,'disconnectPlatform':_0x44e036,'getConnectionStatus':_0x57d9e4,'isConnecting':_0x14d9e1};};
|
|
@@ -1,170 +1,7 @@
|
|
|
1
|
-
import { useCallback } from 'react';
|
|
2
|
-
import { STORAGE_KEYS } from '../constants';
|
|
3
|
-
// Create a mock storage for environments without Keychain access
|
|
4
|
-
const mockCredentialStorage = {};
|
|
5
1
|
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
console.warn('react-native-keychain module not available in useCredentials, using mock storage');
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// Check if Keychain is properly initialized and available
|
|
15
|
-
const isKeychainAvailable = () => {
|
|
16
|
-
try {
|
|
17
|
-
return Keychain && typeof Keychain.getGenericPassword === 'function';
|
|
18
|
-
} catch (e) {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
// Safe wrapper for getGenericPassword
|
|
24
|
-
const safeGetGenericPassword = async options => {
|
|
25
|
-
try {
|
|
26
|
-
if (isKeychainAvailable()) {
|
|
27
|
-
return await Keychain.getGenericPassword(options);
|
|
28
|
-
} else {
|
|
29
|
-
const key = (options === null || options === void 0 ? void 0 : options.service) || 'default';
|
|
30
|
-
return mockCredentialStorage[key] || null;
|
|
31
|
-
}
|
|
32
|
-
} catch (error) {
|
|
33
|
-
console.warn('Keychain access failed, using mock storage', error);
|
|
34
|
-
const key = (options === null || options === void 0 ? void 0 : options.service) || 'default';
|
|
35
|
-
return mockCredentialStorage[key] || null;
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
// Safe wrapper for setGenericPassword
|
|
40
|
-
const safeSetGenericPassword = async (username, password, options) => {
|
|
41
|
-
try {
|
|
42
|
-
if (isKeychainAvailable()) {
|
|
43
|
-
return await Keychain.setGenericPassword(username, password, options);
|
|
44
|
-
} else {
|
|
45
|
-
const key = (options === null || options === void 0 ? void 0 : options.service) || 'default';
|
|
46
|
-
mockCredentialStorage[key] = {
|
|
47
|
-
username,
|
|
48
|
-
password
|
|
49
|
-
};
|
|
50
|
-
return true;
|
|
51
|
-
}
|
|
52
|
-
} catch (error) {
|
|
53
|
-
console.warn('Keychain access failed, using mock storage', error);
|
|
54
|
-
const key = (options === null || options === void 0 ? void 0 : options.service) || 'default';
|
|
55
|
-
mockCredentialStorage[key] = {
|
|
56
|
-
username,
|
|
57
|
-
password
|
|
58
|
-
};
|
|
59
|
-
return true;
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
// Safe wrapper for resetGenericPassword
|
|
64
|
-
const safeResetGenericPassword = async options => {
|
|
65
|
-
try {
|
|
66
|
-
if (isKeychainAvailable()) {
|
|
67
|
-
return await Keychain.resetGenericPassword(options);
|
|
68
|
-
} else {
|
|
69
|
-
const key = (options === null || options === void 0 ? void 0 : options.service) || 'default';
|
|
70
|
-
delete mockCredentialStorage[key];
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
} catch (error) {
|
|
74
|
-
console.warn('Keychain access failed, using mock storage', error);
|
|
75
|
-
const key = (options === null || options === void 0 ? void 0 : options.service) || 'default';
|
|
76
|
-
delete mockCredentialStorage[key];
|
|
77
|
-
return true;
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
export const useCredentials = () => {
|
|
81
|
-
const hasCredentials = useCallback(async () => {
|
|
82
|
-
try {
|
|
83
|
-
const credentials = await safeGetGenericPassword({
|
|
84
|
-
service: STORAGE_KEYS.credentials
|
|
85
|
-
});
|
|
86
|
-
return !!credentials;
|
|
87
|
-
} catch (error) {
|
|
88
|
-
console.error('Error checking credentials:', error);
|
|
89
|
-
return false;
|
|
90
|
-
}
|
|
91
|
-
}, []);
|
|
92
|
-
const getCredentials = useCallback(async () => {
|
|
93
|
-
try {
|
|
94
|
-
const credentials = await safeGetGenericPassword({
|
|
95
|
-
service: STORAGE_KEYS.credentials
|
|
96
|
-
});
|
|
97
|
-
if (credentials) {
|
|
98
|
-
return JSON.parse(credentials.password);
|
|
99
|
-
}
|
|
100
|
-
return null;
|
|
101
|
-
} catch (error) {
|
|
102
|
-
console.error('Error getting credentials:', error);
|
|
103
|
-
return null;
|
|
104
|
-
}
|
|
105
|
-
}, []);
|
|
106
|
-
const storeCredentials = useCallback(async (username, userPin, accessToken) => {
|
|
107
|
-
try {
|
|
108
|
-
const options = {
|
|
109
|
-
service: STORAGE_KEYS.credentials
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
// Only use secure storage options on real devices
|
|
113
|
-
if (isKeychainAvailable()) {
|
|
114
|
-
var _Keychain$ACCESS_CONT, _Keychain$ACCESSIBLE;
|
|
115
|
-
options.accessControl = (_Keychain$ACCESS_CONT = Keychain.ACCESS_CONTROL) === null || _Keychain$ACCESS_CONT === void 0 ? void 0 : _Keychain$ACCESS_CONT.BIOMETRY_ANY;
|
|
116
|
-
options.accessible = (_Keychain$ACCESSIBLE = Keychain.ACCESSIBLE) === null || _Keychain$ACCESSIBLE === void 0 ? void 0 : _Keychain$ACCESSIBLE.WHEN_UNLOCKED;
|
|
117
|
-
}
|
|
118
|
-
await safeSetGenericPassword(username, JSON.stringify({
|
|
119
|
-
userPin,
|
|
120
|
-
accessToken
|
|
121
|
-
}), options);
|
|
122
|
-
return true;
|
|
123
|
-
} catch (error) {
|
|
124
|
-
console.error('Error storing credentials:', error);
|
|
125
|
-
return false;
|
|
126
|
-
}
|
|
127
|
-
}, []);
|
|
128
|
-
const clearCredentials = useCallback(async () => {
|
|
129
|
-
try {
|
|
130
|
-
await safeResetGenericPassword({
|
|
131
|
-
service: STORAGE_KEYS.credentials
|
|
132
|
-
});
|
|
133
|
-
} catch (error) {
|
|
134
|
-
console.error('Error clearing credentials:', error);
|
|
135
|
-
}
|
|
136
|
-
}, []);
|
|
137
|
-
const validateCredentials = useCallback(async username => {
|
|
138
|
-
try {
|
|
139
|
-
const response = await fetch(`https://api2.onairos.uk/validate`, {
|
|
140
|
-
method: 'POST',
|
|
141
|
-
headers: {
|
|
142
|
-
'Content-Type': 'application/json'
|
|
143
|
-
},
|
|
144
|
-
body: JSON.stringify({
|
|
145
|
-
username
|
|
146
|
-
})
|
|
147
|
-
});
|
|
148
|
-
const data = await response.json();
|
|
149
|
-
return {
|
|
150
|
-
success: true,
|
|
151
|
-
isValid: data.valid,
|
|
152
|
-
credentials: data.credentials
|
|
153
|
-
};
|
|
154
|
-
} catch (error) {
|
|
155
|
-
console.error('Error validating credentials:', error);
|
|
156
|
-
return {
|
|
157
|
-
success: false,
|
|
158
|
-
isValid: false
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
}, []);
|
|
162
|
-
return {
|
|
163
|
-
hasCredentials,
|
|
164
|
-
getCredentials,
|
|
165
|
-
storeCredentials,
|
|
166
|
-
clearCredentials,
|
|
167
|
-
validateCredentials
|
|
168
|
-
};
|
|
169
|
-
};
|
|
170
|
-
//# sourceMappingURL=useCredentials.js.map
|
|
2
|
+
// Onairos SDK - Asset Registry (auto-generated)
|
|
3
|
+
var __ONAIROS_REQ_REGISTRY__ = [
|
|
4
|
+
require('react-native-keychain')
|
|
5
|
+
];
|
|
6
|
+
function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
|
|
7
|
+
import{useCallback}from'react';import{STORAGE_KEYS}from'../constants';function _0x10c8(_0x4a7ce7,_0x10c835){_0x4a7ce7=_0x4a7ce7-0x0;const _0x1dae62=_0x4a7c();let _0x4b63a6=_0x1dae62[_0x4a7ce7];return _0x4b63a6;}import{API_CONFIG}from'../config/api';const mockCredentialStorage={};let Keychain=null;try{Keychain=__ONAIROS_REQ_FUNC__(0x0);}catch(_0x348dc9){console[_0x10c8(0x0)]('react-native-keychain module not available in useCredentials, using mock storage');}const isKeychainAvailable=()=>{const _0x331ad8={'gEiWh':function(_0x125e0a,_0x525a9d){return _0x125e0a===_0x525a9d;},'OiZpS':'default','GfyyV':function(_0x4f768a,_0x5e7a3b){return _0x4f768a===_0x5e7a3b;},'XykaL':_0x10c8(0x1),'msEIV':function(_0x36871e,_0x13d5dc){return _0x36871e!==_0x13d5dc;},'FeeFU':_0x10c8(0x2)};try{return Keychain&&_0x331ad8[_0x10c8(0x3)](typeof Keychain['getGenericPassword'],_0x331ad8[_0x10c8(0x4)]);}catch(_0x34b425){if(_0x331ad8[_0x10c8(0x5)](_0x10c8(0x2),_0x331ad8[_0x10c8(0x6)])){const _0x1fe582=(_0x331ad8[_0x10c8(0x7)](_0x63ec4f,null)||_0x331ad8['gEiWh'](_0x1d869a,void 0x0)?void 0x0:_0x378c9f[_0x10c8(0x8)])||_0x331ad8['OiZpS'];return delete _0x251ee2[_0x1fe582],!![];}else return![];}},safeGetGenericPassword=async _0x6c6e0=>{const _0x320323={'uUdCX':function(_0x4ecad5,_0x1095d8){return _0x4ecad5===_0x1095d8;},'JPgzY':function(_0x5f0e46,_0x3b4245){return _0x5f0e46===_0x3b4245;},'tBjPY':function(_0x12b05a,_0x4593f1){return _0x12b05a===_0x4593f1;},'EBumR':'function','FgkdH':_0x10c8(0x9),'kgPyg':function(_0x2999cb){return _0x2999cb();},'BdHFO':function(_0x22817c,_0x3d4d60){return _0x22817c===_0x3d4d60;},'SGHvf':_0x10c8(0xa),'xGsHN':_0x10c8(0xb),'KInVq':function(_0x1a635d,_0x2a96e1){return _0x1a635d===_0x2a96e1;},'gVdFV':function(_0x5cd231,_0x4afed4){return _0x5cd231===_0x4afed4;},'HNCpR':'Keychain\x20access\x20failed,\x20using\x20mock\x20storage','Cvpig':_0x10c8(0xc)};try{if(_0x320323['JPgzY'](_0x10c8(0xd),_0x320323[_0x10c8(0xe)])){var _0x7fdc4d,_0x4ff65a;_0x2b6568[_0x10c8(0xf)]=_0x320323[_0x10c8(0x10)](_0x7fdc4d=Keychain['ACCESS_CONTROL'],null)||_0x320323['JPgzY'](_0x7fdc4d,void 0x0)?void 0x0:_0x7fdc4d[_0x10c8(0x11)],_0x40a48a['accessible']=_0x320323[_0x10c8(0x10)](_0x4ff65a=Keychain[_0x10c8(0x12)],null)||_0x320323[_0x10c8(0x13)](_0x4ff65a,void 0x0)?void 0x0:_0x4ff65a[_0x10c8(0x14)];}else{if(_0x320323[_0x10c8(0x15)](isKeychainAvailable))return _0x320323['BdHFO'](_0x320323[_0x10c8(0x16)],_0x10c8(0x17))?(_0x247e9c['error'](_0x10c8(0x18),_0x37a1bc),![]):await Keychain[_0x10c8(0x19)](_0x6c6e0);else{if(_0x320323[_0x10c8(0x13)](_0x10c8(0x1a),_0x320323[_0x10c8(0x1b)]))try{return Keychain&&_0x320323[_0x10c8(0x13)](typeof Keychain[_0x10c8(0x19)],_0x320323[_0x10c8(0x1c)]);}catch(_0x58285e){return![];}else{const _0x11f969=(_0x320323[_0x10c8(0x1d)](_0x6c6e0,null)||_0x320323['gVdFV'](_0x6c6e0,void 0x0)?void 0x0:_0x6c6e0[_0x10c8(0x8)])||_0x10c8(0xc);return mockCredentialStorage[_0x11f969]||null;}}}}catch(_0x4dae4f){console['warn'](_0x320323[_0x10c8(0x1e)],_0x4dae4f);const _0x1e7056=(_0x320323[_0x10c8(0x1f)](_0x6c6e0,null)||_0x320323['uUdCX'](_0x6c6e0,void 0x0)?void 0x0:_0x6c6e0[_0x10c8(0x8)])||_0x320323[_0x10c8(0x20)];return mockCredentialStorage[_0x1e7056]||null;}},safeSetGenericPassword=async(_0x4b74d3,_0x3bb85b,_0x326dc2)=>{const _0xf142a={'wSeqz':function(_0x5bbe78){return _0x5bbe78();},'GazBL':function(_0x5ae5bd,_0x4f54d2){return _0x5ae5bd===_0x4f54d2;},'CeZHL':'Keychain\x20access\x20failed,\x20using\x20mock\x20storage','sWMYk':function(_0x212f3c,_0x51993a){return _0x212f3c===_0x51993a;},'lzUQZ':'default'};try{if(_0xf142a[_0x10c8(0x21)](isKeychainAvailable))return await Keychain[_0x10c8(0x22)](_0x4b74d3,_0x3bb85b,_0x326dc2);else{const _0x283e14=(_0x326dc2===null||_0xf142a[_0x10c8(0x23)](_0x326dc2,void 0x0)?void 0x0:_0x326dc2[_0x10c8(0x8)])||_0x10c8(0xc);return mockCredentialStorage[_0x283e14]={'username':_0x4b74d3,'password':_0x3bb85b},!![];}}catch(_0x1c0640){console['warn'](_0xf142a[_0x10c8(0x24)],_0x1c0640);const _0x1b55d1=(_0x326dc2===null||_0xf142a[_0x10c8(0x25)](_0x326dc2,void 0x0)?void 0x0:_0x326dc2['service'])||_0xf142a[_0x10c8(0x26)];return mockCredentialStorage[_0x1b55d1]={'username':_0x4b74d3,'password':_0x3bb85b},!![];}},safeResetGenericPassword=async _0xa53386=>{const _0x11f7dd={'YsCYS':_0x10c8(0x27),'LJAtj':function(_0x2b67f9,_0x502f94){return _0x2b67f9===_0x502f94;},'kPMHh':function(_0x4d4969,_0x148227){return _0x4d4969===_0x148227;},'KOsSK':_0x10c8(0xc),'SQNVn':function(_0x3ac387){return _0x3ac387();},'CNygP':function(_0x5112af,_0x1a47ad){return _0x5112af!==_0x1a47ad;},'AJTUi':_0x10c8(0x28),'pjTbk':function(_0xc3473b,_0x40140b){return _0xc3473b===_0x40140b;},'vMXLB':_0x10c8(0x29),'sViHr':function(_0x3d44e4,_0xbedb9f){return _0x3d44e4===_0xbedb9f;}};try{if(_0x11f7dd['SQNVn'](isKeychainAvailable))return await Keychain[_0x10c8(0x2a)](_0xa53386);else{if(_0x11f7dd[_0x10c8(0x2b)](_0x11f7dd[_0x10c8(0x2c)],_0x11f7dd[_0x10c8(0x2c)])){_0x40472b[_0x10c8(0x0)](_0x11f7dd['YsCYS'],_0x4fb11f);const _0x3f92cb=(_0x11f7dd['LJAtj'](_0x31b1f0,null)||_0x11f7dd[_0x10c8(0x2d)](_0x33828f,void 0x0)?void 0x0:_0x175e58['service'])||_0x11f7dd[_0x10c8(0x2e)];return _0x29e715[_0x3f92cb]={'username':_0x154e74,'password':_0x2c8fbd},!![];}else{const _0x7a5ca1=(_0x11f7dd[_0x10c8(0x2f)](_0xa53386,null)||_0x11f7dd[_0x10c8(0x2f)](_0xa53386,void 0x0)?void 0x0:_0xa53386[_0x10c8(0x8)])||_0x11f7dd['KOsSK'];return delete mockCredentialStorage[_0x7a5ca1],!![];}}}catch(_0x1c3cd7){if(_0x11f7dd[_0x10c8(0x30)](_0x11f7dd[_0x10c8(0x31)],_0x11f7dd['vMXLB'])){console[_0x10c8(0x0)](_0x11f7dd['YsCYS'],_0x1c3cd7);const _0x351ac6=(_0x11f7dd[_0x10c8(0x32)](_0xa53386,null)||_0xa53386===void 0x0?void 0x0:_0xa53386[_0x10c8(0x8)])||_0x11f7dd[_0x10c8(0x2e)];return delete mockCredentialStorage[_0x351ac6],!![];}else return _0x19c63f['error'](_0x10c8(0x33),_0x39a7cb),![];}};export const useCredentials=()=>{const _0x20896e={'JWIGa':function(_0x3620bb,_0x2cd3c8){return _0x3620bb(_0x2cd3c8);},'lgDhS':'Error\x20checking\x20credentials:','ewrOM':'Keychain\x20access\x20failed,\x20using\x20mock\x20storage','dbDkw':function(_0xd3ceeb,_0xed692b){return _0xd3ceeb===_0xed692b;},'qOVIo':function(_0x18d050,_0x3df05f){return _0x18d050===_0x3df05f;},'qEyhS':_0x10c8(0xc),'cSsbZ':function(_0x452ce1,_0x23e526){return _0x452ce1(_0x23e526);},'EQnXt':function(_0x2ff709,_0x1abb9d){return _0x2ff709!==_0x1abb9d;},'KuENy':_0x10c8(0x34),'qSlTO':_0x10c8(0x35),'swqJC':_0x10c8(0x36),'RQOSg':_0x10c8(0x37),'GYiXV':function(_0x1cbee4){return _0x1cbee4();},'owpYG':_0x10c8(0x38),'leZTq':function(_0x529eae,_0x13ec32){return _0x529eae===_0x13ec32;},'AUNAR':function(_0x2273fe,_0x5c2136){return _0x2273fe===_0x5c2136;},'MUHng':function(_0x1acba2,_0x51a2f9){return _0x1acba2===_0x51a2f9;},'MMvim':function(_0x33b764,_0xc590f2){return _0x33b764===_0xc590f2;},'MiWiA':function(_0x16c724,_0x593be9){return _0x16c724!==_0x593be9;},'axamS':_0x10c8(0x39),'VExoe':_0x10c8(0x3a),'nthFj':'Error\x20clearing\x20credentials:','QZfvV':_0x10c8(0x1),'NGFgs':function(_0x4ed4e9,_0xf91135){return _0x4ed4e9===_0xf91135;},'RJwbR':_0x10c8(0x3b),'YmxPZ':function(_0x5a5ed3,_0x33ccb5,_0x407512){return _0x5a5ed3(_0x33ccb5,_0x407512);},'lRUlV':_0x10c8(0x3c),'jrJlI':function(_0x16e0b5,_0x1c85fa,_0x21ad55){return _0x16e0b5(_0x1c85fa,_0x21ad55);}},_0x49ee52=_0x20896e[_0x10c8(0x3d)](useCallback,async()=>{try{const _0x4f16f7=await _0x20896e[_0x10c8(0x3e)](safeGetGenericPassword,{'service':STORAGE_KEYS[_0x10c8(0x3f)]});return!!_0x4f16f7;}catch(_0x4c3445){return console[_0x10c8(0x40)](_0x20896e[_0x10c8(0x41)],_0x4c3445),![];}},[]),_0xc63c74=useCallback(async()=>{const _0x117957={'NWTJT':_0x20896e['ewrOM'],'gpALf':function(_0x117804,_0x1250b4){return _0x20896e[_0x10c8(0x42)](_0x117804,_0x1250b4);},'kTDev':function(_0x253f65,_0x261c04){return _0x20896e[_0x10c8(0x43)](_0x253f65,_0x261c04);},'EFTvg':_0x20896e[_0x10c8(0x44)]};try{const _0x258c5b=await _0x20896e[_0x10c8(0x45)](safeGetGenericPassword,{'service':STORAGE_KEYS[_0x10c8(0x3f)]});if(_0x258c5b){if(_0x20896e[_0x10c8(0x46)](_0x10c8(0x47),_0x20896e[_0x10c8(0x48)]))return JSON['parse'](_0x258c5b[_0x10c8(0x49)]);else{_0x3f419a[_0x10c8(0x0)](_0x117957['NWTJT'],_0x310778);const _0x4c20fa=(_0x117957[_0x10c8(0x4a)](_0x4277d0,null)||_0x117957[_0x10c8(0x4b)](_0xea33de,void 0x0)?void 0x0:_0x11b01c[_0x10c8(0x8)])||_0x117957[_0x10c8(0x4c)];return _0x1408b6[_0x4c20fa]||null;}}return null;}catch(_0x195684){return console[_0x10c8(0x40)]('Error\x20getting\x20credentials:',_0x195684),null;}},[]),_0x4baa2d=useCallback(async(_0x2dde54,_0x36e08e,_0x3b395a)=>{if(_0x20896e['EQnXt'](_0x20896e[_0x10c8(0x4d)],_0x20896e[_0x10c8(0x4e)]))try{const _0x324070={'service':STORAGE_KEYS[_0x10c8(0x3f)]};if(_0x20896e[_0x10c8(0x4f)](isKeychainAvailable)){if(_0x20896e[_0x10c8(0x42)](_0x10c8(0x38),_0x20896e[_0x10c8(0x50)])){var _0x4ca1fd,_0x36fb7d;_0x324070[_0x10c8(0xf)]=_0x20896e['leZTq'](_0x4ca1fd=Keychain[_0x10c8(0x51)],null)||_0x20896e[_0x10c8(0x52)](_0x4ca1fd,void 0x0)?void 0x0:_0x4ca1fd[_0x10c8(0x11)],_0x324070['accessible']=_0x20896e[_0x10c8(0x53)](_0x36fb7d=Keychain['ACCESSIBLE'],null)||_0x20896e['MMvim'](_0x36fb7d,void 0x0)?void 0x0:_0x36fb7d[_0x10c8(0x14)];}else _0x2916d5[_0x10c8(0x40)](_0x10c8(0x54),_0x488bd5);}return await safeSetGenericPassword(_0x2dde54,JSON[_0x10c8(0x55)]({'userPin':_0x36e08e,'accessToken':_0x3b395a}),_0x324070),!![];}catch(_0x4f3ac7){return _0x20896e[_0x10c8(0x56)](_0x20896e['axamS'],_0x20896e[_0x10c8(0x57)])?(console[_0x10c8(0x40)](_0x10c8(0x33),_0x4f3ac7),![]):(_0x4156cc['error'](_0x20896e[_0x10c8(0x58)],_0x288e9e),null);}else return _0x9888b5[_0x10c8(0x59)](_0x269293[_0x10c8(0x49)]);},[]),_0x595c79=useCallback(async()=>{try{await _0x20896e['cSsbZ'](safeResetGenericPassword,{'service':STORAGE_KEYS[_0x10c8(0x3f)]});}catch(_0x515df4){console[_0x10c8(0x40)](_0x20896e[_0x10c8(0x5a)],_0x515df4);}},[]),_0xc42660=useCallback(async _0x47f21e=>{const _0x199887={'IbsCn':_0x20896e[_0x10c8(0x5b)],'RJRPU':_0x20896e[_0x10c8(0x5c)],'NijOO':function(_0x44ac36,_0x59d379){return _0x20896e[_0x10c8(0x5d)](_0x44ac36,_0x59d379);},'YcifI':_0x20896e[_0x10c8(0x44)]};if(_0x20896e['qOVIo'](_0x20896e[_0x10c8(0x5e)],_0x20896e[_0x10c8(0x5e)]))try{const _0x2beea3=await _0x20896e[_0x10c8(0x5f)](fetch,API_CONFIG[_0x10c8(0x60)]+_0x10c8(0x61),{'method':'POST','headers':{'Content-Type':'application/json'},'body':JSON[_0x10c8(0x55)]({'username':_0x47f21e})}),_0xd91804=await _0x2beea3['json']();return{'success':!![],'isValid':_0xd91804[_0x10c8(0x62)],'credentials':_0xd91804[_0x10c8(0x3f)]};}catch(_0x28f797){return _0x20896e['MMvim'](_0x10c8(0x63),_0x20896e[_0x10c8(0x64)])?Keychain&&typeof Keychain[_0x10c8(0x19)]===_0x199887['IbsCn']:(console[_0x10c8(0x40)](_0x10c8(0x65),_0x28f797),{'success':![],'isValid':![]});}else{_0x2710af[_0x10c8(0x0)](_0x199887[_0x10c8(0x66)],_0x3ff40d);const _0x2cc3e6=(_0xaff936===null||_0x199887[_0x10c8(0x67)](_0x42a178,void 0x0)?void 0x0:_0x57bde7[_0x10c8(0x8)])||_0x199887['YcifI'];return delete _0xfed867[_0x2cc3e6],!![];}},[]);return{'hasCredentials':_0x49ee52,'getCredentials':_0xc63c74,'storeCredentials':_0x4baa2d,'clearCredentials':_0x595c79,'validateCredentials':_0xc42660};};function _0x4a7c(){const _0x4d9bb7=['warn','function','mhkFI','GfyyV','XykaL','msEIV','FeeFU','gEiWh','service','PwkRC','SFWco','FFpwn','default','FqOPU','FgkdH','accessControl','uUdCX','BIOMETRY_ANY','ACCESSIBLE','tBjPY','WHEN_UNLOCKED','kgPyg','SGHvf','mTCEx','Error\x20checking\x20credentials:','getGenericPassword','fcGrf','xGsHN','EBumR','KInVq','HNCpR','JPgzY','Cvpig','wSeqz','setGenericPassword','GazBL','CeZHL','sWMYk','lzUQZ','Keychain\x20access\x20failed,\x20using\x20mock\x20storage','xoCdr','atmQv','resetGenericPassword','CNygP','AJTUi','kPMHh','KOsSK','LJAtj','pjTbk','vMXLB','sViHr','Error\x20storing\x20credentials:','MikoZ','Error\x20getting\x20credentials:','PZXBy','KgYdE','izjff','qKHCD','nFJpT','acCAF','jgMIt','jrJlI','JWIGa','credentials','error','lgDhS','dbDkw','qOVIo','qEyhS','cSsbZ','EQnXt','OCsAe','KuENy','password','gpALf','kTDev','EFTvg','swqJC','RQOSg','GYiXV','owpYG','ACCESS_CONTROL','AUNAR','MUHng','Error\x20clearing\x20credentials:','stringify','MiWiA','VExoe','qSlTO','parse','nthFj','QZfvV','ewrOM','NGFgs','RJwbR','YmxPZ','BASE_URL','/validate','valid','HWMPD','lRUlV','Error\x20validating\x20credentials:','RJRPU','NijOO'];_0x4a7c=function(){return _0x4d9bb7;};return _0x4a7c();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _0x3e94(_0x440ff5,_0x3e94c2){_0x440ff5=_0x440ff5-0x0;const _0x3a2656=_0x440f();let _0x1e3db4=_0x3a2656[_0x440ff5];return _0x1e3db4;}import{useState,useEffect,useCallback}from'react';import{getUserConnections,getUserConnectionsByUsername,getUserConnectionsByUserId,uploadProfilePicture}from'../services/userConnectionsService';function _0x440f(){const _0xd3a90=['⚠️\x20[CONNECTIONS\x20HOOK]\x20No\x20authentication\x20token\x20available\x20for\x20connections\x20refresh','⚠️\x20[CONNECTIONS\x20HOOK]\x20Skipping\x20API\x20call\x20to\x20prevent\x20unauthenticated\x20requests','Authentication\x20required\x20for\x20connections','Failed\x20to\x20load\x20connections','❌\x20Error\x20loading\x20connections:','aviDB','RIGEk','tPtKh','onairos_jwt_token','QXyGq','🎯\x20[DEMO\x20MODE]\x20Reviewer\x20bypass\x20detected\x20-\x20skipping\x20API\x20call\x20for\x20demo','Authentication\x20error','🔄\x20Loading\x20user\x20connections\x20with\x20authentication...','✅\x20Connections\x20loaded:','✅\x20[CONNECTIONS\x20HOOK]\x20Connections\x20refresh\x20completed','❌\x20Error\x20uploading\x20profile\x20picture:','CnEyn','aPFmn','GZOEV','⚠️\x20[CONNECTIONS\x20HOOK]\x20No\x20authentication\x20token\x20available\x20for\x20username\x20connections','🔍\x20Fetching\x20connections\x20by\x20username:','🔍\x20Fetching\x20connections\x20by\x20userId:','📷\x20Uploading\x20profile\x20picture\x20for\x20user:','KvChH','WJRSI','whQcr','SmWIo','bAypj','cEcLn','warn','lsmhy','nHpXC','GvJpJ','aewDI','getItem','NudLS','QAgvI','yPyYT','Ytjhs','split','oMZlW','FlgbR','fTnJf','lafms','nVuEc','MqBFn','PmCQB','message','BgQgn','error','tbuUu','fPVUY','ptlvx','log','substring','...','EbRiu','ClIvb','FLUIH','RqIhw','SqHUm','🔄\x20[CONNECTIONS\x20HOOK]\x20Refreshing\x20connections...','CUuMJ','DwquX','zUxFG','mKFEC','zXrTl','WrhPL','dxJRd','PaUzA','nCVJO','QDcKx','jjvKP','tVOJd','XfFRI','oFUrP','vZmwk','QTKRI','XmTtc','jLani','⚠️\x20[CONNECTIONS\x20HOOK]\x20No\x20authentication\x20token\x20available\x20for\x20user\x20ID\x20connections','ffBlk','kDnIg','jpg','success','jyPEJ','❌\x20Error\x20fetching\x20connections\x20by\x20userId:','HIQmR','yFJrF'];_0x440f=function(){return _0xd3a90;};return _0x440f();}import{getAuthToken}from'../services/authService';import AsyncStorage from'@react-native-async-storage/async-storage';export const useUserConnections=()=>{const _0x547631={'FlgbR':_0x3e94(0x0),'lsmhy':_0x3e94(0x1),'whQcr':function(_0x3f711b,_0x3e0f3c){return _0x3f711b(_0x3e0f3c);},'nHpXC':_0x3e94(0x2),'FLUIH':function(_0xb3940c,_0x1e0e38){return _0xb3940c instanceof _0x1e0e38;},'BgQgn':_0x3e94(0x3),'tbuUu':_0x3e94(0x4),'PmCQB':function(_0x321ec2,_0x278abb){return _0x321ec2(_0x278abb);},'bAypj':function(_0x172ce6,_0x1053ad){return _0x172ce6!==_0x1053ad;},'cEcLn':_0x3e94(0x5),'GvJpJ':_0x3e94(0x6),'aewDI':_0x3e94(0x7),'fGMpn':function(_0x2bdc02){return _0x2bdc02();},'WALUo':_0x3e94(0x8),'NudLS':function(_0x5b1000,_0x105d8c){return _0x5b1000===_0x105d8c;},'QAgvI':'reviewer-bypass-token','yPyYT':function(_0x33fff,_0x5e3d95){return _0x33fff&&_0x5e3d95;},'Ytjhs':'3|2|0|1|4','oMZlW':function(_0x368586,_0x39a528){return _0x368586(_0x39a528);},'fTnJf':function(_0x387f98,_0x4cd17b){return _0x387f98!==_0x4cd17b;},'lafms':'WxETG','nVuEc':_0x3e94(0x9),'MqBFn':_0x3e94(0xa),'EbRiu':function(_0x2d05a4,_0x2c40e4){return _0x2d05a4(_0x2c40e4);},'bzxSl':'❌\x20[CONNECTIONS\x20HOOK]\x20Unexpected\x20null\x20token\x20after\x20validation','fPVUY':_0x3e94(0xb),'ptlvx':_0x3e94(0xc),'lViLQ':_0x3e94(0xd),'RqIhw':function(_0x2cdbcb,_0x5eaad1){return _0x2cdbcb(_0x5eaad1);},'UpPJf':function(_0x330992,_0x48cb78){return _0x330992(_0x48cb78);},'SqHUm':'xoRVi','CUuMJ':function(_0x20019b){return _0x20019b();},'DwquX':_0x3e94(0xe),'zUxFG':function(_0x1e6ec3,_0x8081fe){return _0x1e6ec3(_0x8081fe);},'mKFEC':_0x3e94(0xf),'zXrTl':function(_0x22364f,_0x304e34){return _0x22364f!==_0x304e34;},'WrhPL':_0x3e94(0x10),'dxJRd':_0x3e94(0x11),'PaUzA':function(_0x31b206,_0x1893df){return _0x31b206!==_0x1893df;},'gnway':'YHoQw','nCVJO':_0x3e94(0x12),'QDcKx':_0x3e94(0x13),'XfFRI':_0x3e94(0x14),'oFUrP':'🔑\x20[CONNECTIONS\x20HOOK]\x20Using\x20auth\x20token:','vZmwk':'❌\x20Error\x20fetching\x20connections\x20by\x20username:','jLani':'avtlD','ffBlk':_0x3e94(0x15),'nVEgd':_0x3e94(0x16),'XmTtc':function(_0x157d65,_0x1b3e85,_0x54b48a){return _0x157d65(_0x1b3e85,_0x54b48a);},'jyPEJ':_0x3e94(0x17),'Xidxf':_0x3e94(0x18),'oJQlV':'OhJQE','kDmgW':'TErof','yFJrF':function(_0x51ca19){return _0x51ca19();},'SmWIo':function(_0x26c849,_0xd4663e,_0x5081c0){return _0x26c849(_0xd4663e,_0x5081c0);},'kDnIg':function(_0x3b2379,_0x54771f,_0x91d529){return _0x3b2379(_0x54771f,_0x91d529);},'HIQmR':function(_0x33dbde,_0x24425d,_0x14b589){return _0x33dbde(_0x24425d,_0x14b589);}},[_0x594abc,_0x3f779c]=_0x547631[_0x3e94(0x19)](useState,[]),[_0x10921f,_0xa4daad]=useState(!![]),[_0x4fd859,_0x4f4f50]=useState(null),_0xe0d781=_0x547631[_0x3e94(0x1a)](useCallback,async()=>{const _0x26f6b8={'ClIvb':'❌\x20Error\x20fetching\x20connections\x20by\x20username:'};if(_0x547631[_0x3e94(0x1b)](_0x547631[_0x3e94(0x1c)],_0x547631['cEcLn'])){_0x41658b[_0x3e94(0x1d)](_0x547631['FlgbR']),_0x5db2b5[_0x3e94(0x1d)](_0x547631[_0x3e94(0x1e)]),_0x547631[_0x3e94(0x19)](_0x385a48,[]),_0x544b90(_0x547631[_0x3e94(0x1f)]);return;}else try{if(_0x547631[_0x3e94(0x1b)](_0x547631[_0x3e94(0x20)],_0x547631[_0x3e94(0x21)])){_0x547631['PmCQB'](_0xa4daad,!![]),_0x4f4f50(null);const _0x440fb5=await _0x547631['fGMpn'](getAuthToken),_0x564331=await AsyncStorage[_0x3e94(0x22)](_0x547631['WALUo']),_0x5ee08d=_0x547631[_0x3e94(0x23)](_0x564331,_0x547631[_0x3e94(0x24)]);if(_0x547631[_0x3e94(0x25)](!_0x440fb5,!_0x5ee08d)){const _0x588017=_0x547631[_0x3e94(0x26)][_0x3e94(0x27)]('|');let _0x4f95ad=0x0;while(!![]){switch(_0x588017[_0x4f95ad++]){case'0':_0x547631[_0x3e94(0x19)](_0x3f779c,[]);continue;case'1':_0x547631[_0x3e94(0x28)](_0x4f4f50,_0x547631[_0x3e94(0x1f)]);continue;case'2':console['warn'](_0x547631[_0x3e94(0x1e)]);continue;case'3':console[_0x3e94(0x1d)](_0x547631[_0x3e94(0x29)]);continue;case'4':return;}break;}}if(_0x5ee08d){if(_0x547631[_0x3e94(0x2a)](_0x547631[_0x3e94(0x2b)],_0x547631[_0x3e94(0x2c)])){console['log'](_0x547631[_0x3e94(0x2d)]),_0x547631[_0x3e94(0x2e)](_0x3f779c,[]),_0x547631['EbRiu'](_0x4f4f50,null);return;}else{const _0x51dd1=_0x547631['FLUIH'](_0xd38b48,_0x5381ff)?_0x3087e2[_0x3e94(0x2f)]:_0x547631[_0x3e94(0x30)];_0x460694[_0x3e94(0x31)](_0x547631[_0x3e94(0x32)],_0x51dd1),_0x547631[_0x3e94(0x2e)](_0x4a0074,_0x51dd1),_0x547631[_0x3e94(0x2e)](_0x1a439b,[]);}}if(!_0x440fb5){console[_0x3e94(0x31)](_0x547631['bzxSl']),_0x547631['PmCQB'](_0x3f779c,[]),_0x547631[_0x3e94(0x2e)](_0x4f4f50,_0x547631[_0x3e94(0x33)]);return;}console['log'](_0x547631[_0x3e94(0x34)]),console[_0x3e94(0x35)]('🔑\x20[CONNECTIONS\x20HOOK]\x20Using\x20auth\x20token:',_0x440fb5[_0x3e94(0x36)](0x0,0x14)+_0x3e94(0x37));const _0x79b538=await getUserConnections();_0x547631[_0x3e94(0x38)](_0x3f779c,_0x79b538),console['log'](_0x547631['lViLQ'],_0x79b538['length']);}else return _0x281279['error'](_0x26f6b8[_0x3e94(0x39)],_0x5b79de),[];}catch(_0xf1b0e0){const _0x286221=_0x547631[_0x3e94(0x3a)](_0xf1b0e0,Error)?_0xf1b0e0[_0x3e94(0x2f)]:_0x547631[_0x3e94(0x30)];console[_0x3e94(0x31)](_0x547631[_0x3e94(0x32)],_0x286221),_0x547631['PmCQB'](_0x4f4f50,_0x286221),_0x547631[_0x3e94(0x3b)](_0x3f779c,[]);}finally{_0x547631[_0x3e94(0x2e)](_0xa4daad,![]);}},[]),_0x20f786=_0x547631[_0x3e94(0x1a)](useCallback,async()=>{if(_0x547631['bAypj'](_0x547631[_0x3e94(0x3c)],_0x547631[_0x3e94(0x3c)])){_0x1281e1['log']('🎯\x20[DEMO\x20MODE]\x20Reviewer\x20bypass\x20detected\x20-\x20skipping\x20API\x20call\x20for\x20demo'),_0x547631[_0x3e94(0x2e)](_0x21f354,[]),_0x547631['UpPJf'](_0x56647f,null);return;}else console[_0x3e94(0x35)](_0x3e94(0x3d)),await _0x547631[_0x3e94(0x3e)](_0xe0d781),console[_0x3e94(0x35)](_0x547631[_0x3e94(0x3f)]);},[_0xe0d781]),_0x37743c=useCallback(async _0x1b625c=>{const _0x534b1c={'jjvKP':function(_0x547d8e,_0x23375c){return _0x547631[_0x3e94(0x40)](_0x547d8e,_0x23375c);},'tVOJd':_0x547631['fPVUY'],'QTKRI':_0x547631[_0x3e94(0x41)]};if(_0x547631[_0x3e94(0x42)](_0x547631[_0x3e94(0x43)],_0x547631[_0x3e94(0x44)]))try{const _0x1a190f=await getAuthToken();if(!_0x1a190f){if(_0x547631[_0x3e94(0x45)](_0x547631['gnway'],_0x547631[_0x3e94(0x46)]))return console[_0x3e94(0x1d)](_0x547631[_0x3e94(0x47)]),[];else{_0x59e4ec[_0x3e94(0x31)]('❌\x20[CONNECTIONS\x20HOOK]\x20Unexpected\x20null\x20token\x20after\x20validation'),_0x534b1c[_0x3e94(0x48)](_0x4049c3,[]),_0xe5242b(_0x534b1c[_0x3e94(0x49)]);return;}}return console[_0x3e94(0x35)](_0x547631[_0x3e94(0x4a)],_0x1b625c),console['log'](_0x547631[_0x3e94(0x4b)],_0x1a190f[_0x3e94(0x36)](0x0,0x14)+'...'),await getUserConnectionsByUsername(_0x1b625c);}catch(_0x21440f){return console[_0x3e94(0x31)](_0x547631[_0x3e94(0x4c)],_0x21440f),[];}else return _0x2a37be[_0x3e94(0x31)](_0x534b1c[_0x3e94(0x4d)],_0x25fed2),![];},[]),_0x90d176=_0x547631[_0x3e94(0x4e)](useCallback,async _0x2e856a=>{if(_0x547631[_0x3e94(0x4f)]!==_0x547631['jLani'])return _0x21bd3c['warn'](_0x3e94(0x13)),[];else try{const _0x418b83=await getAuthToken();if(!_0x418b83)return console[_0x3e94(0x1d)](_0x3e94(0x50)),[];return console[_0x3e94(0x35)](_0x547631[_0x3e94(0x51)],_0x2e856a),console[_0x3e94(0x35)](_0x547631[_0x3e94(0x4b)],_0x418b83[_0x3e94(0x36)](0x0,0x14)+_0x3e94(0x37)),await _0x547631['UpPJf'](getUserConnectionsByUserId,_0x2e856a);}catch(_0x3f592d){return console['error']('❌\x20Error\x20fetching\x20connections\x20by\x20userId:',_0x3f592d),[];}},[]),_0x15a2ac=_0x547631[_0x3e94(0x52)](useCallback,async(_0x2569cf,_0x378122=_0x3e94(0x53))=>{try{console[_0x3e94(0x35)](_0x547631['nVEgd']);const _0x2f81c5=await _0x547631['XmTtc'](uploadProfilePicture,_0x2569cf,_0x378122);return _0x2f81c5[_0x3e94(0x54)];}catch(_0x2a4fba){return _0x547631[_0x3e94(0x55)]!==_0x547631['Xidxf']?(console[_0x3e94(0x31)](_0x547631[_0x3e94(0x41)],_0x2a4fba),![]):(_0x2c6083[_0x3e94(0x31)](_0x3e94(0x56),_0x10b45b),[]);}},[]);return _0x547631[_0x3e94(0x57)](useEffect,()=>{_0x547631[_0x3e94(0x23)](_0x547631['oJQlV'],_0x547631['kDmgW'])?_0x1fd83d(![]):_0x547631[_0x3e94(0x58)](_0xe0d781);},[_0xe0d781]),{'connections':_0x594abc,'isLoading':_0x10921f,'error':_0x4fd859,'refreshConnections':_0x20f786,'getConnectionsByUsername':_0x37743c,'getConnectionsByUserId':_0x90d176,'uploadUserProfilePicture':_0x15a2ac};};
|
package/lib/module/index.js
CHANGED
|
@@ -1,32 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Onairos React Native SDK
|
|
3
|
-
* A React Native implementation for Onairos personalized data integration
|
|
4
|
-
*
|
|
5
|
-
* PUBLIC API - Only expose what developers need
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
// Essential Types Only
|
|
9
|
-
|
|
10
|
-
// Core Components
|
|
11
|
-
export { OnairosButton } from './components/OnairosButton';
|
|
12
|
-
export { Onairos } from './components/Onairos';
|
|
13
|
-
|
|
14
|
-
// SDK Initialization
|
|
15
|
-
export { initializeApiKey, ADMIN_API_KEY, extractUsernameFromJWT, extractUserDataFromJWT, decodeJWTPayload } from './services/apiKeyService';
|
|
16
|
-
|
|
17
|
-
// Authentication & PIN Management
|
|
18
|
-
export {
|
|
19
|
-
// storePinAfterBiometric, // TODO: Commented out temporarily - biometric functionality disabled
|
|
20
|
-
getStoredJwtToken, clearStoredTokens, requestEmailVerification, verifyEmailCode, checkEmailVerificationStatus } from './services/platformAuthService';
|
|
21
|
-
|
|
22
|
-
// Programmatic Function (for custom buttons)
|
|
23
|
-
export { executeOnairosFlow } from './utils/programmaticFlow';
|
|
24
|
-
|
|
25
|
-
// Default export for convenience
|
|
26
|
-
import { OnairosButton } from './components/OnairosButton';
|
|
27
|
-
import { Onairos } from './components/Onairos';
|
|
28
|
-
export default {
|
|
29
|
-
OnairosButton,
|
|
30
|
-
Onairos
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
console[_0x424f(0x0)](_0x424f(0x1)),console[_0x424f(0x0)]('\uD83D\uDE80 [ONAIROS SDK] Source: onairos-npm-react-native/src/index.ts');export{OnairosButton}from'./components/OnairosButton';export{OnairosSignInButton}from'./components/OnairosSignInButton';export{Onairos}from'./components/Onairos';export{UniversalOnboarding}from'./components/UniversalOnboarding';export{OAuthWebView}from'./components/onboarding/OAuthWebView';export{PortalHost,Portal}from'./utils/Portal';export{default as WelcomeScreen}from'./components/WelcomeScreen';export{PrimaryButton}from'./components/PrimaryButton';function _0x537c(){var _0x17ea4d=['log','🚀\x20[ONAIROS\x20SDK]\x20LOCAL\x20SDK\x20LOADED\x20-\x20Version\x205.0.0-local-dev'];_0x537c=function(){return _0x17ea4d;};return _0x537c();}export{ModalSheet}from'./components/ModalSheet';export{ModalHeader}from'./components/ModalHeader';export{BrandMark}from'./components/BrandMark';export{HeadingGroup}from'./components/HeadingGroup';export{BodyText}from'./components/BodyText';export{SignInStep}from'./components/SignInStep';export{VerificationStep}from'./components/VerificationStep';export{default as PlatformConnectorsStep}from'./components/PlatformConnectorsStep';export{PersonalizationConsentScreen}from'./components/PersonalizationConsentScreen';export{PinCreationScreen}from'./components/PinCreationScreen';export{default as PersonaImage}from'./components/PersonaImage';export{useConnections}from'./hooks/useConnections';export{initializeApiKey}from'./services/apiKeyService';export{extractUsernameFromJWT,extractUserDataFromJWT,decodeJWTPayload}from'./services/apiKeyService';export{isAuthenticated}from'./services/authService';export{clearAllAuthTokens}from'./services/authService';export{updateGoogleClientIds}from'./services/googleAuthService';function _0x424f(_0x537c4f,_0x424f76){_0x537c4f=_0x537c4f-0x0;var _0x50b661=_0x537c();var _0x78b16b=_0x50b661[_0x537c4f];return _0x78b16b;}export{testApiConnectivity}from'./services/platformAuthService';export{runFullDiagnostics,isApiReachable,getNetworkStatus}from'./utils/networkDiagnostics';export{scrapeLinkedInProfile,extractLinkedInUsername,isValidLinkedInUrl,formatLinkedInUrl,canScrapeProfile,getLinkedInConnectionStatus}from'./services/linkedinScrapingService';export{parseExtractionMessage,initiateProfileScraping,checkScrapingStatus,validateExtractedUrl,completeLinkedInExtraction}from'./services/linkedinDOMExtractor';export{ApiClient}from'./services/apiClient';
|