@oxyhq/services 5.16.44 → 5.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (506) hide show
  1. package/README.md +29 -10
  2. package/lib/commonjs/core/OxyServices.js +1 -1
  3. package/lib/commonjs/core/index.js +20 -15
  4. package/lib/commonjs/core/index.js.map +1 -1
  5. package/lib/commonjs/core/mixins/OxyServices.auth.js +36 -53
  6. package/lib/commonjs/core/mixins/OxyServices.auth.js.map +1 -1
  7. package/lib/commonjs/core/mixins/OxyServices.user.js +10 -17
  8. package/lib/commonjs/core/mixins/OxyServices.user.js.map +1 -1
  9. package/lib/commonjs/core/services/TokenService.js +27 -13
  10. package/lib/commonjs/core/services/TokenService.js.map +1 -1
  11. package/lib/commonjs/crypto/index.js +0 -16
  12. package/lib/commonjs/crypto/index.js.map +1 -1
  13. package/lib/commonjs/crypto/keyManager.js +21 -22
  14. package/lib/commonjs/crypto/keyManager.js.map +1 -1
  15. package/lib/commonjs/crypto/polyfill.js +1 -10
  16. package/lib/commonjs/crypto/polyfill.js.map +1 -1
  17. package/lib/commonjs/crypto/signatureService.js +18 -32
  18. package/lib/commonjs/crypto/signatureService.js.map +1 -1
  19. package/lib/commonjs/index.js +13 -134
  20. package/lib/commonjs/index.js.map +1 -1
  21. package/lib/commonjs/models/interfaces.js +0 -7
  22. package/lib/commonjs/models/interfaces.js.map +1 -1
  23. package/lib/commonjs/node/index.js +1 -10
  24. package/lib/commonjs/node/index.js.map +1 -1
  25. package/lib/commonjs/ui/components/BottomSheetRouter.js +1 -9
  26. package/lib/commonjs/ui/components/BottomSheetRouter.js.map +1 -1
  27. package/lib/commonjs/ui/context/OxyContext.js +779 -450
  28. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  29. package/lib/commonjs/ui/context/hooks/useAuthOperations.js +551 -0
  30. package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -0
  31. package/lib/commonjs/ui/context/hooks/useDeviceManagement.js +73 -0
  32. package/lib/commonjs/ui/context/hooks/useDeviceManagement.js.map +1 -0
  33. package/lib/commonjs/ui/context/hooks/useStorage.js +79 -0
  34. package/lib/commonjs/ui/context/hooks/useStorage.js.map +1 -0
  35. package/lib/commonjs/ui/hooks/index.js +0 -20
  36. package/lib/commonjs/ui/hooks/index.js.map +1 -1
  37. package/lib/commonjs/ui/hooks/mutations/index.js +0 -12
  38. package/lib/commonjs/ui/hooks/mutations/index.js.map +1 -1
  39. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +23 -74
  40. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  41. package/lib/commonjs/ui/hooks/queries/index.js +0 -12
  42. package/lib/commonjs/ui/hooks/queries/index.js.map +1 -1
  43. package/lib/commonjs/ui/hooks/queries/queryKeys.js +1 -3
  44. package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
  45. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +28 -64
  46. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
  47. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +6 -4
  48. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
  49. package/lib/commonjs/ui/hooks/useDeviceManagement.js +73 -0
  50. package/lib/commonjs/ui/hooks/useDeviceManagement.js.map +1 -0
  51. package/lib/commonjs/ui/hooks/useProfileEditing.js +5 -3
  52. package/lib/commonjs/ui/hooks/useProfileEditing.js.map +1 -1
  53. package/lib/commonjs/ui/hooks/useSessionManagement.js +284 -0
  54. package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -0
  55. package/lib/commonjs/ui/index.js +2 -10
  56. package/lib/commonjs/ui/index.js.map +1 -1
  57. package/lib/commonjs/ui/navigation/routes.js +1 -5
  58. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  59. package/lib/commonjs/ui/screens/AccountCenterScreen.js +4 -9
  60. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  61. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +19 -37
  62. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  63. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +5 -5
  64. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  65. package/lib/commonjs/ui/screens/OxyAuthScreen.js +15 -2
  66. package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
  67. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +97 -76
  68. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  69. package/lib/commonjs/ui/screens/ProfileScreen.js +6 -6
  70. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  71. package/lib/commonjs/ui/stores/authStore.js +6 -54
  72. package/lib/commonjs/ui/stores/authStore.js.map +1 -1
  73. package/lib/commonjs/ui/styles/spacing.js +2 -54
  74. package/lib/commonjs/ui/styles/spacing.js.map +1 -1
  75. package/lib/commonjs/ui/utils/avatarUtils.js +12 -9
  76. package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
  77. package/lib/commonjs/ui/utils/sessionHelpers.js +1 -7
  78. package/lib/commonjs/ui/utils/sessionHelpers.js.map +1 -1
  79. package/lib/commonjs/utils/deviceManager.js +177 -0
  80. package/lib/commonjs/utils/deviceManager.js.map +1 -0
  81. package/lib/commonjs/utils/errorUtils.js +0 -13
  82. package/lib/commonjs/utils/errorUtils.js.map +1 -1
  83. package/lib/commonjs/utils/index.js +7 -0
  84. package/lib/commonjs/utils/index.js.map +1 -1
  85. package/lib/commonjs/utils/sessionUtils.js +1 -8
  86. package/lib/commonjs/utils/sessionUtils.js.map +1 -1
  87. package/lib/commonjs/utils/validationUtils.js +1 -15
  88. package/lib/commonjs/utils/validationUtils.js.map +1 -1
  89. package/lib/module/core/OxyServices.js +1 -1
  90. package/lib/module/core/index.js +4 -6
  91. package/lib/module/core/index.js.map +1 -1
  92. package/lib/module/core/mixins/OxyServices.auth.js +36 -53
  93. package/lib/module/core/mixins/OxyServices.auth.js.map +1 -1
  94. package/lib/module/core/mixins/OxyServices.user.js +10 -17
  95. package/lib/module/core/mixins/OxyServices.user.js.map +1 -1
  96. package/lib/module/core/services/TokenService.js +27 -13
  97. package/lib/module/core/services/TokenService.js.map +1 -1
  98. package/lib/module/crypto/index.js +0 -3
  99. package/lib/module/crypto/index.js.map +1 -1
  100. package/lib/module/crypto/keyManager.js +21 -22
  101. package/lib/module/crypto/keyManager.js.map +1 -1
  102. package/lib/module/crypto/polyfill.js +1 -2
  103. package/lib/module/crypto/polyfill.js.map +1 -1
  104. package/lib/module/crypto/signatureService.js +18 -32
  105. package/lib/module/crypto/signatureService.js.map +1 -1
  106. package/lib/module/index.js +7 -19
  107. package/lib/module/index.js.map +1 -1
  108. package/lib/module/models/interfaces.js +0 -7
  109. package/lib/module/models/interfaces.js.map +1 -1
  110. package/lib/module/node/index.js +0 -3
  111. package/lib/module/node/index.js.map +1 -1
  112. package/lib/module/ui/components/BottomSheetRouter.js +2 -6
  113. package/lib/module/ui/components/BottomSheetRouter.js.map +1 -1
  114. package/lib/module/ui/context/OxyContext.js +779 -450
  115. package/lib/module/ui/context/OxyContext.js.map +1 -1
  116. package/lib/module/ui/context/hooks/useAuthOperations.js +545 -0
  117. package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -0
  118. package/lib/module/ui/context/hooks/useDeviceManagement.js +68 -0
  119. package/lib/module/ui/context/hooks/useDeviceManagement.js.map +1 -0
  120. package/lib/module/ui/context/hooks/useStorage.js +74 -0
  121. package/lib/module/ui/context/hooks/useStorage.js.map +1 -0
  122. package/lib/module/ui/hooks/index.js +0 -1
  123. package/lib/module/ui/hooks/index.js.map +1 -1
  124. package/lib/module/ui/hooks/mutations/index.js +1 -1
  125. package/lib/module/ui/hooks/mutations/index.js.map +1 -1
  126. package/lib/module/ui/hooks/mutations/useAccountMutations.js +21 -71
  127. package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  128. package/lib/module/ui/hooks/queries/index.js +1 -1
  129. package/lib/module/ui/hooks/queries/index.js.map +1 -1
  130. package/lib/module/ui/hooks/queries/queryKeys.js +1 -3
  131. package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
  132. package/lib/module/ui/hooks/queries/useAccountQueries.js +27 -61
  133. package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
  134. package/lib/module/ui/hooks/queries/useServicesQueries.js +6 -4
  135. package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
  136. package/lib/module/ui/hooks/useDeviceManagement.js +68 -0
  137. package/lib/module/ui/hooks/useDeviceManagement.js.map +1 -0
  138. package/lib/module/ui/hooks/useProfileEditing.js +5 -3
  139. package/lib/module/ui/hooks/useProfileEditing.js.map +1 -1
  140. package/lib/module/ui/hooks/useSessionManagement.js +279 -0
  141. package/lib/module/ui/hooks/useSessionManagement.js.map +1 -0
  142. package/lib/module/ui/index.js +1 -2
  143. package/lib/module/ui/index.js.map +1 -1
  144. package/lib/module/ui/navigation/routes.js +1 -5
  145. package/lib/module/ui/navigation/routes.js.map +1 -1
  146. package/lib/module/ui/screens/AccountCenterScreen.js +4 -9
  147. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  148. package/lib/module/ui/screens/AccountSettingsScreen.js +19 -37
  149. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  150. package/lib/module/ui/screens/AccountSwitcherScreen.js +5 -5
  151. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  152. package/lib/module/ui/screens/OxyAuthScreen.js +15 -2
  153. package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
  154. package/lib/module/ui/screens/PrivacySettingsScreen.js +98 -77
  155. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  156. package/lib/module/ui/screens/ProfileScreen.js +6 -6
  157. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  158. package/lib/module/ui/stores/authStore.js +6 -54
  159. package/lib/module/ui/stores/authStore.js.map +1 -1
  160. package/lib/module/ui/styles/spacing.js +2 -6
  161. package/lib/module/ui/styles/spacing.js.map +1 -1
  162. package/lib/module/ui/utils/avatarUtils.js +12 -9
  163. package/lib/module/ui/utils/avatarUtils.js.map +1 -1
  164. package/lib/module/ui/utils/sessionHelpers.js +1 -7
  165. package/lib/module/ui/utils/sessionHelpers.js.map +1 -1
  166. package/lib/module/utils/deviceManager.js +171 -0
  167. package/lib/module/utils/deviceManager.js.map +1 -0
  168. package/lib/module/utils/errorUtils.js +0 -7
  169. package/lib/module/utils/errorUtils.js.map +1 -1
  170. package/lib/module/utils/index.js +1 -2
  171. package/lib/module/utils/index.js.map +1 -1
  172. package/lib/module/utils/sessionUtils.js +1 -8
  173. package/lib/module/utils/sessionUtils.js.map +1 -1
  174. package/lib/module/utils/validationUtils.js +0 -13
  175. package/lib/module/utils/validationUtils.js.map +1 -1
  176. package/lib/typescript/core/OxyServices.d.ts +1 -1
  177. package/lib/typescript/core/index.d.ts +3 -3
  178. package/lib/typescript/core/index.d.ts.map +1 -1
  179. package/lib/typescript/core/mixins/OxyServices.auth.d.ts +21 -44
  180. package/lib/typescript/core/mixins/OxyServices.auth.d.ts.map +1 -1
  181. package/lib/typescript/core/mixins/OxyServices.user.d.ts +1 -0
  182. package/lib/typescript/core/mixins/OxyServices.user.d.ts.map +1 -1
  183. package/lib/typescript/core/mixins/index.d.ts +8 -15
  184. package/lib/typescript/core/mixins/index.d.ts.map +1 -1
  185. package/lib/typescript/core/services/TokenService.d.ts.map +1 -1
  186. package/lib/typescript/crypto/index.d.ts +0 -1
  187. package/lib/typescript/crypto/index.d.ts.map +1 -1
  188. package/lib/typescript/crypto/keyManager.d.ts +2 -15
  189. package/lib/typescript/crypto/keyManager.d.ts.map +1 -1
  190. package/lib/typescript/crypto/polyfill.d.ts +1 -2
  191. package/lib/typescript/crypto/polyfill.d.ts.map +1 -1
  192. package/lib/typescript/crypto/signatureService.d.ts +0 -13
  193. package/lib/typescript/crypto/signatureService.d.ts.map +1 -1
  194. package/lib/typescript/index.d.ts +7 -12
  195. package/lib/typescript/index.d.ts.map +1 -1
  196. package/lib/typescript/models/interfaces.d.ts +36 -5
  197. package/lib/typescript/models/interfaces.d.ts.map +1 -1
  198. package/lib/typescript/models/session.d.ts +18 -3
  199. package/lib/typescript/models/session.d.ts.map +1 -1
  200. package/lib/typescript/node/index.d.ts +0 -1
  201. package/lib/typescript/node/index.d.ts.map +1 -1
  202. package/lib/typescript/ui/components/BottomSheetRouter.d.ts +0 -5
  203. package/lib/typescript/ui/components/BottomSheetRouter.d.ts.map +1 -1
  204. package/lib/typescript/ui/components/TextField/Addons/Outline.d.ts +2 -2
  205. package/lib/typescript/ui/components/TextField/helpers.d.ts +2 -2
  206. package/lib/typescript/ui/components/TextField/types.d.ts +0 -1
  207. package/lib/typescript/ui/components/TextField/types.d.ts.map +1 -1
  208. package/lib/typescript/ui/context/OxyContext.d.ts +28 -5
  209. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
  210. package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts +59 -0
  211. package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts.map +1 -0
  212. package/lib/typescript/ui/context/hooks/useDeviceManagement.d.ts +27 -0
  213. package/lib/typescript/ui/context/hooks/useDeviceManagement.d.ts.map +1 -0
  214. package/lib/typescript/ui/context/hooks/useStorage.d.ts +22 -0
  215. package/lib/typescript/ui/context/hooks/useStorage.d.ts.map +1 -0
  216. package/lib/typescript/ui/hooks/index.d.ts +0 -1
  217. package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
  218. package/lib/typescript/ui/hooks/mutations/index.d.ts +1 -1
  219. package/lib/typescript/ui/hooks/mutations/index.d.ts.map +1 -1
  220. package/lib/typescript/ui/hooks/mutations/useAccountMutations.d.ts +8 -19
  221. package/lib/typescript/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  222. package/lib/typescript/ui/hooks/mutations/useServicesMutations.d.ts +1 -1
  223. package/lib/typescript/ui/hooks/mutations/useServicesMutations.d.ts.map +1 -1
  224. package/lib/typescript/ui/hooks/queries/index.d.ts +1 -1
  225. package/lib/typescript/ui/hooks/queries/index.d.ts.map +1 -1
  226. package/lib/typescript/ui/hooks/queries/queryKeys.d.ts +0 -2
  227. package/lib/typescript/ui/hooks/queries/queryKeys.d.ts.map +1 -1
  228. package/lib/typescript/ui/hooks/queries/useAccountQueries.d.ts +5 -17
  229. package/lib/typescript/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
  230. package/lib/typescript/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  231. package/lib/typescript/ui/hooks/useDeviceManagement.d.ts +27 -0
  232. package/lib/typescript/ui/hooks/useDeviceManagement.d.ts.map +1 -0
  233. package/lib/typescript/ui/hooks/useProfileEditing.d.ts.map +1 -1
  234. package/lib/typescript/ui/hooks/useSessionManagement.d.ts +41 -0
  235. package/lib/typescript/ui/hooks/useSessionManagement.d.ts.map +1 -0
  236. package/lib/typescript/ui/index.d.ts +0 -1
  237. package/lib/typescript/ui/index.d.ts.map +1 -1
  238. package/lib/typescript/ui/navigation/routes.d.ts +1 -1
  239. package/lib/typescript/ui/navigation/routes.d.ts.map +1 -1
  240. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
  241. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  242. package/lib/typescript/ui/screens/OxyAuthScreen.d.ts.map +1 -1
  243. package/lib/typescript/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  244. package/lib/typescript/ui/stores/authStore.d.ts +1 -8
  245. package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
  246. package/lib/typescript/ui/styles/spacing.d.ts +0 -5
  247. package/lib/typescript/ui/styles/spacing.d.ts.map +1 -1
  248. package/lib/typescript/ui/utils/avatarUtils.d.ts +4 -1
  249. package/lib/typescript/ui/utils/avatarUtils.d.ts.map +1 -1
  250. package/lib/typescript/ui/utils/sessionHelpers.d.ts +0 -1
  251. package/lib/typescript/ui/utils/sessionHelpers.d.ts.map +1 -1
  252. package/lib/typescript/utils/deviceManager.d.ts +66 -0
  253. package/lib/typescript/utils/deviceManager.d.ts.map +1 -0
  254. package/lib/typescript/utils/errorUtils.d.ts +0 -6
  255. package/lib/typescript/utils/errorUtils.d.ts.map +1 -1
  256. package/lib/typescript/utils/index.d.ts +2 -0
  257. package/lib/typescript/utils/index.d.ts.map +1 -1
  258. package/lib/typescript/utils/sessionUtils.d.ts.map +1 -1
  259. package/lib/typescript/utils/validationUtils.d.ts +0 -8
  260. package/lib/typescript/utils/validationUtils.d.ts.map +1 -1
  261. package/package.json +1 -6
  262. package/src/core/OxyServices.ts +1 -1
  263. package/src/core/index.ts +5 -8
  264. package/src/core/mixins/OxyServices.auth.ts +44 -87
  265. package/src/core/mixins/OxyServices.user.ts +10 -18
  266. package/src/core/services/TokenService.ts +27 -16
  267. package/src/crypto/index.ts +1 -3
  268. package/src/crypto/keyManager.ts +21 -30
  269. package/src/crypto/polyfill.ts +1 -2
  270. package/src/crypto/signatureService.ts +19 -43
  271. package/src/index.ts +6 -41
  272. package/src/models/interfaces.ts +39 -12
  273. package/src/models/session.ts +19 -7
  274. package/src/node/index.ts +0 -3
  275. package/src/ui/components/BottomSheetRouter.tsx +1 -6
  276. package/src/ui/components/TextField/Addons/Outline.tsx +2 -2
  277. package/src/ui/components/TextField/helpers.tsx +2 -2
  278. package/src/ui/components/TextField/types.tsx +1 -1
  279. package/src/ui/context/OxyContext.tsx +831 -463
  280. package/src/ui/context/hooks/useAuthOperations.ts +620 -0
  281. package/src/ui/context/hooks/useDeviceManagement.ts +108 -0
  282. package/src/ui/context/hooks/useStorage.ts +104 -0
  283. package/src/ui/hooks/index.ts +1 -2
  284. package/src/ui/hooks/mutations/index.ts +0 -2
  285. package/src/ui/hooks/mutations/useAccountMutations.ts +20 -66
  286. package/src/ui/hooks/queries/index.ts +0 -2
  287. package/src/ui/hooks/queries/queryKeys.ts +0 -2
  288. package/src/ui/hooks/queries/useAccountQueries.ts +19 -53
  289. package/src/ui/hooks/queries/useServicesQueries.ts +5 -5
  290. package/src/ui/hooks/useDeviceManagement.ts +108 -0
  291. package/src/ui/hooks/useProfileEditing.ts +3 -3
  292. package/src/ui/hooks/useSessionManagement.ts +405 -0
  293. package/src/ui/index.ts +1 -2
  294. package/src/ui/navigation/routes.ts +2 -6
  295. package/src/ui/screens/AccountCenterScreen.tsx +4 -9
  296. package/src/ui/screens/AccountSettingsScreen.tsx +31 -49
  297. package/src/ui/screens/AccountSwitcherScreen.tsx +5 -5
  298. package/src/ui/screens/OxyAuthScreen.tsx +19 -4
  299. package/src/ui/screens/PrivacySettingsScreen.tsx +101 -67
  300. package/src/ui/screens/ProfileScreen.tsx +10 -10
  301. package/src/ui/stores/authStore.ts +8 -48
  302. package/src/ui/styles/spacing.ts +2 -15
  303. package/src/ui/utils/avatarUtils.ts +21 -19
  304. package/src/ui/utils/sessionHelpers.ts +0 -7
  305. package/src/utils/__tests__/validationUtils.test.ts +1 -16
  306. package/src/utils/deviceManager.ts +198 -0
  307. package/src/utils/errorUtils.ts +1 -8
  308. package/src/utils/index.ts +2 -1
  309. package/src/utils/sessionUtils.ts +0 -8
  310. package/src/utils/validationUtils.ts +0 -12
  311. package/lib/commonjs/adapters/expo/crypto.js +0 -56
  312. package/lib/commonjs/adapters/expo/crypto.js.map +0 -1
  313. package/lib/commonjs/adapters/expo/fetch.js +0 -30
  314. package/lib/commonjs/adapters/expo/fetch.js.map +0 -1
  315. package/lib/commonjs/adapters/expo/index.js +0 -48
  316. package/lib/commonjs/adapters/expo/index.js.map +0 -1
  317. package/lib/commonjs/adapters/expo/storage.js +0 -201
  318. package/lib/commonjs/adapters/expo/storage.js.map +0 -1
  319. package/lib/commonjs/adapters/index.js +0 -48
  320. package/lib/commonjs/adapters/index.js.map +0 -1
  321. package/lib/commonjs/adapters/node/crypto.js +0 -40
  322. package/lib/commonjs/adapters/node/crypto.js.map +0 -1
  323. package/lib/commonjs/adapters/node/fetch.js +0 -62
  324. package/lib/commonjs/adapters/node/fetch.js.map +0 -1
  325. package/lib/commonjs/adapters/node/index.js +0 -34
  326. package/lib/commonjs/adapters/node/index.js.map +0 -1
  327. package/lib/commonjs/adapters/node/storage.js +0 -163
  328. package/lib/commonjs/adapters/node/storage.js.map +0 -1
  329. package/lib/commonjs/core/identity-session/DeviceManager.js +0 -237
  330. package/lib/commonjs/core/identity-session/DeviceManager.js.map +0 -1
  331. package/lib/commonjs/core/identity-session/INTEGRATION_GUIDE.md +0 -287
  332. package/lib/commonjs/core/identity-session/IdentityManager.js +0 -400
  333. package/lib/commonjs/core/identity-session/IdentityManager.js.map +0 -1
  334. package/lib/commonjs/core/identity-session/IdentitySessionCore.js +0 -394
  335. package/lib/commonjs/core/identity-session/IdentitySessionCore.js.map +0 -1
  336. package/lib/commonjs/core/identity-session/RefreshManager.js +0 -137
  337. package/lib/commonjs/core/identity-session/RefreshManager.js.map +0 -1
  338. package/lib/commonjs/core/identity-session/SessionManager.js +0 -427
  339. package/lib/commonjs/core/identity-session/SessionManager.js.map +0 -1
  340. package/lib/commonjs/core/identity-session/createIdentitySessionCore.js +0 -24
  341. package/lib/commonjs/core/identity-session/createIdentitySessionCore.js.map +0 -1
  342. package/lib/commonjs/core/identity-session/errors.js +0 -176
  343. package/lib/commonjs/core/identity-session/errors.js.map +0 -1
  344. package/lib/commonjs/core/identity-session/index.js +0 -80
  345. package/lib/commonjs/core/identity-session/index.js.map +0 -1
  346. package/lib/commonjs/core/identity-session/types.js +0 -2
  347. package/lib/commonjs/core/identity-session/types.js.map +0 -1
  348. package/lib/commonjs/crypto/README.md +0 -142
  349. package/lib/commonjs/crypto/core.js +0 -147
  350. package/lib/commonjs/crypto/core.js.map +0 -1
  351. package/lib/commonjs/node/signatureService.js +0 -107
  352. package/lib/commonjs/node/signatureService.js.map +0 -1
  353. package/lib/commonjs/ui/hooks/auth/index.js +0 -37
  354. package/lib/commonjs/ui/hooks/auth/index.js.map +0 -1
  355. package/lib/commonjs/ui/hooks/auth/useUsernameValidation.js +0 -171
  356. package/lib/commonjs/ui/hooks/auth/useUsernameValidation.js.map +0 -1
  357. package/lib/commonjs/ui/hooks/useAvatarPicker.js +0 -52
  358. package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +0 -1
  359. package/lib/commonjs/ui/hooks/useIdentityTransfer.js +0 -125
  360. package/lib/commonjs/ui/hooks/useIdentityTransfer.js.map +0 -1
  361. package/lib/commonjs/ui/hooks/useTransferCodesPersistence.js +0 -81
  362. package/lib/commonjs/ui/hooks/useTransferCodesPersistence.js.map +0 -1
  363. package/lib/commonjs/ui/hooks/useTransferQueries.js +0 -85
  364. package/lib/commonjs/ui/hooks/useTransferQueries.js.map +0 -1
  365. package/lib/commonjs/ui/stores/transferStore.js +0 -157
  366. package/lib/commonjs/ui/stores/transferStore.js.map +0 -1
  367. package/lib/module/adapters/expo/crypto.js +0 -51
  368. package/lib/module/adapters/expo/crypto.js.map +0 -1
  369. package/lib/module/adapters/expo/fetch.js +0 -26
  370. package/lib/module/adapters/expo/fetch.js.map +0 -1
  371. package/lib/module/adapters/expo/index.js +0 -45
  372. package/lib/module/adapters/expo/index.js.map +0 -1
  373. package/lib/module/adapters/expo/storage.js +0 -198
  374. package/lib/module/adapters/expo/storage.js.map +0 -1
  375. package/lib/module/adapters/index.js +0 -45
  376. package/lib/module/adapters/index.js.map +0 -1
  377. package/lib/module/adapters/node/crypto.js +0 -36
  378. package/lib/module/adapters/node/crypto.js.map +0 -1
  379. package/lib/module/adapters/node/fetch.js +0 -57
  380. package/lib/module/adapters/node/fetch.js.map +0 -1
  381. package/lib/module/adapters/node/index.js +0 -31
  382. package/lib/module/adapters/node/index.js.map +0 -1
  383. package/lib/module/adapters/node/storage.js +0 -159
  384. package/lib/module/adapters/node/storage.js.map +0 -1
  385. package/lib/module/core/identity-session/DeviceManager.js +0 -232
  386. package/lib/module/core/identity-session/DeviceManager.js.map +0 -1
  387. package/lib/module/core/identity-session/INTEGRATION_GUIDE.md +0 -287
  388. package/lib/module/core/identity-session/IdentityManager.js +0 -395
  389. package/lib/module/core/identity-session/IdentityManager.js.map +0 -1
  390. package/lib/module/core/identity-session/IdentitySessionCore.js +0 -390
  391. package/lib/module/core/identity-session/IdentitySessionCore.js.map +0 -1
  392. package/lib/module/core/identity-session/RefreshManager.js +0 -132
  393. package/lib/module/core/identity-session/RefreshManager.js.map +0 -1
  394. package/lib/module/core/identity-session/SessionManager.js +0 -422
  395. package/lib/module/core/identity-session/SessionManager.js.map +0 -1
  396. package/lib/module/core/identity-session/createIdentitySessionCore.js +0 -21
  397. package/lib/module/core/identity-session/createIdentitySessionCore.js.map +0 -1
  398. package/lib/module/core/identity-session/errors.js +0 -170
  399. package/lib/module/core/identity-session/errors.js.map +0 -1
  400. package/lib/module/core/identity-session/index.js +0 -17
  401. package/lib/module/core/identity-session/index.js.map +0 -1
  402. package/lib/module/core/identity-session/types.js +0 -2
  403. package/lib/module/core/identity-session/types.js.map +0 -1
  404. package/lib/module/crypto/README.md +0 -142
  405. package/lib/module/crypto/core.js +0 -133
  406. package/lib/module/crypto/core.js.map +0 -1
  407. package/lib/module/node/signatureService.js +0 -101
  408. package/lib/module/node/signatureService.js.map +0 -1
  409. package/lib/module/ui/hooks/auth/index.js +0 -7
  410. package/lib/module/ui/hooks/auth/index.js.map +0 -1
  411. package/lib/module/ui/hooks/auth/useUsernameValidation.js +0 -167
  412. package/lib/module/ui/hooks/auth/useUsernameValidation.js.map +0 -1
  413. package/lib/module/ui/hooks/useAvatarPicker.js +0 -48
  414. package/lib/module/ui/hooks/useAvatarPicker.js.map +0 -1
  415. package/lib/module/ui/hooks/useIdentityTransfer.js +0 -121
  416. package/lib/module/ui/hooks/useIdentityTransfer.js.map +0 -1
  417. package/lib/module/ui/hooks/useTransferCodesPersistence.js +0 -77
  418. package/lib/module/ui/hooks/useTransferCodesPersistence.js.map +0 -1
  419. package/lib/module/ui/hooks/useTransferQueries.js +0 -80
  420. package/lib/module/ui/hooks/useTransferQueries.js.map +0 -1
  421. package/lib/module/ui/stores/transferStore.js +0 -152
  422. package/lib/module/ui/stores/transferStore.js.map +0 -1
  423. package/lib/typescript/adapters/expo/crypto.d.ts +0 -17
  424. package/lib/typescript/adapters/expo/crypto.d.ts.map +0 -1
  425. package/lib/typescript/adapters/expo/fetch.d.ts +0 -16
  426. package/lib/typescript/adapters/expo/fetch.d.ts.map +0 -1
  427. package/lib/typescript/adapters/expo/index.d.ts +0 -23
  428. package/lib/typescript/adapters/expo/index.d.ts.map +0 -1
  429. package/lib/typescript/adapters/expo/storage.d.ts +0 -23
  430. package/lib/typescript/adapters/expo/storage.d.ts.map +0 -1
  431. package/lib/typescript/adapters/index.d.ts +0 -17
  432. package/lib/typescript/adapters/index.d.ts.map +0 -1
  433. package/lib/typescript/adapters/node/crypto.d.ts +0 -17
  434. package/lib/typescript/adapters/node/crypto.d.ts.map +0 -1
  435. package/lib/typescript/adapters/node/fetch.d.ts +0 -16
  436. package/lib/typescript/adapters/node/fetch.d.ts.map +0 -1
  437. package/lib/typescript/adapters/node/index.d.ts +0 -23
  438. package/lib/typescript/adapters/node/index.d.ts.map +0 -1
  439. package/lib/typescript/adapters/node/storage.d.ts +0 -23
  440. package/lib/typescript/adapters/node/storage.d.ts.map +0 -1
  441. package/lib/typescript/core/identity-session/DeviceManager.d.ts +0 -64
  442. package/lib/typescript/core/identity-session/DeviceManager.d.ts.map +0 -1
  443. package/lib/typescript/core/identity-session/IdentityManager.d.ts +0 -88
  444. package/lib/typescript/core/identity-session/IdentityManager.d.ts.map +0 -1
  445. package/lib/typescript/core/identity-session/IdentitySessionCore.d.ts +0 -141
  446. package/lib/typescript/core/identity-session/IdentitySessionCore.d.ts.map +0 -1
  447. package/lib/typescript/core/identity-session/RefreshManager.d.ts +0 -36
  448. package/lib/typescript/core/identity-session/RefreshManager.d.ts.map +0 -1
  449. package/lib/typescript/core/identity-session/SessionManager.d.ts +0 -104
  450. package/lib/typescript/core/identity-session/SessionManager.d.ts.map +0 -1
  451. package/lib/typescript/core/identity-session/createIdentitySessionCore.d.ts +0 -11
  452. package/lib/typescript/core/identity-session/createIdentitySessionCore.d.ts.map +0 -1
  453. package/lib/typescript/core/identity-session/errors.d.ts +0 -63
  454. package/lib/typescript/core/identity-session/errors.d.ts.map +0 -1
  455. package/lib/typescript/core/identity-session/index.d.ts +0 -14
  456. package/lib/typescript/core/identity-session/index.d.ts.map +0 -1
  457. package/lib/typescript/core/identity-session/types.d.ts +0 -196
  458. package/lib/typescript/core/identity-session/types.d.ts.map +0 -1
  459. package/lib/typescript/crypto/core.d.ts +0 -56
  460. package/lib/typescript/crypto/core.d.ts.map +0 -1
  461. package/lib/typescript/node/signatureService.d.ts +0 -55
  462. package/lib/typescript/node/signatureService.d.ts.map +0 -1
  463. package/lib/typescript/ui/hooks/auth/index.d.ts +0 -6
  464. package/lib/typescript/ui/hooks/auth/index.d.ts.map +0 -1
  465. package/lib/typescript/ui/hooks/auth/useUsernameValidation.d.ts +0 -32
  466. package/lib/typescript/ui/hooks/auth/useUsernameValidation.d.ts.map +0 -1
  467. package/lib/typescript/ui/hooks/useAvatarPicker.d.ts +0 -18
  468. package/lib/typescript/ui/hooks/useAvatarPicker.d.ts.map +0 -1
  469. package/lib/typescript/ui/hooks/useIdentityTransfer.d.ts +0 -24
  470. package/lib/typescript/ui/hooks/useIdentityTransfer.d.ts.map +0 -1
  471. package/lib/typescript/ui/hooks/useTransferCodesPersistence.d.ts +0 -6
  472. package/lib/typescript/ui/hooks/useTransferCodesPersistence.d.ts.map +0 -1
  473. package/lib/typescript/ui/hooks/useTransferQueries.d.ts +0 -26
  474. package/lib/typescript/ui/hooks/useTransferQueries.d.ts.map +0 -1
  475. package/lib/typescript/ui/stores/transferStore.d.ts +0 -36
  476. package/lib/typescript/ui/stores/transferStore.d.ts.map +0 -1
  477. package/src/adapters/expo/crypto.ts +0 -55
  478. package/src/adapters/expo/fetch.ts +0 -28
  479. package/src/adapters/expo/index.ts +0 -51
  480. package/src/adapters/expo/storage.ts +0 -228
  481. package/src/adapters/index.ts +0 -48
  482. package/src/adapters/node/crypto.ts +0 -39
  483. package/src/adapters/node/fetch.ts +0 -59
  484. package/src/adapters/node/index.ts +0 -37
  485. package/src/adapters/node/storage.ts +0 -170
  486. package/src/core/identity-session/DeviceManager.ts +0 -273
  487. package/src/core/identity-session/INTEGRATION_GUIDE.md +0 -287
  488. package/src/core/identity-session/IdentityManager.ts +0 -474
  489. package/src/core/identity-session/IdentitySessionCore.ts +0 -464
  490. package/src/core/identity-session/RefreshManager.ts +0 -189
  491. package/src/core/identity-session/SessionManager.ts +0 -500
  492. package/src/core/identity-session/createIdentitySessionCore.ts +0 -19
  493. package/src/core/identity-session/errors.ts +0 -197
  494. package/src/core/identity-session/index.ts +0 -15
  495. package/src/core/identity-session/types.ts +0 -188
  496. package/src/crypto/README.md +0 -142
  497. package/src/crypto/__tests__/core.test.ts +0 -203
  498. package/src/crypto/core.ts +0 -142
  499. package/src/node/signatureService.ts +0 -126
  500. package/src/ui/hooks/auth/index.ts +0 -9
  501. package/src/ui/hooks/auth/useUsernameValidation.ts +0 -177
  502. package/src/ui/hooks/useAvatarPicker.ts +0 -62
  503. package/src/ui/hooks/useIdentityTransfer.ts +0 -135
  504. package/src/ui/hooks/useTransferCodesPersistence.ts +0 -80
  505. package/src/ui/hooks/useTransferQueries.ts +0 -102
  506. package/src/ui/stores/transferStore.ts +0 -201
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useUsersBySessions = exports.useUserProfiles = exports.useUserProfile = exports.useUserByUsername = exports.useUserById = exports.useRestrictedUsers = exports.usePrivacySettings = exports.useCurrentUser = exports.useBlockedUsers = void 0;
6
+ exports.useUsersBySessions = exports.useUserProfiles = exports.useUserProfile = exports.useUserByUsername = exports.useUserById = exports.usePrivacySettings = exports.useCurrentUser = void 0;
7
7
  var _reactQuery = require("@tanstack/react-query");
8
8
  var _queryKeys = require("./queryKeys");
9
9
  var _OxyContext = require("../../context/OxyContext");
@@ -23,9 +23,9 @@ const useUserProfile = (sessionId, options) => {
23
23
  return await oxyServices.getUserBySession(sessionId);
24
24
  },
25
25
  enabled: options?.enabled !== false && !!sessionId,
26
- staleTime: 5 * 60 * 1000,
27
- // 5 minutes
28
- gcTime: 30 * 60 * 1000 // 30 minutes
26
+ staleTime: 0,
27
+ // Always fetch fresh - Services never caches profile
28
+ gcTime: 0 // No garbage collection time - always fetch fresh
29
29
  });
30
30
  };
31
31
 
@@ -45,8 +45,9 @@ const useUserProfiles = (sessionIds, options) => {
45
45
  return results[0]?.user || null;
46
46
  },
47
47
  enabled: options?.enabled !== false && !!sessionId,
48
- staleTime: 5 * 60 * 1000,
49
- gcTime: 30 * 60 * 1000
48
+ staleTime: 0,
49
+ // Always fetch fresh - Services never caches profile
50
+ gcTime: 0 // No garbage collection time - always fetch fresh
50
51
  }))
51
52
  });
52
53
  };
@@ -70,9 +71,9 @@ const useCurrentUser = options => {
70
71
  return await oxyServices.getUserBySession(activeSessionId);
71
72
  },
72
73
  enabled: options?.enabled !== false && isAuthenticated && !!activeSessionId,
73
- staleTime: 1 * 60 * 1000,
74
- // 1 minute for current user
75
- gcTime: 30 * 60 * 1000
74
+ staleTime: 0,
75
+ // Always fetch fresh - Services never caches profile
76
+ gcTime: 0 // No garbage collection time - always fetch fresh
76
77
  });
77
78
  };
78
79
 
@@ -93,8 +94,9 @@ const useUserById = (userId, options) => {
93
94
  return await oxyServices.getUserById(userId);
94
95
  },
95
96
  enabled: options?.enabled !== false && !!userId,
96
- staleTime: 5 * 60 * 1000,
97
- gcTime: 30 * 60 * 1000
97
+ staleTime: 0,
98
+ // Always fetch fresh - Services never caches profile
99
+ gcTime: 0 // No garbage collection time - always fetch fresh
98
100
  });
99
101
  };
100
102
 
@@ -115,8 +117,9 @@ const useUserByUsername = (username, options) => {
115
117
  return await oxyServices.getProfileByUsername(username);
116
118
  },
117
119
  enabled: options?.enabled !== false && !!username,
118
- staleTime: 5 * 60 * 1000,
119
- gcTime: 30 * 60 * 1000
120
+ staleTime: 0,
121
+ // Always fetch fresh - Services never caches profile
122
+ gcTime: 0 // No garbage collection time - always fetch fresh
120
123
  });
121
124
  };
122
125
 
@@ -137,8 +140,9 @@ const useUsersBySessions = (sessionIds, options) => {
137
140
  return await oxyServices.getUsersBySessions(sessionIds);
138
141
  },
139
142
  enabled: options?.enabled !== false && sessionIds.length > 0,
140
- staleTime: 5 * 60 * 1000,
141
- gcTime: 30 * 60 * 1000
143
+ staleTime: 0,
144
+ // Always fetch fresh - Services never caches profile
145
+ gcTime: 0 // No garbage collection time - always fetch fresh
142
146
  });
143
147
  };
144
148
 
@@ -150,11 +154,13 @@ const usePrivacySettings = (userId, options) => {
150
154
  const {
151
155
  oxyServices,
152
156
  activeSessionId,
153
- syncIdentity
157
+ syncIdentity,
158
+ sessions
154
159
  } = (0, _OxyContext.useOxy)();
155
160
  // Use getCurrentUserId() which returns MongoDB ObjectId from JWT token
156
161
  // Never use user?.id as it may be set to publicKey
157
162
  const targetUserId = userId || oxyServices.getCurrentUserId() || undefined;
163
+ const deviceId = activeSessionId ? sessions.find(s => s.sessionId === activeSessionId)?.deviceId : undefined;
158
164
  return (0, _reactQuery.useQuery)({
159
165
  queryKey: _queryKeys.queryKeys.privacy.settings(targetUserId),
160
166
  queryFn: async () => {
@@ -166,7 +172,7 @@ const usePrivacySettings = (userId, options) => {
166
172
  if (!oxyServices.hasValidToken() && activeSessionId) {
167
173
  try {
168
174
  // Try to get token for the session
169
- await oxyServices.getTokenBySession(activeSessionId);
175
+ await oxyServices.getTokenBySession(activeSessionId, deviceId);
170
176
  } catch (tokenError) {
171
177
  // If getting token fails, might be an offline session - try syncing
172
178
  const errorMessage = tokenError instanceof Error ? tokenError.message : String(tokenError);
@@ -174,7 +180,7 @@ const usePrivacySettings = (userId, options) => {
174
180
  try {
175
181
  await syncIdentity();
176
182
  // Retry getting token after sync
177
- await oxyServices.getTokenBySession(activeSessionId);
183
+ await oxyServices.getTokenBySession(activeSessionId, deviceId);
178
184
  } catch (syncError) {
179
185
  throw new Error('Session needs to be synced. Please try again.');
180
186
  }
@@ -195,7 +201,7 @@ const usePrivacySettings = (userId, options) => {
195
201
  if (activeSessionId) {
196
202
  try {
197
203
  await syncIdentity();
198
- await oxyServices.getTokenBySession(activeSessionId);
204
+ await oxyServices.getTokenBySession(activeSessionId, deviceId);
199
205
  // Retry the request after getting token
200
206
  return await oxyServices.getPrivacySettings(targetUserId);
201
207
  } catch (retryError) {
@@ -211,52 +217,10 @@ const usePrivacySettings = (userId, options) => {
211
217
  }
212
218
  },
213
219
  enabled: options?.enabled !== false && !!targetUserId,
214
- staleTime: 2 * 60 * 1000,
215
- // 2 minutes
216
- gcTime: 10 * 60 * 1000 // 10 minutes
220
+ staleTime: 0,
221
+ // Always fetch fresh - Services never caches profile
222
+ gcTime: 0 // No garbage collection time - always fetch fresh
217
223
  });
218
224
  };
219
-
220
- /**
221
- * Get blocked users
222
- */
223
225
  exports.usePrivacySettings = usePrivacySettings;
224
- const useBlockedUsers = options => {
225
- const {
226
- oxyServices,
227
- isAuthenticated
228
- } = (0, _OxyContext.useOxy)();
229
- return (0, _reactQuery.useQuery)({
230
- queryKey: _queryKeys.queryKeys.privacy.blocked(),
231
- queryFn: async () => {
232
- return await oxyServices.getBlockedUsers();
233
- },
234
- enabled: options?.enabled !== false && isAuthenticated,
235
- staleTime: 1 * 60 * 1000,
236
- // 1 minute
237
- gcTime: 5 * 60 * 1000 // 5 minutes
238
- });
239
- };
240
-
241
- /**
242
- * Get restricted users
243
- */
244
- exports.useBlockedUsers = useBlockedUsers;
245
- const useRestrictedUsers = options => {
246
- const {
247
- oxyServices,
248
- isAuthenticated
249
- } = (0, _OxyContext.useOxy)();
250
- return (0, _reactQuery.useQuery)({
251
- queryKey: _queryKeys.queryKeys.privacy.restricted(),
252
- queryFn: async () => {
253
- return await oxyServices.getRestrictedUsers();
254
- },
255
- enabled: options?.enabled !== false && isAuthenticated,
256
- staleTime: 1 * 60 * 1000,
257
- // 1 minute
258
- gcTime: 5 * 60 * 1000 // 5 minutes
259
- });
260
- };
261
- exports.useRestrictedUsers = useRestrictedUsers;
262
226
  //# sourceMappingURL=useAccountQueries.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_reactQuery","require","_queryKeys","_OxyContext","useUserProfile","sessionId","options","oxyServices","useOxy","useQuery","queryKey","queryKeys","users","profile","queryFn","Error","getUserBySession","enabled","staleTime","gcTime","exports","useUserProfiles","sessionIds","useQueries","queries","map","results","getUsersBySessions","user","useCurrentUser","activeSessionId","isAuthenticated","accounts","current","useUserById","userId","detail","getUserById","useUserByUsername","username","details","getProfileByUsername","useUsersBySessions","list","length","usePrivacySettings","syncIdentity","targetUserId","getCurrentUserId","undefined","privacy","settings","hasValidToken","getTokenBySession","tokenError","errorMessage","message","String","includes","syncError","getPrivacySettings","error","status","response","retryError","useBlockedUsers","blocked","getBlockedUsers","useRestrictedUsers","restricted","getRestrictedUsers"],"sourceRoot":"../../../../../src","sources":["ui/hooks/queries/useAccountQueries.ts"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAGA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACO,MAAMG,cAAc,GAAGA,CAACC,SAAwB,EAAEC,OAA+B,KAAK;EAC3F,MAAM;IAAEC;EAAY,CAAC,GAAG,IAAAC,kBAAM,EAAC,CAAC;EAEhC,OAAO,IAAAC,oBAAQ,EAAC;IACdC,QAAQ,EAAEC,oBAAS,CAACC,KAAK,CAACC,OAAO,CAACR,SAAS,IAAI,EAAE,CAAC;IAClDS,OAAO,EAAE,MAAAA,CAAA,KAAY;MACnB,IAAI,CAACT,SAAS,EAAE;QACd,MAAM,IAAIU,KAAK,CAAC,wBAAwB,CAAC;MAC3C;MACA,OAAO,MAAMR,WAAW,CAACS,gBAAgB,CAACX,SAAS,CAAC;IACt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,WAAW;IAAEwB;EAAgB,CAAC,GAAG,IAAAvB,kBAAM,EAAC,CAAC;EAEjD,OAAO,IAAAC,oBAAQ,EAAC;IACdC,QAAQ,EAAEC,oBAAS,CAACuC,OAAO,CAACgB,OAAO,CAAC,CAAC;IACrCpD,OAAO,EAAE,MAAAA,CAAA,KAAY;MACnB,OAAO,MAAMP,WAAW,CAAC4D,eAAe,CAAC,CAAC;IAC5C,CAAC;IACDlD,OAAO,EAAGX,OAAO,EAAEW,OAAO,KAAK,KAAK,IAAKc,eAAe;IACxDb,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;IAAE;IAC1BC,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,CAAE;EACzB,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AAFAC,OAAA,CAAA6C,eAAA,GAAAA,eAAA;AAGO,MAAMG,kBAAkB,GAAI9D,OAA+B,IAAK;EACrE,MAAM;IAAEC,WAAW;IAAEwB;EAAgB,CAAC,GAAG,IAAAvB,kBAAM,EAAC,CAAC;EAEjD,OAAO,IAAAC,oBAAQ,EAAC;IACdC,QAAQ,EAAEC,oBAAS,CAACuC,OAAO,CAACmB,UAAU,CAAC,CAAC;IACxCvD,OAAO,EAAE,MAAAA,CAAA,KAAY;MACnB,OAAO,MAAMP,WAAW,CAAC+D,kBAAkB,CAAC,CAAC;IAC/C,CAAC;IACDrD,OAAO,EAAGX,OAAO,EAAEW,OAAO,KAAK,KAAK,IAAKc,eAAe;IACxDb,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;IAAE;IAC1BC,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,CAAE;EACzB,CAAC,CAAC;AACJ,CAAC;AAACC,OAAA,CAAAgD,kBAAA,GAAAA,kBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_reactQuery","require","_queryKeys","_OxyContext","useUserProfile","sessionId","options","oxyServices","useOxy","useQuery","queryKey","queryKeys","users","profile","queryFn","Error","getUserBySession","enabled","staleTime","gcTime","exports","useUserProfiles","sessionIds","useQueries","queries","map","results","getUsersBySessions","user","useCurrentUser","activeSessionId","isAuthenticated","accounts","current","useUserById","userId","detail","getUserById","useUserByUsername","username","details","getProfileByUsername","useUsersBySessions","list","length","usePrivacySettings","syncIdentity","sessions","targetUserId","getCurrentUserId","undefined","deviceId","find","s","privacy","settings","hasValidToken","getTokenBySession","tokenError","errorMessage","message","String","includes","syncError","getPrivacySettings","error","status","response","retryError"],"sourceRoot":"../../../../../src","sources":["ui/hooks/queries/useAccountQueries.ts"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAGA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACO,MAAMG,cAAc,GAAGA,CAACC,SAAwB,EAAEC,OAA+B,KAAK;EAC3F,MAAM;IAAEC;EAAY,CAAC,GAAG,IAAAC,kBAAM,EAAC,CAAC;EAEhC,OAAO,IAAAC,oBAAQ,EAAC;IACdC,QAAQ,EAAEC,oBAAS,CAACC,KAAK,CAACC,OAAO,CAACR,SAAS,IAAI,EAAE,CAAC;IAClDS,OAAO,EAAE,MAAAA,CAAA,KAAY;MACnB,IAAI,CAACT,SAAS,EAAE;QACd,MAAM,IAAIU,KAAK,CAAC,wBAAwB,CAAC;MAC3C;MACA,OAAO,MAAMR,WAAW,CAACS,gBAAgB,CAACX,SAAS,CAAC;IACtD,CAAC;IACDY,OAAO,EAAGX,OAAO,EAAEW,OAAO,KAAK,KAAK,IAAK,CAAC,CAACZ,SAAS;IACpDa,SAAS,EAAE,CAAC;IAAE;IACdC,MAAM,EAAE,CAAC,CAAE;EACb,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AAFAC,OAAA,CAAAhB,cAAA,GAAAA,cAAA;AAGO,MAAMiB,eAAe,GAAGA,CAACC,UAAoB,EAAEhB,OAA+B,KAAK;EACxF,MAAM;IAAEC;EAAY,CAAC,GAAG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QACA,IAAIA,MAAM,KAAK,GAAG,IAAIP,YAAY,CAACG,QAAQ,CAAC,yBAAyB,CAAC,IAAIH,YAAY,CAACG,QAAQ,CAAC,yCAAyC,CAAC,EAAE;UAC1I;UACA,IAAIhC,eAAe,EAAE;YACnB,IAAI;cACF,MAAMgB,YAAY,CAAC,CAAC;cACpB,MAAMvC,WAAW,CAACkD,iBAAiB,CAAC3B,eAAe,EAAEqB,QAAQ,CAAC;cAC9D;cACA,OAAO,MAAM5C,WAAW,CAACyD,kBAAkB,CAAChB,YAAY,CAAC;YAC3D,CAAC,CAAC,OAAOoB,UAAU,EAAE;cACnB,MAAM,IAAIrD,KAAK,CAAC,8CAA8C,CAAC;YACjE;UACF,CAAC,MAAM;YACL,MAAM,IAAIA,KAAK,CAAC,oCAAoC,CAAC;UACvD;QACF;;QAEA;QACA,MAAMkD,KAAK;MACb;IACF,CAAC;IACDhD,OAAO,EAAGX,OAAO,EAAEW,OAAO,KAAK,KAAK,IAAK,CAAC,CAAC+B,YAAY;IACvD9B,SAAS,EAAE,CAAC;IAAE;IACdC,MAAM,EAAE,CAAC,CAAE;EACb,CAAC,CAAC;AACJ,CAAC;AAACC,OAAA,CAAAyB,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -104,8 +104,10 @@ const useUserDevices = options => {
104
104
  oxyServices,
105
105
  isAuthenticated,
106
106
  activeSessionId,
107
- syncIdentity
107
+ syncIdentity,
108
+ sessions
108
109
  } = (0, _OxyContext.useOxy)();
110
+ const deviceId = activeSessionId ? sessions.find(s => s.sessionId === activeSessionId)?.deviceId : undefined;
109
111
  return (0, _reactQuery.useQuery)({
110
112
  queryKey: _queryKeys.queryKeys.devices.list(),
111
113
  queryFn: async () => {
@@ -113,7 +115,7 @@ const useUserDevices = options => {
113
115
  if (!oxyServices.hasValidToken() && activeSessionId) {
114
116
  try {
115
117
  // Try to get token for the session
116
- await oxyServices.getTokenBySession(activeSessionId);
118
+ await oxyServices.getTokenBySession(activeSessionId, deviceId);
117
119
  } catch (tokenError) {
118
120
  // If getting token fails, might be an offline session - try syncing
119
121
  const errorMessage = tokenError instanceof Error ? tokenError.message : String(tokenError);
@@ -121,7 +123,7 @@ const useUserDevices = options => {
121
123
  try {
122
124
  await syncIdentity();
123
125
  // Retry getting token after sync
124
- await oxyServices.getTokenBySession(activeSessionId);
126
+ await oxyServices.getTokenBySession(activeSessionId, deviceId);
125
127
  } catch (syncError) {
126
128
  throw new Error('Session needs to be synced. Please try again.');
127
129
  }
@@ -142,7 +144,7 @@ const useUserDevices = options => {
142
144
  if (activeSessionId) {
143
145
  try {
144
146
  await syncIdentity();
145
- await oxyServices.getTokenBySession(activeSessionId);
147
+ await oxyServices.getTokenBySession(activeSessionId, deviceId);
146
148
  // Retry the request after getting token
147
149
  return await oxyServices.getUserDevices();
148
150
  } catch (retryError) {
@@ -1 +1 @@
1
- {"version":3,"names":["_reactQuery","require","_queryKeys","_OxyContext","_sessionHelpers","useSessions","userId","options","oxyServices","activeSessionId","useOxy","useQuery","queryKey","queryKeys","sessions","list","queryFn","Error","fetchSessionsWithFallback","fallbackDeviceId","undefined","fallbackUserId","mapSessionsToClient","enabled","staleTime","gcTime","exports","useSession","sessionId","detail","validation","validateSession","useHeaderValidation","valid","user","now","Date","deviceId","expiresAt","getTime","toISOString","lastActive","lastActivity","id","toString","isCurrent","useDeviceSessions","active","getDeviceSessions","useUserDevices","isAuthenticated","syncIdentity","devices","hasValidToken","getTokenBySession","tokenError","errorMessage","message","String","includes","syncError","getUserDevices","error","status","response","retryError","useSecurityInfo","all","getSecurityInfo"],"sourceRoot":"../../../../../src","sources":["ui/hooks/queries/useServicesQueries.ts"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AAEA;AACA;AACA;AACO,MAAMI,WAAW,GAAGA,CAACC,MAAe,EAAEC,OAA+B,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C,CAAC;EAEjD,OAAO,IAAAC,oBAAQ,EAAC;IACdC,QAAQ,EAAE,CAAC,GAAGC,oBAAS,CAACuC,OAAO,CAACe,GAAG,EAAE,UAAU,CAAC;IAChDnD,OAAO,EAAE,MAAAA,CAAA,KAAY;MACnB,OAAO,MAAMR,WAAW,CAAC4D,eAAe,CAAC,CAAC;IAC5C,CAAC;IACD7C,OAAO,EAAGhB,OAAO,EAAEgB,OAAO,KAAK,KAAK,IAAK2B,eAAe;IACxD1B,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;IACxBC,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG;EACpB,CAAC,CAAC;AACJ,CAAC;AAACC,OAAA,CAAAwC,eAAA,GAAAA,eAAA","ignoreList":[]}
1
+ {"version":3,"names":["_reactQuery","require","_queryKeys","_OxyContext","_sessionHelpers","useSessions","userId","options","oxyServices","activeSessionId","useOxy","useQuery","queryKey","queryKeys","sessions","list","queryFn","Error","fetchSessionsWithFallback","fallbackDeviceId","undefined","fallbackUserId","mapSessionsToClient","enabled","staleTime","gcTime","exports","useSession","sessionId","detail","validation","validateSession","useHeaderValidation","valid","user","now","Date","deviceId","expiresAt","getTime","toISOString","lastActive","lastActivity","id","toString","isCurrent","useDeviceSessions","active","getDeviceSessions","useUserDevices","isAuthenticated","syncIdentity","find","s","devices","hasValidToken","getTokenBySession","tokenError","errorMessage","message","String","includes","syncError","getUserDevices","error","status","response","retryError","useSecurityInfo","all","getSecurityInfo"],"sourceRoot":"../../../../../src","sources":["ui/hooks/queries/useServicesQueries.ts"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AAEA;AACA;AACA;AACO,MAAMI,WAAW,GAAGA,CAACC,MAAe,EAAEC,OAA+B,KAAK;EAC/E,MAAM;IAAEC,WAAW;IAAEC;EAAgB,CAAC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A;AACA;AAFAC,OAAA,CAAAuB,cAAA,GAAAA,cAAA;AAGO,MAAMmB,eAAe,GAAI7D,OAA+B,IAAK;EAClE,MAAM;IAAEC,WAAW;IAAE0C;EAAgB,CAAC,GAAG,IAAAxC,kBAAM,EAAC,CAAC;EAEjD,OAAO,IAAAC,oBAAQ,EAAC;IACdC,QAAQ,EAAE,CAAC,GAAGC,oBAAS,CAACyC,OAAO,CAACe,GAAG,EAAE,UAAU,CAAC;IAChDrD,OAAO,EAAE,MAAAA,CAAA,KAAY;MACnB,OAAO,MAAMR,WAAW,CAAC8D,eAAe,CAAC,CAAC;IAC5C,CAAC;IACD/C,OAAO,EAAGhB,OAAO,EAAEgB,OAAO,KAAK,KAAK,IAAK2B,eAAe;IACxD1B,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;IACxBC,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG;EACpB,CAAC,CAAC;AACJ,CAAC;AAACC,OAAA,CAAA0C,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useDeviceManagement = void 0;
7
+ var _react = require("react");
8
+ var _deviceManager = require("../../utils/deviceManager");
9
+ var _errorHandlers = require("../utils/errorHandlers");
10
+ /**
11
+ * Provide device session management helpers tied to the current active session.
12
+ *
13
+ * @param options - Device management configuration
14
+ */
15
+ const useDeviceManagement = ({
16
+ oxyServices,
17
+ activeSessionId,
18
+ onError,
19
+ clearSessionState,
20
+ logger
21
+ }) => {
22
+ const getDeviceSessions = (0, _react.useCallback)(async () => {
23
+ if (!activeSessionId) throw new Error('No active session');
24
+ try {
25
+ return await oxyServices.getDeviceSessions(activeSessionId);
26
+ } catch (error) {
27
+ (0, _errorHandlers.handleAuthError)(error, {
28
+ defaultMessage: 'Failed to get device sessions',
29
+ code: 'GET_DEVICE_SESSIONS_ERROR',
30
+ onError,
31
+ logger
32
+ });
33
+ throw error instanceof Error ? error : new Error('Failed to get device sessions');
34
+ }
35
+ }, [activeSessionId, logger, onError, oxyServices]);
36
+ const logoutAllDeviceSessions = (0, _react.useCallback)(async () => {
37
+ if (!activeSessionId) throw new Error('No active session');
38
+ try {
39
+ await oxyServices.logoutAllDeviceSessions(activeSessionId);
40
+ await clearSessionState();
41
+ } catch (error) {
42
+ (0, _errorHandlers.handleAuthError)(error, {
43
+ defaultMessage: 'Failed to logout all device sessions',
44
+ code: 'LOGOUT_ALL_DEVICES_ERROR',
45
+ onError,
46
+ logger
47
+ });
48
+ throw error instanceof Error ? error : new Error('Failed to logout all device sessions');
49
+ }
50
+ }, [activeSessionId, clearSessionState, logger, onError, oxyServices]);
51
+ const updateDeviceName = (0, _react.useCallback)(async deviceName => {
52
+ if (!activeSessionId) throw new Error('No active session');
53
+ try {
54
+ await oxyServices.updateDeviceName(activeSessionId, deviceName);
55
+ await _deviceManager.DeviceManager.updateDeviceName(deviceName);
56
+ } catch (error) {
57
+ (0, _errorHandlers.handleAuthError)(error, {
58
+ defaultMessage: 'Failed to update device name',
59
+ code: 'UPDATE_DEVICE_NAME_ERROR',
60
+ onError,
61
+ logger
62
+ });
63
+ throw error instanceof Error ? error : new Error('Failed to update device name');
64
+ }
65
+ }, [activeSessionId, logger, onError, oxyServices]);
66
+ return {
67
+ getDeviceSessions,
68
+ logoutAllDeviceSessions,
69
+ updateDeviceName
70
+ };
71
+ };
72
+ exports.useDeviceManagement = useDeviceManagement;
73
+ //# sourceMappingURL=useDeviceManagement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_deviceManager","_errorHandlers","useDeviceManagement","oxyServices","activeSessionId","onError","clearSessionState","logger","getDeviceSessions","useCallback","Error","error","handleAuthError","defaultMessage","code","logoutAllDeviceSessions","updateDeviceName","deviceName","DeviceManager","exports"],"sourceRoot":"../../../../src","sources":["ui/hooks/useDeviceManagement.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAA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,EAAE,CAACN,eAAe,EAAEE,iBAAiB,EAAEC,MAAM,EAAEF,OAAO,EAAEF,WAAW,CAAC,CAAC;EAEtE,MAAMa,gBAAgB,GAAG,IAAAP,kBAAW,EAClC,MAAOQ,UAAkB,IAAoB;IAC3C,IAAI,CAACb,eAAe,EAAE,MAAM,IAAIM,KAAK,CAAC,mBAAmB,CAAC;IAE1D,IAAI;MACF,MAAMP,WAAW,CAACa,gBAAgB,CAACZ,eAAe,EAAEa,UAAU,CAAC;MAC/D,MAAMC,4BAAa,CAACF,gBAAgB,CAACC,UAAU,CAAC;IAClD,CAAC,CAAC,OAAON,KAAK,EAAE;MACd,IAAAC,8BAAe,EAACD,KAAK,EAAE;QACrBE,cAAc,EAAE,8BAA8B;QAC9CC,IAAI,EAAE,0BAA0B;QAChCT,OAAO;QACPE;MACF,CAAC,CAAC;MACF,MAAMI,KAAK,YAAYD,KAAK,GAAGC,KAAK,GAAG,IAAID,KAAK,CAAC,8BAA8B,CAAC;IAClF;EACF,CAAC,EACD,CAACN,eAAe,EAAEG,MAAM,EAAEF,OAAO,EAAEF,WAAW,CAChD,CAAC;EAED,OAAO;IACLK,iBAAiB;IACjBO,uBAAuB;IACvBC;EACF,CAAC;AACH,CAAC;AAACG,OAAA,CAAAjB,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -7,7 +7,7 @@ exports.useProfileEditing = void 0;
7
7
  var _react = require("react");
8
8
  var _useI18n = require("./useI18n");
9
9
  var _useAccountMutations = require("./mutations/useAccountMutations");
10
- var _authStore = require("../stores/authStore");
10
+ var _useAccountQueries = require("./queries/useAccountQueries");
11
11
  /**
12
12
  * Hook for managing profile editing operations
13
13
  * Provides functions to update profile fields and handle saving
@@ -17,6 +17,9 @@ const useProfileEditing = () => {
17
17
  t
18
18
  } = (0, _useI18n.useI18n)();
19
19
  const updateProfileMutation = (0, _useAccountMutations.useUpdateProfile)();
20
+ const {
21
+ data: currentUser
22
+ } = (0, _useAccountQueries.useCurrentUser)();
20
23
 
21
24
  /**
22
25
  * Save profile updates to the server using TanStack Query
@@ -51,7 +54,6 @@ const useProfileEditing = () => {
51
54
 
52
55
  // Handle name field
53
56
  if (updates.displayName !== undefined || updates.lastName !== undefined) {
54
- const currentUser = _authStore.useAuthStore.getState().user;
55
57
  const currentName = currentUser?.name;
56
58
  updateData.name = {
57
59
  first: updates.displayName ?? (typeof currentName === 'object' ? currentName?.first : '') ?? '',
@@ -65,7 +67,7 @@ const useProfileEditing = () => {
65
67
  // Error toast is handled by the mutation
66
68
  return false;
67
69
  }
68
- }, [updateProfileMutation, t]);
70
+ }, [updateProfileMutation, t, currentUser]);
69
71
 
70
72
  /**
71
73
  * Update a single profile field
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_useI18n","_useAccountMutations","_authStore","useProfileEditing","t","useI18n","updateProfileMutation","useUpdateProfile","saveProfile","useCallback","updates","updateData","username","undefined","email","bio","location","locations","length","name","links","linksMetadata","avatar","displayName","lastName","currentUser","useAuthStore","getState","user","currentName","first","last","mutateAsync","error","updateField","field","value","map","link","url","isSaving","isPending","exports"],"sourceRoot":"../../../../src","sources":["ui/hooks/useProfileEditing.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AA0BA;AACA;AACA;AACA;AACO,MAAMI,iBAAiB,GAAGA,CAAA,KAAM;EACnC,MAAM;IAAEC;EAAE,CAAC,GAAG,IAAAC,gBAAO,EAAC,CAAC;EACvB,MAAMC,qBAAqB,GAAG,IAAAC,qCAAgB,EAAC,CAAC;;EAEhD;AACJ;AACA;EACI,MAAMC,WAAW,GAAG,IAAAC,kBAAW,EAAC,MAAOC,OAA0B,IAAK;IAClE;IACA,MAAMC,UAA+B,GAAG,CAAC,CAAC;IAE1C,IAAID,OAAO,CAACE,QAAQ,KAAKC,SAAS,EAAE;MAChCF,UAAU,C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AC;EAEjB,OAAO;IACHA,WAAW;IACX0B,WAAW;IACXM,QAAQ,EAAElC,qBAAqB,CAACmC;EACpC,CAAC;AACL,CAAC;AAACC,OAAA,CAAAvC,iBAAA,GAAAA,iBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_useI18n","_useAccountMutations","_useAccountQueries","useProfileEditing","t","useI18n","updateProfileMutation","useUpdateProfile","data","currentUser","useCurrentUser","saveProfile","useCallback","updates","updateData","username","undefined","email","bio","location","locations","length","name","links","linksMetadata","avatar","displayName","lastName","currentName","first","last","mutateAsync","error","updateField","field","value","map","link","url","isSaving","isPending","exports"],"sourceRoot":"../../../../src","sources":["ui/hooks/useProfileEditing.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AA0BA;AACA;AACA;AACA;AACO,MAAMI,iBAAiB,GAAGA,CAAA,KAAM;EACnC,MAAM;IAAEC;EAAE,CAAC,GAAG,IAAAC,gBAAO,EAAC,CAAC;EACvB,MAAMC,qBAAqB,GAAG,IAAAC,qCAAgB,EAAC,CAAC;EAChD,MAAM;IAAEC,IAAI,EAAEC;EAAY,CAAC,GAAG,IAAAC,iCAAc,EAAC,CAAC;;EAE9C;AACJ;AACA;EACI,MAAMC,WAAW,GAAG,IAAAC,kBAAW,EAAC,MAAOC,OAA0B,IAAK;IAClE;IACA,MAAMC,UAA+B,GAAG,CAAC,CAAC;IAE1C,IAAID,OAAO,CAACE,QAAQ,KAAKC,SAAS,EAAE;MAChCF,UAAU,CAACC,QAAQ,GAAGF,OAAO,CAACE,QAAQ;IAC1C;IACA,IAAIF,OAAO,CAACI,KAAK,KAAKD,SAAS,EAAE;MAC7BF,UAAU,CAACG,KAAK,GAAGJ,OAAO,CAACI,KAAK;IACpC;IACA,IAAIJ,OAAO,CAACK,GAAG,KAAKF,SAAS,EAAE;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