@onairos/react-native 3.1.18 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (734) hide show
  1. package/README.md +374 -403
  2. package/lib/commonjs/api/index.js +1 -75
  3. package/lib/commonjs/api/index.js.map +1 -1
  4. package/lib/commonjs/assets/images/email.png +0 -0
  5. package/lib/commonjs/assets/images/linkedin.png +0 -0
  6. package/lib/commonjs/assets/images/reddit.png +0 -0
  7. package/lib/commonjs/assets/images/youtube.png +0 -0
  8. package/lib/commonjs/components/DataRequestModal.js.map +1 -1
  9. package/lib/commonjs/components/DataRequestScreen.js.map +1 -1
  10. package/lib/commonjs/components/EmailVerificationModal.js.map +1 -1
  11. package/lib/commonjs/components/Onairos.js +3 -1
  12. package/lib/commonjs/components/Onairos.js.map +1 -1
  13. package/lib/commonjs/components/OnairosButton.js +190 -171
  14. package/lib/commonjs/components/OnairosButton.js.map +1 -1
  15. package/lib/commonjs/components/Overlay.js +5 -5
  16. package/lib/commonjs/components/Overlay.js.map +1 -1
  17. package/lib/commonjs/components/PinInput.js +120 -282
  18. package/lib/commonjs/components/PinInput.js.map +1 -1
  19. package/lib/commonjs/components/PlatformList.js.map +1 -1
  20. package/lib/commonjs/components/TrainingModal.js +563 -808
  21. package/lib/commonjs/components/TrainingModal.js.map +1 -1
  22. package/lib/commonjs/components/UniversalOnboarding.js +1296 -2302
  23. package/lib/commonjs/components/UniversalOnboarding.js.map +1 -1
  24. package/lib/commonjs/components/UniversalOnboarding.tsx.new +455 -0
  25. package/lib/commonjs/components/onboarding/OAuthWebView.js +743 -134
  26. package/lib/commonjs/components/onboarding/OAuthWebView.js.map +1 -1
  27. package/lib/commonjs/components/onboarding/OnboardingHeader.js.map +1 -1
  28. package/lib/commonjs/components/onboarding/PinInput.js.map +1 -1
  29. package/lib/commonjs/components/onboarding/PlatformConnector.js.map +1 -1
  30. package/lib/commonjs/components/screens/ConnectorScreen.js.map +1 -1
  31. package/lib/commonjs/components/screens/LoadingScreen.js.map +1 -1
  32. package/lib/commonjs/components/screens/PinCreationScreen.js.map +1 -1
  33. package/lib/commonjs/constants/index.js.map +1 -1
  34. package/lib/commonjs/hooks/useConnections.js +125 -120
  35. package/lib/commonjs/hooks/useConnections.js.map +1 -1
  36. package/lib/commonjs/hooks/useCredentials.js.map +1 -1
  37. package/lib/commonjs/index.js +27 -157
  38. package/lib/commonjs/index.js.map +1 -1
  39. package/lib/commonjs/services/SDK_API_KEY_VALIDATION.md +428 -0
  40. package/lib/commonjs/services/apiKeyService.js +106 -105
  41. package/lib/commonjs/services/apiKeyService.js.map +1 -1
  42. package/lib/commonjs/services/oauthService.js.map +1 -1
  43. package/lib/commonjs/services/platformAuthService.js +722 -956
  44. package/lib/commonjs/services/platformAuthService.js.map +1 -1
  45. package/lib/commonjs/types/ambient.d.js.map +1 -1
  46. package/lib/commonjs/types/declarations.d.js.map +1 -1
  47. package/lib/commonjs/types/index.d.js.map +1 -1
  48. package/lib/commonjs/types/index.js.map +1 -1
  49. package/lib/commonjs/types/node-fix.d.js.map +1 -1
  50. package/lib/commonjs/types/node-override.d.js.map +1 -1
  51. package/lib/commonjs/types/opacity.d.js.map +1 -1
  52. package/lib/commonjs/types/types.d.js.map +1 -1
  53. package/lib/commonjs/types.js.map +1 -1
  54. package/lib/commonjs/utils/Portal.js +4 -4
  55. package/lib/commonjs/utils/Portal.js.map +1 -1
  56. package/lib/commonjs/utils/api.js +24 -24
  57. package/lib/commonjs/utils/api.js.map +1 -1
  58. package/lib/commonjs/utils/auth.js +18 -18
  59. package/lib/commonjs/utils/auth.js.map +1 -1
  60. package/lib/commonjs/utils/crypto.js +13 -13
  61. package/lib/commonjs/utils/crypto.js.map +1 -1
  62. package/lib/commonjs/utils/debugHelper.js.map +1 -1
  63. package/lib/commonjs/utils/encryption.js +12 -12
  64. package/lib/commonjs/utils/encryption.js.map +1 -1
  65. package/lib/commonjs/utils/onairosApi.js.map +1 -1
  66. package/lib/commonjs/utils/programmaticFlow.js +16 -16
  67. package/lib/commonjs/utils/programmaticFlow.js.map +1 -1
  68. package/lib/commonjs/utils/retryHelper.js +27 -27
  69. package/lib/commonjs/utils/retryHelper.js.map +1 -1
  70. package/lib/commonjs/utils/secureStorage.js.map +1 -1
  71. package/lib/module/api/index.js +0 -72
  72. package/lib/module/api/index.js.map +1 -1
  73. package/lib/module/assets/images/email.png +0 -0
  74. package/lib/module/assets/images/linkedin.png +0 -0
  75. package/lib/module/assets/images/reddit.png +0 -0
  76. package/lib/module/assets/images/youtube.png +0 -0
  77. package/lib/module/components/DataRequestModal.js.map +1 -1
  78. package/lib/module/components/DataRequestScreen.js.map +1 -1
  79. package/lib/module/components/EmailVerificationModal.js.map +1 -1
  80. package/lib/module/components/Onairos.js +3 -1
  81. package/lib/module/components/Onairos.js.map +1 -1
  82. package/lib/module/components/OnairosButton.js +192 -172
  83. package/lib/module/components/OnairosButton.js.map +1 -1
  84. package/lib/module/components/Overlay.js +5 -5
  85. package/lib/module/components/Overlay.js.map +1 -1
  86. package/lib/module/components/PinInput.js +120 -283
  87. package/lib/module/components/PinInput.js.map +1 -1
  88. package/lib/module/components/PlatformList.js.map +1 -1
  89. package/lib/module/components/TrainingModal.js +565 -809
  90. package/lib/module/components/TrainingModal.js.map +1 -1
  91. package/lib/module/components/UniversalOnboarding.js +1297 -2305
  92. package/lib/module/components/UniversalOnboarding.js.map +1 -1
  93. package/lib/module/components/UniversalOnboarding.tsx.new +455 -0
  94. package/lib/module/components/onboarding/OAuthWebView.js +744 -136
  95. package/lib/module/components/onboarding/OAuthWebView.js.map +1 -1
  96. package/lib/module/components/onboarding/OnboardingHeader.js.map +1 -1
  97. package/lib/module/components/onboarding/PinInput.js.map +1 -1
  98. package/lib/module/components/onboarding/PlatformConnector.js.map +1 -1
  99. package/lib/module/components/screens/ConnectorScreen.js.map +1 -1
  100. package/lib/module/components/screens/LoadingScreen.js.map +1 -1
  101. package/lib/module/components/screens/PinCreationScreen.js.map +1 -1
  102. package/lib/module/constants/index.js.map +1 -1
  103. package/lib/module/hooks/useConnections.js +125 -119
  104. package/lib/module/hooks/useConnections.js.map +1 -1
  105. package/lib/module/hooks/useCredentials.js.map +1 -1
  106. package/lib/module/index.js +17 -55
  107. package/lib/module/index.js.map +1 -1
  108. package/lib/module/services/SDK_API_KEY_VALIDATION.md +428 -0
  109. package/lib/module/services/apiKeyService.js +106 -105
  110. package/lib/module/services/apiKeyService.js.map +1 -1
  111. package/lib/module/services/oauthService.js.map +1 -1
  112. package/lib/module/services/platformAuthService.js +704 -943
  113. package/lib/module/services/platformAuthService.js.map +1 -1
  114. package/lib/module/types/ambient.d.js.map +1 -1
  115. package/lib/module/types/declarations.d.js.map +1 -1
  116. package/lib/module/types/index.d.js.map +1 -1
  117. package/lib/module/types/index.js.map +1 -1
  118. package/lib/module/types/node-fix.d.js.map +1 -1
  119. package/lib/module/types/node-override.d.js.map +1 -1
  120. package/lib/module/types/opacity.d.js.map +1 -1
  121. package/lib/module/types/types.d.js.map +1 -1
  122. package/lib/module/types.js.map +1 -1
  123. package/lib/module/utils/Portal.js +4 -4
  124. package/lib/module/utils/Portal.js.map +1 -1
  125. package/lib/module/utils/api.js +24 -24
  126. package/lib/module/utils/api.js.map +1 -1
  127. package/lib/module/utils/auth.js +18 -18
  128. package/lib/module/utils/auth.js.map +1 -1
  129. package/lib/module/utils/crypto.js +13 -13
  130. package/lib/module/utils/crypto.js.map +1 -1
  131. package/lib/module/utils/debugHelper.js.map +1 -1
  132. package/lib/module/utils/encryption.js +12 -12
  133. package/lib/module/utils/encryption.js.map +1 -1
  134. package/lib/module/utils/onairosApi.js.map +1 -1
  135. package/lib/module/utils/programmaticFlow.js +16 -16
  136. package/lib/module/utils/programmaticFlow.js.map +1 -1
  137. package/lib/module/utils/retryHelper.js +27 -27
  138. package/lib/module/utils/retryHelper.js.map +1 -1
  139. package/lib/module/utils/secureStorage.js.map +1 -1
  140. package/lib/typescript/api/index.d.ts +7 -15
  141. package/lib/typescript/api/index.d.ts.map +1 -1
  142. package/lib/typescript/components/DataRequestModal.d.ts +10 -10
  143. package/lib/typescript/components/DataRequestScreen.d.ts +10 -10
  144. package/lib/typescript/components/EmailVerificationModal.d.ts +10 -10
  145. package/lib/typescript/components/Onairos.d.ts +3 -3
  146. package/lib/typescript/components/Onairos.d.ts.map +1 -1
  147. package/lib/typescript/components/OnairosButton.d.ts +11 -36
  148. package/lib/typescript/components/OnairosButton.d.ts.map +1 -1
  149. package/lib/typescript/components/Overlay.d.ts +3 -3
  150. package/lib/typescript/components/PinInput.d.ts +3 -13
  151. package/lib/typescript/components/PinInput.d.ts.map +1 -1
  152. package/lib/typescript/components/PlatformList.d.ts +3 -3
  153. package/lib/typescript/components/TrainingModal.d.ts +3 -14
  154. package/lib/typescript/components/TrainingModal.d.ts.map +1 -1
  155. package/lib/typescript/components/UniversalOnboarding.d.ts +3 -16
  156. package/lib/typescript/components/UniversalOnboarding.d.ts.map +1 -1
  157. package/lib/typescript/components/onboarding/OAuthWebView.d.ts +9 -9
  158. package/lib/typescript/components/onboarding/OAuthWebView.d.ts.map +1 -1
  159. package/lib/typescript/components/onboarding/OnboardingHeader.d.ts +10 -10
  160. package/lib/typescript/components/onboarding/PinInput.d.ts +3 -3
  161. package/lib/typescript/components/onboarding/PlatformConnector.d.ts +12 -12
  162. package/lib/typescript/components/screens/ConnectorScreen.d.ts +8 -8
  163. package/lib/typescript/components/screens/LoadingScreen.d.ts +8 -8
  164. package/lib/typescript/components/screens/PinCreationScreen.d.ts +9 -9
  165. package/lib/typescript/constants/index.d.ts +52 -52
  166. package/lib/typescript/hooks/useConnections.d.ts +8 -13
  167. package/lib/typescript/hooks/useConnections.d.ts.map +1 -1
  168. package/lib/typescript/hooks/useCredentials.d.ts +8 -8
  169. package/lib/typescript/index.d.ts +17 -38
  170. package/lib/typescript/index.d.ts.map +1 -1
  171. package/lib/typescript/services/apiKeyService.d.ts +131 -131
  172. package/lib/typescript/services/apiKeyService.d.ts.map +1 -1
  173. package/lib/typescript/services/oauthService.d.ts +49 -49
  174. package/lib/typescript/services/platformAuthService.d.ts +143 -68
  175. package/lib/typescript/services/platformAuthService.d.ts.map +1 -1
  176. package/lib/typescript/types/index.d.ts +228 -264
  177. package/lib/typescript/types/index.d.ts.map +1 -1
  178. package/lib/typescript/types.d.ts +268 -266
  179. package/lib/typescript/types.d.ts.map +1 -1
  180. package/lib/typescript/utils/Portal.d.ts +13 -13
  181. package/lib/typescript/utils/api.d.ts +5 -5
  182. package/lib/typescript/utils/auth.d.ts +5 -5
  183. package/lib/typescript/utils/crypto.d.ts +3 -3
  184. package/lib/typescript/utils/debugHelper.d.ts +28 -28
  185. package/lib/typescript/utils/encryption.d.ts +18 -18
  186. package/lib/typescript/utils/onairosApi.d.ts +86 -86
  187. package/lib/typescript/utils/programmaticFlow.d.ts +22 -22
  188. package/lib/typescript/utils/retryHelper.d.ts +68 -68
  189. package/lib/typescript/utils/secureStorage.d.ts +93 -93
  190. package/package.json +149 -145
  191. package/src/api/index.ts +110 -151
  192. package/src/assets/images/email.png +0 -0
  193. package/src/assets/images/linkedin.png +0 -0
  194. package/src/assets/images/reddit.png +0 -0
  195. package/src/assets/images/youtube.png +0 -0
  196. package/src/components/DataRequestScreen.tsx +355 -355
  197. package/src/components/EmailVerificationModal.tsx +363 -363
  198. package/src/components/Onairos.tsx +424 -422
  199. package/src/components/OnairosButton.tsx +359 -339
  200. package/src/components/Overlay.tsx +506 -506
  201. package/src/components/PinInput.tsx +343 -555
  202. package/src/components/PlatformList.tsx +144 -144
  203. package/src/components/TrainingModal.tsx +737 -1047
  204. package/src/components/UniversalOnboarding.tsx +1839 -2888
  205. package/src/components/UniversalOnboarding.tsx.new +455 -0
  206. package/src/components/onboarding/OAuthWebView.tsx +838 -232
  207. package/src/hooks/useConnections.ts +163 -161
  208. package/src/hooks/useCredentials.ts +174 -174
  209. package/src/index.js +14 -14
  210. package/src/index.ts +49 -99
  211. package/src/services/SDK_API_KEY_VALIDATION.md +428 -0
  212. package/src/services/apiKeyService.ts +921 -919
  213. package/src/services/platformAuthService.ts +1113 -1346
  214. package/src/types/ambient.d.ts +28 -28
  215. package/src/types/index.ts +241 -265
  216. package/src/types/node-fix.d.ts +18 -18
  217. package/src/types/node-override.d.ts +23 -23
  218. package/src/types/opacity.d.ts +15 -15
  219. package/src/types/types.d.ts +17 -17
  220. package/src/types.ts +6 -4
  221. package/src/utils/Portal.tsx +82 -82
  222. package/src/utils/api.js +111 -111
  223. package/src/utils/auth.js +103 -103
  224. package/src/utils/crypto.js +59 -59
  225. package/src/utils/encryption.ts +68 -68
  226. package/src/utils/programmaticFlow.ts +112 -112
  227. package/src/utils/retryHelper.ts +274 -274
  228. package/types/index.d.ts +213 -213
  229. package/types/node-env.d.ts +14 -14
  230. package/lib/commonjs/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
  231. package/lib/commonjs/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
  232. package/lib/commonjs/assets/icons/Facebookicon.png +0 -0
  233. package/lib/commonjs/assets/icons/Gmail.png +0 -0
  234. package/lib/commonjs/assets/icons/Linkedinicon.png +0 -0
  235. package/lib/commonjs/assets/icons/Redditicon.png +0 -0
  236. package/lib/commonjs/assets/icons/YouTubeicon2.png +0 -0
  237. package/lib/commonjs/assets/icons/YouTubeicon3.png +0 -0
  238. package/lib/commonjs/assets/icons/farcaster.png +0 -0
  239. package/lib/commonjs/assets/icons/instagram.png +0 -0
  240. package/lib/commonjs/assets/icons/pinterest.png +0 -0
  241. package/lib/commonjs/assets/icons/swerv_logo.png +0 -0
  242. package/lib/commonjs/assets/icons/twitter.jpg +0 -0
  243. package/lib/commonjs/assets/images/Checkbox.svg +0 -3
  244. package/lib/commonjs/assets/images/EnochE.svg +0 -19
  245. package/lib/commonjs/assets/images/Enochicon1.png +0 -0
  246. package/lib/commonjs/assets/images/Face_ID_logo.png +0 -0
  247. package/lib/commonjs/assets/images/Facebookicon.png +0 -0
  248. package/lib/commonjs/assets/images/Gmail.png +0 -0
  249. package/lib/commonjs/assets/images/Googlelogo.png +0 -0
  250. package/lib/commonjs/assets/images/Linkedinicon.png +0 -0
  251. package/lib/commonjs/assets/images/Onairoslogo.png +0 -0
  252. package/lib/commonjs/assets/images/Personalityprofile.svg +0 -3
  253. package/lib/commonjs/assets/images/Personalitytraits.svg +0 -3
  254. package/lib/commonjs/assets/images/Redditicon.png +0 -0
  255. package/lib/commonjs/assets/images/Userpreferences.svg +0 -3
  256. package/lib/commonjs/assets/images/YouTubeicon3.png +0 -0
  257. package/lib/commonjs/assets/images/arrow.svg +0 -20
  258. package/lib/commonjs/assets/images/basicproficon.svg +0 -43
  259. package/lib/commonjs/assets/images/basicprofile.svg +0 -3
  260. package/lib/commonjs/assets/images/checkmark.svg +0 -4
  261. package/lib/commonjs/assets/images/contentanalysis.svg +0 -3
  262. package/lib/commonjs/assets/images/contenticon.svg +0 -23
  263. package/lib/commonjs/assets/images/persona1.png +0 -0
  264. package/lib/commonjs/assets/images/persona2.png +0 -0
  265. package/lib/commonjs/assets/images/persona3.png +0 -0
  266. package/lib/commonjs/assets/images/persona4.png +0 -0
  267. package/lib/commonjs/assets/images/persona5.png +0 -0
  268. package/lib/commonjs/assets/images/personalityicon.svg +0 -18
  269. package/lib/commonjs/assets/images/x-close.svg +0 -3
  270. package/lib/commonjs/components/BodyText.js +0 -27
  271. package/lib/commonjs/components/BodyText.js.map +0 -1
  272. package/lib/commonjs/components/BrandMark.js +0 -44
  273. package/lib/commonjs/components/BrandMark.js.map +0 -1
  274. package/lib/commonjs/components/CodeInput.js +0 -30
  275. package/lib/commonjs/components/CodeInput.js.map +0 -1
  276. package/lib/commonjs/components/EmailInput.js +0 -30
  277. package/lib/commonjs/components/EmailInput.js.map +0 -1
  278. package/lib/commonjs/components/ExistingUserDataConfirmation.js +0 -474
  279. package/lib/commonjs/components/ExistingUserDataConfirmation.js.map +0 -1
  280. package/lib/commonjs/components/GoogleButton.js +0 -55
  281. package/lib/commonjs/components/GoogleButton.js.map +0 -1
  282. package/lib/commonjs/components/HeadingGroup.js +0 -43
  283. package/lib/commonjs/components/HeadingGroup.js.map +0 -1
  284. package/lib/commonjs/components/ModalHeader.js +0 -99
  285. package/lib/commonjs/components/ModalHeader.js.map +0 -1
  286. package/lib/commonjs/components/ModalSheet.js +0 -47
  287. package/lib/commonjs/components/ModalSheet.js.map +0 -1
  288. package/lib/commonjs/components/OnairosSignInButton.js +0 -129
  289. package/lib/commonjs/components/OnairosSignInButton.js.map +0 -1
  290. package/lib/commonjs/components/PersonaImage.js +0 -60
  291. package/lib/commonjs/components/PersonaImage.js.map +0 -1
  292. package/lib/commonjs/components/PersonaLoadingScreen.js +0 -156
  293. package/lib/commonjs/components/PersonaLoadingScreen.js.map +0 -1
  294. package/lib/commonjs/components/PersonalizationConsentScreen.js +0 -316
  295. package/lib/commonjs/components/PersonalizationConsentScreen.js.map +0 -1
  296. package/lib/commonjs/components/PinCreationScreen.js +0 -393
  297. package/lib/commonjs/components/PinCreationScreen.js.map +0 -1
  298. package/lib/commonjs/components/PlatformConnectorsStep.js +0 -828
  299. package/lib/commonjs/components/PlatformConnectorsStep.js.map +0 -1
  300. package/lib/commonjs/components/PlatformToggle.js +0 -180
  301. package/lib/commonjs/components/PlatformToggle.js.map +0 -1
  302. package/lib/commonjs/components/PrimaryButton.js +0 -180
  303. package/lib/commonjs/components/PrimaryButton.js.map +0 -1
  304. package/lib/commonjs/components/SignInMatchAnimation.js +0 -197
  305. package/lib/commonjs/components/SignInMatchAnimation.js.map +0 -1
  306. package/lib/commonjs/components/SignInStep.js +0 -179
  307. package/lib/commonjs/components/SignInStep.js.map +0 -1
  308. package/lib/commonjs/components/VerificationStep.js +0 -154
  309. package/lib/commonjs/components/VerificationStep.js.map +0 -1
  310. package/lib/commonjs/components/WelcomeScreen.js +0 -401
  311. package/lib/commonjs/components/WelcomeScreen.js.map +0 -1
  312. package/lib/commonjs/components/icons/Basicproficon.js +0 -37
  313. package/lib/commonjs/components/icons/Basicproficon.js.map +0 -1
  314. package/lib/commonjs/components/icons/Basicprofile.js +0 -21
  315. package/lib/commonjs/components/icons/Basicprofile.js.map +0 -1
  316. package/lib/commonjs/components/icons/Checkbox.js +0 -21
  317. package/lib/commonjs/components/icons/Checkbox.js.map +0 -1
  318. package/lib/commonjs/components/icons/Checkmark.js +0 -27
  319. package/lib/commonjs/components/icons/Checkmark.js.map +0 -1
  320. package/lib/commonjs/components/icons/Contentanalysis.js +0 -21
  321. package/lib/commonjs/components/icons/Contentanalysis.js.map +0 -1
  322. package/lib/commonjs/components/icons/Contenticon.js +0 -39
  323. package/lib/commonjs/components/icons/Contenticon.js.map +0 -1
  324. package/lib/commonjs/components/icons/EnochE.js +0 -41
  325. package/lib/commonjs/components/icons/EnochE.js.map +0 -1
  326. package/lib/commonjs/components/icons/Personalityicon.js +0 -30
  327. package/lib/commonjs/components/icons/Personalityicon.js.map +0 -1
  328. package/lib/commonjs/components/icons/Personalityprofile.js +0 -21
  329. package/lib/commonjs/components/icons/Personalityprofile.js.map +0 -1
  330. package/lib/commonjs/components/icons/Personalitytraits.js +0 -21
  331. package/lib/commonjs/components/icons/Personalitytraits.js.map +0 -1
  332. package/lib/commonjs/components/icons/Userpreferences.js +0 -21
  333. package/lib/commonjs/components/icons/Userpreferences.js.map +0 -1
  334. package/lib/commonjs/components/icons/index.js +0 -84
  335. package/lib/commonjs/components/icons/index.js.map +0 -1
  336. package/lib/commonjs/config/api.js +0 -34
  337. package/lib/commonjs/config/api.js.map +0 -1
  338. package/lib/commonjs/context/AuthContext.js +0 -345
  339. package/lib/commonjs/context/AuthContext.js.map +0 -1
  340. package/lib/commonjs/hooks/useConnectedAccounts.js +0 -111
  341. package/lib/commonjs/hooks/useConnectedAccounts.js.map +0 -1
  342. package/lib/commonjs/hooks/useUserConnections.js +0 -148
  343. package/lib/commonjs/hooks/useUserConnections.js.map +0 -1
  344. package/lib/commonjs/services/apiClient.js +0 -302
  345. package/lib/commonjs/services/apiClient.js.map +0 -1
  346. package/lib/commonjs/services/authService.js +0 -935
  347. package/lib/commonjs/services/authService.js.map +0 -1
  348. package/lib/commonjs/services/biometricPinService.js +0 -184
  349. package/lib/commonjs/services/biometricPinService.js.map +0 -1
  350. package/lib/commonjs/services/connectedAccountsService.js +0 -268
  351. package/lib/commonjs/services/connectedAccountsService.js.map +0 -1
  352. package/lib/commonjs/services/googleAuthService.js +0 -268
  353. package/lib/commonjs/services/googleAuthService.js.map +0 -1
  354. package/lib/commonjs/services/imageCompressionService.js +0 -260
  355. package/lib/commonjs/services/imageCompressionService.js.map +0 -1
  356. package/lib/commonjs/services/jwtStorageService.js +0 -256
  357. package/lib/commonjs/services/jwtStorageService.js.map +0 -1
  358. package/lib/commonjs/services/mobileTrainingService.js +0 -185
  359. package/lib/commonjs/services/mobileTrainingService.js.map +0 -1
  360. package/lib/commonjs/services/pinEncryptionService.js +0 -84
  361. package/lib/commonjs/services/pinEncryptionService.js.map +0 -1
  362. package/lib/commonjs/services/pinStorageUtils.js +0 -105
  363. package/lib/commonjs/services/pinStorageUtils.js.map +0 -1
  364. package/lib/commonjs/services/storageService.js +0 -404
  365. package/lib/commonjs/services/storageService.js.map +0 -1
  366. package/lib/commonjs/services/trainingApiHelpers.js +0 -73
  367. package/lib/commonjs/services/trainingApiHelpers.js.map +0 -1
  368. package/lib/commonjs/services/userConnectionsService.js +0 -486
  369. package/lib/commonjs/services/userConnectionsService.js.map +0 -1
  370. package/lib/commonjs/services/youtubeMigrationService.js +0 -415
  371. package/lib/commonjs/services/youtubeMigrationService.js.map +0 -1
  372. package/lib/commonjs/theme/index.js +0 -249
  373. package/lib/commonjs/theme/index.js.map +0 -1
  374. package/lib/commonjs/utils/eventUtils.js +0 -288
  375. package/lib/commonjs/utils/eventUtils.js.map +0 -1
  376. package/lib/commonjs/utils/haptics.js +0 -66
  377. package/lib/commonjs/utils/haptics.js.map +0 -1
  378. package/lib/commonjs/utils/imagePreloader.js +0 -6
  379. package/lib/commonjs/utils/imagePreloader.js.map +0 -1
  380. package/lib/module/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
  381. package/lib/module/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
  382. package/lib/module/assets/icons/Facebookicon.png +0 -0
  383. package/lib/module/assets/icons/Gmail.png +0 -0
  384. package/lib/module/assets/icons/Linkedinicon.png +0 -0
  385. package/lib/module/assets/icons/Redditicon.png +0 -0
  386. package/lib/module/assets/icons/YouTubeicon2.png +0 -0
  387. package/lib/module/assets/icons/YouTubeicon3.png +0 -0
  388. package/lib/module/assets/icons/farcaster.png +0 -0
  389. package/lib/module/assets/icons/instagram.png +0 -0
  390. package/lib/module/assets/icons/pinterest.png +0 -0
  391. package/lib/module/assets/icons/swerv_logo.png +0 -0
  392. package/lib/module/assets/icons/twitter.jpg +0 -0
  393. package/lib/module/assets/images/Checkbox.svg +0 -3
  394. package/lib/module/assets/images/EnochE.svg +0 -19
  395. package/lib/module/assets/images/Enochicon1.png +0 -0
  396. package/lib/module/assets/images/Face_ID_logo.png +0 -0
  397. package/lib/module/assets/images/Facebookicon.png +0 -0
  398. package/lib/module/assets/images/Gmail.png +0 -0
  399. package/lib/module/assets/images/Googlelogo.png +0 -0
  400. package/lib/module/assets/images/Linkedinicon.png +0 -0
  401. package/lib/module/assets/images/Onairoslogo.png +0 -0
  402. package/lib/module/assets/images/Personalityprofile.svg +0 -3
  403. package/lib/module/assets/images/Personalitytraits.svg +0 -3
  404. package/lib/module/assets/images/Redditicon.png +0 -0
  405. package/lib/module/assets/images/Userpreferences.svg +0 -3
  406. package/lib/module/assets/images/YouTubeicon3.png +0 -0
  407. package/lib/module/assets/images/arrow.svg +0 -20
  408. package/lib/module/assets/images/basicproficon.svg +0 -43
  409. package/lib/module/assets/images/basicprofile.svg +0 -3
  410. package/lib/module/assets/images/checkmark.svg +0 -4
  411. package/lib/module/assets/images/contentanalysis.svg +0 -3
  412. package/lib/module/assets/images/contenticon.svg +0 -23
  413. package/lib/module/assets/images/persona1.png +0 -0
  414. package/lib/module/assets/images/persona2.png +0 -0
  415. package/lib/module/assets/images/persona3.png +0 -0
  416. package/lib/module/assets/images/persona4.png +0 -0
  417. package/lib/module/assets/images/persona5.png +0 -0
  418. package/lib/module/assets/images/personalityicon.svg +0 -18
  419. package/lib/module/assets/images/x-close.svg +0 -3
  420. package/lib/module/components/BodyText.js +0 -20
  421. package/lib/module/components/BodyText.js.map +0 -1
  422. package/lib/module/components/BrandMark.js +0 -37
  423. package/lib/module/components/BrandMark.js.map +0 -1
  424. package/lib/module/components/CodeInput.js +0 -23
  425. package/lib/module/components/CodeInput.js.map +0 -1
  426. package/lib/module/components/EmailInput.js +0 -23
  427. package/lib/module/components/EmailInput.js.map +0 -1
  428. package/lib/module/components/ExistingUserDataConfirmation.js +0 -465
  429. package/lib/module/components/ExistingUserDataConfirmation.js.map +0 -1
  430. package/lib/module/components/GoogleButton.js +0 -48
  431. package/lib/module/components/GoogleButton.js.map +0 -1
  432. package/lib/module/components/HeadingGroup.js +0 -36
  433. package/lib/module/components/HeadingGroup.js.map +0 -1
  434. package/lib/module/components/ModalHeader.js +0 -92
  435. package/lib/module/components/ModalHeader.js.map +0 -1
  436. package/lib/module/components/ModalSheet.js +0 -39
  437. package/lib/module/components/ModalSheet.js.map +0 -1
  438. package/lib/module/components/OnairosSignInButton.js +0 -120
  439. package/lib/module/components/OnairosSignInButton.js.map +0 -1
  440. package/lib/module/components/PersonaImage.js +0 -53
  441. package/lib/module/components/PersonaImage.js.map +0 -1
  442. package/lib/module/components/PersonaLoadingScreen.js +0 -148
  443. package/lib/module/components/PersonaLoadingScreen.js.map +0 -1
  444. package/lib/module/components/PersonalizationConsentScreen.js +0 -309
  445. package/lib/module/components/PersonalizationConsentScreen.js.map +0 -1
  446. package/lib/module/components/PinCreationScreen.js +0 -386
  447. package/lib/module/components/PinCreationScreen.js.map +0 -1
  448. package/lib/module/components/PlatformConnectorsStep.js +0 -820
  449. package/lib/module/components/PlatformConnectorsStep.js.map +0 -1
  450. package/lib/module/components/PlatformToggle.js +0 -173
  451. package/lib/module/components/PlatformToggle.js.map +0 -1
  452. package/lib/module/components/PrimaryButton.js +0 -172
  453. package/lib/module/components/PrimaryButton.js.map +0 -1
  454. package/lib/module/components/SignInMatchAnimation.js +0 -189
  455. package/lib/module/components/SignInMatchAnimation.js.map +0 -1
  456. package/lib/module/components/SignInStep.js +0 -171
  457. package/lib/module/components/SignInStep.js.map +0 -1
  458. package/lib/module/components/VerificationStep.js +0 -146
  459. package/lib/module/components/VerificationStep.js.map +0 -1
  460. package/lib/module/components/WelcomeScreen.js +0 -393
  461. package/lib/module/components/WelcomeScreen.js.map +0 -1
  462. package/lib/module/components/icons/Basicproficon.js +0 -30
  463. package/lib/module/components/icons/Basicproficon.js.map +0 -1
  464. package/lib/module/components/icons/Basicprofile.js +0 -14
  465. package/lib/module/components/icons/Basicprofile.js.map +0 -1
  466. package/lib/module/components/icons/Checkbox.js +0 -14
  467. package/lib/module/components/icons/Checkbox.js.map +0 -1
  468. package/lib/module/components/icons/Checkmark.js +0 -20
  469. package/lib/module/components/icons/Checkmark.js.map +0 -1
  470. package/lib/module/components/icons/Contentanalysis.js +0 -14
  471. package/lib/module/components/icons/Contentanalysis.js.map +0 -1
  472. package/lib/module/components/icons/Contenticon.js +0 -32
  473. package/lib/module/components/icons/Contenticon.js.map +0 -1
  474. package/lib/module/components/icons/EnochE.js +0 -34
  475. package/lib/module/components/icons/EnochE.js.map +0 -1
  476. package/lib/module/components/icons/Personalityicon.js +0 -23
  477. package/lib/module/components/icons/Personalityicon.js.map +0 -1
  478. package/lib/module/components/icons/Personalityprofile.js +0 -14
  479. package/lib/module/components/icons/Personalityprofile.js.map +0 -1
  480. package/lib/module/components/icons/Personalitytraits.js +0 -14
  481. package/lib/module/components/icons/Personalitytraits.js.map +0 -1
  482. package/lib/module/components/icons/Userpreferences.js +0 -14
  483. package/lib/module/components/icons/Userpreferences.js.map +0 -1
  484. package/lib/module/components/icons/index.js +0 -13
  485. package/lib/module/components/icons/index.js.map +0 -1
  486. package/lib/module/config/api.js +0 -26
  487. package/lib/module/config/api.js.map +0 -1
  488. package/lib/module/context/AuthContext.js +0 -335
  489. package/lib/module/context/AuthContext.js.map +0 -1
  490. package/lib/module/hooks/useConnectedAccounts.js +0 -106
  491. package/lib/module/hooks/useConnectedAccounts.js.map +0 -1
  492. package/lib/module/hooks/useUserConnections.js +0 -140
  493. package/lib/module/hooks/useUserConnections.js.map +0 -1
  494. package/lib/module/services/apiClient.js +0 -298
  495. package/lib/module/services/apiClient.js.map +0 -1
  496. package/lib/module/services/authService.js +0 -905
  497. package/lib/module/services/authService.js.map +0 -1
  498. package/lib/module/services/biometricPinService.js +0 -173
  499. package/lib/module/services/biometricPinService.js.map +0 -1
  500. package/lib/module/services/connectedAccountsService.js +0 -255
  501. package/lib/module/services/connectedAccountsService.js.map +0 -1
  502. package/lib/module/services/googleAuthService.js +0 -258
  503. package/lib/module/services/googleAuthService.js.map +0 -1
  504. package/lib/module/services/imageCompressionService.js +0 -250
  505. package/lib/module/services/imageCompressionService.js.map +0 -1
  506. package/lib/module/services/jwtStorageService.js +0 -239
  507. package/lib/module/services/jwtStorageService.js.map +0 -1
  508. package/lib/module/services/mobileTrainingService.js +0 -172
  509. package/lib/module/services/mobileTrainingService.js.map +0 -1
  510. package/lib/module/services/pinEncryptionService.js +0 -75
  511. package/lib/module/services/pinEncryptionService.js.map +0 -1
  512. package/lib/module/services/pinStorageUtils.js +0 -93
  513. package/lib/module/services/pinStorageUtils.js.map +0 -1
  514. package/lib/module/services/storageService.js +0 -383
  515. package/lib/module/services/storageService.js.map +0 -1
  516. package/lib/module/services/trainingApiHelpers.js +0 -67
  517. package/lib/module/services/trainingApiHelpers.js.map +0 -1
  518. package/lib/module/services/userConnectionsService.js +0 -476
  519. package/lib/module/services/userConnectionsService.js.map +0 -1
  520. package/lib/module/services/youtubeMigrationService.js +0 -404
  521. package/lib/module/services/youtubeMigrationService.js.map +0 -1
  522. package/lib/module/theme/index.js +0 -244
  523. package/lib/module/theme/index.js.map +0 -1
  524. package/lib/module/utils/eventUtils.js +0 -270
  525. package/lib/module/utils/eventUtils.js.map +0 -1
  526. package/lib/module/utils/haptics.js +0 -59
  527. package/lib/module/utils/haptics.js.map +0 -1
  528. package/lib/module/utils/imagePreloader.js +0 -3
  529. package/lib/module/utils/imagePreloader.js.map +0 -1
  530. package/lib/typescript/components/BodyText.d.ts +0 -10
  531. package/lib/typescript/components/BodyText.d.ts.map +0 -1
  532. package/lib/typescript/components/BrandMark.d.ts +0 -11
  533. package/lib/typescript/components/BrandMark.d.ts.map +0 -1
  534. package/lib/typescript/components/CodeInput.d.ts +0 -10
  535. package/lib/typescript/components/CodeInput.d.ts.map +0 -1
  536. package/lib/typescript/components/EmailInput.d.ts +0 -8
  537. package/lib/typescript/components/EmailInput.d.ts.map +0 -1
  538. package/lib/typescript/components/ExistingUserDataConfirmation.d.ts +0 -12
  539. package/lib/typescript/components/ExistingUserDataConfirmation.d.ts.map +0 -1
  540. package/lib/typescript/components/GoogleButton.d.ts +0 -11
  541. package/lib/typescript/components/GoogleButton.d.ts.map +0 -1
  542. package/lib/typescript/components/HeadingGroup.d.ts +0 -11
  543. package/lib/typescript/components/HeadingGroup.d.ts.map +0 -1
  544. package/lib/typescript/components/ModalHeader.d.ts +0 -11
  545. package/lib/typescript/components/ModalHeader.d.ts.map +0 -1
  546. package/lib/typescript/components/ModalSheet.d.ts +0 -13
  547. package/lib/typescript/components/ModalSheet.d.ts.map +0 -1
  548. package/lib/typescript/components/OnairosSignInButton.d.ts +0 -13
  549. package/lib/typescript/components/OnairosSignInButton.d.ts.map +0 -1
  550. package/lib/typescript/components/PersonaImage.d.ts +0 -8
  551. package/lib/typescript/components/PersonaImage.d.ts.map +0 -1
  552. package/lib/typescript/components/PersonaLoadingScreen.d.ts +0 -10
  553. package/lib/typescript/components/PersonaLoadingScreen.d.ts.map +0 -1
  554. package/lib/typescript/components/PersonalizationConsentScreen.d.ts +0 -10
  555. package/lib/typescript/components/PersonalizationConsentScreen.d.ts.map +0 -1
  556. package/lib/typescript/components/PinCreationScreen.d.ts +0 -10
  557. package/lib/typescript/components/PinCreationScreen.d.ts.map +0 -1
  558. package/lib/typescript/components/PlatformConnectorsStep.d.ts +0 -11
  559. package/lib/typescript/components/PlatformConnectorsStep.d.ts.map +0 -1
  560. package/lib/typescript/components/PlatformToggle.d.ts +0 -20
  561. package/lib/typescript/components/PlatformToggle.d.ts.map +0 -1
  562. package/lib/typescript/components/PrimaryButton.d.ts +0 -22
  563. package/lib/typescript/components/PrimaryButton.d.ts.map +0 -1
  564. package/lib/typescript/components/SignInMatchAnimation.d.ts +0 -9
  565. package/lib/typescript/components/SignInMatchAnimation.d.ts.map +0 -1
  566. package/lib/typescript/components/SignInStep.d.ts +0 -12
  567. package/lib/typescript/components/SignInStep.d.ts.map +0 -1
  568. package/lib/typescript/components/VerificationStep.d.ts +0 -13
  569. package/lib/typescript/components/VerificationStep.d.ts.map +0 -1
  570. package/lib/typescript/components/WelcomeScreen.d.ts +0 -9
  571. package/lib/typescript/components/WelcomeScreen.d.ts.map +0 -1
  572. package/lib/typescript/components/icons/Basicproficon.d.ts +0 -5
  573. package/lib/typescript/components/icons/Basicproficon.d.ts.map +0 -1
  574. package/lib/typescript/components/icons/Basicprofile.d.ts +0 -5
  575. package/lib/typescript/components/icons/Basicprofile.d.ts.map +0 -1
  576. package/lib/typescript/components/icons/Checkbox.d.ts +0 -5
  577. package/lib/typescript/components/icons/Checkbox.d.ts.map +0 -1
  578. package/lib/typescript/components/icons/Checkmark.d.ts +0 -5
  579. package/lib/typescript/components/icons/Checkmark.d.ts.map +0 -1
  580. package/lib/typescript/components/icons/Contentanalysis.d.ts +0 -5
  581. package/lib/typescript/components/icons/Contentanalysis.d.ts.map +0 -1
  582. package/lib/typescript/components/icons/Contenticon.d.ts +0 -5
  583. package/lib/typescript/components/icons/Contenticon.d.ts.map +0 -1
  584. package/lib/typescript/components/icons/EnochE.d.ts +0 -5
  585. package/lib/typescript/components/icons/EnochE.d.ts.map +0 -1
  586. package/lib/typescript/components/icons/Personalityicon.d.ts +0 -5
  587. package/lib/typescript/components/icons/Personalityicon.d.ts.map +0 -1
  588. package/lib/typescript/components/icons/Personalityprofile.d.ts +0 -5
  589. package/lib/typescript/components/icons/Personalityprofile.d.ts.map +0 -1
  590. package/lib/typescript/components/icons/Personalitytraits.d.ts +0 -5
  591. package/lib/typescript/components/icons/Personalitytraits.d.ts.map +0 -1
  592. package/lib/typescript/components/icons/Userpreferences.d.ts +0 -5
  593. package/lib/typescript/components/icons/Userpreferences.d.ts.map +0 -1
  594. package/lib/typescript/components/icons/index.d.ts +0 -12
  595. package/lib/typescript/components/icons/index.d.ts.map +0 -1
  596. package/lib/typescript/config/api.d.ts +0 -24
  597. package/lib/typescript/config/api.d.ts.map +0 -1
  598. package/lib/typescript/context/AuthContext.d.ts +0 -34
  599. package/lib/typescript/context/AuthContext.d.ts.map +0 -1
  600. package/lib/typescript/hooks/useConnectedAccounts.d.ts +0 -11
  601. package/lib/typescript/hooks/useConnectedAccounts.d.ts.map +0 -1
  602. package/lib/typescript/hooks/useUserConnections.d.ts +0 -12
  603. package/lib/typescript/hooks/useUserConnections.d.ts.map +0 -1
  604. package/lib/typescript/services/apiClient.d.ts +0 -91
  605. package/lib/typescript/services/apiClient.d.ts.map +0 -1
  606. package/lib/typescript/services/authService.d.ts +0 -216
  607. package/lib/typescript/services/authService.d.ts.map +0 -1
  608. package/lib/typescript/services/biometricPinService.d.ts +0 -29
  609. package/lib/typescript/services/biometricPinService.d.ts.map +0 -1
  610. package/lib/typescript/services/connectedAccountsService.d.ts +0 -56
  611. package/lib/typescript/services/connectedAccountsService.d.ts.map +0 -1
  612. package/lib/typescript/services/googleAuthService.d.ts +0 -63
  613. package/lib/typescript/services/googleAuthService.d.ts.map +0 -1
  614. package/lib/typescript/services/imageCompressionService.d.ts +0 -37
  615. package/lib/typescript/services/imageCompressionService.d.ts.map +0 -1
  616. package/lib/typescript/services/jwtStorageService.d.ts +0 -86
  617. package/lib/typescript/services/jwtStorageService.d.ts.map +0 -1
  618. package/lib/typescript/services/mobileTrainingService.d.ts +0 -45
  619. package/lib/typescript/services/mobileTrainingService.d.ts.map +0 -1
  620. package/lib/typescript/services/pinEncryptionService.d.ts +0 -17
  621. package/lib/typescript/services/pinEncryptionService.d.ts.map +0 -1
  622. package/lib/typescript/services/pinStorageUtils.d.ts +0 -25
  623. package/lib/typescript/services/pinStorageUtils.d.ts.map +0 -1
  624. package/lib/typescript/services/storageService.d.ts +0 -128
  625. package/lib/typescript/services/storageService.d.ts.map +0 -1
  626. package/lib/typescript/services/trainingApiHelpers.d.ts +0 -38
  627. package/lib/typescript/services/trainingApiHelpers.d.ts.map +0 -1
  628. package/lib/typescript/services/userConnectionsService.d.ts +0 -90
  629. package/lib/typescript/services/userConnectionsService.d.ts.map +0 -1
  630. package/lib/typescript/services/youtubeMigrationService.d.ts +0 -12
  631. package/lib/typescript/services/youtubeMigrationService.d.ts.map +0 -1
  632. package/lib/typescript/theme/index.d.ts +0 -416
  633. package/lib/typescript/theme/index.d.ts.map +0 -1
  634. package/lib/typescript/utils/eventUtils.d.ts +0 -108
  635. package/lib/typescript/utils/eventUtils.d.ts.map +0 -1
  636. package/lib/typescript/utils/haptics.d.ts +0 -11
  637. package/lib/typescript/utils/haptics.d.ts.map +0 -1
  638. package/lib/typescript/utils/imagePreloader.d.ts +0 -2
  639. package/lib/typescript/utils/imagePreloader.d.ts.map +0 -1
  640. package/src/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
  641. package/src/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
  642. package/src/assets/icons/Facebookicon.png +0 -0
  643. package/src/assets/icons/Gmail.png +0 -0
  644. package/src/assets/icons/Linkedinicon.png +0 -0
  645. package/src/assets/icons/Redditicon.png +0 -0
  646. package/src/assets/icons/YouTubeicon2.png +0 -0
  647. package/src/assets/icons/YouTubeicon3.png +0 -0
  648. package/src/assets/icons/farcaster.png +0 -0
  649. package/src/assets/icons/instagram.png +0 -0
  650. package/src/assets/icons/pinterest.png +0 -0
  651. package/src/assets/icons/swerv_logo.png +0 -0
  652. package/src/assets/icons/twitter.jpg +0 -0
  653. package/src/assets/images/Checkbox.svg +0 -3
  654. package/src/assets/images/EnochE.svg +0 -19
  655. package/src/assets/images/Enochicon1.png +0 -0
  656. package/src/assets/images/Face_ID_logo.png +0 -0
  657. package/src/assets/images/Facebookicon.png +0 -0
  658. package/src/assets/images/Gmail.png +0 -0
  659. package/src/assets/images/Googlelogo.png +0 -0
  660. package/src/assets/images/Linkedinicon.png +0 -0
  661. package/src/assets/images/Onairoslogo.png +0 -0
  662. package/src/assets/images/Personalityprofile.svg +0 -3
  663. package/src/assets/images/Personalitytraits.svg +0 -3
  664. package/src/assets/images/Redditicon.png +0 -0
  665. package/src/assets/images/Userpreferences.svg +0 -3
  666. package/src/assets/images/YouTubeicon3.png +0 -0
  667. package/src/assets/images/arrow.svg +0 -20
  668. package/src/assets/images/basicproficon.svg +0 -43
  669. package/src/assets/images/basicprofile.svg +0 -3
  670. package/src/assets/images/checkmark.svg +0 -4
  671. package/src/assets/images/contentanalysis.svg +0 -3
  672. package/src/assets/images/contenticon.svg +0 -23
  673. package/src/assets/images/persona1.png +0 -0
  674. package/src/assets/images/persona2.png +0 -0
  675. package/src/assets/images/persona3.png +0 -0
  676. package/src/assets/images/persona4.png +0 -0
  677. package/src/assets/images/persona5.png +0 -0
  678. package/src/assets/images/personalityicon.svg +0 -18
  679. package/src/assets/images/x-close.svg +0 -3
  680. package/src/components/BodyText.tsx +0 -33
  681. package/src/components/BrandMark.tsx +0 -62
  682. package/src/components/CodeInput.tsx +0 -32
  683. package/src/components/EmailInput.tsx +0 -31
  684. package/src/components/ExistingUserDataConfirmation.tsx +0 -507
  685. package/src/components/GoogleButton.tsx +0 -55
  686. package/src/components/HeadingGroup.tsx +0 -49
  687. package/src/components/ModalHeader.tsx +0 -125
  688. package/src/components/ModalSheet.tsx +0 -59
  689. package/src/components/OnairosSignInButton.tsx +0 -132
  690. package/src/components/PersonaImage.tsx +0 -79
  691. package/src/components/PersonaLoadingScreen.tsx +0 -201
  692. package/src/components/PersonalizationConsentScreen.tsx +0 -410
  693. package/src/components/PinCreationScreen.tsx +0 -492
  694. package/src/components/PlatformConnectorsStep.tsx +0 -892
  695. package/src/components/PlatformToggle.tsx +0 -226
  696. package/src/components/PrimaryButton.tsx +0 -214
  697. package/src/components/SignInMatchAnimation.tsx +0 -225
  698. package/src/components/SignInStep.tsx +0 -217
  699. package/src/components/VerificationStep.tsx +0 -198
  700. package/src/components/WelcomeScreen.tsx +0 -490
  701. package/src/components/icons/Basicproficon.tsx +0 -30
  702. package/src/components/icons/Basicprofile.tsx +0 -17
  703. package/src/components/icons/Checkbox.tsx +0 -17
  704. package/src/components/icons/Checkmark.tsx +0 -24
  705. package/src/components/icons/Contentanalysis.tsx +0 -17
  706. package/src/components/icons/Contenticon.tsx +0 -30
  707. package/src/components/icons/EnochE.tsx +0 -39
  708. package/src/components/icons/Personalityicon.tsx +0 -22
  709. package/src/components/icons/Personalityprofile.tsx +0 -17
  710. package/src/components/icons/Personalitytraits.tsx +0 -17
  711. package/src/components/icons/Userpreferences.tsx +0 -17
  712. package/src/components/icons/index.ts +0 -12
  713. package/src/config/api.ts +0 -25
  714. package/src/context/AuthContext.tsx +0 -393
  715. package/src/hooks/useConnectedAccounts.ts +0 -139
  716. package/src/hooks/useUserConnections.ts +0 -166
  717. package/src/services/apiClient.ts +0 -337
  718. package/src/services/authService.ts +0 -1008
  719. package/src/services/biometricPinService.ts +0 -193
  720. package/src/services/connectedAccountsService.ts +0 -290
  721. package/src/services/googleAuthService.ts +0 -279
  722. package/src/services/imageCompressionService.ts +0 -303
  723. package/src/services/jwtStorageService.ts +0 -257
  724. package/src/services/mobileTrainingService.ts +0 -204
  725. package/src/services/pinEncryptionService.ts +0 -76
  726. package/src/services/pinStorageUtils.ts +0 -97
  727. package/src/services/storageService.ts +0 -452
  728. package/src/services/trainingApiHelpers.ts +0 -67
  729. package/src/services/userConnectionsService.ts +0 -557
  730. package/src/services/youtubeMigrationService.ts +0 -454
  731. package/src/theme/index.ts +0 -239
  732. package/src/utils/eventUtils.ts +0 -303
  733. package/src/utils/haptics.ts +0 -59
  734. package/src/utils/imagePreloader.ts +0 -2
@@ -6,211 +6,109 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.TrainingModal = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
+ var _MaterialIcons = _interopRequireDefault(require("react-native-vector-icons/MaterialIcons"));
9
10
  var _socket = require("socket.io-client");
10
- var _authService = require("../services/authService");
11
- var _reactNativeHapticFeedback = _interopRequireDefault(require("react-native-haptic-feedback"));
12
- var _asyncStorage = _interopRequireDefault(require("@react-native-async-storage/async-storage"));
13
- var _pinEncryptionService = require("../services/pinEncryptionService");
14
- var _pinStorageUtils = require("../services/pinStorageUtils");
15
- var _mobileTrainingService = require("../services/mobileTrainingService");
16
- var _ExistingUserDataConfirmation = require("./ExistingUserDataConfirmation");
11
+ var _constants = require("../constants");
17
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
13
  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); }
19
- // import EmailVerification from '../../../components/EmailVerification'; // Commented out - file doesn't exist
20
- // import { sendEmailVerificationCode } from '../../../services/api'; // Commented out - use local API instead
21
-
22
14
  const {
23
15
  width,
24
16
  height
25
17
  } = _reactNative.Dimensions.get('window');
26
18
  const TrainingModal = ({
27
19
  visible,
20
+ progress,
21
+ eta,
28
22
  onCancel,
29
23
  onComplete,
30
24
  modelKey,
31
25
  username,
32
- isPrimaryAuth = false,
33
- autoFocusEmailInput = false,
34
- // Add default value
35
- navigation
26
+ test = false
36
27
  }) => {
37
- const [progress, setProgress] = (0, _react.useState)(0);
38
- const [email, setEmail] = (0, _react.useState)('');
39
- const [emailError, setEmailError] = (0, _react.useState)('');
40
- const [isTrainingComplete, setIsTrainingComplete] = (0, _react.useState)(false);
41
- const [isSubmittingEmail, setIsSubmittingEmail] = (0, _react.useState)(false);
28
+ // Socket and training state
29
+ const socketRef = (0, _react.useRef)(null);
42
30
  const [socketConnected, setSocketConnected] = (0, _react.useState)(false);
43
31
  const [trainingStatus, setTrainingStatus] = (0, _react.useState)('Initializing...');
44
32
  const [hasError, setHasError] = (0, _react.useState)(false);
33
+ const [errorCode, setErrorCode] = (0, _react.useState)(null);
34
+ const [isTrainingComplete, setIsTrainingComplete] = (0, _react.useState)(false);
45
35
  const [userTraits, setUserTraits] = (0, _react.useState)(null);
46
36
  const [inferenceResults, setInferenceResults] = (0, _react.useState)(null);
47
- const socketRef = (0, _react.useRef)(null);
48
- const emailInputRef = (0, _react.useRef)(null); // Add email input ref
49
- const [userToken, setUserToken] = (0, _react.useState)(null);
50
- const [userInfo, setUserInfo] = (0, _react.useState)(null);
51
- const [matchStep, setMatchStep] = (0, _react.useState)('email');
52
- const [matchCount, setMatchCount] = (0, _react.useState)(0);
53
- const [isContinueLoading, setIsContinueLoading] = (0, _react.useState)(false);
54
- const [existingUserAccountInfo, setExistingUserAccountInfo] = (0, _react.useState)(null);
55
-
56
- // --- Modal slide animation ---
57
- const modalTranslateY = (0, _react.useRef)(new _reactNative.Animated.Value(height)).current;
58
- const animationDuration = 300; // Increased duration for smoother animation
59
-
60
- // Reset state when modal becomes invisible
61
- (0, _react.useEffect)(() => {
62
- if (!visible) {
63
- // Reset all state
64
- setEmail('');
65
- setEmailError('');
66
- setIsSubmittingEmail(false);
67
- setMatchStep('email');
68
- setMatchCount(0);
69
- setIsContinueLoading(false);
70
- setProgress(0);
71
- setIsTrainingComplete(false);
72
- setHasError(false);
73
- setTrainingStatus('Initializing...');
74
- setUserTraits(null);
75
- setInferenceResults(null);
76
- setUserToken(null);
77
- setUserInfo(null);
78
-
79
- // Reset animation value
80
- modalTranslateY.setValue(height);
81
- }
82
- }, [visible]);
83
-
84
- // Handle animation
85
- (0, _react.useEffect)(() => {
86
- if (visible) {
87
- // Ensure we start from the bottom
88
- modalTranslateY.setValue(height);
89
- // Animate up
90
- _reactNative.Animated.spring(modalTranslateY, {
91
- toValue: 0,
92
- useNativeDriver: true,
93
- damping: 20,
94
- mass: 1,
95
- stiffness: 200
96
- }).start();
97
- }
98
- }, [visible]);
99
-
100
- // Handle modal close
101
- const handleModalClose = () => {
102
- _reactNative.Animated.spring(modalTranslateY, {
103
- toValue: height,
104
- useNativeDriver: true,
105
- damping: 20,
106
- mass: 1,
107
- stiffness: 200
108
- }).start(() => {
109
- onCancel();
110
- });
37
+ const [internalProgress, setInternalProgress] = (0, _react.useState)(0);
38
+ const [isEnochSDK, setIsEnochSDK] = (0, _react.useState)(false); // Determine if using Enoch SDK
39
+ const [trainingResults, setTrainingResults] = (0, _react.useState)(null);
40
+
41
+ // Use internal progress if available, otherwise fall back to prop progress
42
+ const currentProgress = internalProgress > 0 ? internalProgress / 100 : progress;
43
+ const progressPercentage = Math.round(currentProgress * 100);
44
+
45
+ // Mock user data for now - in real implementation this would come from props
46
+ const userToken = 'mock-token'; // TODO: Get from actual auth
47
+ const userInfo = {
48
+ username: username || 'mobile_user',
49
+ email: null,
50
+ id: null,
51
+ name: username || 'mobile_user'
111
52
  };
112
53
 
113
- // Get auth token and user info on mount
54
+ // Check if we should use Enoch SDK (based on modelKey or other criteria)
114
55
  (0, _react.useEffect)(() => {
115
- const loadUserData = async () => {
116
- try {
117
- const token = await (0, _authService.getAuthToken)();
118
- setUserToken(token);
119
- if (token) {
120
- // Use provided username instead of making API call to avoid 404 error
121
- // The backend JWT contains username but /api/user/profile endpoint doesn't exist
122
- const fallbackUsername = username || 'mobile_user';
123
- console.log('🔍 Using provided username for training:', fallbackUsername);
124
- setUserInfo({
125
- username: fallbackUsername,
126
- email: null,
127
- id: null // Will be filled by backend during training
128
- });
129
- }
130
- } catch (error) {
131
- console.error('Error loading user data:', error);
132
- // Fallback user info
133
- setUserInfo({
134
- username: username || 'mobile_user',
135
- email: null,
136
- id: null
137
- });
138
- }
139
- };
140
- if (visible) {
141
- loadUserData();
142
- }
143
- }, [visible, username]);
56
+ // For now, default to clean training unless specified
57
+ // In real implementation, this would be determined by SDK type
58
+ setIsEnochSDK((modelKey === null || modelKey === void 0 ? void 0 : modelKey.includes('enoch')) || false);
59
+ }, [modelKey]);
144
60
 
145
- // Start Enoch training via API
146
- const startEnochTraining = async socketId => {
61
+ // Start training with new API schema
62
+ const startTraining = async socketId => {
147
63
  try {
148
64
  setTrainingStatus('Starting training...');
149
- setProgress(10);
65
+ setInternalProgress(10);
66
+ setHasError(false);
67
+ setErrorCode(null);
150
68
  if (!userToken) {
151
69
  throw new Error('No authentication token available');
152
70
  }
153
- console.log('🚀 Starting Enoch training with socketId:', socketId);
154
-
155
- // Get stored Onairos username for API calls
156
- const storedUsername = await (0, _authService.getOnairosUsername)();
157
- const finalUsername = storedUsername || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.username) || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || username || 'mobile_user';
158
71
 
159
- // Get connected platforms information
160
- const connectedPlatforms = await _asyncStorage.default.getItem('connectedPlatforms');
161
- const platformsList = connectedPlatforms ? JSON.parse(connectedPlatforms) : [];
162
- console.log('📱 Connected platforms for training:', platformsList);
72
+ // Determine endpoint based on SDK type
73
+ const endpoint = isEnochSDK ? '/mobile-training/enoch' : '/mobile-training/clean';
74
+ console.log(`🚀 Starting training with endpoint: ${endpoint}`);
75
+ console.log('🔍 Production mode: Using new training API schema');
163
76
 
164
- // Get encrypted PIN for training (if available)
165
- const encryptedPin = await (0, _pinEncryptionService.getEncryptedPinForAPI)().catch(error => {
166
- console.warn('⚠️ Could not get encrypted PIN for training:', error);
167
- return null;
168
- });
169
-
170
- // Prepare user data for training - match backend expected format
77
+ // Prepare training data in new format
171
78
  const trainingData = {
172
- socketId,
173
- username: finalUsername,
174
- // This will be used as fallback in backend
175
- email: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) || null,
176
- // Backend will use this if available
177
- modelKey: modelKey || null,
178
- connectedPlatforms: platformsList,
179
- // Include connected platforms
180
- // Include encrypted PIN if available
181
- ...(encryptedPin && {
182
- encryptedPin: encryptedPin,
183
- hasPinData: true
184
- })
79
+ Info: {
80
+ username: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.username) || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || username || 'mobile_user',
81
+ // Mock connected platforms - in real implementation this would come from props
82
+ connectedPlatforms: ['youtube', 'instagram', 'reddit'] // TODO: Get from actual connections
83
+ }
185
84
  };
186
- console.log('📤 Starting training with YouTube migration check:', trainingData);
187
- console.log('🔑 Using stored username:', storedUsername);
188
- console.log('🔑 Final username for training:', finalUsername);
189
- console.log('🔗 Connected platforms:', platformsList);
190
- console.log('🔐 PIN included in training:', !!encryptedPin);
191
-
192
- // Use the new training function that includes YouTube migration check
193
- const result = await (0, _mobileTrainingService.startEnochTrainingWithYouTubeCheck)(trainingData);
85
+ console.log('📤 Sending training data:', trainingData);
86
+
87
+ // Call the new training API
88
+ const response = await fetch(`https://api2.onairos.uk${endpoint}`, {
89
+ method: 'POST',
90
+ headers: {
91
+ 'Content-Type': 'application/json',
92
+ 'Authorization': `Bearer ${userToken}` // JWT token authentication
93
+ },
94
+ body: JSON.stringify(trainingData)
95
+ });
96
+ const result = await response.json();
194
97
  if (result.success) {
195
98
  console.log('🚀 Training Started:', result.message);
196
- console.log('🎯 Training Features:', result.features);
197
-
198
- // Log the new features from the spec
199
- if (result.features) {
200
- console.log('✅ Inference enabled:', result.features.inference);
201
- console.log('💾 Storage method:', result.features.storage);
202
- console.log('🔒 Compression enabled:', result.features.compression);
203
- console.log('🔐 Encryption enabled:', result.features.encryption);
204
- console.log('📊 Training type:', result.features.type);
205
- console.log('🗄️ Databases:', result.features.databases);
206
- console.log('📈 Query scores enabled:', result.features.queryScores);
207
- }
208
- setTrainingStatus('Training model...');
209
- setProgress(20);
99
+ setTrainingStatus('Training initiated...');
100
+ setInternalProgress(20);
210
101
  } else {
211
102
  console.error('Training start failed:', result.error);
212
- setTrainingStatus(`Error: ${result.error}`);
213
- setHasError(true);
103
+
104
+ // Handle specific error codes from new schema
105
+ if (result.code) {
106
+ setErrorCode(result.code);
107
+ handleTrainingError(result.code, result.error);
108
+ } else {
109
+ setTrainingStatus(`Error: ${result.error}`);
110
+ setHasError(true);
111
+ }
214
112
  }
215
113
  } catch (error) {
216
114
  console.error('Training start error:', error);
@@ -219,744 +117,601 @@ const TrainingModal = ({
219
117
  }
220
118
  };
221
119
 
222
- // Setup socket connection and training
223
- (0, _react.useEffect)(() => {
224
- if (!visible || !userToken || !userInfo) return;
225
- console.log('Setting up socket connection for training...');
226
- console.log('🧑‍💻 User info available:', userInfo);
227
-
228
- // Initialize socket connection
229
- socketRef.current = (0, _socket.io)('https://api2.onairos.uk', {
230
- transports: ['websocket'],
231
- autoConnect: false
232
- });
233
-
234
- // Socket event listeners
235
- socketRef.current.on('connect', () => {
236
- var _socketRef$current;
237
- console.log('✅ Socket connected for training');
238
- setSocketConnected(true);
239
- const socketId = (_socketRef$current = socketRef.current) === null || _socketRef$current === void 0 ? void 0 : _socketRef$current.id;
240
- if (socketId) {
241
- // ❌ DISABLED: This was causing training to start too early (when modal opens)
242
- // Training should only start when transitioning from connectors to PIN screen
243
- // startEnochTraining(socketId);
244
- console.log('🔌 Socket ready, but training will start only when user transitions to PIN screen');
245
- }
246
- });
247
- socketRef.current.on('disconnect', () => {
248
- console.log('❌ Socket disconnected');
249
- setSocketConnected(false);
250
- });
251
- socketRef.current.on('trainingCompleted', data => {
252
- console.log('✅ Training Complete:', data);
253
- setTrainingStatus('Running test inference...');
254
- setProgress(60);
255
- });
256
- socketRef.current.on('inferenceCompleted', data => {
257
- console.log('🧠 Inference Complete:', data);
258
- setTrainingStatus('Uploading to S3...');
259
- setProgress(80);
260
- setUserTraits(data.traits);
261
- setInferenceResults(data.inferenceResults);
262
- });
263
- socketRef.current.on('modelStandby', data => {
264
- console.log('🎉 All Complete:', data);
265
-
266
- // Log completion details based on new spec
267
- if (data.completed) {
268
- console.log('✅ Training completed:', data.message);
269
- console.log('💾 Storage method:', data.storage);
270
- console.log('🔐 Encryption enabled:', data.encryption);
271
- console.log('🧠 Inference enabled:', data.inference);
272
-
273
- // Log database info for Enoch mode
274
- if (data.databases && Array.isArray(data.databases)) {
275
- console.log('🗄️ Databases used:', data.databases.join(', '));
276
- }
120
+ // Handle training errors with specific error codes
121
+ const handleTrainingError = (code, message) => {
122
+ console.error(`Training Error [${code}]:`, message);
123
+ setHasError(true);
124
+ switch (code) {
125
+ case 'PIN_REQUIRED':
126
+ setTrainingStatus('PIN setup required');
127
+ _reactNative.Alert.alert('PIN Required', 'Please set up your PIN first before training.', [{
128
+ text: 'Cancel',
129
+ style: 'cancel'
130
+ }, {
131
+ text: 'Set PIN',
132
+ onPress: () => {
133
+ // TODO: Navigate to PIN setup
134
+ console.log('Navigate to PIN setup');
135
+ }
136
+ }]);
137
+ break;
138
+ case 'CONNECTIONS_REQUIRED':
139
+ setTrainingStatus('No connected accounts');
140
+ _reactNative.Alert.alert('Connections Required', 'Please connect at least one social media account before training.', [{
141
+ text: 'Cancel',
142
+ style: 'cancel'
143
+ }, {
144
+ text: 'Connect',
145
+ onPress: () => {
146
+ // TODO: Navigate to connections
147
+ console.log('Navigate to connections');
148
+ }
149
+ }]);
150
+ break;
151
+ case 'INSUFFICIENT_DATA':
152
+ setTrainingStatus('Insufficient data for training');
153
+ _reactNative.Alert.alert('Insufficient Data', 'We need more interaction data to train your model effectively. Please use your connected platforms more and try again.', [{
154
+ text: 'OK',
155
+ style: 'default'
156
+ }]);
157
+ break;
158
+ case 'ENCRYPTION_REQUIRED':
159
+ setTrainingStatus('Model encryption failed');
160
+ _reactNative.Alert.alert('Encryption Error', 'Failed to encrypt your model. Please try again.', [{
161
+ text: 'OK',
162
+ style: 'default'
163
+ }]);
164
+ break;
165
+ default:
166
+ setTrainingStatus(`Error: ${message}`);
167
+ _reactNative.Alert.alert('Training Error', message || 'An unexpected error occurred during training.', [{
168
+ text: 'OK',
169
+ style: 'default'
170
+ }]);
171
+ }
172
+ };
277
173
 
278
- // Log testing mode
279
- if (data.testing) {
280
- console.log('🧪 Testing mode enabled');
174
+ // Simulate training progress for test mode
175
+ const simulateTraining = () => {
176
+ var _phases$currentPhase;
177
+ console.log('🧪 Starting simulated training with new schema phases...');
178
+ setTrainingStatus('Validating Requirements');
179
+ setInternalProgress(5);
180
+
181
+ // Simulate all phases from the new schema
182
+ const phases = [{
183
+ progress: 10,
184
+ status: 'Validating Requirements',
185
+ delay: 1000
186
+ }, {
187
+ progress: 25,
188
+ status: 'Training Model',
189
+ delay: 2000
190
+ }, {
191
+ progress: 50,
192
+ status: 'Training Model',
193
+ delay: 2000
194
+ }, {
195
+ progress: 65,
196
+ status: 'Model Trained - Running Test Inference',
197
+ delay: 1500
198
+ }, {
199
+ progress: 80,
200
+ status: 'Encrypting and Compressing Model',
201
+ delay: 1000
202
+ }, {
203
+ progress: 95,
204
+ status: 'Uploading Encrypted Model to ARDrive',
205
+ delay: 1500
206
+ }, {
207
+ progress: 100,
208
+ status: 'Complete!',
209
+ delay: 500
210
+ }];
211
+ let currentPhase = 0;
212
+ const progressInterval = setInterval(() => {
213
+ if (currentPhase < phases.length) {
214
+ const phase = phases[currentPhase];
215
+ setInternalProgress(phase.progress);
216
+ setTrainingStatus(phase.status);
217
+ if (phase.progress === 100) {
218
+ setIsTrainingComplete(true);
219
+ clearInterval(progressInterval);
220
+
221
+ // Mock completion results
222
+ const mockResults = {
223
+ completed: true,
224
+ message: "Model trained, encrypted, and stored successfully",
225
+ storage: "ARDrive",
226
+ encryption: true,
227
+ inference: isEnochSDK,
228
+ // Only Enoch SDK runs inference
229
+ modelUrl: `https://arweave.net/mock_tx_${Date.now()}`
230
+ };
231
+ setTrainingResults(mockResults);
232
+
233
+ // Auto-complete after a short delay
234
+ setTimeout(() => {
235
+ onComplete && onComplete();
236
+ }, 1000);
281
237
  }
238
+ currentPhase++;
282
239
  }
283
- setIsTrainingComplete(true);
284
- setTrainingStatus('Complete!');
285
- setProgress(100);
286
-
287
- // Clear temporary PIN after training is complete
288
- (0, _pinStorageUtils.clearTemporaryPin)();
240
+ }, ((_phases$currentPhase = phases[currentPhase]) === null || _phases$currentPhase === void 0 ? void 0 : _phases$currentPhase.delay) || 1000);
289
241
 
290
- // Show continue button for primary auth when training is complete
291
- if (isPrimaryAuth) {
292
- setMatchStep('found');
293
- setMatchCount(Math.floor(Math.random() * 10) + 5);
294
- }
295
- });
296
- socketRef.current.on('trainingUpdate', data => {
297
- if (data.error) {
298
- console.error('Training update error:', data.error);
299
- setTrainingStatus(`Error: ${data.error}`);
300
- setHasError(true);
301
- } else if (data.progress) {
302
- setProgress(data.progress);
303
- setTrainingStatus(data.status || 'Training in progress...');
304
- }
305
- });
306
-
307
- // Connect to socket
308
- socketRef.current.connect();
309
-
310
- // Cleanup function
311
- return () => {
312
- if (socketRef.current) {
313
- console.log('🔌 Disconnecting training socket...');
314
- socketRef.current.disconnect();
315
- socketRef.current = null;
316
- }
317
- };
318
- }, [visible, userToken, userInfo]);
242
+ // Cleanup interval on unmount
243
+ return () => clearInterval(progressInterval);
244
+ };
319
245
 
320
- // When modal becomes visible and autoFocus is requested, focus the email input
246
+ // Setup socket connection and training
321
247
  (0, _react.useEffect)(() => {
322
- if (visible && autoFocusEmailInput && matchStep === 'email' && emailInputRef.current) {
323
- const timer = setTimeout(() => {
324
- var _emailInputRef$curren;
325
- (_emailInputRef$curren = emailInputRef.current) === null || _emailInputRef$curren === void 0 || _emailInputRef$curren.focus();
326
- }, 150); // Small delay to sync with modal animation
327
- return () => clearTimeout(timer);
328
- } else if (!visible && emailInputRef.current) {
329
- // Optional: Blur input when modal is not visible
330
- // emailInputRef.current?.blur();
331
- }
332
- }, [visible, autoFocusEmailInput, matchStep]);
248
+ if (!visible || !userInfo) return;
249
+ console.log('Setting up socket connection for training...');
250
+ console.log('🧑‍💻 User info available:', userInfo);
251
+ console.log('🧪 Test mode:', test);
252
+ console.log('🔧 Using Enoch SDK:', isEnochSDK);
333
253
 
334
- // Validate email format
335
- const validateEmail = email => {
336
- // Check for reviewer bypass first
337
- if (email.toLowerCase().trim() === 'reviewer') {
338
- return true; // Valid for reviewer bypass
339
- }
340
- const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
341
- return emailRegex.test(email);
342
- };
343
- const handleEmailSubmit = async () => {
344
- // Check for reviewer bypass
345
- if (email.toLowerCase().trim() === 'reviewer') {
346
- console.log('🔍 Reviewer bypass detected');
347
- setEmail('reviewer@bypass.com'); // Set a valid email for the flow
348
- if (onComplete) {
349
- onComplete('reviewer@bypass.com');
350
- }
254
+ // If test mode is enabled, use simulation instead of real API
255
+ if (test) {
256
+ console.log('🧪 Test mode enabled - Using simulated training with new schema');
257
+ setSocketConnected(true);
258
+ simulateTraining();
351
259
  return;
352
260
  }
353
261
 
354
- // Regular email validation and submission
355
- if (!validateEmail(email)) {
356
- setEmailError('Please enter a valid email address');
357
- return;
358
- }
359
- setIsSubmittingEmail(true);
360
- setEmailError('');
262
+ // Initialize real socket connection
361
263
  try {
362
- console.log('📧 Sending verification code to:', email);
363
-
364
- // Send verification code using the new API
365
- // const result = await sendEmailVerificationCode(email); // Function not available
366
- const result = {
367
- success: true,
368
- message: 'Email verification not implemented'
369
- };
370
- if (result.success) {
371
- console.log('✅ Verification code sent successfully');
372
- setMatchStep('verification'); // Move to verification step
373
- } else {
374
- console.log('❌ Failed to send verification code:', result.message);
375
- setEmailError(result.message || 'Failed to send verification code. Please try again.');
376
- }
377
- } catch (error) {
378
- console.error('❌ Error sending verification code:', error);
379
- setEmailError('Network error. Please check your connection and try again.');
380
- } finally {
381
- setIsSubmittingEmail(false);
382
- }
383
- };
384
- const handleVerificationComplete = async (verifiedEmail, isVerified, accountInfo) => {
385
- if (isVerified) {
386
- console.log('✅ Email verification completed for:', verifiedEmail);
387
- console.log('🔍 AccountInfo received:', accountInfo);
388
- console.log('🔍 ExistingUser flag:', accountInfo === null || accountInfo === void 0 ? void 0 : accountInfo.existingUser);
264
+ console.log('🔌 Production mode: Initializing real socket connection');
389
265
 
390
- // Check if this is an existing user - must have accountInfo AND explicitly marked as existing
391
- if (accountInfo && accountInfo.existingUser === true) {
392
- console.log('🔍 Existing user detected:', accountInfo);
393
-
394
- // CRITICAL FIX: Ensure we have a valid JWT token before proceeding
395
- if (accountInfo.token && typeof accountInfo.token === 'string' && accountInfo.token.length > 50) {
396
- console.log('✅ Valid JWT token found for existing user');
397
-
398
- // Store the token immediately for existing users
399
- await _asyncStorage.default.setItem('onairos_jwt_token', accountInfo.token);
400
- await _asyncStorage.default.setItem('enoch_token', accountInfo.token);
401
- await _asyncStorage.default.setItem('auth_token', accountInfo.token);
402
- await _asyncStorage.default.setItem('user_email', verifiedEmail);
403
- await _asyncStorage.default.setItem('auth_method', 'onairos');
404
- console.log('✅ Existing user tokens stored successfully');
405
-
406
- // NEW: Show existing user confirmation modal instead of immediately completing
407
- setExistingUserAccountInfo(accountInfo);
408
- setMatchStep('existing_user');
409
- return;
410
- } else {
411
- console.error('❌ No valid JWT token for existing user - token:', accountInfo.token);
412
- console.error('❌ Cannot proceed without valid authentication token');
266
+ // Initialize socket connection
267
+ socketRef.current = (0, _socket.io)('https://api2.onairos.uk', {
268
+ transports: ['websocket'],
269
+ autoConnect: false
270
+ });
413
271
 
414
- // Don't fall back to email - throw error instead
415
- throw new Error('No valid authentication token received from server');
272
+ // Socket event listeners for new schema
273
+ socketRef.current.on('connect', () => {
274
+ var _socketRef$current;
275
+ console.log('✅ Socket connected for training');
276
+ setSocketConnected(true);
277
+ const socketId = (_socketRef$current = socketRef.current) === null || _socketRef$current === void 0 ? void 0 : _socketRef$current.id;
278
+ if (socketId) {
279
+ startTraining(socketId);
416
280
  }
417
- return;
418
- }
419
- console.log('🔍 New user detected - proceeding with account creation flow');
420
-
421
- // New user - proceed with account creation and continue to platform connectors
422
- try {
423
- console.log('📧 Creating Onairos account for verified email:', verifiedEmail);
424
- const username = verifiedEmail.split('@')[0];
425
- const onairosSignupResponse = await fetch('https://api2.onairos.uk/register/enoch', {
426
- method: 'POST',
427
- headers: {
428
- 'Content-Type': 'application/json'
429
- },
430
- body: JSON.stringify({
431
- email: verifiedEmail,
432
- username: username,
433
- name: username,
434
- emailVerified: true // Mark as verified
435
- })
436
- });
437
- const onairosResponseData = await onairosSignupResponse.json();
438
- console.log('🔗 Onairos account creation response:', onairosResponseData);
439
- if (onairosResponseData.token) {
440
- // Store tokens
441
- await _asyncStorage.default.setItem('onairos_jwt_token', onairosResponseData.token);
442
- await _asyncStorage.default.setItem('auth_token', onairosResponseData.token);
443
- await _asyncStorage.default.setItem('enoch_token', onairosResponseData.token);
444
- await _asyncStorage.default.setItem('onairos_username', onairosResponseData.username);
445
- await _asyncStorage.default.setItem('user_email', verifiedEmail);
446
- console.log('✅ Account created and tokens stored');
447
- console.log('🔗 Proceeding to UniversalOnboarding platform connectors');
281
+ });
282
+ socketRef.current.on('disconnect', () => {
283
+ console.log(' Socket disconnected');
284
+ setSocketConnected(false);
285
+ });
286
+ socketRef.current.on('connect_error', error => {
287
+ console.error(' Socket connection error:', error);
288
+ setTrainingStatus('Connection failed');
289
+ setHasError(true);
290
+ });
448
291
 
449
- // Close the TrainingModal and proceed to UniversalOnboarding platform connectors
450
- if (onComplete) {
451
- // This is the account creation path for new users
452
- // Always proceed to platform connectors for new users, regardless of backend response
453
- console.log('📧 TrainingModal: New user account created - proceeding to platform connectors:', verifiedEmail);
454
- onComplete(verifiedEmail);
292
+ // Handle training updates with new schema phases
293
+ socketRef.current.on('trainingUpdate', data => {
294
+ console.log('📡 Training update received:', data);
295
+ if (data.error) {
296
+ if (data.code) {
297
+ setErrorCode(data.code);
298
+ handleTrainingError(data.code, data.error);
299
+ } else {
300
+ console.error('Training update error:', data.error);
301
+ setTrainingStatus(`Error: ${data.error}`);
302
+ setHasError(true);
455
303
  }
456
304
  } else {
457
- // No token returned, continue with email to platform connectors
458
- console.log('🔗 No token returned, proceeding to platform connectors with email');
459
- // CRITICAL FIX: Store email even when account creation fails
460
- await _asyncStorage.default.setItem('user_email', verifiedEmail);
461
- console.log('✅ Email stored despite no token for admin check compatibility');
462
- if (onComplete) {
463
- onComplete(verifiedEmail);
305
+ // Handle different status phases
306
+ if (data.status) {
307
+ setTrainingStatus(data.status);
308
+
309
+ // Update progress based on phase
310
+ switch (data.status) {
311
+ case 'Validating Requirements':
312
+ setInternalProgress(10);
313
+ break;
314
+ case 'Training Model':
315
+ setInternalProgress(data.percent || 40);
316
+ break;
317
+ case 'Model Trained - Running Test Inference':
318
+ setInternalProgress(65);
319
+ break;
320
+ case 'Encrypting and Compressing Model':
321
+ setInternalProgress(80);
322
+ break;
323
+ case 'Uploading Encrypted Model to ARDrive':
324
+ setInternalProgress(90);
325
+ break;
326
+ default:
327
+ if (data.percent) {
328
+ setInternalProgress(data.percent);
329
+ }
330
+ }
331
+ }
332
+ if (data.progress) {
333
+ setInternalProgress(data.progress);
464
334
  }
465
335
  }
466
- } catch (error) {
467
- console.error('❌ Error creating account after verification:', error);
468
- // Continue anyway to platform connectors
469
- console.log('🔗 Error occurred, but proceeding to platform connectors');
470
- // CRITICAL FIX: Store email even when account creation throws an error
471
- await _asyncStorage.default.setItem('user_email', verifiedEmail);
472
- console.log('✅ Email stored despite error for admin check compatibility');
473
- if (onComplete) {
474
- onComplete(verifiedEmail);
475
- }
476
- }
477
- }
478
- };
479
- const handleVerificationBack = () => {
480
- setMatchStep('email');
481
- setEmailError('');
482
- };
483
-
484
- // Handle existing user confirmation
485
- const handleExistingUserConfirm = async () => {
486
- console.log('✅ Existing user confirmed data sharing');
487
- if (existingUserAccountInfo && existingUserAccountInfo.token) {
488
- if (onComplete) {
489
- onComplete(existingUserAccountInfo.token);
490
- }
491
- } else {
492
- console.error('❌ No token available for existing user');
493
- setEmailError('Authentication error. Please try again.');
494
- setMatchStep('email');
495
- }
496
- };
497
- const handleExistingUserCancel = () => {
498
- console.log('❌ Existing user cancelled data sharing');
499
- setMatchStep('email');
500
- setExistingUserAccountInfo(null);
501
- setEmailError('');
502
- };
503
- const handleExistingUserAddMoreData = () => {
504
- console.log('🔗 Existing user wants to add more data');
505
-
506
- // Store the existing user info for later use
507
- if (existingUserAccountInfo && existingUserAccountInfo.token) {
508
- _asyncStorage.default.setItem('existing_user_token', existingUserAccountInfo.token);
509
- _asyncStorage.default.setItem('existing_user_info', JSON.stringify(existingUserAccountInfo));
510
- }
511
-
512
- // Continue to new user flow (UniversalOnboarding) but with existing user context
513
- setMatchStep('email');
514
- setExistingUserAccountInfo(null);
515
-
516
- // Call onComplete with email to trigger UniversalOnboarding
517
- if (onComplete) {
518
- onComplete(email);
519
- }
520
- };
521
-
522
- // Ensure cancel button always works
523
- const handleCancelPress = () => {
524
- // Clear temporary PIN when cancelling
525
- (0, _pinStorageUtils.clearTemporaryPin)();
526
- onCancel();
527
- };
528
- const handleContinue = () => {
529
- // Trigger haptic feedback when button is pressed
530
- _reactNativeHapticFeedback.default.trigger('impactMedium', {
531
- enableVibrateFallback: true,
532
- ignoreAndroidSystemSettings: false
533
- });
534
- console.log('handleContinue called. Current email state:', email);
535
- console.log('Continue button pressed, completing onboarding with email:', email);
536
-
537
- // Make sure we have a valid email
538
- if (!validateEmail(email)) {
539
- console.log('Email validation failed, cannot continue');
540
- return;
541
- }
336
+ });
542
337
 
543
- // Show loading state
544
- setIsContinueLoading(true);
338
+ // Handle training completion with new schema
339
+ socketRef.current.on('trainingCompleted', data => {
340
+ console.log('✅ Training Complete:', data);
341
+ if (data.completed && data.storage === 'ARDrive' && data.encryption === true) {
342
+ setTrainingStatus('Training completed successfully!');
343
+ setIsTrainingComplete(true);
344
+ setInternalProgress(100);
345
+ setTrainingResults(data);
346
+
347
+ // Display results
348
+ console.log('✅ Model URL:', data.modelUrl);
349
+ console.log('✅ Storage:', data.storage);
350
+ console.log('✅ Encrypted:', data.encryption);
351
+ console.log('✅ Inference:', data.inference);
352
+
353
+ // Auto-complete after a short delay
354
+ setTimeout(() => {
355
+ onComplete && onComplete();
356
+ }, 1500);
357
+ } else {
358
+ console.error('Training completion missing required fields:', data);
359
+ setTrainingStatus('Training completed with warnings');
360
+ setHasError(true);
361
+ }
362
+ });
545
363
 
546
- // Call onComplete immediately to prevent splash screen flash
547
- // The loading state will still be visible during the transition
548
- if (onComplete) {
549
- console.log('Calling onComplete with email:', email);
550
- onComplete(email);
551
- // Note: We don't reset isContinueLoading because the component will unmount
552
- }
553
- };
364
+ // Legacy handlers for backward compatibility
365
+ socketRef.current.on('inferenceCompleted', data => {
366
+ console.log('🧠 Inference Complete:', data);
367
+ setUserTraits(data.traits);
368
+ setInferenceResults(data.inferenceResults);
369
+ });
370
+ socketRef.current.on('modelStandby', data => {
371
+ console.log('🎉 Model Ready:', data);
372
+ // This is handled by trainingCompleted now
373
+ });
554
374
 
555
- // Calculate user-friendly message based on progress
556
- const getUserFriendlyMessage = () => {
557
- if (hasError) return 'Something went wrong. Please try again.';
558
- if (isTrainingComplete) return 'Your persona is ready! 🎉';
559
- if (progress < 20) {
560
- return 'Keeping your data private...';
561
- } else if (progress < 40) {
562
- return 'Trying to understand your mind...';
563
- } else if (progress < 60) {
564
- return 'You\'re more interesting than I expected...';
565
- } else if (progress < 80) {
566
- return 'Finalizing your unique persona...';
567
- } else if (progress < 95) {
568
- return 'Almost done...';
569
- } else {
570
- return 'Just a few more seconds...';
375
+ // Connect to socket
376
+ socketRef.current.connect();
377
+ } catch (socketError) {
378
+ console.error('🚨 Production mode: Socket connection failed:', socketError);
379
+ setTrainingStatus('Failed to connect to training service');
380
+ setHasError(true);
571
381
  }
572
- };
573
382
 
574
- // Calculate remaining time estimate
575
- const getTimeEstimate = () => {
576
- if (hasError) return 'Please try again';
577
- if (isTrainingComplete) return 'Complete!';
578
-
579
- // Rough time estimates based on progress
580
- const remainingProgress = 100 - progress;
581
- const estimatedSeconds = Math.ceil(remainingProgress / 100 * 120); // Assume 2 minutes total
582
-
583
- if (estimatedSeconds > 60) {
584
- return `About ${Math.ceil(estimatedSeconds / 60)} minute${Math.ceil(estimatedSeconds / 60) > 1 ? 's' : ''} remaining`;
585
- } else if (estimatedSeconds > 0) {
586
- return `About ${estimatedSeconds} seconds remaining`;
587
- } else {
588
- return 'Almost there...';
589
- }
383
+ // Cleanup function
384
+ return () => {
385
+ if (socketRef.current) {
386
+ console.log('🔌 Disconnecting training socket...');
387
+ socketRef.current.disconnect();
388
+ socketRef.current = null;
389
+ }
390
+ };
391
+ }, [visible, userInfo, test, isEnochSDK]);
392
+
393
+ // Render error details for specific error codes
394
+ const renderErrorDetails = () => {
395
+ if (!hasError || !errorCode) return null;
396
+ const errorDetails = {
397
+ 'PIN_REQUIRED': {
398
+ icon: 'lock',
399
+ title: 'PIN Setup Required',
400
+ description: 'Set up your PIN to secure your AI model'
401
+ },
402
+ 'CONNECTIONS_REQUIRED': {
403
+ icon: 'link',
404
+ title: 'Connect Accounts',
405
+ description: 'Connect at least one social media account'
406
+ },
407
+ 'INSUFFICIENT_DATA': {
408
+ icon: 'data-usage',
409
+ title: 'More Data Needed',
410
+ description: 'We need more interaction data to train effectively'
411
+ },
412
+ 'ENCRYPTION_REQUIRED': {
413
+ icon: 'security',
414
+ title: 'Encryption Failed',
415
+ description: 'Failed to encrypt your model securely'
416
+ }
417
+ };
418
+ const details = errorDetails[errorCode];
419
+ if (!details) return null;
420
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
421
+ style: styles.errorDetailsContainer
422
+ }, /*#__PURE__*/_react.default.createElement(_MaterialIcons.default, {
423
+ name: details.icon,
424
+ size: 32,
425
+ color: "#FF6B6B"
426
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
427
+ style: styles.errorTitle
428
+ }, details.title), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
429
+ style: styles.errorDescription
430
+ }, details.description));
590
431
  };
591
-
592
- // Grabber bar
593
- const Grabber = () => /*#__PURE__*/_react.default.createElement(_reactNative.View, {
594
- style: styles.grabberContainer
595
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
596
- style: styles.grabberBar
597
- }));
598
- if (!visible) return null;
599
- const progressPercentage = Math.min(Math.max(progress, 0), 100);
600
432
  return /*#__PURE__*/_react.default.createElement(_reactNative.Modal, {
601
433
  visible: visible,
602
434
  transparent: true,
603
- animationType: "none" // Changed to none since we're handling animation
604
- ,
605
- onRequestClose: handleModalClose
606
- }, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableWithoutFeedback, {
607
- onPress: handleModalClose
608
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
435
+ animationType: "none",
436
+ statusBarTranslucent: true,
437
+ onRequestClose: onCancel
438
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableWithoutFeedback, null, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
609
439
  style: styles.modalOverlay
610
- }, /*#__PURE__*/_react.default.createElement(_reactNative.KeyboardAvoidingView, {
611
- behavior: _reactNative.Platform.OS === "ios" ? "padding" : "height",
612
- keyboardVerticalOffset: 0,
613
- style: styles.keyboardAvoidingView
614
- }, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableWithoutFeedback, {
615
- onPress: e => e.stopPropagation()
616
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
617
- style: [styles.modalContent, {
618
- transform: [{
619
- translateY: modalTranslateY
620
- }]
621
- }]
622
- }, /*#__PURE__*/_react.default.createElement(Grabber, null), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
623
- style: styles.closeButton,
624
- onPress: onCancel
625
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
626
- style: styles.closeButtonText
627
- }, "\u2715")), matchStep === 'email' && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
628
- style: [styles.primaryAuthHeader, {
629
- marginTop: 40
440
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableWithoutFeedback, null, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
441
+ style: styles.bottomSheet
442
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
443
+ style: styles.handleContainer
444
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
445
+ style: styles.handle
446
+ })), /*#__PURE__*/_react.default.createElement(_reactNative.SafeAreaView, {
447
+ style: styles.container
448
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
449
+ style: styles.content
450
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
451
+ source: require('../assets/images/onairos_logo.png'),
452
+ style: styles.onairosLogo,
453
+ resizeMode: "contain"
454
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
455
+ style: styles.title
456
+ }, isEnochSDK ? 'Training AI with Inference' : 'Training Your AI'), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
457
+ style: styles.progressContainer
458
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
459
+ style: styles.progressBar
460
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
461
+ style: [styles.progressFill, {
462
+ width: `${progressPercentage}%`
630
463
  }]
631
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
632
- style: styles.primaryAuthTitle
633
- }, "Sign in with Onairos"), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
634
- style: styles.primaryAuthSubtitle
635
- })), isPrimaryAuth && matchStep === 'email' && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
636
- style: styles.emailSection
637
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
638
- style: styles.emailLabel
639
- }, "Enter your email to sign in / create an account"), /*#__PURE__*/_react.default.createElement(_reactNative.TextInput, {
640
- ref: emailInputRef,
641
- style: [styles.emailInput, emailError ? styles.emailInputError : null],
642
- value: email,
643
- onChangeText: text => {
644
- setEmail(text);
645
- if (emailError) setEmailError('');
646
- },
647
- placeholder: "your.email@example.com",
648
- keyboardType: "email-address",
649
- autoCapitalize: "none",
650
- autoCorrect: false,
651
- returnKeyType: "done",
652
- onSubmitEditing: () => _reactNative.Keyboard.dismiss()
653
- }), emailError ? /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
464
+ })), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
465
+ style: styles.progressText
466
+ }, progressPercentage, "%")), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
467
+ style: styles.statusText
468
+ }, trainingStatus), hasError && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
469
+ style: styles.errorContainer
470
+ }, /*#__PURE__*/_react.default.createElement(_MaterialIcons.default, {
471
+ name: "error-outline",
472
+ size: 24,
473
+ color: "#FF6B6B"
474
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
654
475
  style: styles.errorText
655
- }, emailError) : null, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
656
- style: [styles.continueButton, (isSubmittingEmail || !email.includes('@') && email.toLowerCase().trim() !== 'reviewer') && styles.disabledButton, {
657
- marginTop: 24
658
- }],
659
- onPress: handleEmailSubmit,
660
- disabled: isSubmittingEmail || !email.includes('@') && email.toLowerCase().trim() !== 'reviewer',
661
- activeOpacity: 0.8
662
- }, isSubmittingEmail ? /*#__PURE__*/_react.default.createElement(_reactNative.ActivityIndicator, {
663
- size: "small",
664
- color: "#FFFFFF"
665
- }) : /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
666
- style: styles.continueButtonText
667
- }, "Continue"))), isPrimaryAuth && matchStep === 'verification' && /*#__PURE__*/_react.default.createElement(_reactNative.View, null, /*#__PURE__*/_react.default.createElement(_reactNative.Text, null, "Email verification step (not implemented)")), isPrimaryAuth && matchStep === 'existing_user' && existingUserAccountInfo && /*#__PURE__*/_react.default.createElement(_ExistingUserDataConfirmation.ExistingUserDataConfirmation, {
668
- visible: true,
669
- onConfirm: handleExistingUserConfirm,
670
- onCancel: handleExistingUserCancel,
671
- onAddMoreData: handleExistingUserAddMoreData,
672
- accountInfo: existingUserAccountInfo,
673
- userEmail: email
674
- }), isPrimaryAuth && matchStep === 'searching' && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
675
- style: styles.matchContainer
676
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
677
- style: styles.matchTitle
678
- }), /*#__PURE__*/_react.default.createElement(_reactNative.ActivityIndicator, {
679
- size: "large",
680
- color: "#E9C46A",
681
- style: styles.matchLoader
476
+ }, "Training encountered an error")), renderErrorDetails(), isTrainingComplete && trainingResults && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
477
+ style: styles.resultsContainer
478
+ }, /*#__PURE__*/_react.default.createElement(_MaterialIcons.default, {
479
+ name: "check-circle",
480
+ size: 32,
481
+ color: "#4CAF50"
482
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
483
+ style: styles.resultsTitle
484
+ }, "Training Complete!"), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
485
+ style: styles.resultsDetails
486
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
487
+ style: styles.resultItem
488
+ }, /*#__PURE__*/_react.default.createElement(_MaterialIcons.default, {
489
+ name: "cloud-done",
490
+ size: 16,
491
+ color: "#666"
492
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
493
+ style: styles.resultText
494
+ }, "Storage: ", trainingResults.storage)), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
495
+ style: styles.resultItem
496
+ }, /*#__PURE__*/_react.default.createElement(_MaterialIcons.default, {
497
+ name: "security",
498
+ size: 16,
499
+ color: "#666"
682
500
  }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
683
- style: styles.matchMessage
684
- }, "Searching for potential connections based on your email...")), isPrimaryAuth && matchStep === 'found' && progress >= 100 && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
685
- style: styles.matchContainer
501
+ style: styles.resultText
502
+ }, "Encrypted: ", trainingResults.encryption ? 'Yes' : 'No')), trainingResults.inference && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
503
+ style: styles.resultItem
504
+ }, /*#__PURE__*/_react.default.createElement(_MaterialIcons.default, {
505
+ name: "psychology",
506
+ size: 16,
507
+ color: "#666"
508
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
509
+ style: styles.resultText
510
+ }, "Inference: Completed")))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
511
+ style: styles.footer
512
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
513
+ style: styles.cancelButton,
514
+ onPress: onCancel
686
515
  }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
687
- style: styles.matchTitle
688
- }, "Connections Found"), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
689
- style: styles.matchCircle
516
+ style: styles.cancelButtonText
517
+ }, "Cancel")), (currentProgress >= 1 || isTrainingComplete) && /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
518
+ style: styles.completeButton,
519
+ onPress: onComplete
690
520
  }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
691
- style: styles.matchCount
692
- }, matchCount)), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
693
- style: styles.matchMessage
694
- }, "We found ", matchCount, " potential connections for you!"), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
695
- style: styles.matchSubMessage
696
- }, "Complete your profile to see your personalized matches"), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
697
- style: [styles.continueButton, isContinueLoading && styles.disabledButton],
698
- onPress: handleContinue,
699
- disabled: isContinueLoading
700
- }, isContinueLoading ? /*#__PURE__*/_react.default.createElement(_reactNative.ActivityIndicator, {
701
- size: "small",
702
- color: "#FFFFFF"
703
- }) : /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
704
- style: styles.continueButtonText
705
- }, "continue to setup")))))))));
521
+ style: styles.completeButtonText
522
+ }, "Complete"))))))))));
706
523
  };
707
524
  exports.TrainingModal = TrainingModal;
708
525
  const styles = _reactNative.StyleSheet.create({
709
- container: {
526
+ modalOverlay: {
710
527
  flex: 1,
711
- backgroundColor: '#fff',
712
- padding: 24
528
+ backgroundColor: 'rgba(0, 0, 0, 0.5)',
529
+ justifyContent: 'flex-end',
530
+ alignItems: 'center'
713
531
  },
714
- scrollContentContainer: {
715
- flexGrow: 1,
716
- justifyContent: 'flex-start',
717
- paddingBottom: 0,
718
- marginBottom: 0
532
+ bottomSheet: {
533
+ backgroundColor: '#fff',
534
+ width: width,
535
+ height: height * 0.8,
536
+ borderTopLeftRadius: 24,
537
+ borderTopRightRadius: 24,
538
+ overflow: 'hidden'
719
539
  },
720
- actualContentWrapper: {
540
+ handleContainer: {
721
541
  width: '100%',
722
- alignItems: 'center' // Center content like headers if they are not full width
542
+ alignItems: 'center',
543
+ paddingTop: 12,
544
+ paddingBottom: 8
545
+ },
546
+ handle: {
547
+ width: 40,
548
+ height: 5,
549
+ borderRadius: 3,
550
+ backgroundColor: '#E0E0E0'
551
+ },
552
+ container: {
553
+ flex: 1,
554
+ backgroundColor: '#fff'
723
555
  },
724
556
  content: {
725
- // This style might be unused or redefined if still needed for specific children
726
- // flex: 1, // Original content style, likely not needed for the wrapper anymore
557
+ flex: 1,
558
+ width: '100%',
559
+ alignItems: 'center',
560
+ justifyContent: 'center',
561
+ padding: 24
727
562
  },
728
563
  title: {
729
564
  fontSize: 24,
730
565
  fontWeight: '600',
731
- color: '#333',
732
- marginBottom: 24,
566
+ marginTop: 24,
567
+ marginBottom: 8,
568
+ color: _constants.COLORS.text.primary,
733
569
  textAlign: 'center'
734
570
  },
735
571
  subtitle: {
736
572
  fontSize: 16,
737
- color: '#666',
738
- marginBottom: 32,
573
+ color: _constants.COLORS.text.secondary,
574
+ textAlign: 'center',
575
+ marginBottom: 32
576
+ },
577
+ statusText: {
578
+ fontSize: 14,
579
+ color: _constants.COLORS.text.secondary,
580
+ marginBottom: 24,
739
581
  textAlign: 'center'
740
582
  },
741
583
  progressContainer: {
742
- marginBottom: 24
584
+ width: '100%',
585
+ marginBottom: 16
743
586
  },
744
587
  progressBar: {
745
588
  height: 8,
746
- backgroundColor: '#F5F5F5',
589
+ backgroundColor: _constants.COLORS.border,
747
590
  borderRadius: 4,
748
- overflow: 'hidden',
749
- marginBottom: 8
591
+ overflow: 'hidden'
750
592
  },
751
593
  progressFill: {
752
594
  height: '100%',
753
- backgroundColor: '#1BA9D4',
595
+ backgroundColor: _constants.COLORS.primary,
754
596
  borderRadius: 4
755
597
  },
756
598
  progressText: {
757
599
  fontSize: 14,
758
- color: '#666',
759
- textAlign: 'right'
600
+ color: _constants.COLORS.text.secondary,
601
+ textAlign: 'center',
602
+ marginTop: 8
760
603
  },
761
- infoContainer: {
604
+ etaText: {
605
+ fontSize: 14,
606
+ color: _constants.COLORS.text.secondary,
607
+ marginBottom: 24
608
+ },
609
+ loadingContainer: {
762
610
  flexDirection: 'row',
763
611
  alignItems: 'center',
764
612
  marginBottom: 32
765
613
  },
766
- etaText: {
614
+ loadingText: {
767
615
  fontSize: 14,
768
- color: '#666',
769
- marginLeft: 8,
770
- textAlign: 'center',
771
- marginBottom: 16
772
- },
773
- detailText: {
774
- fontSize: 14,
775
- color: '#666',
776
- lineHeight: 20
616
+ color: _constants.COLORS.text.secondary,
617
+ marginLeft: 8
777
618
  },
778
- emailSection: {
779
- marginTop: 24,
780
- marginBottom: 16,
781
- width: '100%'
619
+ footer: {
620
+ flexDirection: 'row',
621
+ alignItems: 'center',
622
+ justifyContent: 'space-between',
623
+ width: '100%',
624
+ borderTopWidth: 1,
625
+ borderTopColor: '#eee',
626
+ paddingTop: 16,
627
+ paddingHorizontal: 24,
628
+ paddingBottom: 24
782
629
  },
783
- emailSectionPrimary: {
784
- marginTop: 40,
785
- marginBottom: 40
630
+ cancelButton: {
631
+ paddingVertical: 8,
632
+ paddingHorizontal: 16
786
633
  },
787
- emailLabel: {
634
+ cancelButtonText: {
788
635
  fontSize: 16,
789
- fontWeight: '500',
790
- color: '#333',
791
- marginBottom: 12,
792
- textAlign: 'center'
636
+ color: '#666'
793
637
  },
794
- emailInput: {
795
- height: 48,
638
+ completeButton: {
639
+ paddingVertical: 16,
640
+ paddingHorizontal: 32,
641
+ borderRadius: 16,
642
+ backgroundColor: '#fff',
796
643
  borderWidth: 1,
797
- borderColor: '#E0E0E0',
798
- borderRadius: 8,
799
- paddingHorizontal: 16,
800
- fontSize: 16,
801
- marginBottom: 8
644
+ borderColor: '#000'
802
645
  },
803
- emailInputError: {
804
- borderColor: '#FF3B30'
646
+ completeButtonText: {
647
+ fontSize: 16,
648
+ fontWeight: '600',
649
+ color: '#000'
805
650
  },
806
- errorText: {
807
- color: '#FF3B30',
808
- fontSize: 14,
809
- marginBottom: 16
651
+ onairosLogo: {
652
+ width: 48,
653
+ height: 48
810
654
  },
811
- footer: {
655
+ errorContainer: {
812
656
  flexDirection: 'row',
813
- justifyContent: 'space-between',
814
- marginTop: 24,
815
- paddingTop: 16
816
- },
817
- completeButton: {
818
- paddingVertical: 12,
819
- paddingHorizontal: 24,
820
- backgroundColor: '#1BA9D4',
821
- borderRadius: 8
822
- },
823
- disabledButton: {
824
- backgroundColor: '#CCCCCC',
825
- opacity: 0.7
826
- },
827
- completeButtonText: {
828
- color: '#fff',
829
- fontSize: 16,
830
- fontWeight: '600'
657
+ alignItems: 'center',
658
+ marginBottom: 16
831
659
  },
832
- statusText: {
660
+ errorText: {
833
661
  fontSize: 14,
834
- color: '#666',
662
+ color: '#FF6B6B',
835
663
  marginLeft: 8
836
664
  },
837
- progressError: {
838
- backgroundColor: '#FF3B30'
839
- },
840
- primaryAuthHeader: {
665
+ errorDetailsContainer: {
841
666
  alignItems: 'center',
842
667
  marginBottom: 24,
843
- paddingHorizontal: 16
844
- },
845
- primaryAuthTitle: {
846
- fontSize: 24,
847
- fontWeight: '600',
848
- color: '#333',
849
- marginBottom: 8,
850
- textAlign: 'center'
668
+ padding: 16,
669
+ backgroundColor: '#FFF5F5',
670
+ borderRadius: 12,
671
+ borderWidth: 1,
672
+ borderColor: '#FFEBEE'
851
673
  },
852
- primaryAuthSubtitle: {
674
+ errorTitle: {
853
675
  fontSize: 16,
854
- color: '#555',
855
- textAlign: 'center',
856
- marginBottom: 16
857
- },
858
- matchContainer: {
859
- alignItems: 'center',
860
- padding: 20
861
- },
862
- matchTitle: {
863
- fontSize: 24,
864
676
  fontWeight: '600',
865
- color: '#333',
866
- marginBottom: 16,
867
- textAlign: 'center'
868
- },
869
- matchLoader: {
870
- marginVertical: 20
871
- },
872
- matchMessage: {
873
- fontSize: 16,
874
- color: '#555',
875
- textAlign: 'center',
876
- marginVertical: 12
677
+ color: '#FF6B6B',
678
+ marginTop: 8,
679
+ marginBottom: 4
877
680
  },
878
- matchSubMessage: {
681
+ errorDescription: {
879
682
  fontSize: 14,
880
- color: '#777',
881
- textAlign: 'center',
882
- marginTop: 8
883
- },
884
- matchCircle: {
885
- width: 80,
886
- height: 80,
887
- borderRadius: 40,
888
- backgroundColor: '#E9C46A',
889
- justifyContent: 'center',
890
- alignItems: 'center',
891
- marginVertical: 16
892
- },
893
- matchCount: {
894
- fontSize: 32,
895
- fontWeight: 'bold',
896
- color: '#FFFFFF'
683
+ color: '#666',
684
+ textAlign: 'center'
897
685
  },
898
- continueButton: {
899
- marginTop: 40,
900
- width: '85%',
901
- height: 50,
902
- backgroundColor: '#000000',
903
- borderRadius: 8,
904
- justifyContent: 'center',
686
+ resultsContainer: {
905
687
  alignItems: 'center',
906
- alignSelf: 'center'
688
+ marginBottom: 24,
689
+ padding: 16,
690
+ backgroundColor: '#F5F5F5',
691
+ borderRadius: 12,
692
+ borderWidth: 1,
693
+ borderColor: '#E0E0E0'
907
694
  },
908
- continueButtonText: {
909
- color: '#FFFFFF',
910
- fontSize: 18,
695
+ resultsTitle: {
696
+ fontSize: 16,
911
697
  fontWeight: '600',
912
- textAlign: 'center'
698
+ color: '#4CAF50',
699
+ marginTop: 8,
700
+ marginBottom: 12
913
701
  },
914
- modalOverlay: {
915
- flex: 1,
916
- backgroundColor: 'rgba(0, 0, 0, 0.5)',
917
- justifyContent: 'flex-end'
918
- },
919
- keyboardAvoidingView: {
920
- flex: 1,
921
- justifyContent: 'flex-end',
922
- alignItems: 'stretch',
923
- margin: 0,
924
- padding: 0
925
- },
926
- modalContent: {
927
- backgroundColor: '#fff',
928
- borderTopLeftRadius: 20,
929
- borderTopRightRadius: 20,
930
- padding: 24,
931
- paddingTop: 12,
932
- minHeight: height * 0.4,
933
- maxHeight: height * 0.9
934
- },
935
- closeButton: {
936
- position: 'absolute',
937
- top: 15,
938
- // Adjust as needed for visual balance with grabber and padding
939
- right: 20,
940
- // Adjust as needed
941
- padding: 5,
942
- // Make it easier to tap
943
- zIndex: 10 // Ensure it's above other content
944
- },
945
- closeButtonText: {
946
- fontSize: 24,
947
- // Make it a bit larger
948
- color: '#888',
949
- // Subtle color
950
- fontWeight: '300'
702
+ resultsDetails: {
703
+ alignItems: 'flex-start',
704
+ width: '100%'
951
705
  },
952
- grabberContainer: {
953
- alignItems: 'center'
706
+ resultItem: {
707
+ flexDirection: 'row',
708
+ alignItems: 'center',
709
+ marginBottom: 4
954
710
  },
955
- grabberBar: {
956
- width: 48,
957
- height: 5,
958
- borderRadius: 3,
959
- backgroundColor: '#E0E0E0'
711
+ resultText: {
712
+ fontSize: 14,
713
+ color: '#666',
714
+ marginLeft: 8
960
715
  }
961
716
  });
962
717
  //# sourceMappingURL=TrainingModal.js.map