@onairos/react-native 3.6.4 → 3.6.6

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.
Files changed (222) hide show
  1. package/lib/commonjs/api/index.js +1 -1
  2. package/lib/commonjs/components/BodyText.js +1 -1
  3. package/lib/commonjs/components/BrandMark.js +1 -1
  4. package/lib/commonjs/components/CodeInput.js +1 -1
  5. package/lib/commonjs/components/EmailInput.js +1 -1
  6. package/lib/commonjs/components/GoogleButton.js +1 -1
  7. package/lib/commonjs/components/HeadingGroup.js +1 -1
  8. package/lib/commonjs/components/LLMDataInputModal.js +1 -1
  9. package/lib/commonjs/components/ModalHeader.js +1 -1
  10. package/lib/commonjs/components/ModalSheet.js +1 -1
  11. package/lib/commonjs/components/Onairos.js +1 -1
  12. package/lib/commonjs/components/OnairosButton.js +1 -1
  13. package/lib/commonjs/components/OnairosSignInButton.js +1 -1
  14. package/lib/commonjs/components/Overlay.js +1 -1
  15. package/lib/commonjs/components/PersonaImage.js +1 -1
  16. package/lib/commonjs/components/PersonaLoadingScreen.js +1 -1
  17. package/lib/commonjs/components/PersonalizationConsentScreen.js +1 -1
  18. package/lib/commonjs/components/PinCreationScreen.js +1 -1
  19. package/lib/commonjs/components/PinInput.js +1 -1
  20. package/lib/commonjs/components/PlatformConnectorsStep.js +1 -1
  21. package/lib/commonjs/components/PlatformList.js +1 -1
  22. package/lib/commonjs/components/PlatformToggle.js +1 -1
  23. package/lib/commonjs/components/PrimaryButton.js +1 -1
  24. package/lib/commonjs/components/SignInMatchAnimation.js +1 -1
  25. package/lib/commonjs/components/SignInStep.js +1 -1
  26. package/lib/commonjs/components/UniversalOnboarding.js +1 -1
  27. package/lib/commonjs/components/VerificationStep.js +1 -1
  28. package/lib/commonjs/components/WelcomeScreen.js +1 -1
  29. package/lib/commonjs/components/icons/Basicproficon.js +1 -1
  30. package/lib/commonjs/components/icons/Basicprofile.js +1 -1
  31. package/lib/commonjs/components/icons/Checkbox.js +1 -1
  32. package/lib/commonjs/components/icons/Checkmark.js +1 -1
  33. package/lib/commonjs/components/icons/Contentanalysis.js +1 -1
  34. package/lib/commonjs/components/icons/Contenticon.js +1 -1
  35. package/lib/commonjs/components/icons/EnochE.js +1 -1
  36. package/lib/commonjs/components/icons/Personalityicon.js +1 -1
  37. package/lib/commonjs/components/icons/Personalityprofile.js +1 -1
  38. package/lib/commonjs/components/icons/Personalitytraits.js +1 -1
  39. package/lib/commonjs/components/icons/Userpreferences.js +1 -1
  40. package/lib/commonjs/components/icons/index.js +1 -1
  41. package/lib/commonjs/components/onboarding/OAuthWebView.js +1 -1
  42. package/lib/commonjs/components/onboarding/OnboardingHeader.js +1 -1
  43. package/lib/commonjs/components/onboarding/PinInput.js +1 -1
  44. package/lib/commonjs/components/onboarding/PlatformConnector.js +1 -1
  45. package/lib/commonjs/config/api.js +1 -1
  46. package/lib/commonjs/constants/index.js +1 -1
  47. package/lib/commonjs/context/AuthContext.js +1 -1
  48. package/lib/commonjs/hooks/useConnectedAccounts.js +1 -1
  49. package/lib/commonjs/hooks/useConnections.js +1 -1
  50. package/lib/commonjs/hooks/useCredentials.js +1 -1
  51. package/lib/commonjs/hooks/useUserConnections.js +1 -1
  52. package/lib/commonjs/index.js +1 -1
  53. package/lib/commonjs/services/apiClient.js +1 -1
  54. package/lib/commonjs/services/apiKeyService.js +924 -9
  55. package/lib/commonjs/services/authService.js +627 -10
  56. package/lib/commonjs/services/biometricPinService.js +1 -1
  57. package/lib/commonjs/services/chatGPTConversationExtractor.js +1 -1
  58. package/lib/commonjs/services/chatGPTConversationService.js +1 -1
  59. package/lib/commonjs/services/claudeConversationExtractor.js +1 -1
  60. package/lib/commonjs/services/claudeConversationService.js +1 -1
  61. package/lib/commonjs/services/connectedAccountsService.js +1 -1
  62. package/lib/commonjs/services/googleAuthService.js +1 -1
  63. package/lib/commonjs/services/hingeDataExtractor.js +1 -1
  64. package/lib/commonjs/services/hingeDataService.js +1 -1
  65. package/lib/commonjs/services/imageCompressionService.js +1 -1
  66. package/lib/commonjs/services/instagramDataExtractor.js +1 -1
  67. package/lib/commonjs/services/instagramDataService.js +1 -1
  68. package/lib/commonjs/services/jwtStorageService.js +1 -1
  69. package/lib/commonjs/services/linkedinDOMExtractor.js +1 -1
  70. package/lib/commonjs/services/linkedinProfileService.js +1 -1
  71. package/lib/commonjs/services/linkedinScrapingService.js +1 -1
  72. package/lib/commonjs/services/llmDataStorage.js +1 -1
  73. package/lib/commonjs/services/mobileTrainingService.js +1 -1
  74. package/lib/commonjs/services/oauthService.js +391 -11
  75. package/lib/commonjs/services/pinEncryptionService.js +1 -1
  76. package/lib/commonjs/services/pinStorageUtils.js +1 -1
  77. package/lib/commonjs/services/platformAuthService.js +1 -1
  78. package/lib/commonjs/services/sephoraDataExtractor.js +1 -1
  79. package/lib/commonjs/services/sephoraDataService.js +1 -1
  80. package/lib/commonjs/services/storageService.js +1 -1
  81. package/lib/commonjs/services/telegramDataExtractor.js +1 -1
  82. package/lib/commonjs/services/telegramDataService.js +1 -1
  83. package/lib/commonjs/services/trainingApiHelpers.js +1 -1
  84. package/lib/commonjs/services/userConnectionsService.js +1 -1
  85. package/lib/commonjs/services/youtubeMigrationService.js +1 -1
  86. package/lib/commonjs/theme/index.js +1 -1
  87. package/lib/commonjs/types/index.js +1 -1
  88. package/lib/commonjs/types.js +1 -1
  89. package/lib/commonjs/utils/Portal.js +1 -1
  90. package/lib/commonjs/utils/api.js +1 -1
  91. package/lib/commonjs/utils/assetRegistry.js +1 -1
  92. package/lib/commonjs/utils/auth.js +1 -1
  93. package/lib/commonjs/utils/connectorTests.js +1 -1
  94. package/lib/commonjs/utils/crypto.js +1 -1
  95. package/lib/commonjs/utils/debugHelper.js +1 -1
  96. package/lib/commonjs/utils/encryption.js +1 -1
  97. package/lib/commonjs/utils/eventUtils.js +1 -1
  98. package/lib/commonjs/utils/haptics.js +1 -1
  99. package/lib/commonjs/utils/imagePreloader.js +1 -1
  100. package/lib/commonjs/utils/networkDiagnostics.js +1 -1
  101. package/lib/commonjs/utils/onairosApi.js +1 -1
  102. package/lib/commonjs/utils/programmaticFlow.js +1 -1
  103. package/lib/commonjs/utils/retryHelper.js +1 -1
  104. package/lib/commonjs/utils/secureStorage.js +1 -1
  105. package/lib/commonjs/utils/webviewScripts/chatgpt.js +1 -1
  106. package/lib/commonjs/utils/webviewScripts/claude.js +1 -1
  107. package/lib/commonjs/utils/webviewScripts/hinge.js +1 -1
  108. package/lib/commonjs/utils/webviewScripts/index.js +1 -1
  109. package/lib/commonjs/utils/webviewScripts/instagram.js +1 -1
  110. package/lib/commonjs/utils/webviewScripts/linkedin.js +1 -1
  111. package/lib/commonjs/utils/webviewScripts/sephora.js +1 -1
  112. package/lib/commonjs/utils/webviewScripts/telegram.js +1 -1
  113. package/lib/module/api/index.js +1 -1
  114. package/lib/module/components/BodyText.js +1 -1
  115. package/lib/module/components/BrandMark.js +1 -1
  116. package/lib/module/components/CodeInput.js +1 -1
  117. package/lib/module/components/EmailInput.js +1 -1
  118. package/lib/module/components/GoogleButton.js +1 -1
  119. package/lib/module/components/HeadingGroup.js +1 -1
  120. package/lib/module/components/LLMDataInputModal.js +1 -1
  121. package/lib/module/components/ModalHeader.js +1 -1
  122. package/lib/module/components/ModalSheet.js +1 -1
  123. package/lib/module/components/Onairos.js +1 -1
  124. package/lib/module/components/OnairosButton.js +1 -1
  125. package/lib/module/components/OnairosSignInButton.js +1 -1
  126. package/lib/module/components/Overlay.js +1 -1
  127. package/lib/module/components/PersonaImage.js +1 -1
  128. package/lib/module/components/PersonaLoadingScreen.js +1 -1
  129. package/lib/module/components/PersonalizationConsentScreen.js +1 -1
  130. package/lib/module/components/PinCreationScreen.js +1 -1
  131. package/lib/module/components/PinInput.js +1 -1
  132. package/lib/module/components/PlatformConnectorsStep.js +1 -1
  133. package/lib/module/components/PlatformList.js +1 -1
  134. package/lib/module/components/PlatformToggle.js +1 -1
  135. package/lib/module/components/PrimaryButton.js +1 -1
  136. package/lib/module/components/SignInMatchAnimation.js +1 -1
  137. package/lib/module/components/SignInStep.js +1 -1
  138. package/lib/module/components/UniversalOnboarding.js +1 -1
  139. package/lib/module/components/VerificationStep.js +1 -1
  140. package/lib/module/components/WelcomeScreen.js +1 -1
  141. package/lib/module/components/icons/Basicproficon.js +1 -1
  142. package/lib/module/components/icons/Basicprofile.js +1 -1
  143. package/lib/module/components/icons/Checkbox.js +1 -1
  144. package/lib/module/components/icons/Checkmark.js +1 -1
  145. package/lib/module/components/icons/Contentanalysis.js +1 -1
  146. package/lib/module/components/icons/Contenticon.js +1 -1
  147. package/lib/module/components/icons/EnochE.js +1 -1
  148. package/lib/module/components/icons/Personalityicon.js +1 -1
  149. package/lib/module/components/icons/Personalityprofile.js +1 -1
  150. package/lib/module/components/icons/Personalitytraits.js +1 -1
  151. package/lib/module/components/icons/Userpreferences.js +1 -1
  152. package/lib/module/components/onboarding/OAuthWebView.js +1 -1
  153. package/lib/module/components/onboarding/OnboardingHeader.js +1 -1
  154. package/lib/module/components/onboarding/PinInput.js +1 -1
  155. package/lib/module/components/onboarding/PlatformConnector.js +1 -1
  156. package/lib/module/config/api.js +1 -1
  157. package/lib/module/constants/index.js +1 -1
  158. package/lib/module/context/AuthContext.js +1 -1
  159. package/lib/module/hooks/useConnectedAccounts.js +1 -1
  160. package/lib/module/hooks/useConnections.js +1 -1
  161. package/lib/module/hooks/useCredentials.js +1 -1
  162. package/lib/module/hooks/useUserConnections.js +1 -1
  163. package/lib/module/index.js +1 -1
  164. package/lib/module/services/apiClient.js +1 -1
  165. package/lib/module/services/apiKeyService.js +898 -1
  166. package/lib/module/services/authService.js +602 -1
  167. package/lib/module/services/biometricPinService.js +1 -1
  168. package/lib/module/services/chatGPTConversationExtractor.js +1 -1
  169. package/lib/module/services/chatGPTConversationService.js +1 -1
  170. package/lib/module/services/claudeConversationExtractor.js +1 -1
  171. package/lib/module/services/claudeConversationService.js +1 -1
  172. package/lib/module/services/connectedAccountsService.js +1 -1
  173. package/lib/module/services/googleAuthService.js +1 -1
  174. package/lib/module/services/hingeDataExtractor.js +1 -1
  175. package/lib/module/services/hingeDataService.js +1 -1
  176. package/lib/module/services/imageCompressionService.js +1 -1
  177. package/lib/module/services/instagramDataExtractor.js +1 -1
  178. package/lib/module/services/instagramDataService.js +1 -1
  179. package/lib/module/services/jwtStorageService.js +1 -1
  180. package/lib/module/services/linkedinDOMExtractor.js +1 -1
  181. package/lib/module/services/linkedinProfileService.js +1 -1
  182. package/lib/module/services/linkedinScrapingService.js +1 -1
  183. package/lib/module/services/llmDataStorage.js +1 -1
  184. package/lib/module/services/mobileTrainingService.js +1 -1
  185. package/lib/module/services/oauthService.js +381 -1
  186. package/lib/module/services/pinEncryptionService.js +1 -1
  187. package/lib/module/services/pinStorageUtils.js +1 -1
  188. package/lib/module/services/platformAuthService.js +1 -1
  189. package/lib/module/services/sephoraDataExtractor.js +1 -1
  190. package/lib/module/services/sephoraDataService.js +1 -1
  191. package/lib/module/services/storageService.js +1 -1
  192. package/lib/module/services/telegramDataExtractor.js +1 -1
  193. package/lib/module/services/telegramDataService.js +1 -1
  194. package/lib/module/services/trainingApiHelpers.js +1 -1
  195. package/lib/module/services/userConnectionsService.js +1 -1
  196. package/lib/module/services/youtubeMigrationService.js +1 -1
  197. package/lib/module/theme/index.js +1 -1
  198. package/lib/module/types.js +1 -1
  199. package/lib/module/utils/Portal.js +1 -1
  200. package/lib/module/utils/api.js +1 -1
  201. package/lib/module/utils/assetRegistry.js +1 -1
  202. package/lib/module/utils/auth.js +1 -1
  203. package/lib/module/utils/connectorTests.js +1 -1
  204. package/lib/module/utils/crypto.js +1 -1
  205. package/lib/module/utils/debugHelper.js +1 -1
  206. package/lib/module/utils/encryption.js +1 -1
  207. package/lib/module/utils/eventUtils.js +1 -1
  208. package/lib/module/utils/haptics.js +1 -1
  209. package/lib/module/utils/networkDiagnostics.js +1 -1
  210. package/lib/module/utils/onairosApi.js +1 -1
  211. package/lib/module/utils/programmaticFlow.js +1 -1
  212. package/lib/module/utils/retryHelper.js +1 -1
  213. package/lib/module/utils/secureStorage.js +1 -1
  214. package/lib/module/utils/webviewScripts/chatgpt.js +1 -1
  215. package/lib/module/utils/webviewScripts/claude.js +1 -1
  216. package/lib/module/utils/webviewScripts/hinge.js +1 -1
  217. package/lib/module/utils/webviewScripts/index.js +1 -1
  218. package/lib/module/utils/webviewScripts/instagram.js +1 -1
  219. package/lib/module/utils/webviewScripts/linkedin.js +1 -1
  220. package/lib/module/utils/webviewScripts/sephora.js +1 -1
  221. package/lib/module/utils/webviewScripts/telegram.js +1 -1
  222. package/package.json +1 -1
@@ -1 +1 @@
1
- import AsyncStorage from'@react-native-async-storage/async-storage';import{API_CONFIG}from'../config/api';const LLM_DATA_STORAGE_KEY='@onairos:llm_data',LLM_METADATA_STORAGE_KEY=_0x3430(0x0);export const storeLLMData=async _0xc49402=>{const _0x318cd8={'fKpAw':_0x3430(0x1),'EOUGb':_0x3430(0x2)};try{console['log'](_0x3430(0x3)),await AsyncStorage[_0x3430(0x4)](LLM_DATA_STORAGE_KEY+':'+_0xc49402[_0x3430(0x5)],JSON[_0x3430(0x6)](_0xc49402));const _0x1a84d4={'userId':_0xc49402[_0x3430(0x5)],'email':_0xc49402['email'],'appName':_0xc49402[_0x3430(0x7)],'timestamp':_0xc49402['timestamp'],'hasData':!![],'dataSize':JSON[_0x3430(0x6)](_0xc49402[_0x3430(0x8)])[_0x3430(0x9)],'connectionStatus':'connected'};return await AsyncStorage['setItem'](LLM_METADATA_STORAGE_KEY+':'+_0xc49402[_0x3430(0x5)],JSON[_0x3430(0x6)](_0x1a84d4)),console['log'](_0x318cd8['fKpAw']),console[_0x3430(0xa)](_0x3430(0xb)+_0x1a84d4[_0x3430(0xc)]+_0x3430(0xd)),!![];}catch(_0x18e875){return console[_0x3430(0xe)](_0x318cd8['EOUGb'],_0x18e875),![];}};export const getLLMData=async _0x300507=>{const _0x251430={'WUeVb':_0x3430(0xf),'hcwSt':'DMyOc','NOqkg':_0x3430(0x10),'PORdO':_0x3430(0x11)};try{if(_0x251430[_0x3430(0x12)]===_0x3430(0x13))return _0x1d3c5f['error'](_0x251430[_0x3430(0x14)],_0x6a8e32),![];else{const _0x1088ff=await AsyncStorage[_0x3430(0x15)](LLM_DATA_STORAGE_KEY+':'+_0x300507);if(!_0x1088ff)return console['log'](_0x251430[_0x3430(0x16)],_0x300507),null;const _0x5181bf=JSON[_0x3430(0x17)](_0x1088ff);return console[_0x3430(0xa)](_0x3430(0x18),_0x300507),_0x5181bf;}}catch(_0x239192){return console[_0x3430(0xe)](_0x251430[_0x3430(0x19)],_0x239192),null;}};export const getLLMMetadata=async _0x463ae3=>{const _0x1e0e7c={'XmcPB':function(_0x252924,_0x4b177e){return _0x252924!==_0x4b177e;},'yTDQq':_0x3430(0x1a),'McgGO':'❌\x20Failed\x20to\x20retrieve\x20LLM\x20metadata:'};try{const _0x398c24=await AsyncStorage[_0x3430(0x15)](LLM_METADATA_STORAGE_KEY+':'+_0x463ae3);if(!_0x398c24)return null;return JSON[_0x3430(0x17)](_0x398c24);}catch(_0x2f8a16){return _0x1e0e7c[_0x3430(0x1b)]('jKyhX',_0x1e0e7c[_0x3430(0x1c)])?(console[_0x3430(0xe)](_0x1e0e7c['McgGO'],_0x2f8a16),null):null;}};export const updateLLMStatus=async(_0x124aa8,_0x17c987)=>{const _0x578802={'uHEBj':_0x3430(0x10),'nAAWu':function(_0xf53e94,_0x4b4256){return _0xf53e94!==_0x4b4256;},'zeEKJ':'cNQed','HrRVd':_0x3430(0x1d),'WhtvI':_0x3430(0x1e)};try{if(_0x578802[_0x3430(0x1f)](_0x578802['zeEKJ'],_0x578802[_0x3430(0x20)])){const _0x1ce022=await getLLMMetadata(_0x124aa8);if(!_0x1ce022)return console[_0x3430(0x21)](_0x578802['WhtvI'],_0x124aa8),![];return _0x1ce022[_0x3430(0x22)]=_0x17c987,await AsyncStorage[_0x3430(0x4)](LLM_METADATA_STORAGE_KEY+':'+_0x124aa8,JSON[_0x3430(0x6)](_0x1ce022)),console[_0x3430(0xa)](_0x3430(0x23)+_0x17c987),!![];}else return _0x2ed0a4['log'](_0x578802['uHEBj'],_0x4604f4),null;}catch(_0x1fa286){return console[_0x3430(0xe)](_0x3430(0x24),_0x1fa286),![];}};export const clearLLMData=async _0x1a9ee9=>{const _0x36acd9={'CLiGI':function(_0x3a27a2,_0x5c7144){return _0x3a27a2===_0x5c7144;},'JeiTY':_0x3430(0x25),'RQgob':'✅\x20LLM\x20data\x20cleared\x20for\x20user:','aDXgf':_0x3430(0xf)};try{return _0x36acd9['CLiGI']('MZlbm',_0x36acd9[_0x3430(0x26)])?(_0x5157d8[_0x3430(0xe)](_0x3430(0x2),_0x27da6f),![]):(await AsyncStorage['removeItem'](LLM_DATA_STORAGE_KEY+':'+_0x1a9ee9),await AsyncStorage[_0x3430(0x27)](LLM_METADATA_STORAGE_KEY+':'+_0x1a9ee9),console[_0x3430(0xa)](_0x36acd9['RQgob'],_0x1a9ee9),!![]);}catch(_0x7b27e5){return console[_0x3430(0xe)](_0x36acd9[_0x3430(0x28)],_0x7b27e5),![];}};export const hasOnlyLLMConnection=_0x560c86=>{const _0x201183={'jgCfp':_0x3430(0x29),'CkGDf':_0x3430(0x2a),'RDjXq':_0x3430(0x2b)},_0x1a37d7=Object['entries'](_0x560c86)[_0x3430(0x2c)](([_0x21291d,_0x490184])=>_0x490184)[_0x3430(0x2d)](([_0x3e0520,_0x4862cd])=>_0x3e0520),_0x58387e=_0x1a37d7[_0x3430(0x2e)](_0x201183['jgCfp'])||_0x1a37d7[_0x3430(0x2e)](_0x201183[_0x3430(0x2f)]),_0x2d3636=_0x1a37d7[_0x3430(0x9)]===0x1&&_0x58387e;return console[_0x3430(0xa)](_0x201183[_0x3430(0x30)],{'connectedPlatforms':_0x1a37d7,'hasLLM':_0x58387e,'onlyLLM':_0x2d3636}),_0x2d3636;};export const formatLLMDataForDeveloper=_0x5478d6=>{const _0x156019={'pZvth':'chatgpt','irLeP':_0x3430(0x31)};return{'platform':_0x3430(0x29),'userId':_0x5478d6['userId'],'email':_0x5478d6['email'],'timestamp':_0x5478d6[_0x3430(0x32)],'data':{'type':_0x156019[_0x3430(0x33)],'conversations':_0x5478d6['data'][_0x3430(0x34)]||[],'chatHistory':_0x5478d6[_0x3430(0x8)]['chatHistory']||[],'preferences':_0x5478d6[_0x3430(0x8)][_0x3430(0x35)]||{},'customData':_0x5478d6[_0x3430(0x8)][_0x3430(0x36)]||{}},'metadata':{'appName':_0x5478d6[_0x3430(0x7)],'collectedAt':new Date(_0x5478d6['timestamp'])[_0x3430(0x37)](),'dataVersion':_0x156019[_0x3430(0x38)]}};};export const sendLLMDataToBackend=async(_0x48fdc9,_0x328561)=>{const _0x537b26={'wnfmN':_0x3430(0x39),'zluFB':function(_0x3314a1,_0xf6a7e,_0x2d9bc8){return _0x3314a1(_0xf6a7e,_0x2d9bc8);},'EIHuM':function(_0x5b7494,_0x6701dd){return _0x5b7494&&_0x6701dd;},'xMKpS':_0x3430(0x29),'DYsVt':_0x3430(0x2a),'JLkwm':_0x3430(0x31),'OZXJP':'✅\x20Backend\x20received\x20and\x20stored\x20LLM\x20data:','YbruY':_0x3430(0x3a),'sCDgo':_0x3430(0x3b),'IeHHl':function(_0x4c1402,_0x54467b){return _0x4c1402 instanceof _0x54467b;},'eFnFj':_0x3430(0x3c)};try{console[_0x3430(0xa)](_0x537b26['wnfmN']);const _0x3d0246=await _0x537b26['zluFB'](fetch,API_CONFIG[_0x3430(0x3d)]+_0x3430(0x3e),{'method':'POST','headers':{'Content-Type':'application/json',..._0x537b26[_0x3430(0x3f)](_0x328561,{'Authorization':_0x3430(0x40)+_0x328561})},'body':JSON[_0x3430(0x6)]({'userId':_0x48fdc9[_0x3430(0x5)],'email':_0x48fdc9[_0x3430(0x41)],'appName':_0x48fdc9[_0x3430(0x7)],'platform':_0x537b26['xMKpS'],'connectionType':_0x537b26[_0x3430(0x42)],'timestamp':new Date()['toISOString'](),'data':_0x48fdc9['data'],'accessToken':_0x48fdc9[_0x3430(0x43)],'refreshToken':_0x48fdc9['refreshToken'],'tokenExpiry':_0x48fdc9[_0x3430(0x44)],'metadata':{'collectedAt':new Date(_0x48fdc9[_0x3430(0x32)])[_0x3430(0x37)](),'dataVersion':_0x537b26['JLkwm']}})});if(_0x3d0246['ok']){const _0x386a7b=await _0x3d0246['json']();return console['log'](_0x537b26[_0x3430(0x45)],_0x386a7b),{'success':!![],'message':_0x386a7b[_0x3430(0x46)],'connectionId':_0x386a7b[_0x3430(0x47)]};}else{const _0x492168=await _0x3d0246[_0x3430(0x48)]();return console['error'](_0x537b26[_0x3430(0x49)],_0x3d0246[_0x3430(0x4a)],_0x492168),{'success':![],'message':_0x3430(0x4b)+_0x3d0246[_0x3430(0x4a)]};}}catch(_0x507d90){return console[_0x3430(0xe)](_0x537b26[_0x3430(0x4c)],_0x507d90),{'success':![],'message':_0x537b26['IeHHl'](_0x507d90,Error)?_0x507d90['message']:_0x537b26[_0x3430(0x4d)]};}};export const requestLLMDataForDeveloper=async(_0x2ed417,_0x2cd1e3,_0xc5196b,_0x1b7407,_0x2b9818)=>{const _0x57b644={'OiFoo':_0x3430(0x3c),'VaXUR':_0x3430(0x4e),'wCvqd':'✅\x20Backend\x20processing\x20LLM\x20data\x20request:','htWMB':_0x3430(0x4f),'lTAkb':_0x3430(0x50),'mUhGL':_0x3430(0x51),'MZFWs':_0x3430(0x52)};try{console[_0x3430(0xa)](_0x57b644[_0x3430(0x53)]);const _0x33daf2=await fetch(API_CONFIG['BASE_URL']+_0x3430(0x54),{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2b9818},'body':JSON[_0x3430(0x6)]({'userId':_0x2ed417,'email':_0x2cd1e3,'appName':_0xc5196b,'requestedData':_0x1b7407,'timestamp':new Date()[_0x3430(0x37)]()})});if(_0x33daf2['ok']){const _0xb7bb72=await _0x33daf2['json']();return console[_0x3430(0xa)](_0x57b644[_0x3430(0x55)],_0xb7bb72),{'success':!![],'message':_0xb7bb72['message'],'apiUrl':_0xb7bb72['apiUrl'],'token':_0xb7bb72['token']};}else{const _0x480a02=await _0x33daf2[_0x3430(0x48)]();return console[_0x3430(0xe)](_0x57b644['htWMB'],_0x33daf2[_0x3430(0x4a)],_0x480a02),{'success':![],'message':_0x3430(0x4b)+_0x33daf2[_0x3430(0x4a)]};}}catch(_0x373310){return _0x57b644[_0x3430(0x56)]===_0x57b644['mUhGL']?(_0x577c70[_0x3430(0xe)](_0x3430(0x52),_0x50afc7),{'success':![],'message':_0x5492d9 instanceof _0x5a31ab?_0x3d5a81[_0x3430(0x46)]:_0x57b644[_0x3430(0x57)]}):(console[_0x3430(0xe)](_0x57b644[_0x3430(0x58)],_0x373310),{'success':![],'message':_0x373310 instanceof Error?_0x373310[_0x3430(0x46)]:_0x57b644[_0x3430(0x57)]});}};function _0x3430(_0x3bc802,_0x343074){_0x3bc802=_0x3bc802-0x0;const _0x145fc8=_0x3bc8();let _0x49119a=_0x145fc8[_0x3bc802];return _0x49119a;}function _0x3bc8(){const _0x55f732=['@onairos:llm_metadata','✅\x20LLM\x20data\x20stored\x20locally\x20successfully','❌\x20Failed\x20to\x20store\x20LLM\x20data:','💾\x20Storing\x20LLM\x20data\x20locally\x20(temporary)...','setItem','userId','stringify','appName','data','length','log','📊\x20Data\x20size:\x20','dataSize','\x20bytes','error','❌\x20Failed\x20to\x20clear\x20LLM\x20data:','ℹ️\x20No\x20LLM\x20data\x20found\x20for\x20user:','❌\x20Failed\x20to\x20retrieve\x20LLM\x20data:','hcwSt','SvUym','WUeVb','getItem','NOqkg','parse','✅\x20Retrieved\x20LLM\x20data\x20for\x20user:','PORdO','cLbkQ','XmcPB','yTDQq','oKOGN','⚠️\x20No\x20LLM\x20metadata\x20found\x20for\x20user:','nAAWu','HrRVd','warn','connectionStatus','✅\x20Updated\x20LLM\x20status\x20to:\x20','❌\x20Failed\x20to\x20update\x20LLM\x20status:','SANqR','JeiTY','removeItem','aDXgf','llm','chatgpt','🔍\x20Platform\x20connection\x20check:','filter','map','includes','CkGDf','RDjXq','1.0','timestamp','pZvth','conversations','preferences','customData','toISOString','irLeP','📡\x20Sending\x20LLM\x20data\x20to\x20backend\x20for\x20processing...','❌\x20Backend\x20data\x20ingestion\x20failed:','❌\x20Failed\x20to\x20send\x20data\x20to\x20backend:','Unknown\x20error','BASE_URL','/llmdata','EIHuM','Bearer\x20','email','DYsVt','accessToken','tokenExpiry','OZXJP','message','connectionId','text','YbruY','status','Backend\x20error:\x20','sCDgo','eFnFj','📤\x20Requesting\x20backend\x20to\x20send\x20LLM\x20data\x20to\x20developer...','❌\x20Failed\x20to\x20request\x20LLM\x20data:','DnMTh','pglcu','❌\x20Failed\x20to\x20request\x20LLM\x20data\x20from\x20backend:','VaXUR','/llmdata/request','wCvqd','lTAkb','OiFoo','MZFWs','KuDKi','XCAvl','getAllKeys','startsWith','gfSSR'];_0x3bc8=function(){return _0x55f732;};return _0x3bc8();}export const getAllLLMDataKeys=async()=>{const _0x364f9f={'QoZZr':_0x3430(0x24),'KuDKi':function(_0x3bd1e8,_0x4370ba){return _0x3bd1e8!==_0x4370ba;},'gfSSR':'❌\x20Failed\x20to\x20get\x20LLM\x20data\x20keys:'};try{if(_0x364f9f[_0x3430(0x59)](_0x3430(0x5a),'kIGWq')){const _0x253b98=await AsyncStorage[_0x3430(0x5b)](),_0x401c47=_0x253b98[_0x3430(0x2c)](_0xc206a1=>_0xc206a1[_0x3430(0x5c)](LLM_DATA_STORAGE_KEY)||_0xc206a1['startsWith'](LLM_METADATA_STORAGE_KEY));return _0x401c47;}else return _0x8de0e1[_0x3430(0xe)](_0x364f9f['QoZZr'],_0x12a1cb),![];}catch(_0x4913a0){return console[_0x3430(0xe)](_0x364f9f[_0x3430(0x5d)],_0x4913a0),[];}};
1
+ import AsyncStorage from'@react-native-async-storage/async-storage';import{API_CONFIG}from'../config/api';const LLM_DATA_STORAGE_KEY='@onairos:llm_data',LLM_METADATA_STORAGE_KEY='@onairos:llm_metadata';export const storeLLMData=async _0x24b20d=>{const _0x218673={'rksGx':function(_0x5941c6,_0x4a01b4){return _0x5941c6!==_0x4a01b4;},'WPuJJ':_0xd091(0x0),'bmVYy':_0xd091(0x1),'nPnpI':_0xd091(0x2)};try{if(_0x218673[_0xd091(0x3)](_0x218673[_0xd091(0x4)],_0x218673[_0xd091(0x5)])){console[_0xd091(0x6)](_0x218673[_0xd091(0x7)]),await AsyncStorage[_0xd091(0x8)](LLM_DATA_STORAGE_KEY+':'+_0x24b20d[_0xd091(0x9)],JSON['stringify'](_0x24b20d));const _0x4e2bbc={'userId':_0x24b20d[_0xd091(0x9)],'email':_0x24b20d[_0xd091(0xa)],'appName':_0x24b20d[_0xd091(0xb)],'timestamp':_0x24b20d[_0xd091(0xc)],'hasData':!![],'dataSize':JSON[_0xd091(0xd)](_0x24b20d[_0xd091(0xe)])[_0xd091(0xf)],'connectionStatus':'connected'};return await AsyncStorage['setItem'](LLM_METADATA_STORAGE_KEY+':'+_0x24b20d[_0xd091(0x9)],JSON['stringify'](_0x4e2bbc)),console[_0xd091(0x6)](_0xd091(0x10)),console['log'](_0xd091(0x11)+_0x4e2bbc[_0xd091(0x12)]+'\x20bytes'),!![];}else return _0x188916[_0xd091(0x13)](_0xd091(0x14),_0x397692),![];}catch(_0x1d2b04){return console[_0xd091(0x13)](_0xd091(0x15),_0x1d2b04),![];}};export const getLLMData=async _0x5ad403=>{const _0x112b3e={'BNqBw':_0xd091(0x16),'nSVFR':_0xd091(0x17)};try{const _0x27f394=await AsyncStorage[_0xd091(0x18)](LLM_DATA_STORAGE_KEY+':'+_0x5ad403);if(!_0x27f394)return console[_0xd091(0x6)](_0x112b3e['BNqBw'],_0x5ad403),null;const _0x17beb2=JSON[_0xd091(0x19)](_0x27f394);return console[_0xd091(0x6)]('✅\x20Retrieved\x20LLM\x20data\x20for\x20user:',_0x5ad403),_0x17beb2;}catch(_0x562af7){return console['error'](_0x112b3e[_0xd091(0x1a)],_0x562af7),null;}};export const getLLMMetadata=async _0x210e0c=>{const _0x2e61db={'NmmbY':_0xd091(0x1b)};try{const _0x17a240=await AsyncStorage[_0xd091(0x18)](LLM_METADATA_STORAGE_KEY+':'+_0x210e0c);if(!_0x17a240)return null;return JSON[_0xd091(0x19)](_0x17a240);}catch(_0x312cdd){return console[_0xd091(0x13)](_0x2e61db['NmmbY'],_0x312cdd),null;}};export const updateLLMStatus=async(_0x4bef85,_0x5872b4)=>{const _0x58d42e={'AFUzN':function(_0x1fea34,_0x464d4f){return _0x1fea34!==_0x464d4f;},'FaVZm':'RidRq','ZPZpe':function(_0x1e2651,_0x130d12){return _0x1e2651(_0x130d12);},'oCkKp':'⚠️\x20No\x20LLM\x20metadata\x20found\x20for\x20user:'};try{if(_0x58d42e[_0xd091(0x1c)](_0x58d42e[_0xd091(0x1d)],_0x58d42e[_0xd091(0x1d)]))return null;else{const _0x3c3dda=await _0x58d42e[_0xd091(0x1e)](getLLMMetadata,_0x4bef85);if(!_0x3c3dda)return console[_0xd091(0x1f)](_0x58d42e[_0xd091(0x20)],_0x4bef85),![];return _0x3c3dda[_0xd091(0x21)]=_0x5872b4,await AsyncStorage['setItem'](LLM_METADATA_STORAGE_KEY+':'+_0x4bef85,JSON[_0xd091(0xd)](_0x3c3dda)),console[_0xd091(0x6)](_0xd091(0x22)+_0x5872b4),!![];}}catch(_0x3a710a){return console[_0xd091(0x13)]('❌\x20Failed\x20to\x20update\x20LLM\x20status:',_0x3a710a),![];}};export const clearLLMData=async _0x407196=>{const _0x368999={'NPEPp':'❌\x20Failed\x20to\x20store\x20LLM\x20data:','noboh':_0xd091(0x23),'WBKUZ':function(_0x2cf960,_0x3dc556){return _0x2cf960!==_0x3dc556;},'HWEYu':_0xd091(0x24),'XTWch':_0xd091(0x25),'ZhsNj':_0xd091(0x26),'sOUHg':_0xd091(0x27),'KRGiJ':_0xd091(0x14)};try{return _0x368999[_0xd091(0x28)](_0x368999[_0xd091(0x29)],_0x368999[_0xd091(0x29)])?(_0x528be6[_0xd091(0x13)](_0x368999[_0xd091(0x2a)],_0x583f2a),![]):(await AsyncStorage[_0xd091(0x2b)](LLM_DATA_STORAGE_KEY+':'+_0x407196),await AsyncStorage[_0xd091(0x2b)](LLM_METADATA_STORAGE_KEY+':'+_0x407196),console[_0xd091(0x6)](_0x368999[_0xd091(0x2c)],_0x407196),!![]);}catch(_0x196d82){return _0x368999['ZhsNj']!==_0x368999['sOUHg']?(console['error'](_0x368999[_0xd091(0x2d)],_0x196d82),![]):(_0x2f276d[_0xd091(0x1f)](_0x368999[_0xd091(0x2e)],_0x33713f),![]);}};function _0x1661(){const _0x1ef653=['nyJYl','dUQVh','💾\x20Storing\x20LLM\x20data\x20locally\x20(temporary)...','rksGx','WPuJJ','bmVYy','log','nPnpI','setItem','userId','email','appName','timestamp','stringify','data','length','✅\x20LLM\x20data\x20stored\x20locally\x20successfully','📊\x20Data\x20size:\x20','dataSize','error','❌\x20Failed\x20to\x20clear\x20LLM\x20data:','❌\x20Failed\x20to\x20store\x20LLM\x20data:','ℹ️\x20No\x20LLM\x20data\x20found\x20for\x20user:','❌\x20Failed\x20to\x20retrieve\x20LLM\x20data:','getItem','parse','nSVFR','❌\x20Failed\x20to\x20retrieve\x20LLM\x20metadata:','AFUzN','FaVZm','ZPZpe','warn','oCkKp','connectionStatus','✅\x20Updated\x20LLM\x20status\x20to:\x20','⚠️\x20No\x20LLM\x20metadata\x20found\x20for\x20user:','gjbxb','✅\x20LLM\x20data\x20cleared\x20for\x20user:','cZJnV','AHyzh','WBKUZ','HWEYu','NPEPp','removeItem','XTWch','KRGiJ','noboh','🔍\x20Platform\x20connection\x20check:','entries','includes','llm','vqdvN','chatgpt','DzJlr','DexCJ','conversations','preferences','customData','toISOString','nvDCZ','📡\x20Sending\x20LLM\x20data\x20to\x20backend\x20for\x20processing...','1.0','❌\x20Failed\x20to\x20send\x20data\x20to\x20backend:','XTamW','BASE_URL','/llmdata','JIsLU','CUcSm','YlvDM','accessToken','refreshToken','TmNWy','message','connectionId','qDZii','status','ZKCAl','QWmHd','JonHH','📤\x20Requesting\x20backend\x20to\x20send\x20LLM\x20data\x20to\x20developer...','✅\x20Backend\x20processing\x20LLM\x20data\x20request:','cWgXl','❌\x20Failed\x20to\x20request\x20LLM\x20data\x20from\x20backend:','Unknown\x20error','BRyIp','naSCW','/llmdata/request','Bearer\x20','json','hqNYw','apiUrl','token','text','Backend\x20error:\x20','EygBx','pHDOs','zFanE','TFYlR','xciqi','oBnIV','❌\x20Failed\x20to\x20get\x20LLM\x20data\x20keys:','TsIdr','gNBOx','filter','bLOFq','HIZMZ','xaivt','xBVFO','DWqDS','chatHistory','JyCiq','mYPzH'];_0x1661=function(){return _0x1ef653;};return _0x1661();}export const hasOnlyLLMConnection=_0x1db019=>{const _0x21991b={'hlLND':'chatgpt','vqdvN':function(_0x5be622,_0x4942a1){return _0x5be622===_0x4942a1;},'sboTA':_0xd091(0x2f)},_0x473861=Object[_0xd091(0x30)](_0x1db019)['filter'](([_0x3625c4,_0x104dd3])=>_0x104dd3)['map'](([_0xd59570,_0x45e13d])=>_0xd59570),_0x2dfeb6=_0x473861[_0xd091(0x31)](_0xd091(0x32))||_0x473861['includes'](_0x21991b['hlLND']),_0x5f12e9=_0x21991b[_0xd091(0x33)](_0x473861[_0xd091(0xf)],0x1)&&_0x2dfeb6;return console[_0xd091(0x6)](_0x21991b['sboTA'],{'connectedPlatforms':_0x473861,'hasLLM':_0x2dfeb6,'onlyLLM':_0x5f12e9}),_0x5f12e9;};export const formatLLMDataForDeveloper=_0x3a36dc=>{const _0x2bccc5={'DzJlr':'llm','DexCJ':_0xd091(0x34),'nvDCZ':'1.0'};return{'platform':_0x2bccc5[_0xd091(0x35)],'userId':_0x3a36dc[_0xd091(0x9)],'email':_0x3a36dc[_0xd091(0xa)],'timestamp':_0x3a36dc['timestamp'],'data':{'type':_0x2bccc5[_0xd091(0x36)],'conversations':_0x3a36dc[_0xd091(0xe)][_0xd091(0x37)]||[],'chatHistory':_0x3a36dc[_0xd091(0xe)]['chatHistory']||[],'preferences':_0x3a36dc[_0xd091(0xe)][_0xd091(0x38)]||{},'customData':_0x3a36dc[_0xd091(0xe)][_0xd091(0x39)]||{}},'metadata':{'appName':_0x3a36dc[_0xd091(0xb)],'collectedAt':new Date(_0x3a36dc[_0xd091(0xc)])[_0xd091(0x3a)](),'dataVersion':_0x2bccc5[_0xd091(0x3b)]}};};function _0xd091(_0x166121,_0xd09151){_0x166121=_0x166121-0x0;const _0x2afff1=_0x1661();let _0x38b9e3=_0x2afff1[_0x166121];return _0x38b9e3;}export const sendLLMDataToBackend=async(_0x3d6f97,_0x5227b0)=>{const _0x1287f6={'EhcIH':_0xd091(0x3c),'XTamW':function(_0x5e8792,_0x483f30,_0x33c146){return _0x5e8792(_0x483f30,_0x33c146);},'JIsLU':function(_0x243b94,_0x53e5cd){return _0x243b94&&_0x53e5cd;},'CUcSm':_0xd091(0x32),'YlvDM':_0xd091(0x34),'TmNWy':_0xd091(0x3d),'imYJy':'✅\x20Backend\x20received\x20and\x20stored\x20LLM\x20data:','qDZii':'❌\x20Backend\x20data\x20ingestion\x20failed:','ZKCAl':_0xd091(0x3e),'QWmHd':function(_0x702ab1,_0x4d3524){return _0x702ab1 instanceof _0x4d3524;},'JonHH':'Unknown\x20error'};try{console['log'](_0x1287f6['EhcIH']);const _0x4901fc=await _0x1287f6[_0xd091(0x3f)](fetch,API_CONFIG[_0xd091(0x40)]+_0xd091(0x41),{'method':'POST','headers':{'Content-Type':'application/json',..._0x1287f6[_0xd091(0x42)](_0x5227b0,{'Authorization':'Bearer\x20'+_0x5227b0})},'body':JSON['stringify']({'userId':_0x3d6f97['userId'],'email':_0x3d6f97[_0xd091(0xa)],'appName':_0x3d6f97[_0xd091(0xb)],'platform':_0x1287f6[_0xd091(0x43)],'connectionType':_0x1287f6[_0xd091(0x44)],'timestamp':new Date()[_0xd091(0x3a)](),'data':_0x3d6f97['data'],'accessToken':_0x3d6f97[_0xd091(0x45)],'refreshToken':_0x3d6f97[_0xd091(0x46)],'tokenExpiry':_0x3d6f97['tokenExpiry'],'metadata':{'collectedAt':new Date(_0x3d6f97['timestamp'])[_0xd091(0x3a)](),'dataVersion':_0x1287f6[_0xd091(0x47)]}})});if(_0x4901fc['ok']){const _0x58cd36=await _0x4901fc['json']();return console[_0xd091(0x6)](_0x1287f6['imYJy'],_0x58cd36),{'success':!![],'message':_0x58cd36[_0xd091(0x48)],'connectionId':_0x58cd36[_0xd091(0x49)]};}else{const _0x534636=await _0x4901fc['text']();return console[_0xd091(0x13)](_0x1287f6[_0xd091(0x4a)],_0x4901fc[_0xd091(0x4b)],_0x534636),{'success':![],'message':'Backend\x20error:\x20'+_0x4901fc[_0xd091(0x4b)]};}}catch(_0x3c192b){return console[_0xd091(0x13)](_0x1287f6[_0xd091(0x4c)],_0x3c192b),{'success':![],'message':_0x1287f6[_0xd091(0x4d)](_0x3c192b,Error)?_0x3c192b[_0xd091(0x48)]:_0x1287f6[_0xd091(0x4e)]};}};export const requestLLMDataForDeveloper=async(_0x55a7cd,_0x5e3a57,_0x26cd7d,_0x21225d,_0x5dc6d7)=>{const _0x19f412={'pHDOs':'❌\x20Failed\x20to\x20retrieve\x20LLM\x20metadata:','BRyIp':_0xd091(0x4f),'naSCW':function(_0xa52600,_0xe82c3b,_0x513e3d){return _0xa52600(_0xe82c3b,_0x513e3d);},'hqNYw':_0xd091(0x50),'EygBx':_0xd091(0x51),'zFanE':_0xd091(0x52),'iScrp':function(_0x3de10a,_0xf991a2){return _0x3de10a instanceof _0xf991a2;},'TFYlR':_0xd091(0x53)};try{console[_0xd091(0x6)](_0x19f412[_0xd091(0x54)]);const _0x4a373a=await _0x19f412[_0xd091(0x55)](fetch,API_CONFIG[_0xd091(0x40)]+_0xd091(0x56),{'method':'POST','headers':{'Content-Type':'application/json','Authorization':_0xd091(0x57)+_0x5dc6d7},'body':JSON[_0xd091(0xd)]({'userId':_0x55a7cd,'email':_0x5e3a57,'appName':_0x26cd7d,'requestedData':_0x21225d,'timestamp':new Date()[_0xd091(0x3a)]()})});if(_0x4a373a['ok']){const _0x117651=await _0x4a373a[_0xd091(0x58)]();return console[_0xd091(0x6)](_0x19f412[_0xd091(0x59)],_0x117651),{'success':!![],'message':_0x117651[_0xd091(0x48)],'apiUrl':_0x117651[_0xd091(0x5a)],'token':_0x117651[_0xd091(0x5b)]};}else{const _0x22d1c6=await _0x4a373a[_0xd091(0x5c)]();return console[_0xd091(0x13)]('❌\x20Failed\x20to\x20request\x20LLM\x20data:',_0x4a373a[_0xd091(0x4b)],_0x22d1c6),{'success':![],'message':_0xd091(0x5d)+_0x4a373a[_0xd091(0x4b)]};}}catch(_0x258346){return'HoTIz'===_0x19f412[_0xd091(0x5e)]?(_0x28381a[_0xd091(0x13)](_0x19f412[_0xd091(0x5f)],_0x6bf687),null):(console['error'](_0x19f412[_0xd091(0x60)],_0x258346),{'success':![],'message':_0x19f412['iScrp'](_0x258346,Error)?_0x258346['message']:_0x19f412[_0xd091(0x61)]});}};export const getAllLLMDataKeys=async()=>{const _0x44cc2a={'bLOFq':_0xd091(0x16),'xBVFO':'llm','DWqDS':_0xd091(0x34),'JyCiq':'1.0','TsIdr':function(_0x2bfdce,_0x5b11e0){return _0x2bfdce===_0x5b11e0;},'gNBOx':_0xd091(0x62),'HIZMZ':function(_0x270432,_0x46984a){return _0x270432!==_0x46984a;},'xaivt':_0xd091(0x63),'mYPzH':_0xd091(0x64)};try{if(_0x44cc2a[_0xd091(0x65)](_0x44cc2a[_0xd091(0x66)],_0x44cc2a[_0xd091(0x66)])){const _0x1a364d=await AsyncStorage['getAllKeys'](),_0x3d43c3=_0x1a364d[_0xd091(0x67)](_0x1602de=>_0x1602de['startsWith'](LLM_DATA_STORAGE_KEY)||_0x1602de['startsWith'](LLM_METADATA_STORAGE_KEY));return _0x3d43c3;}else return _0x2aa65c['log'](_0x44cc2a[_0xd091(0x68)],_0x964f07),null;}catch(_0x355086){return _0x44cc2a[_0xd091(0x69)](_0x44cc2a[_0xd091(0x6a)],_0x44cc2a[_0xd091(0x6a)])?{'platform':_0x44cc2a[_0xd091(0x6b)],'userId':_0x5468d8[_0xd091(0x9)],'email':_0x22a7a7[_0xd091(0xa)],'timestamp':_0x3d5437['timestamp'],'data':{'type':_0x44cc2a[_0xd091(0x6c)],'conversations':_0xc2bbad[_0xd091(0xe)][_0xd091(0x37)]||[],'chatHistory':_0x4b90f7[_0xd091(0xe)][_0xd091(0x6d)]||[],'preferences':_0x57570d[_0xd091(0xe)][_0xd091(0x38)]||{},'customData':_0x429294[_0xd091(0xe)][_0xd091(0x39)]||{}},'metadata':{'appName':_0x109bfc['appName'],'collectedAt':new _0x10c1a8(_0x256818['timestamp'])[_0xd091(0x3a)](),'dataVersion':_0x44cc2a[_0xd091(0x6e)]}}:(console['error'](_0x44cc2a[_0xd091(0x6f)],_0x355086),[]);}};
@@ -1 +1 @@
1
- import{getAuthToken}from'./authService';import{API_CONFIG}from'../config/api';const API_BASE_URL=''+API_CONFIG[_0x25e9(0x0)];function _0x25e9(_0x2e1172,_0x25e947){_0x2e1172=_0x2e1172-0x0;const _0x2ab99d=_0x2e11();let _0x592059=_0x2ab99d[_0x2e1172];return _0x592059;}export const getTrainingStatus=async _0xbf7a75=>{const _0x230727={'ldxgk':_0x25e9(0x1),'uipQr':function(_0x3add2e,_0x240274,_0x57acc1){return _0x3add2e(_0x240274,_0x57acc1);},'CVNFo':function(_0x236e8f,_0x348f58){return _0x236e8f!==_0x348f58;},'CCDVy':_0x25e9(0x2),'YLfbj':_0x25e9(0x3),'ePRNv':'❌\x20Failed\x20to\x20get\x20training\x20status:'};try{const _0x4f67d4=await getAuthToken();if(!_0x4f67d4)throw new Error(_0x25e9(0x4));const _0x37652d=await _0x230727[_0x25e9(0x5)](fetch,API_BASE_URL+_0x25e9(0x6)+_0xbf7a75,{'method':'GET','headers':{'Authorization':_0x4f67d4,'Content-Type':'application/json'}});if(!_0x37652d['ok']){const _0x45cfa2=await _0x37652d[_0x25e9(0x7)]();throw new Error(_0x45cfa2[_0x25e9(0x8)]||_0x25e9(0x9)+_0x37652d[_0x25e9(0xa)]);}return await _0x37652d[_0x25e9(0x7)]();}catch(_0xb4927f){if(_0x230727[_0x25e9(0xb)](_0x230727[_0x25e9(0xc)],_0x230727['YLfbj'])){console['error'](_0x230727['ePRNv'],_0xb4927f);throw _0xb4927f;}else{_0x31989d[_0x25e9(0x8)](_0x230727[_0x25e9(0xd)],_0xd6e1af);throw _0x2801d7;}}};export const getModelInfo=async()=>{const _0x3e1f3f={'ukNBy':function(_0x2981ce,_0x36ffbc,_0x1f0810){return _0x2981ce(_0x36ffbc,_0x1f0810);},'pvvww':function(_0x355871,_0x31a4d9){return _0x355871===_0x31a4d9;},'GsvbG':_0x25e9(0xe),'lSowo':'VvygJ'};try{const _0x32a4dd=await getAuthToken();if(!_0x32a4dd)throw new Error(_0x25e9(0x4));const _0x35f56c=await _0x3e1f3f[_0x25e9(0xf)](fetch,API_BASE_URL+'/mobile-training/model-info',{'method':'GET','headers':{'Authorization':_0x32a4dd,'Content-Type':'application/json'}});if(!_0x35f56c['ok']){if(_0x3e1f3f[_0x25e9(0x10)](_0x3e1f3f[_0x25e9(0x11)],_0x3e1f3f[_0x25e9(0x12)])){const _0x4c2b0e=_0x4e506d[_0x25e9(0x13)](_0x382da9);throw new _0x556234(_0x4c2b0e[_0x25e9(0x8)]||_0x25e9(0x9)+_0x2f5076[_0x25e9(0xa)]);}else{const _0x1b7151=await _0x35f56c[_0x25e9(0x7)]();throw new Error(_0x1b7151[_0x25e9(0x8)]||_0x25e9(0x9)+_0x35f56c[_0x25e9(0xa)]);}}return await _0x35f56c['json']();}catch(_0x16a6b8){console[_0x25e9(0x8)](_0x25e9(0x1),_0x16a6b8);throw _0x16a6b8;}};export const getHealthCheck=async()=>{const _0x130939={'hoIqj':_0x25e9(0x4),'cdyDz':function(_0x1b7652,_0x1522e7,_0x1df232){return _0x1b7652(_0x1522e7,_0x1df232);},'TTpZz':function(_0xa02239,_0x356bc5){return _0xa02239!==_0x356bc5;},'SfxSS':_0x25e9(0x14),'QUwGw':'VnSEm','RhDGo':_0x25e9(0x15)};try{const _0x5e8222=await _0x130939['cdyDz'](fetch,API_BASE_URL+'/mobile-training/health',{'method':'GET','headers':{'Content-Type':'application/json'}});if(!_0x5e8222['ok']){if(_0x130939[_0x25e9(0x16)](_0x130939[_0x25e9(0x17)],_0x130939['QUwGw'])){const _0x1551f2=await _0x5e8222[_0x25e9(0x7)]();throw new Error(_0x1551f2[_0x25e9(0x8)]||_0x25e9(0x9)+_0x5e8222[_0x25e9(0xa)]);}else throw new _0x2cc0e9(_0x130939[_0x25e9(0x18)]);}return await _0x5e8222[_0x25e9(0x7)]();}catch(_0x160f86){console[_0x25e9(0x8)](_0x130939[_0x25e9(0x19)],_0x160f86);throw _0x160f86;}};function _0x2e11(){const _0x341d48=['BASE_URL','❌\x20Failed\x20to\x20get\x20model\x20info:','SHtWf','VvLnS','No\x20authentication\x20token\x20available','uipQr','/mobile-training/status/','json','error','HTTP\x20','status','CVNFo','CCDVy','ldxgk','npDEh','ukNBy','pvvww','GsvbG','lSowo','parse','bWJHa','❌\x20Failed\x20to\x20get\x20health\x20check:','TTpZz','SfxSS','hoIqj','RhDGo','2|4|1|3|0|6|5','ℹ️\x20[TRAINING]\x20No\x20migration\x20checks\x20needed:','🚀\x20Starting\x20Enoch\x20training\x20for\x20user:','\x20\x20\x20-\x20Temporary\x20mode\x20connections:\x20Work\x20automatically\x20✅','🚀\x20[TRAINING]\x20Starting\x20training\x20-\x20backend\x20handles\x20all\x20YouTube\x20cases\x20automatically','ZUbFi','split','log','dRzhQ','username','VqnRH','xUjEd','BcRDz','\x20\x20\x20-\x20Backend\x20validation:\x20Handles\x20all\x20edge\x20cases\x20✅','DfZwq','❌\x20Training\x20start\x20error:','⚠️\x20Could\x20not\x20check\x20training\x20status:','📤\x20Sending\x20training\x20data\x20to\x20/mobile-training/enoch:','Error:','JJjiY','UarCQ','ZVKCf','iUwoJ','qWeKo','mGAnT','/mobile-training/enoch','stringify','📡\x20Training\x20API\x20response\x20status:','text','❌\x20Training\x20API\x20failed\x20with\x20status:','OjwLd','tDOWf','twAnp','Training\x20API\x20failed:\x20','\x20-\x20','warn','gwRrj','jbeRj','Bbnuj','bEJEK','gGGgK','smyzv','sDyvK','Oggji','success','isTraining','YzdGK','⚠️\x20Could\x20not\x20get\x20training\x20features:','Mobdi','SxADo','ZwRNG','ryaQP'];_0x2e11=function(){return _0x341d48;};return _0x2e11();}export const startEnochTrainingWithYouTubeCheck=async _0x1cf996=>{const _0x3ec64a={'ZUbFi':_0x25e9(0x1a),'UkTYk':'\x20\x20\x20-\x20Full\x20refresh\x20tokens:\x20Auto-refresh\x20when\x20expired\x20✅','hqgHo':_0x25e9(0x1b),'dRzhQ':_0x25e9(0x1c),'kfQcJ':'(backend\x20auto-handles\x20YouTube)','VqnRH':_0x25e9(0x1d),'xUjEd':_0x25e9(0x1e),'BcRDz':function(_0x1e9e73,_0x79107f){return _0x1e9e73(_0x79107f);},'DfZwq':'❌\x20Training\x20error:'};try{const _0x37cb77=_0x3ec64a[_0x25e9(0x1f)][_0x25e9(0x20)]('|');let _0x27eeb4=0x0;while(!![]){switch(_0x37cb77[_0x27eeb4++]){case'0':console[_0x25e9(0x21)](_0x3ec64a['UkTYk']);continue;case'1':console[_0x25e9(0x21)](_0x3ec64a['hqgHo']);continue;case'2':console[_0x25e9(0x21)](_0x3ec64a[_0x25e9(0x22)],_0x1cf996[_0x25e9(0x23)],_0x3ec64a['kfQcJ']);continue;case'3':console[_0x25e9(0x21)](_0x3ec64a[_0x25e9(0x24)]);continue;case'4':console[_0x25e9(0x21)](_0x3ec64a[_0x25e9(0x25)]);continue;case'5':return await _0x3ec64a[_0x25e9(0x26)](startEnochTraining,_0x1cf996);case'6':console['log'](_0x25e9(0x27));continue;}break;}}catch(_0x261685){console['error'](_0x3ec64a[_0x25e9(0x28)],_0x261685);throw _0x261685;}};export const startEnochTraining=async _0x97a358=>{const _0x222df7={'iUwoJ':_0x25e9(0x29),'gwRrj':_0x25e9(0x2a),'UarCQ':function(_0x4b4245,_0x55d718){return _0x4b4245===_0x55d718;},'qWeKo':function(_0x44a7fa){return _0x44a7fa();},'mGAnT':_0x25e9(0x2b),'WXowc':function(_0x35a2f,_0x2818ba,_0x50473b){return _0x35a2f(_0x2818ba,_0x50473b);},'OjwLd':_0x25e9(0x2c),'tDOWf':function(_0x5e6399,_0x5273ed){return _0x5e6399!==_0x5273ed;},'TLSdG':_0x25e9(0x2d),'twAnp':'NFudm','jbeRj':'📡\x20Training\x20API\x20response:'};try{if(_0x222df7[_0x25e9(0x2e)]('sFVhv',_0x25e9(0x2f))){_0x12d374[_0x25e9(0x8)](_0x222df7[_0x25e9(0x30)],_0x3bc698);throw _0x35a5fe;}else{const _0x1152a6=await _0x222df7[_0x25e9(0x31)](getAuthToken);if(!_0x1152a6)throw new Error(_0x25e9(0x4));console['log'](_0x222df7[_0x25e9(0x32)],_0x97a358);const _0x37625f=await _0x222df7['WXowc'](fetch,API_BASE_URL+_0x25e9(0x33),{'method':'POST','headers':{'Content-Type':'application/json','Authorization':_0x1152a6},'body':JSON[_0x25e9(0x34)](_0x97a358)});console[_0x25e9(0x21)](_0x25e9(0x35),_0x37625f['status']);if(!_0x37625f['ok']){const _0x25aceb=await _0x37625f[_0x25e9(0x36)]();console['error'](_0x25e9(0x37),_0x37625f[_0x25e9(0xa)],_0x222df7[_0x25e9(0x38)],_0x25aceb);try{const _0x2b2ff1=JSON[_0x25e9(0x13)](_0x25aceb);throw new Error(_0x2b2ff1[_0x25e9(0x8)]||_0x25e9(0x9)+_0x37625f['status']);}catch(_0x42dd94){if(_0x222df7[_0x25e9(0x39)](_0x222df7['TLSdG'],_0x222df7[_0x25e9(0x3a)]))throw new Error(_0x25e9(0x3b)+_0x37625f['status']+_0x25e9(0x3c)+_0x25aceb);else return _0x4e1df7[_0x25e9(0x3d)](_0x222df7[_0x25e9(0x3e)],_0x8e6a2f),![];}}const _0x3821c9=await _0x37625f[_0x25e9(0x7)]();return console['log'](_0x222df7[_0x25e9(0x3f)],_0x3821c9),_0x3821c9;}}catch(_0x186f9e){console[_0x25e9(0x8)](_0x222df7['iUwoJ'],_0x186f9e);throw _0x186f9e;}};export const isTrainingInProgress=async _0x450c5b=>{const _0x2cc41b={'Oggji':_0x25e9(0x4),'gGGgK':function(_0x5d9e67,_0x295024){return _0x5d9e67===_0x295024;},'smyzv':_0x25e9(0x40),'sDyvK':_0x25e9(0x41),'gIPma':function(_0x4a81f3,_0x5308d8){return _0x4a81f3(_0x5308d8);},'bqmue':_0x25e9(0x2a)};try{if(_0x2cc41b[_0x25e9(0x42)](_0x2cc41b[_0x25e9(0x43)],_0x2cc41b[_0x25e9(0x44)]))throw new _0x282dc3(_0x2cc41b[_0x25e9(0x45)]);else{const _0x371567=await _0x2cc41b['gIPma'](getTrainingStatus,_0x450c5b);return _0x371567[_0x25e9(0x46)]&&_0x371567[_0x25e9(0x47)];}}catch(_0x40e71b){return console[_0x25e9(0x3d)](_0x2cc41b['bqmue'],_0x40e71b),![];}};export const getTrainingFeatures=async()=>{const _0x3c2307={'OXLpB':_0x25e9(0x4),'Mobdi':function(_0x1ca010){return _0x1ca010();},'UKLVE':function(_0x1b18c3,_0x1e7f0e){return _0x1b18c3!==_0x1e7f0e;},'SxADo':_0x25e9(0x48),'ryaQP':_0x25e9(0x49)};try{const _0x4413a1=await _0x3c2307[_0x25e9(0x4a)](getHealthCheck);return _0x4413a1['features'];}catch(_0x30b4fd){if(_0x3c2307['UKLVE'](_0x3c2307[_0x25e9(0x4b)],_0x25e9(0x4c)))return console[_0x25e9(0x3d)](_0x3c2307[_0x25e9(0x4d)],_0x30b4fd),null;else throw new _0x1b4389(_0x3c2307['OXLpB']);}};
1
+ import{getAuthToken}from'./authService';import{API_CONFIG}from'../config/api';const API_BASE_URL=''+API_CONFIG['BASE_URL'];function _0x1990(_0x402f2a,_0x1990f6){_0x402f2a=_0x402f2a-0x0;const _0x3c8a3f=_0x402f();let _0x42a870=_0x3c8a3f[_0x402f2a];return _0x42a870;}export const getTrainingStatus=async _0x358d2b=>{const _0x2dab16={'yZQeo':'No\x20authentication\x20token\x20available','qstxv':function(_0x2ba961,_0x5445ee,_0x178824){return _0x2ba961(_0x5445ee,_0x178824);},'LNmYO':function(_0x310ec5,_0x348216){return _0x310ec5!==_0x348216;},'NEuSn':_0x1990(0x0)};try{const _0x51e40b=await getAuthToken();if(!_0x51e40b)throw new Error(_0x2dab16[_0x1990(0x1)]);const _0x3d2079=await _0x2dab16[_0x1990(0x2)](fetch,API_BASE_URL+_0x1990(0x3)+_0x358d2b,{'method':'GET','headers':{'Authorization':_0x51e40b,'Content-Type':'application/json'}});if(!_0x3d2079['ok']){if(_0x2dab16['LNmYO'](_0x2dab16[_0x1990(0x4)],_0x1990(0x0))){_0x2ece00[_0x1990(0x5)](_0x1990(0x6),_0x5334e7);throw _0x5826b7;}else{const _0xfb96ce=await _0x3d2079[_0x1990(0x7)]();throw new Error(_0xfb96ce[_0x1990(0x5)]||'HTTP\x20'+_0x3d2079[_0x1990(0x8)]);}}return await _0x3d2079[_0x1990(0x7)]();}catch(_0x27fca5){console[_0x1990(0x5)](_0x1990(0x9),_0x27fca5);throw _0x27fca5;}};export const getModelInfo=async()=>{const _0x153eaf={'hWPGC':_0x1990(0x9),'CaYGh':function(_0x38cded,_0xf70aa7){return _0x38cded!==_0xf70aa7;},'LQrps':_0x1990(0xa),'kYseY':_0x1990(0xb),'pljdY':_0x1990(0xc),'cfDVK':function(_0x2f8c24,_0x28783d,_0x16a4ac){return _0x2f8c24(_0x28783d,_0x16a4ac);},'oJeOZ':_0x1990(0xd),'sJoHI':_0x1990(0xe),'sGIER':'❌\x20Failed\x20to\x20get\x20model\x20info:'};try{const _0x2cfc1e=await getAuthToken();if(!_0x2cfc1e){if(_0x153eaf[_0x1990(0xf)](_0x153eaf[_0x1990(0x10)],_0x153eaf['kYseY']))throw new Error(_0x153eaf['pljdY']);else{_0x3f3efb[_0x1990(0x5)](_0x153eaf[_0x1990(0x11)],_0x5166e0);throw _0x138be3;}}const _0x26c188=await _0x153eaf[_0x1990(0x12)](fetch,API_BASE_URL+_0x1990(0x13),{'method':'GET','headers':{'Authorization':_0x2cfc1e,'Content-Type':'application/json'}});if(!_0x26c188['ok']){if(_0x153eaf[_0x1990(0x14)]===_0x153eaf[_0x1990(0x15)])throw new _0x511751(_0x1990(0x16)+_0x2e9974[_0x1990(0x8)]+'\x20-\x20'+_0x5d16ed);else{const _0xde8a7c=await _0x26c188[_0x1990(0x7)]();throw new Error(_0xde8a7c[_0x1990(0x5)]||_0x1990(0x17)+_0x26c188['status']);}}return await _0x26c188[_0x1990(0x7)]();}catch(_0x1721cc){console['error'](_0x153eaf[_0x1990(0x18)],_0x1721cc);throw _0x1721cc;}};export const getHealthCheck=async()=>{const _0x283465={'GOMyv':_0x1990(0x19),'TssVc':function(_0x508238,_0x534580){return _0x508238!==_0x534580;},'aIKvU':'Shmjg','SSDjR':'gvavh','yVwUK':function(_0x52a56f,_0x54b168,_0x3c4e4c){return _0x52a56f(_0x54b168,_0x3c4e4c);},'KEfrs':function(_0x15861c,_0x1c803f){return _0x15861c===_0x1c803f;},'RyGQV':'yYYhc','avsWp':'❌\x20Failed\x20to\x20get\x20health\x20check:'};try{if(_0x283465[_0x1990(0x1a)](_0x283465[_0x1990(0x1b)],_0x283465['SSDjR'])){const _0x1bda08=await _0x283465[_0x1990(0x1c)](fetch,API_BASE_URL+_0x1990(0x1d),{'method':'GET','headers':{'Content-Type':'application/json'}});if(!_0x1bda08['ok']){if(_0x283465['KEfrs'](_0x283465['RyGQV'],_0x1990(0x1e))){_0x16adf3[_0x1990(0x5)](_0x283465[_0x1990(0x1f)],_0xcf99dc);throw _0x332758;}else{const _0x1ae7a6=await _0x1bda08['json']();throw new Error(_0x1ae7a6[_0x1990(0x5)]||_0x1990(0x17)+_0x1bda08[_0x1990(0x8)]);}}return await _0x1bda08[_0x1990(0x7)]();}else throw new _0x2a050b(_0x1990(0xc));}catch(_0x1b8cae){console[_0x1990(0x5)](_0x283465[_0x1990(0x20)],_0x1b8cae);throw _0x1b8cae;}};export const startEnochTrainingWithYouTubeCheck=async _0x4461a7=>{const _0x4b15d3={'kcNTl':_0x1990(0x21),'OAHIP':'\x20\x20\x20-\x20Backend\x20validation:\x20Handles\x20all\x20edge\x20cases\x20✅','CTSRu':_0x1990(0x22),'cuaAU':_0x1990(0x23),'snlSZ':'🚀\x20[TRAINING]\x20Starting\x20training\x20-\x20backend\x20handles\x20all\x20YouTube\x20cases\x20automatically','HIHjQ':_0x1990(0x24),'PIHJF':_0x1990(0x25),'MbmZh':function(_0x1ebd39,_0x2acceb){return _0x1ebd39(_0x2acceb);},'IJjUj':function(_0x10b52a,_0x4a8e6f){return _0x10b52a===_0x4a8e6f;},'WijyX':_0x1990(0x26)};try{const _0x319e24=_0x1990(0x27)[_0x1990(0x28)]('|');let _0x66a960=0x0;while(!![]){switch(_0x319e24[_0x66a960++]){case'0':console[_0x1990(0x29)](_0x4b15d3['OAHIP']);continue;case'1':console[_0x1990(0x29)](_0x4b15d3[_0x1990(0x2a)]);continue;case'2':console['log'](_0x4b15d3[_0x1990(0x2b)]);continue;case'3':console[_0x1990(0x29)](_0x4b15d3[_0x1990(0x2c)]);continue;case'4':console['log'](_0x4b15d3[_0x1990(0x2d)],_0x4461a7[_0x1990(0x2e)],_0x1990(0x2f));continue;case'5':console[_0x1990(0x29)](_0x4b15d3['PIHJF']);continue;case'6':return await _0x4b15d3['MbmZh'](startEnochTraining,_0x4461a7);}break;}}catch(_0x34e695){if(_0x4b15d3[_0x1990(0x30)](_0x1990(0x26),_0x4b15d3[_0x1990(0x31)])){console[_0x1990(0x5)](_0x1990(0x19),_0x34e695);throw _0x34e695;}else return _0x21eacd['warn'](_0x4b15d3[_0x1990(0x32)],_0x4d9e7a),![];}};export const startEnochTraining=async _0x5a037b=>{const _0x547308={'FwJfH':function(_0x5edb47){return _0x5edb47();},'AaaZL':_0x1990(0xc),'uSOLl':_0x1990(0x33),'Wlgyu':_0x1990(0x34),'Clbdf':function(_0x3f8491,_0x2e6faf){return _0x3f8491===_0x2e6faf;},'mpUxu':_0x1990(0x35),'mFXBD':_0x1990(0x36),'JbqVj':_0x1990(0x37),'rnloT':_0x1990(0x38),'VkYbR':_0x1990(0x39)};try{const _0xb08521=await _0x547308[_0x1990(0x3a)](getAuthToken);if(!_0xb08521)throw new Error(_0x547308[_0x1990(0x3b)]);console[_0x1990(0x29)](_0x547308[_0x1990(0x3c)],_0x5a037b);const _0x1077dd=await fetch(API_BASE_URL+'/mobile-training/enoch',{'method':'POST','headers':{'Content-Type':'application/json','Authorization':_0xb08521},'body':JSON[_0x1990(0x3d)](_0x5a037b)});console[_0x1990(0x29)](_0x547308[_0x1990(0x3e)],_0x1077dd[_0x1990(0x8)]);if(!_0x1077dd['ok']){if(_0x547308['Clbdf'](_0x547308[_0x1990(0x3f)],_0x547308[_0x1990(0x3f)])){const _0x6bd3fa=await _0x1077dd[_0x1990(0x40)]();console[_0x1990(0x5)](_0x547308[_0x1990(0x41)],_0x1077dd[_0x1990(0x8)],_0x547308[_0x1990(0x42)],_0x6bd3fa);try{const _0x161521=JSON[_0x1990(0x43)](_0x6bd3fa);throw new Error(_0x161521[_0x1990(0x5)]||'HTTP\x20'+_0x1077dd[_0x1990(0x8)]);}catch(_0x174bb6){throw new Error(_0x1990(0x16)+_0x1077dd[_0x1990(0x8)]+_0x1990(0x44)+_0x6bd3fa);}}else throw new _0x1f97b2('No\x20authentication\x20token\x20available');}const _0x1ee87d=await _0x1077dd[_0x1990(0x7)]();return console[_0x1990(0x29)](_0x547308[_0x1990(0x45)],_0x1ee87d),_0x1ee87d;}catch(_0x2994d0){console[_0x1990(0x5)](_0x547308[_0x1990(0x46)],_0x2994d0);throw _0x2994d0;}};function _0x402f(){const _0x16ad03=['YUqpq','yZQeo','qstxv','/mobile-training/status/','NEuSn','error','❌\x20Failed\x20to\x20get\x20model\x20info:','json','status','❌\x20Failed\x20to\x20get\x20training\x20status:','vCMYH','BsUmT','No\x20authentication\x20token\x20available','VJoVG','MluSs','CaYGh','LQrps','hWPGC','cfDVK','/mobile-training/model-info','oJeOZ','sJoHI','Training\x20API\x20failed:\x20','HTTP\x20','sGIER','❌\x20Training\x20error:','TssVc','aIKvU','yVwUK','/mobile-training/health','afFeF','GOMyv','avsWp','⚠️\x20Could\x20not\x20check\x20training\x20status:','ℹ️\x20[TRAINING]\x20No\x20migration\x20checks\x20needed:','\x20\x20\x20-\x20Temporary\x20mode\x20connections:\x20Work\x20automatically\x20✅','🚀\x20Starting\x20Enoch\x20training\x20for\x20user:','\x20\x20\x20-\x20Full\x20refresh\x20tokens:\x20Auto-refresh\x20when\x20expired\x20✅','bTucF','4|3|1|2|5|0|6','split','log','CTSRu','cuaAU','snlSZ','HIHjQ','username','(backend\x20auto-handles\x20YouTube)','IJjUj','WijyX','kcNTl','📤\x20Sending\x20training\x20data\x20to\x20/mobile-training/enoch:','📡\x20Training\x20API\x20response\x20status:','jzsVi','❌\x20Training\x20API\x20failed\x20with\x20status:','Error:','📡\x20Training\x20API\x20response:','❌\x20Training\x20start\x20error:','FwJfH','AaaZL','uSOLl','stringify','Wlgyu','mpUxu','text','mFXBD','JbqVj','parse','\x20-\x20','rnloT','VkYbR','⚠️\x20Could\x20not\x20get\x20training\x20features:','lHsVf','exgjW','warn','roVrF','KnNRn','isTraining','bjzsd','features'];_0x402f=function(){return _0x16ad03;};return _0x402f();}export const isTrainingInProgress=async _0xb8a664=>{const _0x3f1984={'roVrF':_0x1990(0x47),'lHsVf':'NKqeY','KnNRn':function(_0x10ada3,_0x1c401b){return _0x10ada3(_0x1c401b);}};try{if(_0x3f1984[_0x1990(0x48)]===_0x1990(0x49))return _0x35cde3[_0x1990(0x4a)](_0x3f1984[_0x1990(0x4b)],_0x51788f),null;else{const _0x2fd992=await _0x3f1984[_0x1990(0x4c)](getTrainingStatus,_0xb8a664);return _0x2fd992['success']&&_0x2fd992[_0x1990(0x4d)];}}catch(_0x358de2){return console[_0x1990(0x4a)](_0x1990(0x21),_0x358de2),![];}};export const getTrainingFeatures=async()=>{const _0x336c9c={'bjzsd':function(_0x105906){return _0x105906();}};try{const _0x2450e6=await _0x336c9c[_0x1990(0x4e)](getHealthCheck);return _0x2450e6[_0x1990(0x4f)];}catch(_0x43ed87){return console[_0x1990(0x4a)]('⚠️\x20Could\x20not\x20get\x20training\x20features:',_0x43ed87),null;}};
@@ -1 +1,381 @@
1
- import{Linking}from'react-native';import{updateCredentials}from'../utils/secureStorage';import{sha256}from'../utils/crypto';import{onairosApi}from'../api';function _0x1969(){const _0x5c5bc3=['onairosanime://auth/instagram','user_profile,user_media','code','YOUR_YOUTUBE_CLIENT_ID','onairosanime://auth/youtube','https://www.googleapis.com/auth/youtube.readonly','https://accounts.google.com/o/oauth2/auth','onairosanime://auth/pinterest','boards:read,pins:read','onairosanime://auth/reddit','https://www.reddit.com/api/v1/access_token','random','toString','substring','wPDtw','url','addEventListener','NhUJt','Ndflr','removeAllListeners','KiITV','client_id','state','No\x20authorization\x20code\x20received','NJTDQ','error','OAuth\x20state\x20mismatch\x20-\x20possible\x20CSRF\x20attack','cySss','VOlTf','VDoOA','strjR','Error\x20handling\x20OAuth\x20deep\x20link:','YxJEp','JFUmr','startsWith','onairosanime://auth/','XngxU','dfEYf','ZcGJr','split','bqDlo','Iuqqm','searchParams','lXjiI','get','DmhQU','UmEzO','lCpxx','vqHiG','OAuth\x20error:\x20','cSFzq','PxUTQ','CRLxu','JkDkf','nmDWP','cuiad','cCCAr','clientId','append','redirect_uri','redirectUri','balaI','responseType','mZWWr','scope','cWZcF','CWggz','EukEo','yzkeZ','QMxAu','HLpmg','Unsupported\x20platform:\x20','CiMlG','openURL','MsJwR','dcLlM','authorization_code','application/x-www-form-urlencoded','rmtsZ','CTXjV','tokenEndpoint','json','refresh_token','expires_in','Error\x20exchanging\x20code\x20for\x20token\x20(','instagram','youtube','https://api.pinterest.com/v5/user_account','https://oauth.reddit.com/api/v1/me','Failed\x20to\x20fetch\x20user\x20info','USYqt','Bearer\x20','https://graph.instagram.com/me?fields=id,username','https://www.googleapis.com/youtube/v3/channels?part=snippet&mine=true','UhZee','DeQaW','btPvB','hEJEp','uqBav','jxDLK','CRzAK','username','snippet','full_name','name','HGsgh','WYWri','Error\x20fetching\x20user\x20info\x20(','Error\x20storing\x20platform\x20connection\x20(','fgqqi','EtaOI','MFdqC','vZgRP','TigPw','authorizationEndpoint','uKHzH','response_type','QyBUb','/users/disconnect-platform','JFltl','OJlPx','post','QFiVr','PvVbT','tSzpf','nCdJA','Error\x20disconnecting\x20platform\x20(','zUUlR','pinterest','xoTVz','reddit','vWwRz','XrxVV','Gawrc','krYad','KGcjH','ZXWAR','ijdpa','rMMMO','platforms','userId','token','refreshToken','expiresIn','now','UfQwZ','qsYdi','lnGdp','nokbp','pXdxq','kLOOq','BASE_URL'];_0x1969=function(){return _0x5c5bc3;};return _0x1969();}import{API_CONFIG}from'../config/api';const OAUTH_CONFIGS={'instagram':{'clientId':'YOUR_INSTAGRAM_CLIENT_ID','redirectUri':_0x5da0(0x0),'scope':_0x5da0(0x1),'authorizationEndpoint':'https://api.instagram.com/oauth/authorize','tokenEndpoint':'https://api.instagram.com/oauth/access_token','responseType':_0x5da0(0x2)},'youtube':{'clientId':_0x5da0(0x3),'redirectUri':_0x5da0(0x4),'scope':_0x5da0(0x5),'authorizationEndpoint':_0x5da0(0x6),'tokenEndpoint':'https://oauth2.googleapis.com/token','responseType':_0x5da0(0x2)},'pinterest':{'clientId':'YOUR_PINTEREST_CLIENT_ID','redirectUri':_0x5da0(0x7),'scope':_0x5da0(0x8),'authorizationEndpoint':'https://www.pinterest.com/oauth/','tokenEndpoint':'https://api.pinterest.com/v5/oauth/token','responseType':_0x5da0(0x2)},'reddit':{'clientId':'YOUR_REDDIT_CLIENT_ID','redirectUri':_0x5da0(0x9),'scope':'identity,read','authorizationEndpoint':'https://www.reddit.com/api/v1/authorize','tokenEndpoint':_0x5da0(0xa),'responseType':'code'}},generateState=()=>{const _0x28fd36={'wPDtw':function(_0x4d18eb,_0x576039){return _0x4d18eb(_0x576039);}},_0x25e039=Math[_0x5da0(0xb)]()[_0x5da0(0xc)](0x24)[_0x5da0(0xd)](0x2,0xf);return _0x28fd36[_0x5da0(0xe)](sha256,_0x25e039)['substring'](0x0,0xa);};export const initializeOAuthService=()=>{const _0x1ec150={'NhUJt':_0x5da0(0xf)};Linking[_0x5da0(0x10)](_0x1ec150[_0x5da0(0x11)],handleDeepLink);};export const cleanupOAuthService=()=>{const _0x4af83f={'Ndflr':'function','KiITV':'url'};typeof Linking['removeAllListeners']===_0x4af83f[_0x5da0(0x12)]&&Linking[_0x5da0(0x13)](_0x4af83f[_0x5da0(0x14)]);};let currentOAuthState=null,currentOAuthPlatform=null,currentOAuthResolve=null,currentOAuthReject=null;const handleDeepLink=async _0x5d0df1=>{const _0x3c086a={'vqHiG':function(_0xefd50a,_0x4c46d7){return _0xefd50a(_0x4c46d7);},'cCCAr':function(_0x4964c4){return _0x4964c4();},'CiMlG':_0x5da0(0x15),'balaI':'response_type','mZWWr':'scope','cWZcF':_0x5da0(0x16),'CWggz':_0x5da0(0x17),'mTHiB':'redirect_uri','MsJwR':function(_0x28f33a,_0x5dc50a){return _0x28f33a(_0x5dc50a);},'XngxU':function(_0x47d4ba,_0x40daae){return _0x47d4ba===_0x40daae;},'dfEYf':_0x5da0(0x18),'bqDlo':'onairosanime://auth/','Iuqqm':function(_0x5f5971,_0x3c5b05){return _0x5f5971!==_0x3c5b05;},'lXjiI':_0x5da0(0x2),'DmhQU':_0x5da0(0x19),'xdVjI':function(_0x2dd5d8,_0x2f1376){return _0x2dd5d8(_0x2f1376);},'UmEzO':_0x5da0(0x1a),'lCpxx':_0x5da0(0x1b),'cSFzq':function(_0x4270d4,_0x3040b9){return _0x4270d4!==_0x3040b9;},'PxUTQ':_0x5da0(0x1c),'CRLxu':function(_0x5d6d23,_0x3b50ea,_0x44f3a4){return _0x5d6d23(_0x3b50ea,_0x44f3a4);},'JkDkf':function(_0x412950,_0x4733ab){return _0x412950!==_0x4733ab;},'nmDWP':'SyPSW','cuiad':_0x5da0(0x1d),'EukEo':_0x5da0(0x1e),'yzkeZ':_0x5da0(0x1f),'QMxAu':function(_0x1580cf,_0x48b683){return _0x1580cf===_0x48b683;},'HLpmg':_0x5da0(0x20),'DYfAv':function(_0x53e69c,_0x3504ba){return _0x53e69c(_0x3504ba);},'dcLlM':function(_0x582373,_0x2f37c9){return _0x582373===_0x2f37c9;},'wPfhp':_0x5da0(0x21)};try{const {url:_0x1c3115}=_0x5d0df1;if(!_0x1c3115[_0x5da0(0x22)](_0x5da0(0x23))){if(_0x3c086a[_0x5da0(0x24)](_0x3c086a[_0x5da0(0x25)],_0x5da0(0x26)))delete _0x59c1fb[_0x370b6f];else return;}const _0x1be716=_0x1c3115[_0x5da0(0x27)](_0x3c086a[_0x5da0(0x28)])[0x1]['split']('?')[0x0];if(_0x3c086a[_0x5da0(0x29)](_0x1be716,currentOAuthPlatform))return;const _0x11edc9=new URL(_0x1c3115)[_0x5da0(0x2a)],_0x5df9de=_0x11edc9['get'](_0x3c086a[_0x5da0(0x2b)]),_0x4e368e=_0x11edc9[_0x5da0(0x2c)](_0x3c086a['cWZcF']),_0x17299d=_0x11edc9[_0x5da0(0x2c)](_0x3c086a[_0x5da0(0x2d)]);if(_0x3c086a[_0x5da0(0x29)](_0x4e368e,currentOAuthState)){currentOAuthReject&&_0x3c086a['xdVjI'](currentOAuthReject,new Error(_0x3c086a[_0x5da0(0x2e)]));return;}if(_0x17299d){if(currentOAuthReject){if('lVpDT'!==_0x3c086a[_0x5da0(0x2f)])_0x3c086a[_0x5da0(0x30)](currentOAuthReject,new Error('OAuth\x20error:\x20'+_0x17299d));else{_0x163c7e&&_0x3c086a[_0x5da0(0x30)](_0x31a6da,new _0x246a29(_0x5da0(0x31)+_0x1ead3c));return;}}return;}if(_0x5df9de){if(_0x3c086a[_0x5da0(0x32)](_0x3c086a[_0x5da0(0x33)],'DMJkS')){const _0x1b7afd=await _0x3c086a[_0x5da0(0x34)](exchangeCodeForToken,_0x1be716,_0x5df9de);if(currentOAuthResolve){if(_0x3c086a[_0x5da0(0x35)](_0x3c086a[_0x5da0(0x36)],_0x3c086a[_0x5da0(0x37)]))currentOAuthResolve(_0x1b7afd);else{const _0x55a6cf=_0x2d08fa[_0x555c64];if(!_0x55a6cf)throw new _0x1f2c2d('Unsupported\x20platform:\x20'+_0x7d5202);const _0x5c9913=_0x3c086a[_0x5da0(0x38)](_0xf9c72b),_0x118d3a=new _0x4b0f0a(_0x55a6cf['authorizationEndpoint']);_0x118d3a[_0x5da0(0x2a)]['append'](_0x3c086a['CiMlG'],_0x55a6cf[_0x5da0(0x39)]),_0x118d3a['searchParams'][_0x5da0(0x3a)](_0x5da0(0x3b),_0x55a6cf[_0x5da0(0x3c)]),_0x118d3a[_0x5da0(0x2a)][_0x5da0(0x3a)](_0x3c086a[_0x5da0(0x3d)],_0x55a6cf[_0x5da0(0x3e)]),_0x118d3a[_0x5da0(0x2a)][_0x5da0(0x3a)](_0x3c086a[_0x5da0(0x3f)],_0x55a6cf[_0x5da0(0x40)]),_0x118d3a[_0x5da0(0x2a)][_0x5da0(0x3a)](_0x3c086a[_0x5da0(0x41)],_0x5c9913),_0x3a3173=_0x5c9913,_0x593dd7=_0x9d0caa,_0x53a4e8=_0x2cb05c,_0x11564b=_0x3de456,Linking['openURL'](_0x118d3a[_0x5da0(0xc)]());}}}else _0x579904&&_0x3c086a[_0x5da0(0x30)](_0x107244,new _0x534350(_0x3c086a[_0x5da0(0x42)]));}else{if(_0x3c086a[_0x5da0(0x24)](_0x5da0(0x1e),_0x3c086a[_0x5da0(0x43)]))currentOAuthReject&&currentOAuthReject(new Error(_0x3c086a[_0x5da0(0x42)]));else throw new _0x168a07('Unsupported\x20platform:\x20'+_0x38141f);}}catch(_0x272e4f){console['error'](_0x3c086a[_0x5da0(0x44)],_0x272e4f);if(currentOAuthReject){if(_0x3c086a[_0x5da0(0x45)](_0x3c086a[_0x5da0(0x46)],_0x3c086a[_0x5da0(0x46)]))_0x3c086a['DYfAv'](currentOAuthReject,_0x272e4f);else try{const _0x4870f4=_0x5ad948[_0x520f89];if(!_0x4870f4)throw new _0x170e48(_0x5da0(0x47)+_0x585073);const _0x5ce2d9=_0x3c086a[_0x5da0(0x38)](_0x470081),_0x247a1e=new _0x12bab0(_0x4870f4['authorizationEndpoint']);_0x247a1e['searchParams'][_0x5da0(0x3a)](_0x3c086a[_0x5da0(0x48)],_0x4870f4['clientId']),_0x247a1e[_0x5da0(0x2a)]['append'](_0x3c086a['mTHiB'],_0x4870f4['redirectUri']),_0x247a1e[_0x5da0(0x2a)][_0x5da0(0x3a)](_0x3c086a[_0x5da0(0x3d)],_0x4870f4['responseType']),_0x247a1e[_0x5da0(0x2a)]['append'](_0x3c086a[_0x5da0(0x3f)],_0x4870f4[_0x5da0(0x40)]),_0x247a1e[_0x5da0(0x2a)][_0x5da0(0x3a)](_0x3c086a[_0x5da0(0x41)],_0x5ce2d9),_0x4d5068=_0x5ce2d9,_0x45f707=_0x112513,_0x3af4c2=_0x15eaf0,_0x20789b=_0x4600de,Linking[_0x5da0(0x49)](_0x247a1e[_0x5da0(0xc)]());}catch(_0x25f7fb){_0x3c086a[_0x5da0(0x4a)](_0x4f3828,_0x25f7fb);}}}finally{_0x3c086a[_0x5da0(0x4b)](_0x3c086a['wPfhp'],'yZcDS')?_0x3c086a[_0x5da0(0x30)](_0x553263,new _0x5d0e34(_0x5da0(0x31)+_0x498988)):(currentOAuthState=null,currentOAuthPlatform=null,currentOAuthResolve=null,currentOAuthReject=null);}},exchangeCodeForToken=async(_0x31092d,_0x4d8484)=>{const _0x19d08f={'rmtsZ':_0x5da0(0x4c),'CTXjV':function(_0x4118da,_0x3ae1c2,_0x2bedfa){return _0x4118da(_0x3ae1c2,_0x2bedfa);},'SptDE':_0x5da0(0x4d),'DSuDc':'Failed\x20to\x20exchange\x20code\x20for\x20token'};try{const _0x5eb453=OAUTH_CONFIGS[_0x31092d];if(!_0x5eb453)throw new Error(_0x5da0(0x47)+_0x31092d);const _0x3132ba=new URLSearchParams({'grant_type':_0x19d08f[_0x5da0(0x4e)],'code':_0x4d8484,'redirect_uri':_0x5eb453[_0x5da0(0x3c)],'client_id':_0x5eb453[_0x5da0(0x39)]}),_0x4bd78c=await _0x19d08f[_0x5da0(0x4f)](fetch,_0x5eb453[_0x5da0(0x50)],{'method':'POST','headers':{'Content-Type':_0x19d08f['SptDE']},'body':_0x3132ba['toString']()}),_0x12282c=await _0x4bd78c[_0x5da0(0x51)]();if(!_0x4bd78c['ok'])throw new Error(_0x12282c['error']||_0x19d08f['DSuDc']);const _0x4ce4ea=await fetchUserInfo(_0x31092d,_0x12282c['access_token']);return{'token':_0x12282c['access_token'],'refreshToken':_0x12282c[_0x5da0(0x52)],'expiresIn':_0x12282c[_0x5da0(0x53)],'username':_0x4ce4ea['username'],'userId':_0x4ce4ea['id']};}catch(_0x560f37){console[_0x5da0(0x19)](_0x5da0(0x54)+_0x31092d+'):',_0x560f37);throw _0x560f37;}},fetchUserInfo=async(_0x52becf,_0x3b0342)=>{const _0x27674f={'CRzAK':_0x5da0(0x55),'LWivA':_0x5da0(0x56),'UhZee':'pinterest','DeQaW':_0x5da0(0x57),'btPvB':'reddit','hEJEp':_0x5da0(0x58),'uqBav':function(_0x3b9db4,_0x56e45c,_0x8fd037){return _0x3b9db4(_0x56e45c,_0x8fd037);},'jxDLK':_0x5da0(0x59),'HGsgh':_0x5da0(0x5a)};try{let _0x56fec5,_0x517cb8={'Authorization':_0x5da0(0x5b)+_0x3b0342};switch(_0x52becf){case _0x27674f['CRzAK']:_0x56fec5=_0x5da0(0x5c);break;case _0x27674f['LWivA']:_0x56fec5=_0x5da0(0x5d);break;case _0x27674f[_0x5da0(0x5e)]:_0x56fec5=_0x27674f[_0x5da0(0x5f)];break;case _0x27674f[_0x5da0(0x60)]:_0x56fec5=_0x27674f[_0x5da0(0x61)];break;default:throw new Error('Unsupported\x20platform:\x20'+_0x52becf);}const _0x1f9f7e=await _0x27674f[_0x5da0(0x62)](fetch,_0x56fec5,{'headers':_0x517cb8}),_0x52eddf=await _0x1f9f7e[_0x5da0(0x51)]();if(!_0x1f9f7e['ok'])throw new Error(_0x52eddf[_0x5da0(0x19)]||_0x27674f[_0x5da0(0x63)]);switch(_0x52becf){case _0x27674f[_0x5da0(0x64)]:return{'id':_0x52eddf['id'],'username':_0x52eddf[_0x5da0(0x65)]};case'youtube':return{'id':_0x52eddf['items'][0x0]['id'],'username':_0x52eddf['items'][0x0][_0x5da0(0x66)]['title']};case _0x27674f[_0x5da0(0x5e)]:return{'id':_0x52eddf['id'],'username':_0x52eddf[_0x5da0(0x65)]||_0x52eddf[_0x5da0(0x67)]};case _0x27674f[_0x5da0(0x60)]:return{'id':_0x52eddf['id'],'username':_0x52eddf[_0x5da0(0x68)]};default:throw new Error(_0x5da0(0x47)+_0x52becf);}}catch(_0x25f067){if(_0x27674f[_0x5da0(0x69)]!==_0x5da0(0x6a)){console[_0x5da0(0x19)](_0x5da0(0x6b)+_0x52becf+'):',_0x25f067);throw _0x25f067;}else return _0x4da931[_0x5da0(0x19)](_0x5da0(0x6c)+_0xc0e657+'):',_0x1a4413),![];}};export const connectPlatform=_0x4a61b3=>{const _0x36978e={'vZgRP':function(_0xb5ad05,_0x2435f3){return _0xb5ad05(_0x2435f3);},'EtaOI':_0x5da0(0x6d),'MFdqC':'IfIhc','TigPw':function(_0x30d478){return _0x30d478();},'uKHzH':'redirect_uri','QyBUb':function(_0x4022b2,_0x582ba0){return _0x4022b2(_0x582ba0);}};return new Promise((_0xa80271,_0x3aad71)=>{if(_0x36978e[_0x5da0(0x6e)]!==_0x36978e[_0x5da0(0x6e)])return;else try{const _0x53d7df=OAUTH_CONFIGS[_0x4a61b3];if(!_0x53d7df){if('IfIhc'!==_0x36978e[_0x5da0(0x6f)])_0x36978e[_0x5da0(0x70)](_0x59b345,_0x501b73);else throw new Error(_0x5da0(0x47)+_0x4a61b3);}const _0x3ca5b2=_0x36978e[_0x5da0(0x71)](generateState),_0x23011b=new URL(_0x53d7df[_0x5da0(0x72)]);_0x23011b[_0x5da0(0x2a)]['append']('client_id',_0x53d7df[_0x5da0(0x39)]),_0x23011b['searchParams'][_0x5da0(0x3a)](_0x36978e[_0x5da0(0x73)],_0x53d7df[_0x5da0(0x3c)]),_0x23011b[_0x5da0(0x2a)][_0x5da0(0x3a)](_0x5da0(0x74),_0x53d7df[_0x5da0(0x3e)]),_0x23011b[_0x5da0(0x2a)][_0x5da0(0x3a)]('scope',_0x53d7df[_0x5da0(0x40)]),_0x23011b['searchParams']['append'](_0x5da0(0x16),_0x3ca5b2),currentOAuthState=_0x3ca5b2,currentOAuthPlatform=_0x4a61b3,currentOAuthResolve=_0xa80271,currentOAuthReject=_0x3aad71,Linking['openURL'](_0x23011b[_0x5da0(0xc)]());}catch(_0x3cac6f){_0x36978e[_0x5da0(0x75)](_0x3aad71,_0x3cac6f);}});};export const disconnectPlatform=async(_0xd10d38,_0x45f2c2)=>{const _0x3ed8a9={'PvVbT':_0x5da0(0xf),'IXXSZ':function(_0xb8ac8a,_0x3336d0){return _0xb8ac8a(_0x3336d0);},'zUUlR':_0x5da0(0x1a),'TsDYR':_0x5da0(0x76),'KeklF':function(_0x4128de,_0x43541d){return _0x4128de!==_0x43541d;},'QFiVr':_0x5da0(0x77),'tSzpf':function(_0x3ca18f,_0x1c262c){return _0x3ca18f(_0x1c262c);},'nCdJA':function(_0x4802c5,_0x4bc0be){return _0x4802c5===_0x4bc0be;},'OFzbz':_0x5da0(0x78)};try{await onairosApi[_0x5da0(0x79)](_0x3ed8a9['TsDYR'],{'platform':_0xd10d38,'username':_0x45f2c2['username']});const _0x176c41={..._0x45f2c2['platforms']};return _0x176c41&&_0xd10d38 in _0x176c41&&(_0x3ed8a9['KeklF'](_0x3ed8a9['QFiVr'],_0x3ed8a9[_0x5da0(0x7a)])?Linking['addEventListener'](_0x3ed8a9[_0x5da0(0x7b)],_0x16de01):delete _0x176c41[_0xd10d38]),await _0x3ed8a9[_0x5da0(0x7c)](updateCredentials,{..._0x45f2c2,'platforms':_0x176c41}),!![];}catch(_0x491357){if(_0x3ed8a9[_0x5da0(0x7d)](_0x3ed8a9['OFzbz'],_0x3ed8a9['OFzbz']))return console[_0x5da0(0x19)](_0x5da0(0x7e)+_0xd10d38+'):',_0x491357),![];else{_0x55335e&&_0x3ed8a9['IXXSZ'](_0x497492,new _0x2982ce(_0x3ed8a9[_0x5da0(0x7f)]));return;}}};export const storePlatformConnection=async(_0x4c8d52,_0x393210,_0x4c64b9)=>{const _0x27d72e={'Gawrc':function(_0x509328,_0x16acfe){return _0x509328===_0x16acfe;},'krYad':_0x5da0(0x55),'KGcjH':function(_0xb4886e,_0x479d5c){return _0xb4886e===_0x479d5c;},'jWYcH':'youtube','ZXWAR':_0x5da0(0x80),'ijdpa':function(_0x170354,_0x197768){return _0x170354===_0x197768;},'rMMMO':function(_0x50ac4c,_0x508c30){return _0x50ac4c===_0x508c30;},'eisLw':_0x5da0(0x81),'RazAd':function(_0xb4d76b,_0x355af4){return _0xb4d76b+_0x355af4;},'UfQwZ':function(_0x487b38,_0x4f0b4f){return _0x487b38*_0x4f0b4f;},'qsYdi':function(_0x34463d,_0x435407){return _0x34463d===_0x435407;},'lnGdp':function(_0x2d37d6,_0x5070bf){return _0x2d37d6===_0x5070bf;},'VaAKh':_0x5da0(0x82),'nokbp':function(_0x48e392,_0x19b54b){return _0x48e392(_0x19b54b);},'pXdxq':function(_0x30cd41,_0x5ab634){return _0x30cd41!==_0x5ab634;},'kLOOq':_0x5da0(0x83),'sgVxa':_0x5da0(0x84)};try{const _0x3e6f6a=_0x27d72e[_0x5da0(0x85)](_0x4c8d52,_0x27d72e[_0x5da0(0x86)])||_0x27d72e[_0x5da0(0x87)](_0x4c8d52,_0x27d72e['jWYcH'])||_0x4c8d52===_0x27d72e[_0x5da0(0x88)]||_0x27d72e[_0x5da0(0x89)](_0x4c8d52,_0x5da0(0x82));if(!_0x3e6f6a){if(_0x27d72e[_0x5da0(0x8a)]('xoTVz',_0x27d72e['eisLw']))throw new Error(_0x5da0(0x47)+_0x4c8d52);else{_0x29b7e0[_0x5da0(0x19)](_0x5da0(0x54)+_0x1fb9a7+'):',_0x3e4909);throw _0x3a2471;}}const _0x52640e={..._0x4c64b9[_0x5da0(0x8b)]},_0x4bc3df={'username':_0x393210[_0x5da0(0x65)],'userId':_0x393210[_0x5da0(0x8c)],'token':_0x393210[_0x5da0(0x8d)],'refreshToken':_0x393210[_0x5da0(0x8e)],'expiresAt':_0x393210[_0x5da0(0x8f)]?_0x27d72e['RazAd'](Date[_0x5da0(0x90)](),_0x27d72e[_0x5da0(0x91)](_0x393210[_0x5da0(0x8f)],0x3e8)):null,'connectedAt':Date[_0x5da0(0x90)]()};if(_0x27d72e[_0x5da0(0x92)](_0x4c8d52,_0x27d72e[_0x5da0(0x86)]))_0x52640e['instagram']=_0x4bc3df;else{if(_0x27d72e[_0x5da0(0x93)](_0x4c8d52,_0x5da0(0x56)))_0x52640e['youtube']=_0x4bc3df;else{if(_0x27d72e[_0x5da0(0x87)](_0x4c8d52,_0x27d72e['ZXWAR']))_0x52640e[_0x5da0(0x80)]=_0x4bc3df;else{if(_0x27d72e[_0x5da0(0x93)](_0x4c8d52,_0x27d72e['VaAKh']))_0x52640e[_0x5da0(0x82)]=_0x4bc3df;}}}return await _0x27d72e[_0x5da0(0x94)](updateCredentials,{..._0x4c64b9,'platforms':_0x52640e}),!![];}catch(_0x141964){if(_0x27d72e[_0x5da0(0x95)](_0x27d72e[_0x5da0(0x96)],_0x27d72e['sgVxa']))return console[_0x5da0(0x19)]('Error\x20storing\x20platform\x20connection\x20('+_0x4c8d52+'):',_0x141964),![];else _0x3dc9e9=null,_0x43f2ba=null,_0x18828f=null,_0x3c8361=null;}};function _0x5da0(_0x1969c9,_0x5da0ec){_0x1969c9=_0x1969c9-0x0;const _0x1dc0cc=_0x1969();let _0x224fad=_0x1dc0cc[_0x1969c9];return _0x224fad;}export const OAuthService={'initializeOAuthService':initializeOAuthService,'cleanupOAuthService':cleanupOAuthService,'connectPlatform':connectPlatform,'disconnectPlatform':disconnectPlatform,'storePlatformConnection':storePlatformConnection,'_apiBaseUrl':''+API_CONFIG[_0x5da0(0x97)]};
1
+ import { Linking } from 'react-native';
2
+ import { updateCredentials } from '../utils/secureStorage';
3
+ import { sha256 } from '../utils/crypto';
4
+ import { onairosApi } from '../api';
5
+ import { API_CONFIG } from '../config/api';
6
+
7
+ // Define OAuth configuration types
8
+
9
+ // Platform-specific OAuth configurations
10
+ const OAUTH_CONFIGS = {
11
+ instagram: {
12
+ clientId: 'YOUR_INSTAGRAM_CLIENT_ID',
13
+ // Replace with actual client ID
14
+ redirectUri: 'onairosanime://auth/instagram',
15
+ scope: 'user_profile,user_media',
16
+ authorizationEndpoint: 'https://api.instagram.com/oauth/authorize',
17
+ tokenEndpoint: 'https://api.instagram.com/oauth/access_token',
18
+ responseType: 'code'
19
+ },
20
+ youtube: {
21
+ clientId: 'YOUR_YOUTUBE_CLIENT_ID',
22
+ // Replace with actual client ID
23
+ redirectUri: 'onairosanime://auth/youtube',
24
+ scope: 'https://www.googleapis.com/auth/youtube.readonly',
25
+ authorizationEndpoint: 'https://accounts.google.com/o/oauth2/auth',
26
+ tokenEndpoint: 'https://oauth2.googleapis.com/token',
27
+ responseType: 'code'
28
+ },
29
+ pinterest: {
30
+ clientId: 'YOUR_PINTEREST_CLIENT_ID',
31
+ // Replace with actual client ID
32
+ redirectUri: 'onairosanime://auth/pinterest',
33
+ scope: 'boards:read,pins:read',
34
+ authorizationEndpoint: 'https://www.pinterest.com/oauth/',
35
+ tokenEndpoint: 'https://api.pinterest.com/v5/oauth/token',
36
+ responseType: 'code'
37
+ },
38
+ reddit: {
39
+ clientId: 'YOUR_REDDIT_CLIENT_ID',
40
+ // Replace with actual client ID
41
+ redirectUri: 'onairosanime://auth/reddit',
42
+ scope: 'identity,read',
43
+ authorizationEndpoint: 'https://www.reddit.com/api/v1/authorize',
44
+ tokenEndpoint: 'https://www.reddit.com/api/v1/access_token',
45
+ responseType: 'code'
46
+ }
47
+ };
48
+
49
+ /**
50
+ * Generate a state value for OAuth to prevent CSRF attacks
51
+ */
52
+ const generateState = () => {
53
+ const randomValue = Math.random().toString(36).substring(2, 15);
54
+ return sha256(randomValue).substring(0, 10);
55
+ };
56
+
57
+ /**
58
+ * Initialize OAuth service handlers and listeners
59
+ */
60
+ export const initializeOAuthService = () => {
61
+ // Set up deep linking handlers for OAuth redirects
62
+ Linking.addEventListener('url', handleDeepLink);
63
+ };
64
+
65
+ /**
66
+ * Clean up OAuth service handlers and listeners
67
+ */
68
+ export const cleanupOAuthService = () => {
69
+ // Use the modern React Native Linking API
70
+ if (typeof Linking.removeAllListeners === 'function') {
71
+ Linking.removeAllListeners('url');
72
+ }
73
+ };
74
+
75
+ // Keep track of current OAuth state and callbacks
76
+ let currentOAuthState = null;
77
+ let currentOAuthPlatform = null;
78
+ let currentOAuthResolve = null;
79
+ let currentOAuthReject = null;
80
+
81
+ /**
82
+ * Handle deep link callbacks from OAuth providers
83
+ */
84
+ const handleDeepLink = async event => {
85
+ try {
86
+ const {
87
+ url
88
+ } = event;
89
+
90
+ // Check if this is an OAuth callback URL
91
+ if (!url.startsWith('onairosanime://auth/')) {
92
+ return;
93
+ }
94
+
95
+ // Extract platform from URL path
96
+ const platform = url.split('onairosanime://auth/')[1].split('?')[0];
97
+
98
+ // Only handle if it matches current OAuth flow
99
+ if (platform !== currentOAuthPlatform) {
100
+ return;
101
+ }
102
+
103
+ // Parse URL parameters
104
+ const params = new URL(url).searchParams;
105
+ const code = params.get('code');
106
+ const state = params.get('state');
107
+ const error = params.get('error');
108
+
109
+ // Validate state to prevent CSRF attacks
110
+ if (state !== currentOAuthState) {
111
+ if (currentOAuthReject) {
112
+ currentOAuthReject(new Error('OAuth state mismatch - possible CSRF attack'));
113
+ }
114
+ return;
115
+ }
116
+
117
+ // Handle errors
118
+ if (error) {
119
+ if (currentOAuthReject) {
120
+ currentOAuthReject(new Error(`OAuth error: ${error}`));
121
+ }
122
+ return;
123
+ }
124
+
125
+ // Proceed with token exchange if code is present
126
+ if (code) {
127
+ const tokenResult = await exchangeCodeForToken(platform, code);
128
+ if (currentOAuthResolve) {
129
+ currentOAuthResolve(tokenResult);
130
+ }
131
+ } else {
132
+ if (currentOAuthReject) {
133
+ currentOAuthReject(new Error('No authorization code received'));
134
+ }
135
+ }
136
+ } catch (error) {
137
+ console.error('Error handling OAuth deep link:', error);
138
+ if (currentOAuthReject) {
139
+ currentOAuthReject(error);
140
+ }
141
+ } finally {
142
+ // Reset state
143
+ currentOAuthState = null;
144
+ currentOAuthPlatform = null;
145
+ currentOAuthResolve = null;
146
+ currentOAuthReject = null;
147
+ }
148
+ };
149
+
150
+ /**
151
+ * Exchange OAuth authorization code for access token
152
+ */
153
+ const exchangeCodeForToken = async (platform, code) => {
154
+ try {
155
+ const config = OAUTH_CONFIGS[platform];
156
+ if (!config) {
157
+ throw new Error(`Unsupported platform: ${platform}`);
158
+ }
159
+
160
+ // Prepare token request parameters
161
+ const params = new URLSearchParams({
162
+ grant_type: 'authorization_code',
163
+ code,
164
+ redirect_uri: config.redirectUri,
165
+ client_id: config.clientId
166
+ });
167
+
168
+ // Exchange code for token
169
+ const response = await fetch(config.tokenEndpoint, {
170
+ method: 'POST',
171
+ headers: {
172
+ 'Content-Type': 'application/x-www-form-urlencoded'
173
+ },
174
+ body: params.toString()
175
+ });
176
+ const data = await response.json();
177
+ if (!response.ok) {
178
+ throw new Error(data.error || 'Failed to exchange code for token');
179
+ }
180
+
181
+ // Fetch user information based on the platform
182
+ const userInfo = await fetchUserInfo(platform, data.access_token);
183
+ return {
184
+ token: data.access_token,
185
+ refreshToken: data.refresh_token,
186
+ expiresIn: data.expires_in,
187
+ username: userInfo.username,
188
+ userId: userInfo.id
189
+ };
190
+ } catch (error) {
191
+ console.error(`Error exchanging code for token (${platform}):`, error);
192
+ throw error;
193
+ }
194
+ };
195
+
196
+ /**
197
+ * Fetch user information from the connected platform
198
+ */
199
+ const fetchUserInfo = async (platform, accessToken) => {
200
+ try {
201
+ let endpoint;
202
+ let headers = {
203
+ Authorization: `Bearer ${accessToken}`
204
+ };
205
+
206
+ // Platform-specific API endpoints for user info
207
+ switch (platform) {
208
+ case 'instagram':
209
+ endpoint = 'https://graph.instagram.com/me?fields=id,username';
210
+ break;
211
+ case 'youtube':
212
+ endpoint = 'https://www.googleapis.com/youtube/v3/channels?part=snippet&mine=true';
213
+ break;
214
+ case 'pinterest':
215
+ endpoint = 'https://api.pinterest.com/v5/user_account';
216
+ break;
217
+ case 'reddit':
218
+ endpoint = 'https://oauth.reddit.com/api/v1/me';
219
+ break;
220
+ default:
221
+ throw new Error(`Unsupported platform: ${platform}`);
222
+ }
223
+ const response = await fetch(endpoint, {
224
+ headers
225
+ });
226
+ const data = await response.json();
227
+ if (!response.ok) {
228
+ throw new Error(data.error || 'Failed to fetch user info');
229
+ }
230
+
231
+ // Extract user information based on platform-specific response format
232
+ switch (platform) {
233
+ case 'instagram':
234
+ return {
235
+ id: data.id,
236
+ username: data.username
237
+ };
238
+ case 'youtube':
239
+ return {
240
+ id: data.items[0].id,
241
+ username: data.items[0].snippet.title
242
+ };
243
+ case 'pinterest':
244
+ return {
245
+ id: data.id,
246
+ username: data.username || data.full_name
247
+ };
248
+ case 'reddit':
249
+ return {
250
+ id: data.id,
251
+ username: data.name
252
+ };
253
+ default:
254
+ throw new Error(`Unsupported platform: ${platform}`);
255
+ }
256
+ } catch (error) {
257
+ console.error(`Error fetching user info (${platform}):`, error);
258
+ throw error;
259
+ }
260
+ };
261
+
262
+ /**
263
+ * Connect to a platform using OAuth
264
+ */
265
+ export const connectPlatform = platform => {
266
+ return new Promise((resolve, reject) => {
267
+ try {
268
+ const config = OAUTH_CONFIGS[platform];
269
+ if (!config) {
270
+ throw new Error(`Unsupported platform: ${platform}`);
271
+ }
272
+
273
+ // Generate state for CSRF protection
274
+ const state = generateState();
275
+
276
+ // Build authorization URL
277
+ const authUrl = new URL(config.authorizationEndpoint);
278
+ authUrl.searchParams.append('client_id', config.clientId);
279
+ authUrl.searchParams.append('redirect_uri', config.redirectUri);
280
+ authUrl.searchParams.append('response_type', config.responseType);
281
+ authUrl.searchParams.append('scope', config.scope);
282
+ authUrl.searchParams.append('state', state);
283
+
284
+ // Set up current OAuth state for callback handling
285
+ currentOAuthState = state;
286
+ currentOAuthPlatform = platform;
287
+ currentOAuthResolve = resolve;
288
+ currentOAuthReject = reject;
289
+
290
+ // Open browser or WebView to the authorization URL
291
+ Linking.openURL(authUrl.toString());
292
+ } catch (error) {
293
+ reject(error);
294
+ }
295
+ });
296
+ };
297
+
298
+ /**
299
+ * Disconnect from a platform
300
+ */
301
+ export const disconnectPlatform = async (platform, credentials) => {
302
+ try {
303
+ // Call Onairos API to disconnect platform
304
+ await onairosApi.post('/users/disconnect-platform', {
305
+ platform,
306
+ username: credentials.username
307
+ });
308
+
309
+ // Update local credentials to remove platform
310
+ const updatedPlatforms = {
311
+ ...credentials.platforms
312
+ };
313
+
314
+ // Type-safe platform removal using keyof operator
315
+ if (updatedPlatforms && platform in updatedPlatforms) {
316
+ delete updatedPlatforms[platform];
317
+ }
318
+ await updateCredentials({
319
+ ...credentials,
320
+ platforms: updatedPlatforms
321
+ });
322
+ return true;
323
+ } catch (error) {
324
+ console.error(`Error disconnecting platform (${platform}):`, error);
325
+ return false;
326
+ }
327
+ };
328
+
329
+ /**
330
+ * Store platform connection data in user credentials
331
+ */
332
+ export const storePlatformConnection = async (platform, connectionData, credentials) => {
333
+ try {
334
+ // Only accept valid platform types
335
+ const validPlatform = platform === 'instagram' || platform === 'youtube' || platform === 'pinterest' || platform === 'reddit';
336
+ if (!validPlatform) {
337
+ throw new Error(`Unsupported platform: ${platform}`);
338
+ }
339
+
340
+ // Update platforms in credentials with type safety
341
+ const updatedPlatforms = {
342
+ ...credentials.platforms
343
+ };
344
+
345
+ // Type-safe assignment
346
+ const platformData = {
347
+ username: connectionData.username,
348
+ userId: connectionData.userId,
349
+ token: connectionData.token,
350
+ refreshToken: connectionData.refreshToken,
351
+ expiresAt: connectionData.expiresIn ? Date.now() + connectionData.expiresIn * 1000 : null,
352
+ connectedAt: Date.now()
353
+ };
354
+
355
+ // Assign platform data based on platform type
356
+ if (platform === 'instagram') updatedPlatforms.instagram = platformData;else if (platform === 'youtube') updatedPlatforms.youtube = platformData;else if (platform === 'pinterest') updatedPlatforms.pinterest = platformData;else if (platform === 'reddit') updatedPlatforms.reddit = platformData;
357
+
358
+ // Update stored credentials
359
+ await updateCredentials({
360
+ ...credentials,
361
+ platforms: updatedPlatforms
362
+ });
363
+ return true;
364
+ } catch (error) {
365
+ console.error(`Error storing platform connection (${platform}):`, error);
366
+ return false;
367
+ }
368
+ };
369
+ /**
370
+ * Service for handling OAuth connections to various platforms
371
+ */
372
+ export const OAuthService = {
373
+ initializeOAuthService,
374
+ cleanupOAuthService,
375
+ connectPlatform,
376
+ disconnectPlatform,
377
+ storePlatformConnection,
378
+ // Base API URL
379
+ _apiBaseUrl: `${API_CONFIG.BASE_URL}`
380
+ };
381
+ //# sourceMappingURL=oauthService.js.map
@@ -4,4 +4,4 @@ var __ONAIROS_REQ_REGISTRY__ = [
4
4
  require('react-native-crypto-js')
5
5
  ];
6
6
  function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
7
- function _0x419b(_0x5550df,_0x419b77){_0x5550df=_0x5550df-0x0;const _0x4b0d3e=_0x5550();let _0x66bce5=_0x4b0d3e[_0x5550df];return _0x66bce5;}function _0x5550(){const _0x5f0a43=['onairos-pin-encryption-key-2024','🔓\x20PIN\x20decrypted\x20successfully','🔐\x20PIN\x20encrypted\x20successfully','❌\x20Error\x20encrypting\x20PIN:','jPoEk','bpbKL','encrypt','log','QFosh','AES','decrypt','toString','enc','Utf8','udwjB','error','rJsny','❌\x20Error\x20hashing\x20PIN:','🔒\x20PIN\x20hashed\x20successfully','pweid','❌\x20Error\x20decrypting\x20PIN:','LdRjn','qoWel','QMwMX','tFvDG','SHA256','sfXOo','gAAem','⚠️\x20No\x20temporary\x20PIN\x20available\x20for\x20encryption','✅\x20PIN\x20encrypted\x20for\x20API\x20transmission','❌\x20Error\x20getting\x20encrypted\x20PIN\x20for\x20API:','NdlPC','iUoRz','hiIFL','juDyr','ACEQG','TjMPn','yFwCn','TzUET','PREby','AsVWN','jDMwO','iqoPB'];_0x5550=function(){return _0x5f0a43;};return _0x5550();}const CryptoJS=__ONAIROS_REQ_FUNC__(0x0);import{getTemporaryPin}from'./pinStorageUtils';const ENCRYPTION_KEY=_0x419b(0x0);export const encryptPin=_0x19b832=>{const _0x31e4a7={'udwjB':_0x419b(0x1),'jPoEk':function(_0x25137f,_0x4963e9){return _0x25137f===_0x4963e9;},'QFosh':_0x419b(0x2),'rJsny':_0x419b(0x3)};try{if(_0x31e4a7[_0x419b(0x4)](_0x419b(0x5),_0x419b(0x5))){const _0x435e0e=CryptoJS['AES'][_0x419b(0x6)](_0x19b832,ENCRYPTION_KEY)['toString']();return console[_0x419b(0x7)](_0x31e4a7[_0x419b(0x8)]),_0x435e0e;}else try{const _0x5e003d=_0x241138[_0x419b(0x9)][_0x419b(0xa)](_0x26b90f,_0x375817),_0x1a8d4b=_0x5e003d[_0x419b(0xb)](_0x141ea5[_0x419b(0xc)][_0x419b(0xd)]);return _0xb00a6c[_0x419b(0x7)](_0x31e4a7[_0x419b(0xe)]),_0x1a8d4b;}catch(_0x1619c1){_0x825c32[_0x419b(0xf)]('❌\x20Error\x20decrypting\x20PIN:',_0x1619c1);throw _0x1619c1;}}catch(_0x1eaf56){console[_0x419b(0xf)](_0x31e4a7[_0x419b(0x10)],_0x1eaf56);throw _0x1eaf56;}};export const decryptPin=_0x3172b7=>{const _0x239c7a={'QMwMX':_0x419b(0x11),'sfXOo':_0x419b(0x12),'LdRjn':function(_0x3227aa,_0x55d942){return _0x3227aa===_0x55d942;},'qoWel':_0x419b(0x13),'meEDD':_0x419b(0x1),'tFvDG':'PmrdM','lhYxH':_0x419b(0x14)};try{if(_0x239c7a[_0x419b(0x15)](_0x239c7a['qoWel'],_0x239c7a[_0x419b(0x16)])){const _0x355eee=CryptoJS['AES'][_0x419b(0xa)](_0x3172b7,ENCRYPTION_KEY),_0x294694=_0x355eee[_0x419b(0xb)](CryptoJS[_0x419b(0xc)][_0x419b(0xd)]);return console['log'](_0x239c7a['meEDD']),_0x294694;}else{_0x12a1e2['error'](_0x239c7a[_0x419b(0x17)],_0x400a3d);throw _0x46d117;}}catch(_0x10d3b2){if(_0x239c7a[_0x419b(0x18)]===_0x239c7a[_0x419b(0x18)]){console[_0x419b(0xf)](_0x239c7a['lhYxH'],_0x10d3b2);throw _0x10d3b2;}else{const _0x507308=_0x16a4f6[_0x419b(0x19)](_0x5da810+_0x2e4baa)[_0x419b(0xb)]();return _0x593f45[_0x419b(0x7)](_0x239c7a[_0x419b(0x1a)]),_0x507308;}}};export const getEncryptedPinForAPI=async()=>{const _0x5ece8b={'TjMPn':function(_0x4b2776,_0xcc6b57){return _0x4b2776+_0xcc6b57;},'yFwCn':_0x419b(0x12),'KBjNl':_0x419b(0x11),'NdlPC':function(_0x23decf,_0xeac6b8){return _0x23decf!==_0xeac6b8;},'iUoRz':_0x419b(0x1b),'juDyr':_0x419b(0x1c),'ACEQG':_0x419b(0x1d),'TzUET':_0x419b(0x1e)};try{if(_0x5ece8b[_0x419b(0x1f)](_0x5ece8b[_0x419b(0x20)],_0x419b(0x21))){const _0x5990a8=getTemporaryPin();if(!_0x5990a8)return console[_0x419b(0x7)](_0x5ece8b[_0x419b(0x22)]),null;const _0x3b220d=encryptPin(_0x5990a8);return console[_0x419b(0x7)](_0x5ece8b[_0x419b(0x23)]),_0x3b220d;}else try{const _0x596d6f=_0xac600e[_0x419b(0x19)](_0x5ece8b[_0x419b(0x24)](_0x1ab649,_0x3feb87))[_0x419b(0xb)]();return _0x35c415[_0x419b(0x7)](_0x5ece8b[_0x419b(0x25)]),_0x596d6f;}catch(_0x134a28){_0x31b51a[_0x419b(0xf)](_0x5ece8b['KBjNl'],_0x134a28);throw _0x134a28;}}catch(_0x55b087){return console[_0x419b(0xf)](_0x5ece8b[_0x419b(0x26)],_0x55b087),null;}};export const hashPin=_0x4003f4=>{const _0x3c15a4={'AsVWN':function(_0x351332,_0x32cf84){return _0x351332+_0x32cf84;},'jDMwO':_0x419b(0x12),'hyiXP':_0x419b(0x27),'iqoPB':'❌\x20Error\x20hashing\x20PIN:'};try{const _0x666174=CryptoJS[_0x419b(0x19)](_0x3c15a4[_0x419b(0x28)](_0x4003f4,ENCRYPTION_KEY))['toString']();return console[_0x419b(0x7)](_0x3c15a4[_0x419b(0x29)]),_0x666174;}catch(_0x280534){if(_0x3c15a4['hyiXP']!==_0x3c15a4['hyiXP']){_0x58ae09[_0x419b(0xf)]('❌\x20Error\x20decrypting\x20PIN:',_0x392e04);throw _0x190722;}else{console[_0x419b(0xf)](_0x3c15a4[_0x419b(0x2a)],_0x280534);throw _0x280534;}}};
7
+ const CryptoJS=__ONAIROS_REQ_FUNC__(0x0);function _0x317d(_0x534b68,_0x317d8c){_0x534b68=_0x534b68-0x0;const _0x479271=_0x534b();let _0x5b8532=_0x479271[_0x534b68];return _0x5b8532;}import{getTemporaryPin}from'./pinStorageUtils';function _0x534b(){const _0x324468=['onairos-pin-encryption-key-2024','🔐\x20PIN\x20encrypted\x20successfully','❌\x20Error\x20encrypting\x20PIN:','AES','encrypt','log','QNNMo','error','vYimY','❌\x20Error\x20hashing\x20PIN:','❌\x20Error\x20decrypting\x20PIN:','ukGLw','mFFEq','zHgwz','decrypt','toString','Utf8','ooZyG','RDOJA','🔒\x20PIN\x20hashed\x20successfully','ABCmB','AlaSq','EGFqf','⚠️\x20No\x20temporary\x20PIN\x20available\x20for\x20encryption','✅\x20PIN\x20encrypted\x20for\x20API\x20transmission','❌\x20Error\x20getting\x20encrypted\x20PIN\x20for\x20API:','mfTnt','tkQtz','JuWmO','rfHml','SHA256','PapYT','fkvAB','JGZhV','wvQFA','oTNAL'];_0x534b=function(){return _0x324468;};return _0x534b();}const ENCRYPTION_KEY=_0x317d(0x0);export const encryptPin=_0x52313d=>{const _0x8745a={'QNNMo':_0x317d(0x1),'vYimY':_0x317d(0x2)};try{const _0x50f1a2=CryptoJS[_0x317d(0x3)][_0x317d(0x4)](_0x52313d,ENCRYPTION_KEY)['toString']();return console[_0x317d(0x5)](_0x8745a[_0x317d(0x6)]),_0x50f1a2;}catch(_0x351754){console[_0x317d(0x7)](_0x8745a[_0x317d(0x8)],_0x351754);throw _0x351754;}};export const decryptPin=_0x481a3a=>{const _0x1df8d4={'kRPzt':_0x317d(0x9),'RDOJA':_0x317d(0xa),'ooZyG':function(_0x4f91d6,_0x241116){return _0x4f91d6===_0x241116;},'zHgwz':_0x317d(0xb),'rSPpY':'JMkAW','clucj':_0x317d(0xc)};try{if(_0x1df8d4['ooZyG'](_0x1df8d4[_0x317d(0xd)],_0x1df8d4[_0x317d(0xd)])){const _0x41c97b=CryptoJS['AES'][_0x317d(0xe)](_0x481a3a,ENCRYPTION_KEY),_0x5b047e=_0x41c97b[_0x317d(0xf)](CryptoJS['enc'][_0x317d(0x10)]);return console[_0x317d(0x5)]('🔓\x20PIN\x20decrypted\x20successfully'),_0x5b047e;}else{_0x2948da[_0x317d(0x7)](_0x1df8d4['kRPzt'],_0x40f753);throw _0xf45c9a;}}catch(_0x2fa0ab){if(_0x1df8d4[_0x317d(0x11)](_0x1df8d4['rSPpY'],_0x1df8d4['clucj'])){_0x352881[_0x317d(0x7)](_0x1df8d4[_0x317d(0x12)],_0x23a919);throw _0x23baa2;}else{console[_0x317d(0x7)](_0x317d(0xa),_0x2fa0ab);throw _0x2fa0ab;}}};export const getEncryptedPinForAPI=async()=>{const _0x56021b={'JuWmO':'❌\x20Error\x20encrypting\x20PIN:','PapYT':_0x317d(0x13),'mfTnt':_0x317d(0x14),'sBgRf':function(_0x4cbd3e){return _0x4cbd3e();},'Uzupl':_0x317d(0x15),'tkQtz':_0x317d(0x16),'rfHml':_0x317d(0x17),'Oezsf':_0x317d(0x18),'fkvAB':_0x317d(0x19)};try{if(_0x56021b[_0x317d(0x1a)]===_0x317d(0x14)){const _0x44f7c2=_0x56021b['sBgRf'](getTemporaryPin);if(!_0x44f7c2){if(_0x56021b['Uzupl']===_0x56021b[_0x317d(0x1b)]){_0x155d49[_0x317d(0x7)](_0x56021b[_0x317d(0x1c)],_0x128fbb);throw _0x2fc139;}else return console[_0x317d(0x5)](_0x56021b[_0x317d(0x1d)]),null;}const _0x29d920=encryptPin(_0x44f7c2);return console['log'](_0x56021b['Oezsf']),_0x29d920;}else{const _0x32de32=_0x5a5ef7[_0x317d(0x1e)](_0x14c680+_0x402c75)[_0x317d(0xf)]();return _0x231988[_0x317d(0x5)](_0x56021b[_0x317d(0x1f)]),_0x32de32;}}catch(_0x35d691){return console['error'](_0x56021b[_0x317d(0x20)],_0x35d691),null;}};export const hashPin=_0x3949ed=>{const _0x473bf8={'JGZhV':function(_0x2b8bca,_0x5cc700){return _0x2b8bca+_0x5cc700;},'wvQFA':'🔒\x20PIN\x20hashed\x20successfully','oTNAL':_0x317d(0x9)};try{const _0x26e0c2=CryptoJS['SHA256'](_0x473bf8[_0x317d(0x21)](_0x3949ed,ENCRYPTION_KEY))[_0x317d(0xf)]();return console['log'](_0x473bf8[_0x317d(0x22)]),_0x26e0c2;}catch(_0x11ba92){console[_0x317d(0x7)](_0x473bf8[_0x317d(0x23)],_0x11ba92);throw _0x11ba92;}};
@@ -1 +1 @@
1
- import{biometricPinService}from'./biometricPinService';function _0x43ed(_0xb6c377,_0x43ed22){_0xb6c377=_0xb6c377-0x0;const _0x4be8db=_0xb6c3();let _0x104297=_0x4be8db[_0xb6c377];return _0x104297;}export const getStoredPinForTraining=async()=>{const _0x32d999={'ktech':'📝\x20Using\x20temporary\x20PIN\x20for\x20training','PCFXI':_0x43ed(0x0),'OnQMp':function(_0x518575,_0x4aad4f){return _0x518575!==_0x4aad4f;},'ipvbS':'ifBqw','sRIdP':'ZTJhX','fVDhF':_0x43ed(0x1),'QQQof':'⚠️\x20No\x20PIN\x20stored\x20in\x20secure\x20storage','HHYsU':_0x43ed(0x2),'vmNhD':_0x43ed(0x3),'xLqeu':_0x43ed(0x4)};try{if(_0x32d999[_0x43ed(0x5)](_0x32d999[_0x43ed(0x6)],_0x32d999['sRIdP'])){console[_0x43ed(0x7)](_0x32d999[_0x43ed(0x8)]);const _0x57faad=await biometricPinService[_0x43ed(0x9)]();if(!_0x57faad)return console[_0x43ed(0x7)](_0x32d999[_0x43ed(0xa)]),null;const _0x155dc4=await biometricPinService[_0x43ed(0xb)]();return _0x155dc4?_0x32d999[_0x43ed(0xc)]!==_0x43ed(0xd)?(console[_0x43ed(0x7)](_0x32d999[_0x43ed(0xe)]),_0x155dc4):(_0xf3c4ee[_0x43ed(0x7)](_0x32d999[_0x43ed(0xf)]),_0x5d21b6):(console[_0x43ed(0x7)](_0x32d999[_0x43ed(0x10)]),null);}else return _0x3fa208['error'](_0x32d999[_0x43ed(0x11)],_0x1b8133),null;}catch(_0x37a6bd){return console[_0x43ed(0x12)](_0x32d999[_0x43ed(0x11)],_0x37a6bd),null;}};export const hasStoredPin=async()=>{const _0x4d15a1={'HLIsw':_0x43ed(0x4),'zqbJt':_0x43ed(0x13),'LUeUI':'TVimV','jpPpn':_0x43ed(0x14)};try{return await biometricPinService[_0x43ed(0x9)]();}catch(_0xf3bd33){return _0x4d15a1[_0x43ed(0x15)]===_0x4d15a1[_0x43ed(0x16)]?(_0x348f66[_0x43ed(0x7)](_0x4d15a1[_0x43ed(0x17)]),null):(console[_0x43ed(0x12)](_0x4d15a1[_0x43ed(0x18)],_0xf3bd33),![]);}};export const clearStoredPin=async()=>{const _0xc0687d={'pAZGu':_0x43ed(0x19),'hRDuT':function(_0x1795a5,_0x2a7282){return _0x1795a5!==_0x2a7282;},'CPEUj':_0x43ed(0x1a),'DNczM':'AQZsa','DZFCj':_0x43ed(0x1b)};try{if(_0xc0687d[_0x43ed(0x1c)](_0xc0687d[_0x43ed(0x1d)],_0xc0687d[_0x43ed(0x1e)]))return console[_0x43ed(0x7)](_0x43ed(0x1f)),await biometricPinService['removePinFromStorage']();else _0x17cb9f=null,_0x4d06b1[_0x43ed(0x7)](_0xc0687d[_0x43ed(0x20)]);}catch(_0x47a955){return console[_0x43ed(0x12)](_0xc0687d['DZFCj'],_0x47a955),![];}};export const getPinForTraining=async _0x5e2da3=>{const _0x92897a={'YvzwV':function(_0x3fd5f,_0x12a00f){return _0x3fd5f!==_0x12a00f;},'MggPW':_0x43ed(0x21),'PoFhF':_0x43ed(0x22)};if(_0x5e2da3)return _0x92897a[_0x43ed(0x23)](_0x92897a[_0x43ed(0x24)],_0x92897a[_0x43ed(0x25)])?(console[_0x43ed(0x7)](_0x43ed(0x26)),_0x5e2da3):_0x143d62;return await getStoredPinForTraining();};let temporaryPin=null;export const setTemporaryPin=_0xd2498a=>{temporaryPin=_0xd2498a,console[_0x43ed(0x7)](_0x43ed(0x27));};export const getTemporaryPin=()=>{return temporaryPin;};function _0xb6c3(){const _0x392265=['❌\x20Error\x20retrieving\x20stored\x20PIN:','🔓\x20Retrieving\x20stored\x20PIN\x20for\x20training...','jWtpi','✅\x20PIN\x20retrieved\x20successfully\x20for\x20training','❌\x20Failed\x20to\x20retrieve\x20PIN\x20or\x20user\x20cancelled\x20authentication','OnQMp','ipvbS','log','fVDhF','isPinStored','QQQof','retrievePinWithBiometric','HHYsU','lwOfK','vmNhD','ktech','xLqeu','PCFXI','error','lAyjC','❌\x20Error\x20checking\x20PIN\x20storage:','zqbJt','LUeUI','HLIsw','jpPpn','🗑️\x20Temporary\x20PIN\x20cleared','EFpzv','❌\x20Error\x20clearing\x20stored\x20PIN:','hRDuT','CPEUj','DNczM','🗑️\x20Clearing\x20stored\x20PIN...','pAZGu','BZTcg','CmKWI','YvzwV','MggPW','PoFhF','📝\x20Using\x20temporary\x20PIN\x20for\x20training','📝\x20Temporary\x20PIN\x20set\x20for\x20training','XoDYy'];_0xb6c3=function(){return _0x392265;};return _0xb6c3();}export const clearTemporaryPin=()=>{const _0x1d9c7e={'XoDYy':'🗑️\x20Temporary\x20PIN\x20cleared'};temporaryPin=null,console[_0x43ed(0x7)](_0x1d9c7e[_0x43ed(0x28)]);};
1
+ import{biometricPinService}from'./biometricPinService';export const getStoredPinForTraining=async()=>{const _0x399f58={'yxHZT':function(_0x422680,_0x2df43f){return _0x422680===_0x2df43f;},'OeFyt':_0x4fb1(0x0),'QLhcH':_0x4fb1(0x1),'OEeaB':'✅\x20PIN\x20retrieved\x20successfully\x20for\x20training','BDjSp':function(_0x1b1b25,_0x8bb7fa){return _0x1b1b25===_0x8bb7fa;},'smqQJ':_0x4fb1(0x2),'bLdaM':_0x4fb1(0x3)};try{if(_0x399f58[_0x4fb1(0x4)](_0x399f58[_0x4fb1(0x5)],_0x399f58['OeFyt'])){console[_0x4fb1(0x6)](_0x4fb1(0x7));const _0x1dc592=await biometricPinService[_0x4fb1(0x8)]();if(!_0x1dc592)return console[_0x4fb1(0x6)](_0x399f58[_0x4fb1(0x9)]),null;const _0x541330=await biometricPinService['retrievePinWithBiometric']();return _0x541330?(console['log'](_0x399f58[_0x4fb1(0xa)]),_0x541330):_0x399f58[_0x4fb1(0xb)](_0x399f58[_0x4fb1(0xc)],_0x399f58['smqQJ'])?(console[_0x4fb1(0x6)]('❌\x20Failed\x20to\x20retrieve\x20PIN\x20or\x20user\x20cancelled\x20authentication'),null):(_0x410eb4[_0x4fb1(0x6)]('❌\x20Failed\x20to\x20retrieve\x20PIN\x20or\x20user\x20cancelled\x20authentication'),null);}else return _0x195d4e[_0x4fb1(0x6)](_0x4fb1(0xd)),_0x55a49c;}catch(_0x5e2c6d){return console['error'](_0x399f58[_0x4fb1(0xe)],_0x5e2c6d),null;}};function _0x3d01(){const _0x43764f=['OSISO','⚠️\x20No\x20PIN\x20stored\x20in\x20secure\x20storage','BjbwH','❌\x20Error\x20retrieving\x20stored\x20PIN:','yxHZT','OeFyt','log','🔓\x20Retrieving\x20stored\x20PIN\x20for\x20training...','isPinStored','QLhcH','OEeaB','BDjSp','smqQJ','📝\x20Using\x20temporary\x20PIN\x20for\x20training','bLdaM','sqxOy','yTisD','fUGol','❌\x20Error\x20checking\x20PIN\x20storage:','NTrhr','pZdEL','uCFJe','GFjYm','🗑️\x20Clearing\x20stored\x20PIN...','removePinFromStorage','error','qHhHo','qMaqr','UXdAi','📝\x20Temporary\x20PIN\x20set\x20for\x20training','xXuDF','🗑️\x20Temporary\x20PIN\x20cleared','dmilX'];_0x3d01=function(){return _0x43764f;};return _0x3d01();}export const hasStoredPin=async()=>{const _0x520a12={'GFjYm':'🗑️\x20Temporary\x20PIN\x20cleared','NTrhr':_0x4fb1(0xf),'SVqaN':_0x4fb1(0x10),'pZdEL':function(_0x216eb8,_0x3772c5){return _0x216eb8===_0x3772c5;},'uCFJe':_0x4fb1(0x11),'WwLUP':_0x4fb1(0x12)};try{return _0x520a12[_0x4fb1(0x13)]===_0x520a12['SVqaN']?(_0x42c001['error'](_0x4fb1(0x12),_0x46452f),![]):await biometricPinService['isPinStored']();}catch(_0x25070d){if(_0x520a12[_0x4fb1(0x14)](_0x4fb1(0x11),_0x520a12[_0x4fb1(0x15)]))return console['error'](_0x520a12['WwLUP'],_0x25070d),![];else _0x188bb0=null,_0x47d6ea[_0x4fb1(0x6)](_0x520a12[_0x4fb1(0x16)]);}};function _0x4fb1(_0x3d0137,_0x4fb1a5){_0x3d0137=_0x3d0137-0x0;const _0x8f9e13=_0x3d01();let _0x566237=_0x8f9e13[_0x3d0137];return _0x566237;}export const clearStoredPin=async()=>{const _0x1cbf2f={'zZaca':_0x4fb1(0x17),'qHhHo':'❌\x20Error\x20clearing\x20stored\x20PIN:'};try{return console[_0x4fb1(0x6)](_0x1cbf2f['zZaca']),await biometricPinService[_0x4fb1(0x18)]();}catch(_0x663d67){return console[_0x4fb1(0x19)](_0x1cbf2f[_0x4fb1(0x1a)],_0x663d67),![];}};export const getPinForTraining=async _0x382f27=>{const _0x38dc65={'qMaqr':_0x4fb1(0xd),'UXdAi':function(_0x377a47){return _0x377a47();}};if(_0x382f27)return console['log'](_0x38dc65[_0x4fb1(0x1b)]),_0x382f27;return await _0x38dc65[_0x4fb1(0x1c)](getStoredPinForTraining);};let temporaryPin=null;export const setTemporaryPin=_0x519f13=>{const _0x16b233={'xXuDF':_0x4fb1(0x1d)};temporaryPin=_0x519f13,console[_0x4fb1(0x6)](_0x16b233[_0x4fb1(0x1e)]);};export const getTemporaryPin=()=>{return temporaryPin;};export const clearTemporaryPin=()=>{const _0xe904c4={'dmilX':_0x4fb1(0x1f)};temporaryPin=null,console[_0x4fb1(0x6)](_0xe904c4[_0x4fb1(0x20)]);};