@onairos/react-native 3.5.4 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. package/README.md +423 -423
  2. package/lib/commonjs/api/index.js +1 -1
  3. package/lib/commonjs/assets/images/Checkbox.svg +3 -3
  4. package/lib/commonjs/assets/images/EnochE.svg +19 -19
  5. package/lib/commonjs/assets/images/OnairosNewLogo.png +0 -0
  6. package/lib/commonjs/assets/images/Personalityprofile.svg +3 -3
  7. package/lib/commonjs/assets/images/Personalitytraits.svg +3 -3
  8. package/lib/commonjs/assets/images/Userpreferences.svg +3 -3
  9. package/lib/commonjs/assets/images/arrow.svg +20 -20
  10. package/lib/commonjs/assets/images/basicproficon.svg +43 -43
  11. package/lib/commonjs/assets/images/basicprofile.svg +3 -3
  12. package/lib/commonjs/assets/images/checkmark.svg +4 -4
  13. package/lib/commonjs/assets/images/contentanalysis.svg +3 -3
  14. package/lib/commonjs/assets/images/contenticon.svg +23 -23
  15. package/lib/commonjs/assets/images/personalityicon.svg +18 -18
  16. package/lib/commonjs/assets/images/x-close.svg +3 -3
  17. package/lib/commonjs/components/BodyText.js +1 -1
  18. package/lib/commonjs/components/BrandMark.js +1 -1
  19. package/lib/commonjs/components/CodeInput.js +1 -1
  20. package/lib/commonjs/components/EmailInput.js +1 -1
  21. package/lib/commonjs/components/GoogleButton.js +1 -1
  22. package/lib/commonjs/components/HeadingGroup.js +1 -1
  23. package/lib/commonjs/components/LLMDataInputModal.js +1 -1
  24. package/lib/commonjs/components/ModalHeader.js +1 -1
  25. package/lib/commonjs/components/ModalSheet.js +1 -1
  26. package/lib/commonjs/components/Onairos.js +1 -1
  27. package/lib/commonjs/components/OnairosButton.js +1 -1
  28. package/lib/commonjs/components/OnairosSignInButton.js +1 -1
  29. package/lib/commonjs/components/Overlay.js +1 -1
  30. package/lib/commonjs/components/PersonaImage.js +1 -1
  31. package/lib/commonjs/components/PersonaLoadingScreen.js +1 -1
  32. package/lib/commonjs/components/PersonalizationConsentScreen.js +1 -1
  33. package/lib/commonjs/components/PinCreationScreen.js +1 -1
  34. package/lib/commonjs/components/PinInput.js +1 -1
  35. package/lib/commonjs/components/PlatformConnectorsStep.js +3 -2
  36. package/lib/commonjs/components/PlatformList.js +1 -1
  37. package/lib/commonjs/components/PlatformToggle.js +1 -1
  38. package/lib/commonjs/components/PrimaryButton.js +1 -1
  39. package/lib/commonjs/components/SignInMatchAnimation.js +1 -1
  40. package/lib/commonjs/components/SignInStep.js +1 -1
  41. package/lib/commonjs/components/UniversalOnboarding.js +2 -1
  42. package/lib/commonjs/components/VerificationStep.js +1 -1
  43. package/lib/commonjs/components/WelcomeScreen.js +2 -1
  44. package/lib/commonjs/components/icons/Basicproficon.js +1 -1
  45. package/lib/commonjs/components/icons/Basicprofile.js +1 -1
  46. package/lib/commonjs/components/icons/Checkbox.js +1 -1
  47. package/lib/commonjs/components/icons/Checkmark.js +1 -1
  48. package/lib/commonjs/components/icons/Contentanalysis.js +1 -1
  49. package/lib/commonjs/components/icons/Contenticon.js +1 -1
  50. package/lib/commonjs/components/icons/EnochE.js +1 -1
  51. package/lib/commonjs/components/icons/Personalityicon.js +1 -1
  52. package/lib/commonjs/components/icons/Personalityprofile.js +1 -1
  53. package/lib/commonjs/components/icons/Personalitytraits.js +1 -1
  54. package/lib/commonjs/components/icons/Userpreferences.js +1 -1
  55. package/lib/commonjs/components/icons/index.js +1 -1
  56. package/lib/commonjs/components/onboarding/OAuthWebView.js +6 -2
  57. package/lib/commonjs/components/onboarding/OnboardingHeader.js +1 -1
  58. package/lib/commonjs/components/onboarding/PinInput.js +1 -1
  59. package/lib/commonjs/components/onboarding/PlatformConnector.js +1 -1
  60. package/lib/commonjs/config/api.js +1 -1
  61. package/lib/commonjs/constants/index.js +1 -1
  62. package/lib/commonjs/context/AuthContext.js +1 -1
  63. package/lib/commonjs/hooks/useConnectedAccounts.js +1 -1
  64. package/lib/commonjs/hooks/useConnections.js +1 -1
  65. package/lib/commonjs/hooks/useCredentials.js +1 -1
  66. package/lib/commonjs/hooks/useUserConnections.js +1 -1
  67. package/lib/commonjs/index.js +5 -6
  68. package/lib/commonjs/services/SDK_API_KEY_VALIDATION.md +421 -421
  69. package/lib/commonjs/services/apiClient.js +1 -1
  70. package/lib/commonjs/services/apiKeyService.js +1 -1
  71. package/lib/commonjs/services/authService.js +1 -1
  72. package/lib/commonjs/services/biometricPinService.js +1 -1
  73. package/lib/commonjs/services/chatGPTConversationExtractor.js +1 -1
  74. package/lib/commonjs/services/chatGPTConversationService.js +1 -1
  75. package/lib/commonjs/services/claudeConversationExtractor.js +1 -1
  76. package/lib/commonjs/services/claudeConversationService.js +1 -1
  77. package/lib/commonjs/services/connectedAccountsService.js +1 -1
  78. package/lib/commonjs/services/googleAuthService.js +1 -1
  79. package/lib/commonjs/services/hingeDataExtractor.js +8 -0
  80. package/lib/commonjs/services/hingeDataService.js +9 -0
  81. package/lib/commonjs/services/imageCompressionService.js +1 -1
  82. package/lib/commonjs/services/instagramDataExtractor.js +8 -0
  83. package/lib/commonjs/services/instagramDataService.js +9 -0
  84. package/lib/commonjs/services/jwtStorageService.js +1 -1
  85. package/lib/commonjs/services/linkedinDOMExtractor.js +1 -1
  86. package/lib/commonjs/services/linkedinProfileService.js +1 -1
  87. package/lib/commonjs/services/linkedinScrapingService.js +1 -1
  88. package/lib/commonjs/services/llmDataStorage.js +1 -1
  89. package/lib/commonjs/services/mobileTrainingService.js +1 -1
  90. package/lib/commonjs/services/oauthService.js +1 -1
  91. package/lib/commonjs/services/pinEncryptionService.js +1 -1
  92. package/lib/commonjs/services/pinStorageUtils.js +1 -1
  93. package/lib/commonjs/services/platformAuthService.js +1 -1
  94. package/lib/commonjs/services/sephoraDataExtractor.js +8 -0
  95. package/lib/commonjs/services/sephoraDataService.js +9 -0
  96. package/lib/commonjs/services/storageService.js +1 -1
  97. package/lib/commonjs/services/telegramDataExtractor.js +8 -0
  98. package/lib/commonjs/services/telegramDataService.js +11 -0
  99. package/lib/commonjs/services/trainingApiHelpers.js +1 -1
  100. package/lib/commonjs/services/userConnectionsService.js +1 -1
  101. package/lib/commonjs/services/youtubeMigrationService.js +1 -1
  102. package/lib/commonjs/theme/index.js +1 -1
  103. package/lib/commonjs/types/index.js +1 -1
  104. package/lib/commonjs/types.js +1 -1
  105. package/lib/commonjs/utils/Portal.js +1 -1
  106. package/lib/commonjs/utils/api.js +1 -1
  107. package/lib/commonjs/utils/assetRegistry.js +2 -2
  108. package/lib/commonjs/utils/auth.js +1 -1
  109. package/lib/commonjs/utils/connectorTests.js +29 -0
  110. package/lib/commonjs/utils/crypto.js +1 -1
  111. package/lib/commonjs/utils/debugHelper.js +1 -1
  112. package/lib/commonjs/utils/encryption.js +1 -1
  113. package/lib/commonjs/utils/eventUtils.js +1 -1
  114. package/lib/commonjs/utils/haptics.js +1 -1
  115. package/lib/commonjs/utils/imagePreloader.js +1 -1
  116. package/lib/commonjs/utils/networkDiagnostics.js +1 -1
  117. package/lib/commonjs/utils/onairosApi.js +1 -1
  118. package/lib/commonjs/utils/programmaticFlow.js +1 -1
  119. package/lib/commonjs/utils/retryHelper.js +1 -1
  120. package/lib/commonjs/utils/secureStorage.js +1 -1
  121. package/lib/commonjs/utils/webviewScripts/chatgpt.js +1 -1
  122. package/lib/commonjs/utils/webviewScripts/claude.js +1 -1
  123. package/lib/commonjs/utils/webviewScripts/hinge.js +1 -0
  124. package/lib/commonjs/utils/webviewScripts/index.js +6 -2
  125. package/lib/commonjs/utils/webviewScripts/instagram.js +1 -0
  126. package/lib/commonjs/utils/webviewScripts/linkedin.js +1 -1
  127. package/lib/commonjs/utils/webviewScripts/sephora.js +1 -0
  128. package/lib/commonjs/utils/webviewScripts/telegram.js +1 -0
  129. package/lib/module/api/index.js +1 -1
  130. package/lib/module/assets/images/Checkbox.svg +3 -3
  131. package/lib/module/assets/images/EnochE.svg +19 -19
  132. package/lib/module/assets/images/OnairosNewLogo.png +0 -0
  133. package/lib/module/assets/images/Personalityprofile.svg +3 -3
  134. package/lib/module/assets/images/Personalitytraits.svg +3 -3
  135. package/lib/module/assets/images/Userpreferences.svg +3 -3
  136. package/lib/module/assets/images/arrow.svg +20 -20
  137. package/lib/module/assets/images/basicproficon.svg +43 -43
  138. package/lib/module/assets/images/basicprofile.svg +3 -3
  139. package/lib/module/assets/images/checkmark.svg +4 -4
  140. package/lib/module/assets/images/contentanalysis.svg +3 -3
  141. package/lib/module/assets/images/contenticon.svg +23 -23
  142. package/lib/module/assets/images/personalityicon.svg +18 -18
  143. package/lib/module/assets/images/x-close.svg +3 -3
  144. package/lib/module/components/BodyText.js +1 -1
  145. package/lib/module/components/BrandMark.js +1 -1
  146. package/lib/module/components/CodeInput.js +1 -1
  147. package/lib/module/components/EmailInput.js +1 -1
  148. package/lib/module/components/GoogleButton.js +1 -1
  149. package/lib/module/components/HeadingGroup.js +1 -1
  150. package/lib/module/components/LLMDataInputModal.js +1 -1
  151. package/lib/module/components/ModalHeader.js +1 -1
  152. package/lib/module/components/ModalSheet.js +1 -1
  153. package/lib/module/components/Onairos.js +1 -1
  154. package/lib/module/components/OnairosButton.js +1 -1
  155. package/lib/module/components/OnairosSignInButton.js +1 -1
  156. package/lib/module/components/Overlay.js +1 -1
  157. package/lib/module/components/PersonaImage.js +1 -1
  158. package/lib/module/components/PersonaLoadingScreen.js +1 -1
  159. package/lib/module/components/PersonalizationConsentScreen.js +1 -1
  160. package/lib/module/components/PinCreationScreen.js +1 -1
  161. package/lib/module/components/PinInput.js +1 -1
  162. package/lib/module/components/PlatformConnectorsStep.js +7 -1
  163. package/lib/module/components/PlatformList.js +1 -1
  164. package/lib/module/components/PlatformToggle.js +1 -1
  165. package/lib/module/components/PrimaryButton.js +1 -1
  166. package/lib/module/components/SignInMatchAnimation.js +1 -1
  167. package/lib/module/components/SignInStep.js +1 -1
  168. package/lib/module/components/UniversalOnboarding.js +1 -1
  169. package/lib/module/components/VerificationStep.js +1 -1
  170. package/lib/module/components/WelcomeScreen.js +1 -1
  171. package/lib/module/components/icons/Basicproficon.js +1 -1
  172. package/lib/module/components/icons/Basicprofile.js +1 -1
  173. package/lib/module/components/icons/Checkbox.js +1 -1
  174. package/lib/module/components/icons/Checkmark.js +1 -1
  175. package/lib/module/components/icons/Contentanalysis.js +1 -1
  176. package/lib/module/components/icons/Contenticon.js +1 -1
  177. package/lib/module/components/icons/EnochE.js +1 -1
  178. package/lib/module/components/icons/Personalityicon.js +1 -1
  179. package/lib/module/components/icons/Personalityprofile.js +1 -1
  180. package/lib/module/components/icons/Personalitytraits.js +1 -1
  181. package/lib/module/components/icons/Userpreferences.js +1 -1
  182. package/lib/module/components/onboarding/OAuthWebView.js +1 -1
  183. package/lib/module/components/onboarding/OnboardingHeader.js +1 -1
  184. package/lib/module/components/onboarding/PinInput.js +1 -1
  185. package/lib/module/components/onboarding/PlatformConnector.js +1 -1
  186. package/lib/module/config/api.js +1 -1
  187. package/lib/module/constants/index.js +1 -1
  188. package/lib/module/context/AuthContext.js +1 -1
  189. package/lib/module/hooks/useConnectedAccounts.js +1 -1
  190. package/lib/module/hooks/useConnections.js +1 -1
  191. package/lib/module/hooks/useCredentials.js +1 -1
  192. package/lib/module/hooks/useUserConnections.js +1 -1
  193. package/lib/module/index.js +1 -1
  194. package/lib/module/services/SDK_API_KEY_VALIDATION.md +421 -421
  195. package/lib/module/services/apiClient.js +1 -1
  196. package/lib/module/services/apiKeyService.js +1 -1
  197. package/lib/module/services/authService.js +1 -1
  198. package/lib/module/services/biometricPinService.js +1 -1
  199. package/lib/module/services/chatGPTConversationExtractor.js +1 -1
  200. package/lib/module/services/chatGPTConversationService.js +1 -1
  201. package/lib/module/services/claudeConversationExtractor.js +1 -1
  202. package/lib/module/services/claudeConversationService.js +1 -1
  203. package/lib/module/services/connectedAccountsService.js +1 -1
  204. package/lib/module/services/googleAuthService.js +1 -1
  205. package/lib/module/services/hingeDataExtractor.js +1 -0
  206. package/lib/module/services/hingeDataService.js +1 -0
  207. package/lib/module/services/imageCompressionService.js +1 -1
  208. package/lib/module/services/instagramDataExtractor.js +1 -0
  209. package/lib/module/services/instagramDataService.js +1 -0
  210. package/lib/module/services/jwtStorageService.js +1 -1
  211. package/lib/module/services/linkedinDOMExtractor.js +1 -1
  212. package/lib/module/services/linkedinProfileService.js +1 -1
  213. package/lib/module/services/linkedinScrapingService.js +1 -1
  214. package/lib/module/services/llmDataStorage.js +1 -1
  215. package/lib/module/services/mobileTrainingService.js +1 -1
  216. package/lib/module/services/oauthService.js +1 -1
  217. package/lib/module/services/pinEncryptionService.js +1 -1
  218. package/lib/module/services/pinStorageUtils.js +1 -1
  219. package/lib/module/services/platformAuthService.js +1 -1
  220. package/lib/module/services/sephoraDataExtractor.js +1 -0
  221. package/lib/module/services/sephoraDataService.js +1 -0
  222. package/lib/module/services/storageService.js +1 -1
  223. package/lib/module/services/telegramDataExtractor.js +1 -0
  224. package/lib/module/services/telegramDataService.js +8 -0
  225. package/lib/module/services/trainingApiHelpers.js +1 -1
  226. package/lib/module/services/userConnectionsService.js +1 -1
  227. package/lib/module/services/youtubeMigrationService.js +1 -1
  228. package/lib/module/theme/index.js +1 -1
  229. package/lib/module/types.js +1 -1
  230. package/lib/module/utils/Portal.js +1 -1
  231. package/lib/module/utils/api.js +1 -1
  232. package/lib/module/utils/assetRegistry.js +2 -2
  233. package/lib/module/utils/auth.js +1 -1
  234. package/lib/module/utils/connectorTests.js +28 -0
  235. package/lib/module/utils/crypto.js +1 -1
  236. package/lib/module/utils/debugHelper.js +1 -1
  237. package/lib/module/utils/encryption.js +1 -1
  238. package/lib/module/utils/eventUtils.js +1 -1
  239. package/lib/module/utils/haptics.js +1 -1
  240. package/lib/module/utils/networkDiagnostics.js +1 -1
  241. package/lib/module/utils/onairosApi.js +1 -1
  242. package/lib/module/utils/programmaticFlow.js +1 -1
  243. package/lib/module/utils/retryHelper.js +1 -1
  244. package/lib/module/utils/secureStorage.js +1 -1
  245. package/lib/module/utils/webviewScripts/chatgpt.js +1 -1
  246. package/lib/module/utils/webviewScripts/claude.js +1 -1
  247. package/lib/module/utils/webviewScripts/hinge.js +1 -0
  248. package/lib/module/utils/webviewScripts/index.js +1 -1
  249. package/lib/module/utils/webviewScripts/instagram.js +1 -0
  250. package/lib/module/utils/webviewScripts/linkedin.js +1 -1
  251. package/lib/module/utils/webviewScripts/sephora.js +1 -0
  252. package/lib/module/utils/webviewScripts/telegram.js +1 -0
  253. package/package.json +1 -1
@@ -1 +1 @@
1
- import{Linking}from'react-native';import{updateCredentials}from'../utils/secureStorage';import{sha256}from'../utils/crypto';import{onairosApi}from'../api';import{API_CONFIG}from'../config/api';const OAUTH_CONFIGS={'instagram':{'clientId':_0x4b8d(0x0),'redirectUri':_0x4b8d(0x1),'scope':_0x4b8d(0x2),'authorizationEndpoint':_0x4b8d(0x3),'tokenEndpoint':_0x4b8d(0x4),'responseType':'code'},'youtube':{'clientId':_0x4b8d(0x5),'redirectUri':_0x4b8d(0x6),'scope':_0x4b8d(0x7),'authorizationEndpoint':'https://accounts.google.com/o/oauth2/auth','tokenEndpoint':_0x4b8d(0x8),'responseType':'code'},'pinterest':{'clientId':_0x4b8d(0x9),'redirectUri':_0x4b8d(0xa),'scope':_0x4b8d(0xb),'authorizationEndpoint':_0x4b8d(0xc),'tokenEndpoint':'https://api.pinterest.com/v5/oauth/token','responseType':_0x4b8d(0xd)},'reddit':{'clientId':_0x4b8d(0xe),'redirectUri':_0x4b8d(0xf),'scope':_0x4b8d(0x10),'authorizationEndpoint':_0x4b8d(0x11),'tokenEndpoint':_0x4b8d(0x12),'responseType':_0x4b8d(0xd)}},generateState=()=>{const _0x88e551={'JFAOD':function(_0x18032c,_0x5f3a62){return _0x18032c(_0x5f3a62);}},_0x10e8d0=Math[_0x4b8d(0x13)]()[_0x4b8d(0x14)](0x24)[_0x4b8d(0x15)](0x2,0xf);return _0x88e551[_0x4b8d(0x16)](sha256,_0x10e8d0)[_0x4b8d(0x15)](0x0,0xa);};export const initializeOAuthService=()=>{Linking['addEventListener'](_0x4b8d(0x17),handleDeepLink);};export const cleanupOAuthService=()=>{const _0x60a3ae={'qWvEj':function(_0x5e3a19,_0x293bb5){return _0x5e3a19(_0x293bb5);},'YtyDU':_0x4b8d(0x18),'dfYmV':function(_0x209030,_0x974f01){return _0x209030===_0x974f01;},'aVPPs':_0x4b8d(0x19),'IOhXR':function(_0x545dcd,_0x5338ab){return _0x545dcd!==_0x5338ab;},'AWHYY':_0x4b8d(0x1a),'QEYEf':_0x4b8d(0x1b)};_0x60a3ae[_0x4b8d(0x1c)](typeof Linking[_0x4b8d(0x1d)],_0x60a3ae[_0x4b8d(0x1e)])&&(_0x60a3ae[_0x4b8d(0x1f)](_0x60a3ae['AWHYY'],_0x60a3ae['QEYEf'])?Linking[_0x4b8d(0x1d)](_0x4b8d(0x17)):_0x60a3ae[_0x4b8d(0x20)](_0x7bc941,new _0x2acf49(_0x60a3ae[_0x4b8d(0x21)])));};function _0x4b8d(_0x357840,_0x4b8dee){_0x357840=_0x357840-0x0;const _0x4b9091=_0x3578();let _0x225b59=_0x4b9091[_0x357840];return _0x225b59;}let currentOAuthState=null,currentOAuthPlatform=null,currentOAuthResolve=null,currentOAuthReject=null;const handleDeepLink=async _0x397404=>{const _0x2095eb={'RaBjE':'OAuth\x20state\x20mismatch\x20-\x20possible\x20CSRF\x20attack','sjbyS':'onairosanime://auth/','EXOBo':_0x4b8d(0x22),'QMcxb':_0x4b8d(0xd),'QpgVC':_0x4b8d(0x23),'yilig':'error','YASwA':function(_0x2a66a6,_0x40ea8b){return _0x2a66a6!==_0x40ea8b;},'hrpUt':_0x4b8d(0x24),'HuaHX':function(_0x5539fd,_0x31ab18){return _0x5539fd(_0x31ab18);},'LKxFm':function(_0x3cb933,_0x175829){return _0x3cb933!==_0x175829;},'LCuEd':_0x4b8d(0x25),'MoBOY':function(_0x51e685,_0x1e32f9,_0x341e57){return _0x51e685(_0x1e32f9,_0x341e57);},'nopgJ':function(_0x4b4090,_0x5c2c94){return _0x4b4090(_0x5c2c94);},'bJSGp':_0x4b8d(0x26),'BQXlb':_0x4b8d(0x27),'BMJIg':function(_0x128574,_0x599ad9){return _0x128574(_0x599ad9);}};try{const {url:_0x53bb8a}=_0x397404;if(!_0x53bb8a[_0x4b8d(0x28)](_0x2095eb['sjbyS']))return;const _0x170bf1=_0x53bb8a[_0x4b8d(0x29)](_0x2095eb['sjbyS'])[0x1][_0x4b8d(0x29)]('?')[0x0];if(_0x170bf1!==currentOAuthPlatform){if(_0x2095eb['EXOBo']!==_0x2095eb['EXOBo'])throw new _0x407aad('Unsupported\x20platform:\x20'+_0x30de61);else return;}const _0x29c7c3=new URL(_0x53bb8a)[_0x4b8d(0x2a)],_0x22eb1c=_0x29c7c3[_0x4b8d(0x2b)](_0x2095eb[_0x4b8d(0x2c)]),_0x4a324e=_0x29c7c3[_0x4b8d(0x2b)](_0x2095eb[_0x4b8d(0x2d)]),_0x1a5afa=_0x29c7c3[_0x4b8d(0x2b)](_0x2095eb[_0x4b8d(0x2e)]);if(_0x2095eb[_0x4b8d(0x2f)](_0x4a324e,currentOAuthState)){if(_0x2095eb[_0x4b8d(0x2f)](_0x2095eb[_0x4b8d(0x30)],_0x4b8d(0x24)))return _0x71d314[_0x4b8d(0x31)](_0x4b8d(0x32)+_0x397d42+'):',_0x407be6),![];else{currentOAuthReject&&_0x2095eb[_0x4b8d(0x33)](currentOAuthReject,new Error(_0x2095eb[_0x4b8d(0x34)]));return;}}if(_0x1a5afa){if(_0x2095eb[_0x4b8d(0x35)](_0x2095eb[_0x4b8d(0x36)],_0x2095eb[_0x4b8d(0x36)])){_0x365278&&_0xf6607c(new _0x258d03(_0x2095eb[_0x4b8d(0x34)]));return;}else{currentOAuthReject&&_0x2095eb[_0x4b8d(0x33)](currentOAuthReject,new Error(_0x4b8d(0x37)+_0x1a5afa));return;}}if(_0x22eb1c){const _0xe8a7ab=await _0x2095eb[_0x4b8d(0x38)](exchangeCodeForToken,_0x170bf1,_0x22eb1c);currentOAuthResolve&&_0x2095eb['HuaHX'](currentOAuthResolve,_0xe8a7ab);}else currentOAuthReject&&_0x2095eb[_0x4b8d(0x39)](currentOAuthReject,new Error(_0x2095eb[_0x4b8d(0x3a)]));}catch(_0x54b1a6){console[_0x4b8d(0x31)](_0x2095eb[_0x4b8d(0x3b)],_0x54b1a6),currentOAuthReject&&_0x2095eb[_0x4b8d(0x3c)](currentOAuthReject,_0x54b1a6);}finally{currentOAuthState=null,currentOAuthPlatform=null,currentOAuthResolve=null,currentOAuthReject=null;}},exchangeCodeForToken=async(_0x405aa6,_0x37c9fe)=>{const _0xaf66fc={'NXdSH':function(_0x28d995,_0x29422b){return _0x28d995===_0x29422b;},'szBNA':'elOWa','TBhro':function(_0x178d0c,_0x5288fe){return _0x178d0c!==_0x5288fe;},'ALlan':_0x4b8d(0x3d),'awRJj':_0x4b8d(0x3e),'Jhmqj':function(_0xf7059,_0x33fa96,_0x53c41f){return _0xf7059(_0x33fa96,_0x53c41f);},'vFIwd':'application/x-www-form-urlencoded','RTMLB':function(_0x3111d6,_0x1b545f,_0x1c9ada){return _0x3111d6(_0x1b545f,_0x1c9ada);}};try{if(_0xaf66fc[_0x4b8d(0x3f)]===_0x4b8d(0x40)){const _0x3b22f5=OAUTH_CONFIGS[_0x405aa6];if(!_0x3b22f5){if(_0xaf66fc[_0x4b8d(0x41)](_0x4b8d(0x42),_0xaf66fc[_0x4b8d(0x43)]))throw new Error(_0x4b8d(0x44)+_0x405aa6);else _0xaf66fc[_0x4b8d(0x45)](typeof Linking[_0x4b8d(0x1d)],_0x4b8d(0x19))&&Linking['removeAllListeners'](_0x4b8d(0x17));}const _0x356ca4=new URLSearchParams({'grant_type':_0xaf66fc[_0x4b8d(0x46)],'code':_0x37c9fe,'redirect_uri':_0x3b22f5[_0x4b8d(0x47)],'client_id':_0x3b22f5[_0x4b8d(0x48)]}),_0x17ab9e=await _0xaf66fc['Jhmqj'](fetch,_0x3b22f5['tokenEndpoint'],{'method':'POST','headers':{'Content-Type':_0xaf66fc[_0x4b8d(0x49)]},'body':_0x356ca4['toString']()}),_0x7eb9b8=await _0x17ab9e[_0x4b8d(0x4a)]();if(!_0x17ab9e['ok'])throw new Error(_0x7eb9b8['error']||'Failed\x20to\x20exchange\x20code\x20for\x20token');const _0x4d5acf=await _0xaf66fc['RTMLB'](fetchUserInfo,_0x405aa6,_0x7eb9b8['access_token']);return{'token':_0x7eb9b8[_0x4b8d(0x4b)],'refreshToken':_0x7eb9b8[_0x4b8d(0x4c)],'expiresIn':_0x7eb9b8[_0x4b8d(0x4d)],'username':_0x4d5acf[_0x4b8d(0x4e)],'userId':_0x4d5acf['id']};}else _0x141c79=null,_0x9aa4e4=null,_0x55ad34=null,_0x47f447=null;}catch(_0x51bc1f){console[_0x4b8d(0x31)]('Error\x20exchanging\x20code\x20for\x20token\x20('+_0x405aa6+'):',_0x51bc1f);throw _0x51bc1f;}},fetchUserInfo=async(_0x4d5f2d,_0x471a14)=>{const _0x43e146={'kOCIn':'url','xyBTE':function(_0x14cd83,_0x4cf823){return _0x14cd83!==_0x4cf823;},'OcKBB':_0x4b8d(0x4f),'bdmzG':'instagram','uEXSW':'https://graph.instagram.com/me?fields=id,username','GTads':_0x4b8d(0x50),'mdELt':'https://www.googleapis.com/youtube/v3/channels?part=snippet&mine=true','sNNiD':'pinterest','BxFqe':_0x4b8d(0x51),'BYCxb':_0x4b8d(0x52),'RcXKd':_0x4b8d(0x53),'NMeuB':function(_0xc99104,_0xc8e140){return _0xc99104===_0xc8e140;},'lnSnw':'iiJAd','FWlKZ':_0x4b8d(0x54)};try{if(_0x43e146[_0x4b8d(0x55)](_0x4b8d(0x56),_0x43e146[_0x4b8d(0x57)])){let _0x33bbe9,_0x22924c={'Authorization':_0x4b8d(0x58)+_0x471a14};switch(_0x4d5f2d){case _0x43e146[_0x4b8d(0x59)]:_0x33bbe9=_0x43e146[_0x4b8d(0x5a)];break;case _0x43e146['GTads']:_0x33bbe9=_0x43e146['mdELt'];break;case _0x43e146[_0x4b8d(0x5b)]:_0x33bbe9=_0x43e146[_0x4b8d(0x5c)];break;case _0x43e146[_0x4b8d(0x5d)]:_0x33bbe9=_0x43e146[_0x4b8d(0x5e)];break;default:throw new Error('Unsupported\x20platform:\x20'+_0x4d5f2d);}const _0x13fb3b=await fetch(_0x33bbe9,{'headers':_0x22924c}),_0x8601b5=await _0x13fb3b[_0x4b8d(0x4a)]();if(!_0x13fb3b['ok']){if(_0x43e146[_0x4b8d(0x5f)](_0x43e146['lnSnw'],_0x43e146['lnSnw']))throw new Error(_0x8601b5[_0x4b8d(0x31)]||_0x43e146[_0x4b8d(0x60)]);else Linking[_0x4b8d(0x1d)](_0x43e146['kOCIn']);}switch(_0x4d5f2d){case _0x43e146['bdmzG']:return{'id':_0x8601b5['id'],'username':_0x8601b5[_0x4b8d(0x4e)]};case _0x43e146[_0x4b8d(0x61)]:return{'id':_0x8601b5[_0x4b8d(0x62)][0x0]['id'],'username':_0x8601b5[_0x4b8d(0x62)][0x0][_0x4b8d(0x63)][_0x4b8d(0x64)]};case _0x4b8d(0x65):return{'id':_0x8601b5['id'],'username':_0x8601b5[_0x4b8d(0x4e)]||_0x8601b5[_0x4b8d(0x66)]};case _0x43e146[_0x4b8d(0x5d)]:return{'id':_0x8601b5['id'],'username':_0x8601b5['name']};default:throw new Error('Unsupported\x20platform:\x20'+_0x4d5f2d);}}else return;}catch(_0x59e11d){console['error'](_0x4b8d(0x67)+_0x4d5f2d+'):',_0x59e11d);throw _0x59e11d;}};function _0x3578(){const _0x3c3782=['YOUR_INSTAGRAM_CLIENT_ID','onairosanime://auth/instagram','user_profile,user_media','https://api.instagram.com/oauth/authorize','https://api.instagram.com/oauth/access_token','YOUR_YOUTUBE_CLIENT_ID','onairosanime://auth/youtube','https://www.googleapis.com/auth/youtube.readonly','https://oauth2.googleapis.com/token','YOUR_PINTEREST_CLIENT_ID','onairosanime://auth/pinterest','boards:read,pins:read','https://www.pinterest.com/oauth/','code','YOUR_REDDIT_CLIENT_ID','onairosanime://auth/reddit','identity,read','https://www.reddit.com/api/v1/authorize','https://www.reddit.com/api/v1/access_token','random','toString','substring','JFAOD','url','OAuth\x20state\x20mismatch\x20-\x20possible\x20CSRF\x20attack','function','RLpLS','AJauX','dfYmV','removeAllListeners','aVPPs','IOhXR','qWvEj','YtyDU','oeGyi','state','qMwBV','jHvLe','No\x20authorization\x20code\x20received','Error\x20handling\x20OAuth\x20deep\x20link:','startsWith','split','searchParams','get','QMcxb','QpgVC','yilig','YASwA','hrpUt','error','Error\x20storing\x20platform\x20connection\x20(','HuaHX','RaBjE','LKxFm','LCuEd','OAuth\x20error:\x20','MoBOY','nopgJ','bJSGp','BQXlb','BMJIg','hccVH','authorization_code','szBNA','elOWa','TBhro','jCBXh','ALlan','Unsupported\x20platform:\x20','NXdSH','awRJj','redirectUri','clientId','vFIwd','json','access_token','refresh_token','expires_in','username','cYaOr','youtube','https://api.pinterest.com/v5/user_account','reddit','https://oauth.reddit.com/api/v1/me','Failed\x20to\x20fetch\x20user\x20info','xyBTE','Ufrud','OcKBB','Bearer\x20','bdmzG','uEXSW','sNNiD','BxFqe','BYCxb','RcXKd','NMeuB','FWlKZ','GTads','items','snippet','title','pinterest','full_name','Error\x20fetching\x20user\x20info\x20(','client_id','response_type','scope','yBKmb','BsiNQ','Error\x20disconnecting\x20platform\x20(','authorizationEndpoint','qcAWg','append','responseType','sErGt','krlEi','openURL','xVYVG','GSITx','redirect_uri','aWFTv','IvZXS','post','wYSlR','KdbVU','Error\x20exchanging\x20code\x20for\x20token\x20(','eCBlT','hKmSs','Kkyef','fKJBT','neMiZ','miGYT','instagram','FbRtw','xJrAs','jCYyA','QrIeR','userId','token','refreshToken','expiresIn','now','PwjYf','OwTMA','RQJFr','dPSdx','FfUCm','XlHOo','BASE_URL'];_0x3578=function(){return _0x3c3782;};return _0x3578();}export const connectPlatform=_0x8cb16d=>{const _0xa83f55={'WJwCJ':function(_0x5903aa,_0x56dae5){return _0x5903aa!==_0x56dae5;},'BsiNQ':'UgTYV','qcAWg':_0x4b8d(0x68),'lMJuq':'redirect_uri','IHFCs':_0x4b8d(0x69),'sErGt':_0x4b8d(0x6a),'krlEi':_0x4b8d(0x23),'xVYVG':function(_0x5710e5,_0x17fb8a){return _0x5710e5===_0x17fb8a;},'GSITx':_0x4b8d(0x6b)};return new Promise((_0x3b055b,_0x2fbe05)=>{if(_0xa83f55['WJwCJ'](_0xa83f55[_0x4b8d(0x6c)],_0xa83f55['BsiNQ']))return _0x7229b5[_0x4b8d(0x31)](_0x4b8d(0x6d)+_0x20d459+'):',_0x39a191),![];else try{const _0x296c80=OAUTH_CONFIGS[_0x8cb16d];if(!_0x296c80)throw new Error(_0x4b8d(0x44)+_0x8cb16d);const _0x421103=generateState(),_0x5d37f5=new URL(_0x296c80[_0x4b8d(0x6e)]);_0x5d37f5[_0x4b8d(0x2a)]['append'](_0xa83f55[_0x4b8d(0x6f)],_0x296c80['clientId']),_0x5d37f5[_0x4b8d(0x2a)][_0x4b8d(0x70)](_0xa83f55['lMJuq'],_0x296c80[_0x4b8d(0x47)]),_0x5d37f5[_0x4b8d(0x2a)]['append'](_0xa83f55['IHFCs'],_0x296c80[_0x4b8d(0x71)]),_0x5d37f5[_0x4b8d(0x2a)]['append'](_0xa83f55[_0x4b8d(0x72)],_0x296c80[_0x4b8d(0x6a)]),_0x5d37f5[_0x4b8d(0x2a)][_0x4b8d(0x70)](_0xa83f55[_0x4b8d(0x73)],_0x421103),currentOAuthState=_0x421103,currentOAuthPlatform=_0x8cb16d,currentOAuthResolve=_0x3b055b,currentOAuthReject=_0x2fbe05,Linking[_0x4b8d(0x74)](_0x5d37f5[_0x4b8d(0x14)]());}catch(_0x4444cc){_0xa83f55[_0x4b8d(0x75)](_0x4b8d(0x6b),_0xa83f55[_0x4b8d(0x76)])?_0x2fbe05(_0x4444cc):(_0x2b993a[_0x4b8d(0x31)](_0x4b8d(0x27),_0x48bce5),_0x277ecf&&_0x32eb7f(_0x47412c));}});};export const disconnectPlatform=async(_0x2b4c5e,_0x223380)=>{const _0x5ef1a6={'fKJBT':function(_0x2dba25){return _0x2dba25();},'neMiZ':_0x4b8d(0x68),'MkFev':_0x4b8d(0x77),'miGYT':'response_type','ATYHX':_0x4b8d(0x6a),'QlFDB':_0x4b8d(0x23),'zJdrM':'/users/disconnect-platform','wYSlR':function(_0x26e161,_0x15422c){return _0x26e161 in _0x15422c;},'RRkHJ':function(_0x353cca,_0x56f368){return _0x353cca===_0x56f368;},'KdbVU':_0x4b8d(0x78),'eCBlT':function(_0x1f8b30,_0x9c6031){return _0x1f8b30(_0x9c6031);},'hKmSs':function(_0x564c11,_0x5a2651){return _0x564c11!==_0x5a2651;},'Kkyef':_0x4b8d(0x79)};try{await onairosApi[_0x4b8d(0x7a)](_0x5ef1a6['zJdrM'],{'platform':_0x2b4c5e,'username':_0x223380[_0x4b8d(0x4e)]});const _0x3b82ad={..._0x223380['platforms']};if(_0x3b82ad&&_0x5ef1a6[_0x4b8d(0x7b)](_0x2b4c5e,_0x3b82ad)){if(_0x5ef1a6['RRkHJ'](_0x5ef1a6[_0x4b8d(0x7c)],_0x5ef1a6[_0x4b8d(0x7c)]))delete _0x3b82ad[_0x2b4c5e];else{_0x4db315[_0x4b8d(0x31)](_0x4b8d(0x7d)+_0x32dfaa+'):',_0x226344);throw _0x225520;}}return await _0x5ef1a6[_0x4b8d(0x7e)](updateCredentials,{..._0x223380,'platforms':_0x3b82ad}),!![];}catch(_0x52f7d3){if(_0x5ef1a6[_0x4b8d(0x7f)](_0x4b8d(0x79),_0x5ef1a6[_0x4b8d(0x80)])){const _0x417fb4=_0x1d05be[_0x133d4e];if(!_0x417fb4)throw new _0x482575('Unsupported\x20platform:\x20'+_0x23f7b6);const _0x17570c=_0x5ef1a6[_0x4b8d(0x81)](_0x8c9268),_0x229093=new _0x308924(_0x417fb4[_0x4b8d(0x6e)]);_0x229093[_0x4b8d(0x2a)][_0x4b8d(0x70)](_0x5ef1a6[_0x4b8d(0x82)],_0x417fb4[_0x4b8d(0x48)]),_0x229093[_0x4b8d(0x2a)][_0x4b8d(0x70)](_0x5ef1a6['MkFev'],_0x417fb4[_0x4b8d(0x47)]),_0x229093[_0x4b8d(0x2a)][_0x4b8d(0x70)](_0x5ef1a6[_0x4b8d(0x83)],_0x417fb4[_0x4b8d(0x71)]),_0x229093[_0x4b8d(0x2a)][_0x4b8d(0x70)](_0x5ef1a6['ATYHX'],_0x417fb4[_0x4b8d(0x6a)]),_0x229093[_0x4b8d(0x2a)][_0x4b8d(0x70)](_0x5ef1a6['QlFDB'],_0x17570c),_0x3f006d=_0x17570c,_0x4ef9b0=_0x874d1f,_0x51522c=_0x4ffe73,_0x2ae820=_0x1954fe,Linking['openURL'](_0x229093[_0x4b8d(0x14)]());}else return console[_0x4b8d(0x31)](_0x4b8d(0x6d)+_0x2b4c5e+'):',_0x52f7d3),![];}};export const storePlatformConnection=async(_0x209c4e,_0x2d220a,_0x4dd79a)=>{const _0x325f9a={'FbRtw':function(_0x276f78,_0x90b63){return _0x276f78===_0x90b63;},'xJrAs':_0x4b8d(0x84),'jCYyA':function(_0x205d41,_0x34df39){return _0x205d41===_0x34df39;},'QrIeR':_0x4b8d(0x65),'OtJtc':function(_0x104d75,_0x37a764){return _0x104d75===_0x37a764;},'Rkzug':function(_0x2715f8,_0x5e2b73){return _0x2715f8+_0x5e2b73;},'PwjYf':function(_0x442349,_0x124a69){return _0x442349===_0x124a69;},'OwTMA':function(_0xdb2e15,_0x29640e){return _0xdb2e15===_0x29640e;},'RQJFr':function(_0x278339,_0x110c1d){return _0x278339===_0x110c1d;},'dPSdx':function(_0x2d2767,_0x297ff7){return _0x2d2767===_0x297ff7;},'FfUCm':_0x4b8d(0x52),'XlHOo':function(_0x59606a,_0x939ea0){return _0x59606a(_0x939ea0);}};try{const _0x46324d=_0x325f9a[_0x4b8d(0x85)](_0x209c4e,_0x325f9a[_0x4b8d(0x86)])||_0x325f9a[_0x4b8d(0x87)](_0x209c4e,_0x4b8d(0x50))||_0x325f9a[_0x4b8d(0x87)](_0x209c4e,_0x325f9a[_0x4b8d(0x88)])||_0x325f9a['OtJtc'](_0x209c4e,_0x4b8d(0x52));if(!_0x46324d)throw new Error('Unsupported\x20platform:\x20'+_0x209c4e);const _0x9a3106={..._0x4dd79a['platforms']},_0x44aa5a={'username':_0x2d220a[_0x4b8d(0x4e)],'userId':_0x2d220a[_0x4b8d(0x89)],'token':_0x2d220a[_0x4b8d(0x8a)],'refreshToken':_0x2d220a[_0x4b8d(0x8b)],'expiresAt':_0x2d220a[_0x4b8d(0x8c)]?_0x325f9a['Rkzug'](Date[_0x4b8d(0x8d)](),_0x2d220a[_0x4b8d(0x8c)]*0x3e8):null,'connectedAt':Date['now']()};if(_0x325f9a[_0x4b8d(0x8e)](_0x209c4e,_0x325f9a['xJrAs']))_0x9a3106[_0x4b8d(0x84)]=_0x44aa5a;else{if(_0x325f9a[_0x4b8d(0x8f)](_0x209c4e,'youtube'))_0x9a3106[_0x4b8d(0x50)]=_0x44aa5a;else{if(_0x325f9a[_0x4b8d(0x90)](_0x209c4e,_0x325f9a[_0x4b8d(0x88)]))_0x9a3106[_0x4b8d(0x65)]=_0x44aa5a;else{if(_0x325f9a[_0x4b8d(0x91)](_0x209c4e,_0x325f9a[_0x4b8d(0x92)]))_0x9a3106[_0x4b8d(0x52)]=_0x44aa5a;}}}return await _0x325f9a[_0x4b8d(0x93)](updateCredentials,{..._0x4dd79a,'platforms':_0x9a3106}),!![];}catch(_0x1f5737){return console[_0x4b8d(0x31)](_0x4b8d(0x32)+_0x209c4e+'):',_0x1f5737),![];}};export const OAuthService={'initializeOAuthService':initializeOAuthService,'cleanupOAuthService':cleanupOAuthService,'connectPlatform':connectPlatform,'disconnectPlatform':disconnectPlatform,'storePlatformConnection':storePlatformConnection,'_apiBaseUrl':''+API_CONFIG[_0x4b8d(0x94)]};
1
+ import{Linking}from'react-native';function _0x2a1a(_0x5a4bca,_0x2a1a09){_0x5a4bca=_0x5a4bca-0x0;const _0x43e685=_0x5a4b();let _0xa6e8c7=_0x43e685[_0x5a4bca];return _0xa6e8c7;}function _0x5a4b(){const _0x2db63f=['YOUR_INSTAGRAM_CLIENT_ID','https://api.instagram.com/oauth/access_token','code','onairosanime://auth/youtube','https://accounts.google.com/o/oauth2/auth','https://oauth2.googleapis.com/token','YOUR_PINTEREST_CLIENT_ID','boards:read,pins:read','https://api.pinterest.com/v5/oauth/token','YOUR_REDDIT_CLIENT_ID','onairosanime://auth/reddit','identity,read','https://www.reddit.com/api/v1/authorize','https://www.reddit.com/api/v1/access_token','random','substring','alciY','url','addEventListener','bDCjv','function','wPcDh','WYXxo','JcuAo','removeAllListeners','KqzRU','lfyyJ','EynCc','SFSbv','ngruf','onairosanime://auth/','BPhDm','state','error','kufkK','AJrfH','xAdAr','Error\x20handling\x20OAuth\x20deep\x20link:','kyVqI','aeJIa','startsWith','gnOuv','LnthN','searchParams','get','rnKvR','PvVAX','XKxTw','uZsUe','qDIMy','rZOTi','OAuth\x20state\x20mismatch\x20-\x20possible\x20CSRF\x20attack','YHyUR','dIagy','gzcZj','gmhqI','OAuth\x20error:\x20','InYYC','XjEgy','Error\x20disconnecting\x20platform\x20(','sgEnE','NMMjw','Unsupported\x20platform:\x20','No\x20authorization\x20code\x20received','KlXma','authorization_code','application/x-www-form-urlencoded','Failed\x20to\x20exchange\x20code\x20for\x20token','qhqBZ','kAabv','iRJKP','ixZEm','clientId','oAQmZ','xftdM','toString','AUbGZ','YkoZs','qbxpi','zOvVn','access_token','refresh_token','expires_in','username','Error\x20exchanging\x20code\x20for\x20token\x20(','instagram','youtube','https://www.googleapis.com/youtube/v3/channels?part=snippet&mine=true','pinterest','https://api.pinterest.com/v5/user_account','reddit','https://oauth.reddit.com/api/v1/me','Failed\x20to\x20fetch\x20user\x20info','lmwyG','tQdFK','Bearer\x20','CQaEM','CyrHU','WNTaj','tdNfl','WTyNt','json','MAvVI','fToGy','items','snippet','title','full_name','rGMWs','name','YKjtC','VAduR','Error\x20fetching\x20user\x20info\x20(','LfMIy','client_id','redirect_uri','scope','Cfuiz','BWRQZ','Qhmia','WkkVY','cfmBE','JEzpq','oWwdc','Xlpxm','authorizationEndpoint','append','redirectUri','response_type','responseType','openURL','sJMYC','nTZtA','oSoWm','DdRcw','XYjrS','TQzlR','FggkA','/users/disconnect-platform','qKFrh','wWpLK','post','platforms','uqYGp','SJhPG','uAKLv','FEfMU','bqPcu','DaXfr','cxRPF','kHkLf','hnroW','Lkquw','NZbeK','idRmj','APSvr','userId','token','refreshToken','expiresIn','gOTKK','now','RkqDL','CGrIc','piljS','IQSWk','Error\x20storing\x20platform\x20connection\x20('];_0x5a4b=function(){return _0x2db63f;};return _0x5a4b();}import{updateCredentials}from'../utils/secureStorage';import{sha256}from'../utils/crypto';import{onairosApi}from'../api';import{API_CONFIG}from'../config/api';const OAUTH_CONFIGS={'instagram':{'clientId':_0x2a1a(0x0),'redirectUri':'onairosanime://auth/instagram','scope':'user_profile,user_media','authorizationEndpoint':'https://api.instagram.com/oauth/authorize','tokenEndpoint':_0x2a1a(0x1),'responseType':_0x2a1a(0x2)},'youtube':{'clientId':'YOUR_YOUTUBE_CLIENT_ID','redirectUri':_0x2a1a(0x3),'scope':'https://www.googleapis.com/auth/youtube.readonly','authorizationEndpoint':_0x2a1a(0x4),'tokenEndpoint':_0x2a1a(0x5),'responseType':_0x2a1a(0x2)},'pinterest':{'clientId':_0x2a1a(0x6),'redirectUri':'onairosanime://auth/pinterest','scope':_0x2a1a(0x7),'authorizationEndpoint':'https://www.pinterest.com/oauth/','tokenEndpoint':_0x2a1a(0x8),'responseType':'code'},'reddit':{'clientId':_0x2a1a(0x9),'redirectUri':_0x2a1a(0xa),'scope':_0x2a1a(0xb),'authorizationEndpoint':_0x2a1a(0xc),'tokenEndpoint':_0x2a1a(0xd),'responseType':_0x2a1a(0x2)}},generateState=()=>{const _0x52d870={'alciY':function(_0x1c74db,_0x519097){return _0x1c74db(_0x519097);}},_0x1bdfbb=Math[_0x2a1a(0xe)]()['toString'](0x24)[_0x2a1a(0xf)](0x2,0xf);return _0x52d870[_0x2a1a(0x10)](sha256,_0x1bdfbb)['substring'](0x0,0xa);};export const initializeOAuthService=()=>{const _0x6f435a={'bDCjv':_0x2a1a(0x11)};Linking[_0x2a1a(0x12)](_0x6f435a[_0x2a1a(0x13)],handleDeepLink);};export const cleanupOAuthService=()=>{const _0x4f2c39={'ngruf':'url','JcuAo':function(_0x570617,_0x468378){return _0x570617===_0x468378;},'KqzRU':_0x2a1a(0x14),'lfyyJ':function(_0x3d290a,_0x41cded){return _0x3d290a!==_0x41cded;},'EynCc':_0x2a1a(0x15),'SFSbv':_0x2a1a(0x16)};_0x4f2c39[_0x2a1a(0x17)](typeof Linking[_0x2a1a(0x18)],_0x4f2c39[_0x2a1a(0x19)])&&(_0x4f2c39[_0x2a1a(0x1a)](_0x4f2c39[_0x2a1a(0x1b)],_0x4f2c39[_0x2a1a(0x1c)])?Linking[_0x2a1a(0x18)](_0x4f2c39[_0x2a1a(0x1d)]):Linking[_0x2a1a(0x18)](_0x4f2c39['ngruf']));};let currentOAuthState=null,currentOAuthPlatform=null,currentOAuthResolve=null,currentOAuthReject=null;const handleDeepLink=async _0x3cc1d7=>{const _0x476c3e={'rZOTi':function(_0x24227a,_0x3590db){return _0x24227a(_0x3590db);},'gzcZj':'OAuth\x20state\x20mismatch\x20-\x20possible\x20CSRF\x20attack','IkHfO':_0x2a1a(0x1e),'gnOuv':function(_0x547f9c,_0x175a79){return _0x547f9c!==_0x175a79;},'KEWcO':_0x2a1a(0x1f),'rnKvR':_0x2a1a(0x20),'PvVAX':_0x2a1a(0x21),'XKxTw':function(_0x1200de,_0x10db04){return _0x1200de!==_0x10db04;},'uZsUe':'lCHxz','YHyUR':function(_0x2222a4,_0x4388af){return _0x2222a4===_0x4388af;},'dIagy':_0x2a1a(0x22),'lixLt':'wIcBd','gmhqI':function(_0x5a604c,_0x3970d0){return _0x5a604c(_0x3970d0);},'InYYC':function(_0x367cdf,_0x5ea54d,_0x5dbd85){return _0x367cdf(_0x5ea54d,_0x5dbd85);},'XjEgy':_0x2a1a(0x23),'sgEnE':function(_0x2afbe0,_0xcfdf5e){return _0x2afbe0===_0xcfdf5e;},'rhbDo':'FrauX','NMMjw':_0x2a1a(0x24),'LcDiE':_0x2a1a(0x25),'KlXma':function(_0x43f1ec,_0x388098){return _0x43f1ec!==_0x388098;},'rMgVK':_0x2a1a(0x26),'jVGAO':_0x2a1a(0x27)};try{const {url:_0x417c61}=_0x3cc1d7;if(!_0x417c61[_0x2a1a(0x28)](_0x476c3e['IkHfO']))return;const _0x4fa799=_0x417c61['split'](_0x476c3e['IkHfO'])[0x1]['split']('?')[0x0];if(_0x4fa799!==currentOAuthPlatform){if(_0x476c3e[_0x2a1a(0x29)](_0x2a1a(0x2a),_0x476c3e['KEWcO']))return;else{_0x4751c5[_0x2a1a(0x21)]('Error\x20exchanging\x20code\x20for\x20token\x20('+_0x594d23+'):',_0x14495f);throw _0x17dd23;}}const _0x7cc297=new URL(_0x417c61)[_0x2a1a(0x2b)],_0x3e10c3=_0x7cc297['get'](_0x2a1a(0x2)),_0x1a771c=_0x7cc297[_0x2a1a(0x2c)](_0x476c3e[_0x2a1a(0x2d)]),_0x1ee129=_0x7cc297[_0x2a1a(0x2c)](_0x476c3e[_0x2a1a(0x2e)]);if(_0x1a771c!==currentOAuthState){if(_0x476c3e[_0x2a1a(0x2f)](_0x476c3e[_0x2a1a(0x30)],_0x2a1a(0x31))){currentOAuthReject&&_0x476c3e[_0x2a1a(0x32)](currentOAuthReject,new Error(_0x2a1a(0x33)));return;}else _0x42b3f0=null,_0x7b856f=null,_0x3ca4be=null,_0x40f34b=null;}if(_0x1ee129){if(_0x476c3e[_0x2a1a(0x34)](_0x476c3e[_0x2a1a(0x35)],_0x476c3e['lixLt'])){_0x4aba9a&&_0x476c3e[_0x2a1a(0x32)](_0x2ac183,new _0x481dbd(_0x476c3e[_0x2a1a(0x36)]));return;}else{currentOAuthReject&&_0x476c3e[_0x2a1a(0x37)](currentOAuthReject,new Error(_0x2a1a(0x38)+_0x1ee129));return;}}if(_0x3e10c3){const _0x1419ca=await _0x476c3e[_0x2a1a(0x39)](exchangeCodeForToken,_0x4fa799,_0x3e10c3);if(currentOAuthResolve){if(_0x476c3e[_0x2a1a(0x3a)]===_0x476c3e[_0x2a1a(0x3a)])_0x476c3e[_0x2a1a(0x32)](currentOAuthResolve,_0x1419ca);else return _0x2d54b3[_0x2a1a(0x21)](_0x2a1a(0x3b)+_0x5e7db3+'):',_0x2e55ea),![];}}else{if(currentOAuthReject){if(_0x476c3e[_0x2a1a(0x3c)](_0x476c3e['rhbDo'],_0x476c3e[_0x2a1a(0x3d)]))throw new _0x5135ba(_0x2a1a(0x3e)+_0x1b0af1);else _0x476c3e['rZOTi'](currentOAuthReject,new Error(_0x2a1a(0x3f)));}}}catch(_0x5957e0){console[_0x2a1a(0x21)](_0x476c3e['LcDiE'],_0x5957e0),currentOAuthReject&&currentOAuthReject(_0x5957e0);}finally{_0x476c3e[_0x2a1a(0x40)](_0x476c3e['rMgVK'],_0x476c3e['jVGAO'])?(currentOAuthState=null,currentOAuthPlatform=null,currentOAuthResolve=null,currentOAuthReject=null):_0x3a5403(new _0x21c9bd(_0x2a1a(0x33)));}},exchangeCodeForToken=async(_0x4096eb,_0xaa8d8f)=>{const _0x1dccb3={'ixZEm':function(_0x556b79,_0x54e82f){return _0x556b79(_0x54e82f);},'qbxpi':_0x2a1a(0x11),'qhqBZ':function(_0x5eaea4,_0x5c040a){return _0x5eaea4!==_0x5c040a;},'kAabv':'iRJKP','eVwxg':_0x2a1a(0x41),'oAQmZ':function(_0x560e0b,_0x3e347d,_0x4b5e40){return _0x560e0b(_0x3e347d,_0x4b5e40);},'xftdM':_0x2a1a(0x42),'AUbGZ':'YkoZs','zOvVn':_0x2a1a(0x43)};try{if(_0x1dccb3[_0x2a1a(0x44)](_0x1dccb3[_0x2a1a(0x45)],_0x2a1a(0x46)))_0x1dccb3[_0x2a1a(0x47)](_0x198017,_0x38790c);else{const _0x1187f5=OAUTH_CONFIGS[_0x4096eb];if(!_0x1187f5)throw new Error(_0x2a1a(0x3e)+_0x4096eb);const _0x5e5a62=new URLSearchParams({'grant_type':_0x1dccb3['eVwxg'],'code':_0xaa8d8f,'redirect_uri':_0x1187f5['redirectUri'],'client_id':_0x1187f5[_0x2a1a(0x48)]}),_0x2edb15=await _0x1dccb3[_0x2a1a(0x49)](fetch,_0x1187f5['tokenEndpoint'],{'method':'POST','headers':{'Content-Type':_0x1dccb3[_0x2a1a(0x4a)]},'body':_0x5e5a62[_0x2a1a(0x4b)]()}),_0xd1c6cf=await _0x2edb15['json']();if(!_0x2edb15['ok']){if(_0x1dccb3[_0x2a1a(0x4c)]!==_0x2a1a(0x4d))Linking[_0x2a1a(0x12)](_0x1dccb3[_0x2a1a(0x4e)],_0x4565fa);else throw new Error(_0xd1c6cf['error']||_0x1dccb3[_0x2a1a(0x4f)]);}const _0x27a781=await fetchUserInfo(_0x4096eb,_0xd1c6cf[_0x2a1a(0x50)]);return{'token':_0xd1c6cf['access_token'],'refreshToken':_0xd1c6cf[_0x2a1a(0x51)],'expiresIn':_0xd1c6cf[_0x2a1a(0x52)],'username':_0x27a781[_0x2a1a(0x53)],'userId':_0x27a781['id']};}}catch(_0x6213f5){console[_0x2a1a(0x21)](_0x2a1a(0x54)+_0x4096eb+'):',_0x6213f5);throw _0x6213f5;}},fetchUserInfo=async(_0xa09540,_0x115e3b)=>{const _0x5e4778={'LfMIy':function(_0x5b4114,_0x4fba5b){return _0x5b4114(_0x4fba5b);},'fToGy':_0x2a1a(0x55),'CQaEM':_0x2a1a(0x56),'CyrHU':_0x2a1a(0x57),'WNTaj':_0x2a1a(0x58),'tdNfl':_0x2a1a(0x59),'rGMWs':_0x2a1a(0x5a),'oMiOM':_0x2a1a(0x5b),'WTyNt':function(_0x36c5b7,_0xea60e9,_0x20c47e){return _0x36c5b7(_0xea60e9,_0x20c47e);},'MAvVI':_0x2a1a(0x5c),'YKjtC':_0x2a1a(0x5d),'VAduR':_0x2a1a(0x5e)};try{let _0x487a2a,_0x17215d={'Authorization':_0x2a1a(0x5f)+_0x115e3b};switch(_0xa09540){case _0x5e4778['fToGy']:_0x487a2a='https://graph.instagram.com/me?fields=id,username';break;case _0x5e4778[_0x2a1a(0x60)]:_0x487a2a=_0x5e4778[_0x2a1a(0x61)];break;case _0x5e4778[_0x2a1a(0x62)]:_0x487a2a=_0x5e4778[_0x2a1a(0x63)];break;case _0x5e4778['rGMWs']:_0x487a2a=_0x5e4778['oMiOM'];break;default:throw new Error(_0x2a1a(0x3e)+_0xa09540);}const _0x2d5cb2=await _0x5e4778[_0x2a1a(0x64)](fetch,_0x487a2a,{'headers':_0x17215d}),_0x3a150e=await _0x2d5cb2[_0x2a1a(0x65)]();if(!_0x2d5cb2['ok'])throw new Error(_0x3a150e[_0x2a1a(0x21)]||_0x5e4778[_0x2a1a(0x66)]);switch(_0xa09540){case _0x5e4778[_0x2a1a(0x67)]:return{'id':_0x3a150e['id'],'username':_0x3a150e[_0x2a1a(0x53)]};case _0x5e4778['CQaEM']:return{'id':_0x3a150e['items'][0x0]['id'],'username':_0x3a150e[_0x2a1a(0x68)][0x0][_0x2a1a(0x69)][_0x2a1a(0x6a)]};case _0x5e4778[_0x2a1a(0x62)]:return{'id':_0x3a150e['id'],'username':_0x3a150e[_0x2a1a(0x53)]||_0x3a150e[_0x2a1a(0x6b)]};case _0x5e4778[_0x2a1a(0x6c)]:return{'id':_0x3a150e['id'],'username':_0x3a150e[_0x2a1a(0x6d)]};default:throw new Error(_0x2a1a(0x3e)+_0xa09540);}}catch(_0x45495d){if(_0x5e4778[_0x2a1a(0x6e)]!==_0x5e4778[_0x2a1a(0x6f)]){console['error'](_0x2a1a(0x70)+_0xa09540+'):',_0x45495d);throw _0x45495d;}else _0x5e4778[_0x2a1a(0x71)](_0x132bf0,new _0x10ba97(_0x2a1a(0x38)+_0x425205));}};export const connectPlatform=_0x6a83e0=>{const _0x2c6d27={'oWwdc':function(_0x25885f,_0x21d24b){return _0x25885f(_0x21d24b);},'BWRQZ':_0x2a1a(0x72),'Qhmia':_0x2a1a(0x73),'TswQw':_0x2a1a(0x74),'JgOrK':_0x2a1a(0x20),'cfmBE':function(_0x4687d9,_0x40025e){return _0x4687d9!==_0x40025e;},'WkkVY':_0x2a1a(0x75),'JEzpq':'RBKPN','Xlpxm':function(_0x3428cf){return _0x3428cf();},'sJMYC':'nTZtA'};return new Promise((_0x3159e0,_0x6ae42a)=>{const _0x3bc234={'oSoWm':_0x2c6d27[_0x2a1a(0x76)],'DdRcw':_0x2c6d27[_0x2a1a(0x77)],'XYjrS':_0x2c6d27['TswQw'],'TQzlR':_0x2c6d27['JgOrK']};if(_0x2c6d27['cfmBE'](_0x2c6d27[_0x2a1a(0x78)],_0x2c6d27[_0x2a1a(0x78)]))throw new _0x5ebe94(_0x2a1a(0x3e)+_0x3f15ca);else try{const _0x201224=OAUTH_CONFIGS[_0x6a83e0];if(!_0x201224){if(_0x2c6d27[_0x2a1a(0x79)](_0x2c6d27[_0x2a1a(0x7a)],'RBKPN')){const _0x4af796=_0x1a3b82[_0x2a1a(0xe)]()['toString'](0x24)['substring'](0x2,0xf);return _0x2c6d27[_0x2a1a(0x7b)](_0x5961ae,_0x4af796)['substring'](0x0,0xa);}else throw new Error('Unsupported\x20platform:\x20'+_0x6a83e0);}const _0x3b9a5b=_0x2c6d27[_0x2a1a(0x7c)](generateState),_0x1bf8ee=new URL(_0x201224[_0x2a1a(0x7d)]);_0x1bf8ee['searchParams']['append'](_0x2c6d27[_0x2a1a(0x76)],_0x201224['clientId']),_0x1bf8ee['searchParams'][_0x2a1a(0x7e)](_0x2c6d27[_0x2a1a(0x77)],_0x201224[_0x2a1a(0x7f)]),_0x1bf8ee[_0x2a1a(0x2b)]['append'](_0x2a1a(0x80),_0x201224[_0x2a1a(0x81)]),_0x1bf8ee[_0x2a1a(0x2b)][_0x2a1a(0x7e)](_0x2c6d27['TswQw'],_0x201224[_0x2a1a(0x74)]),_0x1bf8ee[_0x2a1a(0x2b)][_0x2a1a(0x7e)]('state',_0x3b9a5b),currentOAuthState=_0x3b9a5b,currentOAuthPlatform=_0x6a83e0,currentOAuthResolve=_0x3159e0,currentOAuthReject=_0x6ae42a,Linking[_0x2a1a(0x82)](_0x1bf8ee[_0x2a1a(0x4b)]());}catch(_0x31e92f){if(_0x2c6d27[_0x2a1a(0x83)]!==_0x2a1a(0x84))try{const _0xb26813=_0x36072d[_0x1ce63d];if(!_0xb26813)throw new _0x2dcb5b(_0x2a1a(0x3e)+_0x5f38d9);const _0x3b4017=_0xdab5e9(),_0x57fd8a=new _0x3dfec6(_0xb26813[_0x2a1a(0x7d)]);_0x57fd8a[_0x2a1a(0x2b)]['append'](_0x3bc234[_0x2a1a(0x85)],_0xb26813[_0x2a1a(0x48)]),_0x57fd8a[_0x2a1a(0x2b)][_0x2a1a(0x7e)](_0x3bc234[_0x2a1a(0x86)],_0xb26813[_0x2a1a(0x7f)]),_0x57fd8a[_0x2a1a(0x2b)][_0x2a1a(0x7e)](_0x2a1a(0x80),_0xb26813['responseType']),_0x57fd8a['searchParams']['append'](_0x3bc234[_0x2a1a(0x87)],_0xb26813[_0x2a1a(0x74)]),_0x57fd8a[_0x2a1a(0x2b)]['append'](_0x3bc234[_0x2a1a(0x88)],_0x3b4017),_0x2440a9=_0x3b4017,_0x28a6ce=_0x3ec6c0,_0x320f10=_0x291079,_0x2de2e4=_0x2d86ea,Linking[_0x2a1a(0x82)](_0x57fd8a[_0x2a1a(0x4b)]());}catch(_0x3b4999){_0x563639(_0x3b4999);}else _0x6ae42a(_0x31e92f);}});};export const disconnectPlatform=async(_0x32da34,_0x4b1e8)=>{const _0x5b0acf={'qqJNE':function(_0x182a40,_0x575ba2){return _0x182a40(_0x575ba2);},'SJhPG':_0x2a1a(0x3f),'qKFrh':function(_0x34c101,_0x1c1874){return _0x34c101===_0x1c1874;},'wWpLK':_0x2a1a(0x89),'EfvMp':_0x2a1a(0x8a),'GQuWe':function(_0x1e6314,_0x20e87f){return _0x1e6314===_0x20e87f;},'uqYGp':'DZKFQ'};try{if(_0x5b0acf[_0x2a1a(0x8b)](_0x5b0acf['wWpLK'],_0x5b0acf[_0x2a1a(0x8c)])){await onairosApi[_0x2a1a(0x8d)](_0x5b0acf['EfvMp'],{'platform':_0x32da34,'username':_0x4b1e8[_0x2a1a(0x53)]});const _0x199fb5={..._0x4b1e8[_0x2a1a(0x8e)]};return _0x199fb5&&_0x32da34 in _0x199fb5&&delete _0x199fb5[_0x32da34],await updateCredentials({..._0x4b1e8,'platforms':_0x199fb5}),!![];}else return;}catch(_0x527d03){if(_0x5b0acf['GQuWe'](_0x5b0acf[_0x2a1a(0x8f)],_0x5b0acf[_0x2a1a(0x8f)]))return console['error']('Error\x20disconnecting\x20platform\x20('+_0x32da34+'):',_0x527d03),![];else _0x125ee1&&_0x5b0acf['qqJNE'](_0x3354de,new _0x574031(_0x5b0acf[_0x2a1a(0x90)]));}};export const storePlatformConnection=async(_0x2da6bc,_0x1e8648,_0x53093a)=>{const _0x1024ae={'IQSWk':function(_0x260cb9,_0x49bad1){return _0x260cb9(_0x49bad1);},'DaXfr':_0x2a1a(0x91),'cxRPF':_0x2a1a(0x92),'kHkLf':function(_0x2aa8ac,_0x1e8e38){return _0x2aa8ac===_0x1e8e38;},'hnroW':_0x2a1a(0x56),'piljS':_0x2a1a(0x58),'Lkquw':function(_0x1850f5,_0x591a27){return _0x1850f5===_0x591a27;},'NZbeK':'reddit','idRmj':function(_0x15aff7,_0xc7bb06){return _0x15aff7===_0xc7bb06;},'APSvr':_0x2a1a(0x93),'gOTKK':function(_0x218dcf,_0x16c075){return _0x218dcf+_0x16c075;},'RkqDL':function(_0x530080,_0x24e0af){return _0x530080*_0x24e0af;},'CGrIc':_0x2a1a(0x55),'RDDUF':function(_0x288cf3,_0x1fddb2){return _0x288cf3===_0x1fddb2;}};try{if(_0x1024ae[_0x2a1a(0x94)]===_0x1024ae[_0x2a1a(0x95)])delete _0x14ed6b[_0x23deee];else{const _0x834cb0=_0x2da6bc==='instagram'||_0x1024ae[_0x2a1a(0x96)](_0x2da6bc,_0x1024ae[_0x2a1a(0x97)])||_0x2da6bc===_0x1024ae['piljS']||_0x1024ae[_0x2a1a(0x98)](_0x2da6bc,_0x1024ae[_0x2a1a(0x99)]);if(!_0x834cb0){if(_0x1024ae[_0x2a1a(0x9a)](_0x1024ae[_0x2a1a(0x9b)],'bqPcu'))throw new Error(_0x2a1a(0x3e)+_0x2da6bc);else _0x1024ae['IQSWk'](_0x2b8a3a,_0x54d60c);}const _0x134c12={..._0x53093a[_0x2a1a(0x8e)]},_0x4d0a56={'username':_0x1e8648[_0x2a1a(0x53)],'userId':_0x1e8648[_0x2a1a(0x9c)],'token':_0x1e8648[_0x2a1a(0x9d)],'refreshToken':_0x1e8648[_0x2a1a(0x9e)],'expiresAt':_0x1e8648[_0x2a1a(0x9f)]?_0x1024ae[_0x2a1a(0xa0)](Date[_0x2a1a(0xa1)](),_0x1024ae[_0x2a1a(0xa2)](_0x1e8648[_0x2a1a(0x9f)],0x3e8)):null,'connectedAt':Date[_0x2a1a(0xa1)]()};if(_0x1024ae[_0x2a1a(0x98)](_0x2da6bc,_0x1024ae[_0x2a1a(0xa3)]))_0x134c12['instagram']=_0x4d0a56;else{if(_0x2da6bc===_0x2a1a(0x56))_0x134c12[_0x2a1a(0x56)]=_0x4d0a56;else{if(_0x1024ae['RDDUF'](_0x2da6bc,_0x1024ae[_0x2a1a(0xa4)]))_0x134c12[_0x2a1a(0x58)]=_0x4d0a56;else{if(_0x1024ae[_0x2a1a(0x98)](_0x2da6bc,_0x2a1a(0x5a)))_0x134c12[_0x2a1a(0x5a)]=_0x4d0a56;}}}return await _0x1024ae[_0x2a1a(0xa5)](updateCredentials,{..._0x53093a,'platforms':_0x134c12}),!![];}}catch(_0x26f46a){return console[_0x2a1a(0x21)](_0x2a1a(0xa6)+_0x2da6bc+'):',_0x26f46a),![];}};export const OAuthService={'initializeOAuthService':initializeOAuthService,'cleanupOAuthService':cleanupOAuthService,'connectPlatform':connectPlatform,'disconnectPlatform':disconnectPlatform,'storePlatformConnection':storePlatformConnection,'_apiBaseUrl':''+API_CONFIG['BASE_URL']};
@@ -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
- const CryptoJS=__ONAIROS_REQ_FUNC__(0x0);import{getTemporaryPin}from'./pinStorageUtils';function _0x12f0(_0x2b1eec,_0x12f043){_0x2b1eec=_0x2b1eec-0x0;const _0x2f76ce=_0x2b1e();let _0x207b46=_0x2f76ce[_0x2b1eec];return _0x207b46;}const ENCRYPTION_KEY=_0x12f0(0x0);export const encryptPin=_0x5107fd=>{const _0x544023={'fInrg':_0x12f0(0x1),'PxvTS':_0x12f0(0x2),'vRbRR':_0x12f0(0x3)};try{if(_0x544023[_0x12f0(0x4)]!==_0x544023[_0x12f0(0x5)]){const _0x2f7942=CryptoJS[_0x12f0(0x6)]['encrypt'](_0x5107fd,ENCRYPTION_KEY)[_0x12f0(0x7)]();return console[_0x12f0(0x8)](_0x12f0(0x9)),_0x2f7942;}else{const _0x5454ab=_0x1312d6[_0x12f0(0x6)][_0x12f0(0xa)](_0x106231,_0x5296a8),_0x4e3d53=_0x5454ab[_0x12f0(0x7)](_0x3f7165[_0x12f0(0xb)][_0x12f0(0xc)]);return _0x30baa0[_0x12f0(0x8)](_0x12f0(0xd)),_0x4e3d53;}}catch(_0x28f21){console['error'](_0x544023[_0x12f0(0xe)],_0x28f21);throw _0x28f21;}};export const decryptPin=_0x36b56e=>{const _0x1f6e7f={'VZkLv':'🔐\x20PIN\x20encrypted\x20successfully','YwFSI':function(_0x16432e,_0x52dba5){return _0x16432e!==_0x52dba5;},'CANWD':'sBZoW','cxvep':_0x12f0(0xd),'XkBcW':function(_0x4c0d06,_0x58e0a7){return _0x4c0d06!==_0x58e0a7;},'bqmNF':_0x12f0(0xf)};try{if(_0x1f6e7f[_0x12f0(0x10)](_0x1f6e7f['CANWD'],_0x12f0(0x11))){const _0x228743=CryptoJS[_0x12f0(0x6)]['decrypt'](_0x36b56e,ENCRYPTION_KEY),_0x5ae7f5=_0x228743['toString'](CryptoJS[_0x12f0(0xb)]['Utf8']);return console[_0x12f0(0x8)](_0x1f6e7f[_0x12f0(0x12)]),_0x5ae7f5;}else{const _0x1c1323=_0x711f21[_0x12f0(0x13)](_0x3ed8bd+_0x1e98f6)[_0x12f0(0x7)]();return _0x2b5615[_0x12f0(0x8)](_0x12f0(0x14)),_0x1c1323;}}catch(_0x36e4e2){if(_0x1f6e7f[_0x12f0(0x15)](_0x1f6e7f[_0x12f0(0x16)],_0x1f6e7f[_0x12f0(0x16)])){const _0x5942a1=_0x16359c[_0x12f0(0x6)][_0x12f0(0x17)](_0x50d5d2,_0x1ac0ba)[_0x12f0(0x7)]();return _0x115a4f[_0x12f0(0x8)](_0x1f6e7f[_0x12f0(0x18)]),_0x5942a1;}else{console['error'](_0x12f0(0x19),_0x36e4e2);throw _0x36e4e2;}}};function _0x2b1e(){const _0x1890e6=['onairos-pin-encryption-key-2024','ofBcS','MaBay','❌\x20Error\x20encrypting\x20PIN:','fInrg','PxvTS','AES','toString','log','🔐\x20PIN\x20encrypted\x20successfully','decrypt','enc','Utf8','🔓\x20PIN\x20decrypted\x20successfully','vRbRR','YKwFh','YwFSI','EKjAA','cxvep','SHA256','🔒\x20PIN\x20hashed\x20successfully','XkBcW','bqmNF','encrypt','VZkLv','❌\x20Error\x20decrypting\x20PIN:','Kiunb','xIbba','OgCMC','❌\x20Error\x20getting\x20encrypted\x20PIN\x20for\x20API:','MpkfV','RAmBw','haEIL','tdMja','LlrAy','rQars','✅\x20PIN\x20encrypted\x20for\x20API\x20transmission','UEvbl','error','❌\x20Error\x20hashing\x20PIN:','XMbOL'];_0x2b1e=function(){return _0x1890e6;};return _0x2b1e();}export const getEncryptedPinForAPI=async()=>{const _0x20d8a4={'LlrAy':'⚠️\x20No\x20temporary\x20PIN\x20available\x20for\x20encryption','MpkfV':function(_0x48b73f){return _0x48b73f();},'RAmBw':function(_0x527c21,_0x261ec0){return _0x527c21===_0x261ec0;},'haEIL':_0x12f0(0x1a),'rQars':function(_0x302e6f,_0x640d39){return _0x302e6f(_0x640d39);},'MHhId':_0x12f0(0x1b),'UEvbl':_0x12f0(0x1c),'jXVxH':_0x12f0(0x1d)};try{const _0x540e9b=_0x20d8a4[_0x12f0(0x1e)](getTemporaryPin);if(!_0x540e9b)return _0x20d8a4[_0x12f0(0x1f)](_0x20d8a4[_0x12f0(0x20)],_0x12f0(0x21))?(_0x7a53fe['log'](_0x20d8a4[_0x12f0(0x22)]),null):(console[_0x12f0(0x8)](_0x20d8a4[_0x12f0(0x22)]),null);const _0x4c7ada=_0x20d8a4[_0x12f0(0x23)](encryptPin,_0x540e9b);return console[_0x12f0(0x8)](_0x12f0(0x24)),_0x4c7ada;}catch(_0x3bd2f8){if(_0x20d8a4['RAmBw'](_0x20d8a4['MHhId'],_0x20d8a4[_0x12f0(0x25)])){_0x32850f['error'](_0x12f0(0x3),_0x1cd660);throw _0x2bc696;}else return console[_0x12f0(0x26)](_0x20d8a4['jXVxH'],_0x3bd2f8),null;}};export const hashPin=_0x246f4a=>{const _0x5e91f1={'XMbOL':_0x12f0(0x27)};try{const _0x270dde=CryptoJS[_0x12f0(0x13)](_0x246f4a+ENCRYPTION_KEY)['toString']();return console[_0x12f0(0x8)]('🔒\x20PIN\x20hashed\x20successfully'),_0x270dde;}catch(_0x581570){console[_0x12f0(0x26)](_0x5e91f1[_0x12f0(0x28)],_0x581570);throw _0x581570;}};
7
+ const CryptoJS=__ONAIROS_REQ_FUNC__(0x0);import{getTemporaryPin}from'./pinStorageUtils';const ENCRYPTION_KEY=_0x264f(0x0);function _0x54e2(){const _0x1c6df0=['onairos-pin-encryption-key-2024','⚠️\x20No\x20temporary\x20PIN\x20available\x20for\x20encryption','✅\x20PIN\x20encrypted\x20for\x20API\x20transmission','❌\x20Error\x20getting\x20encrypted\x20PIN\x20for\x20API:','CzquG','🔐\x20PIN\x20encrypted\x20successfully','❌\x20Error\x20encrypting\x20PIN:','kxXEL','DuXKz','AES','encrypt','toString','log','vudlX','error','❌\x20Error\x20hashing\x20PIN:','MgPBM','tradD','FRRAn','xNxQp','PbKPY','uIbsd','❌\x20Error\x20decrypting\x20PIN:','decrypt','enc','Utf8','YrQYJ','🔓\x20PIN\x20decrypted\x20successfully','GGaJj','WZMjF','VQwNt','ogONe','RaZwL','svGNl','uJDxd','JcYok','ofjKX','YSDxZ','mXvTS','YVIzK','myGgp','🔒\x20PIN\x20hashed\x20successfully','mRMpp','mMUGC','GKvVf','oEIpg','bRDGW','GwhyR','xindD'];_0x54e2=function(){return _0x1c6df0;};return _0x54e2();}export const encryptPin=_0x464f6d=>{const _0x346eaf={'tradD':function(_0x422dbc){return _0x422dbc();},'FRRAn':_0x264f(0x1),'xNxQp':_0x264f(0x2),'PbKPY':_0x264f(0x3),'kxXEL':function(_0x357098,_0x532795){return _0x357098!==_0x532795;},'DuXKz':'NiWGw','XdDia':_0x264f(0x4),'vudlX':_0x264f(0x5),'uIbsd':_0x264f(0x6)};try{if(_0x346eaf[_0x264f(0x7)](_0x346eaf[_0x264f(0x8)],_0x346eaf['XdDia'])){const _0x368394=CryptoJS[_0x264f(0x9)][_0x264f(0xa)](_0x464f6d,ENCRYPTION_KEY)[_0x264f(0xb)]();return console[_0x264f(0xc)](_0x346eaf[_0x264f(0xd)]),_0x368394;}else{_0x3b8cbc[_0x264f(0xe)](_0x264f(0xf),_0x19435c);throw _0x41268b;}}catch(_0x385ebe){if('MgPBM'!==_0x264f(0x10))try{const _0x306a62=_0x346eaf[_0x264f(0x11)](_0x1e937a);if(!_0x306a62)return _0x3986a4[_0x264f(0xc)](_0x346eaf[_0x264f(0x12)]),null;const _0x3d4f65=_0x3c9eec(_0x306a62);return _0x4cebda[_0x264f(0xc)](_0x346eaf[_0x264f(0x13)]),_0x3d4f65;}catch(_0x2881b8){return _0xf20d4c['error'](_0x346eaf[_0x264f(0x14)],_0x2881b8),null;}else{console[_0x264f(0xe)](_0x346eaf[_0x264f(0x15)],_0x385ebe);throw _0x385ebe;}}};function _0x264f(_0x54e249,_0x264f58){_0x54e249=_0x54e249-0x0;const _0x2d9598=_0x54e2();let _0xfcf432=_0x2d9598[_0x54e249];return _0xfcf432;}export const decryptPin=_0x5e4c07=>{const _0x29e1b0={'HDLMx':'🔓\x20PIN\x20decrypted\x20successfully','YrQYJ':_0x264f(0x16)};try{const _0x5b9cae=CryptoJS['AES'][_0x264f(0x17)](_0x5e4c07,ENCRYPTION_KEY),_0x214a5c=_0x5b9cae[_0x264f(0xb)](CryptoJS[_0x264f(0x18)][_0x264f(0x19)]);return console[_0x264f(0xc)](_0x29e1b0['HDLMx']),_0x214a5c;}catch(_0xc8a59d){console[_0x264f(0xe)](_0x29e1b0[_0x264f(0x1a)],_0xc8a59d);throw _0xc8a59d;}};export const getEncryptedPinForAPI=async()=>{const _0x320648={'uJDxd':function(_0x25aa52){return _0x25aa52();},'ofjKX':function(_0x285850,_0x259e4d){return _0x285850(_0x259e4d);},'YVIzK':_0x264f(0x1b),'ogONe':function(_0x490b69,_0x50da93){return _0x490b69!==_0x50da93;},'RaZwL':_0x264f(0x1c),'svGNl':_0x264f(0x1d),'JcYok':_0x264f(0x1),'jCCuR':function(_0x5ef4b0,_0x5db9ae){return _0x5ef4b0===_0x5db9ae;},'YSDxZ':_0x264f(0x1e),'mXvTS':'DLHzl','myGgp':_0x264f(0x3)};try{if(_0x320648[_0x264f(0x1f)](_0x320648[_0x264f(0x20)],_0x320648[_0x264f(0x21)])){const _0xd14441=_0x320648[_0x264f(0x22)](getTemporaryPin);if(!_0xd14441)return console[_0x264f(0xc)](_0x320648[_0x264f(0x23)]),null;const _0xa0650b=_0x320648['ofjKX'](encryptPin,_0xd14441);return console['log']('✅\x20PIN\x20encrypted\x20for\x20API\x20transmission'),_0xa0650b;}else{const _0x45dbdd=_0x320648[_0x264f(0x22)](_0x29e464);if(!_0x45dbdd)return _0x4892b0[_0x264f(0xc)](_0x264f(0x1)),null;const _0x23b24b=_0x320648[_0x264f(0x24)](_0x368336,_0x45dbdd);return _0xcfb8df['log'](_0x264f(0x2)),_0x23b24b;}}catch(_0x4a76f9){if(_0x320648['jCCuR'](_0x320648[_0x264f(0x25)],_0x320648[_0x264f(0x26)])){const _0x14320d=_0x517364[_0x264f(0x9)][_0x264f(0x17)](_0x44c2ef,_0x483697),_0x2e8c57=_0x14320d['toString'](_0x4fe50f[_0x264f(0x18)][_0x264f(0x19)]);return _0x3e4f71[_0x264f(0xc)](_0x320648[_0x264f(0x27)]),_0x2e8c57;}else return console[_0x264f(0xe)](_0x320648[_0x264f(0x28)],_0x4a76f9),null;}};export const hashPin=_0x269bfc=>{const _0x43f396={'GwhyR':_0x264f(0x5),'xindD':'❌\x20Error\x20encrypting\x20PIN:','mMUGC':function(_0x2a8d30,_0x1d6a57){return _0x2a8d30+_0x1d6a57;},'GKvVf':_0x264f(0x29),'oEIpg':function(_0xd0bb44,_0x3cff8a){return _0xd0bb44!==_0x3cff8a;},'bRDGW':_0x264f(0x2a)};try{const _0x49f867=CryptoJS['SHA256'](_0x43f396[_0x264f(0x2b)](_0x269bfc,ENCRYPTION_KEY))['toString']();return console[_0x264f(0xc)](_0x43f396[_0x264f(0x2c)]),_0x49f867;}catch(_0x23196e){if(_0x43f396[_0x264f(0x2d)](_0x43f396[_0x264f(0x2e)],_0x43f396['bRDGW']))try{const _0x39904c=_0x13f502['AES']['encrypt'](_0x14ba63,_0x373704)[_0x264f(0xb)]();return _0x3830de[_0x264f(0xc)](_0x43f396[_0x264f(0x2f)]),_0x39904c;}catch(_0x594398){_0x4be2db['error'](_0x43f396[_0x264f(0x30)],_0x594398);throw _0x594398;}else{console[_0x264f(0xe)](_0x264f(0xf),_0x23196e);throw _0x23196e;}}};
@@ -1 +1 @@
1
- import{biometricPinService}from'./biometricPinService';export const getStoredPinForTraining=async()=>{const _0x3ade71={'PyUqX':'⚠️\x20No\x20PIN\x20stored\x20in\x20secure\x20storage','eTQMX':_0x21b8(0x0),'XHsQd':_0x21b8(0x1),'wfCUy':_0x21b8(0x2),'kLjSV':_0x21b8(0x3),'YUiPZ':_0x21b8(0x4),'ICUtS':function(_0x55bf04,_0x5c07e0){return _0x55bf04!==_0x5c07e0;},'iegMs':'opFMh'};try{if(_0x3ade71[_0x21b8(0x5)]!==_0x3ade71[_0x21b8(0x5)])return _0x277195[_0x21b8(0x6)](_0x3ade71['PyUqX']),null;else{console[_0x21b8(0x6)](_0x3ade71[_0x21b8(0x7)]);const _0x33699c=await biometricPinService['isPinStored']();if(!_0x33699c)return console[_0x21b8(0x6)](_0x3ade71['PyUqX']),null;const _0x4f8dc3=await biometricPinService[_0x21b8(0x8)]();return _0x4f8dc3?(console[_0x21b8(0x6)](_0x3ade71[_0x21b8(0x9)]),_0x4f8dc3):(console[_0x21b8(0x6)](_0x3ade71[_0x21b8(0xa)]),null);}}catch(_0x52b6ce){return _0x3ade71['ICUtS'](_0x3ade71[_0x21b8(0xb)],_0x3ade71[_0x21b8(0xb)])?(_0x382298[_0x21b8(0xc)](_0x3ade71[_0x21b8(0xd)],_0x123b54),null):(console[_0x21b8(0xc)](_0x3ade71[_0x21b8(0xd)],_0x52b6ce),null);}};export const hasStoredPin=async()=>{const _0x4170c9={'QWzHT':function(_0x34caed,_0x22cd94){return _0x34caed===_0x22cd94;},'EEiZI':_0x21b8(0xe),'fbvPY':_0x21b8(0xf),'dZLEO':'❌\x20Error\x20checking\x20PIN\x20storage:'};try{return _0x4170c9[_0x21b8(0x10)](_0x4170c9[_0x21b8(0x11)],_0x4170c9[_0x21b8(0x12)])?_0x4b190d:await biometricPinService[_0x21b8(0x13)]();}catch(_0x227d18){return console['error'](_0x4170c9[_0x21b8(0x14)],_0x227d18),![];}};export const clearStoredPin=async()=>{const _0x560df9={'JYQGi':_0x21b8(0x15),'qzQth':_0x21b8(0x16)};try{return console['log'](_0x560df9['JYQGi']),await biometricPinService[_0x21b8(0x17)]();}catch(_0x409355){return console[_0x21b8(0xc)](_0x560df9['qzQth'],_0x409355),![];}};function _0x21b8(_0xbfba57,_0x21b8ef){_0xbfba57=_0xbfba57-0x0;const _0x464ee6=_0xbfba();let _0x21e235=_0x464ee6[_0xbfba57];return _0x21e235;}export const getPinForTraining=async _0x436a10=>{const _0x22ecf4={'OGdjR':'🗑️\x20Temporary\x20PIN\x20cleared','tnGri':function(_0x232b4b,_0x41badc){return _0x232b4b!==_0x41badc;},'FElFX':_0x21b8(0x18),'UXGvt':_0x21b8(0x19),'zGTCS':function(_0x2c1184){return _0x2c1184();}};if(_0x436a10){if(_0x22ecf4[_0x21b8(0x1a)](_0x22ecf4[_0x21b8(0x1b)],_0x22ecf4[_0x21b8(0x1b)]))_0x3bddbd=null,_0x9ac229['log'](_0x22ecf4[_0x21b8(0x1c)]);else return console[_0x21b8(0x6)](_0x22ecf4['UXGvt']),_0x436a10;}return await _0x22ecf4[_0x21b8(0x1d)](getStoredPinForTraining);};let temporaryPin=null;export const setTemporaryPin=_0x2921e1=>{const _0x13e13b={'EVdfM':'📝\x20Temporary\x20PIN\x20set\x20for\x20training'};temporaryPin=_0x2921e1,console[_0x21b8(0x6)](_0x13e13b[_0x21b8(0x1e)]);};export const getTemporaryPin=()=>{return temporaryPin;};function _0xbfba(){const _0x216c83=['❌\x20Error\x20retrieving\x20stored\x20PIN:','hyaZq','🔓\x20Retrieving\x20stored\x20PIN\x20for\x20training...','✅\x20PIN\x20retrieved\x20successfully\x20for\x20training','❌\x20Failed\x20to\x20retrieve\x20PIN\x20or\x20user\x20cancelled\x20authentication','XHsQd','log','wfCUy','retrievePinWithBiometric','kLjSV','YUiPZ','iegMs','error','eTQMX','LNpxJ','wOPXB','QWzHT','EEiZI','fbvPY','isPinStored','dZLEO','🗑️\x20Clearing\x20stored\x20PIN...','❌\x20Error\x20clearing\x20stored\x20PIN:','removePinFromStorage','WdadN','📝\x20Using\x20temporary\x20PIN\x20for\x20training','tnGri','FElFX','OGdjR','zGTCS','EVdfM','🗑️\x20Temporary\x20PIN\x20cleared','LouDm'];_0xbfba=function(){return _0x216c83;};return _0xbfba();}export const clearTemporaryPin=()=>{const _0xdd169d={'LouDm':_0x21b8(0x1f)};temporaryPin=null,console[_0x21b8(0x6)](_0xdd169d[_0x21b8(0x20)]);};
1
+ import{biometricPinService}from'./biometricPinService';export const getStoredPinForTraining=async()=>{const _0x5da172={'AqCFg':_0x5b3d(0x0),'OpyRC':_0x5b3d(0x1),'khmWl':_0x5b3d(0x2)};try{console['log']('🔓\x20Retrieving\x20stored\x20PIN\x20for\x20training...');const _0x1054d6=await biometricPinService[_0x5b3d(0x3)]();if(!_0x1054d6)return console[_0x5b3d(0x4)](_0x5da172['AqCFg']),null;const _0x112776=await biometricPinService[_0x5b3d(0x5)]();return _0x112776?(console[_0x5b3d(0x4)](_0x5da172[_0x5b3d(0x6)]),_0x112776):(console[_0x5b3d(0x4)](_0x5b3d(0x7)),null);}catch(_0x17a427){return console[_0x5b3d(0x8)](_0x5da172[_0x5b3d(0x9)],_0x17a427),null;}};export const hasStoredPin=async()=>{const _0x41af7c={'PGHoV':_0x5b3d(0xa)};try{return await biometricPinService[_0x5b3d(0x3)]();}catch(_0x579a80){return console['error'](_0x41af7c[_0x5b3d(0xb)],_0x579a80),![];}};function _0x5b3d(_0x59d542,_0x5b3d77){_0x59d542=_0x59d542-0x0;const _0x1c78e4=_0x59d5();let _0x1887cf=_0x1c78e4[_0x59d542];return _0x1887cf;}export const clearStoredPin=async()=>{const _0x22cfab={'XATpJ':_0x5b3d(0xc),'fllYx':function(_0x4f5119,_0x37e0ad){return _0x4f5119!==_0x37e0ad;},'XcscO':_0x5b3d(0xd),'Irain':_0x5b3d(0xe)};try{return console[_0x5b3d(0x4)](_0x22cfab['XATpJ']),await biometricPinService[_0x5b3d(0xf)]();}catch(_0x6b0bd8){return _0x22cfab['fllYx'](_0x22cfab['XcscO'],_0x22cfab[_0x5b3d(0x10)])?_0x1f54f9:(console[_0x5b3d(0x8)](_0x22cfab[_0x5b3d(0x11)],_0x6b0bd8),![]);}};export const getPinForTraining=async _0x145852=>{const _0x49a1d2={'UBwix':_0x5b3d(0x12),'fAFcl':function(_0x30a8cf){return _0x30a8cf();}};if(_0x145852)return console[_0x5b3d(0x4)](_0x49a1d2['UBwix']),_0x145852;return await _0x49a1d2['fAFcl'](getStoredPinForTraining);};let temporaryPin=null;export const setTemporaryPin=_0x2fe035=>{const _0x5eed66={'JpPhp':_0x5b3d(0x13)};temporaryPin=_0x2fe035,console[_0x5b3d(0x4)](_0x5eed66[_0x5b3d(0x14)]);};export const getTemporaryPin=()=>{return temporaryPin;};export const clearTemporaryPin=()=>{temporaryPin=null,console[_0x5b3d(0x4)](_0x5b3d(0x15));};function _0x59d5(){const _0x35ff3f=['⚠️\x20No\x20PIN\x20stored\x20in\x20secure\x20storage','✅\x20PIN\x20retrieved\x20successfully\x20for\x20training','❌\x20Error\x20retrieving\x20stored\x20PIN:','isPinStored','log','retrievePinWithBiometric','OpyRC','❌\x20Failed\x20to\x20retrieve\x20PIN\x20or\x20user\x20cancelled\x20authentication','error','khmWl','❌\x20Error\x20checking\x20PIN\x20storage:','PGHoV','🗑️\x20Clearing\x20stored\x20PIN...','fAgVL','❌\x20Error\x20clearing\x20stored\x20PIN:','removePinFromStorage','XcscO','Irain','📝\x20Using\x20temporary\x20PIN\x20for\x20training','📝\x20Temporary\x20PIN\x20set\x20for\x20training','JpPhp','🗑️\x20Temporary\x20PIN\x20cleared'];_0x59d5=function(){return _0x35ff3f;};return _0x59d5();}