@onairos/react-native 3.5.4 → 3.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +423 -423
- package/lib/commonjs/api/index.js +1 -1
- package/lib/commonjs/assets/images/Checkbox.svg +3 -3
- package/lib/commonjs/assets/images/EnochE.svg +19 -19
- package/lib/commonjs/assets/images/OnairosNewLogo.png +0 -0
- package/lib/commonjs/assets/images/Personalityprofile.svg +3 -3
- package/lib/commonjs/assets/images/Personalitytraits.svg +3 -3
- package/lib/commonjs/assets/images/Userpreferences.svg +3 -3
- package/lib/commonjs/assets/images/arrow.svg +20 -20
- package/lib/commonjs/assets/images/basicproficon.svg +43 -43
- package/lib/commonjs/assets/images/basicprofile.svg +3 -3
- package/lib/commonjs/assets/images/checkmark.svg +4 -4
- package/lib/commonjs/assets/images/contentanalysis.svg +3 -3
- package/lib/commonjs/assets/images/contenticon.svg +23 -23
- package/lib/commonjs/assets/images/personalityicon.svg +18 -18
- package/lib/commonjs/assets/images/x-close.svg +3 -3
- package/lib/commonjs/components/BodyText.js +1 -1
- package/lib/commonjs/components/BrandMark.js +1 -1
- package/lib/commonjs/components/CodeInput.js +1 -1
- package/lib/commonjs/components/EmailInput.js +1 -1
- package/lib/commonjs/components/GoogleButton.js +1 -1
- package/lib/commonjs/components/HeadingGroup.js +1 -1
- package/lib/commonjs/components/LLMDataInputModal.js +1 -1
- package/lib/commonjs/components/ModalHeader.js +1 -1
- package/lib/commonjs/components/ModalSheet.js +1 -1
- package/lib/commonjs/components/Onairos.js +1 -1
- package/lib/commonjs/components/OnairosButton.js +1 -1
- package/lib/commonjs/components/OnairosSignInButton.js +1 -1
- package/lib/commonjs/components/Overlay.js +1 -1
- package/lib/commonjs/components/PersonaImage.js +1 -1
- package/lib/commonjs/components/PersonaLoadingScreen.js +1 -1
- package/lib/commonjs/components/PersonalizationConsentScreen.js +1 -1
- package/lib/commonjs/components/PinCreationScreen.js +1 -1
- package/lib/commonjs/components/PinInput.js +1 -1
- package/lib/commonjs/components/PlatformConnectorsStep.js +3 -2
- package/lib/commonjs/components/PlatformList.js +1 -1
- package/lib/commonjs/components/PlatformToggle.js +1 -1
- package/lib/commonjs/components/PrimaryButton.js +1 -1
- package/lib/commonjs/components/SignInMatchAnimation.js +1 -1
- package/lib/commonjs/components/SignInStep.js +1 -1
- package/lib/commonjs/components/UniversalOnboarding.js +2 -1
- package/lib/commonjs/components/VerificationStep.js +1 -1
- package/lib/commonjs/components/WelcomeScreen.js +2 -1
- package/lib/commonjs/components/icons/Basicproficon.js +1 -1
- package/lib/commonjs/components/icons/Basicprofile.js +1 -1
- package/lib/commonjs/components/icons/Checkbox.js +1 -1
- package/lib/commonjs/components/icons/Checkmark.js +1 -1
- package/lib/commonjs/components/icons/Contentanalysis.js +1 -1
- package/lib/commonjs/components/icons/Contenticon.js +1 -1
- package/lib/commonjs/components/icons/EnochE.js +1 -1
- package/lib/commonjs/components/icons/Personalityicon.js +1 -1
- package/lib/commonjs/components/icons/Personalityprofile.js +1 -1
- package/lib/commonjs/components/icons/Personalitytraits.js +1 -1
- package/lib/commonjs/components/icons/Userpreferences.js +1 -1
- package/lib/commonjs/components/icons/index.js +1 -1
- package/lib/commonjs/components/onboarding/OAuthWebView.js +6 -2
- package/lib/commonjs/components/onboarding/OnboardingHeader.js +1 -1
- package/lib/commonjs/components/onboarding/PinInput.js +1 -1
- package/lib/commonjs/components/onboarding/PlatformConnector.js +1 -1
- package/lib/commonjs/config/api.js +1 -1
- package/lib/commonjs/constants/index.js +1 -1
- package/lib/commonjs/context/AuthContext.js +1 -1
- package/lib/commonjs/hooks/useConnectedAccounts.js +1 -1
- package/lib/commonjs/hooks/useConnections.js +1 -1
- package/lib/commonjs/hooks/useCredentials.js +1 -1
- package/lib/commonjs/hooks/useUserConnections.js +1 -1
- package/lib/commonjs/index.js +5 -6
- package/lib/commonjs/services/SDK_API_KEY_VALIDATION.md +421 -421
- package/lib/commonjs/services/apiClient.js +1 -1
- package/lib/commonjs/services/apiKeyService.js +1 -1
- package/lib/commonjs/services/authService.js +1 -1
- package/lib/commonjs/services/biometricPinService.js +1 -1
- package/lib/commonjs/services/chatGPTConversationExtractor.js +1 -1
- package/lib/commonjs/services/chatGPTConversationService.js +1 -1
- package/lib/commonjs/services/claudeConversationExtractor.js +1 -1
- package/lib/commonjs/services/claudeConversationService.js +1 -1
- package/lib/commonjs/services/connectedAccountsService.js +1 -1
- package/lib/commonjs/services/googleAuthService.js +1 -1
- package/lib/commonjs/services/hingeDataExtractor.js +8 -0
- package/lib/commonjs/services/hingeDataService.js +9 -0
- package/lib/commonjs/services/imageCompressionService.js +1 -1
- package/lib/commonjs/services/instagramDataExtractor.js +8 -0
- package/lib/commonjs/services/instagramDataService.js +9 -0
- package/lib/commonjs/services/jwtStorageService.js +1 -1
- package/lib/commonjs/services/linkedinDOMExtractor.js +1 -1
- package/lib/commonjs/services/linkedinProfileService.js +1 -1
- package/lib/commonjs/services/linkedinScrapingService.js +1 -1
- package/lib/commonjs/services/llmDataStorage.js +1 -1
- package/lib/commonjs/services/mobileTrainingService.js +1 -1
- package/lib/commonjs/services/oauthService.js +1 -1
- package/lib/commonjs/services/pinEncryptionService.js +1 -1
- package/lib/commonjs/services/pinStorageUtils.js +1 -1
- package/lib/commonjs/services/platformAuthService.js +1 -1
- package/lib/commonjs/services/sephoraDataExtractor.js +8 -0
- package/lib/commonjs/services/sephoraDataService.js +9 -0
- package/lib/commonjs/services/storageService.js +1 -1
- package/lib/commonjs/services/telegramDataExtractor.js +8 -0
- package/lib/commonjs/services/telegramDataService.js +9 -0
- package/lib/commonjs/services/trainingApiHelpers.js +1 -1
- package/lib/commonjs/services/userConnectionsService.js +1 -1
- package/lib/commonjs/services/youtubeMigrationService.js +1 -1
- package/lib/commonjs/theme/index.js +1 -1
- package/lib/commonjs/types/index.js +1 -1
- package/lib/commonjs/types.js +1 -1
- package/lib/commonjs/utils/Portal.js +1 -1
- package/lib/commonjs/utils/api.js +1 -1
- package/lib/commonjs/utils/assetRegistry.js +2 -2
- package/lib/commonjs/utils/auth.js +1 -1
- package/lib/commonjs/utils/connectorTests.js +29 -0
- package/lib/commonjs/utils/crypto.js +1 -1
- package/lib/commonjs/utils/debugHelper.js +1 -1
- package/lib/commonjs/utils/encryption.js +1 -1
- package/lib/commonjs/utils/eventUtils.js +1 -1
- package/lib/commonjs/utils/haptics.js +1 -1
- package/lib/commonjs/utils/imagePreloader.js +1 -1
- package/lib/commonjs/utils/networkDiagnostics.js +1 -1
- package/lib/commonjs/utils/onairosApi.js +1 -1
- package/lib/commonjs/utils/programmaticFlow.js +1 -1
- package/lib/commonjs/utils/retryHelper.js +1 -1
- package/lib/commonjs/utils/secureStorage.js +1 -1
- package/lib/commonjs/utils/webviewScripts/chatgpt.js +1 -1
- package/lib/commonjs/utils/webviewScripts/claude.js +1 -1
- package/lib/commonjs/utils/webviewScripts/hinge.js +1 -0
- package/lib/commonjs/utils/webviewScripts/index.js +6 -2
- package/lib/commonjs/utils/webviewScripts/instagram.js +1 -0
- package/lib/commonjs/utils/webviewScripts/linkedin.js +1 -1
- 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 -1
- package/lib/module/assets/images/Checkbox.svg +3 -3
- package/lib/module/assets/images/EnochE.svg +19 -19
- package/lib/module/assets/images/OnairosNewLogo.png +0 -0
- package/lib/module/assets/images/Personalityprofile.svg +3 -3
- package/lib/module/assets/images/Personalitytraits.svg +3 -3
- package/lib/module/assets/images/Userpreferences.svg +3 -3
- package/lib/module/assets/images/arrow.svg +20 -20
- package/lib/module/assets/images/basicproficon.svg +43 -43
- package/lib/module/assets/images/basicprofile.svg +3 -3
- package/lib/module/assets/images/checkmark.svg +4 -4
- package/lib/module/assets/images/contentanalysis.svg +3 -3
- package/lib/module/assets/images/contenticon.svg +23 -23
- package/lib/module/assets/images/personalityicon.svg +18 -18
- package/lib/module/assets/images/x-close.svg +3 -3
- package/lib/module/components/BodyText.js +1 -1
- package/lib/module/components/BrandMark.js +1 -1
- package/lib/module/components/CodeInput.js +1 -1
- package/lib/module/components/EmailInput.js +1 -1
- package/lib/module/components/GoogleButton.js +1 -1
- package/lib/module/components/HeadingGroup.js +1 -1
- package/lib/module/components/LLMDataInputModal.js +1 -1
- package/lib/module/components/ModalHeader.js +1 -1
- package/lib/module/components/ModalSheet.js +1 -1
- package/lib/module/components/Onairos.js +1 -1
- package/lib/module/components/OnairosButton.js +1 -1
- package/lib/module/components/OnairosSignInButton.js +1 -1
- package/lib/module/components/Overlay.js +1 -1
- package/lib/module/components/PersonaImage.js +1 -1
- package/lib/module/components/PersonaLoadingScreen.js +1 -1
- package/lib/module/components/PersonalizationConsentScreen.js +1 -1
- package/lib/module/components/PinCreationScreen.js +1 -1
- package/lib/module/components/PinInput.js +1 -1
- package/lib/module/components/PlatformConnectorsStep.js +7 -1
- package/lib/module/components/PlatformList.js +1 -1
- package/lib/module/components/PlatformToggle.js +1 -1
- package/lib/module/components/PrimaryButton.js +1 -1
- package/lib/module/components/SignInMatchAnimation.js +1 -1
- package/lib/module/components/SignInStep.js +1 -1
- package/lib/module/components/UniversalOnboarding.js +1 -1
- package/lib/module/components/VerificationStep.js +1 -1
- package/lib/module/components/WelcomeScreen.js +1 -1
- package/lib/module/components/icons/Basicproficon.js +1 -1
- package/lib/module/components/icons/Basicprofile.js +1 -1
- package/lib/module/components/icons/Checkbox.js +1 -1
- package/lib/module/components/icons/Checkmark.js +1 -1
- package/lib/module/components/icons/Contentanalysis.js +1 -1
- package/lib/module/components/icons/Contenticon.js +1 -1
- package/lib/module/components/icons/EnochE.js +1 -1
- package/lib/module/components/icons/Personalityicon.js +1 -1
- package/lib/module/components/icons/Personalityprofile.js +1 -1
- package/lib/module/components/icons/Personalitytraits.js +1 -1
- package/lib/module/components/icons/Userpreferences.js +1 -1
- package/lib/module/components/onboarding/OAuthWebView.js +1 -1
- package/lib/module/components/onboarding/OnboardingHeader.js +1 -1
- package/lib/module/components/onboarding/PinInput.js +1 -1
- package/lib/module/components/onboarding/PlatformConnector.js +1 -1
- package/lib/module/config/api.js +1 -1
- package/lib/module/constants/index.js +1 -1
- package/lib/module/context/AuthContext.js +1 -1
- package/lib/module/hooks/useConnectedAccounts.js +1 -1
- package/lib/module/hooks/useConnections.js +1 -1
- package/lib/module/hooks/useCredentials.js +1 -1
- package/lib/module/hooks/useUserConnections.js +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/services/SDK_API_KEY_VALIDATION.md +421 -421
- package/lib/module/services/apiClient.js +1 -1
- package/lib/module/services/apiKeyService.js +1 -1
- package/lib/module/services/authService.js +1 -1
- package/lib/module/services/biometricPinService.js +1 -1
- package/lib/module/services/chatGPTConversationExtractor.js +1 -1
- package/lib/module/services/chatGPTConversationService.js +1 -1
- package/lib/module/services/claudeConversationExtractor.js +1 -1
- package/lib/module/services/claudeConversationService.js +1 -1
- package/lib/module/services/connectedAccountsService.js +1 -1
- package/lib/module/services/googleAuthService.js +1 -1
- package/lib/module/services/hingeDataExtractor.js +1 -0
- package/lib/module/services/hingeDataService.js +1 -0
- package/lib/module/services/imageCompressionService.js +1 -1
- package/lib/module/services/instagramDataExtractor.js +1 -0
- package/lib/module/services/instagramDataService.js +1 -0
- package/lib/module/services/jwtStorageService.js +1 -1
- package/lib/module/services/linkedinDOMExtractor.js +1 -1
- package/lib/module/services/linkedinProfileService.js +1 -1
- package/lib/module/services/linkedinScrapingService.js +1 -1
- package/lib/module/services/llmDataStorage.js +1 -1
- package/lib/module/services/mobileTrainingService.js +1 -1
- package/lib/module/services/oauthService.js +1 -1
- package/lib/module/services/pinEncryptionService.js +1 -1
- package/lib/module/services/pinStorageUtils.js +1 -1
- package/lib/module/services/platformAuthService.js +1 -1
- package/lib/module/services/sephoraDataExtractor.js +1 -0
- package/lib/module/services/sephoraDataService.js +1 -0
- package/lib/module/services/storageService.js +1 -1
- package/lib/module/services/telegramDataExtractor.js +1 -0
- package/lib/module/services/telegramDataService.js +1 -0
- package/lib/module/services/trainingApiHelpers.js +1 -1
- package/lib/module/services/userConnectionsService.js +1 -1
- package/lib/module/services/youtubeMigrationService.js +1 -1
- package/lib/module/theme/index.js +1 -1
- package/lib/module/types.js +1 -1
- package/lib/module/utils/Portal.js +1 -1
- package/lib/module/utils/api.js +1 -1
- package/lib/module/utils/assetRegistry.js +2 -2
- package/lib/module/utils/auth.js +1 -1
- package/lib/module/utils/connectorTests.js +28 -0
- package/lib/module/utils/crypto.js +1 -1
- package/lib/module/utils/debugHelper.js +1 -1
- package/lib/module/utils/encryption.js +1 -1
- package/lib/module/utils/eventUtils.js +1 -1
- package/lib/module/utils/haptics.js +1 -1
- package/lib/module/utils/networkDiagnostics.js +1 -1
- package/lib/module/utils/onairosApi.js +1 -1
- package/lib/module/utils/programmaticFlow.js +1 -1
- package/lib/module/utils/retryHelper.js +1 -1
- package/lib/module/utils/secureStorage.js +1 -1
- package/lib/module/utils/webviewScripts/chatgpt.js +1 -1
- package/lib/module/utils/webviewScripts/claude.js +1 -1
- package/lib/module/utils/webviewScripts/hinge.js +1 -0
- package/lib/module/utils/webviewScripts/index.js +1 -1
- package/lib/module/utils/webviewScripts/instagram.js +1 -0
- package/lib/module/utils/webviewScripts/linkedin.js +1 -1
- package/lib/module/utils/webviewScripts/sephora.js +1 -0
- package/lib/module/utils/webviewScripts/telegram.js +1 -0
- package/package.json +1 -1
|
@@ -5,4 +5,4 @@ var __ONAIROS_REQ_REGISTRY__ = [
|
|
|
5
5
|
require("../config/api")
|
|
6
6
|
];
|
|
7
7
|
function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
|
|
8
|
-
Object[_0x315d(0x0)](exports,_0x315d(0x1),{'value':!![]}),exports[_0x315d(0x2)]=exports[_0x315d(0x3)]=exports['sendLLMDataToBackend']=exports['requestLLMDataForDeveloper']=exports[_0x315d(0x4)]=exports['getLLMMetadata']=exports[_0x315d(0x5)]=exports['getAllLLMDataKeys']=exports[_0x315d(0x6)]=exports[_0x315d(0x7)]=void 0x0;var _asyncStorage=_interopRequireDefault(__ONAIROS_REQ_FUNC__(0x0)),_api=__ONAIROS_REQ_FUNC__(0x1);function _interopRequireDefault(_0x405b2e){return _0x405b2e&&_0x405b2e['__esModule']?_0x405b2e:{'default':_0x405b2e};}const LLM_DATA_STORAGE_KEY='@onairos:llm_data',LLM_METADATA_STORAGE_KEY=_0x315d(0x8),storeLLMData=async _0x331a4b=>{const _0x88d394={'RtUvK':_0x315d(0x9),'NrXvQ':function(_0x92eb54,_0x20f1bd){return _0x92eb54===_0x20f1bd;},'VRTgl':'OiDPW','qAJtQ':'connected','TvSJn':_0x315d(0xa),'xUVNU':function(_0x1d8392,_0x518441){return _0x1d8392!==_0x518441;}};try{if(_0x88d394[_0x315d(0xb)](_0x88d394['VRTgl'],_0x315d(0xc)))return _0x324be3[_0x315d(0xd)](_0x88d394[_0x315d(0xe)],_0x8e6443),![];else{console[_0x315d(0xf)](_0x315d(0x10)),await _asyncStorage[_0x315d(0x11)][_0x315d(0x12)](LLM_DATA_STORAGE_KEY+':'+_0x331a4b[_0x315d(0x13)],JSON['stringify'](_0x331a4b));const _0x41872b={'userId':_0x331a4b['userId'],'email':_0x331a4b['email'],'appName':_0x331a4b[_0x315d(0x14)],'timestamp':_0x331a4b['timestamp'],'hasData':!![],'dataSize':JSON[_0x315d(0x15)](_0x331a4b['data'])[_0x315d(0x16)],'connectionStatus':_0x88d394['qAJtQ']};return await _asyncStorage[_0x315d(0x11)][_0x315d(0x12)](LLM_METADATA_STORAGE_KEY+':'+_0x331a4b['userId'],JSON[_0x315d(0x15)](_0x41872b)),console[_0x315d(0xf)](_0x88d394[_0x315d(0x17)]),console[_0x315d(0xf)](_0x315d(0x18)+_0x41872b['dataSize']+_0x315d(0x19)),!![];}}catch(_0x4dfb41){return _0x88d394['xUVNU']('YCAgk','pDRlX')?(console[_0x315d(0xd)](_0x88d394[_0x315d(0xe)],_0x4dfb41),![]):_0x5df54e&&_0xdb6fb3['__esModule']?_0xbf0d43:{'default':_0x2b2eac};}};exports[_0x315d(0x3)]=storeLLMData;function _0x3382(){const _0x18ebcf=['defineProperty','__esModule','updateLLMStatus','storeLLMData','hasOnlyLLMConnection','getLLMData','formatLLMDataForDeveloper','clearLLMData','@onairos:llm_metadata','❌\x20Failed\x20to\x20store\x20LLM\x20data:','✅\x20LLM\x20data\x20stored\x20locally\x20successfully','NrXvQ','ygnky','error','RtUvK','log','💾\x20Storing\x20LLM\x20data\x20locally\x20(temporary)...','default','setItem','userId','appName','stringify','length','TvSJn','📊\x20Data\x20size:\x20','\x20bytes','uWajh','ℹ️\x20No\x20LLM\x20data\x20found\x20for\x20user:','❌\x20Failed\x20to\x20retrieve\x20LLM\x20data:','iRRmu','HdOFu','nLPau','getItem','warn','⚠️\x20No\x20LLM\x20metadata\x20found\x20for\x20user:','CdduT','Makky','Maekt','wUksm','parse','getLLMMetadata','KkCNw','❌\x20Failed\x20to\x20update\x20LLM\x20status:','iPuEW','UiLRF','connectionStatus','✅\x20Updated\x20LLM\x20status\x20to:\x20','etJuN','GlbWm','❌\x20Failed\x20to\x20get\x20LLM\x20data\x20keys:','iuDot','eAHgd','❌\x20Failed\x20to\x20clear\x20LLM\x20data:','CvrLF','PZYKX','tVZyi','removeItem','JbVbw','fGDLQ','chatgpt','🔍\x20Platform\x20connection\x20check:','entries','map','includes','llm','fhutt','email','timestamp','data','conversations','chatHistory','preferences','❌\x20Failed\x20to\x20retrieve\x20LLM\x20metadata:','📡\x20Sending\x20LLM\x20data\x20to\x20backend\x20for\x20processing...','✅\x20Backend\x20received\x20and\x20stored\x20LLM\x20data:','❌\x20Backend\x20data\x20ingestion\x20failed:','UtThp','EgRcN','❌\x20Failed\x20to\x20send\x20data\x20to\x20backend:','Unknown\x20error','tVQmN','VZWna','cdSbv','API_CONFIG','/llmdata','YYpjE','Bearer\x20','LGESP','toISOString','accessToken','refreshToken','tokenExpiry','1.0','message','text','rMFqJ','status','Backend\x20error:\x20','XmCeh','IOBGf','XKNkP','pQlrc','MPZus','sendLLMDataToBackend','❌\x20Failed\x20to\x20request\x20LLM\x20data\x20from\x20backend:','dUOvP','✅\x20Backend\x20processing\x20LLM\x20data\x20request:','uyHpQ','gyghA','❌\x20Failed\x20to\x20request\x20LLM\x20data:','KltsL','dJxcz','BASE_URL','apiUrl','token','YFAGM','krtWN','YSmZo','ZerNg','CnSlQ','byIjV','XGjwC','requestLLMDataForDeveloper','getAllKeys','startsWith','getAllLLMDataKeys'];_0x3382=function(){return _0x18ebcf;};return _0x3382();}const getLLMData=async _0x301389=>{const _0x5ef1a1={'iRRmu':function(_0x53d2ad,_0x172a42){return _0x53d2ad!==_0x172a42;},'HdOFu':_0x315d(0x1a),'roqOp':_0x315d(0x1b),'CdduT':_0x315d(0x1c)};try{if(_0x5ef1a1[_0x315d(0x1d)](_0x5ef1a1[_0x315d(0x1e)],_0x315d(0x1f))){const _0x4ee0d9=await _asyncStorage[_0x315d(0x11)][_0x315d(0x20)](LLM_DATA_STORAGE_KEY+':'+_0x301389);if(!_0x4ee0d9)return console[_0x315d(0xf)](_0x5ef1a1['roqOp'],_0x301389),null;const _0x28978f=JSON['parse'](_0x4ee0d9);return console[_0x315d(0xf)]('✅\x20Retrieved\x20LLM\x20data\x20for\x20user:',_0x301389),_0x28978f;}else return _0x371ff8[_0x315d(0x21)](_0x315d(0x22),_0x3f0310),![];}catch(_0x4ac521){return console['error'](_0x5ef1a1[_0x315d(0x23)],_0x4ac521),null;}};exports[_0x315d(0x5)]=getLLMData;const getLLMMetadata=async _0x4a7182=>{const _0x212bef={'Maekt':function(_0xe8a599,_0x207a9b){return _0xe8a599===_0x207a9b;},'wUksm':_0x315d(0x24),'uNQTQ':'zLMEd'};try{if(_0x212bef[_0x315d(0x25)](_0x212bef[_0x315d(0x26)],_0x212bef['uNQTQ']))return null;else{const _0x2eed48=await _asyncStorage['default'][_0x315d(0x20)](LLM_METADATA_STORAGE_KEY+':'+_0x4a7182);if(!_0x2eed48)return null;return JSON[_0x315d(0x27)](_0x2eed48);}}catch(_0x53d000){return console[_0x315d(0xd)]('❌\x20Failed\x20to\x20retrieve\x20LLM\x20metadata:',_0x53d000),null;}};function _0x315d(_0x3382de,_0x315d24){_0x3382de=_0x3382de-0x0;const _0x56f97f=_0x3382();let _0x28d84e=_0x56f97f[_0x3382de];return _0x28d84e;}exports[_0x315d(0x28)]=getLLMMetadata;const updateLLMStatus=async(_0x2bfeaf,_0x55d4d7)=>{const _0xeae436={'etJuN':'❌\x20Failed\x20to\x20clear\x20LLM\x20data:','iPuEW':_0x315d(0x29),'UiLRF':function(_0x422fde,_0x4730af){return _0x422fde(_0x4730af);},'kcTOS':'⚠️\x20No\x20LLM\x20metadata\x20found\x20for\x20user:','GlbWm':_0x315d(0x2a)};try{if(_0xeae436[_0x315d(0x2b)]===_0xeae436[_0x315d(0x2b)]){const _0x5491b7=await _0xeae436[_0x315d(0x2c)](getLLMMetadata,_0x2bfeaf);if(!_0x5491b7)return console[_0x315d(0x21)](_0xeae436['kcTOS'],_0x2bfeaf),![];return _0x5491b7[_0x315d(0x2d)]=_0x55d4d7,await _asyncStorage[_0x315d(0x11)]['setItem'](LLM_METADATA_STORAGE_KEY+':'+_0x2bfeaf,JSON['stringify'](_0x5491b7)),console[_0x315d(0xf)](_0x315d(0x2e)+_0x55d4d7),!![];}else return _0x244779['error'](_0xeae436[_0x315d(0x2f)],_0x29eebd),![];}catch(_0xba586c){return console[_0x315d(0xd)](_0xeae436[_0x315d(0x30)],_0xba586c),![];}};exports[_0x315d(0x2)]=updateLLMStatus;const clearLLMData=async _0x33b3b7=>{const _0x562220={'tVZyi':_0x315d(0x31),'CvrLF':function(_0x5c9133,_0x2e99d2){return _0x5c9133===_0x2e99d2;},'PRXjN':_0x315d(0x32),'PZYKX':_0x315d(0x33),'JbVbw':'✅\x20LLM\x20data\x20cleared\x20for\x20user:','fGDLQ':_0x315d(0x34)};try{return _0x562220[_0x315d(0x35)](_0x562220['PRXjN'],_0x562220[_0x315d(0x36)])?(_0x3f830d[_0x315d(0xd)](_0x562220[_0x315d(0x37)],_0x851961),[]):(await _asyncStorage[_0x315d(0x11)][_0x315d(0x38)](LLM_DATA_STORAGE_KEY+':'+_0x33b3b7),await _asyncStorage[_0x315d(0x11)][_0x315d(0x38)](LLM_METADATA_STORAGE_KEY+':'+_0x33b3b7),console[_0x315d(0xf)](_0x562220[_0x315d(0x39)],_0x33b3b7),!![]);}catch(_0x17bf5f){return console['error'](_0x562220[_0x315d(0x3a)],_0x17bf5f),![];}};exports['clearLLMData']=clearLLMData;const hasOnlyLLMConnection=_0x378f39=>{const _0x5b1f91={'fhutt':_0x315d(0x3b),'TCIIJ':_0x315d(0x3c)},_0x37c778=Object[_0x315d(0x3d)](_0x378f39)['filter'](([_0x236323,_0x3b87d9])=>_0x3b87d9)[_0x315d(0x3e)](([_0x1e8031,_0x218955])=>_0x1e8031),_0x5be621=_0x37c778[_0x315d(0x3f)](_0x315d(0x40))||_0x37c778[_0x315d(0x3f)](_0x5b1f91[_0x315d(0x41)]),_0x4fa9ca=_0x37c778[_0x315d(0x16)]===0x1&&_0x5be621;return console[_0x315d(0xf)](_0x5b1f91['TCIIJ'],{'connectedPlatforms':_0x37c778,'hasLLM':_0x5be621,'onlyLLM':_0x4fa9ca}),_0x4fa9ca;};exports[_0x315d(0x4)]=hasOnlyLLMConnection;const formatLLMDataForDeveloper=_0x624f62=>{const _0x334474={'TzyPs':_0x315d(0x40),'KIxez':'chatgpt'};return{'platform':_0x334474['TzyPs'],'userId':_0x624f62[_0x315d(0x13)],'email':_0x624f62[_0x315d(0x42)],'timestamp':_0x624f62[_0x315d(0x43)],'data':{'type':_0x334474['KIxez'],'conversations':_0x624f62[_0x315d(0x44)][_0x315d(0x45)]||[],'chatHistory':_0x624f62[_0x315d(0x44)][_0x315d(0x46)]||[],'preferences':_0x624f62[_0x315d(0x44)][_0x315d(0x47)]||{},'customData':_0x624f62[_0x315d(0x44)]['customData']||{}},'metadata':{'appName':_0x624f62[_0x315d(0x14)],'collectedAt':new Date(_0x624f62[_0x315d(0x43)])['toISOString'](),'dataVersion':'1.0'}};};exports['formatLLMDataForDeveloper']=formatLLMDataForDeveloper;const sendLLMDataToBackend=async(_0x36d889,_0x475901)=>{const _0x23710f={'XmCeh':_0x315d(0x48),'MPZus':_0x315d(0x1b),'cdSbv':_0x315d(0x49),'YYpjE':function(_0x444d57,_0x161c26){return _0x444d57&&_0x161c26;},'LGESP':'llm','sSMhE':_0x315d(0x4a),'rMFqJ':_0x315d(0x4b),'IOBGf':function(_0x44473e,_0x3c478d){return _0x44473e!==_0x3c478d;},'mddWL':_0x315d(0x4c),'BraUN':_0x315d(0x4d),'XKNkP':_0x315d(0x4e),'pQlrc':_0x315d(0x4f)};try{if(_0x315d(0x50)!==_0x315d(0x51)){console[_0x315d(0xf)](_0x23710f[_0x315d(0x52)]);const _0xcf0a56=await fetch(_api[_0x315d(0x53)]['BASE_URL']+_0x315d(0x54),{'method':'POST','headers':{'Content-Type':'application/json',..._0x23710f[_0x315d(0x55)](_0x475901,{'Authorization':_0x315d(0x56)+_0x475901})},'body':JSON[_0x315d(0x15)]({'userId':_0x36d889[_0x315d(0x13)],'email':_0x36d889[_0x315d(0x42)],'appName':_0x36d889[_0x315d(0x14)],'platform':_0x23710f[_0x315d(0x57)],'connectionType':_0x315d(0x3b),'timestamp':new Date()[_0x315d(0x58)](),'data':_0x36d889[_0x315d(0x44)],'accessToken':_0x36d889[_0x315d(0x59)],'refreshToken':_0x36d889[_0x315d(0x5a)],'tokenExpiry':_0x36d889[_0x315d(0x5b)],'metadata':{'collectedAt':new Date(_0x36d889['timestamp'])['toISOString'](),'dataVersion':_0x315d(0x5c)}})});if(_0xcf0a56['ok']){const _0x4a5150=await _0xcf0a56['json']();return console[_0x315d(0xf)](_0x23710f['sSMhE'],_0x4a5150),{'success':!![],'message':_0x4a5150[_0x315d(0x5d)],'connectionId':_0x4a5150['connectionId']};}else{const _0x36a779=await _0xcf0a56[_0x315d(0x5e)]();return console[_0x315d(0xd)](_0x23710f[_0x315d(0x5f)],_0xcf0a56[_0x315d(0x60)],_0x36a779),{'success':![],'message':_0x315d(0x61)+_0xcf0a56[_0x315d(0x60)]};}}else return _0x3c016f[_0x315d(0xd)](_0x23710f[_0x315d(0x62)],_0x577ba6),null;}catch(_0x5712d0){return _0x23710f[_0x315d(0x63)](_0x23710f['mddWL'],_0x23710f['BraUN'])?(console[_0x315d(0xd)](_0x23710f[_0x315d(0x64)],_0x5712d0),{'success':![],'message':_0x5712d0 instanceof Error?_0x5712d0[_0x315d(0x5d)]:_0x23710f[_0x315d(0x65)]}):(_0x3c0a77['log'](_0x23710f[_0x315d(0x66)],_0x1f5b5e),null);}};exports[_0x315d(0x67)]=sendLLMDataToBackend;const requestLLMDataForDeveloper=async(_0x546c60,_0x5967a0,_0x290bf4,_0x58ebc7,_0x3af542)=>{const _0xfbc708={'XGjwC':_0x315d(0x68),'ZerNg':function(_0x585bf5,_0xbaaec7){return _0x585bf5 instanceof _0xbaaec7;},'CnSlQ':_0x315d(0x4f),'byIjV':'❌\x20Failed\x20to\x20retrieve\x20LLM\x20data:','KltsL':_0x315d(0x69),'efvuf':'📤\x20Requesting\x20backend\x20to\x20send\x20LLM\x20data\x20to\x20developer...','dJxcz':function(_0x2e7f94,_0x341004,_0x30dcfe){return _0x2e7f94(_0x341004,_0x30dcfe);},'qMTKW':_0x315d(0x6a),'YFAGM':_0x315d(0x6b),'krtWN':_0x315d(0x6c),'YSmZo':_0x315d(0x6d)};try{if(_0xfbc708[_0x315d(0x6e)]===_0xfbc708[_0x315d(0x6e)]){console[_0x315d(0xf)](_0xfbc708['efvuf']);const _0x3cde7b=await _0xfbc708[_0x315d(0x6f)](fetch,_api[_0x315d(0x53)][_0x315d(0x70)]+'/llmdata/request',{'method':'POST','headers':{'Content-Type':'application/json','Authorization':_0x315d(0x56)+_0x3af542},'body':JSON['stringify']({'userId':_0x546c60,'email':_0x5967a0,'appName':_0x290bf4,'requestedData':_0x58ebc7,'timestamp':new Date()[_0x315d(0x58)]()})});if(_0x3cde7b['ok']){const _0x577798=await _0x3cde7b['json']();return console['log'](_0xfbc708['qMTKW'],_0x577798),{'success':!![],'message':_0x577798[_0x315d(0x5d)],'apiUrl':_0x577798[_0x315d(0x71)],'token':_0x577798[_0x315d(0x72)]};}else{if(_0xfbc708[_0x315d(0x73)]!==_0xfbc708[_0x315d(0x74)]){const _0x1f0139=await _0x3cde7b[_0x315d(0x5e)]();return console[_0x315d(0xd)](_0xfbc708[_0x315d(0x75)],_0x3cde7b['status'],_0x1f0139),{'success':![],'message':_0x315d(0x61)+_0x3cde7b[_0x315d(0x60)]};}else return _0x277945['error'](_0xfbc708['XGjwC'],_0x36c6b4),{'success':![],'message':_0xfbc708[_0x315d(0x76)](_0x437b4e,_0x55779d)?_0x19d9f7[_0x315d(0x5d)]:_0xfbc708[_0x315d(0x77)]};}}else return _0x4e2bc0[_0x315d(0xd)](_0xfbc708[_0x315d(0x78)],_0x5bc79c),null;}catch(_0x1406c1){return console[_0x315d(0xd)](_0xfbc708[_0x315d(0x79)],_0x1406c1),{'success':![],'message':_0xfbc708[_0x315d(0x76)](_0x1406c1,Error)?_0x1406c1['message']:_0x315d(0x4f)};}};exports[_0x315d(0x7a)]=requestLLMDataForDeveloper;const getAllLLMDataKeys=async()=>{try{const _0x29348c=await _asyncStorage[_0x315d(0x11)][_0x315d(0x7b)](),_0x1f51fd=_0x29348c['filter'](_0x5763ee=>_0x5763ee[_0x315d(0x7c)](LLM_DATA_STORAGE_KEY)||_0x5763ee[_0x315d(0x7c)](LLM_METADATA_STORAGE_KEY));return _0x1f51fd;}catch(_0x5a4801){return console['error'](_0x315d(0x31),_0x5a4801),[];}};exports[_0x315d(0x7d)]=getAllLLMDataKeys;
|
|
8
|
+
Object[_0x5a5d(0x0)](exports,_0x5a5d(0x1),{'value':!![]}),exports['updateLLMStatus']=exports[_0x5a5d(0x2)]=exports[_0x5a5d(0x3)]=exports['requestLLMDataForDeveloper']=exports[_0x5a5d(0x4)]=exports[_0x5a5d(0x5)]=exports[_0x5a5d(0x6)]=exports['getAllLLMDataKeys']=exports[_0x5a5d(0x7)]=exports['clearLLMData']=void 0x0;var _asyncStorage=_interopRequireDefault(__ONAIROS_REQ_FUNC__(0x0)),_api=__ONAIROS_REQ_FUNC__(0x1);function _interopRequireDefault(_0x2c2d15){return _0x2c2d15&&_0x2c2d15[_0x5a5d(0x1)]?_0x2c2d15:{'default':_0x2c2d15};}const LLM_DATA_STORAGE_KEY=_0x5a5d(0x8),LLM_METADATA_STORAGE_KEY=_0x5a5d(0x9),storeLLMData=async _0x3c38f0=>{const _0x241f5e={'pRyCj':function(_0x2c89fb,_0x47b216){return _0x2c89fb!==_0x47b216;},'MAOai':_0x5a5d(0xa),'fwkdB':_0x5a5d(0xb),'DPRJU':_0x5a5d(0xc),'zLzHn':_0x5a5d(0xd)};try{if(_0x241f5e[_0x5a5d(0xe)](_0x241f5e[_0x5a5d(0xf)],_0x241f5e['fwkdB'])){console['log'](_0x5a5d(0x10)),await _asyncStorage[_0x5a5d(0x11)]['setItem'](LLM_DATA_STORAGE_KEY+':'+_0x3c38f0['userId'],JSON[_0x5a5d(0x12)](_0x3c38f0));const _0x2eebc7={'userId':_0x3c38f0[_0x5a5d(0x13)],'email':_0x3c38f0[_0x5a5d(0x14)],'appName':_0x3c38f0[_0x5a5d(0x15)],'timestamp':_0x3c38f0[_0x5a5d(0x16)],'hasData':!![],'dataSize':JSON['stringify'](_0x3c38f0[_0x5a5d(0x17)])[_0x5a5d(0x18)],'connectionStatus':_0x5a5d(0x19)};return await _asyncStorage['default'][_0x5a5d(0x1a)](LLM_METADATA_STORAGE_KEY+':'+_0x3c38f0['userId'],JSON['stringify'](_0x2eebc7)),console[_0x5a5d(0x1b)](_0x241f5e['DPRJU']),console[_0x5a5d(0x1b)](_0x5a5d(0x1c)+_0x2eebc7[_0x5a5d(0x1d)]+_0x5a5d(0x1e)),!![];}else return _0x4f8e6c&&_0x5a7236['__esModule']?_0x12af70:{'default':_0x75e20f};}catch(_0x4a79d7){return console[_0x5a5d(0x1f)](_0x241f5e['zLzHn'],_0x4a79d7),![];}};exports['storeLLMData']=storeLLMData;const getLLMData=async _0x3ff6ea=>{const _0x52af51={'VtNti':_0x5a5d(0x20),'rRWMU':_0x5a5d(0x21),'UxSkp':function(_0x4407bf,_0x1278f6){return _0x4407bf!==_0x1278f6;},'mMjgq':_0x5a5d(0x22),'lKHje':_0x5a5d(0x23),'ERAxJ':_0x5a5d(0x24)};try{if(_0x52af51['UxSkp'](_0x52af51['mMjgq'],_0x5a5d(0x25))){const _0x529d2f=await _asyncStorage[_0x5a5d(0x11)][_0x5a5d(0x26)](LLM_DATA_STORAGE_KEY+':'+_0x3ff6ea);if(!_0x529d2f)return _0x52af51['UxSkp'](_0x52af51[_0x5a5d(0x27)],_0x52af51[_0x5a5d(0x27)])?(_0x1dc617[_0x5a5d(0x1b)](_0x52af51[_0x5a5d(0x28)],_0x348607),null):(console[_0x5a5d(0x1b)](_0x52af51[_0x5a5d(0x28)],_0x3ff6ea),null);const _0x22021e=JSON[_0x5a5d(0x29)](_0x529d2f);return console['log'](_0x5a5d(0x2a),_0x3ff6ea),_0x22021e;}else return _0x420a9a[_0x5a5d(0x1f)](_0x52af51[_0x5a5d(0x2b)],_0x4e1047),![];}catch(_0x3096b7){return console[_0x5a5d(0x1f)](_0x52af51[_0x5a5d(0x2c)],_0x3096b7),null;}};exports['getLLMData']=getLLMData;const getLLMMetadata=async _0x18b220=>{const _0x4a37f5={'RtXFq':'❌\x20Failed\x20to\x20retrieve\x20LLM\x20metadata:','DNENx':function(_0x34f5e8,_0x441e05){return _0x34f5e8!==_0x441e05;},'hhYQQ':_0x5a5d(0x2d),'wIxbp':function(_0x42438d,_0x24fc04){return _0x42438d===_0x24fc04;},'jLxxO':_0x5a5d(0x2e),'hoLge':function(_0x286abf,_0x31f5db){return _0x286abf===_0x31f5db;},'CkRkz':_0x5a5d(0x2f)};try{if(_0x4a37f5[_0x5a5d(0x30)](_0x4a37f5[_0x5a5d(0x31)],'DNfBM')){const _0x1a9260=await _asyncStorage[_0x5a5d(0x11)][_0x5a5d(0x26)](LLM_METADATA_STORAGE_KEY+':'+_0x18b220);if(!_0x1a9260)return _0x4a37f5[_0x5a5d(0x32)](_0x5a5d(0x33),_0x4a37f5[_0x5a5d(0x34)])?(_0x2a9e69[_0x5a5d(0x35)](_0x5a5d(0x36),_0x557c46),![]):null;return JSON['parse'](_0x1a9260);}else return _0x5a4135['error']('❌\x20Failed\x20to\x20retrieve\x20LLM\x20data:',_0x26849c),null;}catch(_0x176b00){return _0x4a37f5[_0x5a5d(0x37)](_0x4a37f5[_0x5a5d(0x38)],_0x4a37f5['CkRkz'])?(console[_0x5a5d(0x1f)](_0x4a37f5[_0x5a5d(0x39)],_0x176b00),null):(_0x227b9e[_0x5a5d(0x1f)](_0x4a37f5[_0x5a5d(0x39)],_0x5d3570),null);}};exports['getLLMMetadata']=getLLMMetadata;function _0x38e6(){const _0x36cb6a=['defineProperty','__esModule','storeLLMData','sendLLMDataToBackend','hasOnlyLLMConnection','getLLMMetadata','getLLMData','formatLLMDataForDeveloper','@onairos:llm_data','@onairos:llm_metadata','qxCJz','FKXnq','✅\x20LLM\x20data\x20stored\x20locally\x20successfully','❌\x20Failed\x20to\x20store\x20LLM\x20data:','pRyCj','MAOai','💾\x20Storing\x20LLM\x20data\x20locally\x20(temporary)...','default','stringify','userId','email','appName','timestamp','data','length','connected','setItem','log','📊\x20Data\x20size:\x20','dataSize','\x20bytes','error','ℹ️\x20No\x20LLM\x20data\x20found\x20for\x20user:','❌\x20Failed\x20to\x20clear\x20LLM\x20data:','dBOLm','gtpXc','❌\x20Failed\x20to\x20retrieve\x20LLM\x20data:','whabE','getItem','lKHje','VtNti','parse','✅\x20Retrieved\x20LLM\x20data\x20for\x20user:','rRWMU','ERAxJ','oBAWn','pDNjm','uZAHi','DNENx','hhYQQ','wIxbp','pvCZY','jLxxO','warn','⚠️\x20No\x20LLM\x20metadata\x20found\x20for\x20user:','hoLge','CkRkz','RtXFq','CRsLI','GZjCl','lOYpL','qUeTc','vmSTu','obXTS','IdGHV','connectionStatus','✅\x20Updated\x20LLM\x20status\x20to:\x20','MiKdQ','❌\x20Failed\x20to\x20update\x20LLM\x20status:','HQDpW','yMAdH','✅\x20LLM\x20data\x20cleared\x20for\x20user:','iXLWF','fOPBx','RpcXN','removeItem','tyRdb','entries','filter','map','llm','includes','srcfx','YhhNM','YlIJJ','Bhsmw','HbOrp','clearLLMData','🔍\x20Platform\x20connection\x20check:','ZHSYJ','CiFwL','1.0','vTdil','conversations','chatHistory','preferences','customData','tpuZz','chatgpt','✅\x20Backend\x20received\x20and\x20stored\x20LLM\x20data:','UxUhi','❌\x20Backend\x20data\x20ingestion\x20failed:','❌\x20Failed\x20to\x20send\x20data\x20to\x20backend:','prwQM','kkudr','BASE_URL','/llmdata','TGDJD','IYkNA','toISOString','refreshToken','EPzlr','json','KTnLM','message','rlYuw','text','status','Backend\x20error:\x20','yBUsa','CjDHd','qfWeW','VlhfG','wKfOg','✅\x20Backend\x20processing\x20LLM\x20data\x20request:','❌\x20Failed\x20to\x20request\x20LLM\x20data:','RMKQN','QTNgG','HbllR','rDrIV','JDAHf','📤\x20Requesting\x20backend\x20to\x20send\x20LLM\x20data\x20to\x20developer...','/llmdata/request','xUosA','IUpLf','VSgqi','ChKQB','vjmHO','kPAfa','Unknown\x20error','startsWith','HBnAs','THmim','oMGOo','CDZpA','dAljk','ihign'];_0x38e6=function(){return _0x36cb6a;};return _0x38e6();}const updateLLMStatus=async(_0x20ae73,_0x384d46)=>{const _0x15a647={'IdGHV':'❌\x20Failed\x20to\x20store\x20LLM\x20data:','MiKdQ':'❌\x20Failed\x20to\x20get\x20LLM\x20data\x20keys:','CRsLI':'fLgfd','lOYpL':function(_0x4d7739,_0x53ab20){return _0x4d7739(_0x53ab20);},'vmSTu':'qUeTc','obXTS':_0x5a5d(0x36)};try{if(_0x15a647[_0x5a5d(0x3a)]!==_0x5a5d(0x3b)){const _0x3b5951=await _0x15a647[_0x5a5d(0x3c)](getLLMMetadata,_0x20ae73);if(!_0x3b5951)return _0x5a5d(0x3d)===_0x15a647[_0x5a5d(0x3e)]?(console['warn'](_0x15a647[_0x5a5d(0x3f)],_0x20ae73),![]):(_0x37c06c[_0x5a5d(0x1f)](_0x15a647[_0x5a5d(0x40)],_0x1f68ff),![]);return _0x3b5951[_0x5a5d(0x41)]=_0x384d46,await _asyncStorage[_0x5a5d(0x11)][_0x5a5d(0x1a)](LLM_METADATA_STORAGE_KEY+':'+_0x20ae73,JSON[_0x5a5d(0x12)](_0x3b5951)),console['log'](_0x5a5d(0x42)+_0x384d46),!![];}else return _0x2416a1['error'](_0x15a647[_0x5a5d(0x43)],_0x3a6941),[];}catch(_0x361452){return console[_0x5a5d(0x1f)](_0x5a5d(0x44),_0x361452),![];}};exports['updateLLMStatus']=updateLLMStatus;function _0x5a5d(_0x38e6a5,_0x5a5dda){_0x38e6a5=_0x38e6a5-0x0;const _0x197393=_0x38e6();let _0x28e887=_0x197393[_0x38e6a5];return _0x28e887;}const clearLLMData=async _0xf22cae=>{const _0x38fa97={'srcfx':'chatgpt','YhhNM':function(_0x2b9ce6,_0x3e47b0){return _0x2b9ce6===_0x3e47b0;},'vQQlc':_0x5a5d(0x44),'piejI':function(_0x154e84,_0x282961){return _0x154e84!==_0x282961;},'fOPBx':_0x5a5d(0x45),'RpcXN':_0x5a5d(0x46),'tyRdb':_0x5a5d(0x47),'YlIJJ':function(_0x30d6df,_0x516e78){return _0x30d6df===_0x516e78;},'Bhsmw':_0x5a5d(0x48),'HbOrp':_0x5a5d(0x21)};try{if(_0x38fa97['piejI'](_0x38fa97[_0x5a5d(0x49)],_0x38fa97[_0x5a5d(0x4a)]))return await _asyncStorage[_0x5a5d(0x11)][_0x5a5d(0x4b)](LLM_DATA_STORAGE_KEY+':'+_0xf22cae),await _asyncStorage[_0x5a5d(0x11)][_0x5a5d(0x4b)](LLM_METADATA_STORAGE_KEY+':'+_0xf22cae),console[_0x5a5d(0x1b)](_0x38fa97[_0x5a5d(0x4c)],_0xf22cae),!![];else{const _0x4531da=_0xbe4bf3[_0x5a5d(0x4d)](_0xa1c79e)[_0x5a5d(0x4e)](([_0xe5188c,_0x33a4fd])=>_0x33a4fd)[_0x5a5d(0x4f)](([_0x3e0c8f,_0x305d0d])=>_0x3e0c8f),_0x225b96=_0x4531da['includes'](_0x5a5d(0x50))||_0x4531da[_0x5a5d(0x51)](_0x38fa97[_0x5a5d(0x52)]),_0x35ffa3=_0x38fa97[_0x5a5d(0x53)](_0x4531da['length'],0x1)&&_0x225b96;return _0x28f8f9[_0x5a5d(0x1b)]('🔍\x20Platform\x20connection\x20check:',{'connectedPlatforms':_0x4531da,'hasLLM':_0x225b96,'onlyLLM':_0x35ffa3}),_0x35ffa3;}}catch(_0x6809da){return _0x38fa97[_0x5a5d(0x54)]('xAkax',_0x38fa97[_0x5a5d(0x55)])?(_0x54801a[_0x5a5d(0x1f)](_0x38fa97['vQQlc'],_0xe43192),![]):(console[_0x5a5d(0x1f)](_0x38fa97[_0x5a5d(0x56)],_0x6809da),![]);}};exports[_0x5a5d(0x57)]=clearLLMData;const hasOnlyLLMConnection=_0x136352=>{const _0x1e4978={'ZHSYJ':_0x5a5d(0x50),'szaHt':'chatgpt','CiFwL':_0x5a5d(0x58)},_0x2bea23=Object[_0x5a5d(0x4d)](_0x136352)['filter'](([_0x14e9c3,_0x25f2dc])=>_0x25f2dc)[_0x5a5d(0x4f)](([_0x421b42,_0x1d984f])=>_0x421b42),_0x5d386c=_0x2bea23['includes'](_0x1e4978[_0x5a5d(0x59)])||_0x2bea23[_0x5a5d(0x51)](_0x1e4978['szaHt']),_0x3544dc=_0x2bea23[_0x5a5d(0x18)]===0x1&&_0x5d386c;return console[_0x5a5d(0x1b)](_0x1e4978[_0x5a5d(0x5a)],{'connectedPlatforms':_0x2bea23,'hasLLM':_0x5d386c,'onlyLLM':_0x3544dc}),_0x3544dc;};exports[_0x5a5d(0x4)]=hasOnlyLLMConnection;const formatLLMDataForDeveloper=_0x51d4cb=>{const _0x2bee36={'sQWrF':_0x5a5d(0x50),'vTdil':'chatgpt','tpuZz':_0x5a5d(0x5b)};return{'platform':_0x2bee36['sQWrF'],'userId':_0x51d4cb[_0x5a5d(0x13)],'email':_0x51d4cb[_0x5a5d(0x14)],'timestamp':_0x51d4cb[_0x5a5d(0x16)],'data':{'type':_0x2bee36[_0x5a5d(0x5c)],'conversations':_0x51d4cb['data'][_0x5a5d(0x5d)]||[],'chatHistory':_0x51d4cb['data'][_0x5a5d(0x5e)]||[],'preferences':_0x51d4cb[_0x5a5d(0x17)][_0x5a5d(0x5f)]||{},'customData':_0x51d4cb[_0x5a5d(0x17)][_0x5a5d(0x60)]||{}},'metadata':{'appName':_0x51d4cb[_0x5a5d(0x15)],'collectedAt':new Date(_0x51d4cb[_0x5a5d(0x16)])['toISOString'](),'dataVersion':_0x2bee36[_0x5a5d(0x61)]}};};exports[_0x5a5d(0x7)]=formatLLMDataForDeveloper;const sendLLMDataToBackend=async(_0x154117,_0xebe9af)=>{const _0x582340={'prwQM':'📡\x20Sending\x20LLM\x20data\x20to\x20backend\x20for\x20processing...','kkudr':function(_0x3bf20f,_0x3935f2,_0xe6ff57){return _0x3bf20f(_0x3935f2,_0xe6ff57);},'TGDJD':function(_0x3f7487,_0x40d9a2){return _0x3f7487&&_0x40d9a2;},'ItCql':_0x5a5d(0x50),'IYkNA':_0x5a5d(0x62),'EPzlr':_0x5a5d(0x5b),'KTnLM':_0x5a5d(0x63),'WbdDt':function(_0x53a704,_0x2044b3){return _0x53a704===_0x2044b3;},'rlYuw':_0x5a5d(0x64),'jNIlm':_0x5a5d(0x65),'yBUsa':_0x5a5d(0x66),'CjDHd':function(_0x3d201b,_0x301180){return _0x3d201b instanceof _0x301180;},'qfWeW':'Unknown\x20error'};try{console['log'](_0x582340[_0x5a5d(0x67)]);const _0x13cb60=await _0x582340[_0x5a5d(0x68)](fetch,_api['API_CONFIG'][_0x5a5d(0x69)]+_0x5a5d(0x6a),{'method':'POST','headers':{'Content-Type':'application/json',..._0x582340[_0x5a5d(0x6b)](_0xebe9af,{'Authorization':'Bearer\x20'+_0xebe9af})},'body':JSON[_0x5a5d(0x12)]({'userId':_0x154117[_0x5a5d(0x13)],'email':_0x154117[_0x5a5d(0x14)],'appName':_0x154117[_0x5a5d(0x15)],'platform':_0x582340['ItCql'],'connectionType':_0x582340[_0x5a5d(0x6c)],'timestamp':new Date()[_0x5a5d(0x6d)](),'data':_0x154117[_0x5a5d(0x17)],'accessToken':_0x154117['accessToken'],'refreshToken':_0x154117[_0x5a5d(0x6e)],'tokenExpiry':_0x154117['tokenExpiry'],'metadata':{'collectedAt':new Date(_0x154117[_0x5a5d(0x16)])[_0x5a5d(0x6d)](),'dataVersion':_0x582340[_0x5a5d(0x6f)]}})});if(_0x13cb60['ok']){const _0x5585ef=await _0x13cb60[_0x5a5d(0x70)]();return console[_0x5a5d(0x1b)](_0x582340[_0x5a5d(0x71)],_0x5585ef),{'success':!![],'message':_0x5585ef[_0x5a5d(0x72)],'connectionId':_0x5585ef['connectionId']};}else{if(_0x582340['WbdDt'](_0x582340[_0x5a5d(0x73)],_0x582340[_0x5a5d(0x73)])){const _0x4c1fde=await _0x13cb60[_0x5a5d(0x74)]();return console[_0x5a5d(0x1f)](_0x582340['jNIlm'],_0x13cb60[_0x5a5d(0x75)],_0x4c1fde),{'success':![],'message':_0x5a5d(0x76)+_0x13cb60['status']};}else return null;}}catch(_0x44ccb1){return console[_0x5a5d(0x1f)](_0x582340[_0x5a5d(0x77)],_0x44ccb1),{'success':![],'message':_0x582340[_0x5a5d(0x78)](_0x44ccb1,Error)?_0x44ccb1[_0x5a5d(0x72)]:_0x582340[_0x5a5d(0x79)]};}};exports[_0x5a5d(0x3)]=sendLLMDataToBackend;const requestLLMDataForDeveloper=async(_0x494e05,_0x2466ce,_0x16c1e7,_0x4513ea,_0x3c0d19)=>{const _0xda9d35={'rDrIV':'chatgpt','JDAHf':_0x5a5d(0x5b),'kPAfa':_0x5a5d(0x66),'vjmHO':'Unknown\x20error','RMKQN':function(_0x4bceb7,_0x2642f3){return _0x4bceb7===_0x2642f3;},'QTNgG':_0x5a5d(0x7a),'HbllR':_0x5a5d(0x7b),'PmSAo':_0x5a5d(0x7c),'qSjKG':_0x5a5d(0x7d),'xUosA':function(_0x4ac31b,_0x5073ce){return _0x4ac31b===_0x5073ce;},'IUpLf':'jrBZu','VSgqi':'❌\x20Failed\x20to\x20request\x20LLM\x20data\x20from\x20backend:','ChKQB':function(_0x272d31,_0x38f142){return _0x272d31 instanceof _0x38f142;}};try{if(_0xda9d35[_0x5a5d(0x7e)](_0xda9d35[_0x5a5d(0x7f)],_0xda9d35[_0x5a5d(0x80)]))return{'platform':_0x5a5d(0x50),'userId':_0x51660d[_0x5a5d(0x13)],'email':_0x164844[_0x5a5d(0x14)],'timestamp':_0x5507f9[_0x5a5d(0x16)],'data':{'type':_0xda9d35[_0x5a5d(0x81)],'conversations':_0x4a1306[_0x5a5d(0x17)]['conversations']||[],'chatHistory':_0x5b2388['data'][_0x5a5d(0x5e)]||[],'preferences':_0x41f76d['data']['preferences']||{},'customData':_0x43b326['data'][_0x5a5d(0x60)]||{}},'metadata':{'appName':_0x1b6e20['appName'],'collectedAt':new _0x26add5(_0x10f71e[_0x5a5d(0x16)])['toISOString'](),'dataVersion':_0xda9d35[_0x5a5d(0x82)]}};else{console[_0x5a5d(0x1b)](_0x5a5d(0x83));const _0x26f346=await fetch(_api['API_CONFIG'][_0x5a5d(0x69)]+_0x5a5d(0x84),{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x3c0d19},'body':JSON[_0x5a5d(0x12)]({'userId':_0x494e05,'email':_0x2466ce,'appName':_0x16c1e7,'requestedData':_0x4513ea,'timestamp':new Date()[_0x5a5d(0x6d)]()})});if(_0x26f346['ok']){const _0x5ab35c=await _0x26f346['json']();return console['log'](_0xda9d35['PmSAo'],_0x5ab35c),{'success':!![],'message':_0x5ab35c[_0x5a5d(0x72)],'apiUrl':_0x5ab35c['apiUrl'],'token':_0x5ab35c['token']};}else{const _0x593cd7=await _0x26f346[_0x5a5d(0x74)]();return console[_0x5a5d(0x1f)](_0xda9d35['qSjKG'],_0x26f346[_0x5a5d(0x75)],_0x593cd7),{'success':![],'message':_0x5a5d(0x76)+_0x26f346[_0x5a5d(0x75)]};}}}catch(_0xf41fba){return _0xda9d35[_0x5a5d(0x85)](_0xda9d35[_0x5a5d(0x86)],_0xda9d35[_0x5a5d(0x86)])?(console['error'](_0xda9d35[_0x5a5d(0x87)],_0xf41fba),{'success':![],'message':_0xda9d35[_0x5a5d(0x88)](_0xf41fba,Error)?_0xf41fba[_0x5a5d(0x72)]:_0xda9d35[_0x5a5d(0x89)]}):(_0x2ec8b5[_0x5a5d(0x1f)](_0xda9d35[_0x5a5d(0x8a)],_0x55442a),{'success':![],'message':_0x292b70 instanceof _0x165aa8?_0x54e2ea[_0x5a5d(0x72)]:_0xda9d35[_0x5a5d(0x89)]});}};exports['requestLLMDataForDeveloper']=requestLLMDataForDeveloper;const getAllLLMDataKeys=async()=>{const _0x43bb18={'oMGOo':'❌\x20Failed\x20to\x20request\x20LLM\x20data\x20from\x20backend:','CDZpA':function(_0x5a0005,_0x515644){return _0x5a0005 instanceof _0x515644;},'dAljk':_0x5a5d(0x8b),'HBnAs':function(_0x26a660,_0xdbe8b7){return _0x26a660===_0xdbe8b7;},'ihign':'❌\x20Failed\x20to\x20get\x20LLM\x20data\x20keys:'};try{const _0x5089e4=await _asyncStorage['default']['getAllKeys'](),_0x4e9214=_0x5089e4[_0x5a5d(0x4e)](_0x54d342=>_0x54d342['startsWith'](LLM_DATA_STORAGE_KEY)||_0x54d342[_0x5a5d(0x8c)](LLM_METADATA_STORAGE_KEY));return _0x4e9214;}catch(_0x520917){return _0x43bb18[_0x5a5d(0x8d)](_0x5a5d(0x8e),'vVZiI')?(_0x1603bd[_0x5a5d(0x1f)](_0x43bb18[_0x5a5d(0x8f)],_0x14e6cf),{'success':![],'message':_0x43bb18[_0x5a5d(0x90)](_0x2c28c2,_0x34a913)?_0x1e1df3[_0x5a5d(0x72)]:_0x43bb18[_0x5a5d(0x91)]}):(console[_0x5a5d(0x1f)](_0x43bb18[_0x5a5d(0x92)],_0x520917),[]);}};exports['getAllLLMDataKeys']=getAllLLMDataKeys;
|
|
@@ -5,4 +5,4 @@ var __ONAIROS_REQ_REGISTRY__ = [
|
|
|
5
5
|
require("../config/api")
|
|
6
6
|
];
|
|
7
7
|
function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
|
|
8
|
-
Object[
|
|
8
|
+
Object[_0x280f(0x0)](exports,'__esModule',{'value':!![]}),exports[_0x280f(0x1)]=exports[_0x280f(0x2)]=exports[_0x280f(0x3)]=exports[_0x280f(0x4)]=exports[_0x280f(0x5)]=exports[_0x280f(0x6)]=exports['getHealthCheck']=void 0x0;var _authService=__ONAIROS_REQ_FUNC__(0x0),_api=__ONAIROS_REQ_FUNC__(0x1);const API_BASE_URL=''+_api[_0x280f(0x7)][_0x280f(0x8)],getTrainingStatus=async _0x4b12a3=>{const _0x104b93={'ojXCe':_0x280f(0x9),'gWQKq':'❌\x20Failed\x20to\x20get\x20training\x20status:'};try{const _0xd5c91c=await(0x0,_authService[_0x280f(0xa)])();if(!_0xd5c91c)throw new Error(_0x104b93[_0x280f(0xb)]);const _0x5082c0=await fetch(API_BASE_URL+_0x280f(0xc)+_0x4b12a3,{'method':'GET','headers':{'Authorization':_0xd5c91c,'Content-Type':'application/json'}});if(!_0x5082c0['ok']){const _0x9a9d60=await _0x5082c0[_0x280f(0xd)]();throw new Error(_0x9a9d60[_0x280f(0xe)]||'HTTP\x20'+_0x5082c0[_0x280f(0xf)]);}return await _0x5082c0[_0x280f(0xd)]();}catch(_0x5c659b){console[_0x280f(0xe)](_0x104b93['gWQKq'],_0x5c659b);throw _0x5c659b;}};exports['getTrainingStatus']=getTrainingStatus;const getModelInfo=async()=>{const _0x34cdc3={'DqMqL':_0x280f(0x10),'BjwEU':'No\x20authentication\x20token\x20available','ecGoV':function(_0x58f425,_0x37946e,_0x4b8b5d){return _0x58f425(_0x37946e,_0x4b8b5d);},'GWaUE':function(_0x40d670,_0x274b1b){return _0x40d670!==_0x274b1b;},'XTPpM':'xztAr','PycbM':_0x280f(0x11),'Dsthw':_0x280f(0x12)};try{const _0x49a8af=await(0x0,_authService[_0x280f(0xa)])();if(!_0x49a8af)throw new Error(_0x34cdc3[_0x280f(0x13)]);const _0x151664=await _0x34cdc3[_0x280f(0x14)](fetch,API_BASE_URL+_0x280f(0x15),{'method':'GET','headers':{'Authorization':_0x49a8af,'Content-Type':'application/json'}});if(!_0x151664['ok']){if(_0x34cdc3[_0x280f(0x16)](_0x34cdc3['XTPpM'],_0x34cdc3['XTPpM'])){_0x192520[_0x280f(0xe)](_0x34cdc3[_0x280f(0x17)],_0x469728);throw _0x14e310;}else{const _0x3875f5=await _0x151664[_0x280f(0xd)]();throw new Error(_0x3875f5[_0x280f(0xe)]||'HTTP\x20'+_0x151664[_0x280f(0xf)]);}}return await _0x151664['json']();}catch(_0x1e194e){if(_0x34cdc3[_0x280f(0x16)](_0x34cdc3[_0x280f(0x18)],_0x34cdc3[_0x280f(0x18)]))throw new _0x279bad(_0x280f(0x19)+_0x17bc30[_0x280f(0xf)]+_0x280f(0x1a)+_0xd278fe);else{console[_0x280f(0xe)](_0x34cdc3[_0x280f(0x1b)],_0x1e194e);throw _0x1e194e;}}};exports[_0x280f(0x6)]=getModelInfo;const getHealthCheck=async()=>{const _0x102f76={'NAlZa':'⚠️\x20Could\x20not\x20get\x20training\x20features:','CxrPl':function(_0x567382,_0x581f9f){return _0x567382!==_0x581f9f;},'yhFeW':_0x280f(0x1c),'KWqrJ':function(_0x17affb,_0xd70b53){return _0x17affb===_0xd70b53;},'vfCrm':_0x280f(0x1d),'qQwDo':_0x280f(0x10)};try{const _0x46aaf7=await fetch(API_BASE_URL+'/mobile-training/health',{'method':'GET','headers':{'Content-Type':'application/json'}});if(!_0x46aaf7['ok']){if(_0x102f76[_0x280f(0x1e)](_0x102f76[_0x280f(0x1f)],_0x280f(0x20))){const _0x4730d3=await _0x46aaf7[_0x280f(0xd)]();throw new Error(_0x4730d3[_0x280f(0xe)]||'HTTP\x20'+_0x46aaf7[_0x280f(0xf)]);}else{_0x4b6f9d[_0x280f(0xe)](_0x280f(0x21),_0x452872);throw _0x356c08;}}return await _0x46aaf7[_0x280f(0xd)]();}catch(_0x4f14f9){if(_0x102f76[_0x280f(0x22)](_0x280f(0x1d),_0x102f76['vfCrm'])){console['error'](_0x102f76[_0x280f(0x23)],_0x4f14f9);throw _0x4f14f9;}else return _0x4d6739['warn'](_0x102f76[_0x280f(0x24)],_0x3f14f4),null;}};exports[_0x280f(0x25)]=getHealthCheck;const startEnochTrainingWithYouTubeCheck=async _0x20472a=>{const _0x5750d2={'CvKpw':_0x280f(0x26),'uqrou':function(_0xa5a7a4,_0x5c388a){return _0xa5a7a4===_0x5c388a;},'Mkebv':_0x280f(0x27),'LNGvB':function(_0x152f6a,_0x58af13){return _0x152f6a(_0x58af13);},'dhMHh':'(backend\x20auto-handles\x20YouTube)','BVAuz':'\x20\x20\x20-\x20Temporary\x20mode\x20connections:\x20Work\x20automatically\x20✅','dwCpn':'\x20\x20\x20-\x20Full\x20refresh\x20tokens:\x20Auto-refresh\x20when\x20expired\x20✅','eDfBD':_0x280f(0x28),'zVXfD':_0x280f(0x29)};try{if(_0x5750d2['uqrou'](_0x5750d2[_0x280f(0x2a)],_0x280f(0x27))){const _0x1bea0a=_0x280f(0x2b)['split']('|');let _0x312e69=0x0;while(!![]){switch(_0x1bea0a[_0x312e69++]){case'0':console['log'](_0x280f(0x2c));continue;case'1':return await _0x5750d2['LNGvB'](startEnochTraining,_0x20472a);case'2':console['log'](_0x280f(0x2d),_0x20472a[_0x280f(0x2e)],_0x5750d2[_0x280f(0x2f)]);continue;case'3':console['log'](_0x5750d2[_0x280f(0x30)]);continue;case'4':console[_0x280f(0x31)](_0x280f(0x32));continue;case'5':console[_0x280f(0x31)](_0x5750d2[_0x280f(0x33)]);continue;case'6':console['log'](_0x5750d2[_0x280f(0x34)]);continue;}break;}}else return _0x5748d1[_0x280f(0x35)](_0x5750d2[_0x280f(0x36)],_0x1e097d),![];}catch(_0x22f531){console[_0x280f(0xe)](_0x5750d2[_0x280f(0x37)],_0x22f531);throw _0x22f531;}};exports[_0x280f(0x1)]=startEnochTrainingWithYouTubeCheck;const startEnochTraining=async _0x47e89e=>{const _0x459f24={'WsrTp':_0x280f(0x29),'zEqTW':function(_0x243bae,_0x19f711){return _0x243bae===_0x19f711;},'wgcXD':_0x280f(0x38),'briMp':_0x280f(0x9),'ciSKH':_0x280f(0x39),'kPNWd':function(_0x44f4f3,_0x27bbf4,_0x14e7ee){return _0x44f4f3(_0x27bbf4,_0x14e7ee);},'DVbDV':_0x280f(0x3a),'tuETc':_0x280f(0x3b),'BxBOD':_0x280f(0x3c),'OBbOD':'📡\x20Training\x20API\x20response:','JvGRR':function(_0x3278e9,_0x3547ba){return _0x3278e9===_0x3547ba;},'OTuQj':_0x280f(0x3d),'spKCq':_0x280f(0x21)};try{const _0x5accbd=await(0x0,_authService['getAuthToken'])();if(!_0x5accbd){if(_0x459f24[_0x280f(0x3e)](_0x459f24[_0x280f(0x3f)],_0x459f24[_0x280f(0x3f)]))throw new Error(_0x459f24['briMp']);else{_0x33dcf1[_0x280f(0xe)](_0x459f24['WsrTp'],_0x407c8f);throw _0x4c8b94;}}console[_0x280f(0x31)](_0x459f24[_0x280f(0x40)],_0x47e89e);const _0x2386c1=await _0x459f24[_0x280f(0x41)](fetch,API_BASE_URL+_0x280f(0x42),{'method':'POST','headers':{'Content-Type':'application/json','Authorization':_0x5accbd},'body':JSON[_0x280f(0x43)](_0x47e89e)});console['log'](_0x459f24[_0x280f(0x44)],_0x2386c1[_0x280f(0xf)]);if(!_0x2386c1['ok']){const _0x366394=await _0x2386c1[_0x280f(0x45)]();console[_0x280f(0xe)](_0x459f24[_0x280f(0x46)],_0x2386c1[_0x280f(0xf)],_0x459f24[_0x280f(0x47)],_0x366394);try{const _0x5558ec=JSON[_0x280f(0x48)](_0x366394);throw new Error(_0x5558ec[_0x280f(0xe)]||_0x280f(0x49)+_0x2386c1[_0x280f(0xf)]);}catch(_0x2a1597){throw new Error('Training\x20API\x20failed:\x20'+_0x2386c1[_0x280f(0xf)]+_0x280f(0x1a)+_0x366394);}}const _0x272b46=await _0x2386c1[_0x280f(0xd)]();return console[_0x280f(0x31)](_0x459f24[_0x280f(0x4a)],_0x272b46),_0x272b46;}catch(_0x52e4f7){if(_0x459f24[_0x280f(0x4b)](_0x459f24[_0x280f(0x4c)],_0x459f24[_0x280f(0x4c)])){console['error'](_0x459f24[_0x280f(0x4d)],_0x52e4f7);throw _0x52e4f7;}else{_0x33692e['error'](_0x280f(0x12),_0x4a6f4f);throw _0x5ca767;}}};exports[_0x280f(0x2)]=startEnochTraining;const isTrainingInProgress=async _0x1ca31b=>{const _0x13a1b6={'vyuFc':'❌\x20Failed\x20to\x20get\x20training\x20status:','nrvYS':function(_0x7a4ac,_0xce6a8){return _0x7a4ac(_0xce6a8);},'eocPR':function(_0x172e45,_0x554db7){return _0x172e45!==_0x554db7;},'cgzdd':_0x280f(0x4e),'UaANu':_0x280f(0x26)};try{const _0x37038b=await _0x13a1b6['nrvYS'](getTrainingStatus,_0x1ca31b);return _0x37038b[_0x280f(0x4f)]&&_0x37038b['isTraining'];}catch(_0x2385a2){if(_0x13a1b6['eocPR'](_0x280f(0x50),_0x13a1b6['cgzdd']))return console[_0x280f(0x35)](_0x13a1b6[_0x280f(0x51)],_0x2385a2),![];else{_0x4b2ee5['error'](_0x13a1b6['vyuFc'],_0x277942);throw _0x25eb72;}}};function _0x280f(_0x4100be,_0x280f0c){_0x4100be=_0x4100be-0x0;const _0x2e834b=_0x4100();let _0x3ba499=_0x2e834b[_0x4100be];return _0x3ba499;}exports[_0x280f(0x3)]=isTrainingInProgress;function _0x4100(){const _0x56b756=['defineProperty','startEnochTrainingWithYouTubeCheck','startEnochTraining','isTrainingInProgress','getTrainingStatus','getTrainingFeatures','getModelInfo','API_CONFIG','BASE_URL','No\x20authentication\x20token\x20available','getAuthToken','ojXCe','/mobile-training/status/','json','error','status','❌\x20Failed\x20to\x20get\x20health\x20check:','mFbqy','❌\x20Failed\x20to\x20get\x20model\x20info:','BjwEU','ecGoV','/mobile-training/model-info','GWaUE','DqMqL','PycbM','Training\x20API\x20failed:\x20','\x20-\x20','Dsthw','UAhGs','AZjyc','CxrPl','yhFeW','KXFWN','❌\x20Training\x20start\x20error:','KWqrJ','qQwDo','NAlZa','getHealthCheck','⚠️\x20Could\x20not\x20check\x20training\x20status:','CXxxz','🚀\x20[TRAINING]\x20Starting\x20training\x20-\x20backend\x20handles\x20all\x20YouTube\x20cases\x20automatically','❌\x20Training\x20error:','Mkebv','2|6|4|3|5|0|1','\x20\x20\x20-\x20Backend\x20validation:\x20Handles\x20all\x20edge\x20cases\x20✅','🚀\x20Starting\x20Enoch\x20training\x20for\x20user:','username','dhMHh','BVAuz','log','ℹ️\x20[TRAINING]\x20No\x20migration\x20checks\x20needed:','dwCpn','eDfBD','warn','CvKpw','zVXfD','WJjUb','📤\x20Sending\x20training\x20data\x20to\x20/mobile-training/enoch:','📡\x20Training\x20API\x20response\x20status:','❌\x20Training\x20API\x20failed\x20with\x20status:','Error:','jOPjL','zEqTW','wgcXD','ciSKH','kPNWd','/mobile-training/enoch','stringify','DVbDV','text','tuETc','BxBOD','parse','HTTP\x20','OBbOD','JvGRR','OTuQj','spKCq','yNTKl','success','lbojT','UaANu','GqIpL','pitJG'];_0x4100=function(){return _0x56b756;};return _0x4100();}const getTrainingFeatures=async()=>{const _0x20e328={'yrgTu':function(_0x19c61f,_0x4338af){return _0x19c61f!==_0x4338af;},'pitJG':_0x280f(0x52),'mJeOu':'⚠️\x20Could\x20not\x20get\x20training\x20features:'};try{if(_0x20e328['yrgTu']('quOLF',_0x20e328[_0x280f(0x53)])){const _0x12ca39=await getHealthCheck();return _0x12ca39['features'];}else throw new _0x1f9f2a(_0x280f(0x9));}catch(_0xdddb5f){return console['warn'](_0x20e328['mJeOu'],_0xdddb5f),null;}};exports[_0x280f(0x5)]=getTrainingFeatures;
|
|
@@ -8,4 +8,4 @@ var __ONAIROS_REQ_REGISTRY__ = [
|
|
|
8
8
|
require("../config/api")
|
|
9
9
|
];
|
|
10
10
|
function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
|
|
11
|
-
Object[_0x234e(0x0)](exports,_0x234e(0x1),{'value':!![]}),exports[_0x234e(0x2)]=exports[_0x234e(0x3)]=exports[_0x234e(0x4)]=exports[_0x234e(0x5)]=exports[_0x234e(0x6)]=exports[_0x234e(0x7)]=void 0x0;var _reactNative=__ONAIROS_REQ_FUNC__(0x0),_secureStorage=__ONAIROS_REQ_FUNC__(0x1),_crypto=__ONAIROS_REQ_FUNC__(0x2),_api=__ONAIROS_REQ_FUNC__(0x3),_api2=__ONAIROS_REQ_FUNC__(0x4);const OAUTH_CONFIGS={'instagram':{'clientId':_0x234e(0x8),'redirectUri':_0x234e(0x9),'scope':_0x234e(0xa),'authorizationEndpoint':_0x234e(0xb),'tokenEndpoint':_0x234e(0xc),'responseType':'code'},'youtube':{'clientId':_0x234e(0xd),'redirectUri':'onairosanime://auth/youtube','scope':_0x234e(0xe),'authorizationEndpoint':_0x234e(0xf),'tokenEndpoint':_0x234e(0x10),'responseType':'code'},'pinterest':{'clientId':'YOUR_PINTEREST_CLIENT_ID','redirectUri':'onairosanime://auth/pinterest','scope':'boards:read,pins:read','authorizationEndpoint':_0x234e(0x11),'tokenEndpoint':_0x234e(0x12),'responseType':_0x234e(0x13)},'reddit':{'clientId':'YOUR_REDDIT_CLIENT_ID','redirectUri':'onairosanime://auth/reddit','scope':_0x234e(0x14),'authorizationEndpoint':_0x234e(0x15),'tokenEndpoint':_0x234e(0x16),'responseType':'code'}},generateState=()=>{const _0x1d776a=Math[_0x234e(0x17)]()[_0x234e(0x18)](0x24)[_0x234e(0x19)](0x2,0xf);return(0x0,_crypto['sha256'])(_0x1d776a)[_0x234e(0x19)](0x0,0xa);},initializeOAuthService=()=>{_reactNative[_0x234e(0x1a)][_0x234e(0x1b)](_0x234e(0x1c),handleDeepLink);};exports[_0x234e(0x3)]=initializeOAuthService;const cleanupOAuthService=()=>{const _0x3e0c37={'mnVJq':function(_0x139f41,_0x4a08d3){return _0x139f41===_0x4a08d3;},'OBEnO':_0x234e(0x1d),'FTbgI':_0x234e(0x1c)};_0x3e0c37['mnVJq'](typeof _reactNative[_0x234e(0x1a)]['removeAllListeners'],_0x3e0c37[_0x234e(0x1e)])&&_reactNative[_0x234e(0x1a)][_0x234e(0x1f)](_0x3e0c37[_0x234e(0x20)]);};exports[_0x234e(0x6)]=cleanupOAuthService;let currentOAuthState=null,currentOAuthPlatform=null,currentOAuthResolve=null,currentOAuthReject=null;const handleDeepLink=async _0x263ad1=>{const _0x30a27a={'zcYGx':function(_0x4d6d95,_0xd1f3aa){return _0x4d6d95===_0xd1f3aa;},'oOAzV':_0x234e(0x1c),'EUPjN':_0x234e(0x21),'oXPkq':_0x234e(0x22),'zzuhw':'hNVfX','tQbto':function(_0xf4bf1e,_0x5e2d8e){return _0xf4bf1e!==_0x5e2d8e;},'SaMvi':_0x234e(0x23),'pecqm':_0x234e(0x24),'CxvdN':function(_0xe01682,_0x4d40d3){return _0xe01682!==_0x4d40d3;},'WsHsi':function(_0x6eadf5,_0x197c82){return _0x6eadf5!==_0x197c82;},'HXcHC':_0x234e(0x25),'imDXt':function(_0x3883dc,_0x38d216){return _0x3883dc(_0x38d216);},'psllm':_0x234e(0x26),'rgJJn':_0x234e(0x27),'kxtXK':_0x234e(0x28),'djRrJ':function(_0x3f5542,_0x1ea1f6,_0x4aac5b){return _0x3f5542(_0x1ea1f6,_0x4aac5b);},'tZfIB':function(_0xd9a3a6,_0x189994){return _0xd9a3a6(_0x189994);},'wnbjn':'Error\x20handling\x20OAuth\x20deep\x20link:','TlSTx':'HkqLd','SzdpA':'pdHyl'};try{const {url:_0x206299}=_0x263ad1;if(!_0x206299[_0x234e(0x29)](_0x30a27a[_0x234e(0x2a)])){if(_0x30a27a[_0x234e(0x2b)]!==_0x234e(0x2c))_0x1df712=null,_0x29618a=null,_0x36eb22=null,_0x55fe55=null;else return;}const _0x5d17ee=_0x206299['split'](_0x30a27a[_0x234e(0x2a)])[0x1][_0x234e(0x2d)]('?')[0x0];if(_0x30a27a[_0x234e(0x2e)](_0x5d17ee,currentOAuthPlatform))return;const _0x566368=new URL(_0x206299)['searchParams'],_0x2fd67d=_0x566368[_0x234e(0x2f)]('code'),_0x10e952=_0x566368[_0x234e(0x2f)](_0x30a27a['SaMvi']),_0x3b9ea2=_0x566368['get'](_0x30a27a['pecqm']);if(_0x30a27a[_0x234e(0x30)](_0x10e952,currentOAuthState)){currentOAuthReject&&(_0x30a27a['WsHsi'](_0x30a27a['HXcHC'],_0x30a27a[_0x234e(0x31)])?_0x30a27a[_0x234e(0x32)](typeof _0xf2e229[_0x234e(0x1a)][_0x234e(0x1f)],_0x234e(0x1d))&&_0x28b0af[_0x234e(0x1a)][_0x234e(0x1f)](_0x30a27a[_0x234e(0x33)]):_0x30a27a[_0x234e(0x34)](currentOAuthReject,new Error(_0x30a27a[_0x234e(0x35)])));return;}if(_0x3b9ea2){if(currentOAuthReject){if(_0x30a27a['WsHsi']('DvtuS',_0x30a27a[_0x234e(0x36)]))_0x30a27a[_0x234e(0x34)](currentOAuthReject,new Error(_0x234e(0x37)+_0x3b9ea2));else{_0x3544f8[_0x234e(0x24)](_0x234e(0x38)+_0x38c610+'):',_0x191e18);throw _0x4b11d8;}}return;}if(_0x2fd67d){if(_0x30a27a['kxtXK']!==_0x234e(0x39)){const _0x4f4d33=await _0x30a27a['djRrJ'](exchangeCodeForToken,_0x5d17ee,_0x2fd67d);currentOAuthResolve&¤tOAuthResolve(_0x4f4d33);}else _0x1b4b96&&_0x45d702(new _0x4194d9(_0x30a27a[_0x234e(0x3a)]));}else currentOAuthReject&&_0x30a27a[_0x234e(0x3b)](currentOAuthReject,new Error(_0x30a27a['EUPjN']));}catch(_0x1a1622){console[_0x234e(0x24)](_0x30a27a[_0x234e(0x3c)],_0x1a1622),currentOAuthReject&&_0x30a27a['tZfIB'](currentOAuthReject,_0x1a1622);}finally{if(_0x30a27a[_0x234e(0x30)](_0x30a27a[_0x234e(0x3d)],_0x30a27a['SzdpA']))currentOAuthState=null,currentOAuthPlatform=null,currentOAuthResolve=null,currentOAuthReject=null;else return _0x5ab3d8[_0x234e(0x24)](_0x234e(0x3e)+_0x3d6c73+'):',_0x3c6f30),![];}},exchangeCodeForToken=async(_0x1ac308,_0x47896c)=>{const _0x3317a7={'WBtGm':_0x234e(0x1c),'WjaeT':_0x234e(0x3f),'OXONW':'authorization_code','FaVKM':function(_0x548e25,_0x891167,_0x2b12bb){return _0x548e25(_0x891167,_0x2b12bb);},'mlLOL':_0x234e(0x40),'jOhvx':function(_0x226eb,_0x2a1d75){return _0x226eb===_0x2a1d75;},'BriuR':_0x234e(0x41)};try{if(_0x3317a7['WjaeT']!==_0x234e(0x3f))_0x23374d[_0x234e(0x1a)]['removeAllListeners'](_0x3317a7[_0x234e(0x42)]);else{const _0x3bd27e=OAUTH_CONFIGS[_0x1ac308];if(!_0x3bd27e)throw new Error('Unsupported\x20platform:\x20'+_0x1ac308);const _0x4fca1d=new URLSearchParams({'grant_type':_0x3317a7[_0x234e(0x43)],'code':_0x47896c,'redirect_uri':_0x3bd27e[_0x234e(0x44)],'client_id':_0x3bd27e[_0x234e(0x45)]}),_0x136644=await _0x3317a7['FaVKM'](fetch,_0x3bd27e[_0x234e(0x46)],{'method':'POST','headers':{'Content-Type':_0x3317a7[_0x234e(0x47)]},'body':_0x4fca1d['toString']()}),_0x3a0ce1=await _0x136644['json']();if(!_0x136644['ok']){if(_0x3317a7[_0x234e(0x48)](_0x234e(0x49),_0x234e(0x49)))throw new Error(_0x3a0ce1[_0x234e(0x24)]||_0x3317a7[_0x234e(0x4a)]);else{_0x1beb53[_0x234e(0x24)](_0x234e(0x4b)+_0x5bd048+'):',_0x2e3116);throw _0x37a67e;}}const _0xe11a8e=await _0x3317a7[_0x234e(0x4c)](fetchUserInfo,_0x1ac308,_0x3a0ce1['access_token']);return{'token':_0x3a0ce1['access_token'],'refreshToken':_0x3a0ce1[_0x234e(0x4d)],'expiresIn':_0x3a0ce1[_0x234e(0x4e)],'username':_0xe11a8e['username'],'userId':_0xe11a8e['id']};}}catch(_0x1af791){console[_0x234e(0x24)]('Error\x20exchanging\x20code\x20for\x20token\x20('+_0x1ac308+'):',_0x1af791);throw _0x1af791;}},fetchUserInfo=async(_0x541b52,_0x36f487)=>{const _0x5a1001={'aLyke':_0x234e(0x1c),'dVFyC':_0x234e(0x4f),'JlFaZ':'https://graph.instagram.com/me?fields=id,username','RhiUe':_0x234e(0x50),'XOcCG':_0x234e(0x51),'lstNd':_0x234e(0x52),'LYDjb':'https://oauth.reddit.com/api/v1/me','pgJZv':function(_0x58e6b4,_0x25b72e){return _0x58e6b4!==_0x25b72e;},'sOCdO':'hxgye','lzwyB':'Failed\x20to\x20fetch\x20user\x20info','VOLPC':_0x234e(0x53),'wawTc':'wvLEG'};try{let _0x47cab7,_0x41f799={'Authorization':_0x234e(0x54)+_0x36f487};switch(_0x541b52){case _0x5a1001['dVFyC']:_0x47cab7=_0x5a1001['JlFaZ'];break;case _0x5a1001[_0x234e(0x55)]:_0x47cab7=_0x234e(0x56);break;case _0x234e(0x53):_0x47cab7=_0x5a1001['XOcCG'];break;case _0x5a1001[_0x234e(0x57)]:_0x47cab7=_0x5a1001[_0x234e(0x58)];break;default:throw new Error(_0x234e(0x59)+_0x541b52);}const _0x17ad97=await fetch(_0x47cab7,{'headers':_0x41f799}),_0x3893e7=await _0x17ad97[_0x234e(0x5a)]();if(!_0x17ad97['ok']){if(_0x5a1001['pgJZv'](_0x5a1001[_0x234e(0x5b)],'ZWkja'))throw new Error(_0x3893e7[_0x234e(0x24)]||_0x5a1001[_0x234e(0x5c)]);else _0x15ce7b[_0x234e(0x1a)][_0x234e(0x1b)](_0x5a1001[_0x234e(0x5d)],_0x51286a);}switch(_0x541b52){case _0x5a1001['dVFyC']:return{'id':_0x3893e7['id'],'username':_0x3893e7[_0x234e(0x5e)]};case _0x234e(0x50):return{'id':_0x3893e7['items'][0x0]['id'],'username':_0x3893e7[_0x234e(0x5f)][0x0][_0x234e(0x60)][_0x234e(0x61)]};case _0x5a1001[_0x234e(0x62)]:return{'id':_0x3893e7['id'],'username':_0x3893e7[_0x234e(0x5e)]||_0x3893e7[_0x234e(0x63)]};case _0x5a1001[_0x234e(0x57)]:return{'id':_0x3893e7['id'],'username':_0x3893e7['name']};default:throw new Error(_0x234e(0x59)+_0x541b52);}}catch(_0x746f7b){if(_0x5a1001[_0x234e(0x64)]!==_0x5a1001[_0x234e(0x64)])throw new _0x5cbc05(_0x234e(0x59)+_0x363272);else{console[_0x234e(0x24)](_0x234e(0x4b)+_0x541b52+'):',_0x746f7b);throw _0x746f7b;}}},connectPlatform=_0x5c95ce=>{const _0x4f41ba={'xmjQj':_0x234e(0x65),'anNzX':function(_0x12a9e1,_0x79717a){return _0x12a9e1(_0x79717a);},'evfeI':function(_0x4d63b7,_0x433fd6){return _0x4d63b7===_0x433fd6;},'Ksvhv':'redirect_uri','qEafi':_0x234e(0x66),'CFXtP':_0x234e(0x67),'wFaYb':_0x234e(0x23),'ZIKVd':function(_0x273197,_0x438e8b){return _0x273197(_0x438e8b);}};return new Promise((_0x56a237,_0x78b8e4)=>{try{if(_0x4f41ba[_0x234e(0x68)]('OpExr',_0x234e(0x69))){const _0x231172=OAUTH_CONFIGS[_0x5c95ce];if(!_0x231172)throw new Error(_0x234e(0x59)+_0x5c95ce);const _0xd2f98a=generateState(),_0x329bbb=new URL(_0x231172[_0x234e(0x6a)]);_0x329bbb[_0x234e(0x6b)][_0x234e(0x6c)](_0x234e(0x6d),_0x231172[_0x234e(0x45)]),_0x329bbb['searchParams']['append'](_0x4f41ba['Ksvhv'],_0x231172[_0x234e(0x44)]),_0x329bbb['searchParams'][_0x234e(0x6c)](_0x4f41ba[_0x234e(0x6e)],_0x231172[_0x234e(0x6f)]),_0x329bbb[_0x234e(0x6b)][_0x234e(0x6c)](_0x4f41ba[_0x234e(0x70)],_0x231172['scope']),_0x329bbb[_0x234e(0x6b)][_0x234e(0x6c)](_0x4f41ba[_0x234e(0x71)],_0xd2f98a),currentOAuthState=_0xd2f98a,currentOAuthPlatform=_0x5c95ce,currentOAuthResolve=_0x56a237,currentOAuthReject=_0x78b8e4,_reactNative[_0x234e(0x1a)][_0x234e(0x72)](_0x329bbb[_0x234e(0x18)]());}else _0xc140e[_0x234e(0x24)](_0x4f41ba['xmjQj'],_0x46a560),_0x2fc51d&&_0x4f41ba[_0x234e(0x73)](_0x20c9cb,_0x461338);}catch(_0x935c5f){_0x4f41ba[_0x234e(0x74)](_0x78b8e4,_0x935c5f);}});};exports[_0x234e(0x5)]=connectPlatform;const disconnectPlatform=async(_0x22352e,_0x31316a)=>{const _0x23749f={'MuCGx':function(_0x7d51ae,_0x84740b){return _0x7d51ae!==_0x84740b;},'LfmyX':_0x234e(0x75)};try{await _api['onairosApi'][_0x234e(0x76)](_0x234e(0x77),{'platform':_0x22352e,'username':_0x31316a[_0x234e(0x5e)]});const _0xe2703={..._0x31316a['platforms']};return _0xe2703&&_0x22352e in _0xe2703&&delete _0xe2703[_0x22352e],await(0x0,_secureStorage[_0x234e(0x78)])({..._0x31316a,'platforms':_0xe2703}),!![];}catch(_0x2cb0ad){if(_0x23749f['MuCGx'](_0x234e(0x75),_0x23749f[_0x234e(0x79)]))return;else return console[_0x234e(0x24)]('Error\x20disconnecting\x20platform\x20('+_0x22352e+'):',_0x2cb0ad),![];}};function _0x5f42(){const _0x562893=['defineProperty','__esModule','storePlatformConnection','initializeOAuthService','disconnectPlatform','connectPlatform','cleanupOAuthService','OAuthService','YOUR_INSTAGRAM_CLIENT_ID','onairosanime://auth/instagram','user_profile,user_media','https://api.instagram.com/oauth/authorize','https://api.instagram.com/oauth/access_token','YOUR_YOUTUBE_CLIENT_ID','https://www.googleapis.com/auth/youtube.readonly','https://accounts.google.com/o/oauth2/auth','https://oauth2.googleapis.com/token','https://www.pinterest.com/oauth/','https://api.pinterest.com/v5/oauth/token','code','identity,read','https://www.reddit.com/api/v1/authorize','https://www.reddit.com/api/v1/access_token','random','toString','substring','Linking','addEventListener','url','function','OBEnO','removeAllListeners','FTbgI','No\x20authorization\x20code\x20received','onairosanime://auth/','state','error','VssSg','OAuth\x20state\x20mismatch\x20-\x20possible\x20CSRF\x20attack','NqrGo','exATZ','startsWith','oXPkq','zzuhw','hNVfX','split','tQbto','get','CxvdN','HXcHC','zcYGx','oOAzV','imDXt','psllm','rgJJn','OAuth\x20error:\x20','Error\x20exchanging\x20code\x20for\x20token\x20(','bSEXp','EUPjN','tZfIB','wnbjn','TlSTx','Error\x20storing\x20platform\x20connection\x20(','xkRWh','application/x-www-form-urlencoded','Failed\x20to\x20exchange\x20code\x20for\x20token','WBtGm','OXONW','redirectUri','clientId','tokenEndpoint','mlLOL','jOhvx','wNwuB','BriuR','Error\x20fetching\x20user\x20info\x20(','FaVKM','refresh_token','expires_in','instagram','youtube','https://api.pinterest.com/v5/user_account','reddit','pinterest','Bearer\x20','RhiUe','https://www.googleapis.com/youtube/v3/channels?part=snippet&mine=true','lstNd','LYDjb','Unsupported\x20platform:\x20','json','sOCdO','lzwyB','aLyke','username','items','snippet','title','VOLPC','full_name','wawTc','Error\x20handling\x20OAuth\x20deep\x20link:','response_type','scope','evfeI','OpExr','authorizationEndpoint','searchParams','append','client_id','qEafi','responseType','CFXtP','wFaYb','openURL','anNzX','ZIKVd','rJjtD','post','/users/disconnect-platform','updateCredentials','LfmyX','gtnbv','OhcGv','XuwNg','BGiKI','YmFkW','platforms','userId','token','refreshToken','expiresIn','CjbgF','tZHJc','rrMdr','yBkog','API_CONFIG','BASE_URL'];_0x5f42=function(){return _0x562893;};return _0x5f42();}exports['disconnectPlatform']=disconnectPlatform;const storePlatformConnection=async(_0x19580b,_0xadb0b3,_0x452a6f)=>{const _0x3ff1cc={'rrMdr':function(_0x39194a,_0xbe299b){return _0x39194a===_0xbe299b;},'gtnbv':_0x234e(0x4f),'OhcGv':function(_0x4cd71d,_0x5850f2){return _0x4cd71d===_0x5850f2;},'XuwNg':_0x234e(0x50),'BGiKI':_0x234e(0x53),'YmFkW':_0x234e(0x52),'CjbgF':function(_0x5535d0,_0xe29ca6){return _0x5535d0+_0xe29ca6;},'tZHJc':function(_0x3dd756,_0x17ad2d){return _0x3dd756*_0x17ad2d;},'yBkog':function(_0x2aadb9,_0x3c2fc0){return _0x2aadb9===_0x3c2fc0;}};try{const _0x922ac6=_0x3ff1cc['rrMdr'](_0x19580b,_0x3ff1cc[_0x234e(0x7a)])||_0x3ff1cc[_0x234e(0x7b)](_0x19580b,_0x3ff1cc[_0x234e(0x7c)])||_0x19580b===_0x3ff1cc[_0x234e(0x7d)]||_0x3ff1cc['rrMdr'](_0x19580b,_0x3ff1cc[_0x234e(0x7e)]);if(!_0x922ac6)throw new Error('Unsupported\x20platform:\x20'+_0x19580b);const _0x15f1ba={..._0x452a6f[_0x234e(0x7f)]},_0x3cd16e={'username':_0xadb0b3[_0x234e(0x5e)],'userId':_0xadb0b3[_0x234e(0x80)],'token':_0xadb0b3[_0x234e(0x81)],'refreshToken':_0xadb0b3[_0x234e(0x82)],'expiresAt':_0xadb0b3[_0x234e(0x83)]?_0x3ff1cc[_0x234e(0x84)](Date['now'](),_0x3ff1cc[_0x234e(0x85)](_0xadb0b3['expiresIn'],0x3e8)):null,'connectedAt':Date['now']()};if(_0x3ff1cc[_0x234e(0x86)](_0x19580b,_0x234e(0x4f)))_0x15f1ba['instagram']=_0x3cd16e;else{if(_0x3ff1cc[_0x234e(0x87)](_0x19580b,_0x234e(0x50)))_0x15f1ba[_0x234e(0x50)]=_0x3cd16e;else{if(_0x19580b===_0x3ff1cc[_0x234e(0x7d)])_0x15f1ba[_0x234e(0x53)]=_0x3cd16e;else{if(_0x3ff1cc[_0x234e(0x86)](_0x19580b,_0x3ff1cc[_0x234e(0x7e)]))_0x15f1ba[_0x234e(0x52)]=_0x3cd16e;}}}return await(0x0,_secureStorage[_0x234e(0x78)])({..._0x452a6f,'platforms':_0x15f1ba}),!![];}catch(_0xf5e937){return console['error'](_0x234e(0x3e)+_0x19580b+'):',_0xf5e937),![];}};exports[_0x234e(0x2)]=storePlatformConnection;function _0x234e(_0x5f42be,_0x234e1c){_0x5f42be=_0x5f42be-0x0;const _0x523de2=_0x5f42();let _0x15087c=_0x523de2[_0x5f42be];return _0x15087c;}const OAuthService=exports['OAuthService']={'initializeOAuthService':initializeOAuthService,'cleanupOAuthService':cleanupOAuthService,'connectPlatform':connectPlatform,'disconnectPlatform':disconnectPlatform,'storePlatformConnection':storePlatformConnection,'_apiBaseUrl':''+_api2[_0x234e(0x88)][_0x234e(0x89)]};
|
|
11
|
+
Object[_0x43ec(0x0)](exports,_0x43ec(0x1),{'value':!![]}),exports[_0x43ec(0x2)]=exports[_0x43ec(0x3)]=exports['disconnectPlatform']=exports[_0x43ec(0x4)]=exports['cleanupOAuthService']=exports[_0x43ec(0x5)]=void 0x0;var _reactNative=__ONAIROS_REQ_FUNC__(0x0),_secureStorage=__ONAIROS_REQ_FUNC__(0x1),_crypto=__ONAIROS_REQ_FUNC__(0x2),_api=__ONAIROS_REQ_FUNC__(0x3),_api2=__ONAIROS_REQ_FUNC__(0x4);const OAUTH_CONFIGS={'instagram':{'clientId':'YOUR_INSTAGRAM_CLIENT_ID','redirectUri':_0x43ec(0x6),'scope':_0x43ec(0x7),'authorizationEndpoint':_0x43ec(0x8),'tokenEndpoint':_0x43ec(0x9),'responseType':_0x43ec(0xa)},'youtube':{'clientId':'YOUR_YOUTUBE_CLIENT_ID','redirectUri':'onairosanime://auth/youtube','scope':_0x43ec(0xb),'authorizationEndpoint':_0x43ec(0xc),'tokenEndpoint':_0x43ec(0xd),'responseType':_0x43ec(0xa)},'pinterest':{'clientId':'YOUR_PINTEREST_CLIENT_ID','redirectUri':_0x43ec(0xe),'scope':_0x43ec(0xf),'authorizationEndpoint':_0x43ec(0x10),'tokenEndpoint':_0x43ec(0x11),'responseType':_0x43ec(0xa)},'reddit':{'clientId':_0x43ec(0x12),'redirectUri':_0x43ec(0x13),'scope':'identity,read','authorizationEndpoint':'https://www.reddit.com/api/v1/authorize','tokenEndpoint':'https://www.reddit.com/api/v1/access_token','responseType':'code'}},generateState=()=>{const _0x2b6b1e=Math[_0x43ec(0x14)]()[_0x43ec(0x15)](0x24)[_0x43ec(0x16)](0x2,0xf);return(0x0,_crypto[_0x43ec(0x17)])(_0x2b6b1e)['substring'](0x0,0xa);},initializeOAuthService=()=>{_reactNative[_0x43ec(0x18)][_0x43ec(0x19)](_0x43ec(0x1a),handleDeepLink);};exports[_0x43ec(0x3)]=initializeOAuthService;const cleanupOAuthService=()=>{const _0x25c945={'plMyx':_0x43ec(0x1b)};typeof _reactNative['Linking'][_0x43ec(0x1c)]===_0x25c945[_0x43ec(0x1d)]&&_reactNative[_0x43ec(0x18)][_0x43ec(0x1c)](_0x43ec(0x1a));};exports[_0x43ec(0x1e)]=cleanupOAuthService;let currentOAuthState=null,currentOAuthPlatform=null,currentOAuthResolve=null,currentOAuthReject=null;const handleDeepLink=async _0x3472d2=>{const _0x3cef38={'eGRtv':function(_0x310c09,_0x41eeb7){return _0x310c09(_0x41eeb7);},'OShnZ':_0x43ec(0x1f),'opPIi':_0x43ec(0x20),'lPwCP':_0x43ec(0x21),'JBJNe':'response_type','pAajE':'scope','MRuIO':_0x43ec(0x22),'YTfdT':_0x43ec(0x23),'DevEC':function(_0x2db1cf,_0x39f289){return _0x2db1cf!==_0x39f289;},'ABLWC':function(_0x1562cf,_0x21dc06){return _0x1562cf!==_0x21dc06;},'TZmpz':'FZnOI','yEXmP':_0x43ec(0x24),'oLqVo':function(_0x33d005,_0x305241){return _0x33d005(_0x305241);},'xXfbm':function(_0x1ed4a6,_0xdc35a){return _0x1ed4a6===_0xdc35a;},'dioZT':'euJDg','VyIFT':function(_0xc57d26,_0x2ed5d5){return _0xc57d26(_0x2ed5d5);},'UdfHn':_0x43ec(0x25),'MDGFk':'XOdHW','IfEXl':_0x43ec(0x26),'RCcsR':function(_0x54b43c,_0x25cf7d){return _0x54b43c(_0x25cf7d);},'ZEeFa':function(_0x1987cd,_0x195785){return _0x1987cd===_0x195785;},'LtbJp':_0x43ec(0x27),'bzbAn':_0x43ec(0x28),'jskAP':_0x43ec(0x29),'LLJsb':_0x43ec(0x2a),'XXKrf':function(_0x38b58f,_0x4b86cd){return _0x38b58f===_0x4b86cd;},'PEXfV':_0x43ec(0x2b)};try{const {url:_0x55cac5}=_0x3472d2;if(!_0x55cac5[_0x43ec(0x2c)](_0x3cef38[_0x43ec(0x2d)]))return;const _0x10d5db=_0x55cac5['split'](_0x3cef38[_0x43ec(0x2d)])[0x1]['split']('?')[0x0];if(_0x3cef38['DevEC'](_0x10d5db,currentOAuthPlatform)){if(_0x3cef38[_0x43ec(0x2e)]('wZfvr',_0x43ec(0x2f)))return;else return;}const _0x3a0625=new URL(_0x55cac5)[_0x43ec(0x30)],_0x2258fc=_0x3a0625[_0x43ec(0x31)](_0x43ec(0xa)),_0x209390=_0x3a0625[_0x43ec(0x31)](_0x3cef38['MRuIO']),_0xb57cd2=_0x3a0625[_0x43ec(0x31)](_0x43ec(0x32));if(_0x209390!==currentOAuthState){if(_0x3cef38[_0x43ec(0x33)](_0x3cef38['TZmpz'],_0x3cef38[_0x43ec(0x34)]))_0x3cef38[_0x43ec(0x35)](_0x2d49ce,new _0x273ca4(_0x43ec(0x1f)));else{if(currentOAuthReject){if(_0x3cef38[_0x43ec(0x33)]('Olfjg',_0x3cef38[_0x43ec(0x36)]))_0x3cef38['oLqVo'](currentOAuthReject,new Error(_0x43ec(0x1f)));else{_0xac5316&&_0xb5a8f7(new _0x2634ba(_0x3cef38[_0x43ec(0x37)]));return;}}return;}}if(_0xb57cd2){if(_0x3cef38[_0x43ec(0x38)](_0x3cef38[_0x43ec(0x39)],_0x43ec(0x3a))){currentOAuthReject&&_0x3cef38[_0x43ec(0x3b)](currentOAuthReject,new Error(_0x43ec(0x3c)+_0xb57cd2));return;}else{const _0x501ed1=_0x500167[_0x43ec(0x14)]()[_0x43ec(0x15)](0x24)[_0x43ec(0x16)](0x2,0xf);return(0x0,_0x17c714[_0x43ec(0x17)])(_0x501ed1)['substring'](0x0,0xa);}}if(_0x2258fc){if(_0x3cef38['UdfHn']===_0x3cef38[_0x43ec(0x3d)]){const _0x48489b=await exchangeCodeForToken(_0x10d5db,_0x2258fc);if(currentOAuthResolve){if(_0x3cef38[_0x43ec(0x2e)](_0x3cef38[_0x43ec(0x3e)],_0x3cef38['IfEXl']))_0x3cef38[_0x43ec(0x3f)](currentOAuthResolve,_0x48489b);else return _0x5ccae3[_0x43ec(0x32)](_0x43ec(0x40)+_0x221639+'):',_0x11a38f),![];}}else{_0x2739dc['error'](_0x43ec(0x41)+_0x1c81a1+'):',_0x228f62);throw _0x172f8a;}}else _0x3cef38[_0x43ec(0x42)](_0x3cef38[_0x43ec(0x43)],_0x3cef38[_0x43ec(0x43)])?currentOAuthReject&¤tOAuthReject(new Error(_0x3cef38[_0x43ec(0x44)])):(_0x2cef3d[_0x43ec(0x32)]('Error\x20handling\x20OAuth\x20deep\x20link:',_0xe1fff3),_0x583dc3&&_0x3cef38['eGRtv'](_0xa958ae,_0x49029b));}catch(_0x1a991c){if(_0x3cef38[_0x43ec(0x42)](_0x43ec(0x45),_0x43ec(0x45))){console['error'](_0x3cef38[_0x43ec(0x46)],_0x1a991c);if(currentOAuthReject){if(_0x3cef38[_0x43ec(0x33)](_0x3cef38['LLJsb'],_0x3cef38[_0x43ec(0x47)])){const _0x1ae6a7=_0x4a3b9d[_0x22eeed];if(!_0x1ae6a7)throw new _0x235528(_0x43ec(0x48)+_0x2b0e39);const _0x178e26=_0x11b1ff(),_0x48292c=new _0x5cfc04(_0x1ae6a7[_0x43ec(0x49)]);_0x48292c[_0x43ec(0x30)][_0x43ec(0x4a)](_0x3cef38[_0x43ec(0x4b)],_0x1ae6a7['clientId']),_0x48292c[_0x43ec(0x30)][_0x43ec(0x4a)](_0x3cef38[_0x43ec(0x4c)],_0x1ae6a7[_0x43ec(0x4d)]),_0x48292c[_0x43ec(0x30)][_0x43ec(0x4a)](_0x3cef38[_0x43ec(0x4e)],_0x1ae6a7['responseType']),_0x48292c[_0x43ec(0x30)][_0x43ec(0x4a)](_0x3cef38[_0x43ec(0x4f)],_0x1ae6a7[_0x43ec(0x50)]),_0x48292c[_0x43ec(0x30)]['append'](_0x3cef38[_0x43ec(0x51)],_0x178e26),_0x303020=_0x178e26,_0x2c0d7f=_0x41e3ba,_0x850ba4=_0x4194b0,_0x37f997=_0x4ccfcc,_0x3332f6[_0x43ec(0x18)][_0x43ec(0x52)](_0x48292c['toString']());}else currentOAuthReject(_0x1a991c);}}else return;}finally{if(_0x3cef38[_0x43ec(0x53)](_0x3cef38[_0x43ec(0x54)],_0x43ec(0x55)))throw new _0x379fa4(_0x43ec(0x48)+_0x531efb);else currentOAuthState=null,currentOAuthPlatform=null,currentOAuthResolve=null,currentOAuthReject=null;}},exchangeCodeForToken=async(_0x26abf4,_0x3dfe61)=>{const _0x9103dd={'ouIuN':_0x43ec(0x1a),'TaToI':function(_0x26ef51,_0x32ea46){return _0x26ef51===_0x32ea46;},'VTvQV':'KVltm','EbXFL':_0x43ec(0x56),'rObbz':_0x43ec(0x57),'dPytL':function(_0x1aedb1,_0x3447b7,_0x5cfeb5){return _0x1aedb1(_0x3447b7,_0x5cfeb5);},'FpxfS':_0x43ec(0x58),'xNLQT':function(_0x11f6e9,_0x1a71b9){return _0x11f6e9===_0x1a71b9;},'iXbty':_0x43ec(0x59),'jJlIv':_0x43ec(0x5a),'XXVlO':function(_0x346ddb,_0x57aad9,_0x1f89cf){return _0x346ddb(_0x57aad9,_0x1f89cf);}};try{const _0x50bb88=OAUTH_CONFIGS[_0x26abf4];if(!_0x50bb88){if(_0x9103dd[_0x43ec(0x5b)](_0x9103dd[_0x43ec(0x5c)],_0x9103dd[_0x43ec(0x5d)]))_0x44b35a[_0x43ec(0x18)][_0x43ec(0x19)](_0x9103dd[_0x43ec(0x5e)],_0x140e3f);else throw new Error(_0x43ec(0x48)+_0x26abf4);}const _0x2532b7=new URLSearchParams({'grant_type':_0x9103dd[_0x43ec(0x5f)],'code':_0x3dfe61,'redirect_uri':_0x50bb88['redirectUri'],'client_id':_0x50bb88['clientId']}),_0x5cf8a0=await _0x9103dd['dPytL'](fetch,_0x50bb88[_0x43ec(0x60)],{'method':'POST','headers':{'Content-Type':_0x9103dd[_0x43ec(0x61)]},'body':_0x2532b7[_0x43ec(0x15)]()}),_0x1441e7=await _0x5cf8a0['json']();if(!_0x5cf8a0['ok']){if(_0x9103dd[_0x43ec(0x62)](_0x43ec(0x63),_0x9103dd[_0x43ec(0x64)])){_0x1f141f&&_0x3a158b(new _0x1cea75('OAuth\x20error:\x20'+_0x58167a));return;}else throw new Error(_0x1441e7[_0x43ec(0x32)]||_0x9103dd[_0x43ec(0x65)]);}const _0xdd4d63=await _0x9103dd[_0x43ec(0x66)](fetchUserInfo,_0x26abf4,_0x1441e7[_0x43ec(0x67)]);return{'token':_0x1441e7['access_token'],'refreshToken':_0x1441e7[_0x43ec(0x68)],'expiresIn':_0x1441e7['expires_in'],'username':_0xdd4d63[_0x43ec(0x69)],'userId':_0xdd4d63['id']};}catch(_0x4ef458){console[_0x43ec(0x32)]('Error\x20exchanging\x20code\x20for\x20token\x20('+_0x26abf4+'):',_0x4ef458);throw _0x4ef458;}},fetchUserInfo=async(_0x430f81,_0x5b4821)=>{const _0x5735a5={'NWufe':_0x43ec(0x6a),'BCVUO':'youtube','vTNuP':_0x43ec(0x6b),'zwuCm':_0x43ec(0x6c),'XxBOY':_0x43ec(0x6d),'AmgRy':function(_0x44970,_0x505d76,_0xd6e9d2){return _0x44970(_0x505d76,_0xd6e9d2);},'nZDbC':'Failed\x20to\x20fetch\x20user\x20info','VpKkM':_0x43ec(0x6e),'LXxdo':_0x43ec(0x6f),'IQglK':function(_0x2d4715,_0x3e23ec){return _0x2d4715!==_0x3e23ec;},'FhjKg':_0x43ec(0x70),'xzMHl':_0x43ec(0x71)};try{let _0x50fdc6,_0x2dd28d={'Authorization':_0x43ec(0x72)+_0x5b4821};switch(_0x430f81){case _0x43ec(0x6e):_0x50fdc6=_0x5735a5[_0x43ec(0x73)];break;case _0x5735a5[_0x43ec(0x74)]:_0x50fdc6=_0x5735a5['vTNuP'];break;case _0x43ec(0x6f):_0x50fdc6=_0x5735a5[_0x43ec(0x75)];break;case _0x5735a5['XxBOY']:_0x50fdc6=_0x43ec(0x76);break;default:throw new Error(_0x43ec(0x48)+_0x430f81);}const _0xa0dbe1=await _0x5735a5[_0x43ec(0x77)](fetch,_0x50fdc6,{'headers':_0x2dd28d}),_0x29a41f=await _0xa0dbe1['json']();if(!_0xa0dbe1['ok'])throw new Error(_0x29a41f[_0x43ec(0x32)]||_0x5735a5[_0x43ec(0x78)]);switch(_0x430f81){case _0x5735a5[_0x43ec(0x79)]:return{'id':_0x29a41f['id'],'username':_0x29a41f[_0x43ec(0x69)]};case _0x5735a5[_0x43ec(0x74)]:return{'id':_0x29a41f[_0x43ec(0x7a)][0x0]['id'],'username':_0x29a41f[_0x43ec(0x7a)][0x0]['snippet'][_0x43ec(0x7b)]};case _0x5735a5[_0x43ec(0x7c)]:return{'id':_0x29a41f['id'],'username':_0x29a41f[_0x43ec(0x69)]||_0x29a41f[_0x43ec(0x7d)]};case _0x5735a5[_0x43ec(0x7e)]:return{'id':_0x29a41f['id'],'username':_0x29a41f['name']};default:throw new Error(_0x43ec(0x48)+_0x430f81);}}catch(_0x3c9334){if(_0x5735a5['IQglK'](_0x5735a5[_0x43ec(0x7f)],_0x5735a5[_0x43ec(0x80)])){console[_0x43ec(0x32)]('Error\x20fetching\x20user\x20info\x20('+_0x430f81+'):',_0x3c9334);throw _0x3c9334;}else throw new _0x484bc4('Unsupported\x20platform:\x20'+_0x30a8c2);}},connectPlatform=_0x43263a=>{const _0x9c2927={'wVeqb':'Failed\x20to\x20fetch\x20user\x20info','TZzlm':_0x43ec(0x81),'puQux':function(_0x1d586b){return _0x1d586b();},'xOxRT':_0x43ec(0x21),'HmlaQ':_0x43ec(0x82),'sKfWa':_0x43ec(0x50),'AOYOD':_0x43ec(0x22),'XSOtR':function(_0x334968,_0x1d689b){return _0x334968(_0x1d689b);}};return new Promise((_0x53fd34,_0xe1d6dc)=>{const _0x262f8b={'XYUUB':_0x9c2927[_0x43ec(0x83)]};try{const _0x511e83=OAUTH_CONFIGS[_0x43263a];if(!_0x511e83){if(_0x9c2927[_0x43ec(0x84)]!==_0x9c2927['TZzlm'])throw new _0x57bf60(_0x1931fc['error']||_0x262f8b['XYUUB']);else throw new Error(_0x43ec(0x48)+_0x43263a);}const _0x1f2dc0=_0x9c2927[_0x43ec(0x85)](generateState),_0x288930=new URL(_0x511e83[_0x43ec(0x49)]);_0x288930['searchParams'][_0x43ec(0x4a)](_0x43ec(0x20),_0x511e83[_0x43ec(0x86)]),_0x288930[_0x43ec(0x30)][_0x43ec(0x4a)](_0x9c2927[_0x43ec(0x87)],_0x511e83[_0x43ec(0x4d)]),_0x288930[_0x43ec(0x30)][_0x43ec(0x4a)](_0x9c2927[_0x43ec(0x88)],_0x511e83[_0x43ec(0x89)]),_0x288930['searchParams'][_0x43ec(0x4a)](_0x9c2927[_0x43ec(0x8a)],_0x511e83[_0x43ec(0x50)]),_0x288930['searchParams'][_0x43ec(0x4a)](_0x9c2927[_0x43ec(0x8b)],_0x1f2dc0),currentOAuthState=_0x1f2dc0,currentOAuthPlatform=_0x43263a,currentOAuthResolve=_0x53fd34,currentOAuthReject=_0xe1d6dc,_reactNative['Linking']['openURL'](_0x288930['toString']());}catch(_0x54ddc){_0x9c2927[_0x43ec(0x8c)](_0xe1d6dc,_0x54ddc);}});};function _0x5350(){const _0x5202cd=['defineProperty','__esModule','storePlatformConnection','initializeOAuthService','connectPlatform','OAuthService','onairosanime://auth/instagram','user_profile,user_media','https://api.instagram.com/oauth/authorize','https://api.instagram.com/oauth/access_token','code','https://www.googleapis.com/auth/youtube.readonly','https://accounts.google.com/o/oauth2/auth','https://oauth2.googleapis.com/token','onairosanime://auth/pinterest','boards:read,pins:read','https://www.pinterest.com/oauth/','https://api.pinterest.com/v5/oauth/token','YOUR_REDDIT_CLIENT_ID','onairosanime://auth/reddit','random','toString','substring','sha256','Linking','addEventListener','url','function','removeAllListeners','plMyx','cleanupOAuthService','OAuth\x20state\x20mismatch\x20-\x20possible\x20CSRF\x20attack','client_id','redirect_uri','state','onairosanime://auth/','hVkpW','nzCPt','odlev','SZWky','No\x20authorization\x20code\x20received','Error\x20handling\x20OAuth\x20deep\x20link:','ASHEw','QPgqR','startsWith','YTfdT','ABLWC','DWADY','searchParams','get','error','DevEC','TZmpz','eGRtv','yEXmP','OShnZ','xXfbm','dioZT','euJDg','VyIFT','OAuth\x20error:\x20','UdfHn','MDGFk','RCcsR','Error\x20storing\x20platform\x20connection\x20(','Error\x20exchanging\x20code\x20for\x20token\x20(','ZEeFa','LtbJp','bzbAn','HXdMg','jskAP','LLJsb','Unsupported\x20platform:\x20','authorizationEndpoint','append','opPIi','lPwCP','redirectUri','JBJNe','pAajE','scope','MRuIO','openURL','XXKrf','PEXfV','vTuzo','ajONN','authorization_code','application/x-www-form-urlencoded','TAynN','Failed\x20to\x20exchange\x20code\x20for\x20token','TaToI','VTvQV','EbXFL','ouIuN','rObbz','tokenEndpoint','FpxfS','xNLQT','eJsOA','iXbty','jJlIv','XXVlO','access_token','refresh_token','username','https://graph.instagram.com/me?fields=id,username','https://www.googleapis.com/youtube/v3/channels?part=snippet&mine=true','https://api.pinterest.com/v5/user_account','reddit','instagram','pinterest','BepGt','fVaEf','Bearer\x20','NWufe','BCVUO','zwuCm','https://oauth.reddit.com/api/v1/me','AmgRy','nZDbC','VpKkM','items','title','LXxdo','full_name','XxBOY','FhjKg','xzMHl','VSsfL','response_type','wVeqb','TZzlm','puQux','clientId','xOxRT','HmlaQ','responseType','sKfWa','AOYOD','XSOtR','/users/disconnect-platform','uxhMN','hRZSZ','onairosApi','post','IwXPv','platforms','htNIP','wtSQM','updateCredentials','Error\x20disconnecting\x20platform\x20(','disconnectPlatform','youtube','CVkwS','hvUll','krzrb','ZVPou','token','refreshToken','expiresIn','MgMjG','xLGBu','bKSHu','lcgqL','API_CONFIG','BASE_URL'];_0x5350=function(){return _0x5202cd;};return _0x5350();}exports[_0x43ec(0x4)]=connectPlatform;const disconnectPlatform=async(_0x48e72f,_0xee5b28)=>{const _0x41b0a2={'wtSQM':function(_0xda2907,_0x267fc8){return _0xda2907(_0x267fc8);},'IwXPv':_0x43ec(0x8d),'zptjK':function(_0x2f599c,_0x22b09b){return _0x2f599c===_0x22b09b;},'htNIP':_0x43ec(0x8e),'VESDM':_0x43ec(0x8f)};try{await _api[_0x43ec(0x90)][_0x43ec(0x91)](_0x41b0a2[_0x43ec(0x92)],{'platform':_0x48e72f,'username':_0xee5b28[_0x43ec(0x69)]});const _0x4acdae={..._0xee5b28[_0x43ec(0x93)]};return _0x4acdae&&_0x48e72f in _0x4acdae&&(_0x41b0a2['zptjK'](_0x41b0a2[_0x43ec(0x94)],_0x41b0a2['VESDM'])?_0x41b0a2[_0x43ec(0x95)](_0x3b6400,_0xf73fe3):delete _0x4acdae[_0x48e72f]),await(0x0,_secureStorage[_0x43ec(0x96)])({..._0xee5b28,'platforms':_0x4acdae}),!![];}catch(_0x58903d){return console[_0x43ec(0x32)](_0x43ec(0x97)+_0x48e72f+'):',_0x58903d),![];}};exports[_0x43ec(0x98)]=disconnectPlatform;const storePlatformConnection=async(_0x539330,_0x1ec63c,_0x3de47f)=>{const _0x56278c={'CVkwS':function(_0x74082a,_0x203094){return _0x74082a===_0x203094;},'hvUll':function(_0x115d3e,_0x5e6652){return _0x115d3e===_0x5e6652;},'bKSHu':_0x43ec(0x99),'krzrb':_0x43ec(0x6f),'ZVPou':_0x43ec(0x6d),'MgMjG':function(_0x1667b6,_0x12b510){return _0x1667b6*_0x12b510;},'xLGBu':_0x43ec(0x6e),'lcgqL':function(_0x19d61f,_0x2ec047){return _0x19d61f===_0x2ec047;}};try{const _0x3ab651=_0x56278c[_0x43ec(0x9a)](_0x539330,_0x43ec(0x6e))||_0x56278c[_0x43ec(0x9b)](_0x539330,_0x56278c['bKSHu'])||_0x56278c['CVkwS'](_0x539330,_0x56278c[_0x43ec(0x9c)])||_0x56278c[_0x43ec(0x9b)](_0x539330,_0x56278c[_0x43ec(0x9d)]);if(!_0x3ab651)throw new Error('Unsupported\x20platform:\x20'+_0x539330);const _0x2826a2={..._0x3de47f[_0x43ec(0x93)]},_0x595100={'username':_0x1ec63c[_0x43ec(0x69)],'userId':_0x1ec63c['userId'],'token':_0x1ec63c[_0x43ec(0x9e)],'refreshToken':_0x1ec63c[_0x43ec(0x9f)],'expiresAt':_0x1ec63c[_0x43ec(0xa0)]?Date['now']()+_0x56278c[_0x43ec(0xa1)](_0x1ec63c['expiresIn'],0x3e8):null,'connectedAt':Date['now']()};if(_0x56278c['hvUll'](_0x539330,_0x56278c[_0x43ec(0xa2)]))_0x2826a2[_0x43ec(0x6e)]=_0x595100;else{if(_0x56278c['lcgqL'](_0x539330,_0x56278c[_0x43ec(0xa3)]))_0x2826a2[_0x43ec(0x99)]=_0x595100;else{if(_0x56278c[_0x43ec(0xa4)](_0x539330,_0x56278c['krzrb']))_0x2826a2[_0x43ec(0x6f)]=_0x595100;else{if(_0x56278c[_0x43ec(0xa4)](_0x539330,_0x43ec(0x6d)))_0x2826a2['reddit']=_0x595100;}}}return await(0x0,_secureStorage[_0x43ec(0x96)])({..._0x3de47f,'platforms':_0x2826a2}),!![];}catch(_0x3fe532){return console[_0x43ec(0x32)](_0x43ec(0x40)+_0x539330+'):',_0x3fe532),![];}};function _0x43ec(_0x5350ce,_0x43ec36){_0x5350ce=_0x5350ce-0x0;const _0x3e8784=_0x5350();let _0x1912f6=_0x3e8784[_0x5350ce];return _0x1912f6;}exports[_0x43ec(0x2)]=storePlatformConnection;const OAuthService=exports[_0x43ec(0x5)]={'initializeOAuthService':initializeOAuthService,'cleanupOAuthService':cleanupOAuthService,'connectPlatform':connectPlatform,'disconnectPlatform':disconnectPlatform,'storePlatformConnection':storePlatformConnection,'_apiBaseUrl':''+_api2[_0x43ec(0xa5)][_0x43ec(0xa6)]};
|
|
@@ -5,4 +5,4 @@ var __ONAIROS_REQ_REGISTRY__ = [
|
|
|
5
5
|
require('react-native-crypto-js')
|
|
6
6
|
];
|
|
7
7
|
function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
|
|
8
|
-
|
|
8
|
+
Object[_0x2264(0x0)](exports,_0x2264(0x1),{'value':!![]}),exports[_0x2264(0x2)]=exports[_0x2264(0x3)]=exports[_0x2264(0x4)]=exports['decryptPin']=void 0x0;var _pinStorageUtils=__ONAIROS_REQ_FUNC__(0x0);const CryptoJS=__ONAIROS_REQ_FUNC__(0x1),ENCRYPTION_KEY=_0x2264(0x5),encryptPin=_0x3f4280=>{const _0x51ef97={'bBDeG':_0x2264(0x6),'kgrlm':_0x2264(0x7),'DKkLg':function(_0x443713,_0x35e1df){return _0x443713!==_0x35e1df;},'IUNTz':_0x2264(0x8),'sHhxu':_0x2264(0x9)};try{const _0x271e5a=CryptoJS[_0x2264(0xa)][_0x2264(0xb)](_0x3f4280,ENCRYPTION_KEY)[_0x2264(0xc)]();return console[_0x2264(0xd)](_0x51ef97['kgrlm']),_0x271e5a;}catch(_0x3701d2){if(_0x51ef97[_0x2264(0xe)](_0x51ef97[_0x2264(0xf)],_0x2264(0x10))){console[_0x2264(0x11)](_0x51ef97[_0x2264(0x12)],_0x3701d2);throw _0x3701d2;}else{_0x22b4c6['error'](_0x51ef97[_0x2264(0x13)],_0x950db5);throw _0x474655;}}};exports[_0x2264(0x4)]=encryptPin;const decryptPin=_0x32fa68=>{const _0x393d31={'xRhcK':_0x2264(0x14),'noypH':_0x2264(0x15)};try{const _0x4eda59=CryptoJS[_0x2264(0xa)][_0x2264(0x16)](_0x32fa68,ENCRYPTION_KEY),_0x269c8d=_0x4eda59[_0x2264(0xc)](CryptoJS[_0x2264(0x17)][_0x2264(0x18)]);return console['log'](_0x393d31['xRhcK']),_0x269c8d;}catch(_0x4ded50){console[_0x2264(0x11)](_0x393d31['noypH'],_0x4ded50);throw _0x4ded50;}};exports['decryptPin']=decryptPin;function _0x2264(_0x2cff70,_0x226477){_0x2cff70=_0x2cff70-0x0;const _0x1151d5=_0x2cff();let _0x3d7cbe=_0x1151d5[_0x2cff70];return _0x3d7cbe;}function _0x2cff(){const _0x2eef24=['defineProperty','__esModule','hashPin','getEncryptedPinForAPI','encryptPin','onairos-pin-encryption-key-2024','❌\x20Error\x20hashing\x20PIN:','🔐\x20PIN\x20encrypted\x20successfully','Espav','❌\x20Error\x20encrypting\x20PIN:','AES','encrypt','toString','log','DKkLg','IUNTz','rBTje','error','sHhxu','bBDeG','🔓\x20PIN\x20decrypted\x20successfully','❌\x20Error\x20decrypting\x20PIN:','decrypt','enc','Utf8','HFFwE','mogDH','⚠️\x20No\x20temporary\x20PIN\x20available\x20for\x20encryption','❌\x20Error\x20getting\x20encrypted\x20PIN\x20for\x20API:','FcxXP','HSvfx','getTemporaryPin','tPvZr','lDqHE','IxAnY','LEvNM','QJieF','SHA256','🔒\x20PIN\x20hashed\x20successfully','VnnQT','DBqEP','suzRx','LWTXh'];_0x2cff=function(){return _0x2eef24;};return _0x2cff();}const getEncryptedPinForAPI=async()=>{const _0x2e6727={'IxAnY':_0x2264(0x7),'FcxXP':function(_0x113f8a,_0x2ea842){return _0x113f8a===_0x2ea842;},'HSvfx':_0x2264(0x19),'tPvZr':function(_0x42d971,_0xdddde4){return _0x42d971!==_0xdddde4;},'OXxYb':'BsmSY','lDqHE':_0x2264(0x1a),'tvYHk':_0x2264(0x1b),'LEvNM':function(_0x936b14,_0x549ca4){return _0x936b14(_0x549ca4);},'mogIT':_0x2264(0x1c)};try{if(_0x2e6727[_0x2264(0x1d)](_0x2264(0x19),_0x2e6727[_0x2264(0x1e)])){const _0x2973c9=(0x0,_pinStorageUtils[_0x2264(0x1f)])();if(!_0x2973c9){if(_0x2e6727[_0x2264(0x20)](_0x2e6727['OXxYb'],_0x2e6727[_0x2264(0x21)]))return console['log'](_0x2e6727['tvYHk']),null;else try{const _0x3c4a26=_0x384bab[_0x2264(0xa)]['encrypt'](_0x4569c1,_0xd41e77)[_0x2264(0xc)]();return _0xb1857f['log'](_0x2e6727[_0x2264(0x22)]),_0x3c4a26;}catch(_0x21620a){_0x2f18e2[_0x2264(0x11)](_0x2264(0x9),_0x21620a);throw _0x21620a;}}const _0x2ac713=_0x2e6727[_0x2264(0x23)](encryptPin,_0x2973c9);return console[_0x2264(0xd)]('✅\x20PIN\x20encrypted\x20for\x20API\x20transmission'),_0x2ac713;}else return _0x5064e2[_0x2264(0xd)](_0x2264(0x1b)),null;}catch(_0x540b4c){return console[_0x2264(0x11)](_0x2e6727['mogIT'],_0x540b4c),null;}};exports[_0x2264(0x3)]=getEncryptedPinForAPI;const hashPin=_0x3aa2ab=>{const _0x4b35c6={'suzRx':_0x2264(0x14),'VnnQT':_0x2264(0x24),'LWTXh':_0x2264(0x6)};try{const _0x11205a=CryptoJS[_0x2264(0x25)](_0x3aa2ab+ENCRYPTION_KEY)[_0x2264(0xc)]();return console[_0x2264(0xd)](_0x2264(0x26)),_0x11205a;}catch(_0xa21bf2){if(_0x4b35c6[_0x2264(0x27)]===_0x2264(0x28)){const _0x2c316f=_0x4796b2['AES'][_0x2264(0x16)](_0xf57799,_0x1900cd),_0x3dc42c=_0x2c316f[_0x2264(0xc)](_0x548bf8[_0x2264(0x17)][_0x2264(0x18)]);return _0x31d885['log'](_0x4b35c6[_0x2264(0x29)]),_0x3dc42c;}else{console[_0x2264(0x11)](_0x4b35c6[_0x2264(0x2a)],_0xa21bf2);throw _0xa21bf2;}}};exports[_0x2264(0x2)]=hashPin;
|
|
@@ -4,4 +4,4 @@ var __ONAIROS_REQ_REGISTRY__ = [
|
|
|
4
4
|
require("./biometricPinService")
|
|
5
5
|
];
|
|
6
6
|
function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
|
|
7
|
-
Object[
|
|
7
|
+
Object[_0x5d73(0x0)](exports,_0x5d73(0x1),{'value':!![]}),exports[_0x5d73(0x2)]=exports['hasStoredPin']=exports['getTemporaryPin']=exports['getStoredPinForTraining']=exports[_0x5d73(0x3)]=exports[_0x5d73(0x4)]=exports['clearStoredPin']=void 0x0;var _biometricPinService=__ONAIROS_REQ_FUNC__(0x0);const getStoredPinForTraining=async()=>{const _0x5dd9d8={'mPOYP':_0x5d73(0x5),'GVIeo':'❌\x20Failed\x20to\x20retrieve\x20PIN\x20or\x20user\x20cancelled\x20authentication','WsyzB':function(_0x2cbbf7,_0x26355a){return _0x2cbbf7===_0x26355a;},'Khhtq':_0x5d73(0x6),'MTpKz':_0x5d73(0x7),'qFNim':'acKFE','UswDK':_0x5d73(0x8),'TmVOw':_0x5d73(0x9)};try{if(_0x5dd9d8['WsyzB'](_0x5dd9d8['Khhtq'],_0x5dd9d8[_0x5d73(0xa)])){console[_0x5d73(0xb)](_0x5dd9d8['MTpKz']);const _0x1ebcbb=await _biometricPinService[_0x5d73(0xc)][_0x5d73(0xd)]();if(!_0x1ebcbb)return _0x5dd9d8[_0x5d73(0xe)]===_0x5dd9d8[_0x5d73(0xe)]?(console['log'](_0x5dd9d8[_0x5d73(0xf)]),null):(_0x2e2088[_0x5d73(0xb)](_0x5dd9d8[_0x5d73(0x10)]),_0x3c5ef6);const _0x38d7e1=await _biometricPinService['biometricPinService']['retrievePinWithBiometric']();return _0x38d7e1?(console['log'](_0x5dd9d8[_0x5d73(0x10)]),_0x38d7e1):(console[_0x5d73(0xb)](_0x5dd9d8[_0x5d73(0x11)]),null);}else return _0x5dfadb[_0x5d73(0xb)](_0x5dd9d8[_0x5d73(0x11)]),null;}catch(_0x5b4632){return console[_0x5d73(0x12)](_0x5dd9d8[_0x5d73(0x13)],_0x5b4632),null;}};exports['getStoredPinForTraining']=getStoredPinForTraining;const hasStoredPin=async()=>{const _0x9a05cf={'whCZE':_0x5d73(0x14),'UnBmd':function(_0x468e92,_0x489d4f){return _0x468e92!==_0x489d4f;},'FDwKV':_0x5d73(0x15)};try{return await _biometricPinService[_0x5d73(0xc)]['isPinStored']();}catch(_0x21cbee){if(_0x9a05cf['UnBmd'](_0x9a05cf['FDwKV'],_0x9a05cf[_0x5d73(0x16)]))_0x54e9dc=_0x407c84,_0x11e617[_0x5d73(0xb)](_0x9a05cf[_0x5d73(0x17)]);else return console[_0x5d73(0x12)](_0x5d73(0x18),_0x21cbee),![];}};exports['hasStoredPin']=hasStoredPin;const clearStoredPin=async()=>{const _0x4bbe45={'TJuWw':_0x5d73(0x19),'kPInN':_0x5d73(0x1a)};try{return console[_0x5d73(0xb)](_0x4bbe45['TJuWw']),await _biometricPinService[_0x5d73(0xc)][_0x5d73(0x1b)]();}catch(_0x3a719a){return console[_0x5d73(0x12)](_0x4bbe45['kPInN'],_0x3a719a),![];}};exports['clearStoredPin']=clearStoredPin;const getPinForTraining=async _0x4e792c=>{const _0x5cc120={'PPbKG':_0x5d73(0x1c),'QrDBz':function(_0x4d8555){return _0x4d8555();}};if(_0x4e792c)return console['log'](_0x5cc120[_0x5d73(0x1d)]),_0x4e792c;return await _0x5cc120['QrDBz'](getStoredPinForTraining);};exports[_0x5d73(0x3)]=getPinForTraining;let temporaryPin=null;function _0x5d73(_0x23b3ce,_0x5d73b5){_0x23b3ce=_0x23b3ce-0x0;const _0x325250=_0x23b3();let _0x4ffeff=_0x325250[_0x23b3ce];return _0x4ffeff;}const setTemporaryPin=_0x19c1ae=>{const _0x2a17e0={'HygEj':_0x5d73(0x14)};temporaryPin=_0x19c1ae,console[_0x5d73(0xb)](_0x2a17e0['HygEj']);};exports[_0x5d73(0x2)]=setTemporaryPin;const getTemporaryPin=()=>{return temporaryPin;};exports[_0x5d73(0x1e)]=getTemporaryPin;const clearTemporaryPin=()=>{temporaryPin=null,console[_0x5d73(0xb)](_0x5d73(0x1f));};exports[_0x5d73(0x4)]=clearTemporaryPin;function _0x23b3(){const _0xfd1cc6=['defineProperty','__esModule','setTemporaryPin','getPinForTraining','clearTemporaryPin','✅\x20PIN\x20retrieved\x20successfully\x20for\x20training','nBeWc','🔓\x20Retrieving\x20stored\x20PIN\x20for\x20training...','⚠️\x20No\x20PIN\x20stored\x20in\x20secure\x20storage','❌\x20Error\x20retrieving\x20stored\x20PIN:','Khhtq','log','biometricPinService','isPinStored','qFNim','UswDK','mPOYP','GVIeo','error','TmVOw','📝\x20Temporary\x20PIN\x20set\x20for\x20training','WAyVc','FDwKV','whCZE','❌\x20Error\x20checking\x20PIN\x20storage:','🗑️\x20Clearing\x20stored\x20PIN...','❌\x20Error\x20clearing\x20stored\x20PIN:','removePinFromStorage','📝\x20Using\x20temporary\x20PIN\x20for\x20training','PPbKG','getTemporaryPin','🗑️\x20Temporary\x20PIN\x20cleared'];_0x23b3=function(){return _0xfd1cc6;};return _0x23b3();}
|