@onairos/react-native 3.7.1 → 3.7.3

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 (241) hide show
  1. package/lib/commonjs/api/index.js +219 -9
  2. package/lib/commonjs/assets/icons/spotify.png +0 -0
  3. package/lib/commonjs/assets/images/spotify.png +0 -0
  4. package/lib/commonjs/components/BodyText.js +27 -9
  5. package/lib/commonjs/components/BrandMark.js +111 -10
  6. package/lib/commonjs/components/CodeInput.js +116 -9
  7. package/lib/commonjs/components/EmailInput.js +30 -8
  8. package/lib/commonjs/components/GoogleButton.js +56 -9
  9. package/lib/commonjs/components/HeadingGroup.js +43 -9
  10. package/lib/commonjs/components/LLMDataInputModal.js +664 -14
  11. package/lib/commonjs/components/ModalHeader.js +99 -9
  12. package/lib/commonjs/components/ModalSheet.js +47 -9
  13. package/lib/commonjs/components/Onairos.js +380 -14
  14. package/lib/commonjs/components/OnairosButton.js +313 -13
  15. package/lib/commonjs/components/OnairosSignInButton.js +130 -12
  16. package/lib/commonjs/components/Overlay.js +465 -13
  17. package/lib/commonjs/components/PersonaImage.js +137 -10
  18. package/lib/commonjs/components/PersonaLoadingScreen.js +318 -12
  19. package/lib/commonjs/components/PersonalizationConsentScreen.js +467 -13
  20. package/lib/commonjs/components/PinCreationScreen.js +403 -12
  21. package/lib/commonjs/components/PinInput.js +464 -9
  22. package/lib/commonjs/components/PlatformConnectorsStep.js +1311 -23
  23. package/lib/commonjs/components/PlatformList.js +137 -10
  24. package/lib/commonjs/components/PlatformToggle.js +180 -9
  25. package/lib/commonjs/components/PrimaryButton.js +180 -10
  26. package/lib/commonjs/components/SignInMatchAnimation.js +197 -9
  27. package/lib/commonjs/components/SignInStep.js +345 -12
  28. package/lib/commonjs/components/UniversalOnboarding.js +2780 -30
  29. package/lib/commonjs/components/VerificationStep.js +176 -11
  30. package/lib/commonjs/components/WelcomeScreen.js +461 -22
  31. package/lib/commonjs/components/icons/Basicproficon.js +37 -8
  32. package/lib/commonjs/components/icons/Basicprofile.js +21 -8
  33. package/lib/commonjs/components/icons/Checkbox.js +21 -8
  34. package/lib/commonjs/components/icons/Checkmark.js +27 -8
  35. package/lib/commonjs/components/icons/Contentanalysis.js +21 -8
  36. package/lib/commonjs/components/icons/Contenticon.js +39 -8
  37. package/lib/commonjs/components/icons/EnochE.js +41 -8
  38. package/lib/commonjs/components/icons/Personalityicon.js +30 -8
  39. package/lib/commonjs/components/icons/Personalityprofile.js +21 -8
  40. package/lib/commonjs/components/icons/Personalitytraits.js +21 -8
  41. package/lib/commonjs/components/icons/Userpreferences.js +21 -8
  42. package/lib/commonjs/components/icons/index.js +84 -17
  43. package/lib/commonjs/components/onboarding/OAuthWebView.js +1754 -18
  44. package/lib/commonjs/components/onboarding/OnboardingHeader.js +74 -10
  45. package/lib/commonjs/components/onboarding/PinInput.js +283 -10
  46. package/lib/commonjs/components/onboarding/PlatformConnector.js +249 -11
  47. package/lib/commonjs/config/PLATFORM_APIS.md +849 -0
  48. package/lib/commonjs/config/api.js +56 -7
  49. package/lib/commonjs/constants/index.js +120 -7
  50. package/lib/commonjs/context/AuthContext.js +345 -10
  51. package/lib/commonjs/hooks/useConnectedAccounts.js +111 -9
  52. package/lib/commonjs/hooks/useConnections.js +102 -8
  53. package/lib/commonjs/hooks/useCredentials.js +178 -10
  54. package/lib/commonjs/hooks/useUserConnections.js +148 -10
  55. package/lib/commonjs/index.js +439 -34
  56. package/lib/commonjs/services/apiClient.js +298 -8
  57. package/lib/commonjs/services/biometricPinService.js +180 -8
  58. package/lib/commonjs/services/chatGPTConversationExtractor.js +155 -8
  59. package/lib/commonjs/services/chatGPTConversationService.js +275 -9
  60. package/lib/commonjs/services/claudeConversationExtractor.js +103 -8
  61. package/lib/commonjs/services/claudeConversationService.js +158 -9
  62. package/lib/commonjs/services/connectedAccountsService.js +310 -10
  63. package/lib/commonjs/services/googleAuthService.js +252 -11
  64. package/lib/commonjs/services/hingeDataExtractor.js +105 -8
  65. package/lib/commonjs/services/hingeDataService.js +150 -9
  66. package/lib/commonjs/services/imageCompressionService.js +260 -7
  67. package/lib/commonjs/services/instagramDataExtractor.js +126 -8
  68. package/lib/commonjs/services/instagramDataService.js +163 -9
  69. package/lib/commonjs/services/jwtStorageService.js +276 -7
  70. package/lib/commonjs/services/linkedinDOMExtractor.js +245 -7
  71. package/lib/commonjs/services/linkedinProfileService.js +222 -9
  72. package/lib/commonjs/services/linkedinScrapingService.js +230 -8
  73. package/lib/commonjs/services/llmDataStorage.js +294 -8
  74. package/lib/commonjs/services/mobileTrainingService.js +186 -8
  75. package/lib/commonjs/services/netflixDataExtractor.js +120 -8
  76. package/lib/commonjs/services/netflixDataService.js +198 -9
  77. package/lib/commonjs/services/pinEncryptionService.js +84 -8
  78. package/lib/commonjs/services/pinStorageUtils.js +105 -7
  79. package/lib/commonjs/services/platformAuthService.js +1484 -12
  80. package/lib/commonjs/services/sephoraDataExtractor.js +140 -8
  81. package/lib/commonjs/services/sephoraDataService.js +200 -9
  82. package/lib/commonjs/services/spotifyDataExtractor.js +148 -8
  83. package/lib/commonjs/services/spotifyDataService.js +241 -9
  84. package/lib/commonjs/services/storageService.js +404 -8
  85. package/lib/commonjs/services/telegramDataExtractor.js +115 -8
  86. package/lib/commonjs/services/telegramDataService.js +499 -9
  87. package/lib/commonjs/services/trainingApiHelpers.js +73 -7
  88. package/lib/commonjs/services/userConnectionsService.js +340 -10
  89. package/lib/commonjs/services/youtubeMigrationService.js +416 -10
  90. package/lib/commonjs/theme/index.js +250 -7
  91. package/lib/commonjs/types/ambient.d.js +2 -1
  92. package/lib/commonjs/types/declarations.d.js +2 -1
  93. package/lib/commonjs/types/index.js +6 -1
  94. package/lib/commonjs/types/node-fix.d.js +2 -1
  95. package/lib/commonjs/types/node-override.d.js +2 -1
  96. package/lib/commonjs/types/opacity.d.js +2 -1
  97. package/lib/commonjs/types.js +14 -1
  98. package/lib/commonjs/utils/Portal.js +98 -8
  99. package/lib/commonjs/utils/api.js +130 -9
  100. package/lib/commonjs/utils/assetRegistry.js +210 -35
  101. package/lib/commonjs/utils/auth.js +112 -9
  102. package/lib/commonjs/utils/connectorTests.js +613 -29
  103. package/lib/commonjs/utils/crypto.js +62 -8
  104. package/lib/commonjs/utils/debugHelper.js +64 -1
  105. package/lib/commonjs/utils/encryption.js +76 -7
  106. package/lib/commonjs/utils/eventUtils.js +288 -1
  107. package/lib/commonjs/utils/haptics.js +66 -9
  108. package/lib/commonjs/utils/imagePreloader.js +6 -1
  109. package/lib/commonjs/utils/networkDiagnostics.js +226 -8
  110. package/lib/commonjs/utils/onairosApi.js +350 -9
  111. package/lib/commonjs/utils/programmaticFlow.js +117 -9
  112. package/lib/commonjs/utils/retryHelper.js +220 -1
  113. package/lib/commonjs/utils/secureStorage.js +349 -10
  114. package/lib/commonjs/utils/webviewScripts/chatgpt.js +551 -1
  115. package/lib/commonjs/utils/webviewScripts/claude.js +376 -1
  116. package/lib/commonjs/utils/webviewScripts/hinge.js +411 -1
  117. package/lib/commonjs/utils/webviewScripts/index.js +698 -15
  118. package/lib/commonjs/utils/webviewScripts/instagram.js +454 -1
  119. package/lib/commonjs/utils/webviewScripts/linkedin.js +880 -1
  120. package/lib/commonjs/utils/webviewScripts/netflix.js +382 -1
  121. package/lib/commonjs/utils/webviewScripts/sephora.js +516 -1
  122. package/lib/commonjs/utils/webviewScripts/spotify.js +419 -1
  123. package/lib/commonjs/utils/webviewScripts/telegram.js +678 -1
  124. package/lib/module/api/index.js +211 -1
  125. package/lib/module/assets/icons/spotify.png +0 -0
  126. package/lib/module/assets/images/spotify.png +0 -0
  127. package/lib/module/components/BodyText.js +20 -1
  128. package/lib/module/components/BrandMark.js +104 -1
  129. package/lib/module/components/CodeInput.js +109 -1
  130. package/lib/module/components/EmailInput.js +23 -1
  131. package/lib/module/components/GoogleButton.js +49 -1
  132. package/lib/module/components/HeadingGroup.js +36 -1
  133. package/lib/module/components/LLMDataInputModal.js +656 -7
  134. package/lib/module/components/ModalHeader.js +92 -1
  135. package/lib/module/components/ModalSheet.js +39 -1
  136. package/lib/module/components/Onairos.js +373 -1
  137. package/lib/module/components/OnairosButton.js +305 -1
  138. package/lib/module/components/OnairosSignInButton.js +121 -1
  139. package/lib/module/components/Overlay.js +456 -1
  140. package/lib/module/components/PersonaImage.js +129 -1
  141. package/lib/module/components/PersonaLoadingScreen.js +310 -1
  142. package/lib/module/components/PersonalizationConsentScreen.js +460 -1
  143. package/lib/module/components/PinCreationScreen.js +396 -1
  144. package/lib/module/components/PinInput.js +456 -1
  145. package/lib/module/components/PlatformConnectorsStep.js +1302 -6
  146. package/lib/module/components/PlatformList.js +129 -1
  147. package/lib/module/components/PlatformToggle.js +173 -1
  148. package/lib/module/components/PrimaryButton.js +172 -1
  149. package/lib/module/components/SignInMatchAnimation.js +189 -1
  150. package/lib/module/components/SignInStep.js +338 -1
  151. package/lib/module/components/UniversalOnboarding.js +2770 -1
  152. package/lib/module/components/VerificationStep.js +168 -1
  153. package/lib/module/components/WelcomeScreen.js +453 -1
  154. package/lib/module/components/icons/Basicproficon.js +30 -1
  155. package/lib/module/components/icons/Basicprofile.js +14 -1
  156. package/lib/module/components/icons/Checkbox.js +14 -1
  157. package/lib/module/components/icons/Checkmark.js +20 -1
  158. package/lib/module/components/icons/Contentanalysis.js +14 -1
  159. package/lib/module/components/icons/Contenticon.js +32 -1
  160. package/lib/module/components/icons/EnochE.js +34 -1
  161. package/lib/module/components/icons/Personalityicon.js +23 -1
  162. package/lib/module/components/icons/Personalityprofile.js +14 -1
  163. package/lib/module/components/icons/Personalitytraits.js +14 -1
  164. package/lib/module/components/icons/Userpreferences.js +14 -1
  165. package/lib/module/components/icons/index.js +13 -1
  166. package/lib/module/components/onboarding/OAuthWebView.js +1746 -1
  167. package/lib/module/components/onboarding/OnboardingHeader.js +66 -1
  168. package/lib/module/components/onboarding/PinInput.js +274 -1
  169. package/lib/module/components/onboarding/PlatformConnector.js +240 -1
  170. package/lib/module/config/PLATFORM_APIS.md +849 -0
  171. package/lib/module/config/api.js +47 -1
  172. package/lib/module/constants/index.js +114 -1
  173. package/lib/module/context/AuthContext.js +335 -1
  174. package/lib/module/hooks/useConnectedAccounts.js +106 -1
  175. package/lib/module/hooks/useConnections.js +95 -1
  176. package/lib/module/hooks/useCredentials.js +171 -6
  177. package/lib/module/hooks/useUserConnections.js +140 -1
  178. package/lib/module/index.js +172 -1
  179. package/lib/module/services/apiClient.js +295 -1
  180. package/lib/module/services/biometricPinService.js +169 -1
  181. package/lib/module/services/chatGPTConversationExtractor.js +149 -1
  182. package/lib/module/services/chatGPTConversationService.js +268 -1
  183. package/lib/module/services/claudeConversationExtractor.js +97 -1
  184. package/lib/module/services/claudeConversationService.js +151 -1
  185. package/lib/module/services/connectedAccountsService.js +293 -1
  186. package/lib/module/services/googleAuthService.js +241 -1
  187. package/lib/module/services/hingeDataExtractor.js +99 -1
  188. package/lib/module/services/hingeDataService.js +143 -1
  189. package/lib/module/services/imageCompressionService.js +250 -1
  190. package/lib/module/services/instagramDataExtractor.js +120 -1
  191. package/lib/module/services/instagramDataService.js +156 -1
  192. package/lib/module/services/jwtStorageService.js +257 -1
  193. package/lib/module/services/linkedinDOMExtractor.js +234 -1
  194. package/lib/module/services/linkedinProfileService.js +210 -1
  195. package/lib/module/services/linkedinScrapingService.js +219 -1
  196. package/lib/module/services/llmDataStorage.js +277 -1
  197. package/lib/module/services/mobileTrainingService.js +173 -1
  198. package/lib/module/services/netflixDataExtractor.js +114 -1
  199. package/lib/module/services/netflixDataService.js +191 -1
  200. package/lib/module/services/pinEncryptionService.js +74 -6
  201. package/lib/module/services/pinStorageUtils.js +93 -1
  202. package/lib/module/services/platformAuthService.js +1461 -1
  203. package/lib/module/services/sephoraDataExtractor.js +134 -1
  204. package/lib/module/services/sephoraDataService.js +193 -1
  205. package/lib/module/services/spotifyDataExtractor.js +142 -1
  206. package/lib/module/services/spotifyDataService.js +234 -1
  207. package/lib/module/services/storageService.js +383 -1
  208. package/lib/module/services/telegramDataExtractor.js +109 -1
  209. package/lib/module/services/telegramDataService.js +493 -1
  210. package/lib/module/services/trainingApiHelpers.js +67 -1
  211. package/lib/module/services/userConnectionsService.js +329 -1
  212. package/lib/module/services/youtubeMigrationService.js +405 -1
  213. package/lib/module/theme/index.js +245 -1
  214. package/lib/module/types.js +10 -1
  215. package/lib/module/utils/Portal.js +90 -1
  216. package/lib/module/utils/api.js +118 -1
  217. package/lib/module/utils/assetRegistry.js +200 -34
  218. package/lib/module/utils/auth.js +100 -1
  219. package/lib/module/utils/connectorTests.js +600 -27
  220. package/lib/module/utils/crypto.js +54 -1
  221. package/lib/module/utils/debugHelper.js +54 -1
  222. package/lib/module/utils/encryption.js +67 -1
  223. package/lib/module/utils/eventUtils.js +270 -1
  224. package/lib/module/utils/haptics.js +59 -8
  225. package/lib/module/utils/imagePreloader.js +3 -1
  226. package/lib/module/utils/networkDiagnostics.js +217 -1
  227. package/lib/module/utils/onairosApi.js +333 -1
  228. package/lib/module/utils/programmaticFlow.js +111 -1
  229. package/lib/module/utils/retryHelper.js +211 -1
  230. package/lib/module/utils/secureStorage.js +330 -6
  231. package/lib/module/utils/webviewScripts/chatgpt.js +545 -1
  232. package/lib/module/utils/webviewScripts/claude.js +370 -1
  233. package/lib/module/utils/webviewScripts/hinge.js +405 -1
  234. package/lib/module/utils/webviewScripts/index.js +434 -1
  235. package/lib/module/utils/webviewScripts/instagram.js +448 -1
  236. package/lib/module/utils/webviewScripts/linkedin.js +874 -1
  237. package/lib/module/utils/webviewScripts/netflix.js +376 -1
  238. package/lib/module/utils/webviewScripts/sephora.js +510 -1
  239. package/lib/module/utils/webviewScripts/spotify.js +413 -1
  240. package/lib/module/utils/webviewScripts/telegram.js +672 -1
  241. package/package.json +2 -2
@@ -1,13 +1,465 @@
1
- 'use strict';
2
- // Onairos SDK - Asset Registry (auto-generated)
3
- var __ONAIROS_REQ_REGISTRY__ = [
4
- require("react"),
5
- require("react-native"),
6
- require("react-native-vector-icons/MaterialIcons"),
7
- require("../api"),
8
- require("../utils/encryption"),
9
- require("../utils/assetRegistry"),
10
- require("../config/api")
11
- ];
12
- function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
13
- Object[_0x2814(0x0)](exports,_0x2814(0x1),{'value':!![]}),exports[_0x2814(0x2)]=void 0x0;var _react=_interopRequireWildcard(__ONAIROS_REQ_FUNC__(0x0)),_reactNative=__ONAIROS_REQ_FUNC__(0x1),_MaterialIcons=_interopRequireDefault(__ONAIROS_REQ_FUNC__(0x2)),_api=__ONAIROS_REQ_FUNC__(0x3),_encryption=__ONAIROS_REQ_FUNC__(0x4),_assetRegistry=__ONAIROS_REQ_FUNC__(0x5),_api2=__ONAIROS_REQ_FUNC__(0x6);function _interopRequireDefault(_0x5ded00){return _0x5ded00&&_0x5ded00[_0x2814(0x1)]?_0x5ded00:{'default':_0x5ded00};}function _interopRequireWildcard(_0x5f333f,_0x2a4f3b){const _0x57623a={'YAUoI':function(_0x49fa79,_0xf54d2e){return _0x49fa79&&_0xf54d2e;},'LlXoQ':function(_0x5a74a5,_0x34c073){return _0x5a74a5===_0x34c073;},'nxdLY':function(_0x3c4ea3,_0x45ef23){return _0x3c4ea3!=_0x45ef23;},'hnUTt':_0x2814(0x3),'ssAou':_0x2814(0x4),'mLSQe':function(_0x1959d2,_0x27d00f){return _0x1959d2!==_0x27d00f;},'nazmx':_0x2814(0x5),'TnVQq':function(_0x44be12,_0x30dfa5,_0x3ddb90,_0xe8b4fc){return _0x44be12(_0x30dfa5,_0x3ddb90,_0xe8b4fc);},'BmWZV':function(_0x12ff4a,_0x5ea31e){return _0x12ff4a==_0x5ea31e;}};if(_0x57623a[_0x2814(0x6)](_0x57623a[_0x2814(0x7)],typeof WeakMap))var _0x19fb08=new WeakMap(),_0x4f5280=new WeakMap();return(_interopRequireWildcard=function(_0xfdfe41,_0x8253ed){if(_0x57623a[_0x2814(0x8)](!_0x8253ed,_0xfdfe41)&&_0xfdfe41[_0x2814(0x1)])return _0xfdfe41;var _0xc02669,_0x59fe39,_0x47f838={'__proto__':null,'default':_0xfdfe41};if(_0x57623a[_0x2814(0x9)](null,_0xfdfe41)||_0x57623a[_0x2814(0xa)](_0x57623a[_0x2814(0xb)],typeof _0xfdfe41)&&_0x57623a['ssAou']!=typeof _0xfdfe41)return _0x47f838;if(_0xc02669=_0x8253ed?_0x4f5280:_0x19fb08){if(_0xc02669[_0x2814(0xc)](_0xfdfe41))return _0xc02669[_0x2814(0xd)](_0xfdfe41);_0xc02669[_0x2814(0xe)](_0xfdfe41,_0x47f838);}for(const _0x5dc43b in _0xfdfe41)_0x57623a['mLSQe'](_0x57623a[_0x2814(0xf)],_0x5dc43b)&&{}[_0x2814(0x10)][_0x2814(0x11)](_0xfdfe41,_0x5dc43b)&&((_0x59fe39=(_0xc02669=Object[_0x2814(0x0)])&&Object['getOwnPropertyDescriptor'](_0xfdfe41,_0x5dc43b))&&(_0x59fe39['get']||_0x59fe39[_0x2814(0xe)])?_0x57623a[_0x2814(0x12)](_0xc02669,_0x47f838,_0x5dc43b,_0x59fe39):_0x47f838[_0x5dc43b]=_0xfdfe41[_0x5dc43b]);return _0x47f838;})(_0x5f333f,_0x2a4f3b);}const {width:SCREEN_WIDTH,height:SCREEN_HEIGHT}=_reactNative[_0x2814(0x13)][_0x2814(0xd)](_0x2814(0x14)),Overlay=({data:_0x5a3c10,username:_0x542bc0,modelKey:_0x3d0315,onResolved:_0x1e43d6,appName:appName=_0x2814(0x15),darkMode:darkMode=![],platforms:platforms=_assetRegistry[_0x2814(0x16)]})=>{const _0x183a0f={'qhGzQ':function(_0x19ec64,_0x53bd15,_0x4e9420,_0x2fd2ca){return _0x19ec64(_0x53bd15,_0x4e9420,_0x2fd2ca);},'zFrBm':_0x2814(0x17),'CouNl':function(_0x5b3da3){return _0x5b3da3();},'BKPpw':function(_0x490679,_0x7a4d08){return _0x490679!==_0x7a4d08;},'AlPRB':function(_0x2ffef0,_0x516300){return _0x2ffef0(_0x516300);},'PScXa':_0x2814(0x18),'VLVHe':function(_0x48441a,_0x3e82ca){return _0x48441a===_0x3e82ca;},'gPYjz':'jAThK','TUoMd':'Error\x20getting\x20account\x20info:','OHBBi':function(_0x5b6669,_0x2f9025){return _0x5b6669(_0x2f9025);},'YzJCw':function(_0x5b71aa,_0x4ad13d){return _0x5b71aa(_0x4ad13d);},'cRjOb':function(_0x2303a6,_0x4a1ab9){return _0x2303a6==_0x4a1ab9;},'jwint':_0x2814(0x4),'ikTVI':function(_0x160d87,_0x2eb67f){return _0x160d87&&_0x2eb67f;},'PQDMa':function(_0x2b0223,_0x2d7fe0){return _0x2b0223!=_0x2d7fe0;},'AdacE':_0x2814(0x5),'nDkNe':function(_0x1be9ae,_0x4a3d66,_0x57cea5,_0x55754b){return _0x1be9ae(_0x4a3d66,_0x57cea5,_0x55754b);},'rLrMQ':'KVFkR','ypWpH':_0x2814(0x19),'fEmqt':_0x2814(0x1a),'NCgLb':'mock-token','BGPAu':'mock-key','EOtVA':'object','RlBsx':function(_0x5d49b8,_0xa17aad){return _0x5d49b8!==_0xa17aad;},'mfWDw':function(_0x37ec58,_0x24ce07){return _0x37ec58!==_0x24ce07;},'ykkgy':_0x2814(0x1b),'lhVmR':_0x2814(0x1c),'aiSqW':function(_0x51289e,_0x26880f){return _0x51289e===_0x26880f;},'uYfrV':_0x2814(0x1d),'RDKJW':_0x2814(0x1e),'DyAeg':'local','fYSxW':_0x2814(0x1f),'PSxXw':function(_0x3f6b3d,_0x8b90da,_0x2ea7a3,_0x8c3b6d){return _0x3f6b3d(_0x8b90da,_0x2ea7a3,_0x8c3b6d);},'fezzI':_0x2814(0x20),'WPuuP':function(_0x13cad7){return _0x13cad7();},'DNYAJ':function(_0x3f481d,_0x219206){return _0x3f481d(_0x219206);},'VAYfo':_0x2814(0x21),'QGxlG':_0x2814(0x22),'TalDb':_0x2814(0x23),'OrBaT':'arrow_forward','MOjAE':_0x2814(0x24),'QXizF':_0x2814(0x25),'SikZl':_0x2814(0x26),'onpQG':'None\x20of\x20your\x20app\x20data\x20is\x20shared\x20with\x20ANYONE','VLgKa':_0x2814(0x27),'bbOLl':function(_0x169443,_0x57cf55){return _0x169443&&_0x57cf55;},'IRgiV':_0x2814(0x28),'DnsYA':_0x2814(0x29)},[_0x557858,_0x57d600]=(0x0,_react[_0x2814(0x2a)])({}),[_0x3c4fac,_0x830074]=(0x0,_react[_0x2814(0x2a)])(''),[_0x4744cb,_0x3f43dd]=(0x0,_react[_0x2814(0x2a)])(!![]),[_0xd0d90f,_0x942c54]=(0x0,_react[_0x2814(0x2a)])({}),_0x33a3c8=(0x0,_react[_0x2814(0x2b)])(new _reactNative[(_0x2814(0x2c))][(_0x2814(0x2d))](0x0))[_0x2814(0x2e)];(0x0,_react[_0x2814(0x2f)])(()=>{const _0x2f4b4f={'xmSnf':function(_0x101e70,_0x3a09fa,_0x1ecbad,_0x1581d7){return _0x183a0f['qhGzQ'](_0x101e70,_0x3a09fa,_0x1ecbad,_0x1581d7);},'bQcCA':_0x183a0f[_0x2814(0x30)],'dVCMd':function(_0x1614c2){return _0x183a0f[_0x2814(0x31)](_0x1614c2);}};if(_0x183a0f[_0x2814(0x32)](_0x2814(0x33),_0x2814(0x34))){const _0x24e73a={};Object[_0x2814(0x35)](_0x5a3c10)[_0x2814(0x36)](_0x21f9d0=>{_0x24e73a[_0x21f9d0]=![];}),_0x183a0f[_0x2814(0x37)](_0x57d600,_0x24e73a);const _0x358135={};platforms[_0x2814(0x36)](_0x1d6796=>{_0x358135[_0x1d6796['id']]=![];}),_0x183a0f['AlPRB'](_0x942c54,_0x358135),_0x20bfc5(),_reactNative[_0x2814(0x2c)][_0x2814(0x38)](_0x33a3c8,{'toValue':0x1,'useNativeDriver':!![],'bounciness':0x0})[_0x2814(0x39)]();}else _0x2f4b4f[_0x2814(0x3a)](_0x351f50,''+_0x40cc0d[_0x2814(0x3b)][_0x2814(0x3c)],_0x2f4b4f[_0x2814(0x3d)],{'username':_0x4db3fa,'selections':_0xa17b53,'platforms':_0x5e76e0,'error':!![]}),_0x2f4b4f[_0x2814(0x3e)](_0x4674ee);},[]);const _0x20bfc5=async()=>{const _0x22c81b={'gTFsK':'Error\x20confirming\x20selection:','zLVfs':function(_0x377746,_0x5c393f,_0x6ced6a,_0x4f2787){return _0x377746(_0x5c393f,_0x6ced6a,_0x4f2787);},'WzunQ':_0x183a0f[_0x2814(0x30)],'eQjqU':function(_0xe3947c){return _0x183a0f[_0x2814(0x31)](_0xe3947c);}};try{if(__DEV__){_0x183a0f[_0x2814(0x37)](_0x830074,_0x2814(0x3f));return;}const _0x172171=await _api[_0x2814(0x40)][_0x2814(0x41)](_0x183a0f[_0x2814(0x42)],{'Info':{'username':_0x542bc0}});if(_0x172171&&_0x172171[_0x2814(0x43)]){const _0x4127a0=_0x183a0f[_0x2814(0x44)](typeof _0x172171['data'],_0x2814(0x3))&&_0x172171[_0x2814(0x43)]['AccountInfo']?_0x172171[_0x2814(0x43)][_0x2814(0x45)]:_0x2814(0x46)+_0x542bc0;_0x183a0f['AlPRB'](_0x830074,_0x4127a0);}else _0x183a0f[_0x2814(0x47)]===_0x2814(0x48)?(_0xc91842[_0x2814(0x49)](_0x22c81b[_0x2814(0x4a)],_0x3ff68d),_0x574dc3?(_0x22c81b[_0x2814(0x4b)](_0x1ee7ea,''+_0x539719[_0x2814(0x3b)][_0x2814(0x3c)],_0x22c81b['WzunQ'],{'username':_0x4bd3ce,'selections':_0x595192,'platforms':_0x32ece4,'error':!![]}),_0x22c81b['eQjqU'](_0x5713f9)):_0xb56391(_0x2814(0x4c))):_0x183a0f[_0x2814(0x37)](_0x830074,_0x2814(0x46)+_0x542bc0);}catch(_0x29c775){console[_0x2814(0x49)](_0x183a0f[_0x2814(0x4d)],_0x29c775),_0x183a0f[_0x2814(0x37)](_0x830074,'User:\x20'+_0x542bc0);}},_0x1e74b7=(0x0,_react[_0x2814(0x4e)])(()=>{_reactNative[_0x2814(0x2c)][_0x2814(0x4f)](_0x33a3c8,{'toValue':0x0,'duration':0xfa,'useNativeDriver':!![]})[_0x2814(0x39)](()=>{_0x183a0f[_0x2814(0x50)](_0x3f43dd,![]);});},[_0x33a3c8]),_0x33bbdb=(0x0,_react[_0x2814(0x4e)])(_0x36ea2c=>{_0x183a0f[_0x2814(0x51)](_0x942c54,_0x52327b=>({..._0x52327b,[_0x36ea2c]:!_0x52327b[_0x36ea2c]}));},[]),_0x5b28e7=(0x0,_react['useCallback'])(async()=>{const _0x3b56f7={'fhgrh':function(_0x4dcafa,_0x1c6308){return _0x183a0f[_0x2814(0x52)](_0x4dcafa,_0x1c6308);},'HpRxM':function(_0x477b05,_0x3a65bc){return _0x183a0f[_0x2814(0x53)](_0x477b05,_0x3a65bc);},'nkRIY':_0x183a0f[_0x2814(0x54)],'CCTMn':function(_0x43e741,_0x50f41e){return _0x43e741!==_0x50f41e;},'rSrNf':_0x183a0f[_0x2814(0x55)],'ySsta':function(_0x2c02ad,_0x468cd1,_0x26f913,_0x39b946){return _0x183a0f['nDkNe'](_0x2c02ad,_0x468cd1,_0x26f913,_0x39b946);},'xTJQq':function(_0x302d2d){return _0x302d2d();}};if(_0x183a0f[_0x2814(0x44)](_0x183a0f['rLrMQ'],_0x183a0f[_0x2814(0x56)]))try{const _0x378aa1=_reactNative[_0x2814(0x57)][_0x2814(0x58)]({'ios':_0x183a0f['ypWpH'],'android':_0x183a0f[_0x2814(0x59)],'default':_0x183a0f[_0x2814(0x5a)]});if(__DEV__){_0x1e43d6(''+_api2[_0x2814(0x3b)]['BASE_URL'],_0x183a0f[_0x2814(0x5b)],{'username':_0x542bc0,'selections':_0x557858,'platforms':_0xd0d90f}),_0x1e74b7();return;}let _0x3d82b2=_0x183a0f[_0x2814(0x5c)];try{const _0x119bf0=await _api[_0x2814(0x40)][_0x2814(0xd)]('public/key');_0x119bf0&&_0x119bf0[_0x2814(0x43)]&&_0x183a0f[_0x2814(0x44)](typeof _0x119bf0[_0x2814(0x43)],_0x183a0f['EOtVA'])&&(_0x183a0f[_0x2814(0x5d)](_0x2814(0x5e),_0x2814(0x5e))?_0x5e688c[_0x56edf7['id']]=![]:_0x3d82b2=_0x119bf0['data']['publicKey']||_0x183a0f['BGPAu']);}catch(_0x482386){if(_0x183a0f[_0x2814(0x5f)](_0x183a0f[_0x2814(0x60)],_0x183a0f['ykkgy'])){if(_0x183a0f['cRjOb'](_0x183a0f['jwint'],typeof _0x543472))var _0x441995=new _0x251caa(),_0x2955ac=new _0x20d414();return(_0x3d1913=function(_0x4275c1,_0x47c24e){if(_0x3b56f7[_0x2814(0x61)](!_0x47c24e,_0x4275c1)&&_0x4275c1[_0x2814(0x1)])return _0x4275c1;var _0x4e56ae,_0x1e3def,_0x2ef58c={'__proto__':null,'default':_0x4275c1};if(null===_0x4275c1||_0x3b56f7['HpRxM'](_0x2814(0x3),typeof _0x4275c1)&&_0x3b56f7['HpRxM'](_0x3b56f7[_0x2814(0x62)],typeof _0x4275c1))return _0x2ef58c;if(_0x4e56ae=_0x47c24e?_0x2955ac:_0x441995){if(_0x4e56ae[_0x2814(0xc)](_0x4275c1))return _0x4e56ae[_0x2814(0xd)](_0x4275c1);_0x4e56ae[_0x2814(0xe)](_0x4275c1,_0x2ef58c);}for(const _0x52adf1 in _0x4275c1)_0x3b56f7['CCTMn'](_0x3b56f7['rSrNf'],_0x52adf1)&&{}['hasOwnProperty'][_0x2814(0x11)](_0x4275c1,_0x52adf1)&&((_0x1e3def=(_0x4e56ae=_0x467274[_0x2814(0x0)])&&_0x500cfc['getOwnPropertyDescriptor'](_0x4275c1,_0x52adf1))&&(_0x1e3def[_0x2814(0xd)]||_0x1e3def[_0x2814(0xe)])?_0x4e56ae(_0x2ef58c,_0x52adf1,_0x1e3def):_0x2ef58c[_0x52adf1]=_0x4275c1[_0x52adf1]);return _0x2ef58c;})(_0x27e4ef,_0xdcf5a2);}else console[_0x2814(0x49)](_0x183a0f['lhVmR'],_0x482386);}let _0x38599c=_0x3d0315;if(_0x183a0f[_0x2814(0x63)](typeof _encryption[_0x2814(0x64)],_0x183a0f[_0x2814(0x54)])&&_0x3d82b2){if(_0x2814(0x65)===_0x183a0f['uYfrV'])_0x1776e1[_0x2633e4]=![];else try{_0x38599c=(0x0,_encryption[_0x2814(0x64)])(_0x3d82b2,_0x3d0315);}catch(_0x1e4edc){console[_0x2814(0x49)](_0x2814(0x66),_0x1e4edc);}}const _0x1add67=await _api[_0x2814(0x40)][_0x2814(0x41)](_0x183a0f[_0x2814(0x67)],{'Info':{'storage':_0x183a0f[_0x2814(0x68)],'appId':_0x378aa1,'confirmations':_0x557858,'developerURL':_0x183a0f['fYSxW'],'EncryptedUserPin':_0x38599c,'username':_0x542bc0,'platforms':_0xd0d90f}});_0x1add67&&_0x1add67[_0x2814(0x43)]&&_0x1add67[_0x2814(0x43)]['APIUrl']&&_0x1add67[_0x2814(0x43)][_0x2814(0x69)]?(_0x1e43d6(_0x1add67[_0x2814(0x43)]['APIUrl'],_0x1add67['data'][_0x2814(0x69)],{'username':_0x542bc0,'selections':_0x557858,'platforms':_0xd0d90f}),_0x183a0f[_0x2814(0x31)](_0x1e74b7)):(_0x183a0f[_0x2814(0x6a)](_0x1e43d6,''+_api2[_0x2814(0x3b)]['BASE_URL'],_0x183a0f[_0x2814(0x6b)],{'username':_0x542bc0,'selections':_0x557858,'platforms':_0xd0d90f}),_0x183a0f[_0x2814(0x6c)](_0x1e74b7));}catch(_0x62d988){console[_0x2814(0x49)]('Error\x20confirming\x20selection:',_0x62d988),__DEV__?(_0x183a0f[_0x2814(0x6a)](_0x1e43d6,''+_api2[_0x2814(0x3b)][_0x2814(0x3c)],_0x183a0f[_0x2814(0x30)],{'username':_0x542bc0,'selections':_0x557858,'platforms':_0xd0d90f,'error':!![]}),_0x183a0f[_0x2814(0x31)](_0x1e74b7)):_0x183a0f[_0x2814(0x6d)](_0x2095a8,_0x2814(0x4c));}else _0x3b56f7['ySsta'](_0x355d0e,_0x34d340[_0x2814(0x43)]['APIUrl'],_0x37155d[_0x2814(0x43)]['token'],{'username':_0x9fea27,'selections':_0x2cd5f0,'platforms':_0x1787e8}),_0x3b56f7[_0x2814(0x6e)](_0x43469c);},[_0x557858,_0x542bc0,_0x3d0315,_0x1e43d6,_0x1e74b7,_0xd0d90f]),_0x2095a8=_0x38b6be=>{_0x183a0f[_0x2814(0x32)](_0x183a0f[_0x2814(0x6f)],_0x183a0f[_0x2814(0x6f)])?_0x2d56c6=(0x0,_0x5174cf[_0x2814(0x64)])(_0x30cb04,_0x3a655a):_reactNative[_0x2814(0x70)][_0x2814(0x71)](_0x183a0f[_0x2814(0x72)],_0x38b6be,[{'text':'OK'}]);};return _react['default'][_0x2814(0x73)](_reactNative[_0x2814(0x74)],{'visible':_0x4744cb,'transparent':!![],'animationType':_0x183a0f[_0x2814(0x75)],'statusBarTranslucent':!![],'onRequestClose':_0x1e74b7},_react['default'][_0x2814(0x73)](_reactNative[_0x2814(0x76)],{'style':styles['modalOverlay'],'activeOpacity':0x1,'onPress':_0x1e74b7},_react[_0x2814(0x5)][_0x2814(0x73)](_reactNative[_0x2814(0x77)],{'onPress':_0x2aabe0=>_0x2aabe0['stopPropagation']()},_react['default']['createElement'](_reactNative[_0x2814(0x2c)][_0x2814(0x78)],{'style':[styles[_0x2814(0x79)],darkMode&&styles['darkContainer'],{'transform':[{'translateY':_0x33a3c8[_0x2814(0x7a)]({'inputRange':[0x0,0x1],'outputRange':[SCREEN_HEIGHT,0x0]})}]}]},_react[_0x2814(0x5)][_0x2814(0x73)](_reactNative['View'],{'style':styles[_0x2814(0x7b)]},_react[_0x2814(0x5)]['createElement'](_reactNative[_0x2814(0x78)],{'style':[styles['handle'],darkMode&&styles[_0x2814(0x7c)]]})),_react[_0x2814(0x5)][_0x2814(0x73)](_reactNative['SafeAreaView'],{'style':[styles[_0x2814(0x7d)],darkMode&&styles[_0x2814(0x7e)]]},_react[_0x2814(0x5)]['createElement'](_reactNative[_0x2814(0x78)],{'style':[styles['header'],darkMode&&styles[_0x2814(0x7f)]]},_react[_0x2814(0x5)][_0x2814(0x73)](_reactNative[_0x2814(0x78)],{'style':styles['headerContent']},_react['default']['createElement'](_reactNative[_0x2814(0x78)],{'style':[styles[_0x2814(0x80)],darkMode&&styles[_0x2814(0x81)]]},_react[_0x2814(0x5)][_0x2814(0x73)](_reactNative['Text'],{'style':[styles[_0x2814(0x82)],darkMode&&styles[_0x2814(0x83)]]},appName[_0x2814(0x84)](0x0))),_react[_0x2814(0x5)][_0x2814(0x73)](_MaterialIcons[_0x2814(0x5)],{'name':_0x183a0f[_0x2814(0x85)],'size':0x18,'color':darkMode?_0x183a0f['MOjAE']:_0x183a0f['QXizF'],'style':styles[_0x2814(0x86)]}),_react['default'][_0x2814(0x73)](_reactNative['View'],{'style':[styles[_0x2814(0x87)],darkMode&&styles[_0x2814(0x88)]]},_react['default'][_0x2814(0x73)](_reactNative['Text'],{'style':[styles[_0x2814(0x89)],darkMode&&styles[_0x2814(0x83)]]},'O')))),_react[_0x2814(0x5)][_0x2814(0x73)](_reactNative[_0x2814(0x8a)],{'style':styles[_0x2814(0x8b)]},_react[_0x2814(0x5)]['createElement'](_reactNative[_0x2814(0x78)],{'style':styles[_0x2814(0x8c)]},_react['default'][_0x2814(0x73)](_reactNative[_0x2814(0x8d)],{'style':[styles[_0x2814(0x8e)],darkMode&&styles[_0x2814(0x83)]]},_0x183a0f['SikZl']),_react['default'][_0x2814(0x73)](_reactNative[_0x2814(0x8d)],{'style':[styles['privacyMessage'],darkMode&&styles[_0x2814(0x8f)]]},_0x183a0f[_0x2814(0x90)])),_react[_0x2814(0x5)][_0x2814(0x73)](_reactNative[_0x2814(0x78)],{'style':styles[_0x2814(0x91)]},platforms[_0x2814(0x92)](_0x3ad7ca=>_react[_0x2814(0x5)][_0x2814(0x73)](_reactNative['View'],{'key':_0x3ad7ca['id'],'style':[styles[_0x2814(0x93)],darkMode&&styles[_0x2814(0x94)]]},_react[_0x2814(0x5)][_0x2814(0x73)](_reactNative[_0x2814(0x78)],{'style':styles[_0x2814(0x95)]},_react['default'][_0x2814(0x73)](_reactNative[_0x2814(0x96)],{'source':_0x3ad7ca['icon'],'style':styles[_0x2814(0x97)],'resizeMode':_0x2814(0x98)}),_react[_0x2814(0x5)][_0x2814(0x73)](_reactNative[_0x2814(0x8d)],{'style':[styles[_0x2814(0x99)],darkMode&&styles[_0x2814(0x83)]]},_0x3ad7ca['name'])),_react['default'][_0x2814(0x73)](_reactNative[_0x2814(0x9a)],{'value':_0xd0d90f[_0x3ad7ca['id']],'onValueChange':()=>_0x33bbdb(_0x3ad7ca['id']),'trackColor':{'false':_0x2814(0x9b),'true':_0x2814(0x9c)},'thumbColor':_0xd0d90f[_0x3ad7ca['id']]?'#2196F3':_0x2814(0x9d)}))))),_react[_0x2814(0x5)][_0x2814(0x73)](_reactNative[_0x2814(0x78)],{'style':[styles['footer'],darkMode&&styles[_0x2814(0x9e)]]},_react[_0x2814(0x5)][_0x2814(0x73)](_reactNative[_0x2814(0x76)],{'style':styles[_0x2814(0x9f)],'onPress':_0x1e74b7},_react[_0x2814(0x5)]['createElement'](_reactNative[_0x2814(0x8d)],{'style':[styles[_0x2814(0xa0)],darkMode&&styles['darkSubText']]},_0x183a0f[_0x2814(0xa1)])),_react[_0x2814(0x5)][_0x2814(0x73)](_reactNative[_0x2814(0x76)],{'style':[styles[_0x2814(0xa2)],darkMode&&styles[_0x2814(0xa3)]],'onPress':_0x5b28e7},_react['default'][_0x2814(0x73)](_reactNative['Text'],{'style':[styles[_0x2814(0xa4)],_0x183a0f[_0x2814(0xa5)](darkMode,{'color':_0x183a0f[_0x2814(0xa6)]})]},_0x183a0f['DnsYA']))))))));};exports[_0x2814(0x2)]=Overlay;function _0x2814(_0x2ce20d,_0x281405){_0x2ce20d=_0x2ce20d-0x0;const _0x11737c=_0x2ce2();let _0x45381b=_0x11737c[_0x2ce20d];return _0x45381b;}function _0x2ce2(){const _0x237af0=['defineProperty','__esModule','Overlay','object','function','default','BmWZV','ssAou','YAUoI','LlXoQ','nxdLY','hnUTt','has','get','set','nazmx','hasOwnProperty','call','TnVQq','Dimensions','window','Your\x20App','OVERLAY_PLATFORMS','error-fallback-token','getAccountInfo','com.onairos.mock','unknown','Egntu','Error\x20getting\x20server\x20public\x20key:','xRgFn','getAPIUrlMobile','devURL','fallback-token','gNjDf','Error','none','#999','#666','Connect\x20your\x20data\x20to\x20create\x20a\x20Persona\x20of\x20you,\x20to\x20connect\x20to\x20Cosmos','Cancel','#000','Connect','useState','useRef','Animated','Value','current','useEffect','zFrBm','CouNl','BKPpw','YJoFz','NOnUt','keys','forEach','AlPRB','spring','start','xmSnf','API_CONFIG','BASE_URL','bQcCA','dVCMd','Development\x20mode\x20-\x20mock\x20account\x20info','onairosApi','post','PScXa','data','VLVHe','AccountInfo','User:\x20','gPYjz','RbSEO','error','gTFsK','zLVfs','Failed\x20to\x20confirm\x20selection.\x20Please\x20try\x20again.','TUoMd','useCallback','timing','OHBBi','YzJCw','ikTVI','PQDMa','jwint','AdacE','rLrMQ','Platform','select','ypWpH','fEmqt','NCgLb','BGPAu','RlBsx','bQrmx','mfWDw','ykkgy','fhgrh','nkRIY','aiSqW','encryptModelKey','cfrTM','Error\x20encrypting\x20model\x20key:','RDKJW','DyAeg','token','PSxXw','fezzI','WPuuP','DNYAJ','xTJQq','VAYfo','Alert','alert','QGxlG','createElement','Modal','TalDb','TouchableOpacity','TouchableWithoutFeedback','View','bottomSheet','interpolate','handleContainer','darkHandle','container','darkContainer','darkHeader','appIcon','darkAppIcon','appIconText','darkText','charAt','OrBaT','arrow','onairosIcon','darkOnairosIcon','onairosIconText','ScrollView','content','titleContainer','Text','mainTitle','darkSubText','onpQG','platformsContainer','map','platformItem','darkPlatformItem','platformInfo','Image','platformIcon','contain','platformName','Switch','#767577','#81b0ff','#f4f3f4','darkFooter','footerButtonCancel','footerButtonText','VLgKa','footerButtonConfirm','darkFooterButtonConfirm','footerButtonTextConfirm','bbOLl','IRgiV','StyleSheet','create','rgba(0,\x200,\x200,\x200.5)','hidden','100%','center','#fff','#F5F5F5','#2A2A2A','600','row','space-between','#eee','#333','transparent','#1A1A1A'];_0x2ce2=function(){return _0x237af0;};return _0x2ce2();}const styles=_reactNative[_0x2814(0xa7)][_0x2814(0xa8)]({'modalOverlay':{'flex':0x1,'backgroundColor':_0x2814(0xa9),'justifyContent':'flex-end'},'bottomSheet':{'backgroundColor':'#fff','borderTopLeftRadius':0x18,'borderTopRightRadius':0x18,'width':SCREEN_WIDTH,'height':SCREEN_HEIGHT*0.8,'overflow':_0x2814(0xaa)},'handleContainer':{'width':_0x2814(0xab),'alignItems':_0x2814(0xac),'paddingTop':0xc,'paddingBottom':0x8},'handle':{'width':0x28,'height':0x5,'borderRadius':0x3,'backgroundColor':'#E0E0E0'},'darkHandle':{'backgroundColor':_0x2814(0x25)},'container':{'flex':0x1,'backgroundColor':_0x2814(0xad)},'darkContainer':{'backgroundColor':'#1A1A1A'},'header':{'padding':0x18,'alignItems':_0x2814(0xac)},'darkHeader':{'backgroundColor':'#1A1A1A'},'headerContent':{'flexDirection':'row','alignItems':'center','justifyContent':_0x2814(0xac),'marginBottom':0x10},'appIcon':{'width':0x30,'height':0x30,'borderRadius':0x10,'backgroundColor':_0x2814(0xae),'alignItems':'center','justifyContent':_0x2814(0xac)},'darkAppIcon':{'backgroundColor':'#2A2A2A'},'appIconText':{'fontSize':0x18,'color':_0x2814(0x28)},'darkText':{'color':'#fff'},'arrow':{'marginHorizontal':0x10},'onairosIcon':{'width':0x30,'height':0x30,'borderRadius':0x10,'backgroundColor':_0x2814(0xae),'alignItems':_0x2814(0xac),'justifyContent':'center'},'darkOnairosIcon':{'backgroundColor':_0x2814(0xaf)},'onairosIconText':{'fontSize':0x18,'color':_0x2814(0x28)},'darkSubText':{'color':_0x2814(0x24)},'titleContainer':{'marginBottom':0x1e},'mainTitle':{'fontSize':0x16,'fontWeight':_0x2814(0xb0),'color':_0x2814(0x28),'textAlign':_0x2814(0xac),'marginBottom':0x10},'privacyMessage':{'fontSize':0xe,'color':_0x2814(0x25),'textAlign':_0x2814(0xac),'marginBottom':0x10},'content':{'flex':0x1,'paddingHorizontal':0x18},'platformsContainer':{'marginTop':0x10},'platformItem':{'flexDirection':_0x2814(0xb1),'justifyContent':_0x2814(0xb2),'alignItems':_0x2814(0xac),'padding':0x10,'backgroundColor':_0x2814(0xad),'borderRadius':0x10,'marginBottom':0x10,'borderWidth':0x1,'borderColor':_0x2814(0xb3)},'darkPlatformItem':{'backgroundColor':_0x2814(0xaf),'borderColor':_0x2814(0xb4)},'platformInfo':{'flexDirection':'row','alignItems':_0x2814(0xac)},'platformIcon':{'width':0x20,'height':0x20,'marginRight':0xc},'platformName':{'fontSize':0x10,'fontWeight':'500','color':'#000'},'footer':{'flexDirection':'row','alignItems':_0x2814(0xac),'justifyContent':_0x2814(0xb2),'padding':0x18,'borderTopWidth':0x1,'borderTopColor':_0x2814(0xb3),'backgroundColor':_0x2814(0xad)},'darkFooter':{'backgroundColor':_0x2814(0xaf),'borderTopColor':_0x2814(0xb4)},'footerButtonCancel':{'paddingVertical':0x8,'paddingHorizontal':0x10},'darkFooterButton':{'backgroundColor':_0x2814(0xb5)},'footerButtonConfirm':{'paddingVertical':0x10,'paddingHorizontal':0x20,'borderRadius':0x10,'backgroundColor':_0x2814(0xad),'borderWidth':0x1,'borderColor':_0x2814(0x28)},'darkFooterButtonConfirm':{'backgroundColor':'#fff','borderColor':'#fff'},'footerButtonText':{'color':_0x2814(0x25),'fontSize':0x10},'footerButtonTextConfirm':{'color':_0x2814(0x28),'fontSize':0x10,'fontWeight':_0x2814(0xb0)},'lightBackground':{'backgroundColor':_0x2814(0xad)},'darkBackground':{'backgroundColor':_0x2814(0xb6)}});
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Overlay = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _MaterialIcons = _interopRequireDefault(require("react-native-vector-icons/MaterialIcons"));
10
+ var _api = require("../api");
11
+ var _encryption = require("../utils/encryption");
12
+ var _assetRegistry = require("../utils/assetRegistry");
13
+ var _api2 = require("../config/api");
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
16
+ const {
17
+ width: SCREEN_WIDTH,
18
+ height: SCREEN_HEIGHT
19
+ } = _reactNative.Dimensions.get('window');
20
+ const Overlay = ({
21
+ data,
22
+ username,
23
+ modelKey,
24
+ onResolved,
25
+ appName = 'Your App',
26
+ darkMode = false,
27
+ platforms = _assetRegistry.OVERLAY_PLATFORMS
28
+ }) => {
29
+ const [selections, setSelections] = (0, _react.useState)({});
30
+ const [details, setDetails] = (0, _react.useState)('');
31
+ const [visible, setVisible] = (0, _react.useState)(true);
32
+ const [platformToggles, setPlatformToggles] = (0, _react.useState)({});
33
+ const bottomSheetAnim = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
34
+
35
+ // Initialize selection state on mount
36
+ (0, _react.useEffect)(() => {
37
+ // Initialize selection state
38
+ const initialSelections = {};
39
+ Object.keys(data).forEach(key => {
40
+ initialSelections[key] = false;
41
+ });
42
+ setSelections(initialSelections);
43
+
44
+ // Initialize platform toggles
45
+ const initialToggles = {};
46
+ platforms.forEach(platform => {
47
+ initialToggles[platform.id] = false;
48
+ });
49
+ setPlatformToggles(initialToggles);
50
+ getDetails();
51
+
52
+ // Animate the bottom sheet sliding up
53
+ _reactNative.Animated.spring(bottomSheetAnim, {
54
+ toValue: 1,
55
+ useNativeDriver: true,
56
+ bounciness: 0
57
+ }).start();
58
+ }, []);
59
+ const getDetails = async () => {
60
+ try {
61
+ // In Expo or development, use mock data
62
+ if (__DEV__) {
63
+ setDetails('Development mode - mock account info');
64
+ return;
65
+ }
66
+ const response = await _api.onairosApi.post('getAccountInfo', {
67
+ Info: {
68
+ username: username
69
+ }
70
+ });
71
+ // Handle response data properly based on API structure
72
+ if (response && response.data) {
73
+ const accountInfo = typeof response.data === 'object' && response.data.AccountInfo ? response.data.AccountInfo : `User: ${username}`;
74
+ setDetails(accountInfo);
75
+ } else {
76
+ setDetails(`User: ${username}`);
77
+ }
78
+ } catch (e) {
79
+ console.error('Error getting account info:', e);
80
+ setDetails(`User: ${username}`);
81
+ }
82
+ };
83
+ const closeOverlay = (0, _react.useCallback)(() => {
84
+ // Animate the overlay sliding down
85
+ _reactNative.Animated.timing(bottomSheetAnim, {
86
+ toValue: 0,
87
+ duration: 250,
88
+ useNativeDriver: true
89
+ }).start(() => {
90
+ setVisible(false);
91
+ });
92
+ }, [bottomSheetAnim]);
93
+ const togglePlatform = (0, _react.useCallback)(platformId => {
94
+ setPlatformToggles(prev => ({
95
+ ...prev,
96
+ [platformId]: !prev[platformId]
97
+ }));
98
+ }, []);
99
+ const confirmSelection = (0, _react.useCallback)(async () => {
100
+ try {
101
+ // Mock app identifier
102
+ const appId = _reactNative.Platform.select({
103
+ ios: 'com.onairos.mock',
104
+ android: 'com.onairos.mock',
105
+ default: 'unknown'
106
+ });
107
+
108
+ // In development mode, use mock data
109
+ if (__DEV__) {
110
+ onResolved(`${_api2.API_CONFIG.BASE_URL}`, 'mock-token', {
111
+ username,
112
+ selections,
113
+ platforms: platformToggles
114
+ });
115
+ closeOverlay();
116
+ return;
117
+ }
118
+
119
+ // Get server public key for encryption
120
+ let serverPublicKey = 'mock-key';
121
+ try {
122
+ const keyResponse = await _api.onairosApi.get('public/key');
123
+ if (keyResponse && keyResponse.data && typeof keyResponse.data === 'object') {
124
+ serverPublicKey = keyResponse.data.publicKey || 'mock-key';
125
+ }
126
+ } catch (e) {
127
+ console.error('Error getting server public key:', e);
128
+ }
129
+
130
+ // Encrypt the model key - only if the function exists and server key is valid
131
+ let encryptedModelKey = modelKey;
132
+ if (typeof _encryption.encryptModelKey === 'function' && serverPublicKey) {
133
+ try {
134
+ encryptedModelKey = (0, _encryption.encryptModelKey)(serverPublicKey, modelKey);
135
+ } catch (e) {
136
+ console.error('Error encrypting model key:', e);
137
+ }
138
+ }
139
+ const response = await _api.onairosApi.post('getAPIUrlMobile', {
140
+ Info: {
141
+ storage: 'local',
142
+ appId: appId,
143
+ confirmations: selections,
144
+ developerURL: 'devURL',
145
+ EncryptedUserPin: encryptedModelKey,
146
+ username: username,
147
+ platforms: platformToggles
148
+ }
149
+ });
150
+ if (response && response.data && response.data.APIUrl && response.data.token) {
151
+ onResolved(response.data.APIUrl, response.data.token, {
152
+ username,
153
+ selections,
154
+ platforms: platformToggles
155
+ });
156
+ closeOverlay();
157
+ } else {
158
+ // If response doesn't have expected format, use fallbacks
159
+ onResolved(`${_api2.API_CONFIG.BASE_URL}`, 'fallback-token', {
160
+ username,
161
+ selections,
162
+ platforms: platformToggles
163
+ });
164
+ closeOverlay();
165
+ }
166
+ } catch (e) {
167
+ console.error('Error confirming selection:', e);
168
+ // In case of error, provide fallback (development mode)
169
+ if (__DEV__) {
170
+ onResolved(`${_api2.API_CONFIG.BASE_URL}`, 'error-fallback-token', {
171
+ username,
172
+ selections,
173
+ platforms: platformToggles,
174
+ error: true
175
+ });
176
+ closeOverlay();
177
+ } else {
178
+ showErrorModal('Failed to confirm selection. Please try again.');
179
+ }
180
+ }
181
+ }, [selections, username, modelKey, onResolved, closeOverlay, platformToggles]);
182
+ const showErrorModal = errorMessage => {
183
+ _reactNative.Alert.alert('Error', errorMessage, [{
184
+ text: 'OK'
185
+ }]);
186
+ };
187
+ return /*#__PURE__*/_react.default.createElement(_reactNative.Modal, {
188
+ visible: visible,
189
+ transparent: true,
190
+ animationType: "none",
191
+ statusBarTranslucent: true,
192
+ onRequestClose: closeOverlay
193
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
194
+ style: styles.modalOverlay,
195
+ activeOpacity: 1,
196
+ onPress: closeOverlay
197
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableWithoutFeedback, {
198
+ onPress: e => e.stopPropagation()
199
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
200
+ style: [styles.bottomSheet, darkMode && styles.darkContainer, {
201
+ transform: [{
202
+ translateY: bottomSheetAnim.interpolate({
203
+ inputRange: [0, 1],
204
+ outputRange: [SCREEN_HEIGHT, 0]
205
+ })
206
+ }]
207
+ }]
208
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
209
+ style: styles.handleContainer
210
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
211
+ style: [styles.handle, darkMode && styles.darkHandle]
212
+ })), /*#__PURE__*/_react.default.createElement(_reactNative.SafeAreaView, {
213
+ style: [styles.container, darkMode && styles.darkContainer]
214
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
215
+ style: [styles.header, darkMode && styles.darkHeader]
216
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
217
+ style: styles.headerContent
218
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
219
+ style: [styles.appIcon, darkMode && styles.darkAppIcon]
220
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
221
+ style: [styles.appIconText, darkMode && styles.darkText]
222
+ }, appName.charAt(0))), /*#__PURE__*/_react.default.createElement(_MaterialIcons.default, {
223
+ name: "arrow_forward",
224
+ size: 24,
225
+ color: darkMode ? '#999' : '#666',
226
+ style: styles.arrow
227
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
228
+ style: [styles.onairosIcon, darkMode && styles.darkOnairosIcon]
229
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
230
+ style: [styles.onairosIconText, darkMode && styles.darkText]
231
+ }, "O")))), /*#__PURE__*/_react.default.createElement(_reactNative.ScrollView, {
232
+ style: styles.content
233
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
234
+ style: styles.titleContainer
235
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
236
+ style: [styles.mainTitle, darkMode && styles.darkText]
237
+ }, "Connect your data to create a Persona of you, to connect to Cosmos"), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
238
+ style: [styles.privacyMessage, darkMode && styles.darkSubText]
239
+ }, "None of your app data is shared with ANYONE")), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
240
+ style: styles.platformsContainer
241
+ }, platforms.map(platform => /*#__PURE__*/_react.default.createElement(_reactNative.View, {
242
+ key: platform.id,
243
+ style: [styles.platformItem, darkMode && styles.darkPlatformItem]
244
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
245
+ style: styles.platformInfo
246
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
247
+ source: platform.icon,
248
+ style: styles.platformIcon,
249
+ resizeMode: "contain"
250
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
251
+ style: [styles.platformName, darkMode && styles.darkText]
252
+ }, platform.name)), /*#__PURE__*/_react.default.createElement(_reactNative.Switch, {
253
+ value: platformToggles[platform.id],
254
+ onValueChange: () => togglePlatform(platform.id),
255
+ trackColor: {
256
+ false: '#767577',
257
+ true: '#81b0ff'
258
+ },
259
+ thumbColor: platformToggles[platform.id] ? '#2196F3' : '#f4f3f4'
260
+ }))))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
261
+ style: [styles.footer, darkMode && styles.darkFooter]
262
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
263
+ style: styles.footerButtonCancel,
264
+ onPress: closeOverlay
265
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
266
+ style: [styles.footerButtonText, darkMode && styles.darkSubText]
267
+ }, "Cancel")), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
268
+ style: [styles.footerButtonConfirm, darkMode && styles.darkFooterButtonConfirm],
269
+ onPress: confirmSelection
270
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
271
+ style: [styles.footerButtonTextConfirm, darkMode && {
272
+ color: '#000'
273
+ }]
274
+ }, "Connect"))))))));
275
+ };
276
+ exports.Overlay = Overlay;
277
+ const styles = _reactNative.StyleSheet.create({
278
+ modalOverlay: {
279
+ flex: 1,
280
+ backgroundColor: 'rgba(0, 0, 0, 0.5)',
281
+ justifyContent: 'flex-end'
282
+ },
283
+ bottomSheet: {
284
+ backgroundColor: '#fff',
285
+ borderTopLeftRadius: 24,
286
+ borderTopRightRadius: 24,
287
+ width: SCREEN_WIDTH,
288
+ height: SCREEN_HEIGHT * 0.8,
289
+ overflow: 'hidden'
290
+ },
291
+ handleContainer: {
292
+ width: '100%',
293
+ alignItems: 'center',
294
+ paddingTop: 12,
295
+ paddingBottom: 8
296
+ },
297
+ handle: {
298
+ width: 40,
299
+ height: 5,
300
+ borderRadius: 3,
301
+ backgroundColor: '#E0E0E0'
302
+ },
303
+ darkHandle: {
304
+ backgroundColor: '#666'
305
+ },
306
+ container: {
307
+ flex: 1,
308
+ backgroundColor: '#fff'
309
+ },
310
+ darkContainer: {
311
+ backgroundColor: '#1A1A1A'
312
+ },
313
+ header: {
314
+ padding: 24,
315
+ alignItems: 'center'
316
+ },
317
+ darkHeader: {
318
+ backgroundColor: '#1A1A1A'
319
+ },
320
+ headerContent: {
321
+ flexDirection: 'row',
322
+ alignItems: 'center',
323
+ justifyContent: 'center',
324
+ marginBottom: 16
325
+ },
326
+ appIcon: {
327
+ width: 48,
328
+ height: 48,
329
+ borderRadius: 16,
330
+ backgroundColor: '#F5F5F5',
331
+ alignItems: 'center',
332
+ justifyContent: 'center'
333
+ },
334
+ darkAppIcon: {
335
+ backgroundColor: '#2A2A2A'
336
+ },
337
+ appIconText: {
338
+ fontSize: 24,
339
+ color: '#000'
340
+ },
341
+ darkText: {
342
+ color: '#fff'
343
+ },
344
+ arrow: {
345
+ marginHorizontal: 16
346
+ },
347
+ onairosIcon: {
348
+ width: 48,
349
+ height: 48,
350
+ borderRadius: 16,
351
+ backgroundColor: '#F5F5F5',
352
+ alignItems: 'center',
353
+ justifyContent: 'center'
354
+ },
355
+ darkOnairosIcon: {
356
+ backgroundColor: '#2A2A2A'
357
+ },
358
+ onairosIconText: {
359
+ fontSize: 24,
360
+ color: '#000'
361
+ },
362
+ darkSubText: {
363
+ color: '#999'
364
+ },
365
+ titleContainer: {
366
+ marginBottom: 30
367
+ },
368
+ mainTitle: {
369
+ fontSize: 22,
370
+ fontWeight: '600',
371
+ color: '#000',
372
+ textAlign: 'center',
373
+ marginBottom: 16
374
+ },
375
+ privacyMessage: {
376
+ fontSize: 14,
377
+ color: '#666',
378
+ textAlign: 'center',
379
+ marginBottom: 16
380
+ },
381
+ content: {
382
+ flex: 1,
383
+ paddingHorizontal: 24
384
+ },
385
+ platformsContainer: {
386
+ marginTop: 16
387
+ },
388
+ platformItem: {
389
+ flexDirection: 'row',
390
+ justifyContent: 'space-between',
391
+ alignItems: 'center',
392
+ padding: 16,
393
+ backgroundColor: '#fff',
394
+ borderRadius: 16,
395
+ marginBottom: 16,
396
+ borderWidth: 1,
397
+ borderColor: '#eee'
398
+ },
399
+ darkPlatformItem: {
400
+ backgroundColor: '#2A2A2A',
401
+ borderColor: '#333'
402
+ },
403
+ platformInfo: {
404
+ flexDirection: 'row',
405
+ alignItems: 'center'
406
+ },
407
+ platformIcon: {
408
+ width: 32,
409
+ height: 32,
410
+ marginRight: 12
411
+ },
412
+ platformName: {
413
+ fontSize: 16,
414
+ fontWeight: '500',
415
+ color: '#000'
416
+ },
417
+ footer: {
418
+ flexDirection: 'row',
419
+ alignItems: 'center',
420
+ justifyContent: 'space-between',
421
+ padding: 24,
422
+ borderTopWidth: 1,
423
+ borderTopColor: '#eee',
424
+ backgroundColor: '#fff'
425
+ },
426
+ darkFooter: {
427
+ backgroundColor: '#2A2A2A',
428
+ borderTopColor: '#333'
429
+ },
430
+ footerButtonCancel: {
431
+ paddingVertical: 8,
432
+ paddingHorizontal: 16
433
+ },
434
+ darkFooterButton: {
435
+ backgroundColor: 'transparent'
436
+ },
437
+ footerButtonConfirm: {
438
+ paddingVertical: 16,
439
+ paddingHorizontal: 32,
440
+ borderRadius: 16,
441
+ backgroundColor: '#fff',
442
+ borderWidth: 1,
443
+ borderColor: '#000'
444
+ },
445
+ darkFooterButtonConfirm: {
446
+ backgroundColor: '#fff',
447
+ borderColor: '#fff'
448
+ },
449
+ footerButtonText: {
450
+ color: '#666',
451
+ fontSize: 16
452
+ },
453
+ footerButtonTextConfirm: {
454
+ color: '#000',
455
+ fontSize: 16,
456
+ fontWeight: '600'
457
+ },
458
+ lightBackground: {
459
+ backgroundColor: '#fff'
460
+ },
461
+ darkBackground: {
462
+ backgroundColor: '#1A1A1A'
463
+ }
464
+ });
465
+ //# sourceMappingURL=Overlay.js.map