@onairos/react-native 3.7.1 → 3.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/api/index.js +1 -1
- package/lib/commonjs/assets/icons/spotify.png +0 -0
- package/lib/commonjs/assets/images/spotify.png +0 -0
- 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 +1 -1
- 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 +1 -1
- package/lib/commonjs/components/VerificationStep.js +1 -1
- package/lib/commonjs/components/WelcomeScreen.js +1 -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 +1 -1
- 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 +1 -1
- package/lib/commonjs/services/apiClient.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 +1 -1
- package/lib/commonjs/services/hingeDataService.js +1 -1
- package/lib/commonjs/services/imageCompressionService.js +1 -1
- package/lib/commonjs/services/instagramDataExtractor.js +1 -1
- package/lib/commonjs/services/instagramDataService.js +1 -1
- 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/netflixDataExtractor.js +1 -1
- package/lib/commonjs/services/netflixDataService.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 +1 -1
- package/lib/commonjs/services/sephoraDataService.js +1 -1
- package/lib/commonjs/services/spotifyDataExtractor.js +1 -1
- package/lib/commonjs/services/spotifyDataService.js +1 -1
- package/lib/commonjs/services/storageService.js +1 -1
- package/lib/commonjs/services/telegramDataExtractor.js +1 -1
- package/lib/commonjs/services/telegramDataService.js +1 -1
- 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 +1 -1
- package/lib/commonjs/utils/auth.js +1 -1
- package/lib/commonjs/utils/connectorTests.js +1 -1
- 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 -1
- package/lib/commonjs/utils/webviewScripts/index.js +1 -1
- package/lib/commonjs/utils/webviewScripts/instagram.js +1 -1
- package/lib/commonjs/utils/webviewScripts/linkedin.js +1 -1
- package/lib/commonjs/utils/webviewScripts/netflix.js +1 -1
- package/lib/commonjs/utils/webviewScripts/sephora.js +1 -1
- package/lib/commonjs/utils/webviewScripts/spotify.js +1 -1
- package/lib/commonjs/utils/webviewScripts/telegram.js +1 -1
- package/lib/module/api/index.js +1 -1
- package/lib/module/assets/icons/spotify.png +0 -0
- package/lib/module/assets/images/spotify.png +0 -0
- 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 +1 -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/apiClient.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 -1
- package/lib/module/services/hingeDataService.js +1 -1
- package/lib/module/services/imageCompressionService.js +1 -1
- package/lib/module/services/instagramDataExtractor.js +1 -1
- package/lib/module/services/instagramDataService.js +1 -1
- 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/netflixDataExtractor.js +1 -1
- package/lib/module/services/netflixDataService.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 -1
- package/lib/module/services/sephoraDataService.js +1 -1
- package/lib/module/services/spotifyDataExtractor.js +1 -1
- package/lib/module/services/spotifyDataService.js +1 -1
- package/lib/module/services/storageService.js +1 -1
- package/lib/module/services/telegramDataExtractor.js +1 -1
- package/lib/module/services/telegramDataService.js +1 -1
- 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 +1 -1
- package/lib/module/utils/auth.js +1 -1
- package/lib/module/utils/connectorTests.js +1 -1
- 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 -1
- package/lib/module/utils/webviewScripts/index.js +1 -1
- package/lib/module/utils/webviewScripts/instagram.js +1 -1
- package/lib/module/utils/webviewScripts/linkedin.js +1 -1
- package/lib/module/utils/webviewScripts/netflix.js +1 -1
- package/lib/module/utils/webviewScripts/sephora.js +1 -1
- package/lib/module/utils/webviewScripts/spotify.js +1 -1
- package/lib/module/utils/webviewScripts/telegram.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{initializePlatformAuthService}from'../services/platformAuthService';export const executeOnairosFlow=async
|
|
1
|
+
function _0x1e01(_0x30d41a,_0x1e01b5){_0x30d41a=_0x30d41a-0x0;const _0x1f9715=_0x30d4();let _0xf77c83=_0x1f9715[_0x30d41a];return _0xf77c83;}import{initializePlatformAuthService}from'../services/platformAuthService';export const executeOnairosFlow=async _0x4e17d3=>{const _0x18c563={'MFdQg':'❌\x20Onairos\x20flow\x20rejected:','gEUpe':function(_0x43109e,_0x15deda){return _0x43109e!==_0x15deda;},'UFvOF':'RXiwm','JduuE':function(_0x22ed50,_0x554387){return _0x22ed50(_0x554387);},'cGMdU':function(_0x420261,_0x428cb7){return _0x420261||_0x428cb7;},'tnZqX':_0x1e01(0x0),'TkoIM':_0x1e01(0x1),'YPauj':_0x1e01(0x2),'FRomI':function(_0x272a99){return _0x272a99();},'YABir':_0x1e01(0x3),'BQJLd':'iNOkV','LwuHs':'tLyay','DCaLw':_0x1e01(0x4),'qqnOM':_0x1e01(0x5),'uUrYK':function(_0x51851d){return _0x51851d();},'cLlKv':'../components/UniversalOnboarding','SRowC':_0x1e01(0x6)};try{console['log'](_0x18c563['qqnOM']),await _0x18c563['uUrYK'](initializePlatformAuthService);const {UniversalOnboarding:_0x38645c}=await import(_0x18c563[_0x1e01(0x7)]),React=await import('react');return new Promise((_0x34537f,_0x10f7a2)=>{const _0x1106b9={'PxRTM':_0x18c563[_0x1e01(0x8)],'dOzdE':function(_0x165f44,_0x190d46){return _0x18c563['gEUpe'](_0x165f44,_0x190d46);},'STafn':_0x18c563[_0x1e01(0x9)],'WezHZ':function(_0x1b2e13){return _0x18c563[_0x1e01(0xa)](_0x1b2e13);},'scRVf':_0x18c563[_0x1e01(0xb)]};if(_0x18c563[_0x1e01(0xc)](_0x18c563[_0x1e01(0xd)],_0x18c563[_0x1e01(0xe)])){let _0x115e3c=null;const _0x10a59f=(_0x1b8ff2,_0x1f6189,_0x25d6b7)=>{console[_0x1e01(0xf)](_0x1106b9['PxRTM']),_0x115e3c&&_0x115e3c['close']&&_0x115e3c[_0x1e01(0x10)](),_0x4e17d3[_0x1e01(0x11)]&&(_0x1106b9['dOzdE'](_0x1106b9['STafn'],_0x1106b9[_0x1e01(0x12)])?_0x27a4bb[_0x1e01(0x10)]():_0x4e17d3[_0x1e01(0x11)](_0x1b8ff2,_0x1f6189,_0x25d6b7)),_0x1106b9[_0x1e01(0x13)](_0x34537f);},_0x139771=_0x5af1bf=>{console[_0x1e01(0xf)](_0x18c563['MFdQg'],_0x5af1bf),_0x115e3c&&_0x115e3c['close']&&_0x115e3c[_0x1e01(0x10)](),_0x4e17d3['onRejection']&&(_0x18c563[_0x1e01(0xc)](_0x18c563['UFvOF'],_0x18c563[_0x1e01(0x14)])?(_0x57a3bd['log'](_0x1e01(0x1)),_0x27b1f7&&_0x304613[_0x1e01(0x10)]&&_0x1d8bd1[_0x1e01(0x10)](),_0x1f0509['onResolved']&&_0x359c54[_0x1e01(0x11)](_0x3eb081,_0x427a04,_0x395eeb),_0x1fe295()):_0x4e17d3[_0x1e01(0x15)](_0x5af1bf)),_0x18c563['JduuE'](_0x10f7a2,new Error(_0x18c563[_0x1e01(0x16)](_0x5af1bf,_0x18c563[_0x1e01(0x17)])));},_0x2a25b8=React[_0x1e01(0x18)](_0x38645c,{'visible':!![],'onClose':()=>_0x139771(_0x1e01(0x19)),'AppName':_0x4e17d3[_0x1e01(0x1a)],'requestData':_0x4e17d3['requestData'],'returnLink':_0x4e17d3[_0x1e01(0x1b)],'onComplete':_0x10a59f,'preferredPlatform':_0x4e17d3['preferredPlatform'],'debug':_0x4e17d3[_0x1e01(0x1c)],'testMode':_0x4e17d3[_0x1e01(0x1d)]});_0x115e3c=_0x2a25b8,console[_0x1e01(0xf)](_0x18c563['DCaLw']);}else _0xee66aa[_0x1e01(0x15)](_0x1106b9[_0x1e01(0x1e)]);});}catch(_0x4bd078){console[_0x1e01(0x1f)](_0x18c563[_0x1e01(0x20)],_0x4bd078);throw _0x4bd078;}};export const startOnairosFlow=async _0xaae838=>{const _0x243d07={'cfnME':function(_0x1f5052,_0x4fe56c){return _0x1f5052===_0x4fe56c;},'yTWAP':_0x1e01(0x21),'EvEwe':_0x1e01(0x22)};if(_0xaae838[_0x1e01(0x23)]){if(_0x243d07[_0x1e01(0x24)](_0x243d07[_0x1e01(0x25)],'sRnUA')){const _0x35a9c9=await _0xaae838[_0x1e01(0x23)]();if(!_0x35a9c9){console[_0x1e01(0xf)](_0x243d07['EvEwe']);_0xaae838[_0x1e01(0x15)]&&_0xaae838[_0x1e01(0x15)](_0x1e01(0x3));return;}}else _0x177dcc[_0x1e01(0x11)](_0x67cf12,_0x7418ce,_0x3e2db2);}return executeOnairosFlow(_0xaae838);};function _0x30d4(){const _0xaa82c2=['Onairos\x20flow\x20was\x20rejected','✅\x20Onairos\x20flow\x20completed\x20successfully','iqWrJ','Pre-check\x20failed','📱\x20Onairos\x20modal\x20should\x20be\x20displayed','🚀\x20Starting\x20Onairos\x20flow\x20programmatically...','❌\x20Failed\x20to\x20execute\x20Onairos\x20flow:','cLlKv','TkoIM','YPauj','FRomI','YABir','gEUpe','BQJLd','LwuHs','log','close','onResolved','STafn','WezHZ','UFvOF','onRejection','cGMdU','tnZqX','createElement','User\x20closed\x20the\x20modal','AppName','returnLink','debug','testMode','scRVf','error','SRowC','sRnUA','❌\x20Pre-check\x20failed,\x20not\x20starting\x20Onairos\x20flow','preCheck','cfnME','yTWAP'];_0x30d4=function(){return _0xaa82c2;};return _0x30d4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const DEFAULT_RETRY_OPTIONS={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1388,'exponentialBackoff':!![],'enableLogging':![],'shouldRetry':(_0x519b13,_0x2eafc9)=>{const _0x1319b1={'SMWVe':function(_0xfba001,_0x41ca56){return _0xfba001<_0x41ca56;},'vFMmU':function(_0x1bf396,_0x27c55c){return _0x1bf396!==_0x27c55c;},'hbPpu':function(_0x26a5f6,_0x2a9a10){return _0x26a5f6===_0x2a9a10;},'DeWUY':_0x3701(0x0),'hgYOx':_0x3701(0x1),'JyTHK':_0x3701(0x2),'ZekyC':_0x3701(0x3),'ffeza':function(_0x3d965f,_0x1a0e21){return _0x3d965f>=_0x1a0e21;},'QqLbq':_0x3701(0x4),'OMoxg':_0x3701(0x5)};if(_0x519b13[_0x3701(0x6)]>=0x190&&_0x1319b1[_0x3701(0x7)](_0x519b13[_0x3701(0x6)],0x1f4)&&_0x1319b1[_0x3701(0x8)](_0x519b13[_0x3701(0x6)],0x198)&&_0x519b13[_0x3701(0x6)]!==0x1ad)return![];if(_0x1319b1['hbPpu'](_0x519b13['name'],_0x1319b1[_0x3701(0x9)])||_0x519b13[_0x3701(0xa)][_0x3701(0xb)]('Network\x20request\x20failed')||_0x519b13[_0x3701(0xa)][_0x3701(0xb)](_0x1319b1[_0x3701(0xc)])||_0x519b13[_0x3701(0xa)]['includes'](_0x1319b1[_0x3701(0xd)])||_0x519b13[_0x3701(0xa)][_0x3701(0xb)](_0x1319b1[_0x3701(0xe)])||_0x1319b1[_0x3701(0xf)](_0x519b13[_0x3701(0x6)],0x1f4))return!![];if(_0x519b13['message'][_0x3701(0xb)](_0x1319b1[_0x3701(0x10)])||_0x519b13['message'][_0x3701(0xb)](_0x1319b1['OMoxg']))return!![];return![];}};export async function withRetry(_0x1bf532,_0x5a0bb1={}){const _0x2b3097={'ZkBry':function(_0x122cb9,_0x2d4a18){return _0x122cb9<_0x2d4a18;},'ApUGd':function(_0x56cf91,_0x119b8a){return _0x56cf91!==_0x119b8a;},'LPxNq':function(_0x134840,_0x3f93e6){return _0x134840!==_0x3f93e6;},'SIySn':function(_0x2b8779,_0x37061e){return _0x2b8779===_0x37061e;},'XzDRz':_0x3701(0x0),'mbAYg':'Network\x20request\x20failed','niZyW':_0x3701(0x1),'SnLei':_0x3701(0x2),'WzCNi':function(_0x46a185,_0x33669a){return _0x46a185>=_0x33669a;},'XJIow':_0x3701(0x4),'YLuaE':_0x3701(0x5),'XgDnp':function(_0x2f294c,_0x13ff01){return _0x2f294c+_0x13ff01;},'aPgjO':_0x3701(0x11),'OwsxG':function(_0x109795,_0x7158b1){return _0x109795>_0x7158b1;},'UrjfK':function(_0x3d5e67,_0x31d2a9){return _0x3d5e67+_0x31d2a9;},'SFUSC':function(_0x587f6f){return _0x587f6f();},'QKHXJ':function(_0x1033ce,_0x4fc59d){return _0x1033ce-_0x4fc59d;},'fIrDJ':function(_0x36a5aa,_0x44b248){return _0x36a5aa!==_0x44b248;},'OPtmR':_0x3701(0x12),'MWfVk':_0x3701(0x13),'Dczhr':'zJjIf','AXQnK':function(_0x10ebf5,_0x5efa34){return _0x10ebf5*_0x5efa34;},'IvUSq':function(_0x14f128,_0x43f0dc){return _0x14f128-_0x43f0dc;},'ngBiH':function(_0x2f5c46,_0x26c58a){return _0x2f5c46+_0x26c58a;},'LezQt':function(_0x186340,_0x5c5534){return _0x186340+_0x5c5534;},'ccdKM':_0x3701(0x14),'OZoAr':function(_0x105b97,_0x1d0812){return _0x105b97+_0x1d0812;}},_0x494ee7={...DEFAULT_RETRY_OPTIONS,..._0x5a0bb1},_0x149f16=Date['now']();let _0x2e4a14=null;for(let _0x2ffe79=0x1;_0x2ffe79<=_0x2b3097[_0x3701(0x15)](_0x494ee7[_0x3701(0x16)],0x1);_0x2ffe79++){try{if(_0x2b3097[_0x3701(0x17)](_0x3701(0x18),_0x2b3097[_0x3701(0x19)]))return!![];else{_0x494ee7[_0x3701(0x1a)]&&_0x2b3097['OwsxG'](_0x2ffe79,0x1)&&console[_0x3701(0x1b)](_0x3701(0x1c)+_0x2ffe79+'/'+_0x2b3097['UrjfK'](_0x494ee7['maxRetries'],0x1));const _0x175cd1=await _0x2b3097[_0x3701(0x1d)](_0x1bf532);return{'success':!![],'data':_0x175cd1,'attempts':_0x2ffe79,'totalDuration':_0x2b3097[_0x3701(0x1e)](Date['now'](),_0x149f16)};}}catch(_0x4e8bbd){if(_0x2b3097[_0x3701(0x1f)](_0x2b3097[_0x3701(0x20)],_0x3701(0x12)))return!![];else{_0x2e4a14=_0x4e8bbd;const _0x2227b7=_0x494ee7[_0x3701(0x21)]?_0x494ee7[_0x3701(0x21)](_0x4e8bbd,_0x2ffe79):!![];if(_0x2b3097[_0x3701(0x22)](_0x2ffe79,_0x494ee7['maxRetries'])||!_0x2227b7){if(_0x494ee7[_0x3701(0x1a)]){if(_0x2b3097[_0x3701(0x17)](_0x2b3097[_0x3701(0x23)],_0x2b3097[_0x3701(0x24)])){if(_0x2b1235['status']>=0x190&&_0x2b3097[_0x3701(0x25)](_0x17f5f3['status'],0x1f4)&&_0x2b3097[_0x3701(0x26)](_0x27bb59[_0x3701(0x6)],0x198)&&_0x2b3097[_0x3701(0x27)](_0x3a6fb8['status'],0x1ad))return![];if(_0x2b3097[_0x3701(0x17)](_0x3e3b21[_0x3701(0x28)],_0x2b3097[_0x3701(0x29)])||_0x101104['message']['includes'](_0x2b3097['mbAYg'])||_0x22e011[_0x3701(0xa)]['includes'](_0x2b3097['niZyW'])||_0x432feb[_0x3701(0xa)][_0x3701(0xb)](_0x2b3097[_0x3701(0x2a)])||_0x34c76a[_0x3701(0xa)][_0x3701(0xb)]('timeout')||_0x2b3097[_0x3701(0x2b)](_0x3c7fd9[_0x3701(0x6)],0x1f4))return!![];if(_0x14fd78[_0x3701(0xa)][_0x3701(0xb)](_0x2b3097['XJIow'])||_0x33016a[_0x3701(0xa)]['includes'](_0x2b3097[_0x3701(0x2c)]))return!![];return![];}else console[_0x3701(0x2d)](_0x3701(0x2e)+_0x4e8bbd[_0x3701(0xa)]);}break;}let _0x10f8a4=_0x494ee7[_0x3701(0x2f)];_0x494ee7['exponentialBackoff']&&(_0x10f8a4=Math[_0x3701(0x30)](_0x2b3097[_0x3701(0x31)](_0x494ee7['baseDelay'],Math['pow'](0x2,_0x2b3097[_0x3701(0x32)](_0x2ffe79,0x1))),_0x494ee7[_0x3701(0x33)]));const _0x4189c4=_0x2b3097[_0x3701(0x31)](Math[_0x3701(0x34)]()*0.1,_0x10f8a4);_0x10f8a4=Math['floor'](_0x2b3097[_0x3701(0x35)](_0x10f8a4,_0x4189c4)),_0x494ee7[_0x3701(0x36)]&&_0x494ee7[_0x3701(0x36)](_0x4e8bbd,_0x2ffe79,_0x10f8a4),_0x494ee7[_0x3701(0x1a)]&&console[_0x3701(0x1b)](_0x3701(0x37)+_0x10f8a4+_0x3701(0x38)+_0x2ffe79+'/'+_0x2b3097[_0x3701(0x39)](_0x494ee7['maxRetries'],0x1)+')'),await new Promise(_0x288d19=>setTimeout(()=>_0x288d19(),_0x10f8a4));}}}return{'success':![],'error':_0x2e4a14||new Error(_0x2b3097[_0x3701(0x3a)]),'attempts':_0x2b3097['OZoAr'](_0x494ee7['maxRetries'],0x1),'totalDuration':_0x2b3097['QKHXJ'](Date[_0x3701(0x3b)](),_0x149f16)};}function _0x5b57(){const _0xae596=['AbortError','fetch','ENOTFOUND','timeout','JSON\x20Parse\x20error','Unexpected\x20character','status','SMWVe','vFMmU','DeWUY','message','includes','hgYOx','JyTHK','ZekyC','ffeza','QqLbq','qzKlU','DyrNB','wdIpR','Unknown\x20error','XgDnp','maxRetries','SIySn','IuCWO','aPgjO','enableLogging','log','🔄\x20Retry\x20attempt\x20','SFUSC','QKHXJ','fIrDJ','OPtmR','shouldRetry','OwsxG','MWfVk','Dczhr','ZkBry','ApUGd','LPxNq','name','XzDRz','SnLei','WzCNi','YLuaE','error','❌\x20All\x20retry\x20attempts\x20exhausted\x20or\x20error\x20not\x20retryable:\x20','baseDelay','min','AXQnK','IvUSq','maxDelay','random','ngBiH','onRetry','⏳\x20Waiting\x20','ms\x20before\x20retry\x20(attempt\x20','LezQt','ccdKM','now','validation\x20endpoint','qAlDi','yvHeu','Network\x20request\x20failed','CXpyF','YDQyL','srElV','ktRFz','KFdMg','NwkIj','pow','CvmAC','CBZBe','pGpda','warn','⚠️\x20API\x20call\x20failed\x20(attempt\x20','),\x20retrying\x20in\x20','DNS','QrVyV','gYDVE','FRJWp','aEeRF','NNaeZ','success','lqTlU','OdHQG','TFqlg','ATaFP','data','yvfrl','SpTEe','RWaJP','nLjZm','IjDlz','Dsbwa','BrKDX','abort','signal','cUAhm','dWDyJ','RPyHT'];_0x5b57=function(){return _0xae596;};return _0x5b57();}export const API_RETRY_OPTIONS={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1388,'exponentialBackoff':!![],'shouldRetry':(_0x2eb8fc,_0x1428a0)=>{const _0x2ceae5={'NwkIj':function(_0x3e91c1,_0x573aa5){return _0x3e91c1*_0x573aa5;},'KGIXA':function(_0x20b06d,_0x2905a3){return _0x20b06d-_0x2905a3;},'pUSjC':function(_0x40da55,_0x31bc8c){return _0x40da55+_0x31bc8c;},'CXpyF':function(_0x3bf44c,_0x208ce1){return _0x3bf44c===_0x208ce1;},'YDQyL':_0x3701(0x3c),'srElV':function(_0x39d4c3,_0x46566e){return _0x39d4c3!==_0x46566e;},'ktRFz':'CewMV','KFdMg':_0x3701(0x3d),'jRHrh':function(_0x436329,_0x109c2f){return _0x436329<=_0x109c2f;},'NiPhL':function(_0x194161,_0x491eaa){return _0x194161===_0x491eaa;},'ZYKmK':_0x3701(0x3e),'ycHWW':_0x3701(0x0),'CvmAC':_0x3701(0x3),'zFefS':_0x3701(0x3f),'cmMcO':_0x3701(0x1),'CBZBe':'VzDTU','ODVei':_0x3701(0x4),'pGpda':_0x3701(0x5)};if(_0x2eb8fc['status']===0x191||_0x2ceae5[_0x3701(0x40)](_0x2eb8fc['status'],0x193))return![];if(_0x2ceae5[_0x3701(0x40)](_0x2eb8fc[_0x3701(0x6)],0x190)||_0x2eb8fc[_0x3701(0x6)]===0x194&&!_0x2eb8fc[_0x3701(0xa)][_0x3701(0xb)](_0x2ceae5[_0x3701(0x41)])){if(_0x2ceae5[_0x3701(0x42)](_0x2ceae5['ktRFz'],_0x2ceae5[_0x3701(0x43)]))_0x471d82['error']('❌\x20All\x20retry\x20attempts\x20exhausted\x20or\x20error\x20not\x20retryable:\x20'+_0x2295f0[_0x3701(0xa)]);else return![];}if(_0x2eb8fc['status']===0x1ad)return _0x2ceae5[_0x3701(0x40)](_0x2ceae5[_0x3701(0x44)],_0x2ceae5[_0x3701(0x44)])?_0x2ceae5['jRHrh'](_0x1428a0,0x2):!![];if(_0x2eb8fc['status']>=0x1f4){if(_0x2ceae5['NiPhL'](_0x2ceae5['ZYKmK'],_0x3701(0x3e)))return!![];else _0xe69e84=_0xd63b5e[_0x3701(0x30)](_0x2ceae5[_0x3701(0x45)](_0x2f036b[_0x3701(0x2f)],_0x3d28ce[_0x3701(0x46)](0x2,_0x2ceae5['KGIXA'](_0x1200f3,0x1))),_0x4f5041[_0x3701(0x33)]);}if(_0x2eb8fc['name']===_0x2ceae5['ycHWW']||_0x2eb8fc['message'][_0x3701(0xb)](_0x2ceae5[_0x3701(0x47)])||_0x2eb8fc['message']['includes'](_0x2ceae5['zFefS'])||_0x2eb8fc[_0x3701(0xa)][_0x3701(0xb)](_0x2ceae5['cmMcO'])||_0x2eb8fc[_0x3701(0xa)][_0x3701(0xb)](_0x3701(0x2))){if(_0x2ceae5[_0x3701(0x48)]===_0x2ceae5['CBZBe'])return!![];else _0x2d71f0[_0x3701(0x1b)]('⏳\x20Waiting\x20'+_0x3a4c76+_0x3701(0x38)+_0x2c9a95+'/'+_0x2ceae5['pUSjC'](_0x3fc798[_0x3701(0x16)],0x1)+')');}if(_0x2eb8fc[_0x3701(0xa)][_0x3701(0xb)](_0x2ceae5['ODVei'])||_0x2eb8fc['message'][_0x3701(0xb)](_0x2ceae5[_0x3701(0x49)])||_0x2eb8fc[_0x3701(0xa)][_0x3701(0xb)]('HTML\x20page\x20instead\x20of\x20JSON'))return!![];return![];},'onRetry':(_0xa56fdb,_0x2ddb97,_0x326dd4)=>{console[_0x3701(0x4a)](_0x3701(0x4b)+_0x2ddb97+_0x3701(0x4c)+_0x326dd4+'ms:\x20'+_0xa56fdb[_0x3701(0xa)]);}};function _0x3701(_0x5b5714,_0x370153){_0x5b5714=_0x5b5714-0x0;const _0x4b9908=_0x5b57();let _0x42108f=_0x4b9908[_0x5b5714];return _0x42108f;}export const NETWORK_RETRY_OPTIONS={'maxRetries':0x2,'baseDelay':0x7d0,'maxDelay':0x1f40,'exponentialBackoff':!![],'shouldRetry':(_0x12d5ea,_0x5af534)=>{const _0x3c0f9b={'hhAAf':_0x3701(0x3f),'QrVyV':_0x3701(0x2),'HCSyF':_0x3701(0x4d),'gDezM':function(_0x33e250,_0x1d4680){return _0x33e250===_0x1d4680;},'gYDVE':'AbortError'};return _0x12d5ea[_0x3701(0xa)][_0x3701(0xb)](_0x3c0f9b['hhAAf'])||_0x12d5ea[_0x3701(0xa)][_0x3701(0xb)](_0x3c0f9b[_0x3701(0x4e)])||_0x12d5ea[_0x3701(0xa)][_0x3701(0xb)](_0x3c0f9b['HCSyF'])||_0x3c0f9b['gDezM'](_0x12d5ea[_0x3701(0x28)],_0x3c0f9b[_0x3701(0x4f)]);}};export async function fetchWithRetry(_0x34d700,_0x5a6cf9={},_0x1245c0=API_RETRY_OPTIONS){const _0x2df7b2={'ATaFP':function(_0x7c72aa,_0x80be65){return _0x7c72aa+_0x80be65;},'NNaeZ':function(_0x2eccb1,_0x287116,_0x16f3df){return _0x2eccb1(_0x287116,_0x16f3df);},'lqTlU':function(_0x4e7142,_0x5f37b4){return _0x4e7142===_0x5f37b4;},'OdHQG':_0x3701(0x50),'TFqlg':_0x3701(0x51)},_0x5b2b4b=await _0x2df7b2[_0x3701(0x52)](withRetry,()=>fetch(_0x34d700,_0x5a6cf9),_0x1245c0);if(!_0x5b2b4b[_0x3701(0x53)]){if(_0x2df7b2[_0x3701(0x54)](_0x2df7b2[_0x3701(0x55)],_0x2df7b2[_0x3701(0x56)]))_0x7c6c40[_0x3701(0x1b)]('🔄\x20Retry\x20attempt\x20'+_0x390a61+'/'+_0x2df7b2[_0x3701(0x57)](_0x48f7da[_0x3701(0x16)],0x1));else throw _0x5b2b4b[_0x3701(0x2d)];}return _0x5b2b4b[_0x3701(0x58)];}export async function healthCheck(_0x33a708,_0x2687b8=0x1388){const _0xd5220f={'RWaJP':_0x3701(0x3f),'nLjZm':'ENOTFOUND','IjDlz':function(_0x3f06c8,_0x38e859){return _0x3f06c8===_0x38e859;},'Dsbwa':_0x3701(0x0),'yvfrl':function(_0x1ed7f1,_0x2c1945){return _0x1ed7f1!==_0x2c1945;},'SpTEe':'VmPtC','BrKDX':function(_0x14a7ae,_0x5d8418,_0x4b00cc){return _0x14a7ae(_0x5d8418,_0x4b00cc);},'cUAhm':'OnairosReactNative/HealthCheck','dWDyJ':function(_0x3fdf6c,_0x4a1133){return _0x3fdf6c(_0x4a1133);},'RPyHT':function(_0x47af7f,_0x258400){return _0x47af7f-_0x258400;}},_0x119531=Date[_0x3701(0x3b)]();try{if(_0xd5220f[_0x3701(0x59)](_0xd5220f['SpTEe'],_0xd5220f[_0x3701(0x5a)]))return _0xd4c4a5['message'][_0x3701(0xb)](_0xd5220f[_0x3701(0x5b)])||_0x23521e[_0x3701(0xa)][_0x3701(0xb)](_0xd5220f[_0x3701(0x5c)])||_0x5a3bda[_0x3701(0xa)]['includes'](_0x3701(0x4d))||_0xd5220f[_0x3701(0x5d)](_0x312f97[_0x3701(0x28)],_0xd5220f[_0x3701(0x5e)]);else{const _0x86d7ea=new AbortController(),_0x32787f=_0xd5220f[_0x3701(0x5f)](setTimeout,()=>_0x86d7ea[_0x3701(0x60)](),_0x2687b8),_0x11a29f=await _0xd5220f[_0x3701(0x5f)](fetch,_0x33a708,{'method':'GET','signal':_0x86d7ea[_0x3701(0x61)],'headers':{'User-Agent':_0xd5220f[_0x3701(0x62)]}});return _0xd5220f[_0x3701(0x63)](clearTimeout,_0x32787f),{'reachable':!![],'status':_0x11a29f[_0x3701(0x6)],'duration':_0xd5220f[_0x3701(0x64)](Date[_0x3701(0x3b)](),_0x119531)};}}catch(_0x5a6477){return{'reachable':![],'error':_0x5a6477[_0x3701(0xa)],'duration':_0xd5220f[_0x3701(0x64)](Date['now'](),_0x119531)};}}
|
|
1
|
+
function _0x1844(_0x21065c,_0x1844a5){_0x21065c=_0x21065c-0x0;const _0x156f84=_0x2106();let _0x8ad93d=_0x156f84[_0x21065c];return _0x8ad93d;}function _0x2106(){const _0x249ace=['AbortError','Network\x20request\x20failed','fetch','timeout','JSON\x20Parse\x20error','Unexpected\x20character','status','ZqgfO','name','wwaPS','message','includes','uLirR','DPzpb','joazS','NBvsw','log','⏳\x20Waiting\x20','eQIbv','maxRetries','pwApO','xKTuc','UYDco','kIAxl','now','sZLEc','tqKwZ','fdYcp','sUXVV','aTgCj','UFUMS','shouldRetry','TOvpQ','enableLogging','❌\x20All\x20retry\x20attempts\x20exhausted\x20or\x20error\x20not\x20retryable:\x20','baseDelay','exponentialBackoff','XFqJE','DGdsb','MsyWV','min','WzbYD','pow','EcVeG','maxDelay','sbdVw','uAXLq','HaiUv','dgAeB','LRsQX','HyQun','phtaL','ENOTFOUND','xkXSF','random','floor','onRetry','xKgII','error','IdoVt','VEJTV','HTML\x20page\x20instead\x20of\x20JSON','xgRwu','CwLTM','HmQuh','aCnWL','XCUNH','AIBlx','SdvUJ','GyXOg','warn','⚠️\x20API\x20call\x20failed\x20(attempt\x20','),\x20retrying\x20in\x20','ms:\x20','Ahewd','DNS','aAbCj','eMpkj','data','OnairosReactNative/HealthCheck','lHCIh','RdEWL','abort','signal','DrfHf','LdRRc','NUUEB','wZTQs','kYsWF','srFMB','QLagj'];_0x2106=function(){return _0x249ace;};return _0x2106();}export const DEFAULT_RETRY_OPTIONS={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1388,'exponentialBackoff':!![],'enableLogging':![],'shouldRetry':(_0x21e013,_0x116a4b)=>{const _0x5eaf25={'eQIbv':function(_0x5d0110,_0x19e4fc){return _0x5d0110+_0x19e4fc;},'ZqgfO':function(_0x2fa666,_0x55bc3d){return _0x2fa666<_0x55bc3d;},'XzNwa':function(_0x2ec225,_0x58729a){return _0x2ec225!==_0x58729a;},'wwaPS':_0x1844(0x0),'vWOux':_0x1844(0x1),'nXIge':_0x1844(0x2),'rXucA':'ENOTFOUND','uLirR':_0x1844(0x3),'SDfiS':_0x1844(0x4),'DPzpb':_0x1844(0x5),'joazS':function(_0x43d501,_0x387239){return _0x43d501!==_0x387239;},'NAvrj':'cZSqh'};if(_0x21e013[_0x1844(0x6)]>=0x190&&_0x5eaf25[_0x1844(0x7)](_0x21e013[_0x1844(0x6)],0x1f4)&&_0x5eaf25['XzNwa'](_0x21e013[_0x1844(0x6)],0x198)&&_0x5eaf25['XzNwa'](_0x21e013[_0x1844(0x6)],0x1ad))return![];if(_0x21e013[_0x1844(0x8)]===_0x5eaf25[_0x1844(0x9)]||_0x21e013[_0x1844(0xa)][_0x1844(0xb)](_0x5eaf25['vWOux'])||_0x21e013[_0x1844(0xa)][_0x1844(0xb)](_0x5eaf25['nXIge'])||_0x21e013[_0x1844(0xa)][_0x1844(0xb)](_0x5eaf25['rXucA'])||_0x21e013[_0x1844(0xa)]['includes'](_0x5eaf25[_0x1844(0xc)])||_0x21e013[_0x1844(0x6)]>=0x1f4)return!![];if(_0x21e013[_0x1844(0xa)][_0x1844(0xb)](_0x5eaf25['SDfiS'])||_0x21e013[_0x1844(0xa)][_0x1844(0xb)](_0x5eaf25[_0x1844(0xd)])){if(_0x5eaf25[_0x1844(0xe)](_0x5eaf25['NAvrj'],_0x1844(0xf)))return!![];else _0x4e7435[_0x1844(0x10)](_0x1844(0x11)+_0x5cf948+'ms\x20before\x20retry\x20(attempt\x20'+_0x4fa3e5+'/'+_0x5eaf25[_0x1844(0x12)](_0x53b5da[_0x1844(0x13)],0x1)+')');}return![];}};export async function withRetry(_0x4e26d4,_0x3937fe={}){const _0x2d2be0={'MazLb':function(_0x4ffbcc,_0x52dcdd){return _0x4ffbcc<=_0x52dcdd;},'sbdVw':function(_0x1dd87f,_0x4af9a5){return _0x1dd87f>=_0x4af9a5;},'uAXLq':function(_0x4535a7,_0x98c1f6){return _0x4535a7<_0x98c1f6;},'HaiUv':function(_0x2d96a6,_0x44fcf1){return _0x2d96a6!==_0x44fcf1;},'dgAeB':function(_0x3851cc,_0x5973ff){return _0x3851cc===_0x5973ff;},'LRsQX':_0x1844(0x0),'HyQun':'Network\x20request\x20failed','phtaL':_0x1844(0x2),'CXnBB':_0x1844(0x3),'xkXSF':_0x1844(0x5),'sZLEc':function(_0x396853,_0xfd554f){return _0x396853<=_0xfd554f;},'tqKwZ':_0x1844(0x14),'ONtJW':function(_0x1cbe70,_0x5e01e4){return _0x1cbe70>_0x5e01e4;},'fdYcp':function(_0x35e8f4,_0x52cac6){return _0x35e8f4+_0x52cac6;},'Klmwr':function(_0x12808){return _0x12808();},'sUXVV':function(_0x14b909,_0x593fbc){return _0x14b909-_0x593fbc;},'aTgCj':function(_0xe6ad79,_0x43337b){return _0xe6ad79===_0x43337b;},'UFUMS':_0x1844(0x15),'TOvpQ':function(_0x149b9a,_0x1db532){return _0x149b9a>_0x1db532;},'XFqJE':function(_0x3ff67e,_0x3cffb7){return _0x3ff67e!==_0x3cffb7;},'DGdsb':_0x1844(0x16),'MsyWV':'IlABD','WzbYD':function(_0x31d267,_0x49edae){return _0x31d267*_0x49edae;},'EcVeG':function(_0x2af421,_0x1196d8){return _0x2af421-_0x1196d8;},'xKgII':_0x1844(0x17),'oeicU':function(_0x2c08ed,_0x42beb2){return _0x2c08ed+_0x42beb2;},'IdoVt':function(_0x2f8bfe,_0xe54a1f){return _0x2f8bfe-_0xe54a1f;}},_0x1540e2={...DEFAULT_RETRY_OPTIONS,..._0x3937fe},_0x2e3ae0=Date[_0x1844(0x18)]();let _0x426849=null;for(let _0x2dce36=0x1;_0x2d2be0[_0x1844(0x19)](_0x2dce36,_0x1540e2[_0x1844(0x13)]+0x1);_0x2dce36++){try{if(_0x2d2be0['dgAeB'](_0x2d2be0[_0x1844(0x1a)],_0x2d2be0[_0x1844(0x1a)])){_0x1540e2['enableLogging']&&_0x2d2be0['ONtJW'](_0x2dce36,0x1)&&console[_0x1844(0x10)]('🔄\x20Retry\x20attempt\x20'+_0x2dce36+'/'+_0x2d2be0[_0x1844(0x1b)](_0x1540e2[_0x1844(0x13)],0x1));const _0x300584=await _0x2d2be0['Klmwr'](_0x4e26d4);return{'success':!![],'data':_0x300584,'attempts':_0x2dce36,'totalDuration':_0x2d2be0[_0x1844(0x1c)](Date['now'](),_0x2e3ae0)};}else return _0x2d2be0['MazLb'](_0x290ce4,0x2);}catch(_0x41cd47){if(_0x2d2be0[_0x1844(0x1d)](_0x2d2be0[_0x1844(0x1e)],_0x2d2be0[_0x1844(0x1e)])){_0x426849=_0x41cd47;const _0x6de8f5=_0x1540e2[_0x1844(0x1f)]?_0x1540e2[_0x1844(0x1f)](_0x41cd47,_0x2dce36):!![];if(_0x2d2be0[_0x1844(0x20)](_0x2dce36,_0x1540e2[_0x1844(0x13)])||!_0x6de8f5){_0x1540e2[_0x1844(0x21)]&&console['error'](_0x1844(0x22)+_0x41cd47['message']);break;}let _0x58d6d6=_0x1540e2[_0x1844(0x23)];if(_0x1540e2[_0x1844(0x24)]){if(_0x2d2be0[_0x1844(0x25)](_0x2d2be0[_0x1844(0x26)],_0x2d2be0[_0x1844(0x27)]))_0x58d6d6=Math[_0x1844(0x28)](_0x2d2be0[_0x1844(0x29)](_0x1540e2[_0x1844(0x23)],Math[_0x1844(0x2a)](0x2,_0x2d2be0[_0x1844(0x2b)](_0x2dce36,0x1))),_0x1540e2[_0x1844(0x2c)]);else{if(_0x2d2be0[_0x1844(0x2d)](_0x4a1d00[_0x1844(0x6)],0x190)&&_0x2d2be0[_0x1844(0x2e)](_0x5d3b53[_0x1844(0x6)],0x1f4)&&_0x2d2be0[_0x1844(0x2f)](_0x28812e['status'],0x198)&&_0x2d2be0[_0x1844(0x2f)](_0x213779[_0x1844(0x6)],0x1ad))return![];if(_0x2d2be0[_0x1844(0x30)](_0x3787f7['name'],_0x2d2be0[_0x1844(0x31)])||_0x385ea4[_0x1844(0xa)][_0x1844(0xb)](_0x2d2be0[_0x1844(0x32)])||_0x35fffa[_0x1844(0xa)][_0x1844(0xb)](_0x2d2be0[_0x1844(0x33)])||_0x4567a5['message'][_0x1844(0xb)](_0x1844(0x34))||_0x266d14[_0x1844(0xa)][_0x1844(0xb)](_0x2d2be0['CXnBB'])||_0x13a26d['status']>=0x1f4)return!![];if(_0x21924f['message']['includes']('JSON\x20Parse\x20error')||_0x1d4500[_0x1844(0xa)][_0x1844(0xb)](_0x2d2be0[_0x1844(0x35)]))return!![];return![];}}const _0x467cc4=_0x2d2be0[_0x1844(0x29)](Math[_0x1844(0x36)](),0.1)*_0x58d6d6;_0x58d6d6=Math[_0x1844(0x37)](_0x58d6d6+_0x467cc4),_0x1540e2['onRetry']&&_0x1540e2[_0x1844(0x38)](_0x41cd47,_0x2dce36,_0x58d6d6),_0x1540e2[_0x1844(0x21)]&&(_0x2d2be0[_0x1844(0x30)](_0x2d2be0[_0x1844(0x39)],_0x2d2be0['xKgII'])?console[_0x1844(0x10)](_0x1844(0x11)+_0x58d6d6+'ms\x20before\x20retry\x20(attempt\x20'+_0x2dce36+'/'+_0x2d2be0['oeicU'](_0x1540e2[_0x1844(0x13)],0x1)+')'):_0x5288ab[_0x1844(0x3a)]('❌\x20All\x20retry\x20attempts\x20exhausted\x20or\x20error\x20not\x20retryable:\x20'+_0x13e450[_0x1844(0xa)])),await new Promise(_0x11a60d=>setTimeout(()=>_0x11a60d(),_0x58d6d6));}else return!![];}}return{'success':![],'error':_0x426849||new Error('Unknown\x20error'),'attempts':_0x2d2be0['fdYcp'](_0x1540e2['maxRetries'],0x1),'totalDuration':_0x2d2be0[_0x1844(0x3b)](Date[_0x1844(0x18)](),_0x2e3ae0)};}export const API_RETRY_OPTIONS={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1388,'exponentialBackoff':!![],'shouldRetry':(_0x30ea96,_0x25c305)=>{const _0xfb2264={'hzqBY':function(_0x25ea6e,_0x1a0bc8){return _0x25ea6e+_0x1a0bc8;},'USLSR':function(_0x376bcd,_0x119f07){return _0x376bcd===_0x119f07;},'xgRwu':function(_0x28102c,_0x11d61e){return _0x28102c===_0x11d61e;},'CwLTM':function(_0x353236,_0x3791e1){return _0x353236<=_0x3791e1;},'HmQuh':function(_0x5e3ea5,_0x1f99e6){return _0x5e3ea5>=_0x1f99e6;},'aCnWL':function(_0x1a7f93,_0x571705){return _0x1a7f93===_0x571705;},'rhOZR':_0x1844(0x0),'XCUNH':_0x1844(0x2),'AIBlx':_0x1844(0x3c),'SdvUJ':_0x1844(0x5),'GyXOg':_0x1844(0x3d)};if(_0xfb2264['USLSR'](_0x30ea96[_0x1844(0x6)],0x191)||_0x30ea96[_0x1844(0x6)]===0x193)return![];if(_0x30ea96[_0x1844(0x6)]===0x190||_0xfb2264[_0x1844(0x3e)](_0x30ea96[_0x1844(0x6)],0x194)&&!_0x30ea96[_0x1844(0xa)][_0x1844(0xb)]('validation\x20endpoint'))return![];if(_0x30ea96[_0x1844(0x6)]===0x1ad)return _0xfb2264[_0x1844(0x3f)](_0x25c305,0x2);if(_0xfb2264[_0x1844(0x40)](_0x30ea96[_0x1844(0x6)],0x1f4))return!![];if(_0xfb2264[_0x1844(0x41)](_0x30ea96[_0x1844(0x8)],_0xfb2264['rhOZR'])||_0x30ea96['message'][_0x1844(0xb)](_0x1844(0x3))||_0x30ea96['message'][_0x1844(0xb)]('Network\x20request\x20failed')||_0x30ea96[_0x1844(0xa)][_0x1844(0xb)](_0xfb2264[_0x1844(0x42)])||_0x30ea96[_0x1844(0xa)][_0x1844(0xb)](_0x1844(0x34))){if(_0xfb2264[_0x1844(0x43)]!==_0x1844(0x3c))_0xea999d[_0x1844(0x10)]('🔄\x20Retry\x20attempt\x20'+_0x30da3b+'/'+_0xfb2264['hzqBY'](_0x5e1955[_0x1844(0x13)],0x1));else return!![];}if(_0x30ea96[_0x1844(0xa)]['includes'](_0x1844(0x4))||_0x30ea96['message']['includes'](_0xfb2264[_0x1844(0x44)])||_0x30ea96[_0x1844(0xa)][_0x1844(0xb)](_0xfb2264[_0x1844(0x45)]))return!![];return![];},'onRetry':(_0x4d9df4,_0x18163e,_0x41d7b8)=>{console[_0x1844(0x46)](_0x1844(0x47)+_0x18163e+_0x1844(0x48)+_0x41d7b8+_0x1844(0x49)+_0x4d9df4[_0x1844(0xa)]);}};export const NETWORK_RETRY_OPTIONS={'maxRetries':0x2,'baseDelay':0x7d0,'maxDelay':0x1f40,'exponentialBackoff':!![],'shouldRetry':(_0x4b3705,_0x5ce6ce)=>{const _0x3e9691={'Ahewd':_0x1844(0x1),'HdUjE':_0x1844(0x34),'aAbCj':function(_0x2224bb,_0x17a7dd){return _0x2224bb===_0x17a7dd;}};return _0x4b3705[_0x1844(0xa)]['includes'](_0x3e9691[_0x1844(0x4a)])||_0x4b3705[_0x1844(0xa)][_0x1844(0xb)](_0x3e9691['HdUjE'])||_0x4b3705[_0x1844(0xa)][_0x1844(0xb)](_0x1844(0x4b))||_0x3e9691[_0x1844(0x4c)](_0x4b3705[_0x1844(0x8)],_0x1844(0x0));}};export async function fetchWithRetry(_0x46c1c3,_0x3134bd={},_0x51108f=API_RETRY_OPTIONS){const _0x457b3e={'eMpkj':function(_0x43d7c7,_0x33113a,_0x192088){return _0x43d7c7(_0x33113a,_0x192088);}},_0x1ace78=await _0x457b3e[_0x1844(0x4d)](withRetry,()=>fetch(_0x46c1c3,_0x3134bd),_0x51108f);if(!_0x1ace78['success'])throw _0x1ace78[_0x1844(0x3a)];return _0x1ace78[_0x1844(0x4e)];}export async function healthCheck(_0x1d47a7,_0x337a35=0x1388){const _0x1db7d2={'RdEWL':function(_0x3423ff,_0x1c85c2,_0x5ca832){return _0x3423ff(_0x1c85c2,_0x5ca832);},'DrfHf':_0x1844(0x4f),'LdRRc':function(_0x2dfa1c,_0x2f0b32){return _0x2dfa1c(_0x2f0b32);},'NUUEB':function(_0x3d077b,_0x25bf5b){return _0x3d077b-_0x25bf5b;},'wZTQs':function(_0x3ecaa6,_0x2b6357){return _0x3ecaa6!==_0x2b6357;},'srFMB':_0x1844(0x50),'QLagj':function(_0x1fa040,_0xaf9740){return _0x1fa040-_0xaf9740;}},_0x110199=Date[_0x1844(0x18)]();try{const _0x4be014=new AbortController(),_0x3a418f=_0x1db7d2[_0x1844(0x51)](setTimeout,()=>_0x4be014[_0x1844(0x52)](),_0x337a35),_0x593f1e=await _0x1db7d2[_0x1844(0x51)](fetch,_0x1d47a7,{'method':'GET','signal':_0x4be014[_0x1844(0x53)],'headers':{'User-Agent':_0x1db7d2[_0x1844(0x54)]}});return _0x1db7d2[_0x1844(0x55)](clearTimeout,_0x3a418f),{'reachable':!![],'status':_0x593f1e['status'],'duration':_0x1db7d2[_0x1844(0x56)](Date[_0x1844(0x18)](),_0x110199)};}catch(_0x505a4c){if(_0x1db7d2[_0x1844(0x57)](_0x1844(0x58),_0x1db7d2[_0x1844(0x59)]))return{'reachable':![],'error':_0x505a4c[_0x1844(0xa)],'duration':_0x1db7d2[_0x1844(0x5a)](Date['now'](),_0x110199)};else _0x12a294[_0x1844(0x38)](_0x3c75c5,_0x225dd4,_0x275d13);}}
|
|
@@ -4,4 +4,4 @@ var __ONAIROS_REQ_REGISTRY__ = [
|
|
|
4
4
|
require('react-native-keychain')
|
|
5
5
|
];
|
|
6
6
|
function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
|
|
7
|
-
import{Platform}from'react-native';import{STORAGE_KEYS}from'../constants';import AsyncStorage from'@react-native-async-storage/async-storage';const JWT_TOKEN_KEY=_0x4cdf(0x0),mockStorage={};let Keychain=null;try{Keychain=__ONAIROS_REQ_FUNC__(0x0);}catch(_0x2aab97){console[_0x4cdf(0x1)]('react-native-keychain module not available, using mock storage'),Keychain={'ACCESS_CONTROL':{'BIOMETRY_ANY_OR_DEVICE_PASSCODE':_0x4cdf(0x2)},'ACCESSIBLE':{'WHEN_UNLOCKED':_0x4cdf(0x2)},'getGenericPassword':async()=>null,'setGenericPassword':async()=>!![],'resetGenericPassword':async()=>!![]};}const isKeychainAvailable=()=>{const _0x5e3514={'nXFmf':'Error\x20verifying\x20credentials:','kdYVm':function(_0x5639c2,_0x3519f0){return _0x5639c2===_0x3519f0;},'XVtYB':_0x4cdf(0x3),'xXxWh':_0x4cdf(0x4)};try{return Keychain&&_0x5e3514[_0x4cdf(0x5)](typeof Keychain[_0x4cdf(0x6)],_0x5e3514[_0x4cdf(0x7)]);}catch(_0x5804ff){return _0x5e3514[_0x4cdf(0x5)](_0x5e3514[_0x4cdf(0x8)],'cRgZh')?![]:(_0x21dde5['error'](_0x5e3514['nXFmf'],_0x1e7f14),![]);}},safeGetGenericPassword=async _0x2da864=>{const _0x48c309={'LXHTp':function(_0xc21a97,_0x3225ea){return _0xc21a97===_0x3225ea;},'miIcs':_0x4cdf(0x9),'vzLGo':function(_0x494ff4,_0x22f06a){return _0x494ff4===_0x22f06a;},'bCVBP':_0x4cdf(0xa),'yNJbN':_0x4cdf(0xb),'YVEPE':function(_0x2826ef,_0x5d611b){return _0x2826ef===_0x5d611b;},'vAmSp':function(_0x3e90a9,_0x9012d8){return _0x3e90a9===_0x9012d8;}};try{if(_0x48c309[_0x4cdf(0xc)](_0x48c309[_0x4cdf(0xd)],_0x48c309[_0x4cdf(0xd)])){if(isKeychainAvailable())return await Keychain[_0x4cdf(0x6)](_0x2da864);else{const _0x448e5f=(_0x48c309[_0x4cdf(0xc)](_0x2da864,null)||_0x48c309[_0x4cdf(0xe)](_0x2da864,void 0x0)?void 0x0:_0x2da864[_0x4cdf(0xf)])||_0x48c309[_0x4cdf(0x10)];return mockStorage[_0x448e5f]||null;}}else return!![];}catch(_0x5a2d1c){console['warn'](_0x48c309[_0x4cdf(0x11)],_0x5a2d1c);const _0x337bf9=(_0x48c309[_0x4cdf(0x12)](_0x2da864,null)||_0x48c309[_0x4cdf(0x13)](_0x2da864,void 0x0)?void 0x0:_0x2da864[_0x4cdf(0xf)])||_0x48c309[_0x4cdf(0x10)];return mockStorage[_0x337bf9]||null;}},safeSetGenericPassword=async(_0x5916b9,_0x1c0712,_0x9e45c9)=>{const _0x1cf73b={'UsQgs':_0x4cdf(0xb),'QpCOK':function(_0x3d66c5,_0x4f2f09){return _0x3d66c5===_0x4f2f09;},'DHhQq':function(_0x94d97b,_0x132357){return _0x94d97b===_0x132357;},'AJAjp':_0x4cdf(0x14),'MOMqC':_0x4cdf(0x15),'QlVVd':function(_0x2f38a5,_0x2884bd){return _0x2f38a5!==_0x2884bd;},'ZAvzW':_0x4cdf(0x16),'LHdOK':function(_0x2ceff7){return _0x2ceff7();},'JOjdx':_0x4cdf(0x17),'BenzJ':_0x4cdf(0xa),'ObBEQ':_0x4cdf(0x18)};try{if(_0x1cf73b[_0x4cdf(0x19)](_0x1cf73b[_0x4cdf(0x1a)],_0x4cdf(0x16))){_0x466873['warn'](_0x1cf73b[_0x4cdf(0x1b)],_0x352049);const _0x465030=(_0x1cf73b['QpCOK'](_0x300619,null)||_0x1cf73b[_0x4cdf(0x1c)](_0x35389b,void 0x0)?void 0x0:_0x389385[_0x4cdf(0xf)])||'default';return delete _0x59f0c3[_0x465030],!![];}else{if(_0x1cf73b['LHdOK'](isKeychainAvailable))return _0x1cf73b[_0x4cdf(0x1c)]('RmFcd',_0x1cf73b['JOjdx'])?await Keychain[_0x4cdf(0x1d)](_0x5916b9,_0x1c0712,_0x9e45c9):(_0x1a6b72[_0x4cdf(0x1e)](_0x1cf73b[_0x4cdf(0x1f)],_0x14cb3d),![]);else{const _0x3de5c3=(_0x1cf73b[_0x4cdf(0x1c)](_0x9e45c9,null)||_0x1cf73b[_0x4cdf(0x1c)](_0x9e45c9,void 0x0)?void 0x0:_0x9e45c9[_0x4cdf(0xf)])||_0x1cf73b[_0x4cdf(0x20)];return mockStorage[_0x3de5c3]={'username':_0x5916b9,'password':_0x1c0712},!![];}}}catch(_0x3abd5e){if(_0x1cf73b[_0x4cdf(0x1c)](_0x1cf73b[_0x4cdf(0x21)],_0x4cdf(0x18))){console[_0x4cdf(0x1)](_0x4cdf(0xb),_0x3abd5e);const _0xfb03ce=(_0x9e45c9===null||_0x9e45c9===void 0x0?void 0x0:_0x9e45c9[_0x4cdf(0xf)])||_0x1cf73b[_0x4cdf(0x20)];return mockStorage[_0xfb03ce]={'username':_0x5916b9,'password':_0x1c0712},!![];}else return _0x39dddb[_0x4cdf(0x1e)](_0x1cf73b[_0x4cdf(0x22)],_0x1df6b9),![];}},safeResetGenericPassword=async _0x4e7112=>{const _0x26d2a9={'SIuMP':_0x4cdf(0x2),'jbvgd':function(_0x5a8f8d){return _0x5a8f8d();},'FRzba':function(_0x32f4cd,_0x4ac926){return _0x32f4cd!==_0x4ac926;},'rMDGs':_0x4cdf(0x23),'YzxRb':_0x4cdf(0x24),'OYtep':function(_0x1b4e31,_0x3ef28a){return _0x1b4e31===_0x3ef28a;},'hauaG':_0x4cdf(0xa),'WvBFe':_0x4cdf(0xb)};try{if(_0x26d2a9[_0x4cdf(0x25)](isKeychainAvailable)){if(_0x26d2a9['FRzba'](_0x4cdf(0x26),_0x26d2a9[_0x4cdf(0x27)]))return await Keychain[_0x4cdf(0x28)](_0x4e7112);else _0x2ba33e[_0x4cdf(0x29)]=Keychain[_0x4cdf(0x2a)][_0x4cdf(0x2b)],_0x471294[_0x4cdf(0x2c)]=Keychain['ACCESSIBLE'][_0x4cdf(0x2d)];}else{if('aGgBh'===_0x26d2a9[_0x4cdf(0x2e)])_0x54f046[_0x4cdf(0x1)]('react-native-keychain module not available, using mock storage'),Keychain={'ACCESS_CONTROL':{'BIOMETRY_ANY_OR_DEVICE_PASSCODE':_0x26d2a9[_0x4cdf(0x2f)]},'ACCESSIBLE':{'WHEN_UNLOCKED':_0x26d2a9[_0x4cdf(0x2f)]},'getGenericPassword':async()=>null,'setGenericPassword':async()=>!![],'resetGenericPassword':async()=>!![]};else{const _0xb7f82d=(_0x26d2a9[_0x4cdf(0x30)](_0x4e7112,null)||_0x4e7112===void 0x0?void 0x0:_0x4e7112['service'])||_0x26d2a9[_0x4cdf(0x31)];return delete mockStorage[_0xb7f82d],!![];}}}catch(_0xed6715){console[_0x4cdf(0x1)](_0x26d2a9['WvBFe'],_0xed6715);const _0x4dbeb5=(_0x4e7112===null||_0x4e7112===void 0x0?void 0x0:_0x4e7112['service'])||_0x26d2a9[_0x4cdf(0x31)];return delete mockStorage[_0x4dbeb5],!![];}};export const storeCredentials=async _0x2e98fd=>{const _0x306b70={'mNCPw':function(_0x46db45,_0x3cbec1){return _0x46db45===_0x3cbec1;},'dpoAK':_0x4cdf(0x3),'HZchf':function(_0x1f0cdf,_0x465064){return _0x1f0cdf!==_0x465064;},'HVAtX':_0x4cdf(0x32),'iqQEs':function(_0x189a20){return _0x189a20();},'vwVwr':_0x4cdf(0x33),'cCxCM':function(_0x3f879c,_0x2a823e,_0x31c00f,_0xb879f){return _0x3f879c(_0x2a823e,_0x31c00f,_0xb879f);},'EzVgH':_0x4cdf(0x14)};try{if(_0x306b70[_0x4cdf(0x34)](_0x4cdf(0x35),_0x306b70[_0x4cdf(0x36)])){const _0x56ed9e=await _0x306b70['iqQEs'](getCredentials),_0x46bae4={..._0x56ed9e,..._0x2e98fd,'createdAt':(_0x56ed9e===null||_0x306b70[_0x4cdf(0x37)](_0x56ed9e,void 0x0)?void 0x0:_0x56ed9e[_0x4cdf(0x38)])||Date[_0x4cdf(0x39)]()},_0x2ba739=_0x46bae4[_0x4cdf(0x3a)];if(!_0x2ba739)throw new Error(_0x4cdf(0x3b));const _0x54a813={'service':STORAGE_KEYS[_0x4cdf(0x3c)]};return _0x306b70['HZchf'](Platform['OS'],_0x306b70[_0x4cdf(0x3d)])&&_0x306b70[_0x4cdf(0x3e)](isKeychainAvailable)&&(_0x54a813[_0x4cdf(0x29)]=Keychain[_0x4cdf(0x2a)][_0x4cdf(0x2b)],_0x54a813[_0x4cdf(0x2c)]=Keychain[_0x4cdf(0x3f)]['WHEN_UNLOCKED']),await _0x306b70[_0x4cdf(0x40)](safeSetGenericPassword,_0x2ba739,JSON[_0x4cdf(0x41)](_0x46bae4),_0x54a813),!![];}else return Keychain&&_0x306b70['mNCPw'](typeof Keychain['getGenericPassword'],_0x306b70[_0x4cdf(0x42)]);}catch(_0x569b1d){return console[_0x4cdf(0x1e)](_0x306b70[_0x4cdf(0x43)],_0x569b1d),![];}};export const getCredentials=async()=>{const _0x3d68cc={'KGXdY':function(_0x1b3a9b,_0x35bb06){return _0x1b3a9b(_0x35bb06);}};try{const _0x5cdedb=await _0x3d68cc[_0x4cdf(0x44)](safeGetGenericPassword,{'service':STORAGE_KEYS[_0x4cdf(0x3c)]});if(_0x5cdedb)return JSON['parse'](_0x5cdedb[_0x4cdf(0x45)]);return null;}catch(_0x360b72){return console[_0x4cdf(0x1e)](_0x4cdf(0x46),_0x360b72),null;}};function _0x2e94(){const _0x3524bb=['onairos_jwt_token','warn','mock','function','cRgZh','kdYVm','getGenericPassword','XVtYB','xXxWh','NGsCH','default','Keychain\x20access\x20failed,\x20using\x20mock\x20storage','LXHTp','miIcs','vzLGo','service','bCVBP','yNJbN','YVEPE','vAmSp','Error\x20storing\x20credentials:','❌\x20Failed\x20to\x20clear\x20JWT\x20token:','BJUUf','RmFcd','IqTmL','QlVVd','ZAvzW','UsQgs','DHhQq','setGenericPassword','error','AJAjp','BenzJ','ObBEQ','MOMqC','BXgKL','yNTRL','jbvgd','YKrSL','rMDGs','resetGenericPassword','accessControl','ACCESS_CONTROL','BIOMETRY_ANY_OR_DEVICE_PASSCODE','accessible','WHEN_UNLOCKED','YzxRb','SIuMP','OYtep','hauaG','fkpfG','web','HZchf','kaOtM','HVAtX','mNCPw','createdAt','now','username','Username\x20is\x20required\x20for\x20storing\x20credentials','credentials','vwVwr','iqQEs','ACCESSIBLE','cCxCM','stringify','dpoAK','EzVgH','KGXdY','password','Error\x20getting\x20credentials:','faNAy','Error\x20checking\x20credentials:','zrBzn','ztVmK','cWeWI','uQwxE','ImQLj','toString','substring','dev_','Error\x20verifying\x20credentials:','VBdaT','ySgTF','irtOF','lcfDz','DyQxE','TYcWd','UvFys','TTGmP','vUuYS','HogNJ','WASgR','YeyoK','wNtvP','QGtgJ','qQfBI','PPOxx','getItem','seNPE','ckOhr','CtYXS','lfJak','❌\x20Failed\x20to\x20check\x20JWT\x20token:','🗑️\x20JWT\x20token\x20cleared','HdzkO','GMyew','nYHxg','indexOf','charAt','Fitww','SrnXF','WgWuR','jmfkJ','jPSvA','fromCharCode','DznFb','ZbmSy','sbmwB','HtuDF','removeItem','BNFLY','EGnIC','sGoJJ','ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/','voTIb','HKBAk','oYlmu','EQYop','dqsYx','WKoxa','vwbrW','TAhsA','iYTNK','hlaht','IogAO','ciYlj','YnblU','oYRvu','gyjpN','pArCJ','LRujv','iYWaN','FVqDw','ECOMo','TioqB','❌\x20Failed\x20to\x20decode\x20JWT\x20payload:','JIizE','parse','QTfSF','bFRZr','length','OVIqQ','LUBii','FWjZD','bDIEG','xaQjQ','JuTwP','dcVMb','lSCOT','❌\x20Failed\x20to\x20check\x20JWT\x20expiration:','dAdyl','bjZTi','exp','floor','MEHzt'];_0x2e94=function(){return _0x3524bb;};return _0x2e94();}export const hasCredentials=async()=>{const _0x94371f={'cWeWI':function(_0x2927b5,_0x38a7b){return _0x2927b5===_0x38a7b;},'zrBzn':function(_0x21ef6a,_0x5d693c){return _0x21ef6a!==_0x5d693c;},'ztVmK':_0x4cdf(0x47),'YhXGC':_0x4cdf(0x48)};try{if(_0x94371f[_0x4cdf(0x49)](_0x94371f['ztVmK'],_0x94371f[_0x4cdf(0x4a)]))try{return Keychain&&_0x94371f[_0x4cdf(0x4b)](typeof Keychain[_0x4cdf(0x6)],_0x4cdf(0x3));}catch(_0x106b75){return![];}else{const _0x2d5f6e=await safeGetGenericPassword({'service':STORAGE_KEYS[_0x4cdf(0x3c)]});return!!_0x2d5f6e;}}catch(_0x27527d){return console['error'](_0x94371f['YhXGC'],_0x27527d),![];}};export const deleteCredentials=async()=>{const _0x493d3d={'uQwxE':function(_0x1c0688,_0x26c47e){return _0x1c0688(_0x26c47e);},'ImQLj':'Error\x20deleting\x20credentials:'};try{return await _0x493d3d[_0x4cdf(0x4c)](safeResetGenericPassword,{'service':STORAGE_KEYS[_0x4cdf(0x3c)]}),!![];}catch(_0x3a087c){return console['error'](_0x493d3d[_0x4cdf(0x4d)],_0x3a087c),![];}};export const updateCredentials=async _0x1ffb11=>{const _0x27cf1e={'ALdCA':function(_0x429a0d,_0x541045){return _0x429a0d(_0x541045);}};return _0x27cf1e['ALdCA'](storeCredentials,_0x1ffb11);};export const generateDeviceUsername=()=>{const _0x38ffd7=Math['random']()[_0x4cdf(0x4e)](0x24)[_0x4cdf(0x4f)](0x2,0xa);return _0x4cdf(0x50)+_0x38ffd7;};export const verifyCredentials=async _0x23cbcb=>{const _0x8ecc62={'TTGmP':function(_0x36819c){return _0x36819c();},'vUuYS':_0x4cdf(0x51),'WASgR':function(_0xa66ec1,_0x2000fd){return _0xa66ec1(_0x2000fd);},'DyQxE':function(_0x5bcd2c,_0x36021e){return _0x5bcd2c===_0x36021e;},'TYcWd':_0x4cdf(0x52),'UvFys':function(_0x5bbc8a,_0x3fd042){return _0x5bbc8a!==_0x3fd042;},'BzJpu':_0x4cdf(0x53),'HogNJ':_0x4cdf(0x54),'RUaTh':_0x4cdf(0x55)};try{if(_0x8ecc62[_0x4cdf(0x56)](_0x8ecc62['TYcWd'],_0x8ecc62[_0x4cdf(0x57)])){if(!isKeychainAvailable()){if(_0x8ecc62[_0x4cdf(0x58)]('ibxZC',_0x8ecc62['BzJpu']))return!![];else throw new _0x43dc1c(_0x4cdf(0x3b));}return!![];}else try{if(!_0x8ecc62[_0x4cdf(0x59)](_0x2ab960))return!![];return!![];}catch(_0x58f287){return _0x185548[_0x4cdf(0x1e)](_0x8ecc62[_0x4cdf(0x5a)],_0x58f287),![];}}catch(_0x3ae257){if(_0x8ecc62[_0x4cdf(0x5b)]===_0x8ecc62['RUaTh'])Keychain=_0x8ecc62[_0x4cdf(0x5c)](_0x790015,0x0);else return console[_0x4cdf(0x1e)](_0x8ecc62[_0x4cdf(0x5a)],_0x3ae257),![];}};export const getJWT=async()=>{const _0x377d11={'PPOxx':'❌\x20Failed\x20to\x20check\x20JWT\x20expiration:','lfJak':function(_0xa16674,_0x15e7b0){return _0xa16674===_0x15e7b0;},'wNtvP':function(_0x58d7aa,_0x382033){return _0x58d7aa!==_0x382033;},'QGtgJ':'qQfBI','seNPE':function(_0x217978,_0x19730e){return _0x217978===_0x19730e;},'ckOhr':_0x4cdf(0x5d),'CtYXS':'❌\x20Failed\x20to\x20retrieve\x20JWT\x20token:'};try{if(_0x377d11[_0x4cdf(0x5e)](_0x377d11[_0x4cdf(0x5f)],_0x4cdf(0x60)))return _0x2fcacc[_0x4cdf(0x1e)](_0x377d11[_0x4cdf(0x61)],_0x3a14a2),!![];else{const _0x568494=await AsyncStorage[_0x4cdf(0x62)](JWT_TOKEN_KEY);return _0x568494;}}catch(_0x7dc3d3){if(_0x377d11[_0x4cdf(0x63)](_0x377d11['ckOhr'],_0x377d11[_0x4cdf(0x64)]))return console['error'](_0x377d11[_0x4cdf(0x65)],_0x7dc3d3),null;else{const _0x546452=(_0x377d11[_0x4cdf(0x66)](_0xda216a,null)||_0x377d11[_0x4cdf(0x66)](_0x3db48d,void 0x0)?void 0x0:_0x58d81e[_0x4cdf(0xf)])||'default';return _0x31b313[_0x546452]={'username':_0x201600,'password':_0x26be3f},!![];}}};function _0x4cdf(_0x2e94a3,_0x4cdf1a){_0x2e94a3=_0x2e94a3-0x0;const _0x306ed0=_0x2e94();let _0x59020d=_0x306ed0[_0x2e94a3];return _0x59020d;}export const hasJWT=async()=>{const _0x5c5978={'awwbx':_0x4cdf(0x67)};try{const _0xc69196=await AsyncStorage['getItem'](JWT_TOKEN_KEY);return!!_0xc69196;}catch(_0x11bbdc){return console[_0x4cdf(0x1e)](_0x5c5978['awwbx'],_0x11bbdc),![];}};export const clearJWT=async()=>{const _0x5553c9={'Fitww':function(_0x187def,_0x159c41){return _0x187def+_0x159c41;},'SrnXF':function(_0x2f4ebb,_0x2f061e){return _0x2f4ebb|_0x2f061e;},'WgWuR':function(_0x321799,_0x1ba5f4){return _0x321799<<_0x1ba5f4;},'jmfkJ':function(_0x517547,_0x548819){return _0x517547<<_0x548819;},'jPSvA':function(_0x4f2522,_0x4e9ec4){return _0x4f2522<<_0x4e9ec4;},'DznFb':function(_0x279e91,_0x54cd4d){return _0x279e91>>_0x54cd4d;},'ZbmSy':function(_0xd098f8,_0x5ec305){return _0xd098f8&_0x5ec305;},'sbmwB':function(_0x225234,_0x297d69){return _0x225234>>_0x297d69;},'pfHwe':function(_0x1b1fbd,_0x45aa70){return _0x1b1fbd!==_0x45aa70;},'HtuDF':function(_0x1bde74,_0x291c82){return _0x1bde74&_0x291c82;},'HdzkO':function(_0x33169d,_0x277cdc){return _0x33169d===_0x277cdc;},'GMyew':'xzZwa','nYHxg':'EkpoV','BNFLY':_0x4cdf(0x68)};try{if(_0x5553c9[_0x4cdf(0x69)](_0x5553c9[_0x4cdf(0x6a)],_0x5553c9[_0x4cdf(0x6b)])){const _0xf01f64=_0xa14115[_0x4cdf(0x6c)](_0x39a3ad[_0x4cdf(0x6d)](_0x91c9bd)),_0x4b3aca=_0x29de69[_0x4cdf(0x6c)](_0x2a62e8[_0x4cdf(0x6d)](_0x5553c9['Fitww'](_0x31edf3,0x1))),_0x2ff78b=_0x4e1d96[_0x4cdf(0x6c)](_0x12562d[_0x4cdf(0x6d)](_0x5553c9[_0x4cdf(0x6e)](_0xebf35d,0x2))),_0x36bd0a=_0x26c89c['indexOf'](_0x513241['charAt'](_0x5553c9[_0x4cdf(0x6e)](_0x54ec45,0x3))),_0x49da59=_0x5553c9[_0x4cdf(0x6f)](_0x5553c9[_0x4cdf(0x70)](_0xf01f64,0x12)|_0x5553c9[_0x4cdf(0x71)](_0x4b3aca,0xc),_0x5553c9[_0x4cdf(0x72)](_0x2ff78b,0x6))|_0x36bd0a;_0x38304f+=_0x570185[_0x4cdf(0x73)](_0x5553c9[_0x4cdf(0x74)](_0x49da59,0x10)&0xff);if(_0x2ff78b!==0x40)_0x29c9ce+=_0x1c9d38['fromCharCode'](_0x5553c9[_0x4cdf(0x75)](_0x5553c9[_0x4cdf(0x76)](_0x49da59,0x8),0xff));if(_0x5553c9['pfHwe'](_0x36bd0a,0x40))_0x238b14+=_0x2697b6['fromCharCode'](_0x5553c9[_0x4cdf(0x77)](_0x49da59,0xff));}else return await AsyncStorage[_0x4cdf(0x78)](JWT_TOKEN_KEY),console['log'](_0x5553c9[_0x4cdf(0x79)]),!![];}catch(_0x4e4c4a){return console[_0x4cdf(0x1e)](_0x4cdf(0x15),_0x4e4c4a),![];}};const base64Decode=_0x20f0a8=>{const _0x2df2db={'WKoxa':_0x4cdf(0xb),'EQYop':function(_0x302c6d,_0x467372){return _0x302c6d===_0x467372;},'vwbrW':function(_0x3807d5,_0x4f9331){return _0x3807d5===_0x4f9331;},'TAhsA':'default','FVqDw':function(_0x5be5fe,_0x2d6eae){return _0x5be5fe===_0x2d6eae;},'ECOMo':function(_0x14e296,_0x585695){return _0x14e296===_0x585695;},'oYlmu':function(_0x49efd7,_0x3e40d2){return _0x49efd7%_0x3e40d2;},'hfHRh':_0x4cdf(0x7a),'dqsYx':_0x4cdf(0x7b),'iYTNK':_0x4cdf(0x7c),'hlaht':function(_0x2ef646,_0x3175f8){return _0x2ef646<_0x3175f8;},'IogAO':function(_0x5ad717,_0xe8adbd){return _0x5ad717!==_0xe8adbd;},'EAekV':_0x4cdf(0x7d),'ciYlj':_0x4cdf(0x7e),'YnblU':function(_0x48c1aa,_0x2b5958){return _0x48c1aa+_0x2b5958;},'oYRvu':function(_0x34ff4e,_0x1f0c97){return _0x34ff4e|_0x1f0c97;},'gyjpN':function(_0x2ea820,_0x110f39){return _0x2ea820|_0x110f39;},'pArCJ':function(_0x400c47,_0x2c518f){return _0x400c47<<_0x2c518f;},'WoMFt':function(_0x1d96aa,_0x2b4dfd){return _0x1d96aa<<_0x2b4dfd;},'LRujv':function(_0x44613f,_0x44fb5b){return _0x44613f&_0x44fb5b;},'iYWaN':function(_0x33b9f1,_0x940803){return _0x33b9f1>>_0x940803;}};while(_0x2df2db[_0x4cdf(0x7f)](_0x20f0a8['length'],0x4)){if(_0x2df2db[_0x4cdf(0x80)](_0x2df2db['hfHRh'],_0x2df2db[_0x4cdf(0x81)])){_0x51eae1[_0x4cdf(0x1)](_0x2df2db[_0x4cdf(0x82)],_0x52e098);const _0x45985d=(_0x2df2db[_0x4cdf(0x80)](_0x548c10,null)||_0x2df2db[_0x4cdf(0x83)](_0x33e4f2,void 0x0)?void 0x0:_0xe95345[_0x4cdf(0xf)])||_0x2df2db[_0x4cdf(0x84)];return _0x5b8cf7[_0x45985d]={'username':_0x4f1120,'password':_0x1de2b0},!![];}else _0x20f0a8+='=';}const _0x363930=_0x2df2db[_0x4cdf(0x85)];let _0x18e5de='';for(let _0x1f902a=0x0;_0x2df2db[_0x4cdf(0x86)](_0x1f902a,_0x20f0a8['length']);_0x1f902a+=0x4){if(_0x2df2db[_0x4cdf(0x87)](_0x2df2db['EAekV'],_0x2df2db[_0x4cdf(0x88)])){const _0x4253f7=_0x363930[_0x4cdf(0x6c)](_0x20f0a8[_0x4cdf(0x6d)](_0x1f902a)),_0x528abe=_0x363930['indexOf'](_0x20f0a8[_0x4cdf(0x6d)](_0x1f902a+0x1)),_0x529c19=_0x363930[_0x4cdf(0x6c)](_0x20f0a8['charAt'](_0x2df2db[_0x4cdf(0x89)](_0x1f902a,0x2))),_0x4f489d=_0x363930['indexOf'](_0x20f0a8['charAt'](_0x2df2db[_0x4cdf(0x89)](_0x1f902a,0x3))),_0x2bc334=_0x2df2db[_0x4cdf(0x8a)](_0x2df2db[_0x4cdf(0x8b)](_0x2df2db[_0x4cdf(0x8c)](_0x4253f7,0x12),_0x2df2db[_0x4cdf(0x8c)](_0x528abe,0xc))|_0x2df2db['WoMFt'](_0x529c19,0x6),_0x4f489d);_0x18e5de+=String[_0x4cdf(0x73)](_0x2df2db[_0x4cdf(0x8d)](_0x2df2db[_0x4cdf(0x8e)](_0x2bc334,0x10),0xff));if(_0x2df2db[_0x4cdf(0x87)](_0x529c19,0x40))_0x18e5de+=String[_0x4cdf(0x73)](_0x2df2db[_0x4cdf(0x8d)](_0x2bc334>>0x8,0xff));if(_0x4f489d!==0x40)_0x18e5de+=String[_0x4cdf(0x73)](_0x2bc334&0xff);}else{const _0x333a33=(_0x2df2db[_0x4cdf(0x8f)](_0x93507,null)||_0x2df2db[_0x4cdf(0x90)](_0x302320,void 0x0)?void 0x0:_0x11137c['service'])||_0x2df2db[_0x4cdf(0x84)];return delete _0x500407[_0x333a33],!![];}}return _0x18e5de;};export const getJWTPayload=async()=>{const _0x513615={'bFRZr':function(_0x35edce,_0x53d49a){return _0x35edce%_0x53d49a;},'mmQcj':function(_0xc9add8,_0x1d88a3){return _0xc9add8+_0x1d88a3;},'pvdaN':function(_0x315d71,_0x2038b3){return _0x315d71+_0x2038b3;},'OVIqQ':function(_0x190e80,_0x3e898d){return _0x190e80+_0x3e898d;},'LUBii':function(_0x2bbd47,_0x50e955){return _0x2bbd47|_0x50e955;},'FWjZD':function(_0x53084b,_0x383aca){return _0x53084b|_0x383aca;},'bDIEG':function(_0x1e3362,_0x295052){return _0x1e3362<<_0x295052;},'xaQjQ':function(_0x273e12,_0x56144e){return _0x273e12<<_0x56144e;},'JuTwP':function(_0x505841,_0x755dbf){return _0x505841>>_0x755dbf;},'bDkjU':function(_0x28972d,_0x5bdfd3){return _0x28972d!==_0x5bdfd3;},'dcVMb':function(_0x8671c3,_0x3b34e9){return _0x8671c3&_0x3b34e9;},'QTfSF':function(_0xd60e79,_0x3c4d94){return _0xd60e79!==_0x3c4d94;},'JIizE':function(_0x5c747b,_0x17d1f8){return _0x5c747b(_0x17d1f8);},'RdBHd':_0x4cdf(0x91),'yiCYe':_0x4cdf(0x92)};try{const _0x484df1=await getJWT();if(!_0x484df1)return null;const _0x25dae0=_0x484df1['split']('.');if(_0x25dae0['length']!==0x3)return null;const _0x572bdf=_0x513615[_0x4cdf(0x93)](base64Decode,_0x25dae0[0x1]),_0x4cc1c8=JSON[_0x4cdf(0x94)](_0x572bdf);return _0x4cc1c8;}catch(_0x939a64){if(_0x513615[_0x4cdf(0x95)](_0x513615['RdBHd'],'TioqB')){while(_0x513615[_0x4cdf(0x96)](_0x4a0090['length'],0x4)){_0xab1e14+='=';}const _0x12a669='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';let _0x47bae5='';for(let _0x40cf1c=0x0;_0x40cf1c<_0x16e2f7[_0x4cdf(0x97)];_0x40cf1c+=0x4){const _0x51d95b=_0x12a669[_0x4cdf(0x6c)](_0x4a9c38[_0x4cdf(0x6d)](_0x40cf1c)),_0xb5f8d0=_0x12a669[_0x4cdf(0x6c)](_0x1b72f5[_0x4cdf(0x6d)](_0x513615['mmQcj'](_0x40cf1c,0x1))),_0x24e782=_0x12a669[_0x4cdf(0x6c)](_0x5d27ef[_0x4cdf(0x6d)](_0x513615['pvdaN'](_0x40cf1c,0x2))),_0x582e8c=_0x12a669[_0x4cdf(0x6c)](_0x30b9b3[_0x4cdf(0x6d)](_0x513615[_0x4cdf(0x98)](_0x40cf1c,0x3))),_0x120d17=_0x513615[_0x4cdf(0x99)](_0x513615[_0x4cdf(0x9a)](_0x513615[_0x4cdf(0x9b)](_0x51d95b,0x12)|_0x513615[_0x4cdf(0x9b)](_0xb5f8d0,0xc),_0x513615[_0x4cdf(0x9c)](_0x24e782,0x6)),_0x582e8c);_0x47bae5+=_0x51c64e['fromCharCode'](_0x513615[_0x4cdf(0x9d)](_0x120d17,0x10)&0xff);if(_0x513615['bDkjU'](_0x24e782,0x40))_0x47bae5+=_0x5a3f3b[_0x4cdf(0x73)](_0x513615[_0x4cdf(0x9e)](_0x120d17>>0x8,0xff));if(_0x513615[_0x4cdf(0x95)](_0x582e8c,0x40))_0x47bae5+=_0x5afbe6[_0x4cdf(0x73)](_0x120d17&0xff);}return _0x47bae5;}else return console['error'](_0x513615['yiCYe'],_0x939a64),null;}};export const isJWTExpired=async()=>{const _0x564011={'JBXxw':_0x4cdf(0x67),'dAdyl':function(_0x508140,_0xb1e2bc){return _0x508140===_0xb1e2bc;},'rsMND':_0x4cdf(0x9f),'bjZTi':function(_0x1e82cb){return _0x1e82cb();},'zykBF':function(_0x1e6998,_0x404127){return _0x1e6998<_0x404127;},'MEHzt':_0x4cdf(0xa0)};try{if(_0x564011[_0x4cdf(0xa1)]('WbTSP',_0x564011['rsMND']))return _0x3e4973[_0x4cdf(0x1e)](_0x564011['JBXxw'],_0x353010),![];else{const _0x2ba038=await _0x564011[_0x4cdf(0xa2)](getJWTPayload);if(!_0x2ba038||!_0x2ba038[_0x4cdf(0xa3)])return!![];const _0x87b986=Math[_0x4cdf(0xa4)](Date[_0x4cdf(0x39)]()/0x3e8);return _0x564011['zykBF'](_0x2ba038[_0x4cdf(0xa3)],_0x87b986);}}catch(_0x11aacc){return console['error'](_0x564011[_0x4cdf(0xa5)],_0x11aacc),!![];}};
|
|
7
|
+
import{Platform}from'react-native';import{STORAGE_KEYS}from'../constants';import AsyncStorage from'@react-native-async-storage/async-storage';const JWT_TOKEN_KEY=_0x5024(0x0),mockStorage={};let Keychain=null;try{Keychain=__ONAIROS_REQ_FUNC__(0x0);}catch(_0x2b92f3){console[_0x5024(0x1)]('react-native-keychain module not available, using mock storage'),Keychain={'ACCESS_CONTROL':{'BIOMETRY_ANY_OR_DEVICE_PASSCODE':_0x5024(0x2)},'ACCESSIBLE':{'WHEN_UNLOCKED':_0x5024(0x2)},'getGenericPassword':async()=>null,'setGenericPassword':async()=>!![],'resetGenericPassword':async()=>!![]};}const isKeychainAvailable=()=>{const _0x4fc4e8={'knKJk':_0x5024(0x3),'wanZm':function(_0x47cdc4,_0x33ee32){return _0x47cdc4===_0x33ee32;},'hWakL':_0x5024(0x4),'jxNAE':function(_0x1ed38f,_0x428152){return _0x1ed38f===_0x428152;},'cCDQA':_0x5024(0x5),'cmJwb':'bRHKV'};try{return _0x4fc4e8['wanZm'](_0x5024(0x4),_0x4fc4e8[_0x5024(0x6)])?Keychain&&_0x4fc4e8[_0x5024(0x7)](typeof Keychain[_0x5024(0x8)],_0x4fc4e8[_0x5024(0x9)]):(_0x529e5b[_0x5024(0xa)](_0x4fc4e8[_0x5024(0xb)],_0x38c460),![]);}catch(_0x4bdcba){if(_0x4fc4e8[_0x5024(0xc)]===_0x4fc4e8[_0x5024(0xc)])return![];else{const _0x17dffb=_0x55198f[_0x5024(0xd)]()['toString'](0x24)[_0x5024(0xe)](0x2,0xa);return _0x5024(0xf)+_0x17dffb;}}},safeGetGenericPassword=async _0x163827=>{const _0x119a3c={'dHtqV':function(_0x56d82f){return _0x56d82f();},'kemqM':function(_0x3fb99a,_0xd17714){return _0x3fb99a===_0xd17714;},'NMQGZ':_0x5024(0x10)};try{if(_0x119a3c['dHtqV'](isKeychainAvailable))return await Keychain['getGenericPassword'](_0x163827);else{const _0x28c77e=(_0x163827===null||_0x163827===void 0x0?void 0x0:_0x163827[_0x5024(0x11)])||'default';return mockStorage[_0x28c77e]||null;}}catch(_0x1fb211){console[_0x5024(0x1)](_0x5024(0x12),_0x1fb211);const _0x93ee1c=(_0x119a3c[_0x5024(0x13)](_0x163827,null)||_0x163827===void 0x0?void 0x0:_0x163827[_0x5024(0x11)])||_0x119a3c[_0x5024(0x14)];return mockStorage[_0x93ee1c]||null;}},safeSetGenericPassword=async(_0x5c9e62,_0x1f157e,_0x3520d9)=>{const _0x20cb13={'nJcgb':_0x5024(0x15),'qLoKB':_0x5024(0x16),'KHxYk':function(_0x3f1568,_0x3d426a){return _0x3f1568===_0x3d426a;},'OjtPd':_0x5024(0x10),'qSRQe':_0x5024(0x12),'ZIcfz':function(_0x2034bd,_0xe50730){return _0x2034bd===_0xe50730;}};try{if(isKeychainAvailable())return _0x20cb13['qLoKB']!==_0x20cb13[_0x5024(0x17)]?(_0x3e3d2a[_0x5024(0xa)](_0x20cb13['nJcgb'],_0x6adc4),![]):await Keychain[_0x5024(0x18)](_0x5c9e62,_0x1f157e,_0x3520d9);else{const _0x2df848=(_0x3520d9===null||_0x20cb13['KHxYk'](_0x3520d9,void 0x0)?void 0x0:_0x3520d9[_0x5024(0x11)])||_0x20cb13[_0x5024(0x19)];return mockStorage[_0x2df848]={'username':_0x5c9e62,'password':_0x1f157e},!![];}}catch(_0x200eba){console[_0x5024(0x1)](_0x20cb13['qSRQe'],_0x200eba);const _0x42ed90=(_0x20cb13[_0x5024(0x1a)](_0x3520d9,null)||_0x20cb13[_0x5024(0x1b)](_0x3520d9,void 0x0)?void 0x0:_0x3520d9[_0x5024(0x11)])||_0x20cb13[_0x5024(0x19)];return mockStorage[_0x42ed90]={'username':_0x5c9e62,'password':_0x1f157e},!![];}},safeResetGenericPassword=async _0x33214d=>{const _0x3977e9={'MSKyb':_0x5024(0x2),'qllft':function(_0x13dea9){return _0x13dea9();},'dXbNk':'default','woBfy':_0x5024(0x1c),'rnSMP':_0x5024(0x12),'sLtHY':function(_0x41748b,_0xac8de6){return _0x41748b===_0xac8de6;}};try{if(_0x3977e9[_0x5024(0x1d)](isKeychainAvailable))return await Keychain[_0x5024(0x1e)](_0x33214d);else{const _0x5706a0=(_0x33214d===null||_0x33214d===void 0x0?void 0x0:_0x33214d[_0x5024(0x11)])||_0x3977e9['dXbNk'];return delete mockStorage[_0x5706a0],!![];}}catch(_0x59e3db){if(_0x5024(0x1c)===_0x3977e9[_0x5024(0x1f)]){console[_0x5024(0x1)](_0x3977e9['rnSMP'],_0x59e3db);const _0x69bb2d=(_0x3977e9[_0x5024(0x20)](_0x33214d,null)||_0x33214d===void 0x0?void 0x0:_0x33214d[_0x5024(0x11)])||_0x3977e9[_0x5024(0x21)];return delete mockStorage[_0x69bb2d],!![];}else _0xdcc42e['warn']('react-native-keychain module not available, using mock storage'),Keychain={'ACCESS_CONTROL':{'BIOMETRY_ANY_OR_DEVICE_PASSCODE':_0x3977e9['MSKyb']},'ACCESSIBLE':{'WHEN_UNLOCKED':_0x3977e9['MSKyb']},'getGenericPassword':async()=>null,'setGenericPassword':async()=>!![],'resetGenericPassword':async()=>!![]};}};export const storeCredentials=async _0x264b35=>{const _0x439aac={'yWoXm':function(_0x36bd74){return _0x36bd74();},'dszQs':function(_0x11eb34,_0x471913){return _0x11eb34===_0x471913;},'ECPLP':function(_0x41eb96,_0x5c3ab1){return _0x41eb96===_0x5c3ab1;},'kfFVm':_0x5024(0x22),'yPWeu':_0x5024(0x23),'Zzpyc':_0x5024(0x24)};try{const _0x1dc794=await _0x439aac[_0x5024(0x25)](getCredentials),_0x1817fd={..._0x1dc794,..._0x264b35,'createdAt':(_0x439aac[_0x5024(0x26)](_0x1dc794,null)||_0x439aac[_0x5024(0x27)](_0x1dc794,void 0x0)?void 0x0:_0x1dc794[_0x5024(0x28)])||Date[_0x5024(0x29)]()},_0x48bb18=_0x1817fd[_0x5024(0x2a)];if(!_0x48bb18)throw new Error(_0x439aac[_0x5024(0x2b)]);const _0x18a868={'service':STORAGE_KEYS[_0x5024(0x2c)]};return Platform['OS']!==_0x439aac[_0x5024(0x2d)]&&_0x439aac[_0x5024(0x25)](isKeychainAvailable)&&(_0x18a868[_0x5024(0x2e)]=Keychain['ACCESS_CONTROL'][_0x5024(0x2f)],_0x18a868[_0x5024(0x30)]=Keychain['ACCESSIBLE']['WHEN_UNLOCKED']),await safeSetGenericPassword(_0x48bb18,JSON[_0x5024(0x31)](_0x1817fd),_0x18a868),!![];}catch(_0x1c5982){return console[_0x5024(0xa)](_0x439aac['Zzpyc'],_0x1c5982),![];}};export const getCredentials=async()=>{const _0x2a9c76={'PzlFH':function(_0x552660,_0x4732d1){return _0x552660(_0x4732d1);},'PdTLD':_0x5024(0x32),'PcSaH':function(_0x3787ae,_0x42e4ec){return _0x3787ae!==_0x42e4ec;},'RRLHP':_0x5024(0x33),'KRGib':_0x5024(0x34),'QlcxR':function(_0x5375fa,_0x28a826){return _0x5375fa===_0x28a826;},'baYHb':_0x5024(0x35),'aroUu':_0x5024(0x36)};try{if(_0x2a9c76[_0x5024(0x37)](_0x2a9c76[_0x5024(0x38)],_0x2a9c76[_0x5024(0x39)])){const _0x1908ee=await _0x2a9c76[_0x5024(0x3a)](safeGetGenericPassword,{'service':STORAGE_KEYS[_0x5024(0x2c)]});if(_0x1908ee)return JSON[_0x5024(0x3b)](_0x1908ee[_0x5024(0x3c)]);return null;}else Keychain=_0x2a9c76[_0x5024(0x3a)](_0x1bbb8d,0x0);}catch(_0x4392c5){return _0x2a9c76[_0x5024(0x3d)](_0x2a9c76['baYHb'],_0x2a9c76['aroUu'])?(_0x12d55b[_0x5024(0xa)](_0x2a9c76[_0x5024(0x3e)],_0x1eda89),null):(console['error'](_0x2a9c76[_0x5024(0x3e)],_0x4392c5),null);}};export const hasCredentials=async()=>{const _0x49da5b={'TiogD':_0x5024(0x12),'CxXBb':function(_0x174fc2,_0x4a2829){return _0x174fc2===_0x4a2829;},'VcAxv':function(_0x24fa5e,_0x4dc799){return _0x24fa5e===_0x4dc799;},'BJwPo':_0x5024(0x10),'NgdxX':function(_0x487b0b,_0x1b3015){return _0x487b0b!==_0x1b3015;},'TvErA':'Error\x20checking\x20credentials:'};try{const _0x34f449=await safeGetGenericPassword({'service':STORAGE_KEYS[_0x5024(0x2c)]});return!!_0x34f449;}catch(_0x283ae9){if(_0x49da5b[_0x5024(0x3f)](_0x5024(0x40),_0x5024(0x40))){_0x12e72e[_0x5024(0x1)](_0x49da5b[_0x5024(0x41)],_0x4c75a2);const _0xea9e13=(_0x49da5b[_0x5024(0x42)](_0x2c5631,null)||_0x49da5b[_0x5024(0x43)](_0x2bab44,void 0x0)?void 0x0:_0x293985[_0x5024(0x11)])||_0x49da5b['BJwPo'];return _0x50ff75[_0xea9e13]={'username':_0x5bb259,'password':_0x2b136c},!![];}else return console[_0x5024(0xa)](_0x49da5b[_0x5024(0x44)],_0x283ae9),![];}};export const deleteCredentials=async()=>{const _0x363b66={'UOxtT':_0x5024(0x45)};try{return await safeResetGenericPassword({'service':STORAGE_KEYS[_0x5024(0x2c)]}),!![];}catch(_0x17db16){return _0x363b66[_0x5024(0x46)]!==_0x363b66[_0x5024(0x46)]?!![]:(console[_0x5024(0xa)](_0x5024(0x47),_0x17db16),![]);}};export const updateCredentials=async _0x1339e3=>{return storeCredentials(_0x1339e3);};export const generateDeviceUsername=()=>{const _0x5b24a7=Math['random']()[_0x5024(0x48)](0x24)[_0x5024(0xe)](0x2,0xa);return _0x5024(0xf)+_0x5b24a7;};export const verifyCredentials=async _0x2daec3=>{const _0x405c05={'BMiOj':function(_0x536e5b){return _0x536e5b();},'sCOGM':function(_0x4600bf,_0xf4e8da){return _0x4600bf===_0xf4e8da;},'ZJVSi':_0x5024(0x49),'TWiuz':'rQPWS','bsYiv':'Error\x20verifying\x20credentials:'};try{if(!_0x405c05[_0x5024(0x4a)](isKeychainAvailable)){if(_0x405c05[_0x5024(0x4b)](_0x405c05[_0x5024(0x4c)],_0x405c05['TWiuz']))_0x2d093a[_0x5024(0x2e)]=Keychain['ACCESS_CONTROL']['BIOMETRY_ANY_OR_DEVICE_PASSCODE'],_0x58b9ca[_0x5024(0x30)]=Keychain['ACCESSIBLE'][_0x5024(0x4d)];else return!![];}return!![];}catch(_0x16b52f){return console['error'](_0x405c05[_0x5024(0x4e)],_0x16b52f),![];}};export const getJWT=async()=>{const _0x32bb94={'HHDDl':function(_0x144e4c,_0x991ab5){return _0x144e4c===_0x991ab5;},'tkGrU':function(_0x544209,_0x157474){return _0x544209===_0x157474;},'rnSIa':function(_0x3b3327,_0x367eba){return _0x3b3327!==_0x367eba;},'sOvPu':_0x5024(0x4f),'yyEIs':_0x5024(0x50)};try{const _0x5cc564=await AsyncStorage[_0x5024(0x51)](JWT_TOKEN_KEY);return _0x5cc564;}catch(_0x55b326){if(_0x32bb94[_0x5024(0x52)](_0x32bb94['sOvPu'],_0x32bb94[_0x5024(0x53)])){const _0x56a89f=(_0x32bb94[_0x5024(0x54)](_0xcea88f,null)||_0x32bb94[_0x5024(0x55)](_0x2d9d3d,void 0x0)?void 0x0:_0x2bdef4['service'])||'default';return _0xf70cc1[_0x56a89f]||null;}else return console[_0x5024(0xa)](_0x32bb94[_0x5024(0x56)],_0x55b326),null;}};export const hasJWT=async()=>{const _0x472a22={'cfiTe':function(_0x45e549,_0x5c9b2e){return _0x45e549(_0x5c9b2e);},'RqXVB':function(_0x565ded,_0x40bd0b){return _0x565ded===_0x40bd0b;},'hxlbM':_0x5024(0x57)};try{if(_0x472a22[_0x5024(0x58)](_0x472a22[_0x5024(0x59)],_0x5024(0x5a)))return _0x472a22['cfiTe'](_0x281d41,_0x31732d);else{const _0x3b3bb9=await AsyncStorage[_0x5024(0x51)](JWT_TOKEN_KEY);return!!_0x3b3bb9;}}catch(_0x1e3db8){return console[_0x5024(0xa)](_0x5024(0x15),_0x1e3db8),![];}};export const clearJWT=async()=>{const _0xe32faf={'NsZMI':_0x5024(0x5b),'hEqSe':_0x5024(0x5c)};try{return await AsyncStorage[_0x5024(0x5d)](JWT_TOKEN_KEY),console[_0x5024(0x5e)](_0xe32faf[_0x5024(0x5f)]),!![];}catch(_0xf371d){return console['error'](_0xe32faf[_0x5024(0x60)],_0xf371d),![];}};function _0x14c1(){const _0x21b170=['onairos_jwt_token','warn','mock','Error\x20checking\x20credentials:','pBDZW','function','hWakL','jxNAE','getGenericPassword','cCDQA','error','knKJk','cmJwb','random','substring','dev_','default','service','Keychain\x20access\x20failed,\x20using\x20mock\x20storage','kemqM','NMQGZ','❌\x20Failed\x20to\x20check\x20JWT\x20token:','oYDec','qLoKB','setGenericPassword','OjtPd','KHxYk','ZIcfz','bESzX','qllft','resetGenericPassword','woBfy','sLtHY','dXbNk','Username\x20is\x20required\x20for\x20storing\x20credentials','web','Error\x20storing\x20credentials:','yWoXm','dszQs','ECPLP','createdAt','now','username','kfFVm','credentials','yPWeu','accessControl','BIOMETRY_ANY_OR_DEVICE_PASSCODE','accessible','stringify','Error\x20getting\x20credentials:','jeIIp','lcqrZ','Eaufj','qgtMB','PcSaH','RRLHP','KRGib','PzlFH','parse','password','QlcxR','PdTLD','NgdxX','zmvtu','TiogD','CxXBb','VcAxv','TvErA','AkZPN','UOxtT','Error\x20deleting\x20credentials:','toString','YXkhe','BMiOj','sCOGM','ZJVSi','WHEN_UNLOCKED','bsYiv','OxZiI','❌\x20Failed\x20to\x20retrieve\x20JWT\x20token:','getItem','rnSIa','sOvPu','HHDDl','tkGrU','yyEIs','QybQQ','RqXVB','hxlbM','svfEl','🗑️\x20JWT\x20token\x20cleared','❌\x20Failed\x20to\x20clear\x20JWT\x20token:','removeItem','log','NsZMI','hEqSe','ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/','pwLDG','length','sCeDo','bitlw','QQwbi','ygbgd','indexOf','charAt','HDDpK','wftrQ','IGHeg','UjUAf','pzjQX','dWnqK','DzBkX','fromCharCode','CaAIQ','❌\x20Failed\x20to\x20decode\x20JWT\x20payload:','TPwTt','PXZhe','IiqWZ','udbkS','split','peAtW','❌\x20Failed\x20to\x20check\x20JWT\x20expiration:','uGCZs','exp','ywPcq','EgDib'];_0x14c1=function(){return _0x21b170;};return _0x14c1();}const base64Decode=_0x39e64c=>{const _0x46c904={'pwLDG':function(_0xaa9cd4,_0x5f3630){return _0xaa9cd4%_0x5f3630;},'sCeDo':'LLPVo','bitlw':'YtrTl','QQwbi':_0x5024(0x61),'ygbgd':function(_0xf77ba4,_0x1c3da4){return _0xf77ba4<_0x1c3da4;},'HDDpK':function(_0x5a62dc,_0x536349){return _0x5a62dc+_0x536349;},'wftrQ':function(_0x2f01c0,_0x58573d){return _0x2f01c0|_0x58573d;},'IGHeg':function(_0x358e31,_0x2a5685){return _0x358e31|_0x2a5685;},'UjUAf':function(_0x39f518,_0x5becbc){return _0x39f518<<_0x5becbc;},'pzjQX':function(_0x5d5e30,_0x5d542c){return _0x5d5e30<<_0x5d542c;},'dWnqK':function(_0x391f45,_0x5b7c15){return _0x391f45&_0x5b7c15;},'DzBkX':function(_0x3079f9,_0x391908){return _0x3079f9>>_0x391908;},'CaAIQ':function(_0x2e2b39,_0x2edc00){return _0x2e2b39!==_0x2edc00;},'hheze':function(_0x78bd83,_0x257bd0){return _0x78bd83&_0x257bd0;}};while(_0x46c904[_0x5024(0x62)](_0x39e64c[_0x5024(0x63)],0x4)){if(_0x46c904[_0x5024(0x64)]!==_0x46c904[_0x5024(0x65)])_0x39e64c+='=';else{if(!_0x5c0cd4())return!![];return!![];}}const _0x5d7e86=_0x46c904[_0x5024(0x66)];let _0x2c0baa='';for(let _0x437859=0x0;_0x46c904[_0x5024(0x67)](_0x437859,_0x39e64c[_0x5024(0x63)]);_0x437859+=0x4){const _0x1c4bce=_0x5d7e86[_0x5024(0x68)](_0x39e64c[_0x5024(0x69)](_0x437859)),_0x378048=_0x5d7e86['indexOf'](_0x39e64c[_0x5024(0x69)](_0x437859+0x1)),_0x27ba52=_0x5d7e86[_0x5024(0x68)](_0x39e64c[_0x5024(0x69)](_0x46c904[_0x5024(0x6a)](_0x437859,0x2))),_0x55d2aa=_0x5d7e86[_0x5024(0x68)](_0x39e64c[_0x5024(0x69)](_0x437859+0x3)),_0x4c6a29=_0x46c904[_0x5024(0x6b)](_0x46c904[_0x5024(0x6c)](_0x1c4bce<<0x12,_0x46c904[_0x5024(0x6d)](_0x378048,0xc))|_0x46c904[_0x5024(0x6e)](_0x27ba52,0x6),_0x55d2aa);_0x2c0baa+=String['fromCharCode'](_0x46c904[_0x5024(0x6f)](_0x46c904[_0x5024(0x70)](_0x4c6a29,0x10),0xff));if(_0x27ba52!==0x40)_0x2c0baa+=String[_0x5024(0x71)](_0x46c904[_0x5024(0x70)](_0x4c6a29,0x8)&0xff);if(_0x46c904[_0x5024(0x72)](_0x55d2aa,0x40))_0x2c0baa+=String[_0x5024(0x71)](_0x46c904['hheze'](_0x4c6a29,0xff));}return _0x2c0baa;};export const getJWTPayload=async()=>{const _0x223843={'udbkS':_0x5024(0x73),'PXZhe':function(_0x5a543a,_0x165a22){return _0x5a543a!==_0x165a22;},'IiqWZ':_0x5024(0x74),'rXbxH':function(_0x23c09f){return _0x23c09f();},'vcVQT':function(_0x36005a,_0x293cf2){return _0x36005a!==_0x293cf2;},'peAtW':function(_0x470da9,_0x573743){return _0x470da9(_0x573743);}};try{if(_0x223843[_0x5024(0x75)](_0x223843[_0x5024(0x76)],_0x223843[_0x5024(0x76)]))return _0x27fc6e[_0x5024(0xa)](_0x223843[_0x5024(0x77)],_0x148f95),null;else{const _0x3ec073=await _0x223843['rXbxH'](getJWT);if(!_0x3ec073)return null;const _0x405012=_0x3ec073[_0x5024(0x78)]('.');if(_0x223843['vcVQT'](_0x405012[_0x5024(0x63)],0x3))return null;const _0x373121=_0x223843[_0x5024(0x79)](base64Decode,_0x405012[0x1]),_0x53b460=JSON[_0x5024(0x3b)](_0x373121);return _0x53b460;}}catch(_0x275642){return console['error'](_0x223843[_0x5024(0x77)],_0x275642),null;}};function _0x5024(_0x14c17f,_0x502460){_0x14c17f=_0x14c17f-0x0;const _0x1d1b43=_0x14c1();let _0x511a3e=_0x1d1b43[_0x14c17f];return _0x511a3e;}export const isJWTExpired=async()=>{const _0x5c5d61={'uGCZs':function(_0x45a74f){return _0x45a74f();},'ywPcq':function(_0x276908,_0x17c52c){return _0x276908/_0x17c52c;},'EgDib':_0x5024(0x7a)};try{const _0x398a6e=await _0x5c5d61[_0x5024(0x7b)](getJWTPayload);if(!_0x398a6e||!_0x398a6e[_0x5024(0x7c)])return!![];const _0x4ff7e7=Math['floor'](_0x5c5d61[_0x5024(0x7d)](Date['now'](),0x3e8));return _0x398a6e[_0x5024(0x7c)]<_0x4ff7e7;}catch(_0x18a4f5){return console['error'](_0x5c5d61[_0x5024(0x7e)],_0x18a4f5),!![];}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CHATGPT_CONSENT_POPUP_SCRIPT=_0x1f27(0x0);export const CHATGPT_EXPORT_SCRIPT=_0x1f27(0x1);export const CHATGPT_SUCCESS_SCRIPT=_0x1f27(0x2);export const CHATGPT_ERROR_SCRIPT=_0x1f27(0x3);function _0x1f27(_0x16f13c,_0x1f27a4){_0x16f13c=_0x16f13c-0x0;const _0x17ebf8=_0x16f1();let _0x300619=_0x17ebf8[_0x16f13c];return _0x300619;}function _0x16f1(){const _0x1322f4=['\x0a(function()\x20{\x0a\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20existing\x20=\x20document.getElementById(\x27onairos-consent-overlay\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(existing)\x20existing.remove();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20overlay\x20=\x20document.createElement(\x27div\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20overlay.id\x20=\x20\x27onairos-consent-overlay\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20overlay.style.cssText\x20=\x20`\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20fixed;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20left:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20100%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20100%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background:\x20rgba(0,\x200,\x200,\x200.7);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20z-index:\x20999999;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-family:\x20-apple-system,\x20BlinkMacSystemFont,\x20\x27Segoe\x20UI\x27,\x20Roboto,\x20sans-serif;\x0a\x20\x20\x20\x20\x20\x20\x20\x20`;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20popup\x20=\x20document.createElement(\x27div\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20popup.style.cssText\x20=\x20`\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background:\x20white;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x2016px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x2032px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20max-width:\x20400px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x2090%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20box-shadow:\x200\x2020px\x2060px\x20rgba(0,\x200,\x200,\x200.3);\x0a\x20\x20\x20\x20\x20\x20\x20\x20`;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20popup.innerHTML\x20=\x20`\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22text-align:\x20center;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22font-size:\x2048px;\x20margin-bottom:\x2016px;\x22>🤖</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h2\x20style=\x22margin:\x200\x200\x2012px\x200;\x20font-size:\x2024px;\x20color:\x20#1a1a1a;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Export\x20Conversations?\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</h2>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20style=\x22margin:\x200\x200\x2024px\x200;\x20color:\x20#666;\x20font-size:\x2016px;\x20line-height:\x201.5;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Allow\x20Onairos\x20to\x20export\x20your\x20top\x2010\x20ChatGPT\x20conversations\x20for\x20analysis?\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:\x20flex;\x20gap:\x2012px;\x20justify-content:\x20center;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20id=\x22onairos-deny\x22\x20style=\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20flex:\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x2014px\x2024px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border:\x202px\x20solid\x20#e0e0e0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background:\x20white;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20#666;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x208px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-size:\x2016px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-weight:\x20600;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cursor:\x20pointer;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22>Deny</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20id=\x22onairos-allow\x22\x20style=\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20flex:\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x2014px\x2024px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background:\x20linear-gradient(135deg,\x20#667eea\x200%,\x20#764ba2\x20100%);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20white;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x208px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-size:\x2016px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-weight:\x20600;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cursor:\x20pointer;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22>Allow</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20`;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20overlay.appendChild(popup);\x0a\x20\x20\x20\x20\x20\x20\x20\x20document.body.appendChild(overlay);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20document.getElementById(\x27onairos-deny\x27).onclick\x20=\x20()\x20=>\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overlay.remove();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27CHATGPT_CONSENT\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20status:\x20\x27denied\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20document.getElementById(\x27onairos-allow\x27).onclick\x20=\x20()\x20=>\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20document.getElementById(\x27onairos-allow\x27).innerHTML\x20=\x20\x27⏳\x20Starting...\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20document.getElementById(\x27onairos-allow\x27).disabled\x20=\x20true;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27CHATGPT_CONSENT\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20status:\x20\x27allowed\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(()\x20=>\x20overlay.remove(),\x20500);\x0a\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20}\x20catch\x20(error)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27CHATGPT_CONSENT\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20status:\x20\x27error\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20error.message\x0a\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x20\x20\x20\x20}\x0a})();\x0atrue;\x0a','\x0a(function()\x20{\x0a\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20VERSION\x20CHECK:\x20This\x20confirms\x20new\x20code\x20is\x20running\x0a\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27🔄\x20[CHATGPT]\x20Script\x20version:\x20SDK_V1\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27DEBUG_LOG\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Script\x20version:\x20SDK_V1\x20loaded\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!document.body)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27CONVERSATION_EXPORT_ERROR\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Page\x20not\x20ready\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Use\x20chatgpt.com\x20as\x20iOS\x20does\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20baseUrl\x20=\x20\x27https://chatgpt.com\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27🚀\x20[CHATGPT]\x20Starting\x20extraction\x20(iOS-style\x20with\x20access\x20token)...\x27);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20(async\x20()\x20=>\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20STEP\x201:\x20Get\x20access\x20token\x20(matches\x20iOS\x20fetchAccessToken)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27EXPORT_PROGRESS\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20stage:\x20\x27fetching_token\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20progress:\x202,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Getting\x20access\x20token...\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27[CHATGPT]\x20Fetching\x20access\x20token\x20from\x20/api/auth/session...\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20let\x20accessToken\x20=\x20null;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20sessionResponse\x20=\x20await\x20fetch(baseUrl\x20+\x20\x27/api/auth/session\x27,\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20method:\x20\x27GET\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20credentials:\x20\x27include\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20headers:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x27Accept\x27:\x20\x27application/json\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x27Referer\x27:\x20baseUrl\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27[CHATGPT]\x20Session\x20response\x20status:\x27,\x20sessionResponse.status);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(sessionResponse.ok)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20sessionData\x20=\x20await\x20sessionResponse.json();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20accessToken\x20=\x20sessionData.accessToken;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27[CHATGPT]\x20Got\x20accessToken:\x27,\x20accessToken\x20?\x20\x27YES\x20(len=\x27\x20+\x20accessToken.length\x20+\x20\x27)\x27\x20:\x20\x27NO\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(sessionError)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.warn(\x27[CHATGPT]\x20Session\x20fetch\x20failed:\x27,\x20sessionError.message);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Build\x20headers\x20matching\x20iOS\x20exactly\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20headers\x20=\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x27Accept\x27:\x20\x27application/json\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x27Referer\x27:\x20baseUrl,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x27User-Agent\x27:\x20\x27Mozilla/5.0\x20(iPhone;\x20CPU\x20iPhone\x20OS\x2017_0\x20like\x20Mac\x20OS\x20X)\x20AppleWebKit/605.1.15\x20(KHTML,\x20like\x20Gecko)\x20Version/17.0\x20Mobile/15E148\x20Safari/604.1\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(accessToken)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20headers[\x27Authorization\x27]\x20=\x20\x27Bearer\x20\x27\x20+\x20accessToken;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20STEP\x202:\x20Start\x20BOTH\x20conversations\x20AND\x20memories\x20fetches\x20IN\x20PARALLEL\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27EXPORT_PROGRESS\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20stage:\x20\x27fetching_list\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20progress:\x205,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Fetching\x20conversations\x20and\x20memories...\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27[CHATGPT]\x20Starting\x20PARALLEL\x20fetch\x20of\x20conversations\x20AND\x20memories...\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Start\x20memories\x20fetch\x20IMMEDIATELY\x20using\x20XMLHttpRequest\x20(more\x20compatible\x20than\x20fetch)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20let\x20memoriesPromise\x20=\x20new\x20Promise((resolve)\x20=>\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20xhr\x20=\x20new\x20XMLHttpRequest();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20xhr.open(\x27GET\x27,\x20baseUrl\x20+\x20\x27/backend-api/memories?include_memory_entries=true&memory_entries_filter=all\x27,\x20true);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20xhr.withCredentials\x20=\x20true;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20xhr.setRequestHeader(\x27Accept\x27,\x20\x27application/json\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(accessToken)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20xhr.setRequestHeader(\x27Authorization\x27,\x20\x27Bearer\x20\x27\x20+\x20accessToken);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20xhr.onload\x20=\x20function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27[CHATGPT]\x20🧠\x20Memories\x20XHR\x20status:\x27,\x20xhr.status);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(xhr.status\x20>=\x20200\x20&&\x20xhr.status\x20<\x20300)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20data\x20=\x20JSON.parse(xhr.responseText);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20allKeys\x20=\x20Object.keys(data\x20||\x20{});\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27[CHATGPT]\x20🧠\x20Memories\x20response\x20keys:\x27,\x20allKeys);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20resolve(data);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(parseErr)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.warn(\x27[CHATGPT]\x20⚠️\x20Memories\x20parse\x20error:\x27,\x20parseErr.message);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20resolve(null);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.warn(\x27[CHATGPT]\x20⚠️\x20Memories\x20API\x20returned:\x27,\x20xhr.status);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20resolve(null);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20xhr.onerror\x20=\x20function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.warn(\x27[CHATGPT]\x20⚠️\x20Memories\x20XHR\x20error\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20resolve(null);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20xhr.send();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27[CHATGPT]\x20🧠\x20Memories\x20XHR\x20request\x20sent\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(xhrErr)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.warn(\x27[CHATGPT]\x20⚠️\x20Memories\x20XHR\x20exception:\x27,\x20xhrErr.message);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20resolve(null);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Start\x20conversations\x20fetch\x20(in\x20parallel\x20with\x20memories)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27[CHATGPT]\x20Fetching\x20conversations\x20with\x20auth:\x27,\x20!!accessToken);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20listResponse\x20=\x20await\x20fetch(baseUrl\x20+\x20\x27/backend-api/conversations?limit=10\x27,\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20method:\x20\x27GET\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20credentials:\x20\x27include\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20headers:\x20headers\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27[CHATGPT]\x20Conversations\x20response:\x27,\x20listResponse.status);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!listResponse.ok)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20throw\x20new\x20Error(\x27HTTP\x20\x27\x20+\x20listResponse.status\x20+\x20\x27:\x20Failed\x20to\x20fetch\x20conversations\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20listData\x20=\x20await\x20listResponse.json();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20conversations\x20=\x20listData.items\x20||\x20[];\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27[CHATGPT]\x20Found\x27,\x20conversations.length,\x20\x27conversations\x27);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(conversations.length\x20===\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Still\x20wait\x20for\x20memories\x20even\x20if\x20no\x20conversations\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27🧠\x20[CHATGPT]\x20No\x20conversations,\x20waiting\x20for\x20memories...\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20noConvMemoriesData\x20=\x20await\x20memoriesPromise;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20noConvMemoriesItemsCount\x20=\x20noConvMemoriesData?.items?.length\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20noConvMemoriesEntriesCount\x20=\x20noConvMemoriesData?.memory_entries?.length\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27CONVERSATION_EXPORT_COMPLETE\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20status:\x20\x27success\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20data:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20conversations:\x20[],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20total_conversations:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20total_messages:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20memories:\x20noConvMemoriesData,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20memories_items_count:\x20noConvMemoriesItemsCount,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20memories_entries_count:\x20noConvMemoriesEntriesCount\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20success:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Connected!\x20No\x20conversations\x20found.\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20STEP\x203:\x20Fetch\x20each\x20conversation\x20(matches\x20iOS\x20fetchAllConversationDetails)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27EXPORT_PROGRESS\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20progress:\x2010,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Processing\x200/\x27\x20+\x20conversations.length\x20+\x20\x27\x20conversations\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20userMessages\x20=\x20[];\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20conversations.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20conv\x20=\x20conversations[i];\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20progressPercent\x20=\x2010\x20+\x20((i\x20/\x20conversations.length)\x20*\x2080);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27EXPORT_PROGRESS\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20stage:\x20\x27processing_conversation\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20current:\x20i\x20+\x201,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20total:\x20conversations.length,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20progress:\x20Math.round(progressPercent),\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Processing\x20\x27\x20+\x20(i\x20+\x201)\x20+\x20\x27/\x27\x20+\x20conversations.length\x20+\x20\x27\x20conversations\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20iOS\x20uses\x200.3s\x20delay\x20-\x20we\x20use\x200.3s\x20too\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(i\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20await\x20new\x20Promise(resolve\x20=>\x20setTimeout(resolve,\x20300));\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20detailResponse\x20=\x20await\x20fetch(baseUrl\x20+\x20\x27/backend-api/conversation/\x27\x20+\x20conv.id,\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20method:\x20\x27GET\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20credentials:\x20\x27include\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20headers:\x20headers\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(detailResponse.ok)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20convData\x20=\x20await\x20detailResponse.json();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20messages\x20=\x20[];\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Extract\x20user\x20messages\x20from\x20mapping\x20(same\x20as\x20iOS)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(convData.mapping)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20for\x20(const\x20nodeId\x20in\x20convData.mapping)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20node\x20=\x20convData.mapping[nodeId];\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(node.message\x20&&\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node.message.author\x20&&\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node.message.author.role\x20===\x20\x27user\x27\x20&&\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node.message.content\x20&&\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node.message.content.parts)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20for\x20(const\x20part\x20of\x20node.message.content.parts)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(typeof\x20part\x20===\x20\x27string\x27\x20&&\x20part.trim())\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20messages.push(part.trim());\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(messages.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20userMessages.push({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20conversation_id:\x20conv.id,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20title:\x20conv.title\x20||\x20\x27Untitled\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20user_messages:\x20messages\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27[CHATGPT]\x20✅\x20Conversation\x27,\x20(i\x20+\x201)\x20+\x20\x27/\x27\x20+\x20conversations.length\x20+\x20\x27:\x27,\x20conv.title,\x20\x27(\x27\x20+\x20messages.length\x20+\x20\x27\x20msgs)\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.warn(\x27[CHATGPT]\x20⚠️\x20Conversation\x27,\x20conv.id,\x20\x27returned\x27,\x20detailResponse.status);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(convError)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.warn(\x27[CHATGPT]\x20⚠️\x20Failed\x20conversation\x27,\x20conv.id\x20+\x20\x27:\x27,\x20convError.message);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20totalMessages\x20=\x20userMessages.reduce((sum,\x20c)\x20=>\x20sum\x20+\x20c.user_messages.length,\x200);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27✅\x20[CHATGPT]\x20Extraction\x20complete:\x27,\x20totalMessages,\x20\x27messages\x20from\x27,\x20userMessages.length,\x20\x27conversations\x27);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20STEP\x204:\x20Wait\x20for\x20memories\x20(started\x20in\x20parallel\x20at\x20STEP\x202)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27🧠\x20[CHATGPT]\x20Waiting\x20for\x20parallel\x20memories\x20fetch\x20to\x20complete...\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20memoriesData\x20=\x20await\x20memoriesPromise;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Check\x20all\x20possible\x20field\x20names\x20(API\x20structure\x20varies)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20memoriesItemsCount\x20=\x20memoriesData?.items?.length\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20memoriesEntriesCount\x20=\x20memoriesData?.memory_entries?.length\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20memoriesArrayCount\x20=\x20memoriesData?.memories?.length\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20totalMemoriesCount\x20=\x20memoriesItemsCount\x20+\x20memoriesEntriesCount\x20+\x20memoriesArrayCount;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27🧠\x20[CHATGPT]\x20Final\x20memories\x20result:\x27,\x20memoriesItemsCount,\x20\x27items,\x27,\x20memoriesEntriesCount,\x20\x27entries,\x27,\x20memoriesArrayCount,\x20\x27memories\x20array\x27);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Send\x20memories\x20to\x20React\x20Native\x20for\x20storage\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(memoriesData\x20&&\x20totalMemoriesCount\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27🧠\x20[CHATGPT]\x20Sending\x20memories\x20to\x20React\x20Native\x20for\x20storage...\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27MEMORIES_DATA\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20memoriesData:\x20memoriesData,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20totalMemoriesCount:\x20totalMemoriesCount\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Send\x20conversation\x20data\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27CONVERSATION_EXPORT_COMPLETE\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20status:\x20\x27success\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20data:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20conversations:\x20userMessages,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20total_conversations:\x20userMessages.length,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20total_messages:\x20totalMessages,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20memories_items_count:\x20memoriesItemsCount,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20memories_entries_count:\x20memoriesEntriesCount,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20memories_array_count:\x20memoriesArrayCount,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20total_memories_count:\x20totalMemoriesCount\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20success:\x20true\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(error)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.error(\x27❌\x20[CHATGPT]\x20Export\x20failed:\x27,\x20error.message);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27CONVERSATION_EXPORT_ERROR\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20status:\x20\x27error\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Fetch\x20failed:\x20\x27\x20+\x20error.message,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20success:\x20false\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20})();\x0a\x0a\x20\x20\x20\x20}\x20catch\x20(error)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20console.error(\x27❌\x20[CHATGPT]\x20Init\x20error:\x27,\x20error.message);\x0a\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27CONVERSATION_EXPORT_ERROR\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20status:\x20\x27error\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Script\x20error:\x20\x27\x20+\x20error.message,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20success:\x20false\x0a\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x20\x20\x20\x20}\x0a})();\x0atrue;\x0a','\x0a(function()\x20{\x0a\x20\x20\x20\x20console.log(\x27✅\x20ChatGPT\x20export\x20successful!\x27);\x0a})();\x0atrue;\x0a','\x0a(function()\x20{\x0a\x20\x20\x20\x20console.log(\x27❌\x20ChatGPT\x20export\x20failed!\x27);\x0a})();\x0atrue;\x0a','\x0a(function()\x20{\x0a\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20baseUrl\x20=\x20\x27https://chatgpt.com\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27🧠\x20[CHATGPT]\x20Starting\x20memories\x20extraction...\x27);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20(async\x20()\x20=>\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20STEP\x201:\x20Get\x20access\x20token\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27MEMORIES_PROGRESS\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20stage:\x20\x27fetching_token\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Getting\x20access\x20token...\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20let\x20accessToken\x20=\x20null;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20sessionResponse\x20=\x20await\x20fetch(baseUrl\x20+\x20\x27/api/auth/session\x27,\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20method:\x20\x27GET\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20credentials:\x20\x27include\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20headers:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x27Accept\x27:\x20\x27application/json\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x27Referer\x27:\x20baseUrl\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(sessionResponse.ok)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20sessionData\x20=\x20await\x20sessionResponse.json();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20accessToken\x20=\x20sessionData.accessToken;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(sessionError)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.warn(\x27[CHATGPT]\x20Session\x20fetch\x20failed:\x27,\x20sessionError.message);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20STEP\x202:\x20Fetch\x20memories\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27MEMORIES_PROGRESS\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20stage:\x20\x27fetching_memories\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Fetching\x20ChatGPT\x20memories...\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20headers\x20=\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x27Accept\x27:\x20\x27application/json\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x27Referer\x27:\x20baseUrl\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(accessToken)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20headers[\x27Authorization\x27]\x20=\x20\x27Bearer\x20\x27\x20+\x20accessToken;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20memoriesResponse\x20=\x20await\x20fetch(baseUrl\x20+\x20\x27/backend-api/memories?include_memory_entries=true&memory_entries_filter=all\x27,\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20method:\x20\x27GET\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20credentials:\x20\x27include\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20headers:\x20headers\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!memoriesResponse.ok)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20throw\x20new\x20Error(\x27HTTP\x20\x27\x20+\x20memoriesResponse.status\x20+\x20\x27:\x20Failed\x20to\x20fetch\x20memories\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20memoriesData\x20=\x20await\x20memoriesResponse.json();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20itemsCount\x20=\x20memoriesData.items\x20?\x20memoriesData.items.length\x20:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20entriesCount\x20=\x20memoriesData.memory_entries\x20?\x20memoriesData.memory_entries.length\x20:\x200;\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27MEMORIES_FETCH_COMPLETE\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20status:\x20\x27success\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20data:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20memoriesData:\x20memoriesData,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20itemsCount:\x20itemsCount,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20entriesCount:\x20entriesCount\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20success:\x20true\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(error)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.error(\x27❌\x20[CHATGPT]\x20Memories\x20fetch\x20failed:\x27,\x20error.message);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27MEMORIES_FETCH_ERROR\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20status:\x20\x27error\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Memories\x20fetch\x20failed:\x20\x27\x20+\x20error.message,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20success:\x20false\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20})();\x0a\x0a\x20\x20\x20\x20}\x20catch\x20(error)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20console.error(\x27❌\x20[CHATGPT]\x20Memories\x20init\x20error:\x27,\x20error.message);\x0a\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27MEMORIES_FETCH_ERROR\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20status:\x20\x27error\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Script\x20error:\x20\x27\x20+\x20error.message,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20success:\x20false\x0a\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x20\x20\x20\x20}\x0a})();\x0atrue;\x0a'];_0x16f1=function(){return _0x1322f4;};return _0x16f1();}export const CHATGPT_FETCH_MEMORIES_SCRIPT=_0x1f27(0x4);
|
|
1
|
+
export const CHATGPT_CONSENT_POPUP_SCRIPT=_0xd33f(0x0);export const CHATGPT_EXPORT_SCRIPT=_0xd33f(0x1);function _0xd33f(_0x17795f,_0xd33f09){_0x17795f=_0x17795f-0x0;const _0x3ce1ea=_0x1779();let _0x197451=_0x3ce1ea[_0x17795f];return _0x197451;}function _0x1779(){const _0x70e438=['\x0a(function()\x20{\x0a\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20existing\x20=\x20document.getElementById(\x27onairos-consent-overlay\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(existing)\x20existing.remove();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20overlay\x20=\x20document.createElement(\x27div\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20overlay.id\x20=\x20\x27onairos-consent-overlay\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20overlay.style.cssText\x20=\x20`\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20fixed;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20left:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20100%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20100%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background:\x20rgba(0,\x200,\x200,\x200.7);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20z-index:\x20999999;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-family:\x20-apple-system,\x20BlinkMacSystemFont,\x20\x27Segoe\x20UI\x27,\x20Roboto,\x20sans-serif;\x0a\x20\x20\x20\x20\x20\x20\x20\x20`;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20popup\x20=\x20document.createElement(\x27div\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20popup.style.cssText\x20=\x20`\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background:\x20white;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x2016px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x2032px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20max-width:\x20400px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x2090%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20box-shadow:\x200\x2020px\x2060px\x20rgba(0,\x200,\x200,\x200.3);\x0a\x20\x20\x20\x20\x20\x20\x20\x20`;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20popup.innerHTML\x20=\x20`\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22text-align:\x20center;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22font-size:\x2048px;\x20margin-bottom:\x2016px;\x22>🤖</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h2\x20style=\x22margin:\x200\x200\x2012px\x200;\x20font-size:\x2024px;\x20color:\x20#1a1a1a;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Export\x20Conversations?\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</h2>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20style=\x22margin:\x200\x200\x2024px\x200;\x20color:\x20#666;\x20font-size:\x2016px;\x20line-height:\x201.5;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Allow\x20Onairos\x20to\x20export\x20your\x20top\x2010\x20ChatGPT\x20conversations\x20for\x20analysis?\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22display:\x20flex;\x20gap:\x2012px;\x20justify-content:\x20center;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20id=\x22onairos-deny\x22\x20style=\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20flex:\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x2014px\x2024px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border:\x202px\x20solid\x20#e0e0e0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background:\x20white;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20#666;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x208px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-size:\x2016px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-weight:\x20600;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cursor:\x20pointer;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22>Deny</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20id=\x22onairos-allow\x22\x20style=\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20flex:\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x2014px\x2024px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background:\x20linear-gradient(135deg,\x20#667eea\x200%,\x20#764ba2\x20100%);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20white;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x208px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-size:\x2016px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-weight:\x20600;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cursor:\x20pointer;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22>Allow</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20`;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20overlay.appendChild(popup);\x0a\x20\x20\x20\x20\x20\x20\x20\x20document.body.appendChild(overlay);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20document.getElementById(\x27onairos-deny\x27).onclick\x20=\x20()\x20=>\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overlay.remove();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27CHATGPT_CONSENT\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20status:\x20\x27denied\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20document.getElementById(\x27onairos-allow\x27).onclick\x20=\x20()\x20=>\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20document.getElementById(\x27onairos-allow\x27).innerHTML\x20=\x20\x27⏳\x20Starting...\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20document.getElementById(\x27onairos-allow\x27).disabled\x20=\x20true;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27CHATGPT_CONSENT\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20status:\x20\x27allowed\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(()\x20=>\x20overlay.remove(),\x20500);\x0a\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20}\x20catch\x20(error)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27CHATGPT_CONSENT\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20status:\x20\x27error\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20error.message\x0a\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x20\x20\x20\x20}\x0a})();\x0atrue;\x0a','\x0a(function()\x20{\x0a\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20VERSION\x20CHECK:\x20This\x20confirms\x20new\x20code\x20is\x20running\x0a\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27🔄\x20[CHATGPT]\x20Script\x20version:\x20SDK_V1\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27DEBUG_LOG\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Script\x20version:\x20SDK_V1\x20loaded\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!document.body)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27CONVERSATION_EXPORT_ERROR\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Page\x20not\x20ready\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Use\x20chatgpt.com\x20as\x20iOS\x20does\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20baseUrl\x20=\x20\x27https://chatgpt.com\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27🚀\x20[CHATGPT]\x20Starting\x20extraction\x20(iOS-style\x20with\x20access\x20token)...\x27);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20(async\x20()\x20=>\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20STEP\x201:\x20Get\x20access\x20token\x20(matches\x20iOS\x20fetchAccessToken)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27EXPORT_PROGRESS\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20stage:\x20\x27fetching_token\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20progress:\x202,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Getting\x20access\x20token...\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27[CHATGPT]\x20Fetching\x20access\x20token\x20from\x20/api/auth/session...\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20let\x20accessToken\x20=\x20null;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20sessionResponse\x20=\x20await\x20fetch(baseUrl\x20+\x20\x27/api/auth/session\x27,\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20method:\x20\x27GET\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20credentials:\x20\x27include\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20headers:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x27Accept\x27:\x20\x27application/json\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x27Referer\x27:\x20baseUrl\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27[CHATGPT]\x20Session\x20response\x20status:\x27,\x20sessionResponse.status);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(sessionResponse.ok)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20sessionData\x20=\x20await\x20sessionResponse.json();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20accessToken\x20=\x20sessionData.accessToken;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27[CHATGPT]\x20Got\x20accessToken:\x27,\x20accessToken\x20?\x20\x27YES\x20(len=\x27\x20+\x20accessToken.length\x20+\x20\x27)\x27\x20:\x20\x27NO\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(sessionError)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.warn(\x27[CHATGPT]\x20Session\x20fetch\x20failed:\x27,\x20sessionError.message);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Build\x20headers\x20matching\x20iOS\x20exactly\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20headers\x20=\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x27Accept\x27:\x20\x27application/json\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x27Referer\x27:\x20baseUrl,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x27User-Agent\x27:\x20\x27Mozilla/5.0\x20(iPhone;\x20CPU\x20iPhone\x20OS\x2017_0\x20like\x20Mac\x20OS\x20X)\x20AppleWebKit/605.1.15\x20(KHTML,\x20like\x20Gecko)\x20Version/17.0\x20Mobile/15E148\x20Safari/604.1\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(accessToken)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20headers[\x27Authorization\x27]\x20=\x20\x27Bearer\x20\x27\x20+\x20accessToken;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20STEP\x202:\x20Start\x20BOTH\x20conversations\x20AND\x20memories\x20fetches\x20IN\x20PARALLEL\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27EXPORT_PROGRESS\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20stage:\x20\x27fetching_list\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20progress:\x205,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Fetching\x20conversations\x20and\x20memories...\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27[CHATGPT]\x20Starting\x20PARALLEL\x20fetch\x20of\x20conversations\x20AND\x20memories...\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Start\x20memories\x20fetch\x20IMMEDIATELY\x20using\x20XMLHttpRequest\x20(more\x20compatible\x20than\x20fetch)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20let\x20memoriesPromise\x20=\x20new\x20Promise((resolve)\x20=>\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20xhr\x20=\x20new\x20XMLHttpRequest();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20xhr.open(\x27GET\x27,\x20baseUrl\x20+\x20\x27/backend-api/memories?include_memory_entries=true&memory_entries_filter=all\x27,\x20true);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20xhr.withCredentials\x20=\x20true;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20xhr.setRequestHeader(\x27Accept\x27,\x20\x27application/json\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(accessToken)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20xhr.setRequestHeader(\x27Authorization\x27,\x20\x27Bearer\x20\x27\x20+\x20accessToken);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20xhr.onload\x20=\x20function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27[CHATGPT]\x20🧠\x20Memories\x20XHR\x20status:\x27,\x20xhr.status);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(xhr.status\x20>=\x20200\x20&&\x20xhr.status\x20<\x20300)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20data\x20=\x20JSON.parse(xhr.responseText);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20allKeys\x20=\x20Object.keys(data\x20||\x20{});\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27[CHATGPT]\x20🧠\x20Memories\x20response\x20keys:\x27,\x20allKeys);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20resolve(data);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(parseErr)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.warn(\x27[CHATGPT]\x20⚠️\x20Memories\x20parse\x20error:\x27,\x20parseErr.message);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20resolve(null);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.warn(\x27[CHATGPT]\x20⚠️\x20Memories\x20API\x20returned:\x27,\x20xhr.status);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20resolve(null);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20xhr.onerror\x20=\x20function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.warn(\x27[CHATGPT]\x20⚠️\x20Memories\x20XHR\x20error\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20resolve(null);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20xhr.send();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27[CHATGPT]\x20🧠\x20Memories\x20XHR\x20request\x20sent\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(xhrErr)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.warn(\x27[CHATGPT]\x20⚠️\x20Memories\x20XHR\x20exception:\x27,\x20xhrErr.message);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20resolve(null);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Start\x20conversations\x20fetch\x20(in\x20parallel\x20with\x20memories)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27[CHATGPT]\x20Fetching\x20conversations\x20with\x20auth:\x27,\x20!!accessToken);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20listResponse\x20=\x20await\x20fetch(baseUrl\x20+\x20\x27/backend-api/conversations?limit=10\x27,\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20method:\x20\x27GET\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20credentials:\x20\x27include\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20headers:\x20headers\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27[CHATGPT]\x20Conversations\x20response:\x27,\x20listResponse.status);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!listResponse.ok)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20throw\x20new\x20Error(\x27HTTP\x20\x27\x20+\x20listResponse.status\x20+\x20\x27:\x20Failed\x20to\x20fetch\x20conversations\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20listData\x20=\x20await\x20listResponse.json();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20conversations\x20=\x20listData.items\x20||\x20[];\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27[CHATGPT]\x20Found\x27,\x20conversations.length,\x20\x27conversations\x27);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(conversations.length\x20===\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Still\x20wait\x20for\x20memories\x20even\x20if\x20no\x20conversations\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27🧠\x20[CHATGPT]\x20No\x20conversations,\x20waiting\x20for\x20memories...\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20noConvMemoriesData\x20=\x20await\x20memoriesPromise;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20noConvMemoriesItemsCount\x20=\x20noConvMemoriesData?.items?.length\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20noConvMemoriesEntriesCount\x20=\x20noConvMemoriesData?.memory_entries?.length\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27CONVERSATION_EXPORT_COMPLETE\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20status:\x20\x27success\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20data:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20conversations:\x20[],\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20total_conversations:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20total_messages:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20memories:\x20noConvMemoriesData,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20memories_items_count:\x20noConvMemoriesItemsCount,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20memories_entries_count:\x20noConvMemoriesEntriesCount\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20success:\x20true,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Connected!\x20No\x20conversations\x20found.\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20STEP\x203:\x20Fetch\x20each\x20conversation\x20(matches\x20iOS\x20fetchAllConversationDetails)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27EXPORT_PROGRESS\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20progress:\x2010,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Processing\x200/\x27\x20+\x20conversations.length\x20+\x20\x27\x20conversations\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20userMessages\x20=\x20[];\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20for\x20(let\x20i\x20=\x200;\x20i\x20<\x20conversations.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20conv\x20=\x20conversations[i];\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20progressPercent\x20=\x2010\x20+\x20((i\x20/\x20conversations.length)\x20*\x2080);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27EXPORT_PROGRESS\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20stage:\x20\x27processing_conversation\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20current:\x20i\x20+\x201,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20total:\x20conversations.length,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20progress:\x20Math.round(progressPercent),\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Processing\x20\x27\x20+\x20(i\x20+\x201)\x20+\x20\x27/\x27\x20+\x20conversations.length\x20+\x20\x27\x20conversations\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20iOS\x20uses\x200.3s\x20delay\x20-\x20we\x20use\x200.3s\x20too\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(i\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20await\x20new\x20Promise(resolve\x20=>\x20setTimeout(resolve,\x20300));\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20detailResponse\x20=\x20await\x20fetch(baseUrl\x20+\x20\x27/backend-api/conversation/\x27\x20+\x20conv.id,\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20method:\x20\x27GET\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20credentials:\x20\x27include\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20headers:\x20headers\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(detailResponse.ok)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20convData\x20=\x20await\x20detailResponse.json();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20messages\x20=\x20[];\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Extract\x20user\x20messages\x20from\x20mapping\x20(same\x20as\x20iOS)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(convData.mapping)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20for\x20(const\x20nodeId\x20in\x20convData.mapping)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20node\x20=\x20convData.mapping[nodeId];\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(node.message\x20&&\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node.message.author\x20&&\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node.message.author.role\x20===\x20\x27user\x27\x20&&\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node.message.content\x20&&\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node.message.content.parts)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20for\x20(const\x20part\x20of\x20node.message.content.parts)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(typeof\x20part\x20===\x20\x27string\x27\x20&&\x20part.trim())\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20messages.push(part.trim());\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(messages.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20userMessages.push({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20conversation_id:\x20conv.id,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20title:\x20conv.title\x20||\x20\x27Untitled\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20user_messages:\x20messages\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27[CHATGPT]\x20✅\x20Conversation\x27,\x20(i\x20+\x201)\x20+\x20\x27/\x27\x20+\x20conversations.length\x20+\x20\x27:\x27,\x20conv.title,\x20\x27(\x27\x20+\x20messages.length\x20+\x20\x27\x20msgs)\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.warn(\x27[CHATGPT]\x20⚠️\x20Conversation\x27,\x20conv.id,\x20\x27returned\x27,\x20detailResponse.status);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(convError)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.warn(\x27[CHATGPT]\x20⚠️\x20Failed\x20conversation\x27,\x20conv.id\x20+\x20\x27:\x27,\x20convError.message);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20totalMessages\x20=\x20userMessages.reduce((sum,\x20c)\x20=>\x20sum\x20+\x20c.user_messages.length,\x200);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27✅\x20[CHATGPT]\x20Extraction\x20complete:\x27,\x20totalMessages,\x20\x27messages\x20from\x27,\x20userMessages.length,\x20\x27conversations\x27);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20STEP\x204:\x20Wait\x20for\x20memories\x20(started\x20in\x20parallel\x20at\x20STEP\x202)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27🧠\x20[CHATGPT]\x20Waiting\x20for\x20parallel\x20memories\x20fetch\x20to\x20complete...\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20memoriesData\x20=\x20await\x20memoriesPromise;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Check\x20all\x20possible\x20field\x20names\x20(API\x20structure\x20varies)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20memoriesItemsCount\x20=\x20memoriesData?.items?.length\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20memoriesEntriesCount\x20=\x20memoriesData?.memory_entries?.length\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20memoriesArrayCount\x20=\x20memoriesData?.memories?.length\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20totalMemoriesCount\x20=\x20memoriesItemsCount\x20+\x20memoriesEntriesCount\x20+\x20memoriesArrayCount;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27🧠\x20[CHATGPT]\x20Final\x20memories\x20result:\x27,\x20memoriesItemsCount,\x20\x27items,\x27,\x20memoriesEntriesCount,\x20\x27entries,\x27,\x20memoriesArrayCount,\x20\x27memories\x20array\x27);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Send\x20memories\x20to\x20React\x20Native\x20for\x20storage\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(memoriesData\x20&&\x20totalMemoriesCount\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27🧠\x20[CHATGPT]\x20Sending\x20memories\x20to\x20React\x20Native\x20for\x20storage...\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27MEMORIES_DATA\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20memoriesData:\x20memoriesData,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20totalMemoriesCount:\x20totalMemoriesCount\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Send\x20conversation\x20data\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27CONVERSATION_EXPORT_COMPLETE\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20status:\x20\x27success\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20data:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20conversations:\x20userMessages,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20total_conversations:\x20userMessages.length,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20total_messages:\x20totalMessages,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20memories_items_count:\x20memoriesItemsCount,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20memories_entries_count:\x20memoriesEntriesCount,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20memories_array_count:\x20memoriesArrayCount,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20total_memories_count:\x20totalMemoriesCount\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20success:\x20true\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(error)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.error(\x27❌\x20[CHATGPT]\x20Export\x20failed:\x27,\x20error.message);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27CONVERSATION_EXPORT_ERROR\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20status:\x20\x27error\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Fetch\x20failed:\x20\x27\x20+\x20error.message,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20success:\x20false\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20})();\x0a\x0a\x20\x20\x20\x20}\x20catch\x20(error)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20console.error(\x27❌\x20[CHATGPT]\x20Init\x20error:\x27,\x20error.message);\x0a\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27CONVERSATION_EXPORT_ERROR\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20status:\x20\x27error\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Script\x20error:\x20\x27\x20+\x20error.message,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20success:\x20false\x0a\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x20\x20\x20\x20}\x0a})();\x0atrue;\x0a','\x0a(function()\x20{\x0a\x20\x20\x20\x20console.log(\x27✅\x20ChatGPT\x20export\x20successful!\x27);\x0a})();\x0atrue;\x0a','\x0a(function()\x20{\x0a\x20\x20\x20\x20console.log(\x27❌\x20ChatGPT\x20export\x20failed!\x27);\x0a})();\x0atrue;\x0a','\x0a(function()\x20{\x0a\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20baseUrl\x20=\x20\x27https://chatgpt.com\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27🧠\x20[CHATGPT]\x20Starting\x20memories\x20extraction...\x27);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20(async\x20()\x20=>\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20STEP\x201:\x20Get\x20access\x20token\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27MEMORIES_PROGRESS\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20stage:\x20\x27fetching_token\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Getting\x20access\x20token...\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20let\x20accessToken\x20=\x20null;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20sessionResponse\x20=\x20await\x20fetch(baseUrl\x20+\x20\x27/api/auth/session\x27,\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20method:\x20\x27GET\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20credentials:\x20\x27include\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20headers:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x27Accept\x27:\x20\x27application/json\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x27Referer\x27:\x20baseUrl\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(sessionResponse.ok)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20sessionData\x20=\x20await\x20sessionResponse.json();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20accessToken\x20=\x20sessionData.accessToken;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(sessionError)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.warn(\x27[CHATGPT]\x20Session\x20fetch\x20failed:\x27,\x20sessionError.message);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20STEP\x202:\x20Fetch\x20memories\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27MEMORIES_PROGRESS\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20stage:\x20\x27fetching_memories\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Fetching\x20ChatGPT\x20memories...\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20headers\x20=\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x27Accept\x27:\x20\x27application/json\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x27Referer\x27:\x20baseUrl\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(accessToken)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20headers[\x27Authorization\x27]\x20=\x20\x27Bearer\x20\x27\x20+\x20accessToken;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20memoriesResponse\x20=\x20await\x20fetch(baseUrl\x20+\x20\x27/backend-api/memories?include_memory_entries=true&memory_entries_filter=all\x27,\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20method:\x20\x27GET\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20credentials:\x20\x27include\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20headers:\x20headers\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!memoriesResponse.ok)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20throw\x20new\x20Error(\x27HTTP\x20\x27\x20+\x20memoriesResponse.status\x20+\x20\x27:\x20Failed\x20to\x20fetch\x20memories\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20memoriesData\x20=\x20await\x20memoriesResponse.json();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20itemsCount\x20=\x20memoriesData.items\x20?\x20memoriesData.items.length\x20:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20entriesCount\x20=\x20memoriesData.memory_entries\x20?\x20memoriesData.memory_entries.length\x20:\x200;\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27MEMORIES_FETCH_COMPLETE\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20status:\x20\x27success\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20data:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20memoriesData:\x20memoriesData,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20itemsCount:\x20itemsCount,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20entriesCount:\x20entriesCount\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20success:\x20true\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(error)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.error(\x27❌\x20[CHATGPT]\x20Memories\x20fetch\x20failed:\x27,\x20error.message);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27MEMORIES_FETCH_ERROR\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20status:\x20\x27error\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Memories\x20fetch\x20failed:\x20\x27\x20+\x20error.message,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20success:\x20false\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20})();\x0a\x0a\x20\x20\x20\x20}\x20catch\x20(error)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20console.error(\x27❌\x20[CHATGPT]\x20Memories\x20init\x20error:\x27,\x20error.message);\x0a\x20\x20\x20\x20\x20\x20\x20\x20window.ReactNativeWebView.postMessage(JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\x27MEMORIES_FETCH_ERROR\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20status:\x20\x27error\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20message:\x20\x27Script\x20error:\x20\x27\x20+\x20error.message,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20success:\x20false\x0a\x20\x20\x20\x20\x20\x20\x20\x20}));\x0a\x20\x20\x20\x20}\x0a})();\x0atrue;\x0a'];_0x1779=function(){return _0x70e438;};return _0x1779();}export const CHATGPT_SUCCESS_SCRIPT=_0xd33f(0x2);export const CHATGPT_ERROR_SCRIPT=_0xd33f(0x3);export const CHATGPT_FETCH_MEMORIES_SCRIPT=_0xd33f(0x4);
|